|
|
(self.webpackChunk=self.webpackChunk||[]).push([[1275],{89489:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},59477:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},49198:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},52671:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},8657:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},56082:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},15075:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},43531:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},61485:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={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"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},32050:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 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:"upload",theme:"outlined"},Re=de,ne=bt(7657),ae=function(Jt,Be){return te.createElement(ne.Z,(0,wt.Z)({},Jt,{ref:Be,icon:Re}))},Tt=te.forwardRef(ae),be=Tt},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(gn,Ln){"use strict";Ln.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 gn(Nt,et,nt,ht){nt===void 0&&(nt=0),ht===void 0&&(ht=1/0),this._name=Nt,this._defaultValue=et,this._minimum=nt,this._maximum=ht}Object.defineProperty(gn.prototype,"name",{get:function(){return this._name},set:function(Nt){if(typeof Nt!="string"||Nt==="")throw new Error("Shape name must be a valid string.");this._name=Nt}}),Object.defineProperty(gn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("The default value must be a real number, not: "+Nt);this._defaultValue=Nt}}),Object.defineProperty(gn.prototype,"minimum",{get:function(){return this._minimum},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("Minimum must be a real number, not: "+Nt);this._minimum=Nt}}),Object.defineProperty(gn.prototype,"maximum",{get:function(){return this._maximum},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("Maximum must be a real number, not: "+Nt);this._maximum=Nt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Nt,et){var nt=go.Shape._FigureParameters[Nt];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Nt,et,nt){if(!(nt instanceof gn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValue<nt.minimum||nt.defaultValue>nt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ht=go.Shape._FigureParameters[Nt];ht||(ht=[],go.Shape._FigureParameters[Nt]=ht),ht[et]=nt};var Ln=[];function bt(Nt,et){var nt=Ln.pop();return nt===void 0?new go.Point(Nt,et):(nt.x=Nt,nt.y=et,nt)}function wt(){var Nt=Ln.pop();return Nt===void 0?new go.Point:Nt}function te(Nt){Ln.push(Nt)}function de(Nt,et,nt,ht,lt,gt,vt,Pt,At){At||(At=new go.Point);var Bt=Nt-nt,jt=lt-vt,_t=NaN,se=NaN;if(Bt===0)if(jt===0)Nt===nt&&(_t=Nt,se=et);else{var Vt=(gt-Pt)/jt,he=gt-Vt*lt;_t=Nt,se=Vt*_t+he}else if(jt===0){var Zt=(et-ht)/Bt,Oe=et-Zt*Nt;_t=lt,se=Zt*_t+Oe}else{var Zt=(et-ht)/Bt,Vt=(gt-Pt)/jt,Oe=et-Zt*Nt,he=gt-Vt*lt;_t=(he-Oe)/(Zt-Vt),se=Zt*_t+Oe}return At.x=_t,At.y=se,At}function Re(Nt,et,nt,ht,lt,gt,vt,Pt,At,Bt,jt,_t,se,Vt){var he=1-At,Zt=At,Oe=Nt*he+nt*Zt,me=et*he+ht*Zt,Ve=nt*he+lt*Zt,Xe=ht*he+gt*Zt,Je=lt*he+vt*Zt,wn=gt*he+Pt*Zt,Mn=Oe*he+Ve*Zt,we=me*he+Xe*Zt,Yt=Ve*he+Je*Zt,_e=Xe*he+wn*Zt,Zn=Mn*he+Yt*Zt,Dn=we*he+_e*Zt;Bt.x=Oe,Bt.y=me,jt.x=Mn,jt.y=we,_t.x=Zn,_t.y=Dn,se.x=Yt,se.y=_e,Vt.x=Je,Vt.y=wn}var ne=new go.Spot(.156,.156),ae=new go.Spot(.844,.844),Tt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new gn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var lt=ht*Tt,gt=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-lt,0,et,lt)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)).add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,nt-lt,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ht,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,lt,nt,0,nt-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,lt,lt,0).close()));return lt>1&&(gt.spot1=new go.Spot(0,0,lt,lt),gt.spot2=new go.Spot(1,1,-lt,-lt)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Nt,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(Nt,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(Nt,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(Nt,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(Nt,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(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=nt/2,ht.endX=et,ht.endY=nt/2,ht}),go.Shape.defineFigureGenerator("LineV",function(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et/2,ht.startY=0,ht.endX=et/2,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Nt,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(Nt,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(Nt,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(Nt,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(Nt,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(Nt,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(Nt,et,nt){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*et,(1-ht)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,(1-ht)*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(Nt,et,nt){var ht=et/2,lt=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return lt.spot1=ne,lt.spot2=ae,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=et,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Line2",function(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et,ht.startY=0,ht.endX=0,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Curve1",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Tt*et,0,et,(1-Tt)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,Tt*nt,(1-Tt)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,Tt*nt,Tt*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-Tt)*et,0,0,(1-Tt)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Nt,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(Nt,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(Nt,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(Nt,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 gn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var lt=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.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())):gt.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<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)?ht=10:ht<-et?ht=-et:ht>et&&(ht=et);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.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())):gt.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<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.setFigureParameter("Trapezoid1",0,new gn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)?ht=.2:ht<.5?ht=-.5:ht>.5&&(ht=.5);var lt=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.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())):gt.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())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new gn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)?ht=20:ht<-et?ht=-et/2:ht>et&&(ht=et/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.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())):gt.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())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.setFigureParameter("ManualOperation",0,new gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)?ht=10:ht<-et?ht=-et/2:ht>et&&(ht=et/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.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())):gt.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())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}});var be=[];function ye(){var Nt=be.pop();return Nt===void 0?[]:Nt}function Jt(Nt){Nt.length=0,be.push(Nt)}function Be(Nt){for(var et=ye(),nt=.5,ht=.5,lt=Math.PI*1.5,gt=0,vt=0;vt<Nt;vt++)gt=2*Math.PI/Nt*vt+lt,et[vt]=new go.Point(ht+nt*Math.cos(gt),ht+nt*Math.sin(gt));return et.push(et[0]),et}function pe(Nt){var et=je(Nt),nt=ye();nt[0]=et[0];for(var ht=1,lt=1;ht<et.length;ht+=2,lt+=3)nt[lt]=et[ht],nt[lt+1]=et[ht],nt[lt+2]=et[ht+1];return Jt(et),nt}function je(Nt){for(var et=Be(Nt),nt=ye(),ht=Math.floor(et.length/2),lt=et.length-1,gt=Nt%2===0?2:1,vt=0;vt<lt;vt++){var Pt=et[vt],At=et[vt+1],Bt=et[(ht+vt-1)%lt],jt=et[(ht+vt+gt)%lt];nt[vt*2]=Pt,nt[vt*2+1]=de(Pt.x,Pt.y,Bt.x,Bt.y,At.x,At.y,jt.x,jt.y,new go.Point)}return nt[nt.length]=nt[0],Jt(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Nt,et,nt){var ht=Be(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<5;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(Nt,et,nt){var ht=Be(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<6;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(Nt,et,nt){var ht=Be(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<7;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(Nt,et,nt){var ht=Be(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<8;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(Nt,et,nt){var ht=Be(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<9;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(Nt,et,nt){var ht=Be(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<10;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(Nt,et,nt){var ht=Be(12),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<12;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(Nt,et,nt){var ht=je(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<10;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(Nt,et,nt){var ht=je(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<12;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Nt,et,nt){var ht=je(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<14;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(Nt,et,nt){var ht=je(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<16;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(Nt,et,nt){var ht=je(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<18;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(Nt,et,nt){var ht=je(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<20;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Jt(ht),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Nt,et,nt){var ht=pe(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),Jt(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Nt,et,nt){var ht=pe(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),Jt(ht),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Nt,et,nt){var ht=pe(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),Jt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Nt,et,nt){var ht=pe(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),Jt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Nt,et,nt){var ht=pe(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),Jt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Nt,et,nt){var ht=pe(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),Jt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new gn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new gn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN,lt=Nt?Nt.parameter2:NaN;isNaN(ht)&&(ht=8),isNaN(lt)&&(lt=8);var gt=new go.Geometry,vt=new go.PathFigure(0,0,!0);return gt.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()),ht<et/2&<<nt/2&&(vt.add(new go.PathSegment(go.PathSegment.Move,ht,lt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt-lt)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,nt-lt)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,lt).close())),gt.setSpots(0,0,1,1,ht,lt,-ht,-lt),gt}),go.Shape.setFigureParameter("Ring",0,new gn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=8);var lt=et/2,gt=new go.Geometry,vt=new go.PathFigure(et,et/2,!0);gt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var Pt=Math.max(lt-ht,0);return Pt>0&&(vt.add(new go.PathSegment(go.PathSegment.Move,et/2+Pt,et/2)),vt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,Pt,Pt).close())),gt.spot1=ne,gt.spot2=ae,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Nt,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(Nt,et,nt){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new gn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new gn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN,lt=Nt?Nt.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(lt)&&(lt=315);var gt=ht%360;gt<0&&(gt+=360);var vt=lt%360,Pt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(Pt,Pt).add(new go.PathSegment(go.PathSegment.Arc,gt,vt,Pt,Pt,Pt,Pt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Nt,et,nt){var ht=Tt/Math.SQRT2*.5,lt=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*et,gt*nt,et,(1-ht)*nt,(lt+ht)*et,(gt+ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var lt=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+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,gt+lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-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,gt-lt,vt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+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,gt+lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-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,gt-lt,vt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=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 gt=et/2,vt=nt/2,Pt=Math.atan2(nt,et),At=ht-Math.min(Math.cos(Pt)*ht/2,gt),Bt=ht-Math.min(Math.sin(Pt)*ht/2,vt),lt=new go.Geometry,jt=new go.PathFigure(At,0,!0);return lt.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),jt.add(new go.PathSegment(go.PathSegment.Line,et-At,0)),jt.add(new go.PathSegment(go.PathSegment.Line,et,Bt)),jt.add(new go.PathSegment(go.PathSegment.Line,.8*et,vt)),jt.add(new go.PathSegment(go.PathSegment.Line,et,nt-Bt)),jt.add(new go.PathSegment(go.PathSegment.Line,et-At,nt)),jt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),jt.add(new go.PathSegment(go.PathSegment.Line,At,nt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,nt-Bt)),jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,Bt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=new go.Geometry,gt=new go.PathFigure(.1*et,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new gn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new gn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.5);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ht)*et,.25*nt,Math.abs(1-ht)*et,.75*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,Tt*et,0,et,(.5-Tt/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+Tt/2)*nt,Tt*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Nt,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(Nt,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(Nt,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(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.4*et,.6*nt,!0);ht.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 gt=.2,vt=.3,Pt=0,At=gt*Tt;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+Pt)*nt,(.5-gt+vt)*et,(.5+At+Pt)*nt,(.5-At+vt)*et,(.5+gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+Pt)*nt,(.5+At+vt)*et,(.5+gt+Pt)*nt,(.5+gt+vt)*et,(.5+At+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+Pt)*nt,(1-.5+gt+vt)*et,(.5-At+Pt)*nt,(.5+At+vt)*et,(.5-gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-At+vt)*et,(.5-gt+Pt)*nt,(.5-gt+vt+.05)*et,(.5-At+Pt-.02)*nt)),gt=.2,vt=0,Pt=-.3,At=gt*Tt,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+Pt)*nt,(.5+At+vt)*et,(.5+gt+Pt)*nt,(.5+gt+vt)*et,(.5+At+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+Pt)*nt,(1-.5+gt+vt)*et,(.5-At+Pt)*nt,(.5+At+vt)*et,(.5-gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+Pt)*nt,(.5-At+vt)*et,(.5-gt+Pt)*nt,(.5-gt+vt)*et,(.5-At+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-At+vt)*et,(.5+gt+Pt)*nt,(.5-gt+vt)*et,(.5+At+Pt)*nt,(.5-At+vt)*et,(.5+gt+Pt)*nt)),gt=.2,vt=-.3,Pt=0,At=gt*Tt,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+Pt)*nt,(1-.5+gt+vt-.05)*et,(.5-At+Pt-.02)*nt,(.5+At+vt)*et,(.5-gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+Pt)*nt,(.5-At+vt)*et,(.5-gt+Pt)*nt,(.5-gt+vt)*et,(.5-At+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+Pt)*nt,(.5-gt+vt)*et,(.5+At+Pt)*nt,(.5-At+vt)*et,(.5+gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+At+vt)*et,(.5+gt+Pt)*nt,(.5+gt+vt)*et,(.5+At+Pt)*nt).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*.5,0,!0);ht.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 gt=.1,vt=.5,Pt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(vt+gt)*et,Pt*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*vt,nt*Pt,gt*et,gt*et).close()),lt=new go.PathFigure(et*.5,0,!1),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),Pt=.75,lt=new go.PathFigure((vt+gt)*et,Pt*nt,!0),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*vt,nt*Pt,gt*et,gt*et).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Nt,et,nt){var ht=.8535533905932737,lt=.5*et,gt=.5*nt;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,gt,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,ht*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=.5,vt=.5,Pt=.5,At=new go.PathFigure(vt*et,(Pt-gt)*nt);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-gt)*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt)),gt=.4,lt=Tt*.4;var Bt=wt(),jt=wt(),_t=wt(),se=wt();Re(vt,Pt-gt,vt+lt,Pt-gt,vt+gt,Pt-lt,vt+gt,Pt,.42,Bt,jt,_t,se,se);var Vt=wt(),he=wt(),Zt=wt();Re(vt,Pt-gt,vt+lt,Pt-gt,vt+gt,Pt-lt,vt+gt,Pt,.58,se,se,Zt,Vt,he);var Oe=wt(),me=wt(),Ve=wt();Re(vt,Pt+gt,vt-lt,Pt+gt,vt-gt,Pt+lt,vt-gt,Pt,.42,Oe,me,Ve,se,se);var Xe=wt(),Je=wt(),wn=wt();return Re(vt,Pt+gt,vt-lt,Pt+gt,vt-gt,Pt+lt,vt-gt,Pt,.58,se,se,wn,Xe,Je),At.add(new go.PathSegment(go.PathSegment.Move,wn.x*et,wn.y*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,Xe.x*et,Xe.y*nt,Je.x*et,Je.y*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,_t.x*et,_t.y*nt,Bt.x*et,Bt.y*nt,jt.x*et,jt.y*nt)),At.add(new go.PathSegment(go.PathSegment.Line,wn.x*et,wn.y*nt).close()),At.add(new go.PathSegment(go.PathSegment.Move,Ve.x*et,Ve.y*nt)),At.add(new go.PathSegment(go.PathSegment.Line,Zt.x*et,Zt.y*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,Vt.x*et,Vt.y*nt,he.x*et,he.y*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ve.x*et,Ve.y*nt,Oe.x*et,Oe.y*nt,me.x*et,me.y*nt).close()),te(Bt),te(jt),te(_t),te(se),te(Vt),te(he),te(Zt),te(Oe),te(me),te(Ve),te(Xe),te(Je),te(wn),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Nt,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 gn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>et&&(ht=et);var lt=(et-ht)/2,gt=lt+ht;return new go.Geometry().add(new go.PathFigure(gt,.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(Nt,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(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.4,gt=.4,vt=.5,Pt=.5,At=wt(),Bt=wt(),jt=wt(),_t=wt(),se=new go.PathFigure((vt-gt)*et,Pt*nt,!1);ht.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt)),Re(vt,Pt-gt,vt+lt,Pt-gt,vt+gt,Pt-lt,vt+gt,Pt,.44,jt,_t,Bt,At,At),se.add(new go.PathSegment(go.PathSegment.Bezier,Bt.x*et,Bt.y*nt,jt.x*et,jt.y*nt,_t.x*et,_t.y*nt));var Vt=bt(Bt.x,Bt.y);Re(vt,Pt-gt,vt+lt,Pt-gt,vt+gt,Pt-lt,vt+gt,Pt,.56,At,At,Bt,jt,_t);var he=bt(Bt.x,Bt.y);se.add(new go.PathSegment(go.PathSegment.Line,(Vt.x*.1+.95*.9)*et,Vt.y*.1*nt)),se.add(new go.PathSegment(go.PathSegment.Line,.85*et,Vt.y*.1*nt)),se.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),se.add(new go.PathSegment(go.PathSegment.Line,et,0)),se.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),se.add(new go.PathSegment(go.PathSegment.Line,(he.x*.1+.9)*et,.15*nt)),se.add(new go.PathSegment(go.PathSegment.Line,(he.x*.1+.9)*et,(he.y*.1+.05*.9)*nt)),se.add(new go.PathSegment(go.PathSegment.Line,he.x*et,he.y*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,jt.x*et,jt.y*nt,_t.x*et,_t.y*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,(vt-lt)*et,(Pt+gt)*nt,(vt-gt)*et,(Pt+lt)*nt)),gt=.35,lt=Tt*.35;var Zt=new go.PathFigure(vt*et,(Pt-gt)*nt,!1);ht.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-gt)*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt));var Oe=new go.PathFigure((vt-gt)*et,Pt*nt,!1);return ht.add(Oe),te(At),te(Bt),te(jt),te(_t),te(Vt),te(he),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(Nt,et,nt){var ht=new go.Geometry,lt=.375,gt=0,vt=-.125,Pt=lt*Tt,At=new go.PathFigure((.525+gt)*et,(.5+lt+vt)*nt,!1);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+vt)*nt,(.5+Pt+gt)*et,(.5+lt+vt)*nt,(.5+lt+gt)*et,(.5+Pt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+vt)*nt,(1-.5+lt+gt)*et,(.5-Pt+vt)*nt,(.5+Pt+gt)*et,(.5-lt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+vt)*nt,(.5-Pt+gt)*et,(.5-lt+vt)*nt,(.5-lt+gt)*et,(.5-Pt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+lt+vt)*nt,(.5-lt+gt)*et,(.5+Pt+vt)*nt,(.5-Pt+gt)*et,(.5+lt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),At.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),At.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),lt=.325,gt=0,vt=-.125,Pt=lt*Tt;var At=new go.PathFigure((1-.5+lt+gt)*et,(.5+vt)*nt,!1);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+lt+vt)*nt,(.5+lt+gt)*et,(.5+Pt+vt)*nt,(.5+Pt+gt)*et,(.5+lt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+vt)*nt,(.5-Pt+gt)*et,(.5+lt+vt)*nt,(.5-lt+gt)*et,(.5+Pt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+vt)*nt,(.5-lt+gt)*et,(.5-Pt+vt)*nt,(.5-Pt+gt)*et,(.5-lt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+vt)*nt,(.5+Pt+gt)*et,(.5-lt+vt)*nt,(1-.5+lt+gt)*et,(.5-Pt+vt)*nt));var At=new go.PathFigure((.525+gt)*et,(.5+lt+vt)*nt,!1);return ht.add(At),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*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(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*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,ht*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Nt,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(Nt,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(Nt,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(Nt,et,nt){var ht=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 ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(Nt,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(Nt,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(Nt,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(Nt,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(Nt,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(Nt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Nt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new gn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new gn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ht)*et,vt=(.5-lt/2)*nt,Pt=(.5+lt/2)*nt,At=new go.Geometry,Bt=new go.PathFigure(0,vt,!0);At.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Bt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,Pt)),Bt.add(new go.PathSegment(go.PathSegment.Line,0,Pt).close()),At.spot1=new go.Spot(0,vt/nt);var jt=de(0,Pt/nt,1,Pt/nt,gt/et,1,1,.5,wt());return At.spot2=new go.Spot(jt.x,jt.y),te(jt),At}),go.Shape.setFigureParameter("Arrow2",0,new gn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new gn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=30),ht>et&&(ht=et);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,nt/2);var gt=et-ht,vt=(nt-lt)/2,Pt=vt+lt,At=new go.Geometry,Bt=new go.PathFigure(0,vt,!0);At.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Bt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Bt.add(new go.PathSegment(go.PathSegment.Line,gt,Pt)),Bt.add(new go.PathSegment(go.PathSegment.Line,0,Pt).close()),At.spot1=new go.Spot(0,vt/nt);var jt=de(0,Pt/nt,1,Pt/nt,gt/et,1,1,.5,wt());return At.spot2=new go.Spot(jt.x,jt.y),te(jt),At}),go.Shape.defineFigureGenerator("Chevron",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.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()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new gn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);vt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),Pt.add(new go.PathSegment(go.PathSegment.Line,.3*et,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var At=de(0,.5,.3,0,0,lt/nt,.1,lt/nt,wt());return vt.spot1=new go.Spot(At.x,At.y),At=de(.7,1,1,.5,0,gt/nt,1,gt/nt,At),vt.spot2=new go.Spot(At.x,At.y),te(At),vt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new gn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new gn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ht)/2,vt=gt+ht,Pt=(nt-lt)/2,At=Pt+lt;(ht>nt||lt>nt)&&(lt>ht?(ht=ht*nt/lt,gt=(nt-ht)/2,vt=gt+ht,Pt=0,At=nt):(gt=0,vt=nt,Pt=0,At=nt));var Bt=new go.Geometry,jt=new go.PathFigure(et,.5*nt,!0);Bt.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,At)),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,vt)),jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,At)),jt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Pt)),jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Pt).close());var _t=de(0,.5,.3,Pt/nt,0,gt/nt,1,gt/nt,wt());return Bt.spot1=new go.Spot(_t.x,_t.y),_t=de(.7,At/nt,1,.5,0,vt/nt,1,vt/nt,_t),Bt.spot2=new go.Spot(_t.x,_t.y),te(_t),Bt}),go.Shape.setFigureParameter("IBeamArrow",0,new gn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);vt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*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,.2*et,0)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*et,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(0,lt/nt);var At=de(.7,1,1,.5,0,gt/nt,1,gt/nt,wt());return vt.spot2=new go.Spot(At.x,At.y),te(At),vt}),go.Shape.setFigureParameter("IBeamArrow2",0,new gn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new gn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ht)/2,vt=gt+ht,Pt=(nt-lt)/2,At=Pt+lt;(ht>nt||lt>nt)&&(lt>ht?(ht=ht*nt/lt,gt=(nt-ht)/2,vt=gt+ht,Pt=0,At=nt):(gt=0,vt=nt,Pt=0,At=nt));var Bt=new go.Geometry,jt=new go.PathFigure(et,.5*nt,!0);Bt.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,At)),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,At)),jt.add(new go.PathSegment(go.PathSegment.Line,0,At)),jt.add(new go.PathSegment(go.PathSegment.Line,0,Pt)),jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Pt)),jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Pt).close()),Bt.spot1=new go.Spot(0,gt/nt);var _t=de(.7,At/nt,1,.5,0,vt/nt,1,vt/nt,wt());return Bt.spot2=new go.Spot(_t.x,_t.y),te(_t),Bt}),go.Shape.setFigureParameter("Pointer",0,new gn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.1);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ht,.35);var vt=de(.2,.65,1,.65,0,1,1,.5,wt());return lt.spot2=new go.Spot(vt.x,vt.y),te(vt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new gn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),lt.spot1=new go.Spot(ht,.35);var vt=de(0,.65,1,.65,0,1,1,.5,wt());return lt.spot2=new go.Spot(vt.x,vt.y),te(vt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new gn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.4);var lt=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);vt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,.3);var At=de(.7,1,1,.5,0,gt/nt,1,gt/nt,wt());return vt.spot2=new go.Spot(At.x,At.y),te(At),vt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new gn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=50);var lt=(nt-ht)/2,gt=lt+ht;ht>nt&&(lt=0,gt=nt);var vt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);vt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,lt/nt);var At=de(.7,1,1,.5,0,gt/nt,1,gt/nt,wt());return vt.spot2=new go.Spot(At.x,At.y),te(At),vt}),go.Shape.setFigureParameter("SquareArrow",0,new gn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.7);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ht,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=Tt*.1,vt=new go.PathFigure(0,.9*nt,!0);return ht.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+gt)*nt,(.5+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.9*nt,!0);ht.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 gt=new go.PathFigure(0,.9*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,nt,!0);ht.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 gt=new go.PathFigure(.5*et,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.3*nt,!0);ht.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 gt=new go.PathFigure(0,.3*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(0,ht,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Tt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ht,(.5+gt)*et,0,1*et,Tt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-Tt*ht,(.5+gt)*et,1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,1*nt,0,nt-Tt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var Pt=new go.PathFigure(et,ht,!1);return lt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ht,1*et,2*ht-Tt*ht,(.5+gt)*et,2*ht)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*et,2*ht,0,2*ht-Tt*ht)),lt.spot1=new go.Spot(0,0,0,2*ht),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(0,nt-ht,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Tt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,(.5+gt)*et,0,et,Tt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-Tt*ht,(.5+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,nt,0,nt-Tt*ht));var Pt=new go.PathFigure(0,nt-ht,!1);return lt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ht,0,nt-ht-Tt*ht,(.5-gt)*et,nt-2*ht)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ht,(.5+gt)*et,nt-2*ht,et,nt-ht-Tt*ht)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ht),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(ht,0,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Tt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Tt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Tt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Tt*ht,0));var Pt=new go.PathFigure(ht,0,!1);return lt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*nt,ht+Tt*ht,0,2*ht,(.5-gt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ht,nt,2*ht,(.5+gt)*nt,ht+Tt*ht,nt)),lt.spot1=new go.Spot(0,0,2*ht,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(et-ht,0,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Tt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Tt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Tt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Tt*ht,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0));var Pt=new go.PathFigure(et-ht,0,!1);return lt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ht,.5*nt,et-ht-Tt*ht,0,et-2*ht,(.5-gt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et-2*ht,(.5+gt)*nt,et-ht-Tt*ht,nt)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ht,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.25*et,.25*nt,!0);ht.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 gt=new go.PathFigure(.25*et,.25*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!0);ht.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 gt=new go.PathFigure(0,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ht.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 gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ht.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 gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(Nt,et,nt){var ht=new go.Geometry,lt=.2,gt=.1,vt=Tt*lt,Pt=Tt*gt,At=.5,Bt=.1,jt=new go.PathFigure(At*et,(Bt+gt)*nt,!0);ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,(At-lt)*et,Bt*nt,(At-vt)*et,(Bt+gt)*nt,(At-lt)*et,(Bt+Pt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-gt)*nt,(At-lt)*et,(Bt-Pt)*nt,(At-vt)*et,(Bt-gt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(At+lt)*et,Bt*nt,(At+vt)*et,(Bt-gt)*nt,(At+lt)*et,(Bt-Pt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt+gt)*nt,(At+lt)*et,(Bt+Pt)*nt,(At+vt)*et,(Bt+gt)*nt));var _t=.05,se=Tt*_t;At=.05,Bt=.25;var Vt=new go.PathFigure(.5*et,.2*nt,!0);return ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),At=.95,Bt=.25,Vt.add(new go.PathSegment(go.PathSegment.Bezier,(At+_t)*et,Bt*nt,(At+se)*et,(Bt-_t)*nt,(At+_t)*et,(Bt-se)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),_t=.025,se=Tt*_t,At=.825,Bt=.35,Vt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-_t)*nt,(At+_t)*et,(Bt-se)*nt,(At+se)*et,(Bt-_t)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(At-_t)*et,Bt*nt,(At-se)*et,(Bt-_t)*nt,(At-_t)*et,(Bt-se)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),_t=.05,se=Tt*_t,At=.5,Bt=.7,Vt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-_t)*nt,(At+_t)*et,(Bt-se)*nt,(At+se)*et,(Bt-_t)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(At-_t)*et,Bt*nt,(At-se)*et,(Bt-_t)*nt,(At-_t)*et,(Bt-se)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),_t=.025,se=Tt*_t,At=.175,Bt=.35,Vt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-_t)*nt,(At+_t)*et,(Bt-se)*nt,(At+se)*et,(Bt-_t)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(At-_t)*et,Bt*nt,(At-se)*et,(Bt-_t)*nt,(At-_t)*et,(Bt-se)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),_t=.05,se=Tt*_t,At=.05,Bt=.25,Vt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-_t)*nt,(At-_t)*et,(Bt-se)*nt,(At-se)*et,(Bt-_t)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new gn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(et,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),lt.spot1=new go.Spot(0,ht),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,.5*nt,!0);ht.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 gt=new go.PathFigure(.5*et,.5*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,lt*nt,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Database",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=Tt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.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+gt)*nt,(.5+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*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-gt)*nt,(.5-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-gt)*nt));var Pt=new go.PathFigure(et,.1*nt,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+gt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+gt)*nt,(.5+lt)*et,.4*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-lt)*et,.4*nt,0,(.3+gt)*nt)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.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()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=Tt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.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+gt)*nt,(.5+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*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-gt)*nt,(.5-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-gt)*nt));var Pt=new go.PathFigure(et,.1*nt,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+gt)*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ht.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()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=Tt*.2,vt=new go.PathFigure(0,.2*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-gt)*nt,(.2-gt)*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+gt)*et,0,et,(.2-gt)*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+gt)*nt,(.8+gt)*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-gt)*et,nt,0,(.8+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var Pt=new go.PathFigure(0,lt*nt,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,lt*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ht}),go.Shape.defineFigureGenerator("Document",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ht.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()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(lt*et,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ht.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 gt=new go.PathFigure(.1*et,.4*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.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 gt=new go.PathFigure(.75*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et,.5*nt,!0);ht.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 gt=new go.PathFigure(et,.5*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt));var vt=new go.PathFigure(et,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN,gt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var vt=new go.PathFigure(0,0,!0);ht.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 Pt=new go.PathFigure(lt*et,0,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,0,gt*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ht}),go.Shape.defineFigureGenerator("Junction",function(Nt,et,nt){var ht=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,vt=Tt*.5,Pt=.5,At=new go.PathFigure(et,Pt*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,Pt*et,nt,et,(Pt+vt)*nt,(Pt+vt)*et,nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,0,Pt*nt,(Pt-vt)*et,nt,0,(Pt+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Pt*et,0,0,(Pt-vt)*nt,(Pt-vt)*et,0)),At.add(new go.PathSegment(go.PathSegment.Bezier,et,Pt*nt,(Pt+vt)*et,0,et,(Pt-vt)*nt));var Bt=new go.PathFigure((gt+lt)*et,(gt+lt)*nt,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),Bt.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+lt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*et,gt*nt)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);ht.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 gt=new go.PathFigure(.1*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ht.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()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=.5,vt=new go.PathFigure(.5*et,nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*et,.9*nt,et,(gt+lt)*nt,(gt+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)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ht.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()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.7);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,lt*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.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()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(et,0,!0);ht.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 gt=new go.PathFigure(.1*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.1*et,.1*nt,!0);ht.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 gt=new go.PathFigure(.2*et,.1*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,vt=new go.PathFigure(0,0,!0);ht.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 Pt=new go.PathFigure(.5*lt*et,lt*nt,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*et,lt*nt)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.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()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt));var Pt=new go.PathFigure(et,.5*nt,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ht.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()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN,gt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN,gt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure((1-lt)*et,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Process",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(lt*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ht.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 gt=new go.PathFigure(0,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(lt*et,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),gt.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 ht.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)),ht.spot1=new go.Spot(lt,0),ht.spot2=new go.Spot(1-lt,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ht.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)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(Nt,et,nt){var ht=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+lt)*et,0,et,(.5-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+lt)*nt,(.5+lt)*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt));var Pt=new go.PathFigure(et,gt*nt,!1);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt));var At=new go.PathFigure(.8*et,.75*nt,!1);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ht}),go.Shape.defineFigureGenerator("Ground",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Inverter",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.1,gt=.1,vt=.9,Pt=.5,At=new go.PathFigure(.8*et,.5*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Line,0,nt)),At.add(new go.PathSegment(go.PathSegment.Line,0,0)),At.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var Bt=new go.PathFigure((vt+gt)*et,Pt*nt,!0);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,(vt-lt)*et,(Pt+gt)*nt,(vt-gt)*et,(Pt+lt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,(vt+lt)*et,(Pt-gt)*nt,(vt+gt)*et,(Pt-lt)*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=Tt*.4,vt=Tt*.1,Pt=.1,At=.9,Bt=.5,jt=new go.PathFigure(.8*et,.5*nt,!0);ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+lt)*et,nt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,0)),jt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),jt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+lt)*et,0,.8*et,(.5-gt)*nt));var _t=new go.PathFigure((At+Pt)*et,Bt*nt,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt+Pt)*nt,(At+Pt)*et,(Bt+vt)*nt,(At+vt)*et,(Bt+Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(At-Pt)*et,Bt*nt,(At-vt)*et,(Bt+Pt)*nt,(At-Pt)*et,(Bt+vt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-Pt)*nt,(At-Pt)*et,(Bt-vt)*nt,(At-vt)*et,(Bt-Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(At+Pt)*et,Bt*nt,(At+vt)*et,(Bt-Pt)*nt,(At+Pt)*et,(Bt-vt)*nt)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=Tt*lt,vt=0,Pt=.5,At=new go.PathFigure(.8*et,.5*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+gt)*et,(Pt-lt)*nt,.7*et,(Pt-gt)*nt)),lt=.1,gt=Tt*.1,vt=.9,Pt=.5;var Bt=new go.PathFigure((vt-lt)*et,Pt*nt,!0);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,Pt*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,Pt*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=Tt*lt,vt=0,Pt=.5,At=new go.PathFigure(0,0,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt+gt)*et,(Pt-lt)*nt,.8*et,(Pt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(Pt+gt)*nt,(vt+gt+gt)*et,(Pt+lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=Tt*lt,vt=.2,Pt=.5,At=new go.PathFigure(.1*et,0,!1);ht.add(At),At.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);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+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+gt)*et,(Pt-lt)*nt,.7*et,(Pt-gt)*nt)),lt=.1,gt=Tt*.1,vt=.9,Pt=.5;var jt=new go.PathFigure((vt-lt)*et,Pt*nt,!0);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,Pt*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,Pt*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=Tt*lt,vt=.2,Pt=.5,At=new go.PathFigure(.1*et,0,!1);ht.add(At),At.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 ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt)*et,(Pt-lt)*nt,.9*et,(Pt-gt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Resistor",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Inductor",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.1,gt=.1,vt=.1,Pt=.5,At=new go.PathFigure((vt-lt*.5)*et,nt,!1);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-lt)*et,nt,(vt-gt)*et,0)),vt=.3,At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+lt)*et,nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-lt)*et,nt,(vt-gt)*et,0)),vt=.5,At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+lt)*et,nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-lt)*et,nt,(vt-gt)*et,0)),vt=.7,At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+lt)*et,nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-lt)*et,nt,(vt-gt)*et,0)),vt=.9,At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt*.5)*et,nt,(vt+gt)*et,0,(vt+lt)*et,nt)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.5,gt=.5,vt=.5,Pt=.5,At=new go.PathFigure((vt-gt)*et,Pt*nt,!1);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,(vt+lt)*et,(Pt-gt)*nt,(vt+gt)*et,(Pt-lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,(vt-lt)*et,(Pt+gt)*nt,(vt-gt)*et,(Pt+lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Move,(vt-gt+.1)*et,Pt*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt-.1)*et,Pt*nt,vt*et,(Pt-gt)*nt,vt*et,(Pt+gt)*nt)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Diode",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et,0,!1);return ht.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)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(Nt,et,nt){var ht=new go.Geometry,lt=et,gt=nt;et=et*.38,nt=nt*.6;var vt=Tt*.8,Pt=.8,At=0,Bt=.5,jt=(lt-et)/2,_t=(gt-nt)/2,se=new go.PathFigure(At*et+jt,(Bt+Pt)*nt+_t,!0);ht.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,(At-Pt)*et+jt,Bt*nt+_t,(At-vt)*et+jt,(Bt+Pt)*nt+_t,(At-Pt)*et+jt,(Bt+vt)*nt+_t)),se.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt-Pt)*nt+_t,(At-Pt)*et+jt,(Bt-vt)*nt+_t,(At-vt)*et+jt,(Bt-Pt)*nt+_t)),se.add(new go.PathSegment(go.PathSegment.Bezier,(At-Pt+vt*.5)*et+jt,Bt*nt+_t,At*et+jt,(Bt-Pt)*nt+_t,(At-Pt+vt*.5)*et+jt,(Bt-vt)*nt+_t)),se.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt+Pt)*nt+_t,(At-Pt+vt*.5)*et+jt,(Bt+vt)*nt+_t,At*et+jt,(Bt+Pt)*nt+_t).close()),vt=Tt*.4,Pt=.4,At=.2,Bt=.5;var Vt=new go.PathFigure(At*et+jt,(Bt+Pt)*nt+_t,!0);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(At-Pt)*et+jt,Bt*nt+_t,(At-vt)*et+jt,(Bt+Pt)*nt+_t,(At-Pt)*et+jt,(Bt+vt)*nt+_t)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt-Pt)*nt+_t,(At-Pt)*et+jt,(Bt-vt)*nt+_t,(At-vt)*et+jt,(Bt-Pt)*nt+_t)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(At-Pt+vt*.5)*et+jt,Bt*nt+_t,At*et+jt,(Bt-Pt)*nt+_t,(At-Pt+vt*.5)*et+jt,(Bt-vt)*nt+_t)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt+Pt)*nt+_t,(At-Pt+vt*.5)*et+jt,(Bt+vt)*nt+_t,At*et+jt,(Bt+Pt)*nt+_t).close()),vt=Tt*.2,Pt=.2,At=.5,Bt=.5;var he=new go.PathFigure((At-Pt)*et+jt,Bt*nt+_t,!0);ht.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt-Pt)*nt+_t,(At-Pt)*et+jt,(Bt-vt)*nt+_t,(At-vt)*et+jt,(Bt-Pt)*nt+_t)),he.add(new go.PathSegment(go.PathSegment.Bezier,(At+Pt)*et+jt,Bt*nt+_t,(At+vt)*et+jt,(Bt-Pt)*nt+_t,(At+Pt)*et+jt,(Bt-vt)*nt+_t)),he.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt+Pt)*nt+_t,(At+Pt)*et+jt,(Bt+vt)*nt+_t,(At+vt)*et+jt,(Bt+Pt)*nt+_t)),he.add(new go.PathSegment(go.PathSegment.Bezier,(At-Pt)*et+jt,Bt*nt+_t,(At-vt)*et+jt,(Bt+Pt)*nt+_t,(At-Pt)*et+jt,(Bt+vt)*nt+_t)),vt=Tt*.4,Pt=.4,At=.8,Bt=.5;var Zt=new go.PathFigure(At*et+jt,(Bt-Pt)*nt+_t,!0);ht.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(At+Pt)*et+jt,Bt*nt+_t,(At+vt)*et+jt,(Bt-Pt)*nt+_t,(At+Pt)*et+jt,(Bt-vt)*nt+_t)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt+Pt)*nt+_t,(At+Pt)*et+jt,(Bt+vt)*nt+_t,(At+vt)*et+jt,(Bt+Pt)*nt+_t)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(At+Pt-vt*.5)*et+jt,Bt*nt+_t,At*et+jt,(Bt+Pt)*nt+_t,(At+Pt-vt*.5)*et+jt,(Bt+vt)*nt+_t)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt-Pt)*nt+_t,(At+Pt-vt*.5)*et+jt,(Bt-vt)*nt+_t,At*et+jt,(Bt-Pt)*nt+_t).close()),vt=Tt*.8,Pt=.8,At=1,Bt=.5;var Oe=new go.PathFigure(At*et+jt,(Bt-Pt)*nt+_t,!0);return ht.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(At+Pt)*et+jt,Bt*nt+_t,(At+vt)*et+jt,(Bt-Pt)*nt+_t,(At+Pt)*et+jt,(Bt-vt)*nt+_t)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt+Pt)*nt+_t,(At+Pt)*et+jt,(Bt+vt)*nt+_t,(At+vt)*et+jt,(Bt+Pt)*nt+_t)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(At+Pt-vt*.5)*et+jt,Bt*nt+_t,At*et+jt,(Bt+Pt)*nt+_t,(At+Pt-vt*.5)*et+jt,(Bt+vt)*nt+_t)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,At*et+jt,(Bt-Pt)*nt+_t,(At+Pt-vt*.5)*et+jt,(Bt-vt)*nt+_t,At*et+jt,(Bt-Pt)*nt+_t).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.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 gt=new go.PathFigure(0,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.35*et,0,!0);ht.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 gt=new go.PathFigure(.1*et,nt,!0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var vt=new go.PathFigure(.6*et,nt,!0,!0);ht.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 Pt=new go.PathFigure(0,.5*nt,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Power",function(Nt,et,nt){var ht=new go.Geometry,lt=Tt*.4,gt=.4,vt=.5,Pt=.5,At=wt(),Bt=wt(),jt=wt(),_t=wt();Re(vt,Pt-gt,vt+lt,Pt-gt,vt+gt,Pt-lt,vt+gt,Pt,.5,At,At,Bt,jt,_t);var se=bt(Bt.x,Bt.y),Vt=new go.PathFigure(Bt.x*et,Bt.y*nt,!0);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,jt.x*et,jt.y*nt,_t.x*et,_t.y*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,(vt-lt)*et,(Pt+gt)*nt,(vt-gt)*et,(Pt+lt)*nt)),Re(vt-gt,Pt,vt-gt,Pt-lt,vt-lt,Pt-gt,vt,Pt-gt,.5,jt,_t,Bt,At,At),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Bt.x*et,Bt.y*nt,jt.x*et,jt.y*nt,_t.x*et,_t.y*nt)),lt=Tt*.3,gt=.3,Re(vt-gt,Pt,vt-gt,Pt-lt,vt-lt,Pt-gt,vt,Pt-gt,.5,jt,_t,Bt,At,At),Vt.add(new go.PathSegment(go.PathSegment.Line,Bt.x*et,Bt.y*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,Pt*nt,_t.x*et,_t.y*nt,jt.x*et,jt.y*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+gt)*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,Pt*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),Re(vt,Pt-gt,vt+lt,Pt-gt,vt+gt,Pt-lt,vt+gt,Pt,.5,At,At,Bt,jt,_t),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Bt.x*et,Bt.y*nt,_t.x*et,_t.y*nt,jt.x*et,jt.y*nt).close());var Vt=new go.PathFigure(.45*et,0,!0);return ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),te(At),te(Bt),te(jt),te(_t),te(se),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt/2,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function gt(vt,Pt,At){vt.add(new go.PathSegment(go.PathSegment.Move,(.3+Pt)*et,(.8+At)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.5+Pt)*et,(.5+At)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.1+Pt)*et,(.5+At)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.3+Pt)*et,(.8+At)*nt).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.2*et,0,!0);return ht.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()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.37*et,0,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.1*et,nt,!0);return ht.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()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=0,vt=0,Pt=lt*Tt,At=.4*Math.SQRT2/2+.5,Bt=.5-.5*Math.SQRT2/2,jt=1,_t=.5,se=.5,Vt=0,he=new go.PathFigure(At*et,(1-Bt)*nt,!1);return ht.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,jt*et,_t*nt,jt*et,.7*nt,jt*et,_t*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(se+gt)*et,(Vt+gt)*nt,(.5+lt+gt)*et,(.5-Pt+gt)*nt,(.5+Pt+gt)*et,(.5-lt+gt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+vt)*nt,(.5-Pt+gt)*et,(.5-lt+vt)*nt,(.5-lt+gt)*et,(.5-Pt+vt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-lt+gt)*et,(.5+Pt+vt)*nt,(.5-Pt+gt)*et,.9*nt)),he.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),he.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),he.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(0,.5*nt,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);ht.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 ht.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)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.7*et,nt,!0);ht.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 gt=new go.PathFigure(.45*et,.73*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(.335*et,(1-.555)*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var vt=.5-.285,Pt=.5,At=vt,Bt=Math.PI/4,jt=4*(1-Math.cos(Bt))/(3*Math.sin(Bt)),_t=jt*.5,se=vt,Vt=vt,he=jt*se,Zt=jt*Vt;gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-se)*et,At*nt,(Pt-(he+se)/2)*et,(At+(Vt+Zt)/2)*nt,(Pt-se)*et,(At+Zt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*et,(At-Vt)*nt,(Pt-se)*et,(At-Zt)*nt,(Pt-he)*et,(At-Vt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+se)*et,At*nt,(Pt+he)*et,(At-Vt)*nt,(Pt+se)*et,(At-Zt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(Pt+se)*et,(At+Zt)*nt,(Pt+(he+se)/2)*et,(At+(Vt+Zt)/2)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var Oe=new go.PathFigure(.2*et,nt,!1);ht.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var me=new go.PathFigure(.8*et,nt,!1);return ht.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.1*et,0,!0);ht.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 gt=new go.PathFigure(.2*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(.1*et,nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Caution",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.05*et,nt,!0);ht.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 gt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*et,.875*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,gt*et,gt*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)),ht}),go.Shape.defineFigureGenerator("Recycle",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.45*et,.95*nt,!1);ht.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 gt=new go.PathFigure(.475*et,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var vt=new go.PathFigure(.675*et,.575*nt,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=Tt*.5,vt=new go.PathFigure(et,lt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,nt,et,(lt+gt)*nt,(lt+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*nt,(lt-gt)*et,nt,0,(lt+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,0,0,(lt-gt)*nt,(lt-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,lt*nt,(lt+gt)*et,0,et,(lt-gt)*nt));var Pt=new go.PathFigure(lt*et,0,!1);return ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.15*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,lt*et,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.85*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,0,lt*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.15*et,lt*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.85*et,lt*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),Pt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Package",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.15*nt,!0);ht.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 gt=new go.PathFigure(0,.15*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.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 gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(0,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et,nt,!0);ht.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 gt=new go.PathFigure(0,.2*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var vt=new go.PathFigure(0,.6*nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.15*et,.6*nt,!0);ht.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 gt=new go.PathFigure(.15*et,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et,nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Workcell",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.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 gt=new go.PathFigure(et,.8*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var vt=.1,Pt=Tt*.1,At=.2,Bt=.9,jt=new go.PathFigure((At-vt)*et,Bt*nt,!0);ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-vt)*nt,(At-vt)*et,(Bt-Pt)*nt,(At-Pt)*et,(Bt-vt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(At+vt)*et,Bt*nt,(At+Pt)*et,(Bt-vt)*nt,(At+vt)*et,(Bt-Pt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt+vt)*nt,(At+vt)*et,(Bt+Pt)*nt,(At+Pt)*et,(Bt+vt)*nt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(At-vt)*et,Bt*nt,(At-Pt)*et,(Bt+vt)*nt,(At-vt)*et,(Bt+Pt)*nt).close()),vt=.1,Pt=Tt*.1,At=.8,Bt=.9;var _t=new go.PathFigure((At-vt)*et,Bt*nt,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt-vt)*nt,(At-vt)*et,(Bt-Pt)*nt,(At-Pt)*et,(Bt-vt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(At+vt)*et,Bt*nt,(At+Pt)*et,(Bt-vt)*nt,(At+vt)*et,(Bt-Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Bt+vt)*nt,(At+vt)*et,(Bt+Pt)*nt,(At+Pt)*et,(Bt+vt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(At-vt)*et,Bt*nt,(At-Pt)*et,(Bt+vt)*nt,(At-vt)*et,(Bt+Pt)*nt).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.2*et,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Forklift",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.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 gt=new go.PathFigure(0,.5*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var vt=new go.PathFigure(.5*et,.8*nt,!0);ht.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 Pt=new go.PathFigure(.5*et,.7*nt,!1);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var At=.1,Bt=Tt*.1,jt=.1,_t=.9,se=new go.PathFigure((jt-At)*et,_t*nt,!0);ht.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,jt*et,(_t-At)*nt,(jt-At)*et,(_t-Bt)*nt,(jt-Bt)*et,(_t-At)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(jt+At)*et,_t*nt,(jt+Bt)*et,(_t-At)*nt,(jt+At)*et,(_t-Bt)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,jt*et,(_t+At)*nt,(jt+At)*et,(_t+Bt)*nt,(jt+Bt)*et,(_t+At)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(jt-At)*et,_t*nt,(jt-Bt)*et,(_t+At)*nt,(jt-At)*et,(_t+Bt)*nt)),At=.1,Bt=Tt*.1,jt=.4,_t=.9;var Vt=new go.PathFigure((jt-At)*et,_t*nt,!0);return ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,jt*et,(_t-At)*nt,(jt-At)*et,(_t-Bt)*nt,(jt-Bt)*et,(_t-At)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(jt+At)*et,_t*nt,(jt+Bt)*et,(_t-At)*nt,(jt+At)*et,(_t-Bt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,jt*et,(_t+At)*nt,(jt+At)*et,(_t+Bt)*nt,(jt+Bt)*et,(_t+At)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(jt-At)*et,_t*nt,(jt-Bt)*et,(_t+At)*nt,(jt-At)*et,(_t+Bt)*nt)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.1*et,.4*nt,!0);ht.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 gt=new go.PathFigure(.45*et,.7*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var vt=new go.PathFigure(.55*et,.4*nt,!0);ht.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 jt=.05,_t=Tt*.05,se=.175,Vt=.95,Pt=new go.PathFigure((se-jt)*et,Vt*nt,!0);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt-jt)*nt,(se-jt)*et,(Vt-_t)*nt,(se-_t)*et,(Vt-jt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(se+jt)*et,Vt*nt,(se+_t)*et,(Vt-jt)*nt,(se+jt)*et,(Vt-_t)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt+jt)*nt,(se+jt)*et,(Vt+_t)*nt,(se+_t)*et,(Vt+jt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(se-jt)*et,Vt*nt,(se-_t)*et,(Vt+jt)*nt,(se-jt)*et,(Vt+_t)*nt));var jt=.05,_t=Tt*.05,se=.375,Vt=.95,At=new go.PathFigure((se-jt)*et,Vt*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt-jt)*nt,(se-jt)*et,(Vt-_t)*nt,(se-_t)*et,(Vt-jt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(se+jt)*et,Vt*nt,(se+_t)*et,(Vt-jt)*nt,(se+jt)*et,(Vt-_t)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt+jt)*nt,(se+jt)*et,(Vt+_t)*nt,(se+_t)*et,(Vt+jt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(se-jt)*et,Vt*nt,(se-_t)*et,(Vt+jt)*nt,(se-jt)*et,(Vt+_t)*nt));var jt=.05,_t=Tt*.05,se=.625,Vt=.95,Bt=new go.PathFigure((se-jt)*et,Vt*nt,!0);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt-jt)*nt,(se-jt)*et,(Vt-_t)*nt,(se-_t)*et,(Vt-jt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(se+jt)*et,Vt*nt,(se+_t)*et,(Vt-jt)*nt,(se+jt)*et,(Vt-_t)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt+jt)*nt,(se+jt)*et,(Vt+_t)*nt,(se+_t)*et,(Vt+jt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(se-jt)*et,Vt*nt,(se-_t)*et,(Vt+jt)*nt,(se-jt)*et,(Vt+_t)*nt));var jt=.05,_t=Tt*.05,se=.825,Vt=.95,he=new go.PathFigure((se-jt)*et,Vt*nt,!0);ht.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt-jt)*nt,(se-jt)*et,(Vt-_t)*nt,(se-_t)*et,(Vt-jt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(se+jt)*et,Vt*nt,(se+_t)*et,(Vt-jt)*nt,(se+jt)*et,(Vt-_t)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Vt+jt)*nt,(se+jt)*et,(Vt+_t)*nt,(se+_t)*et,(Vt+jt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(se-jt)*et,Vt*nt,(se-_t)*et,(Vt+jt)*nt,(se-jt)*et,(Vt+_t)*nt).close());var Zt=new go.PathFigure(0,nt,!1);return ht.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.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 gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(.15*et,nt,!0);ht.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 Pt=.05,At=Tt*.05,Bt=.35,jt=.775,_t=new go.PathFigure((Bt-Pt)*et,jt*nt,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Bt*et,(jt-Pt)*nt,(Bt-Pt)*et,(jt-At)*nt,(Bt-At)*et,(jt-Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+Pt)*et,jt*nt,(Bt+At)*et,(jt-Pt)*nt,(Bt+Pt)*et,(jt-At)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Bt*et,(jt+Pt)*nt,(Bt+Pt)*et,(jt+At)*nt,(Bt+At)*et,(jt+Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-Pt)*et,jt*nt,(Bt-At)*et,(jt+Pt)*nt,(Bt-Pt)*et,(jt+At)*nt).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.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)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.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)),ht}),go.Shape.defineFigureGenerator("Globe",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Wave",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!1);return ht.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)),ht}),go.Shape.defineFigureGenerator("Operator",function(Nt,et,nt){var ht=new go.Geometry,lt=.3,gt=Tt*.3,vt=.5,Pt=.7,At=new go.PathFigure((vt-lt)*et,Pt*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,Pt*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,Pt*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt));var Bt=new go.PathFigure(0,.7*nt,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);return ht.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)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ht.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)),ht}),go.Shape.defineFigureGenerator("Battery",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ht.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 gt=new go.PathFigure(0,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Delete",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=Tt*.5,vt=.5,Pt=.5,At=new go.PathFigure((vt-lt)*et,Pt*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,Pt*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,Pt*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt));var Bt=new go.PathFigure(.15*et,.5*nt,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Flag",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.1*nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Help",function(Nt,et,nt){var ht=new go.Geometry,lt=.5,gt=Tt*.5,vt=.5,Pt=.5,At=new go.PathFigure((vt-lt)*et,Pt*nt,!1);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,Pt*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,Pt*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*nt).close()),lt=.05,gt=Tt*.05,vt=.5,Pt=.8;var Bt=new go.PathFigure((vt-lt)*et,Pt*nt,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt-lt)*nt,(vt-lt)*et,(Pt-gt)*nt,(vt-gt)*et,(Pt-lt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,Pt*nt,(vt+gt)*et,(Pt-lt)*nt,(vt+lt)*et,(Pt-gt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(Pt+lt)*nt,(vt+lt)*et,(Pt+gt)*nt,(vt+gt)*et,(Pt+lt)*nt)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,Pt*nt,(vt-gt)*et,(Pt+lt)*nt,(vt-lt)*et,(Pt+gt)*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)),ht}),go.Shape.defineFigureGenerator("Location",function(Nt,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(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ht.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 gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ht.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 gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ht}),go.Shape.defineFigureGenerator("Gear",function(Nt,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(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Map",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);return ht.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)),ht}),go.Shape.defineFigureGenerator("Eject",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ht.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 gt=new go.PathFigure(0,nt*.6,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(Nt,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(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*1,nt*1,!1);ht.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 gt=new go.PathFigure(.126*et,.85*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var vt=new go.PathFigure(.402*et,.85*nt,!1);ht.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 Pt=new go.PathFigure(.678*et,.85*nt,!1);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var At=new go.PathFigure(.5*et,.1*nt,!1);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),At.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("5Bars",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);ht.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 gt=new go.PathFigure(et*.204,nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var vt=new go.PathFigure(et*.408,nt,!0);ht.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 Pt=new go.PathFigure(et*.612,nt,!0);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var At=new go.PathFigure(et*.816,nt,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),At.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),At.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.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 gt=new go.PathFigure(et*.055,.07*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var vt=new go.PathFigure(et*.055,.13*nt,!0);ht.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 Pt=new go.PathFigure(et*.055,.18*nt,!0);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var At=new go.PathFigure(et*1,0,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),At.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),At.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(.55*et,nt,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Key",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*1,nt*.5,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.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 gt=new go.PathFigure(0,0,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var vt=new go.PathFigure(et*.11,nt*.1,!1);ht.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 Pt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var At=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),At.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),At.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Nt,et,nt){var ht=new go.Geometry,lt=8,gt=lt*Tt,vt=new go.PathFigure(lt,0,!1);ht.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-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,gt,gt,0).close());var Pt=new go.PathFigure(et*.83,0,!1);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var At=new go.PathFigure(et*.83,nt*1,!1);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),At.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),At.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var Bt=new go.PathFigure(et*.78,nt*.05,!1);return ht.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()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var lt=ht*Tt,gt=nt*.8,vt=new go.Geometry,Pt=new go.PathFigure(ht,0,!0);return vt.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-lt,0,et,lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,et,gt-ht)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,gt,et,gt-lt,et-lt,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.7,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),Pt.add(new go.PathSegment(go.PathSegment.Line,et*.55,gt)),Pt.add(new go.PathSegment(go.PathSegment.Line,ht,gt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ht,lt,gt,0,gt-lt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ht,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(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*0,nt*.45,!0);ht.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 gt=new go.PathFigure(et*1,nt*.55,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(Nt,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(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*0,nt*.1,!1);ht.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 gt=new go.PathFigure(et*.1,nt*.2,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var vt=new go.PathFigure(et*.28,nt*.37,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Nt,et,nt){var ht=new go.Geometry,lt=15,gt=lt*Tt,vt=new go.PathFigure(et*.62,nt*.475,!0);return ht.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-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),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()),gt>1?(ht.spot1=new go.Spot(0,0,gt,gt),ht.spot2=new go.Spot(1,1,-gt,-gt)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ht.add(lt);var gt=.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-gt))),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-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),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-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),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-gt)).close());var vt=new go.PathFigure(et*.4,nt*0,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("Bin",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ht.add(lt);var gt=.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-gt))),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-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),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-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),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-gt)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ht.add(lt);var gt=.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-gt))),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-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),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-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),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-gt)).close());var vt=new go.PathFigure(et*.5,nt*0,!0);return ht.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()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);return ht.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()),ht}),go.Shape.defineFigureGenerator("Drink",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);ht.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 gt=new go.PathFigure(et*.235,nt*.28,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(Nt,et,nt){var ht=new go.Geometry,lt=new go.PathFigure(et*.5,nt*0,!0);return ht.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()),ht}),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 gn={},Ln="5.0",bt={},wt=null,te=!1,de=!1,Re=null,ne=!1,ae=null,Tt=null,be=0;be<arguments.length;be++){var ye=arguments[be];if(ye!==null)switch(typeof ye){case"number":Ln=ye.toFixed(1);break;case"string":ye.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ln=ye:Re=ye;break;case"object":typeof ye.is3D!="undefined"?wt=ye:bt=ye;break;case"boolean":te=ye,de=!0;break}}wt===null&&(wt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},bt.material_id!==void 0&&!de&&(te=!0)),Re!==null&&bt.id===void 0&&(bt.id=Re);var Jt="",Be="",pe=!1,je=null,Nt=null,et=null,nt=!1,ht=null,lt=null,gt=null,vt=null,Pt=null;bt.height!==void 0&&(bt.height=Math.round(bt.height)),bt.width!==void 0&&(bt.width=Math.round(bt.width));var At=function(Ne){return parseFloat(Ne)>4?parseFloat(Ne):5};gn.setHTML5Codebase=function(Ne,pn){Tt=Ne,_e(Ne,pn)},gn.setJavaCodebase=gn.setJavaCodebaseVersion=gn.isCompiledInstalled=gn.setPreCompiledScriptPath=gn.setPreCompiledResourcePath=function(){},gn.setHTML5CodebaseVersion=function(Ne,pn){var Tn=parseFloat(Ne);if(Tn!==NaN&&Tn<5){console.log("The GeoGebra HTML5 codebase version "+Tn+" is deprecated. Using version latest instead.");return}ae=Ne,Yt(Ne,pn)},gn.getHTML5CodebaseVersion=function(){return Nt},gn.getParameters=function(){return bt},gn.setFontsCSSURL=function(Ne){vt=Ne},gn.setGiacJSURL=function(Ne){},gn.setJNLPFile=function(Ne){Jt=Ne},gn.setJNLPBaseDir=function(Ne){},gn.inject=function(){function Ne(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pn="auto",Tn=bt.id,Yn,mn=!1,ui=0;ui<arguments.length;ui++){var Ce=arguments[ui];typeof Ce=="string"?(Ce=Ce.toLowerCase(),Ce.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pn=Ce:Tn=arguments[ui]):typeof Ce=="boolean"?mn=Ce:Ce instanceof HTMLElement&&(Yn=Ce)}$n();function $n(){if(!ne){setTimeout($n,200);return}pn=Mn(pn);var Pi=Yn||document.getElementById(Tn);if(!Pi){console.log("possibly bug on ajax loading? ");return}if(gn.removeExistingApplet(Pi,!1),bt.width===void 0&&Pi.clientWidth&&(bt.width=Pi.clientWidth),bt.height===void 0&&Pi.clientHeight&&(bt.height=Pi.clientHeight),!(bt.width&&bt.height)&&pn==="html5"&&(delete bt.width,delete bt.height),je=pn,pn==="screenshot")me(Pi,bt);else{var Ot=!1;bt.hasOwnProperty("playButton")&&bt.playButton||bt.hasOwnProperty("clickToLoad")&&bt.clickToLoad?Ot=!0:bt.hasOwnProperty("playButtonAutoDecide")&&bt.playButtonAutoDecide&&(Ot=(!Bt()||Ne())&&jt()),Ot?(je="screenshot",Xe(Pi,bt,mn,pn)):Oe(Pi,bt,mn)}}};function Bt(){try{return window.self!==window.top}catch(Ne){return!0}}function jt(){return bt.hasOwnProperty("screenshotGenerator")&&bt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}gn.getViews=function(){return wt},gn.isJavaInstalled=function(){return!1};var _t=function(Ne){var pn=function(ui){var Ce=JSON.parse(ui),$n=function(Lt){return Lt.type=="G"||Lt.type=="E"},Pi=Ce.elements?Ce.elements.filter($n)[0]:Ce;if(!Pi||!Pi.url){Tn();return}bt.fileName=Pi.url,se(Pi.settings||{}),wt.is3D=!0;var Ot="https://www.geogebra.org/images/";gn.setPreviewImage(ht||Pi.previewUrl,Ot+"GeoGebra_loading.png",Ot+"applet_play.png"),Ne()},Tn=function(){bt.onError&&bt.onError(),Zn("Error: Fetching material (id "+bt.material_id+") failed.",bt)},Yn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",mn="/materials/"+bt.material_id+"?scope=basic";Vt("https://"+Yn+"/api/proxy.php?path="+encodeURIComponent(mn),pn,Tn)};function se(Ne){var pn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Tn){Ne[Tn]=!!Ne[Tn]}),pn.forEach(function(Tn){bt[Tn]===void 0&&Ne[Tn]!==void 0&&(bt[Tn]=Ne[Tn])}),bt.showToolBarHelp===void 0&&(bt.showToolBarHelp=bt.showToolBar)}function Vt(Ne,pn,Tn){var Yn=new XMLHttpRequest;Yn.open("GET",Ne),Yn.onload=function(){pn(Yn.responseText)},Yn.onerror=Tn,Yn.send()}gn.isHTML5Installed=function(){return!0},gn.getLoadedAppletType=function(){return je},gn.setPreviewImage=function(Ne,pn,Tn){ht=Ne,lt=pn,gt=Tn},gn.removeExistingApplet=function(Ne,pn){var Tn;typeof Ne=="string"&&(Ne=document.getElementById(Ne)),je=null;var Yn=null;for(Tn=0;Tn<Ne.childNodes.length;Tn++){var mn=Ne.childNodes[Tn],ui=mn.className;ui==="applet_screenshot"?pn?(mn.style.display="block",je="screenshot"):mn.style.display="none":ui!=="applet_scaler prerender"&&(Ne.removeChild(mn),Yn=ui&&ui.indexOf("appletParameters")!=-1?mn.id:null,Tn--)}var Ce=bt.id!==void 0?bt.id:Yn,$n=window[Ce];$n&&typeof $n.getBase64=="function"&&($n.remove(),window[Ce]=null)},gn.refreshHitPoints=function(){if(At(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ne=gn.getAppletObject();return Ne&&typeof Ne.recalculateEnvironments=="function"?(Ne.recalculateEnvironments(),!0):!1},gn.startAnimation=function(){var Ne=gn.getAppletObject();return Ne&&typeof Ne.startAnimation=="function"?(Ne.startAnimation(),!0):!1},gn.stopAnimation=function(){var Ne=gn.getAppletObject();return Ne&&typeof Ne.stopAnimation=="function"?(Ne.stopAnimation(),!0):!1},gn.getAppletObject=function(){var Ne=bt.id!==void 0?bt.id:"ggbApplet";return window[Ne]},gn.resize=function(){};var he=function(Ne,pn,Tn){var Yn=document.createElement("param");Yn.setAttribute("name",pn),Yn.setAttribute("value",Tn),Ne.appendChild(Yn)},Zt=function(Ne){return Ne&&Ne!=="false"},Oe=function(Ne,pn,Tn){At(Nt)<=4.2&&(Tn=!0);var Yn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Nt||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Yn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var mn=document.createElement("div");mn.classList.add("appletParameters","notranslate");var ui=pn.width,Ce=pn.height;if(pn.disableAutoScale=pn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pn.disableAutoScale,pn.width!==void 0)if(At(Nt)<=4.4)Zt(pn.showToolBar)&&(pn.height-=7),Zt(pn.showAlgebraInput)&&(pn.height-=37),pn.width<605&&Zt(pn.showToolBar)&&(pn.width=605,ui=605);else{var $n=100;(Zt(pn.showToolBar)||Zt(pn.showMenuBar))&&(pn.hasOwnProperty("customToolBar")&&(pn.customToolbar=pn.customToolBar),$n=Zt(pn.showMenuBar)?245:155),ui<$n&&(pn.width=$n,ui=$n)}mn.style.border="none",mn.style.display="inline-block";for(var Pi in pn)pn.hasOwnProperty(Pi)&&Pi!=="appletOnLoad"&&mn.setAttribute("data-param-"+Pi,pn[Pi]);vt&&mn.setAttribute("data-param-fontscssurl",vt),gn.resize=function(){GGBAppletUtils.responsiveResize(Ne,pn)},window.addEventListener("resize",function(ue){gn.resize()});var Ot=typeof pn.appletOnLoad=="function"?pn.appletOnLoad:function(){};if(!Tn&&pn.width!==void 0){pn.hasOwnProperty("showSplash")||mn.setAttribute("data-param-showSplash","false");var Lt=Ne.querySelector(".applet_scaler.prerender"),St=Lt!==null;if(St)var It=Lt.querySelector(".ggb_preview");else{var It=wn(ui,Ce,pn.borderColor,!1);Lt=document.createElement("div"),Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.style.width=ui+"px",Lt.style.height=Ce+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Lt,"66%"),At(Nt)>=5?(pn.appletOnLoad=function(ue){var Te=Ne.querySelector(".ggb_preview");Te&&Te.parentNode.removeChild(Te),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),Ot(ue)},St||Lt.appendChild(It)):mn.appendChild(It),Lt.appendChild(mn),St||Ne.appendChild(Lt),setTimeout(function(){gn.resize()},1)}else{var Kt=document.createElement("div");Kt.className="applet_scaler",Kt.style.position="relative",Kt.style.display="block",Kt.appendChild(mn),Ne.appendChild(Kt),pn.appletOnLoad=function(ue){gn.resize(),Ot(ue)}}function xt(ue,Te){Te&&typeof Te.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ue,Te.appletOnLoad):renderGGBElement(ue),Zn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Te)}function Me(ue,Te){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ue,params:Te}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(vn){xt(vn.article,vn.params)}),html5AppletsToProcess=null)},At(Nt)<5&&(ue.className+=" geogebraweb")):xt(ue,Te)}if(Yn){scriptLoadStarted=!0;for(var De=0;De<mn.childNodes.length;De++){var le=mn.childNodes[De].tagName;le==="TABLE"&&(mn.removeChild(mn.childNodes[De]),De--)}if(ggbHTML5LoadedScript!==null){var ee=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ee!=null&&ee.parentNode.removeChild(ee)}var Se=document.createElement("script"),xe=function(){Me(mn,pn)};Se.src=Be+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Nt,ggbHTML5LoadedScript=Se.src,Zn("GeoGebra HTML5 codebase loaded: '"+Be+"'.",pn),!Tt&&(!ae||ae=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),xe()):Be.requirejs?__webpack_require__.e(4184).then(function(){var ue=[__webpack_require__(74620)];xe.apply(null,ue)}.bind(this)).catch(__webpack_require__.oe):(Se.onload=xe,Ne.appendChild(Se))}else Me(mn,pn);pn.height=Ce,pn.width=ui},me=function(Ne,pn,Tn){var Yn=wn(pn.width,pn.height,pn.borderColor,Tn),mn=document.createElement("div");mn.style.position="relative",mn.style.display="block",mn.style.width=pn.width+"px",mn.style.height=pn.height+"px",mn.className="applet_screenshot applet_scaler"+(Tn?" applet_screenshot_play":""),mn.appendChild(Yn);var ui=GGBAppletUtils.getScale(pn,Ne,Tn);Tn?(Ne.appendChild(Je()),window.GGBT_wsf_view||(Ne.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(mn,"66%"),Ne.appendChild(mn),ui!==1&&!isNaN(ui)&&(GGBAppletUtils.scaleElement(mn,ui),mn.style.width=pn.width+"px",mn.style.height=pn.height+"px",mn.parentNode.style.width=pn.width*ui+"px",mn.parentNode.style.height=pn.height*ui+"px"),gn.resize=function(){Ve(Ne,Yn,mn,Tn)},window.addEventListener("resize",function(Ce){gn.resize()}),gn.resize()};function Ve(Ne,pn,Tn,Yn){if(Ne.contains(pn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ne.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ne)}var mn=GGBAppletUtils.getScale(bt,Ne,Yn);Tn.parentNode!==null&&(!isNaN(mn)&&mn!==1?(GGBAppletUtils.scaleElement(Tn,mn),Tn.parentNode.style.width=bt.width*mn+"px",Tn.parentNode.style.height=bt.height*mn+"px"):(GGBAppletUtils.scaleElement(Tn,1),Tn.parentNode.style.width=bt.width+"px",Tn.parentNode.style.height=bt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ne),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}gn.onExitFullscreen=function(Ne,pn){pn.appendChild(Ne)};var Xe=function(Ne,pn,Tn,Yn){me(Ne,pn,!0);for(var mn=function(){var $n=[];for(Ce=0;Ce<Ne.childNodes.length;Ce++)$n.push(Ne.childNodes[Ce]);if(window.GGBT_wsf_view){var Pi=window.GGBT_wsf_view.renderFullScreen(Ne,pn.id),Ot=document.getElementById("fullscreencontainer"),Lt=jQuery(Ne).find(".fullscreencontent");Lt.length>0?(Pi.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(Ot).append(Lt),window.dispatchEvent(new Event("resize"))):Oe(Pi,pn,!1),window.GGBT_wsf_view.launchFullScreen(Ot)}else je=Yn,Oe(Ne,pn,!1);if(!window.GGBT_wsf_view)for(Ce=0;Ce<$n.length;Ce++)Ne.removeChild($n[Ce])},ui=Ne.getElementsByClassName("ggb_preview_play"),Ce=0;Ce<ui.length;Ce++)ui[Ce].addEventListener("click",mn,!1),ui[Ce].addEventListener("ontouchstart",mn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ne),jt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Je=function(){var Ne=document.createElement("div");if(Ne.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var pn='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Tn=document.createElement("style");Tn.styleSheet?Tn.styleSheet.cssText=pn:Tn.appendChild(document.createTextNode(pn)),document.getElementsByTagName("head")[0].appendChild(Tn)}return Ne},wn=function(Ne,pn,Tn,Yn){var mn=document.createElement("div");mn.className="ggb_preview",mn.style.position="absolute",mn.style.zIndex="90",mn.style.width=Ne-2+"px",mn.style.height=pn-2+"px",mn.style.top="0px",mn.style.left="0px",mn.style.overflow="hidden",mn.style.backgroundColor="white";var ui="lightgrey";Tn!==void 0&&(Tn==="none"?ui="transparent":ui=Tn),mn.style.border="1px solid "+ui;var Ce=document.createElement("img");if(Ce.style.position="relative",Ce.style.zIndex="1000",Ce.style.top="-1px",Ce.style.left="-1px",ht!==null&&Ce.setAttribute("src",ht),Ce.style.opacity=.7,lt!==null){var $n,Pi,Ot;if(!Yn){$n=document.createElement("img"),$n.style.position="absolute",$n.style.zIndex="1001",$n.style.opacity=1,Ce.style.opacity=.3,Pi=360,Pi>Ne/4*3&&(Pi=Ne/4*3),Ot=Pi/5.8,$n.setAttribute("src",lt),$n.setAttribute("width",Pi),$n.setAttribute("height",Ot);var Lt=(Ne-Pi)/2,St=(pn-Ot)/2;$n.style.left=Lt+"px",$n.style.top=St+"px",mn.appendChild($n)}}return mn.appendChild(Ce),mn},Mn=function(Ne){return Ne=Ne.toLowerCase(),Ne==="html5"||Ne==="screenshot"?Ne:"html5"},we=["web","webSimple","web3d","tablet","tablet3d","phone"],Yt=function(Ne,pn){if(Nt=Ne,pn){_e(Nt,!0);return}var Tn=!te;if(Tn){var Yn=At(Nt);!isNaN(Yn)&&Yn<4.4&&(Tn=!1)}var mn,ui;window.location.protocol.substr(0,4)==="http"?mn=window.location.protocol:mn="http:";var Ce=Nt.indexOf("//");Ce>0?ui=Nt:Ce===0?ui=mn+Nt:ui="https://www.geogebra.org/apps/5.2.814.0/";for(var $n in we)if(Nt.slice(we[$n].length*-1)===we[$n]||Nt.slice((we[$n].length+1)*-1)===we[$n]+"/"){_e(ui,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Tn&&!wt.is3D&&!wt.AV&&!wt.SV&&!wt.CV&&!wt.EV2&&!wt.CP&&!wt.PC&&!wt.DA&&!wt.FI&&!wt.PV&&!Zt(bt.showToolBar)&&!Zt(bt.showMenuBar)&&!Zt(bt.showAlgebraInput)&&!Zt(bt.enableRightClick)&&(!bt.appName||bt.appName=="classic")?ui+="webSimple/":ui+="web3d/",_e(ui,!1)},_e=function(Ne,pn){if(Ne.requirejs){Be=Ne;return}Ne.slice(-1)!=="/"&&(Ne+="/"),Be=Ne,pn===null&&(pn=Ne.indexOf("http")===-1),pe=pn,et="web.nocache.js",nt=!1;var Tn=Be.split("/");Tn.length>1&&(!pn&&Tn[Tn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):we.indexOf(Tn[Tn.length-2])>=0&&(et=Tn[Tn.length-2]+".nocache.js")),Tn=Ne.split("/"),Nt=Tn[Tn.length-3],Nt.substr(0,4)==="test"?Nt=Nt.substr(4,1)+"."+Nt.substr(5,1):(Nt.substr(0,3)==="war"||Nt.substr(0,4)==="beta")&&(Nt="5.0");var Yn=parseFloat(Nt);Yn!==NaN&&Yn<5&&Ne.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Yn+" is deprecated. Using version latest instead."),Yt("5.0",pn))},Zn=function(Ne,pn){window.console&&window.console.log&&(!pn||typeof pn.showLogging=="undefined"||pn.showLogging&&pn.showLogging!=="false")&&console.log(Ne)};bt.material_id!==void 0?_t(Dn):Dn();function Dn(){var Ne=Ln;ae!==null?Ne=ae:parseFloat(Ne)<5&&(Ne="5.0"),Yt(Ne,!1),Tt!==null&&_e(Tt,pe),ne=!0}return gn},GGBAppletUtils=function(){"use strict";function gn(){return window.GGBT_wsf_edit!==void 0}function Ln(ne,ae){ae!=1?(ne.style.transformOrigin="0% 0% 0px",ne.style.webkitTransformOrigin="0% 0% 0px",ne.style.transform="scale("+ae+","+ae+")",ne.style.webkitTransform="scale("+ae+","+ae+")",ne.style.maxWidth="initial",ne.querySelector(".ggb_preview")!==null&&(ne.querySelector(".ggb_preview").style.maxWidth="initial"),ne.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ne.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ne.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ne.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ne.style.transform="none",ne.style.webkitTransform="none")}function bt(ne,ae,Tt,be,ye,Jt){var Be=null;if(Jt!=null&&Jt!="")for(var pe=ne.parentNode;pe!=null;)if((" "+pe.className+" ").indexOf(" "+Jt+" ")>-1){Be=pe;break}else pe=pe.parentNode;var je=0,Nt=0,et=0,nt=0,ht=0,lt=0,gt=0;if(Be)je=Be.offsetWidth,Nt=Math.max(be?Be.offsetWidth:0,Be.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(je=Math.min(window.innerWidth,document.documentElement.clientWidth),Nt=Math.min(window.innerHeight,document.documentElement.clientHeight),et=je):(je=window.innerWidth,Nt=window.innerHeight,et=window.innerWidth),ne){var vt=ne.getBoundingClientRect();vt.left>0&&vt.left<=je&&(ye===void 0||!ye)&&(document.dir==="rtl"?(ht=je-vt.width-vt.left,lt=et<=480?10:30):(lt=vt.left,ht=et<=480?10:30),nt=lt+ht)}if(ne&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Pt=ne.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return ne&&((Tt===void 0||!Tt)&&ae>0&&ae+nt<je?je=ae:je-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Tt===void 0||!Tt)&&(Nt-=gt)),{width:je,height:Nt}}function wt(ne,ae,Tt,be,ye){if(ne.isScreenshoGenerator)return 1;var Jt=be!==void 0&&be,Be=ne.noScaleMargin!=null&&ne.noScaleMargin,pe=function(Pt){return Pt&&Pt!=="false"},je=pe(ne.autoHeight),Nt=bt(ae,ne.width,Tt,je,Jt&&window.GGBT_wsf_view||Be,ye),et=parseInt(Nt.width),nt=ne.width,ht=ne.height;if(nt===void 0){var lt=ae.querySelector(".appletParameters");lt&&(nt=lt.offsetWidth,ht=lt.offsetHeight)}var gt=et/nt,vt=Jt?1:Nt.height/ht;return Tt!==void 0&&!Tt&&(gt=Math.min(1,gt),vt=Math.min(1,vt)),Math.min(gt,vt)}function te(ne,ae,Tt){var be=1,ye,Jt=!1;if(ne.hasOwnProperty("allowUpscale")&&(Jt=ne.allowUpscale),ne.hasOwnProperty("scale")&&(be=parseFloat(ne.scale),(isNaN(be)||be===null||be===0)&&(be=1),be>1&&(Jt=!0)),ae&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Jt=!0),!(ne.hasOwnProperty("disableAutoScale")&&ne.disableAutoScale))ye=wt(ne,ae,Jt,Tt,ne.scaleContainerClass);else return be;return Jt&&(!ne.hasOwnProperty("scale")||be===1)?ye:Math.min(be,ye)}function de(ne){var ae=Math.min(window.innerWidth,document.documentElement.clientWidth),Tt=Math.min(window.innerHeight,document.documentElement.clientHeight),be=ne.getBoundingClientRect(),ye=(ae-be.width)/2,Jt=(Tt-be.height)/2;Jt<0&&(Jt=0),ne.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ye<40?ne.style.left="40px":ne.style.left=ye+"px",ne.style.top=Jt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Jt<40?ne.style.top="40px":ne.style.top=Jt+"px",ne.style.left=ye+"px")}function Re(ne,ae){var Tt=ne.querySelector(".appletParameters");if(Tt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ae.id!==Tt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ne)}if(Tt.parentElement&&/fullscreen/.test(Tt.parentElement.className))return;var be=te(ae,ne);gn()&&Tt.setAttribute("data-param-scale",be);for(var ye=null,Jt=0;Jt<ne.childNodes.length;Jt++)if(ne.childNodes[Jt].className!==void 0&&ne.childNodes[Jt].className.match(/^applet_scaler/)){ye=ne.childNodes[Jt];break}if(ye!==null&&ye.querySelector(".noscale")!==null)return;var Be=ae.id!==void 0?ae.id:"ggbApplet",pe=window[Be];(pe==null||!pe.recalculateEnvironments)&&ye!==null&&!ye.className.match(/fullscreen/)&&(ye.parentNode.style.transform="",!isNaN(be)&&be!==1?(ye.parentNode.style.width=ae.width*be+"px",ye.parentNode.style.height=ae.height*be+"px",Ln(ye,be)):(Ln(ye,1),ye.parentNode.style.width=ae.width+"px",ye.parentNode.style.height=ae.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&de(ne),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Tt).parents(".content-added-content"))}}return{responsiveResize:Re,isFlexibleWorksheetEditor:gn,positionCenter:de,getScale:te,scaleElement:Ln}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var gn=n.location.search;return gn.indexOf(J)!=-1||gn.indexOf(K)!=-1}function q(gn,Ln){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(gn){var Ln=s[L].bindings;s[L].bindings=function(){for(var bt=Ln?Ln():{},wt=gn[webModule.__softPermutationId],te=O;te<wt.length;te++){var de=wt[te];bt[de[O]]=de[P]}return bt}};var t;function u(){return v(),t}function v(){if(!t){var gn=o.createElement(Q);if(gn.id=L,gn.style.cssText=R+S,gn.tabIndex=-1,o.body.appendChild(gn),t=gn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ln=document.compatMode==U?V:W;t.write(Ln+X),t.close()}}}function w(gn){function Ln(wt){function te(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var de=te();if(de){wt();return}function Re(){if(!de){if(!te())return;de=!0,wt(),o.removeEventListener&&o.removeEventListener(Z,Re,!1),ne&&clearInterval(ne)}}o.addEventListener&&o.addEventListener(Z,Re,!1);var ne=setInterval(function(){Re()},$)}function bt(wt){var te=u(),de=te.body,Re=te.createElement(_);Re.language=ab,Re.crossOrigin=W,Re.src=wt,webModule.__errFn&&(Re.onerror=function(){webModule.__errFn(L,new Error(bb+wt))}),de.appendChild(Re)}Ln(function(){bt(gn)})}webModule.__startLoadingFragment=function(gn){return C(gn)},webModule.__installRunAsyncCode=function(gn){var Ln=u(),bt=Ln.body,wt=Ln.createElement(_);wt.language=ab,wt.text=gn,bt.appendChild(wt),bt.removeChild(wt)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(gn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(gn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(gn){var Ln=c[gn];return Ln==null?null:Ln},r=d,webModule.__errFn=e}function B(){function gn(ne){var ae=ne.lastIndexOf(rb);ae==-1&&(ae=ne.length);var Tt=ne.indexOf(sb);Tt==-1&&(Tt=ne.length);var be=ne.lastIndexOf(tb,Math.min(Tt,ae));return be>=O?ne.substring(O,be+P):W}function Ln(ne){if(!ne.match(/^\w+:\/\//)){var ae=o.createElement(ub);ae.src=ne+vb,ne=gn(ae.src)}return ne}function bt(){var ne=__gwt_getMetaProperty(wb);return ne!=null?ne:W}function wt(){for(var ne=o.getElementsByTagName(_),ae=O;ae<ne.length;++ae)if(ne[ae].src.indexOf(xb)!=-1)return gn(ne[ae].src);return W}function te(){var ne=o.getElementsByTagName(yb);return ne.length>O?ne[ne.length-P].href:W}function de(){var ne=o.location;return ne.href==ne.protocol+zb+ne.host+ne.pathname+ne.search+ne.hash}var Re=bt();return Re==W&&(Re=wt()),Re==W&&(Re=te()),Re==W&&de()&&(Re=gn(o.location.href)),Re=Ln(Re),Re}function C(gn){return gn.match(/^\//)||gn.match(/^[a-zA-Z]+:\/\//)?gn:webModule.__moduleBase+gn}function D(){var gn=[],Ln=O,bt=[],wt=[];function te(ne){var ae=wt[ne](),Tt=bt[ne];if(ae in Tt)return ae;var be=[];for(var ye in Tt)be[Tt[ye]]=ye;throw r&&r(ne,be,ae),null}if(__gwt_isKnownPropertyValue=function(ne,ae){return ae in bt[ne]},webModule.__getPropMap=function(){var ne={};for(var ae in bt)bt.hasOwnProperty(ae)&&(ne[ae]=te(ae));return ne},webModule.__computePropValue=te,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var de;try{de=Cb;var Re=de.indexOf(Db);Re!=-1&&(Ln=parseInt(de.substring(Re+P),$),de=de.substring(O,Re))}catch(ne){}return webModule.__softPermutationId=Ln,C(de+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(gn,Ln,bt){"use strict";bt.d(Ln,{Ax:function(){return Re},Ds:function(){return ne},KI:function(){return Tt},SI:function(){return de},f1:function(){return te}});var wt=bt(3294);function te(be){let ye=!0;if(be.length>0){for(let Jt=0;Jt<be.length;Jt++)if(be[Jt].compile_success==0||!be[Jt].compile_success){ye=!1;break}}else ye=!1;return ye}function de(be,ye=""){let Jt=[];for(let Be=0;Be<be.length;Be++){let pe=be[Be],je=ye?`${ye}/${pe.name}`:`${pe.name}`;Jt.push({title:pe.name,type:pe.type,isLeaf:pe.type!=="tree",key:je})}return Jt}function Re(be,ye,Jt){for(let Be=0;Be<be.length;Be++){let pe=be[Be];if(pe.key===ye){pe.children=Jt;break}pe.children&&Re(pe.children,ye,Jt)}return be}function ne(be,ye,Jt){let Be;return function(){let pe=this,je=arguments,Nt=function(){Be=null,Jt||be.apply(pe,je)},et=Jt&&!Be;clearTimeout(Be),Be=setTimeout(Nt,ye),et&&be.apply(pe,je)}}const ae=!0,Tt=wt.Z.API_SERVER},6021:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return Nt}});var wt=bt(3113),te=bt(59301),de=Object.defineProperty,Re=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,ye=(et,nt,ht)=>nt in et?de(et,nt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):et[nt]=ht,Jt=(et,nt)=>{for(var ht in nt||(nt={}))Tt.call(nt,ht)&&ye(et,ht,nt[ht]);if(ae)for(var ht of ae(nt))be.call(nt,ht)&&ye(et,ht,nt[ht]);return et},Be=(et,nt)=>Re(et,ne(nt)),pe=(et,nt)=>{var ht={};for(var lt in et)Tt.call(et,lt)&&nt.indexOf(lt)<0&&(ht[lt]=et[lt]);if(et!=null&&ae)for(var lt of ae(et))nt.indexOf(lt)<0&&be.call(et,lt)&&(ht[lt]=et[lt]);return ht},je=(et,nt,ht)=>new Promise((lt,gt)=>{var vt=Bt=>{try{At(ht.next(Bt))}catch(jt){gt(jt)}},Pt=Bt=>{try{At(ht.throw(Bt))}catch(jt){gt(jt)}},At=Bt=>Bt.done?lt(Bt.value):Promise.resolve(Bt.value).then(vt,Pt);At((ht=ht.apply(et,nt)).next())});const Nt=et=>{var nt=et,{children:ht}=nt,lt=pe(nt,["children"]);const[gt,vt]=(0,te.useState)(!1);return te.createElement(wt.ZP,Be(Jt({},lt),{loading:gt,onClick:Pt=>je(void 0,null,function*(){try{vt(!0),yield lt.onClick(Pt),vt(!1)}catch(At){console.error(At),vt(!1)}})}),ht)}},24544:function(gn,Ln,bt){"use strict";var wt=bt(86204),te=bt.n(wt),de=Object.defineProperty,Re=(be,ye,Jt)=>ye in be?de(be,ye,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):be[ye]=Jt,ne=(be,ye,Jt)=>Re(be,typeof ye!="symbol"?ye+"":ye,Jt),ae=(be,ye,Jt)=>new Promise((Be,pe)=>{var je=nt=>{try{et(Jt.next(nt))}catch(ht){pe(ht)}},Nt=nt=>{try{et(Jt.throw(nt))}catch(ht){pe(ht)}},et=nt=>nt.done?Be(nt.value):Promise.resolve(nt.value).then(je,Nt);et((Jt=Jt.apply(be,ye)).next())});class Tt extends wt.EventEmitter{constructor(ye,Jt){super(),ne(this,"url"),ne(this,"body"),ne(this,"fullContent",""),ne(this,"controller",null),ne(this,"buffer",""),this.url=ye,this.body=Jt}startStream(){return ae(this,null,function*(){this.controller=new AbortController;const{signal:ye}=this.controller;try{const Jt=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:ye});if(!Jt.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${Jt.status}`);const Be=Jt.headers.get("content-type");if(!Be)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(Be.includes("application/json")){const Nt=yield Jt.json();this.emit("error",Nt);return}if(!Be.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const pe=Jt.body.getReader(),je=new TextDecoder("utf-8");for(;;){const{done:Nt,value:et}=yield pe.read();if(Nt)break;const nt=je.decode(et,{stream:!0});this.buffer+=nt;const ht=this.buffer.split(`
|
|
|
`);this.buffer=ht.pop()||"";for(const lt of ht)if(lt.startsWith("data:")){const gt=lt.slice(5).trim();if(gt==="[DONE]")break;try{const vt=JSON.parse(gt);vt.data&&this.handleData(vt.data)}catch(vt){this.buffer=lt+`
|
|
|
`+this.buffer,console.error("\u89E3\u6790 JSON \u5931\u8D25:",vt)}}}this.emit("done",this.fullContent)}catch(Jt){Jt.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",Jt.message)}})}handleData(ye){ye.content&&(this.fullContent+=ye.content,this.emit("data",{chunk:ye,full:this.fullContent}))}cancelRequest(){var ye;(ye=this.controller)==null||ye.abort()}}Ln.Z=Tt},83251:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return je}});var wt=bt(59301),te=bt(43428),de=bt(95237),Re=bt(43604),ne={smartWrp:"smartWrp___NjRcB"},ae=bt(23954),Tt=bt(85057),be=bt(6021),ye=bt(59301),Jt=(Nt,et,nt)=>new Promise((ht,lt)=>{var gt=At=>{try{Pt(nt.next(At))}catch(Bt){lt(Bt)}},vt=At=>{try{Pt(nt.throw(At))}catch(Bt){lt(Bt)}},Pt=At=>At.done?ht(At.value):Promise.resolve(At.value).then(gt,vt);Pt((nt=nt.apply(Nt,et)).next())});const Be=`<!DOCTYPE html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<title>\u5FEB\u901F\u6392\u5E8F\u6F14\u793A</title>
|
|
|
<style>
|
|
|
body {
|
|
|
font-family: Arial, sans-serif;
|
|
|
text-align: center;
|
|
|
margin: 20px;
|
|
|
}
|
|
|
.array-container {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: flex-end;
|
|
|
height: 300px;
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
.bar {
|
|
|
width: 30px;
|
|
|
margin: 0 2px;
|
|
|
background-color: #4caf50;
|
|
|
color: white;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
border-radius: 5px;
|
|
|
transition: all 0.3s ease;
|
|
|
}
|
|
|
.bar.sorted {
|
|
|
background-color: #ff9800;
|
|
|
}
|
|
|
.bar.pivot {
|
|
|
background-color: #f44336;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<h1>\u5FEB\u901F\u6392\u5E8F\u7B97\u6CD5\u6F14\u793A</h1>
|
|
|
<button id="start-sort">\u5F00\u59CB\u6392\u5E8F</button>
|
|
|
<div class="array-container" id="array-container"></div>
|
|
|
|
|
|
<script>
|
|
|
const array = [34, 7, 23, 32, 5, 62]; // \u56FA\u5B9A\u6570\u7EC4
|
|
|
let bars = [];
|
|
|
|
|
|
// \u521D\u59CB\u5316\u6570\u7EC4\u663E\u793A
|
|
|
function initArrayDisplay() {
|
|
|
const container = document.getElementById('array-container');
|
|
|
container.innerHTML = '';
|
|
|
bars = array.map(value => {
|
|
|
const bar = document.createElement('div');
|
|
|
bar.className = 'bar';
|
|
|
bar.style.height = \`\${value * 5}px\`;
|
|
|
bar.textContent = value;
|
|
|
container.appendChild(bar);
|
|
|
return bar;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// \u9AD8\u4EAE\u67D0\u4E2A\u8303\u56F4\u5185\u7684\u67F1\u5B50
|
|
|
function highlightBars(indices, className) {
|
|
|
indices.forEach(index => bars[index].classList.add(className));
|
|
|
}
|
|
|
|
|
|
// \u79FB\u9664\u9AD8\u4EAE
|
|
|
function removeHighlightBars(indices, className) {
|
|
|
indices.forEach(index => bars[index].classList.remove(className));
|
|
|
}
|
|
|
|
|
|
// \u5FEB\u901F\u6392\u5E8F\u4E3B\u51FD\u6570
|
|
|
async function quickSort(arr, left = 0, right = arr.length - 1) {
|
|
|
if (left >= right) return;
|
|
|
|
|
|
const pivotIndex = await partition(arr, left, right);
|
|
|
await quickSort(arr, left, pivotIndex - 1);
|
|
|
await quickSort(arr, pivotIndex + 1, right);
|
|
|
}
|
|
|
|
|
|
// \u5206\u533A\u51FD\u6570
|
|
|
async function partition(arr, left, right) {
|
|
|
const pivot = arr[right];
|
|
|
let i = left - 1;
|
|
|
|
|
|
highlightBars([right], 'pivot'); // \u9AD8\u4EAE\u57FA\u51C6\u503C
|
|
|
|
|
|
for (let j = left; j < right; j++) {
|
|
|
highlightBars([j], 'sorted'); // \u9AD8\u4EAE\u5F53\u524D\u6BD4\u8F83\u5143\u7D20
|
|
|
await sleep(500);
|
|
|
|
|
|
if (arr[j] <= pivot) {
|
|
|
i++;
|
|
|
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
|
|
|
|
// \u66F4\u65B0\u67F1\u5B50\u9AD8\u5EA6
|
|
|
bars[i].style.height = \`\${arr[i] * 5}px\`;
|
|
|
bars[i].textContent = arr[i];
|
|
|
bars[j].style.height = \`\${arr[j] * 5}px\`;
|
|
|
bars[j].textContent = arr[j];
|
|
|
|
|
|
await sleep(500);
|
|
|
}
|
|
|
|
|
|
removeHighlightBars([j], 'sorted'); // \u79FB\u9664\u9AD8\u4EAE
|
|
|
}
|
|
|
|
|
|
// \u5C06\u57FA\u51C6\u503C\u653E\u5230\u6B63\u786E\u4F4D\u7F6E
|
|
|
[arr[i + 1], arr[right]] = [arr[right], arr[i + 1]];
|
|
|
bars[i + 1].style.height = \`\${arr[i + 1] * 5}px\`;
|
|
|
bars[i + 1].textContent = arr[i + 1];
|
|
|
bars[right].style.height = \`\${arr[right] * 5}px\`;
|
|
|
bars[right].textContent = arr[right];
|
|
|
|
|
|
removeHighlightBars([right], 'pivot'); // \u79FB\u9664\u57FA\u51C6\u503C\u9AD8\u4EAE
|
|
|
highlightBars([i + 1], 'sorted'); // \u9AD8\u4EAE\u6700\u7EC8\u4F4D\u7F6E
|
|
|
await sleep(500);
|
|
|
removeHighlightBars([i + 1], 'sorted');
|
|
|
|
|
|
return i + 1;
|
|
|
}
|
|
|
|
|
|
// \u5EF6\u8FDF\u51FD\u6570
|
|
|
function sleep(ms) {
|
|
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
|
}
|
|
|
|
|
|
// \u5F00\u59CB\u6392\u5E8F\u6309\u94AE\u70B9\u51FB\u4E8B\u4EF6
|
|
|
document.getElementById('start-sort').addEventListener('click', () => {
|
|
|
quickSort(array);
|
|
|
});
|
|
|
|
|
|
// \u521D\u59CB\u5316\u9875\u9762
|
|
|
initArrayDisplay();
|
|
|
<\/script>
|
|
|
</body>
|
|
|
</html>`;function pe({open:Nt=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:gt,extra:vt,onDynamic:Pt,showExtra:At=!0}){const Bt=(0,wt.useRef)(null),jt=(0,wt.useRef)(null),[_t,se]=(0,wt.useState)(nt||""),[Vt,he]=(0,wt.useState)(nt||""),[Zt,Oe]=(0,wt.useState)(!!Nt),[me,Ve]=(0,wt.useState)(1),Xe={selectOnLineNumbers:!0};(0,wt.useEffect)(()=>{Nt&&(se(nt),he(nt),Oe(!0))},[Nt,nt]),(0,wt.useEffect)(()=>{_t!==""&&(clearTimeout(jt.current),jt.current=setTimeout(()=>{const wn=document.createElement("iframe");if(wn.style.width="100%",wn.style.height="100%",wn.style.border="0",Bt.current){Bt.current.innerHTML="",Bt.current.appendChild(wn);const Mn=wn.contentDocument||wn.contentWindow.document;Mn.open(),Mn.write(_t),Mn.close()}},1e3))},[Nt,_t]);const Je=wn=>{se(wn),et==null||et(wn,Vt)};return ye.createElement(te.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Zt,width:At?700:"100%",height:gt||"100vh",rootClassName:ne.smartWrp,destroyOnClose:!0,onClose:()=>Oe(!1),extra:At&&ye.createElement("div",null,ye.createElement(Tt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:me,onChange:wn=>Ve(wn)}),ye.createElement(be.Z,{type:"primary",className:"ml20",onClick:()=>Jt(this,null,function*(){yield Pt(_t,()=>{Oe(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ye.createElement(de.Z,{className:"h100"},ye.createElement(Re.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:me===1?"block":"none"}},ye.createElement("div",{className:"h100",ref:Bt})),ye.createElement(Re.Z,{flex:"1",style:{display:me===2?"block":"none"}},ye.createElement(ae.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:Xe,onChange:Je}))))}var je=pe},43276:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return se}});var wt=bt(59301),te=bt(96536),de=bt(77596),Re=bt(93772),ne=bt(14179),ae=bt(56102),Tt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},be=bt(8591),ye=bt(11611),Jt=bt(35328),Be=bt(30084),pe=bt(10787),je=bt(50304),Nt=bt(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Pt=(Vt,he,Zt)=>he in Vt?et(Vt,he,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Vt[he]=Zt,At=(Vt,he)=>{for(var Zt in he||(he={}))gt.call(he,Zt)&&Pt(Vt,Zt,he[Zt]);if(lt)for(var Zt of lt(he))vt.call(he,Zt)&&Pt(Vt,Zt,he[Zt]);return Vt},Bt=(Vt,he)=>nt(Vt,ht(he)),jt=(Vt,he)=>{var Zt={};for(var Oe in Vt)gt.call(Vt,Oe)&&he.indexOf(Oe)<0&&(Zt[Oe]=Vt[Oe]);if(Vt!=null&<)for(var Oe of lt(Vt))he.indexOf(Oe)<0&&vt.call(Vt,Oe)&&(Zt[Oe]=Vt[Oe]);return Zt},se=({onFinish:Vt,value:he,streamingStatus:Zt,cancelIndex:Oe,loadImage:me,onDynamic:Ve})=>{const[Xe,Je]=(0,wt.useState)(""),[wn,Mn]=(0,wt.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[we,Yt]=(0,wt.useState)(0),[_e,Zn]=(0,wt.useState)(!1),Dn=Tn=>Tn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Yn,mn)=>`<mathx data-text="${mn.trim()}">$$${mn.trim()}$$</mathx>`).replace(/\\\(([\s\S]*?)\\\)/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/\\\[([\s\S]*?)\\\]/g,'<mathx data-text="$1">$$$$$1$$$$</mathx>').replace(/_{2,}/g,"`$&`"),Ne=()=>{Zn(!0),Vt==null||Vt()};(0,wt.useEffect)(()=>{const Tn=me?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
|
|
|
|
|
|
${he}`:he,Yn=Dn(Tn);if(!_e)if(me||!Zt||Oe>0){Je(Yn),Yt(Yn.length),(!Zt||Oe>0)&&!me&&Ne();return}else if((Yn==null?void 0:Yn.length)<4)Je(Yn),Yt(Yn.length);else if(we<Yn.length){const mn=Yn.length-we,ui=setInterval(()=>{Je(Yn.slice(0,we+2)),Yt(Ce=>Ce+2)},mn>10?Math.max(500/(mn/2),20):50);return()=>clearInterval(ui)}else Zt||Ne()},[he,Zt,Oe,me,we]);const pn=(0,wt.useMemo)(()=>wt.createElement("section",{className:`${Tt.answer} fadeIn animated edu_md`},wt.createElement(te.UG,{remarkPlugins:[Be.Z,pe.Z],rehypePlugins:[Jt.Z,Re.Z],components:{code(Tn){var Yn=Tn,{node:mn,inline:ui,className:Ce,children:$n}=Yn,Pi=jt(Yn,["node","inline","className","children"]);const Ot=/language-(\w+)/.exec(Ce||""),Lt=String($n).trim();return ui||!Ot?wt.createElement("code",At({className:Ce},Pi),$n):wt.createElement("code",{className:Tt.codeCopy,"data-text":`\`\`\`${Ot?Ot[1]:""}
|
|
|
${$n}
|
|
|
\`\`\``},wt.createElement(ae.CopyToClipboard,{text:Lt,onCopy:()=>be.ZP.success({content:"\u590D\u5236\u6210\u529F",key:"copy"})},wt.createElement("button",null,"\u590D\u5236")),Ot[1]==="html"&&_e&&wt.createElement("button",{className:Tt.runCode,onClick:()=>{Mn(At({},Bt(At({},wn),{open:++wn.open,defaultValue:Lt,language:Ot[1]})))}},"\u8FD0\u884CHTML"),wt.createElement(de.Z,At({wrapLongLines:!0,style:ne.Z,language:Ot[1],PreTag:"div",showLineNumbers:!0,lineNumberStyle:{minWidth:"40px"}},Pi),Lt))},img({node:Tn}){var Yn;const mn=(Yn=Tn.properties)==null?void 0:Yn.src;return wt.createElement(ye.Z,{src:mn,width:320,"data-text":mn,onLoad:()=>me&&setTimeout(()=>Ne(),500)})}}},_e?Xe:`${Xe}__`)),[Xe]);return wt.createElement(wt.Fragment,null,wt.createElement(Nt.Z,{defaultValue:wn.defaultValue,open:wn.open,language:wn.language,height:wn.height,onChange:(Tn,Yn)=>{Je(Xe.replaceAll(Yn,Tn))},onDynamic:Ve}),pn)}},19909:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return en}});var wt=bt(59301),te=bt(43428),de=bt(8591),Re=bt(54580),ne=bt(43418),ae=bt(6848),Tt=bt(92832),be=bt(3113),ye=bt(71418),Jt=bt(64165),Be=bt(14478),pe=bt(38854),je=bt(92310),Nt=bt.n(je),et=bt(43276),nt={reasoning:"reasoning___S0mKl",btn:"btn____CIJG",content:"content___CIAh9"},ht=bt(59301),lt=(xn,ln,tn)=>new Promise((ii,ri)=>{var Un=Hi=>{try{mi(tn.next(Hi))}catch(Xi){ri(Xi)}},si=Hi=>{try{mi(tn.throw(Hi))}catch(Xi){ri(Xi)}},mi=Hi=>Hi.done?ii(Hi.value):Promise.resolve(Hi.value).then(Un,si);mi((tn=tn.apply(xn,ln)).next())}),vt=({value:xn="",streamingStatus:ln,onFinish:tn,cancelIndex:ii,time:ri,loading:Un,loadAll:si})=>{const[mi,Hi]=(0,wt.useState)(""),[Xi,Lo]=(0,wt.useState)(!0),Oo=(0,wt.useRef)(xn),No=(0,wt.useRef)(ln),Io=(0,wt.useRef)(0),_o=(0,wt.useRef)(null),[qo,Ni]=(0,wt.useState)(!1),$o=70;(0,wt.useEffect)(()=>{No.current=ln},[ln]),(0,wt.useEffect)(()=>{Oo.current=xn},[xn]),(0,wt.useEffect)(()=>{if(!ln){Hi(Oo.current);return}return Ni(!0),_o.current=setInterval(Ro,$o),()=>{clearInterval(_o.current)}},[]),(0,wt.useEffect)(()=>{qo&&(Hi(Oo.current),clearInterval(_o.current),Ni(!1),tn())},[ii]);const Ro=()=>lt(void 0,null,function*(){const Mt=Oo.current[Io.current];Mt!==void 0?(Hi(cr=>cr+Mt),Io.current++,clearInterval(_o.current),_o.current=setInterval(Ro,280/(Oo.current.length-Io.current))):No.current===!1&&(Hi(Oo.current),clearInterval(_o.current),Ni(!1),tn())});return ht.createElement("div",{className:`${nt.reasoning} fadeIn animated`},ht.createElement("div",{className:nt.btn,onClick:()=>Lo(!Xi)},ht.createElement("i",{className:"iconfont icon-shendusikao"}),ri?ht.createElement("span",null,"\u5DF2\u6DF1\u5EA6\u601D\u8003\uFF08\u7528\u65F6 ",ri," \u79D2\uFF09"):ht.createElement("span",null,"\u601D\u8003\u4E2D..."),Xi?ht.createElement("b",{className:"iconfont icon-shouqi6"}):ht.createElement("b",{className:"iconfont icon-zhankai6"})),Un&&ht.createElement(ye.Z,{spinning:!0,className:"mt20"}),Xi&&!Un&&ht.createElement("div",{className:nt.content},mi,qo?ht.createElement("span",{className:"aiBlink"},"__"):""))},Pt={select:"select___Kt_GE",box:"box___S5_ly",text:"text___dtZDv",itemWrap:"itemWrap___xmw7x",item:"item___io6Bx",active:"active___nHRTI"},At=bt(81327),Bt=Object.defineProperty,jt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,Vt=(xn,ln,tn)=>ln in xn?Bt(xn,ln,{enumerable:!0,configurable:!0,writable:!0,value:tn}):xn[ln]=tn,he=(xn,ln)=>{for(var tn in ln||(ln={}))_t.call(ln,tn)&&Vt(xn,tn,ln[tn]);if(jt)for(var tn of jt(ln))se.call(ln,tn)&&Vt(xn,tn,ln[tn]);return xn};const Zt=xn=>React.createElement("svg",he({className:"logo1_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:200,height:200},xn),React.createElement("path",{d:"M1019.407 620.8 891.834 397.781 946.49 293.12a29.099 29.099 0 0 0 6.4-36.395l-70.187-126.592a30.08 30.08 0 0 0-24.576-13.653H597.519L539.194 14.507a27.35 27.35 0 0 0-20.907-14.55H380.644a29.141 29.141 0 0 0-24.618 14.55v5.546L225.806 243.03H100.923a29.184 29.184 0 0 0-25.515 13.654L3.428 384.085a32.768 32.768 0 0 0 0 29.184L132.836 638.08 74.511 740.053a32.768 32.768 0 0 0 0 29.056l66.517 116.566a29.907 29.907 0 0 0 25.515 14.506H427.15l62.848 109.227A30.08 30.08 0 0 0 512.783 1024H660.41a29.141 29.141 0 0 0 24.576-14.55l128.469-224.853h114.773a31.915 31.915 0 0 0 24.662-15.445l66.474-117.419a28.16 28.16 0 0 0 0-30.976l.043.043zm-161.28 14.592L791.61 512.469 518.287 993.963l-74.752-122.88h-273.28l65.621-119.211h139.392L101.86 272.213h143.062L380.687 30.08l68.352 119.253-70.187 122.88H925.54l-69.205 121.942 137.6 241.194H858.17z",fill:"#605BEC"}),React.createElement("path",{d:"m499.983 699.307 174.379-274.731H324.708z",fill:"#605BEC"}));var Oe="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIw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TcwLjE4NyAxMjIuODhIOTI1LjU0bC02OS4yMDUgMTIxLjk0MiAxMzcuNiAyNDEuMTk0SDg1OC4xN3oiIGZpbGw9IiM2MDVCRUMiLz48cGF0aCBkPSJtNDk5Ljk4MyA2OTkuMzA3IDE3NC4zNzktMjc0LjczMUgzMjQuNzA4eiIgZmlsbD0iIzYwNUJFQyIvPjwvc3ZnPg==",me=Object.defineProperty,Ve=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,wn=(xn,ln,tn)=>ln in xn?me(xn,ln,{enumerable:!0,configurable:!0,writable:!0,value:tn}):xn[ln]=tn,Mn=(xn,ln)=>{for(var tn in ln||(ln={}))Xe.call(ln,tn)&&wn(xn,tn,ln[tn]);if(Ve)for(var tn of Ve(ln))Je.call(ln,tn)&&wn(xn,tn,ln[tn]);return xn};const we=xn=>React.createElement("svg",Mn({className:"logo2_svg__icon",viewBox:"0 0 1417 1024",xmlns:"http://www.w3.org/2000/svg",width:276.758,height:200},xn),React.createElement("path",{d:"M1364.44 118.705c-14.178-6.695-20.322 6.065-28.593 12.525-2.914 2.048-5.277 4.726-7.64 7.246-20.717 21.268-44.899 35.21-76.643 33.556a152.576 152.576 0 0 0-120.674 45.371c-7.404-41.826-32.06-66.875-69.553-82.865-19.693-8.35-39.543-16.7-53.248-34.737-9.61-12.919-12.288-27.333-17.015-41.512-3.15-8.507-6.144-17.25-16.384-18.668-11.185-1.733-15.517 7.247-19.928 14.73a189.125 189.125 0 0 0-23.552 98.461c1.575 76.88 35.446 138.083 102.636 181.642 7.562 4.963 9.531 9.925 7.09 17.25-4.49 14.967-9.926 29.54-14.81 44.584-2.992 9.61-7.561 11.658-18.274 7.483a309.484 309.484 0 0 1-96.886-63.015c-47.813-44.426-91.057-93.342-144.935-131.702a635.825 635.825 0 0 0-38.36-25.207c-54.982-51.2 7.167-93.262 21.582-98.225 14.966-5.199 5.277-23.158-43.402-22.922-48.68.237-93.184 15.833-149.977 36.628-8.428 3.15-17.092 5.514-25.993 7.326a557.844 557.844 0 0 0-160.768-5.436c-105.157 11.264-189.204 58.92-250.96 140.367-74.2 97.832-91.687 208.975-70.261 325.002 22.449 122.25 87.434 223.468 187.47 302.631 103.582 82 222.917 122.172 359.188 114.452 82.708-4.568 174.79-15.202 278.686-99.485 26.151 12.445 53.642 17.486 99.249 21.267 35.131 3.072 69.002-1.733 95.153-6.931 40.96-8.35 38.203-44.741 23.316-51.437-120.202-53.72-93.814-31.822-117.839-49.624 61.125-69.317 153.206-141.312 189.204-374.706 2.835-18.51.472-30.168 0-45.213-.237-9.137 1.969-12.603 12.918-13.706a240.089 240.089 0 0 0 86.173-25.442c77.982-40.803 109.332-107.914 116.736-188.259 1.103-12.288-.236-24.97-13.705-31.429zM685.45 842.043C569.108 754.215 512.55 725.307 489.157 726.49c-21.82 1.26-17.96 25.206-13.155 40.802 5.042 15.439 11.58 26.073 20.717 39.621 6.301 8.9 10.791 22.213-6.302 32.295-37.494 22.213-102.794-7.561-105.787-8.98-76.012-42.929-139.421-99.564-184.241-176.994a523.894 523.894 0 0 1-72.468-239.93c-1.024-20.56 5.278-27.885 26.703-31.587a272.148 272.148 0 0 1 85.307-2.127c118.942 16.699 220.16 67.741 305.073 148.48 48.443 46.001 85.071 100.982 122.88 154.703 40.173 57.029 83.338 111.458 138.32 155.963 19.376 15.675 34.894 27.569 49.781 36.234-44.74 4.805-119.414 5.829-170.456-32.926zm55.926-344.615c0-5.357 2.757-10.398 7.326-13.47a17.723 17.723 0 0 1 22.134 2.048c3.072 2.915 4.805 7.09 4.805 11.422a16.778 16.778 0 0 1-17.25 16.541 17.33 17.33 0 0 1-12.131-4.883 15.911 15.911 0 0 1-4.884-11.658zm173.529 85.464a104.37 104.37 0 0 1-33.005 8.586 71.444 71.444 0 0 1-44.504-13.548c-15.282-12.288-26.23-19.141-30.72-40.645a89.167 89.167 0 0 1 .787-31.429c3.939-17.487-.393-28.75-13.312-38.912-10.476-8.35-23.71-10.634-38.36-10.634a32.06 32.06 0 0 1-14.179-4.175c-6.144-2.914-11.106-10.24-6.301-19.14a60.18 60.18 0 0 1 10.712-11.265c19.85-10.79 42.693-7.246 63.882.788 19.693 7.798 34.501 21.898 55.926 41.905 21.74 24.183 25.68 30.8 38.125 48.916 9.846 14.179 18.747 28.75 24.89 45.45 3.703 10.397-1.102 18.905-13.941 24.103z",fill:"#4D6BFE"}));var Yt="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDE0MTcgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjc2Ljc1OCIgaGVpZ2h0PSIyMDAiPjxwYXRoIGQ9Ik0xMzY0LjQ0IDExOC43MDVjLTE0LjE3OC02LjY5NS0yMC4zMjIgNi4wNjUtMjguNTkzIDEyLjUyNS0yLjkxNCAyLjA0OC01LjI3NyA0LjcyNi03LjY0IDcuMjQ2LTIwLjcxNyAyMS4yNjgtNDQuODk5IDM1LjIxLTc2LjY0MyAzMy41NTZhMTUyLjU3NiAxNTIuNTc2IDAgMCAwLTEyMC42NzQgNDUuMzcxYy03LjQwNC00MS44MjYtMzIuMDYtNjYuODc1LTY5LjU1My04Mi44NjUtMTkuNjkzLTguMzUtMzkuNTQzLTE2LjctNTMuMjQ4LTM0LjczNy05LjYxLTEyLjkxOS0xMi4yODgtMjcuMzMzLTE3LjAxNS00MS41MTItMy4xNS04LjUwNy02LjE0NC0xNy4yNS0xNi4zODQtMTguNjY4LTExLjE4NS0xLjczMy0xNS41MTcgNy4yNDctMTkuOTI4IDE0LjczYTE4OS4xMjUgMTg5LjEyNSAwIDAgMC0yMy41NTIgOTguNDYxYzEuNTc1IDc2Ljg4IDM1LjQ0NiAxMzguMDgzIDEwMi42MzYgMTgxLjY0MiA3LjU2MiA0Ljk2MyA5LjUzMSA5LjkyNSA3LjA5IDE3LjI1LTQuNDkgMTQuOTY3LTkuOTI2IDI5LjU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),ri=[{name:"\u901A\u4E49\u5343\u95EE",key:"qwen-max",img:Oe},{name:"DeepSeek R1-671B",key:"deepseek-r1",img:Yt}],Un=ri.find(si=>si.key===xn);return _e.createElement("div",{className:Pt.select},_e.createElement(At.Z,{size:10},_e.createElement("span",{className:"c-grey-333 font16"},"\u6A21\u578B"),_e.createElement("div",{className:Pt.box,onMouseLeave:()=>ii(!1)},_e.createElement("div",{className:Pt.text,onClick:()=>ii(!0)},_e.createElement("img",{src:Un.img,width:20}),_e.createElement("span",null,Un.name),_e.createElement("b",{className:"iconfont icon-zhankai6"})),tn&&_e.createElement("div",{className:Pt.itemWrap},_e.createElement("aside",null,ri.map(si=>_e.createElement("div",{key:si.key,className:`${Pt.item} ${si.key===xn?Pt.active:""}`,onClick:mi=>{mi.stopPropagation(),ln(si.key),ii(!1)}},_e.createElement("img",{src:si.img,width:20}),_e.createElement("span",null,si.name))))))))},Ne={loadingPic:"loadingPic___y2kKZ",loading:"loading___UEUk1",dot:"dot___TYXFV","dot-fade":"dot-fade___KWn1a",wrap:"wrap___nU3cS",chatContainer:"chatContainer___PNe3Q",footerContainer:"footerContainer___hQATV",btnWrp:"btnWrp___mS8l6",btn:"btn___3za5U",btnActive:"btnActive____jzfb",inputContainer:"inputContainer___iCQ3u",uploadBtn:"uploadBtn___OHHJF",sendBtn:"sendBtn___ktaQl",sendBtnDisabled:"sendBtnDisabled___DVncF",cancelBtn:"cancelBtn___bzMDI",lineFour:"lineFour___Lhbz5",fullIcon:"fullIcon___YWXTV",footerContainerSelected:"footerContainerSelected___pGBh3",full:"full___dZLXo",li:"li___PjMV3",avatarIcon:"avatarIcon___ztGQ3",img:"img___wZqEA",content:"content___OlYYG",borderBox:"borderBox___tjHwt",text:"text___yWTCV",fileWrap:"fileWrap___IX778",file:"file___fxAKb",fileName:"fileName___RA8nu",source:"source___nkLC0",action:"action___I2zGy",disabledInput:"disabledInput___Buork",backBottom:"backBottom___SMuL2",head:"head___v8Eom",headBtn:"headBtn___IS7xR",menuWarp:"menuWarp___G6yj0",menu:"menu___M8VWP",menuText:"menuText___gRpb5",menuDel:"menuDel___eH_wg",active:"active___KWwPV"},pn=bt(99064),Tn=bt(955),Yn={draggableImage:"draggableImage___vcTso",img:"img___xAyno",close:"close___WUtfj",extraNode:"extraNode___tnBrt"},ui=({src:xn,onClick:ln,topPercentage:tn=.62,draggableExtraNode:ii})=>{const ri=(0,wt.useRef)(null),Un=(0,wt.useRef)(!1),si=(0,wt.useRef)(!1),[mi,Hi]=(0,wt.useState)(window.innerHeight*tn),[Xi,Lo]=(0,wt.useState)(!1),Oo=10;return(0,wt.useEffect)(()=>{if(ri.current){let No=function($o){var Ro;Un.current=!0,Ni=$o.pageY,qo=$o.pageY-(((Ro=ri.current)==null?void 0:Ro.getBoundingClientRect().top)||0),(0,Tn.kk)("none"),document.onselectstart=function(){return!1}},Io=function(){Un.current&&!si.current&&ln&&ln(),Un.current=!1,si.current=!1,(0,Tn.kk)("auto"),document.onselectstart=null},_o=function($o){var Ro;if(Un.current){const cr=$o.pageY-qo,ir=window.innerHeight-(((Ro=ri.current)==null?void 0:Ro.offsetHeight)||0)-50,pr=50;if(!si.current&&Math.abs(Ni-$o.pageY)>Oo&&(si.current=!0),si.current){let ts=Math.max(pr,Math.min(cr,ir));Hi(ts)}}},qo=0,Ni=0;return ri.current.addEventListener("mousedown",No),document.addEventListener("mousemove",_o),document.addEventListener("mouseup",Io),()=>{var $o,Ro;(Ro=($o=ri==null?void 0:ri.current)==null?void 0:$o.removeEventListener)==null||Ro.call($o,"mousedown",No),document.removeEventListener("mousemove",_o),document.removeEventListener("mouseup",Io)}}},[ln]),(0,wt.useEffect)(()=>{const No=()=>{Hi(window.innerHeight*tn)};return window.addEventListener("resize",No),()=>{window.removeEventListener("resize",No)}},[tn]),wt.createElement("div",{className:Yn.draggableImage,style:{top:`${mi}px`,display:Xi?"none":"block",cursor:Un.current?"grabbing":"grab"},ref:ri},ii&&wt.createElement("div",{className:Yn.extraNode,onMouseUp:No=>No.stopPropagation(),onMouseDownCapture:No=>No.stopPropagation()},ii),wt.createElement("img",{className:Yn.img,src:xn,width:60,draggable:"false"}),wt.createElement("i",{className:`iconfont icon-tupianguanbi ${Yn.close}`,onMouseUp:No=>{No.stopPropagation(),Lo(!0)}}))},Ce="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAIABJREFUeF6VnQmAnGV9/z/vMffeV3azuRMCSUgCSQggiCBFEE9UvFpqW6utFopa71bx6GHRWq31xKtSFS0eqICV+wwSIJKQkDvZJJvsObOzO/d7PH9/z/O+s5sY2/4XhpmdnXln3u/7/f1+39/xPFj8H39Wr742GRaOXaYs65WWnVhtuc58y7Lmh4oWZYFv2fpIgdxZFtg2oZMgdByU7eA7Npbt6L958rttUXMsQtsCyyawLEI5gC0HMMcCpf8193ILIVT6ZoUhlgqxw5BEoLAD87ulAuxQkZC/h4ogDHBCX79eXivHsfShQizkOJQsFR63FMdVGO6yHfWz1s4FD+za9V+N/ws01v/2otVLzuv36tZHwfpDlN1m2w6W62LLiVpyLhahpQixNRiBxkPAE+BcQtvRj+Veyd8dG99x8CyLIOESuC4qlPcJ6BH48lgOHoMnXzIMIAJA7gUQ/VwQ4obgBgGOgBiGOAiIIY4fEqoQFXoazEQIlrwnuhhKLoB8hgZXPlH/IhdsGmV911HpTxwef3Dkf8Lo9wL40hUvTR0uTfxtiHpPYFk527KxQhfLtbGdhAZJoQiEEChC+V1AsS0sR8AU0ISB8pwLtkPg2niuTaAZaBO4CXwBUL6hMFiA0zdDuuYDfcLyQQJaBJwG0QAo906gcAXMiInCOtuPQQ80gI4GKgYQ/dhSShNbPtDRdwGhsFw+z6JswWdTbV3/sH//3fXTAXlaAIV1qmr9RKnwAmGVsmxsLCxLgLA0eFiOBkyflzDQEWDknB3Qj11CxyVwxGxdlDAvIaZs4dsODcfFd1yU62hw5bgngRhZrkZSgxabcARiIOD5+m8CoO2H2EFAMgg1E1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jJCzFmxnC3tjQQNqQfQwmaY808Zz8UXHIlnWpSWRbjv76t5vjbI5uo6OvpWICtLIRxFHqo8oYAPW2FiBXQ0YayppnjTOia6kgMrghTn22yubue5t9+eZSTs86r5N4we9hBASml2tq6+pnvzipsaNnaFXnxuGWWlOWzckKC2Nk1Jbh+au+K8/uk75BgR4l6SfnkljNmnkF/992kIK0hZv3z+8tdPeOvTTuaHBmAUFWCFgrjhPGLDB5MYFIWQg0gGKJq/kVC6AzfWTaqpmf+IdDNuRF66ra3r19fcf+2dnzeT9VWs9B4FINP89sSP3lz1UHtd16SVK9vZvDlNLGaQJ4p0cfzZJa9g6Wk8Q89nnHjYQC754dGYwTBVQ/vw3D83MG/hZmQmiekFsHOjLN+cwczvy6rD9sfOyaO0O8E+bz1NjimYNLIUy1FDb8bCwr6hS39298++tfHhXiKsePbm4CdrzP9csyp+3dat6f52xiKfPqRthzmr5hK3u5CeIJxjcPbUcZx07HcIRMKU9S1iyRsp1s0V1CXqWd6xgWGFVSxoa6cqL6BbO6VFebpNU5IfYvnqFFPLv1PXUb7qDoPOx25+7uZvf0B8e9bfdd5/5aza6E5vaU5evk/JyLHddlysaVrOmoZqDAJUlORy/eXHU1FaSCg3gkhFWT3bZM7y1azt3ki/gjJC0RysYIa059LeGaeqJJ94Ii6H9Kv8NNcovk+uKXvqF8un/N/+CcBu5N24Yb8H9pfF6XOW1M+bUtNYP6yoIGRccPphjBrZT7dBcosjtC2PsnRBnNUNDdiik5I+BeREQnpsMZm2VQt7vcR+PRoJPC1mtc2/mZv///ojj90punz2WfN/nntvQHFezmRXpPcdP3bIqIL8whGWF6xc+04oL7kqQ2Pfpu5omAZThNY6GWuV4waWOp6xcGg0UDPtuWn/lj/j+X+Lbso4jJUfOwAAAABJRU5ErkJggg==",Ot=bt(3294),Lt=bt(56102),St=bt(24544),It=bt(58617),Kt=bt(32050),xt=Object.defineProperty,Me=Object.defineProperties,De=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,xe=(xn,ln,tn)=>ln in xn?xt(xn,ln,{enumerable:!0,configurable:!0,writable:!0,value:tn}):xn[ln]=tn,ue=(xn,ln)=>{for(var tn in ln||(ln={}))ee.call(ln,tn)&&xe(xn,tn,ln[tn]);if(le)for(var tn of le(ln))Se.call(ln,tn)&&xe(xn,tn,ln[tn]);return xn},Te=(xn,ln)=>Me(xn,De(ln)),vn=(xn,ln,tn)=>new Promise((ii,ri)=>{var Un=Hi=>{try{mi(tn.next(Hi))}catch(Xi){ri(Xi)}},si=Hi=>{try{mi(tn.throw(Hi))}catch(Xi){ri(Xi)}},mi=Hi=>Hi.done?ii(Hi.value):Promise.resolve(Hi.value).then(Un,si);mi((tn=tn.apply(xn,ln)).next())}),en=({title:xn="\u5934\u6B4CAI",placeholder:ln,hideUpload:tn,hideInputBox:ii,aiIcon:ri=Ce,userIcon:Un=$n,dragIcon:si=Pi,children:mi,fetchUrl:Hi,fetchData:Xi={},extraAnswerAction:Lo,showDefaultTips:Oo=!0,onOpen:No,onClose:Io,loadingOption:_o,showPreference:qo=!1,initMessage:Ni,customRequest:$o,visible:Ro,width:Mt=1200,isCheckRestrictNumber:cr=!1,headNode:ir,headFunctionNode:pr,showRedraw:ts,showEdit:rs,promptPropName:ls="prompt",topPercentage:Ci,showSwitchingModel:oi=!1,showImageGenerator:Ie=!1,showLookHistory:Le=!1,fetchListObject:Gt,customPreference:We,customDataNode:Ye,showAddSession:ce,historyId:qt,draggableExtraNode:He,drawerExtraNode:un,menuExtraFunctionNode:An,showSceneAwareness:Fn=!1,ReactComponent:oe=te.Z,topFunctionNode:qe,footerContainerStyle:bn,chatContainerStyle:Jn={},showCodePreview:Ke=!1,showSource:Qe=!0,onSendMessage:zn,onDynamic:Wn=()=>{}})=>{var fi,Hn;const[_n,Vn]=(0,wt.useState)(!1),[wi,Qi]=(0,wt.useState)("qwen-max"),[qi,$e]=(0,wt.useState)([]),[lo,Co]=(0,wt.useState)([]),[jo,Ue]=(0,wt.useState)(!1),[jn,qn]=(0,wt.useState)(!1),[Mi,vi]=(0,wt.useState)(!1),[pi,Ui]=(0,wt.useState)([]),[ki,zi]=(0,wt.useState)(""),[uo,cn]=(0,wt.useState)(0),[Xo,sn]=(0,wt.useState)(void 0),[ho,Er]=(0,wt.useState)(!1),[zo,Fr]=(0,wt.useState)(null),[mr,Di]=(0,wt.useState)(""),Li=(0,wt.useRef)(),yo=(0,wt.useRef)(null),bo=(0,wt.useRef)(null),[Xn,Rt]=(0,wt.useState)(!1),[Qo,xr]=(0,wt.useState)(!1),[es,cs]=(0,wt.useState)(!1),[us,no]=(0,wt.useState)(!1),[$i,Ko]=(0,wt.useState)(!1),[ro,lr]=(0,wt.useState)(0),ms=(0,wt.useRef)(null),Ji=(0,wt.useRef)(!1),Ti=(0,wt.useRef)(null),[kn,Ki]=(0,wt.useState)(void 0),[Jo,jr]=(0,wt.useState)(!0),[Ir,Ur]=(0,wt.useState)(Mt-28),[hs,ns]=(0,wt.useState)(!1),[sa,Ys]=(0,wt.useState)(!0),[ga,Ze]=(0,wt.useState)([]),vs=(0,wt.useRef)([]),mu=(0,wt.useRef)(null),Ka=(0,wt.useRef)(null),gl=(0,wt.useRef)(!1),Xr=Ir-22,pl=ki==null?void 0:ki.split(`
|
|
|
`).length,{onAdd:Tu,onGetList:Hr,onListClick:As,onListDelete:kl,onListDealData:so}=Gt||{},hr=50,Zo=10,hi={maxCount:hr,showUploadList:!1,withCredentials:!0,openFileDialogOnClick:!1,fileList:qi,multiple:!0,accept:".doc,.docx,.md,.txt,.pdf,.xlsx,.xls",beforeUpload:nn=>vn(void 0,null,function*(){var Si,mo,So,Ho;const ao=(Ho=(So=(mo=(Si=nn==null?void 0:nn.name)==null?void 0:Si.split("."))==null?void 0:mo.slice(-1))==null?void 0:So[0])==null?void 0:Ho.toLowerCase(),wr=["doc","docx","md","pdf","txt","xlsx","xls"].includes(ao);return nn.size==0?(de.ZP.warning("\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Re.default.LIST_IGNORE):wr?nn.size/1024/1024>100?(de.ZP.warning("\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u9650\u5236100MB\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Re.default.LIST_IGNORE):!0:(de.ZP.warning("\u76EE\u524D\u652F\u6301txt\u3001md\u3001doc\u3001docx\u3001pdf\u3001xlsx\u3001xls\u6587\u4EF6"),Re.default.LIST_IGNORE)}),onChange:({fileList:nn})=>{$e(nn)},action:`${(fi=Ot.Z)==null?void 0:fi.API_SERVER}/api/intelligent_imports/upload_file.json`},Ns={maxCount:Zo,showUploadList:!1,withCredentials:!0,openFileDialogOnClick:!1,fileList:lo,multiple:!0,accept:".jpg,.png,",beforeUpload:nn=>{var Si,mo,So,Ho;const ao=(Ho=(So=(mo=(Si=nn==null?void 0:nn.name)==null?void 0:Si.split("."))==null?void 0:mo.slice(-1))==null?void 0:So[0])==null?void 0:Ho.toLowerCase(),wr=["jpg","png"].includes(ao);return nn.size==0?(de.ZP.warning("\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Re.default.LIST_IGNORE):wr?nn.size/1024/1024>10?(de.ZP.warning("\u4E0A\u4F20\u7684\u56FE\u7247\u5927\u5C0F\u9650\u523610MB\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Re.default.LIST_IGNORE):!0:(de.ZP.warning("\u76EE\u524D\u652F\u6301jpg\u3001png"),Re.default.LIST_IGNORE)},onChange:({fileList:nn})=>{Co(nn)},action:`${(Hn=Ot.Z)==null?void 0:Hn.API_SERVER}/api/ai/generals/update_file.json`};(0,wt.useEffect)(()=>{if(!pi.length||!Li.current)return;const nn=pi[pi.length-1];nn!=null&&nn.loading&&(Li.current.scrollTop=Li.current.scrollHeight)},[pi.length]),(0,wt.useEffect)(()=>{if(!Li.current||!ms.current)return;const nn=new IntersectionObserver(([Si])=>{jr(Si.isIntersecting)},{root:Li.current,rootMargin:"70px",threshold:0});return nn.observe(ms.current),()=>{ms.current&&nn.unobserve(ms.current)}},[Li.current,ms.current]),(0,wt.useEffect)(()=>{if(!Xn)return;const nn=Li.current,Si=Ti.current;Ji.current=!1;let mo=nn.scrollTop;const So=()=>{const{scrollTop:ao,scrollHeight:dr,clientHeight:wr}=nn;ao>mo?ao+wr>=dr-50&&(nn.scrollTop=nn.scrollHeight,Ji.current=!1):ao<mo&&(Ji.current=!0),mo=ao};nn.addEventListener("scroll",So);const Ho=new ResizeObserver(()=>{Ji.current||(nn.scrollTop=nn.scrollHeight)});return Ho.observe(Si),()=>{var ao;Ho.unobserve(Si),(ao=nn==null?void 0:nn.removeEventListener)==null||ao.call(nn,"scroll",So)}},[Xn]),(0,wt.useEffect)(()=>{!Xn&&vs.current.length&&(Ui([...pi,...vs.current]),vs.current=[])},[Xn]),(0,wt.useEffect)(()=>{if(!Li.current)return;const nn=new ResizeObserver(()=>{var Si;Li.current&&Ur((Si=Li.current)==null?void 0:Si.offsetWidth)});return nn.observe(Li.current),()=>{Li.current&&nn.unobserve(Li.current)}},[Li.current]),(0,wt.useEffect)(()=>{typeof Ro=="boolean"&&Vn(Ro)},[Ro]),(0,wt.useEffect)(()=>{var nn;if(yo.current&&zo!==null){yo.current.focus();const Si=(nn=yo.current.resizableTextArea)==null?void 0:nn.textArea;Si&&(Si.selectionStart=Si.selectionEnd=Si.value.length)}},[zo]),(0,wt.useEffect)(()=>{pl<5&&Er(!1)},[pl]),(0,wt.useEffect)(()=>{_n&&Ni&&(Ui(is(Ni)),Ue(!0),Pa(Ni,{history:[]})),_n&&(Vr(),qt?Fu(qt):ce&&!kn&&pa()),_n||Js()},[_n]);const is=(nn="",Si=[],mo=[])=>{const So=Date.now();return[{text:nn,key:So,sender:"user",fileList:Si,imageList:mo,show:!0},{loading:!0,key:So,sender:"AI",show:!0,model:wi,imageGenerator:us,thinkingEnabled:Qo,codePreview:es}]},Js=()=>{Di(""),Fr(null),$e([]),Co([]),zi("")},ol=()=>{if(No){No({chatData:pi,setChatData:Ui,setLoading:Ue,getData:Pa,renderChatItems:is,handleAdd:pa,identifier:kn});return}Vn(!0)},ml=()=>{if(Ys(!0),Io){Io();return}Vn(!1)},ti=()=>{Er(!ho)},Vr=()=>vn(void 0,null,function*(){if(!cr)return;const nn=yield(0,pn.ZP)("/api/intelligent_imports/check_number.json",{method:"get"});(nn==null?void 0:nn.status)===0&&(nn==null?void 0:nn.total_number)!==-1&&(cn((nn==null?void 0:nn.total_number)-(nn==null?void 0:nn.remaining_number)),sn(nn==null?void 0:nn.total_number))}),Is=()=>{ne.default.info({title:"\u63D0\u793A",icon:null,okText:"\u6211\u77E5\u9053\u4E86",width:510,centered:!0,content:wt.createElement("div",null,wt.createElement("div",{style:{color:"#FA6400"}},"\u60A8\u5DF2\u8FBE\u5230\u667A\u80FD\u52A9\u6559\u7684\u4F7F\u7528\u6B21\u6570"),wt.createElement("div",{className:"c-grey-333 mt5"},"\u667A\u80FD\u52A9\u6559\u6BCF\u5929\u9650\u5236\u4F7F\u7528",Xo,"\u6B21\uFF0C\u8BF7\u660E\u5929\u518D\u8BD5\u3002"))})},ba=nn=>nn.reduce((mo,So)=>{if(So.sender==="user"){const Ho=nn.find(ao=>ao.key===So.key&&ao.sender==="AI");Ho&&(Ho!=null&&Ho.text)&&!(Ho!=null&&Ho.error)&&mo.push({question:So.text,answer:Ho.text})}return mo},[]),Pa=(...nn)=>vn(void 0,[...nn],function*(Si="",mo={},So=pi){if($o&&(yield $o({mes:Si,setChatData:Ui,fileList:qi,body:mo,checkNum:Vr,setLoading:Ue,bodyChatData:So,setTyping:Rt,setImageGenerator:no,renderChatItems:is})),!$o){const Ho=qi==null?void 0:qi.map(Ts=>{var Ws;return(Ws=Ts==null?void 0:Ts.response)==null?void 0:Ws.file_id}),ao=lo==null?void 0:lo.map(Ts=>{var Ws;return(Ws=Ts==null?void 0:Ts.response)==null?void 0:Ws.data}),dr=mo.history||ba(So),wr=ue(ue({identifier:kn,response_mode:"streaming",model:wi,scene_awareness:$i,thinking_enabled:Qo,image_generator:us,code_preview:es,file_ids:Ho,image_list:ao,history:dr,[ls]:Si},Xi),mo),Lr=Object.fromEntries(Object.entries(wr).filter(([Ts,Ws])=>Ws!==void 0));bo.current=new St.Z(Ot.Z.API_SERVER+Hi,Lr),yield new Promise((Ts,Ws)=>{let fs=null,Ah=null;bo.current.on("data",Du=>{Rt(!0);const{chunk:{content:eu,type:Gi,created:Su,msg:ve}}=Du,En=ve==="error";Gi==="thinking"&&(fs=fs||Su,Ui(Qu=>[...Qu].map((Ou,Hl)=>Hl===Qu.length-1?Te(ue({},Ou),{reasoning:(Ou.reasoning||"")+eu,loading:!1,hideAnswer:!0,error:En}):Ou))),Gi==="text"&&(Ah=Ah||Su,Ui(Qu=>[...Qu].map((Ou,Hl)=>Hl===Qu.length-1?Te(ue({},Ou),{text:(Ou.text||"")+eu,loading:!1,startTime:fs,endTime:Ah,error:En}):Ou)))}),bo.current.on("done",()=>{Ts()}),bo.current.on("error",Du=>{let eu="\u62B1\u6B49\uFF0C\u6211\u521A\u521A\u9047\u5230\u4E86\u4E00\u70B9\u95EE\u9898\uFF0C\u6CA1\u80FD\u5B8C\u6210\u60A8\u7684\u8BF7\u6C42\u3002\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\u4E00\u6B21\uFF0C\u6216\u8005\u8054\u7CFB\u6280\u672F\u652F\u6301\u5E2E\u5FD9\u89E3\u51B3!";Object.prototype.toString.call(Du)==="[object Object]"&&Du.status===-9&&(eu=Du==null?void 0:Du.message),Ui(Gi=>[...Gi].map((Su,ve)=>ve===Gi.length-1?Te(ue({},Su),{text:eu,loading:!1,error:!0}):Su)),Ts()}),bo.current.on("cancelled",()=>{Ts()}),bo.current.startStream()})}Vr(),Ue(!1)}),vl=nn=>{zi(nn.target.value)},po=(nn,Si)=>{if(Js(),Ue(!0),nn==="edit"){vs.current=pi.slice(Si+2);const mo=pi.splice(Si),{fileList:So=[],imageList:Ho=[]}=(mo==null?void 0:mo[0])||{},ao=So.map(Lr=>{var Ts;return(Ts=Lr.response)==null?void 0:Ts.file_id}),dr=Ho.map(Lr=>{var Ts;return(Ts=Lr.response)==null?void 0:Ts.data}),wr={history:ba(pi),file_ids:ao,image_list:dr,edit:!0};Ui([...pi,...is(mr,So,Ho)]),Pa(mr,wr,pi)}if(nn==="redraw"){vs.current=pi.slice(Si+1);const mo=pi.splice(Si-1),{text:So,fileList:Ho=[],imageList:ao=[]}=(mo==null?void 0:mo[0])||{},dr=Ho.map(Ts=>{var Ws;return(Ws=Ts.response)==null?void 0:Ws.file_id}),wr=ao.map(Ts=>{var Ws;return(Ws=Ts.response)==null?void 0:Ws.data}),Lr={history:ba(pi),file_ids:dr,image_list:wr,edit:!0};Ui([...pi,...is(So,Ho,ao)]),Pa(So,Lr,pi)}},Bu=()=>{if(ki.trim()!==""){Js(),Ue(!0);const nn=qi.filter(mo=>mo.status==="done"),Si=lo.filter(mo=>mo.status==="done");Ui([...pi,...is(ki,nn,Si)]),Pa(ki)}},Ia=nn=>{if(nn.shiftKey){if(nn.key==="Enter")return}else if(nn.key==="Enter"){if(nn.preventDefault(),tu||gl.current)return;Bu()}},Da=(nn,Si)=>{let mo=!1;rs===!0?mo=!0:rs==="last"&&(mo=pi.reduce((dr,wr,Lr)=>wr.sender==="user"?Lr:dr,-1)===Si);const So=Si===zo,Ho=[...(nn==null?void 0:nn.fileList)||[],...(nn==null?void 0:nn.imageList)||[]];return wt.createElement("div",{className:Ne.li,style:ue({width:Xr},Jn)},wt.createElement("div",{className:Ne.avatarIcon},wt.createElement("img",{className:Ne.img,src:Un})),wt.createElement("div",{className:Ne.content},!!(Ho!=null&&Ho.length)&&wt.createElement("div",{className:Ne.fileWrap},Ho==null?void 0:Ho.map((ao,dr)=>{var wr,Lr;return wt.createElement("div",{key:dr,className:Ne.file},wt.createElement("img",{src:bt(90034)(`./${((Lr=(wr=ao==null?void 0:ao.name)==null?void 0:wr.split("."))==null?void 0:Lr.pop())||"txt"}.png`),width:20,className:"mr10"}),wt.createElement("aside",null,wt.createElement(ae.Z,{title:ao==null?void 0:ao.name},wt.createElement("div",{className:Ne.fileName},ao==null?void 0:ao.name)),wt.createElement("div",{className:"c-grey-999 font12"},(0,Tn.RD)(ao==null?void 0:ao.size))))})),wt.createElement("div",{className:Ne.borderBox},So?wt.createElement(Tt.default.TextArea,{value:mr,ref:yo,autoSize:!0,placeholder:"\u8BF7\u8F93\u5165",bordered:!1,onChange:ao=>Di(ao.target.value)}):wt.createElement("div",{className:Ne.text},nn==null?void 0:nn.text)),So?wt.createElement("div",{className:Ne.action},wt.createElement(be.ZP,{onClick:()=>{Di(""),Fr(null)},size:"small"},"\u53D6\u6D88"),wt.createElement(be.ZP,{disabled:!mr.trim(),onClick:()=>po("edit",Si),type:"primary",size:"small"},"\u786E\u8BA4")):wt.createElement("div",{className:Ne.action},wt.createElement(Lt.CopyToClipboard,{text:(nn==null?void 0:nn.text)||"",onCopy:()=>de.ZP.success("\u590D\u5236\u6210\u529F")},wt.createElement(ae.Z,{title:"\u590D\u5236"},wt.createElement("i",{className:"iconfont icon-fuzhi8 font13"}))),mo&&!jo&&wt.createElement(ae.Z,{title:"\u7F16\u8F91"},wt.createElement("i",{onClick:()=>{Fr(Si),Di((nn==null?void 0:nn.text)||"")},className:"iconfont icon-bianji10 font14"})))))},Ca=(nn,Si)=>{let mo=!1;ts===!0?mo=!0:ts==="last"&&(mo=pi.reduce((ao,dr,wr)=>dr.sender==="AI"?wr:ao,-1)===Si);let So="";return nn!=null&&nn.source?So=nn==null?void 0:nn.source:(nn==null?void 0:nn.model)==="deepseek-r1"?So="\u7531deepseek\u751F\u6210":(nn==null?void 0:nn.model)==="qwen-max"&&(So="\u7531\u901A\u4E49\u5343\u95EE\u751F\u6210"),wt.createElement("div",{className:Ne.li,style:ue({width:Xr},Jn)},wt.createElement("div",{className:Ne.avatarIcon},wt.createElement("img",{className:Ne.img,src:ri})),wt.createElement("div",{className:Ne.content},wt.createElement("div",{className:Ne.borderBox},nn.loading&&wt.createElement(wt.Fragment,null,nn!=null&&nn.imageGenerator?wt.createElement("div",{className:Ne.loadingPic},"\u6B63\u5728\u751F\u6210\u4E2D",wt.createElement("div",{className:"ai-loading"})):!(nn!=null&&nn.thinkingEnabled)&&wt.createElement("div",null,wt.createElement("div",{className:Ne.loading},wt.createElement("div",{className:Ne.dot}),wt.createElement("div",{className:Ne.dot}),wt.createElement("div",{className:Ne.dot})),wt.createElement("div",{style:{marginTop:10,color:"#9096A3"}},(_o==null?void 0:_o.text)||"\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u76EE\u524D\u9AD8\u5CF0\u671F\u4F53\u9A8C\u4EBA\u6570\u8FC7\u591A\uFF0C\u6211\u4EEC\u5DF2\u8BB0\u5F55\u4E0B\u60A8\u7684\u9700\u6C42\uFF0C\u7A0D\u540E\u5C06\u81EA\u52A8\u4E3A\u60A8\u751F\u6210\u7B54\u6848\u3002"))),(nn==null?void 0:nn.thinkingEnabled)&&wt.createElement(vt,{time:nn==null?void 0:nn.time,cancelIndex:ro,loading:nn.loading,streamingStatus:!(nn!=null&&nn.text),onFinish:()=>{lr(0),Ui(Ho=>[...Ho].map((ao,dr)=>dr===Ho.length-1?Te(ue({},ao),{hideAnswer:!1,time:ao.startTime?ao.endTime-ao.startTime:null}):ao))},value:nn==null?void 0:nn.reasoning}),!!(nn!=null&&nn.text)&&!nn.hideAnswer&&wt.createElement(et.Z,{onDynamic:Wn,cancelIndex:ro,streamingStatus:jo,loadImage:!!(nn!=null&&nn.imageGenerator),onFinish:()=>vn(void 0,null,function*(){lr(0),setTimeout(()=>Rt(!1),0)}),value:nn==null?void 0:nn.text})),Qe&&!!(nn!=null&&nn.text)&&So&&wt.createElement("div",{className:Ne.source},So),wt.createElement("div",{className:Ne.action},Lo==null?void 0:Lo(nn,Si,{onMenuClick:Fu}),!(nn!=null&&nn.imageGenerator)&&wt.createElement(Lt.CopyToClipboard,{text:String((nn==null?void 0:nn.text)||""),onCopy:()=>de.ZP.success({content:"\u590D\u5236\u6210\u529F",key:"copy"})},wt.createElement(ae.Z,{title:"\u590D\u5236"},wt.createElement("i",{className:"iconfot icon-fuzhi8 font13"}))),qo&&!jo&&wt.createElement(wt.Fragment,null,wt.createElement(ae.Z,{title:"\u559C\u6B22"},wt.createElement("i",{style:nn!=null&&nn.like?{color:"#FA8D30"}:{},onClick:()=>zl("like",!(nn!=null&&nn.like),Si),className:"iconfot icon-yijiejue font15"})),wt.createElement(ae.Z,{title:"\u4E0D\u559C\u6B22"},wt.createElement("i",{style:nn!=null&&nn.dislike?{color:"#e86d7c"}:{},onClick:()=>zl("dislike",!(nn!=null&&nn.dislike),Si),className:"iconfot icon-weijiejuezhengchang font15"}))),mo&&!jo&&wt.createElement(ae.Z,{title:"\u91CD\u65B0\u751F\u6210"},wt.createElement("i",{onClick:()=>po("redraw",Si),className:"iconfot icon-gengxin-genghuan-tihuan"})))))},zl=(nn,Si,mo)=>vn(void 0,null,function*(){if(We){const So=pi.slice(0,mo+1),ao=ba(So).length;yield We({type:nn,value:Si,index:mo,identifier:kn,objectIndex:ao})}Ui(So=>(So[mo][nn]=Si,Si&&(So[mo][nn==="like"?"dislike":"like"]=!1),[...So]))}),vu=()=>{var nn,Si;lr(1),(Si=(nn=bo.current)==null?void 0:nn.cancelRequest)==null||Si.call(nn),Ue(!1),Rt(!1)},pa=()=>vn(void 0,null,function*(){var nn,Si,mo;(Si=(nn=bo.current)==null?void 0:nn.cancelRequest)==null||Si.call(nn),Js(),Ui([]),Ue(!0);const So=yield Tu();(So==null?void 0:So.status)===0&&Ki((mo=So==null?void 0:So.data)==null?void 0:mo.identifier),Ue(!1),Rt(!1)}),Oa=()=>vn(void 0,null,function*(){var nn;vi(!0);const Si=yield Hr();(Si==null?void 0:Si.status)===0&&Ze(((nn=Si==null?void 0:Si.data)==null?void 0:nn.list)||[]),vi(!1)}),Fu=(...nn)=>vn(void 0,[...nn],function*(Si=kn){var mo,So,Ho,ao;(So=(mo=bo.current)==null?void 0:mo.cancelRequest)==null||So.call(mo),Js(),qn(!0);const dr=yield As(Si);if(dr.status===0){const wr=so(((Ho=dr==null?void 0:dr.data)==null?void 0:Ho.messages)||[]);Ui(wr),qn(!1),Ki((ao=dr==null?void 0:dr.data)==null?void 0:ao.identifier);return}Ui([]),qn(!1)}),kh=(nn,Si)=>vn(void 0,null,function*(){(yield kl(nn)).status===0&&(de.ZP.success("\u5220\u9664\u6210\u529F"),Si===kn&&pa(),Oa())}),ch=()=>wt.createElement("div",{className:Ne.menuWarp},wt.createElement("h4",null,"\u5386\u53F2\u5BF9\u8BDD"),wt.createElement(ye.Z,{spinning:Mi},!ga.length&&wt.createElement(Jt.Z,{style:{width:250,paddingBottom:30},image:Jt.Z.PRESENTED_IMAGE_SIMPLE}),!!ga.length&&wt.createElement("div",{className:Ne.menu},ga.map(function(nn,Si){return wt.createElement("aside",{className:Nt()(kn===nn.identifier&&Ne.active),key:nn.id,onClick:()=>Fu(nn.id)},wt.createElement("div",{className:Ne.menuText},wt.createElement(ae.Z,{title:nn==null?void 0:nn.question},wt.createElement("span",null,nn==null?void 0:nn.question)),An&&An(nn)),wt.createElement("div",{className:Ne.menuDel,onClick:mo=>mo.stopPropagation()},wt.createElement(Be.Z,{title:"\u63D0\u793A",description:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u672C\u6761\u5BF9\u8BDD\u5417\uFF1F",onConfirm:()=>kh(nn.id,nn.identifier),okText:"\u786E\u8BA4",zIndex:1100,cancelText:"\u53D6\u6D88"},wt.createElement("i",{className:"iconfont icon-shanchu14 delete-hover font14"}))))})))),qh=nn=>{if(nn==="file"){if(lo.length){ne.default.confirm({centered:!0,icon:null,okText:"\u786E\u8BA4\u8986\u76D6",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u5DF2\u5B58\u5728\u56FE\u7247\uFF0C\u4E0A\u4F20\u6587\u4EF6\u540E\u56FE\u7247\u5C06\u4F1A\u88AB\u8986\u76D6?",onOk:()=>{Co([]),mu.current.upload.uploader.fileInput.click()}});return}mu.current.upload.uploader.fileInput.click()}if(nn==="image"){if(qi.length){ne.default.confirm({centered:!0,icon:null,okText:"\u786E\u8BA4\u8986\u76D6",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u5DF2\u5B58\u5728\u6587\u4EF6\uFF0C\u4E0A\u4F20\u56FE\u7247\u540E\u6587\u4EF6\u5C06\u4F1A\u88AB\u8986\u76D6?",onOk:()=>{$e([]),Ka.current.upload.uploader.fileInput.click()}});return}Ka.current.upload.uploader.fileInput.click()}},fh=[{key:"file",disabled:qi.length>=hr,label:wt.createElement(ae.Z,{placement:"right",title:wt.createElement("div",null,wt.createElement("b",null,"\u4E0A\u4F20\u9644\u4EF6\uFF08\u4EC5\u8BC6\u522B\u6587\u5B57\uFF09"),wt.createElement("div",null,"\u6700\u591A 50 \u4E2A\uFF0C\u6BCF\u4E2A 100 MB\uFF0C\u652F\u6301\u5404\u7C7B\u578B\u6587\u6863"))},wt.createElement("span",null,wt.createElement("i",{className:"iconfont icon-fujian3 font14 mr5"}),"\u4E0A\u4F20\u6587\u6863"))},wi!=="deepseek-r1"&&{key:"image",disabled:lo.length>=Zo,label:wt.createElement(ae.Z,{placement:"right",title:"\u652F\u6301\u4E0D\u8D85\u8FC710M\u7684PNG/JPG\u56FE\u7247\uFF0C\u6700\u591A10\u4E2A"},wt.createElement("span",null,wt.createElement("i",{className:"iconfont icon-tupianshangchuan font14 mr5"}),"\u4E0A\u4F20\u56FE\u7247"))}].filter(Boolean),yu=[...qi,...lo],tu=yu.some(nn=>nn.status==="uploading")||jo||Xn,Za=uo>=Xo,gh=tn||qi.length>=hr||lo.length>=Zo,ph=us||Qo||$i||es||!!yu.length,Iu={chatData:pi,stream:bo,isDisabledNum:Za,checkNumModal:Is,checkNum:Vr,onClose:ml,setChatData:Ui,setLoading:Ue,getData:Pa,clearStatus:Js,typing:Xn,setImageGenerator:no,renderChatItems:is,setSceneAwareness:Ko,setIdentifier:Ki,setCodePreview:cs,setTyping:Rt};return wt.createElement(wt.Fragment,null,mi?wt.createElement("div",{onClick:ol},mi):mi!==null&&wt.createElement(ui,{draggableExtraNode:He,src:si,onClick:ol,topPercentage:Ci}),wt.createElement(oe,{open:_n,width:hs?"100%":Mt,afterOpenChange:nn=>{nn&&Ys(!1)},push:!1,contentWrapperStyle:sa?{}:{transition:"none"},extra:wt.createElement("div",{className:Ne.head},un,oi&&wt.createElement(Dn,{value:wi,onChange:nn=>{xr(!1),no(!1),Qi(nn),Co([]),$e([])}}),Le&&wt.createElement(wt.Fragment,null,wt.createElement(pe.Z,{dropdownRender:ch,onOpenChange:nn=>{nn&&Oa()},placement:"bottomLeft",arrow:!0},wt.createElement("div",{className:Ne.headBtn},wt.createElement("i",{className:"icon-lishiduihua1 font14 mr10"}),"\u5386\u53F2\u5BF9\u8BDD"))),ce&&wt.createElement(wt.Fragment,null,wt.createElement("div",{className:Ne.headBtn,onClick:pa},wt.createElement("i",{className:"icon-xinjianduihua font14 mr10"}),"\u65B0\u5EFA\u5BF9\u8BDD")),wt.createElement(ae.Z,{title:hs?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},wt.createElement("div",{className:Ne.headBtn,style:{padding:"0 12px"},onClick:()=>ns(!hs)},hs&&wt.createElement("i",{className:"iconfont icon-tuichuquanping3"}),!hs&&wt.createElement("i",{className:"iconfont icon-quanping4"})))),title:wt.createElement("span",{className:"c-grey-333 font16"},xn),onClose:ml,bodyStyle:{paddingRight:4}},wt.createElement("div",{className:Nt()(Ne.wrap,_n&&"body-overflow-hidden")},wt.createElement("div",{ref:Li,className:Ne.chatContainer},qe==null?void 0:qe(Iu),Oo&&wt.createElement("div",{className:`${Ne.li} mb20`,style:ue({width:Xr},Jn)},wt.createElement("div",{className:Ne.avatarIcon},wt.createElement("img",{className:Ne.img,src:ri})),wt.createElement("div",{className:Ne.content},wt.createElement("div",{className:Ne.borderBox},ir,pr==null?void 0:pr(Iu)))),wt.createElement("div",{ref:Ti},wt.createElement(ye.Z,{spinning:jn,className:"mt20"},pi==null?void 0:pi.map((nn,Si)=>wt.createElement(wt.Fragment,{key:nn.key+Si},nn.show&&wt.createElement(wt.Fragment,null,nn.sender==="user"&&Da(nn,Si),nn.sender==="AI"&&Ca(nn,Si),Ye&&!["AI","user"].includes(nn.sender)&&Ye(nn,Si,{width:Xr})))))),!Jo&&wt.createElement("div",{className:Ne.backBottom,onClick:()=>{Li.current.scrollTop=Li.current.scrollHeight}},wt.createElement("i",{className:"iconfont icon-huidaodibu"})),wt.createElement("div",{ref:ms})),!ii&&wt.createElement("div",{style:bn,className:Nt()(Ne.footerContainer,ho&&Ne.full,ph&&Ne.footerContainerSelected)},wt.createElement("div",{className:Ne.btnWrp},Ke&&wt.createElement(ae.Z,{title:"\u66F4\u64C5\u957F\u5904\u7406\u4EE3\u7801\u95EE\u9898\uFF0C\u652F\u6301\u4E00\u53E5\u8BDD\u751F\u6210\u5E94\u7528"},wt.createElement("div",{onClick:()=>cs(!es),className:Nt()(Ne.btn,es&&Ne.btnActive)},wt.createElement("i",{className:"iconfont icon-daimamoshi1 mr10 font12"}),"\u4EE3\u7801\u6A21\u5F0F")),Fn&&wt.createElement(ae.Z,{title:"\u667A\u80FD\u611F\u77E5\u5F53\u524D\u60C5\u5883\uFF0C\u63D0\u4F9B\u9488\u5BF9\u6027\u89E3\u7B54"},wt.createElement("div",{onClick:()=>Ko(!$i),className:Nt()(Ne.btn,$i&&Ne.btnActive)},wt.createElement("i",{className:"iconfont icon-changjingganzhi mr10 font12"}),"\u573A\u666F\u611F\u77E5")),wi==="deepseek-r1"&&wt.createElement(ae.Z,{title:"\u8C03\u7528\u65B0\u6A21\u578B DeepSeek-R1\uFF0C\u89E3\u51B3\u63A8\u7406\u95EE\u9898"},wt.createElement("div",{onClick:()=>xr(!Qo),className:Nt()(Ne.btn,Qo&&Ne.btnActive)},wt.createElement("i",{className:"iconfont icon-shendusikao mr10 font12"}),"\u6DF1\u5EA6\u601D\u8003\uFF08R1\uFF09")),Ie&&wi==="qwen-max"&&wt.createElement("div",{onClick:()=>no(!us),className:Nt()(Ne.btn,us&&Ne.btnActive)},wt.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10 font12"}),"\u56FE\u50CF\u751F\u6210"),yu.map(nn=>wt.createElement("div",{key:nn.uid},(nn==null?void 0:nn.status)==="uploading"&&wt.createElement(ye.Z,{indicator:wt.createElement(It.Z,{rev:"",spin:!0}),className:"mr10",size:"small",spinning:!0}),wt.createElement("span",{title:nn==null?void 0:nn.name,className:"mr10"},(0,Tn.Pq)(nn.name,20)),wt.createElement("i",{onClick:()=>{$e(Si=>Si.filter(mo=>mo.uid!==nn.uid)),Co(Si=>Si.filter(mo=>mo.uid!==nn.uid))},className:"iconfont current icon-shanchu15 delete-hover c-red-ee4 font12"})))),wt.createElement(ae.Z,{title:Za&&wt.createElement("div",null,wt.createElement("div",null,"\u60A8\u5DF2\u8FBE\u5230\u667A\u80FD\u52A9\u6559\u7684\u4F7F\u7528\u6B21\u6570"),wt.createElement("div",null,"\u667A\u80FD\u52A9\u6559\u6BCF\u5929\u9650\u5236\u4F7F",Xo,"\u6B21\uFF0C\u8BF7\u660E\u5929\u518D\u8BD5\u3002"))},wt.createElement("div",{className:Nt()(Ne.inputContainer,pl>4&&Ne.lineFour,Za&&Ne.disabledInput)},wt.createElement(Re.default,ue({ref:mu},hi)),wt.createElement(Re.default,ue({ref:Ka},Ns)),wt.createElement(pe.Z,{className:`${gh&&"hide"}`,menu:{items:fh,onClick:nn=>qh(nn.key)},placement:"top"},wt.createElement(be.ZP,{className:Ne.uploadBtn,icon:wt.createElement(Kt.Z,{rev:"",style:{fontSize:18,color:"#FFF"}})})),wt.createElement(Tt.default.TextArea,{rows:pl>4?4:pl,placeholder:ln||"\u5728\u8FD9\u91CC\u8F93\u5165\u4F60\u7684\u95EE\u9898\u5427\uFF0CShift+Enter\u6362\u884C\uFF5E",value:ki,bordered:!1,style:gh?{paddingLeft:0,marginLeft:0}:{},onChange:vl,onPressEnter:Ia,onFocus:()=>zn==null?void 0:zn(),onCompositionStart:()=>{gl.current=!0},onCompositionEnd:()=>{gl.current=!1}}),Xn?wt.createElement(ae.Z,{title:"\u505C\u6B62\u751F\u6210"},wt.createElement("div",{className:`iconfont icon-tingzhihuida ${Ne.cancelBtn}`,onClick:vu})):wt.createElement(be.ZP,{className:(ki==null?void 0:ki.trim())===""?Ne.sendBtnDisabled:Ne.sendBtn,icon:wt.createElement("i",{className:"iconfont icon-fasong2 c-white"}),disabled:tu,onClick:Bu}),pl>4&&wt.createElement("span",{className:Ne.fullIcon,onClick:ti},ho&&wt.createElement("span",{className:"iconfont icon-shousuo"}),!ho&&wt.createElement("span",{className:"iconfont icon-zhankai"}))))))))}},9165:function(gn,Ln,bt){"use strict";bt.d(Ln,{t:function(){return pe}});var wt=bt(59301),te=bt(3113),de={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},Re=bt(92310),ne=bt.n(Re),ae=Object.defineProperty,Tt=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,Jt=(je,Nt,et)=>Nt in je?ae(je,Nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):je[Nt]=et,Be=(je,Nt)=>{for(var et in Nt||(Nt={}))be.call(Nt,et)&&Jt(je,et,Nt[et]);if(Tt)for(var et of Tt(Nt))ye.call(Nt,et)&&Jt(je,et,Nt[et]);return je};const pe=({cancelText:je="\u53D6\u6D88",okText:Nt="\u786E\u5B9A",loading:et=!1,hasOkBtn:nt=!0,hasCancelBtn:ht=!0,okButtonProps:lt={},onCancel:gt=()=>{},onOk:vt=()=>{},className:Pt=""})=>wt.createElement("div",{className:ne()(de.buttonFixed,Pt)},wt.createElement("div",{className:de.buttonWrap},ht&&wt.createElement(te.ZP,{size:"middle",className:`${de.button} mr20`,onClick:gt},je),nt&&wt.createElement(te.ZP,Be({size:"middle",type:"primary",className:`${de.button} mr20`,loading:et,onClick:vt},lt),Nt)))},73524:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return Be}});var wt=bt(59301),te={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},de=bt(92310),Re=bt.n(de),ne=bt(71418),ae=bt(2859),Tt=bt(99064),be=bt(955),ye=(pe,je,Nt)=>new Promise((et,nt)=>{var ht=vt=>{try{gt(Nt.next(vt))}catch(Pt){nt(Pt)}},lt=vt=>{try{gt(Nt.throw(vt))}catch(Pt){nt(Pt)}},gt=vt=>vt.done?et(vt.value):Promise.resolve(vt.value).then(ht,lt);gt((Nt=Nt.apply(pe,je)).next())}),Be=({data:pe,className:je,fullWidth:Nt,style:et={},onClose:nt,onOk:ht,showFullTools:lt,noAssociationId:gt})=>{const vt=(0,wt.useRef)(null),Pt=(0,wt.useRef)(null),At=(0,wt.useRef)(null),Bt=(0,wt.useRef)(null),[jt,_t]=(0,wt.useState)(!1),[se,Vt]=(0,wt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,wt.useEffect)(()=>(At.current||(At.current=document.createElement("style"),document.head.appendChild(At.current)),pe!=null&&pe.visible?(document.body.setAttribute("data-custom","y-hidden"),At.current.innerHTML=" html { overflow-y: hidden; }",pe!=null&&pe.src&&he()):(document.body.removeAttribute("data-custom"),At.current&&(document.head.removeChild(At.current),At.current=null)),()=>{document.body.removeAttribute("data-custom"),At.current&&(document.head.removeChild(At.current),At.current=null)}),[pe==null?void 0:pe.visible]);const he=()=>ye(void 0,null,function*(){_t(!0),Vt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ve=yield(0,be.ZJ)(pe==null?void 0:pe.src);vt.current.src="",vt.current.src=Ve,vt.current.onload=function(){me()},_t(!1),Vt("")}),Zt=Ve=>ye(void 0,null,function*(){_t(!0),Vt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Xe=yield(0,Tt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:pe.title,file:Ve.dataUrl}});Xe!=null&&Xe.id&&!gt?(yield(0,Tt.ZP)(`/api/attachments/${pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Xe==null?void 0:Xe.id,settings:JSON.stringify(Ve.state)}})).status===0&&ht():Xe!=null&&Xe.id&&ht(Xe),_t(!1),Vt("")}),Oe=()=>{const Ve=document.querySelector('a[href="https://markerjs.com/"]');Ve&&Ve.parentNode&&(Ve.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(Je=>{const wn=document.querySelector(Je.name);wn&&wn.setAttribute("title",Je.title)})},me=()=>{Pt.current=new ae.hP(vt.current),Pt.current.targetRoot=Bt.current,Pt.current.addEventListener("render",Zt),Pt.current.addEventListener("beforeclose",nt),lt&&(Pt.current.availableMarkerTypes=Pt.current.ALL_MARKER_TYPES,Pt.current.uiStyleSettings.redoButtonVisible=!0,Pt.current.uiStyleSettings.notesButtonVisible=!0,Pt.current.uiStyleSettings.zoomButtonVisible=!0,Pt.current.uiStyleSettings.zoomOutButtonVisible=!0,Pt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Pt.current.uiStyleSettings,Pt.current.show(),pe!=null&&pe.snapshotData&&Pt.current.restoreState(pe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Oe()},300)};return wt.createElement(wt.Fragment,null,(pe==null?void 0:pe.visible)&&wt.createElement(ne.Z,{spinning:jt,tip:se,style:{position:"absolute",width:"100vw"}},wt.createElement("div",{ref:Bt,className:Re()(te.imageDimensions,je,Nt?te.fullWidth:""),style:et},wt.createElement("img",{className:te.img,ref:vt}))))}},41588:function(gn,Ln,bt){"use strict";var wt=bt(59301),te=bt(95237),de=bt(43604),Re=bt(99313),ne=bt(3113),ae=bt(85149),Tt=bt(88010),be=bt(48136),ye=bt(59301);const Jt=(0,wt.forwardRef)(({callback:Be,showSaveButton:pe,value:je=""},Nt)=>{const et=(0,wt.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 "}]}]}],ht=[{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=Pt=>{et.current.setValue(et.current.getValue()+" "+Pt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ye.createElement(te.Z,{className:Tt.Z.lists,gutter:[10,10]},nt.map((Pt,At)=>ye.createElement(de.Z,{flex:"110px",className:Tt.Z.item},ye.createElement("div",null,ye.createElement(ae.Z,{value:`$$${Pt.value}$$`}),Pt.name),ye.createElement("div",{className:Tt.Z.children},Pt.children.map((Bt,jt)=>ye.createElement("div",{key:jt},ye.createElement("h1",null,Bt.name),ye.createElement(te.Z,{gutter:[10,10]},Bt.data.map((_t,se)=>ye.createElement(de.Z,{key:se,onClick:()=>lt(_t),className:Tt.Z.diamond},ye.createElement(ae.Z,{value:"`$$"+_t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ye.createElement(te.Z,{className:Tt.Z.lists,gutter:[10,10]},ht.map((Pt,At)=>ye.createElement(de.Z,{flex:"110px",className:Tt.Z.item},ye.createElement("div",null,ye.createElement(ae.Z,{value:"`$$"+Pt.value+"$$`"}),Pt.name),ye.createElement("div",{className:Tt.Z.children},Pt.children.map((Bt,jt)=>ye.createElement("div",{key:jt},Bt.name&&ye.createElement("h1",null,Bt.name),ye.createElement(te.Z,{gutter:[10,10]},Bt.data.map((_t,se)=>ye.createElement(de.Z,{key:se,onClick:()=>lt(_t),className:Tt.Z.diamond},ye.createElement(ae.Z,{value:"`$$"+_t.value+"$$`"}))))))))))}],vt=()=>{var Pt=document.createElement("div");Pt.innerHTML=et.current.getValue();var At=Pt.innerText;return Be&&Be(At),At};return(0,wt.useImperativeHandle)(Nt,()=>({getData:vt})),ye.createElement("div",{className:Tt.Z.mathWrap},ye.createElement(Re.default,{defaultActiveKey:"1",items:gt}),ye.createElement("math-field",{locale:"zh_cn",className:Tt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},je||""),pe&&ye.createElement("div",{className:Tt.Z.button},ye.createElement(ne.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ln.Z=Jt},8797:function(gn,Ln,bt){"use strict";var wt=bt(59301),te=bt(93314),de=bt(3113),Re=Object.defineProperty,ne=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,Jt=(Nt,et,nt)=>et in Nt?Re(Nt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Nt[et]=nt,Be=(Nt,et)=>{for(var nt in et||(et={}))be.call(et,nt)&&Jt(Nt,nt,et[nt]);if(Tt)for(var nt of Tt(et))ye.call(et,nt)&&Jt(Nt,nt,et[nt]);return Nt},pe=(Nt,et)=>ne(Nt,ae(et));const je=({img:Nt,buttonProps:et={},styles:nt={},customText:ht,ButtonText:lt,ButtonClick:gt,Buttonclass:vt,ButtonTwo:Pt,imgStyles:At,loading:Bt=!1,className:jt=""})=>wt.createElement("section",{className:`tc animated fadeIn ${jt}`,style:Be({color:"#999",margin:"100px auto",visibility:Bt?"hidden":"visible"},nt)},wt.createElement("img",{src:Nt||te,style:pe(Be({},At),{pointerEvents:"none",userSelect:"none"})}),wt.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&wt.createElement(de.ZP,Be({className:vt,onClick:gt},et),lt),Pt&&Pt);Ln.Z=je},23210:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return vt}});var wt=bt(59301),te={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},de=bt(3113),Re=bt(70557),ne=bt(23954),ae=bt(6848),Tt=bt(955),be=bt(94941),ye=bt(8797),Jt=bt(3294),Be=bt(19381),pe=bt(59301),je=Object.defineProperty,Nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(Pt,At,Bt)=>At in Pt?je(Pt,At,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):Pt[At]=Bt,lt=(Pt,At)=>{for(var Bt in At||(At={}))et.call(At,Bt)&&ht(Pt,Bt,At[Bt]);if(Nt)for(var Bt of Nt(At))nt.call(At,Bt)&&ht(Pt,Bt,At[Bt]);return Pt},gt=(Pt,At,Bt)=>new Promise((jt,_t)=>{var se=Zt=>{try{he(Bt.next(Zt))}catch(Oe){_t(Oe)}},Vt=Zt=>{try{he(Bt.throw(Zt))}catch(Oe){_t(Oe)}},he=Zt=>Zt.done?jt(Zt.value):Promise.resolve(Zt.value).then(se,Vt);he((Bt=Bt.apply(Pt,At)).next())}),vt=({editOffice:Pt="view",data:At,theme:Bt,type:jt,filename:_t,monacoEditor:se,className:Vt,style:he,close:Zt,onClose:Oe,hasMask:me,disabledDownload:Ve,onImgDimensions:Xe,showNodata:Je,recordInfo:wn})=>{const[Mn,we]=(0,wt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Yt,_e]=(0,wt.useState)(""),[Zn,Dn]=(0,wt.useState)(),Ne=window.ENV==="build"?"/react/build":"",pn=location.host.startsWith("localhost")?Jt.Z.PROXY_SERVER:Jt.Z.API_SERVER,Yn=10*(1024*1024),mn=(0,wt.useRef)();At!=null&&At.startsWith("/api")&&jt!=="txt"&&(At=Jt.Z.API_SERVER+At);const ui=Ot=>Ot.substring(Ot.lastIndexOf("/")+1).split(".").pop();_t&&se&&(se.filename=_t),(0,wt.useEffect)(()=>{var Ot,Lt;const St=(Lt=(Ot=document.cookie)==null?void 0:Ot.replace(/\s/g,""))==null?void 0:Lt.split(";");St==null||St.map(It=>{let Kt=It.split("=");Kt[0]==="_educoder_session"&&_e(Kt[1])})},[]),(0,wt.useEffect)(()=>{jt==="office"&&(At.indexOf("bigfilescdn.")>-1||At.indexOf("bigfiles1")>-1?Dn({url:At,fileType:ui(At),model:At.indexOf("model=edit")?"edit":"view"}):Ce())},[jt,At]);const Ce=()=>gt(void 0,null,function*(){console.log("data:",At);let Ot=At;At.startsWith("http")||(Ot=location.origin+Ot);let Lt=new URL(Ot).pathname.split("/").pop();const St=yield(0,be.gJ)({attachment_id:Lt});St.url=pn+St.url,Dn(St)}),$n=()=>{if(At.startsWith("http")||At.startsWith("blob:")){Pi();return}(0,Tt.Sv)(_t||"educoder",At,_t)},Pi=()=>{wn&&(0,Be.fc)({id:wn==null?void 0:wn.id,watch_type:1,course_id:wn==null?void 0:wn.course_id}),(0,Tt.Nd)(_t||"educoder",decodeURIComponent(At))};return pe.createElement("div",{style:lt({},he||{}),className:`${me&&te.bgBlack} ${jt?te.wrp:"hide"}`},Zt&&pe.createElement("div",{className:te.close,ref:mn},!!Xe&&pe.createElement(ae.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>mn.current},pe.createElement("span",{onClick:()=>{Oe(),Xe()}},pe.createElement("i",{className:"icon-yulanpizhu"}))),!Ve&&pe.createElement(ae.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>mn.current},pe.createElement("span",{onClick:Pi},pe.createElement("i",{className:"icon-quxiaozhiding"}))),pe.createElement(ae.Z,{title:"\u5173\u95ED",getPopupContainer:()=>mn.current},pe.createElement("span",{className:"",onClick:Oe},pe.createElement("i",{className:"icon-guanbi1"})))),pe.createElement("div",{className:`${te[Vt]} ${Vt} ${te.monaco} ${jt==="txt"?"show":"hide"}`},jt==="txt"&&pe.createElement(pe.Fragment,null,pe.createElement(ne.ZP,lt({},se)))),jt==="audio"&&pe.createElement("audio",{src:`${(At==null?void 0:At.indexOf("http://"))>-1||(At==null?void 0:At.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${At}`,autoPlay:!0}),jt==="video"&&pe.createElement(pe.Fragment,null,(At==null?void 0:At.indexOf("http"))>-1?pe.createElement("video",{controls:!0,src:`${At}`,autoPlay:!0}):pe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${At}`,autoPlay:!0})),jt==="office"&&Zn&&pe.createElement("iframe",{src:`${Ne}/office.html?key=${Zn.key}&url=${btoa(Zn.url)}&callbackUrl=${pn+(Zn.callbackUrl||"")}&fileType=${Zn.fileType}&title=${Zn.title||""}&model=${Pt}&officeServer=${Jt.Z.ONLYOFFICE}&disabledDownload=${!!Ve}`}),jt==="html"&&pe.createElement("iframe",{src:At+"&disposition=inline"}),jt==="pdf"&&pe.createElement("iframe",{src:`${Ne}/js/pdfview/index.html?filename=${_t||"educoder.pdf"}&url=${encodeURIComponent(At)}&disabledDownload=${!!Ve}`}),jt==="image"&&pe.createElement("img",{src:`${(At==null?void 0:At.indexOf("http://"))>-1||(At==null?void 0:At.indexOf("https://"))>-1?"":"data:image/png;base64,"}${At}`}),(jt==="other"||jt==="download")&&pe.createElement(pe.Fragment,null,Je?pe.createElement(ye.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:pe.createElement(de.ZP,{icon:pe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:$n,disabled:Ve},"\u4E0B\u8F7D")}):pe.createElement(de.ZP,{type:"primary",size:"middle",onClick:$n,disabled:Ve},pe.createElement(Re.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(gn,Ln,bt){"use strict";bt.d(Ln,{z:function(){return jt},Z:function(){return _t}});var wt=bt(59301),te=bt(50304),de=bt(24768),Re=bt(64018),ne=bt(46284),ae=bt(3294),Tt=bt(955),be=bt(15342),ye=bt(1012),Jt=bt(23210),Be=bt(59301),je=({html:se})=>{const Vt=(0,wt.useRef)(null),he=(0,wt.useRef)(null),Zt=`.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,wt.useEffect)(()=>{const Oe=Vt.current.attachShadow({mode:"open"});he.current=document.createElement("div"),he.current.className="markdown-body",he.current.innerHTML=se,Oe.appendChild(he.current);const me=document.createElement("style");return me.textContent=Zt,Oe.appendChild(me),()=>{Oe.innerHTML=""}},[]),(0,wt.useEffect)(()=>{he.current&&(he.current.innerHTML=se)},[se]),Be.createElement("div",{ref:Vt})},Nt=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,lt=(se,Vt,he)=>Vt in se?Nt(se,Vt,{enumerable:!0,configurable:!0,writable:!0,value:he}):se[Vt]=he,gt=(se,Vt)=>{for(var he in Vt||(Vt={}))nt.call(Vt,he)&<(se,he,Vt[he]);if(et)for(var he of et(Vt))ht.call(Vt,he)&<(se,he,Vt[he]);return se};const vt="@\u2581\u2581@",Pt="@\u2581@",At=/<pre[^>]*>/g;function Bt(se){let Vt=document.createElement("div");return Vt.innerHTML=se,Vt.childNodes.length===0?"":Vt.childNodes[0].nodeValue}const jt=(se,Vt)=>{se=se||"";const he=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Zt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Oe=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,me=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Vt?se.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(he,(Ve,Xe,Je,wn,Mn,we,Yt)=>{const _e=Xe||wn||we,Zn=Je||Mn||Yt||"?";return ae.Z.API_SERVER+"/api/attachments/"+_e+Zn+"&t="+(0,Tt.Jn)(_e,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(se=se.replace(me,(Ve,Xe,Je,wn,Mn,we,Yt)=>{const _e=Xe||wn||we,Zn=Je||Mn||Yt||"?";return ae.Z.API_SERVER+"/attachments/download/"+_e+Zn+"&t="+(0,Tt.Jn)(_e,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(he,(Ve,Xe,Je,wn,Mn,we,Yt)=>{const _e=Xe||wn||we,Zn=Je||Mn||Yt||"?";return ae.Z.API_SERVER+"/api/attachments/"+_e+Zn+"&t="+(0,Tt.Jn)(_e,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(Zt,(Ve,Xe,Je,wn,Mn)=>{const we=Xe||wn,Yt=Je||Mn||"";return'"'+ae.Z.API_SERVER+"/api/attachments/"+we+Yt+we+Yt+"&t="+(0,Tt.Jn)(we,Date.now())}).replace(Oe,(Ve,Xe,Je,wn,Mn)=>{const we=Xe||wn,Yt=Je||Mn||"";return"("+ae.Z.API_SERVER+"/files/uploads/"+we+Yt+we+Yt+"&t="+(0,Tt.Jn)(we,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`),se)};var _t=({value:se="",className:Vt,showTextOnly:he,showLines:Zt,style:Oe={},stylesPrev:me={},highlightKeywords:Ve,showProgramFill:Xe,isProgramFill:Je,disabledFill:wn=!1,programFillValue:Mn,onFillChange:we=Zn=>{},onFillBlur:Yt=()=>{},onFillFocus:_e=()=>{}})=>{let Zn=String(se);const[Dn,Ne]=(0,wt.useState)(""),[pn,Tn]=(0,wt.useState)("office"),[Yn,mn]=(0,wt.useState)([]),ui=(0,wt.useRef)("a"+(0,ye.Z)()),Ce={},$n=(Se,xe,ue)=>{const Te=document.createElement(Se===Pt?"input":"textarea");Te.style.width="100%",Te.style.height=Se===Pt?"40px":"151px",Te.rows=5,Te.spellcheck=!1,Te.name="edu-program-fill",Te.placeholder="\u8BF7\u8F93\u5165",Te.dataset.id=xe;const vn=Object.keys(Ce).length;return Ce[vn]=Te,`<span class="edu-program-fill-wrap ${Se===Pt?"":"show"}" style="width:${Se===Pt?"400px":"100%"}" title=${ue||""}><span>${Te.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Pi(Se){return Se=Se.replace(/!\[.*?\]\(.*?\)/g,""),Se=Se.replace(/\[.*?\]\(.*?\)/g,""),Se=Se.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Se=Se.replace(/<embed.*?>/g,""),Se=Se.replace(/<img.*?>/g,""),Se=Se.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Se=Se.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Se=Se.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Se=Se.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Se}const Ot=Se=>Se.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(xe,ue){let Te=ue.replace(/(\n|\r)/g,"").split("}"),vn=[];return Te.map(fn=>{fn!=""&&vn.push(`.${ui.current} ${fn}`)}),`<style>${vn.join("}")}</style>`}),Lt=(0,wt.useMemo)(()=>{try{const Te=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,vn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,fn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,en=/\(\/attachments\/download\//g;Zn=Zn.replace(en,"("+ae.Z.API_SERVER+"/attachments/download/").replace(Te,"("+ae.Z.API_SERVER+"/api/attachments/").replace(vn,'"'+ae.Z.API_SERVER+"/api/attachments/").replace(fn,'"'+ae.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(Te){}if(Xe){let Te=-1;return Zn=Zn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(vn,fn,en){var xn;return++Te,$n(vn,Te,(xn=Mn==null?void 0:Mn[Te])==null?void 0:xn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ot(Zn||"")}</pre>`}let Se=Ot(Zn);Se=(0,de.ZP)(Se);const xe=(0,de.ez)();Zn.match(/\[TOC\]/)&&(Se=Se.replace("<p>[TOC]</p>",(0,de.Qv)()),(0,de.Iy)()),Se=Se.replace(/(__special_katext_id_\d+__)/g,(Te,vn)=>{const{type:fn,expression:en}=xe[vn];return(0,be.renderToString)(Bt(en)||"",{displayMode:fn==="block",throwOnError:!1,output:"html"})}),Se=Se.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,de.AL)();const ue=document.createElement("div");if(ue.innerHTML=Se,he)return ue.innerText;if(Ve){const Te=Ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return xt(ue,Te),ue.innerHTML}return setTimeout(()=>le(),500),ue.innerHTML},[Zn,Ve]);(0,wt.useEffect)(()=>{Me.current&&Me.current.querySelectorAll(["input","textarea"]).forEach(xe=>{xe.oninput=St,xe.onblur=It,xe.onfocus=Kt})},[Yn]),(0,wt.useEffect)(()=>{var Se,xe,ue,Te,vn;if(Mn!=null&&Mn.length)try{const fn=Me.current.querySelectorAll(".edu-program-fill-score"),en=Me.current.querySelectorAll('[name="edu-program-fill"]');for(const[xn,ln]of en.entries())ln.value=((Se=Mn==null?void 0:Mn[xn])==null?void 0:Se.value)||"",((xe=Mn==null?void 0:Mn[xn])==null?void 0:xe.type)==="warning"?ln.className="program-fill-warning":((ue=Mn==null?void 0:Mn[xn])==null?void 0:ue.type)==="success"?ln.className="program-fill-success":ln.className="";for(const[xn,ln]of fn.entries())ln.innerHTML=(Te=Mn==null?void 0:Mn[xn])!=null&&Te.score?`${(vn=Mn==null?void 0:Mn[xn])==null?void 0:vn.score}\u5206`:"";mn(Mn)}catch(fn){console.log(fn,"error")}},[Mn]);const St=Se=>{Yn[Se.target.dataset.id]=Yn[Se.target.dataset.id]||{},Yn[Se.target.dataset.id].value=Se.target.value,mn([...Yn]),we(Yn,Se.target.dataset.id)},It=Se=>{Yn[Se.target.dataset.id]=Yn[Se.target.dataset.id]||{},Yn[Se.target.dataset.id].value=Se.target.value,mn([...Yn]),Yt(Yn,Se.target.dataset.id)},Kt=Se=>{Yn[Se.target.dataset.id]=Yn[Se.target.dataset.id]||{},Yn[Se.target.dataset.id].value=Se.target.value,mn([...Yn]),_e(Yn,Se.target.dataset.id)};function xt(Se,xe){return Se.childNodes.forEach(ue=>{var Te;if(ue.childNodes.length>0)xt(ue,xe);else if(ue.nodeName!=="IMG")if(ue.innerHTML)ue.innerHTML=(Te=ue.innerHTML)==null?void 0:Te.replace(new RegExp(xe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const vn=document.createElement("span");vn.innerHTML=ue.textContent.replace(new RegExp(xe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ue.replaceWith(vn)}})}const Me=(0,wt.useRef)();de.jb.WebkitLineClamp=Zt,Zt&&(Oe=gt(gt({},Oe),de.jb));function De(Se){let xe=Se.target;if(xe.tagName.toUpperCase()==="A"){let ue=xe.getAttribute("href");if(ue.indexOf("office")>-1)Se.preventDefault(),Ne(ue),Tn("office");else if(ue.indexOf("application/pdf")>-1)Se.preventDefault(),Ne(ue),Tn("pdf");else if(ue.indexOf("text/html")>-1)Se.preventDefault(),Ne(ue),Tn("html");else if(ue.startsWith("#")){Se.preventDefault();let Te=document.getElementById(ue.replace("#",""));Te&&Te.scrollIntoView(!0)}}}const le=()=>{var Se;const xe=(Se=Me.current)==null?void 0:Se.querySelectorAll("video");xe==null||xe.forEach(ue=>{if(ue.oncontextmenu=()=>!1,ue.src.indexOf(".m3u8")>-1&&!ue.canPlayType("application/vnd.apple.mpegurl")){if(ne.ZP.isSupported()){var Te=new ne.ZP;Te.loadSource(ue.src),Te.attachMedia(ue)}}})};(0,wt.useEffect)(()=>{if(Me.current&&Lt&&Lt.match(At)&&window.PR.prettyPrint(),Me.current)return Me.current.addEventListener("click",De),()=>{var Se;(Se=Me.current)==null||Se.removeEventListener("click",De),(0,de.AL)(),(0,de.Iy)()}},[Lt,Me.current,De]),(0,wt.useEffect)(()=>{var Se;const xe=ue=>{ue.preventDefault(),ue.clipboardData.setData("text",window.getSelection().toString())};return(Se=Me.current)==null||Se.addEventListener("copy",xe),()=>{var ue;(ue=Me.current)==null||ue.removeEventListener("copy",xe)}},[Me.current]);const ee=Se=>/<style[\s\S]*?>/i.test(Se||"");return wt.createElement(wt.Fragment,null,he&&wt.createElement("div",{ref:Me},Lt),!he&&!ee(Lt)&&wt.createElement("div",{ref:Me,style:gt({},Oe),className:`${Vt||""} ${wn?"disabled-fill":""} markdown-body ${ui.current}`,dangerouslySetInnerHTML:{__html:Lt}}),!he&&ee(Lt)&&wt.createElement(je,{html:Lt}),wt.createElement(Jt.Z,{close:!0,data:Dn,type:Dn!=null&&Dn.length?pn:"",style:gt({},me),onClose:()=>Ne("")}))}},97692:function(gn,Ln,bt){"use strict";bt.d(Ln,{h:function(){return Pt}});var wt=bt(59301),te=bt(57809),de=bt(78241),Re=bt(3113),ne=bt(89780),ae=bt.n(ne),Tt=bt(37036),be=bt(95625),ye=Object.defineProperty,Jt=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,et=(At,Bt,jt)=>Bt in At?ye(At,Bt,{enumerable:!0,configurable:!0,writable:!0,value:jt}):At[Bt]=jt,nt=(At,Bt)=>{for(var jt in Bt||(Bt={}))je.call(Bt,jt)&&et(At,jt,Bt[jt]);if(pe)for(var jt of pe(Bt))Nt.call(Bt,jt)&&et(At,jt,Bt[jt]);return At},ht=(At,Bt)=>Jt(At,Be(Bt));const lt=te.default.Option,gt={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"]};Ln.Z=({callback:At,onCancel:Bt})=>{const[jt,_t]=(0,wt.useState)("python");function se(he){_t(vt[he][1])}function Vt(he){At(he)}return wt.createElement(de.default,ht(nt({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Vt,style:{width:500}}),wt.createElement(de.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},wt.createElement(te.default,{getPopupContainer:he=>he.parentNode,onChange:se},Object.keys(vt).map(he=>wt.createElement(lt,{key:he,value:he},vt[he][0])))),wt.createElement(de.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},wt.createElement(Pt,{mode:jt})),wt.createElement("div",{className:"flex-container flex-end"},wt.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),wt.createElement(Re.ZP,{type:"ghost",onClick:Bt},"\u53D6\u6D88")))};function Pt({value:At,onChange:Bt,mode:jt,options:_t={}}){const se=(0,wt.useRef)(),[Vt,he]=(0,wt.useState)();return(0,wt.useEffect)(()=>{if(Vt){let Zt=function(Oe){const me=Oe.getValue();Bt&&Bt(me)};return Vt.on("change",Zt),()=>{Vt.off("change",Zt)}}},[Vt,Bt]),(0,wt.useEffect)(()=>{Vt&&Vt.setOption("mode",jt)},[Vt,jt]),(0,wt.useEffect)(()=>{Vt&&(At!==Vt.getValue()||At==="")&&setTimeout(()=>{Vt.setValue(At||"")},300)},[Vt,At]),(0,wt.useEffect)(()=>{if(se.current&&!Vt){const Zt=ae().fromTextArea(se.current,nt({mode:jt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_t));he(Zt)}},[se.current,Vt]),wt.createElement("div",{className:"my-codemirror-container"},wt.createElement("textarea",{ref:se}))}},12290:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return oi}});var wt=bt(59301),te=bt(89780),de=bt.n(te),Re=bt(76374),ne=bt(37036),ae=bt(6313),Tt=bt(25717),be=bt(99498),ye=bt(25419),Jt=bt(67549),Be=bt(85149),pe=({value:Ie="",className:Le,showTextOnly:Gt,showLines:We,style:Ye={}})=>{const ce=(0,wt.useMemo)(()=>"",[Ie]);return wt.createElement(wt.Fragment,null,wt.createElement("div",{dangerouslySetInnerHTML:{__html:ce}}))},je=bt(59301),Nt=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,vt=(Ie,Le,Gt)=>Le in Ie?Nt(Ie,Le,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Ie[Le]=Gt,Pt=(Ie,Le)=>{for(var Gt in Le||(Le={}))lt.call(Le,Gt)&&vt(Ie,Gt,Le[Gt]);if(ht)for(var Gt of ht(Le))gt.call(Le,Gt)&&vt(Ie,Gt,Le[Gt]);return Ie},At=(Ie,Le)=>et(Ie,nt(Le));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 jt({onActionCallback:Ie,title:Le,icon:Gt,actionName:We,className:Ye="",children:ce}){function qt(){Ie(We)}return je.createElement("a",{title:Le,className:Ye,onClick:qt},je.createElement("i",{className:`${Gt}`}),ce)}var _t=({watch:Ie,showNullButton:Le,showNullProgramButton:Gt,onActionCallback:We,fullScreen:Ye,insertTemp:ce,hidetoolBar:qt,extraUse:He})=>{const un=[...Bt,{title:`${Ie?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ie?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return je.createElement("ul",{className:"markdown-toolbar-container"},!qt&&un.map((An,Fn)=>je.createElement("li",{key:Fn},An.actionName?je.createElement(jt,At(Pt({},An),{onActionCallback:We})):je.createElement("span",{className:"v-line"}))),Le?je.createElement("li",null,je.createElement(jt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:We},je.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Gt?je.createElement(je.Fragment,null,je.createElement("li",null,je.createElement(jt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:We},je.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),je.createElement("li",null,je.createElement(jt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:We},je.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,ce&&je.createElement("li",null,je.createElement(jt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${ce}`,onActionCallback:We},je.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),He&&je.createElement("li",null,He),je.createElement("li",{className:"btn-full-screen"},je.createElement(jt,{icon:`${Ye?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ye?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:We})))},se=bt(79346),Vt=bt(78241),he=bt(92832),Zt=bt(3113),Oe=Object.defineProperty,me=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,wn=Object.prototype.propertyIsEnumerable,Mn=(Ie,Le,Gt)=>Le in Ie?Oe(Ie,Le,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Ie[Le]=Gt,we=(Ie,Le)=>{for(var Gt in Le||(Le={}))Je.call(Le,Gt)&&Mn(Ie,Gt,Le[Gt]);if(Xe)for(var Gt of Xe(Le))wn.call(Le,Gt)&&Mn(Ie,Gt,Le[Gt]);return Ie},Yt=(Ie,Le)=>me(Ie,Ve(Le));const _e={labelCol:{span:4},wrapperCol:{span:20}};var Zn=({callback:Ie,onCancel:Le})=>{function Gt(We){Ie(We)}return wt.createElement(Vt.default,Yt(we({},_e),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Gt,style:{width:500}}),wt.createElement(Vt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},wt.createElement(he.default,null)),wt.createElement(Vt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},wt.createElement(he.default,null)),wt.createElement("div",{className:"flex-container flex-end"},wt.createElement(Zt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),wt.createElement(Zt.ZP,{type:"ghost",onClick:Le},"\u53D6\u6D88")))},Dn=bt(97692),Ne=bt(28451),pn=bt(43418),Tn=bt(95237),Yn=bt(73524),mn=bt(59301),ui=({callback:Ie,onCancel:Le})=>{const Gt=document.createElement("canvas"),We=Gt.getContext("2d");Gt.width=1e3,Gt.height=800,We.fillStyle="#ffffff",We.fillRect(0,0,Gt.width,Gt.height);const Ye=Gt.toDataURL("image/png");return mn.createElement(pn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},mn.createElement(Tn.Z,{style:{height:"100vh"}},mn.createElement(Yn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ye,visible:!0,title:String(Date.now())},onOk:ce=>{Ie({src:ce.url})},onClose:Le})))},Ce=bt(12378);function $n(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit($n,go.CommandHandler),$n.prototype.canAlignSelection=function(){var Ie=this.diagram;return!(Ie===null||Ie.isReadOnly||Ie.isModelReadOnly||Ie.selection.count<2)},$n.prototype.alignLeft=function(){var Ie=this.diagram;Ie.startTransaction("aligning left");var Le=1/0;Ie.selection.each(function(Gt){Gt instanceof go.Link||(Le=Math.min(Gt.position.x,Le))}),Ie.selection.each(function(Gt){Gt instanceof go.Link||Gt.move(new go.Point(Le,Gt.position.y))}),Ie.commitTransaction("aligning left")},$n.prototype.alignRight=function(){var Ie=this.diagram;Ie.startTransaction("aligning right");var Le=-1/0;Ie.selection.each(function(Gt){if(!(Gt instanceof go.Link)){var We=Gt.actualBounds.x+Gt.actualBounds.width;Le=Math.max(We,Le)}}),Ie.selection.each(function(Gt){Gt instanceof go.Link||Gt.move(new go.Point(Le-Gt.actualBounds.width,Gt.position.y))}),Ie.commitTransaction("aligning right")},$n.prototype.alignTop=function(){var Ie=this.diagram;Ie.startTransaction("alignTop");var Le=1/0;Ie.selection.each(function(Gt){Gt instanceof go.Link||(Le=Math.min(Gt.position.y,Le))}),Ie.selection.each(function(Gt){Gt instanceof go.Link||Gt.move(new go.Point(Gt.position.x,Le))}),Ie.commitTransaction("alignTop")},$n.prototype.alignBottom=function(){var Ie=this.diagram;Ie.startTransaction("aligning bottom");var Le=-1/0;Ie.selection.each(function(Gt){if(!(Gt instanceof go.Link)){var We=Gt.actualBounds.y+Gt.actualBounds.height;Le=Math.max(We,Le)}}),Ie.selection.each(function(Gt){Gt instanceof go.Link||Gt.move(new go.Point(Gt.actualBounds.x,Le-Gt.actualBounds.height))}),Ie.commitTransaction("aligning bottom")},$n.prototype.alignCenterX=function(){var Ie=this.diagram,Le=Ie.selection.first();if(Le){Ie.startTransaction("aligning Center X");var Gt=Le.actualBounds.x+Le.actualBounds.width/2;Ie.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(Gt-We.actualBounds.width/2,We.actualBounds.y))}),Ie.commitTransaction("aligning Center X")}},$n.prototype.alignCenterY=function(){var Ie=this.diagram,Le=Ie.selection.first();if(Le){Ie.startTransaction("aligning Center Y");var Gt=Le.actualBounds.y+Le.actualBounds.height/2;Ie.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(We.actualBounds.x,Gt-We.actualBounds.height/2))}),Ie.commitTransaction("aligning Center Y")}},$n.prototype.alignColumn=function(Ie){var Le=this.diagram;Le.startTransaction("align Column"),Ie===void 0&&(Ie=0),Ie=parseFloat(Ie);var Gt=new Array;Le.selection.each(function(He){He instanceof go.Link||Gt.push(He)});for(var We=0;We<Gt.length-1;We++){var Ye=Gt[We],ce=Ye.actualBounds.y+Ye.actualBounds.height+Ie,qt=Gt[We+1];qt.move(new go.Point(Ye.actualBounds.x,ce))}Le.commitTransaction("align Column")},$n.prototype.alignRow=function(Ie){Ie===void 0&&(Ie=0),Ie=parseFloat(Ie);var Le=this.diagram;Le.startTransaction("align Row");var Gt=new Array;Le.selection.each(function(He){He instanceof go.Link||Gt.push(He)});for(var We=0;We<Gt.length-1;We++){var Ye=Gt[We],ce=Ye.actualBounds.x+Ye.actualBounds.width+Ie,qt=Gt[We+1];qt.move(new go.Point(ce,Ye.actualBounds.y))}Le.commitTransaction("align Row")},$n.prototype.canRotate=function(Ie){var Le=this.diagram;return!(Le===null||Le.isReadOnly||Le.isModelReadOnly||Le.selection.count<1)},$n.prototype.rotate=function(Ie){Ie===void 0&&(Ie=90);var Le=this.diagram;Le.startTransaction("rotate "+Ie.toString());var Le=this.diagram;Le.selection.each(function(Gt){Gt instanceof go.Link||Gt instanceof go.Group||(Gt.angle+=Ie)}),Le.commitTransaction("rotate "+Ie.toString())},$n.prototype.pullToFront=function(){var Ie=this.diagram;Ie.startTransaction("pullToFront");var Le=new go.Map;Ie.selection.each(function(Gt){Le.set(Gt.layer,0)}),Le.iteratorKeys.each(function(Gt){var We=0;Gt.parts.each(function(Ye){if(!Ye.isSelected){var ce=Ye.zOrder;isNaN(ce)?Ye.zOrder=0:We=Math.max(We,ce)}}),Le.set(Gt,We)}),Ie.selection.each(function(Gt){$n._assignZOrder(Gt,Le.get(Gt.layer)+1)}),Ie.commitTransaction("pullToFront")},$n.prototype.pushToBack=function(){var Ie=this.diagram;Ie.startTransaction("pushToBack");var Le=new go.Map;Ie.selection.each(function(Gt){Le.set(Gt.layer,0)}),Le.iteratorKeys.each(function(Gt){var We=0;Gt.parts.each(function(Ye){if(!Ye.isSelected){var ce=Ye.zOrder;isNaN(ce)?Ye.zOrder=0:We=Math.min(We,ce)}}),Le.set(Gt,We)}),Ie.selection.each(function(Gt){$n._assignZOrder(Gt,Le.get(Gt.layer)-1-$n._findGroupDepth(Gt))}),Ie.commitTransaction("pushToBack")},$n._assignZOrder=function(Ie,Le,Gt){Gt===void 0&&(Gt=Ie),Ie.layer===Gt.layer&&(Ie.zOrder=Le),Ie instanceof go.Group&&Ie.memberParts.each(function(We){$n._assignZOrder(We,Le+1,Gt)})},$n._findGroupDepth=function(Ie){if(Ie instanceof go.Group){var Le=0;return Ie.memberParts.each(function(Gt){Le=Math.max(Le,$n._findGroupDepth(Gt))}),Le+1}else return 0},$n.prototype.doKeyDown=function(){var Ie=this.diagram;if(Ie!==null){var Le=Ie.lastInput;if(Le.key==="Up"||Le.key==="Down"||Le.key==="Left"||Le.key==="Right"){var Gt=this.arrowKeyBehavior;if(Gt==="none")return;if(Gt==="select"){this._arrowKeySelect();return}else if(Gt==="move"){this._arrowKeyMove();return}else if(Gt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},$n.prototype._getAllParts=function(){var Ie=new Array;return this.diagram.nodes.each(function(Le){Ie.push(Le)}),this.diagram.parts.each(function(Le){Ie.push(Le)}),Ie},$n.prototype._arrowKeyMove=function(){var Ie=this.diagram,Le=Ie.lastInput,Gt=0,We=0;if(Le.control||Le.meta)Gt=1,We=1;else if(Ie.grid!==null){var Ye=Ie.grid.gridCellSize;We=Ye.width,Gt=Ye.height}Ie.startTransaction("arrowKeyMove"),Ie.selection.each(function(ce){Le.key==="Up"?ce.move(new go.Point(ce.actualBounds.x,ce.actualBounds.y-Gt)):Le.key==="Down"?ce.move(new go.Point(ce.actualBounds.x,ce.actualBounds.y+Gt)):Le.key==="Left"?ce.move(new go.Point(ce.actualBounds.x-We,ce.actualBounds.y)):Le.key==="Right"&&ce.move(new go.Point(ce.actualBounds.x+We,ce.actualBounds.y))}),Ie.commitTransaction("arrowKeyMove")},$n.prototype._arrowKeySelect=function(){var Ie=this.diagram,Le=Ie.lastInput,Gt=null;Le.key==="Up"?Gt=this._findNearestPartTowards(270):Le.key==="Down"?Gt=this._findNearestPartTowards(90):Le.key==="Left"?Gt=this._findNearestPartTowards(180):Le.key==="Right"&&(Gt=this._findNearestPartTowards(0)),Gt!==null&&(Le.shift?Gt.isSelected=!0:Le.control||Le.meta?Gt.isSelected=!Gt.isSelected:Ie.select(Gt))},$n.prototype._findNearestPartTowards=function(Ie){var Le=this.diagram.selection.first();if(Le===null)return null;for(var Gt=Le.actualBounds.center,We=this._getAllParts(),Ye=1/0,ce=Le,qt=0;qt<We.length;qt++){var He=We[qt];if(He!==Le&&He.canSelect()){var un=He.actualBounds.center,An=Gt.directionPoint(un),Fn=this._angleCloseness(An,Ie);if(Fn<=45){var oe=Gt.distanceSquaredPoint(un);oe*=1+Math.sin(Fn*Math.PI/180),oe<Ye&&(Ye=oe,ce=He)}}}return ce},$n.prototype._angleCloseness=function(Ie,Le){return Math.min(Math.abs(Le-Ie),Math.min(Math.abs(Le+360-Ie),Math.abs(Le-360-Ie)))},$n.prototype._arrowKeyTree=function(){var Ie=this.diagram,Le=Ie.selection.first();if(Le instanceof go.Node){var Gt=Ie.lastInput;if(Gt.key==="Right"){if(!Le.isTreeLeaf)if(!Le.isTreeExpanded)Ie.commandHandler.canExpandTree(Le)&&Ie.commandHandler.expandTree(Le);else{var We=this._sortTreeChildrenByY(Le).first();We!==null&&Ie.select(We)}}else if(Gt.key==="Left")if(!Le.isTreeLeaf&&Le.isTreeExpanded)Ie.commandHandler.canCollapseTree(Le)&&Ie.commandHandler.collapseTree(Le);else{var Ye=Le.findTreeParentNode();Ye!==null&&Ie.select(Ye)}else if(Gt.key==="Up"){var Ye=Le.findTreeParentNode();if(Ye!==null){var ce=this._sortTreeChildrenByY(Ye),qt=ce.indexOf(Le);if(qt>0){for(var He=ce.elt(qt-1);He!==null&&He.isTreeExpanded&&!He.isTreeLeaf;){var un=this._sortTreeChildrenByY(He);He=un.last()}He!==null&&Ie.select(He)}else Ie.select(Ye)}}else if(Gt.key==="Down")if(Le.isTreeExpanded&&!Le.isTreeLeaf){var We=this._sortTreeChildrenByY(Le).first();We!==null&&Ie.select(We)}else for(;Le!==null;){var Ye=Le.findTreeParentNode();if(Ye===null)break;var ce=this._sortTreeChildrenByY(Ye),qt=ce.indexOf(Le);if(qt<ce.length-1){Ie.select(ce.elt(qt+1));break}else Le=Ye}var An=Ie.selection.first();An!==null&&Ie.scrollToRect(An.actualBounds)}},$n.prototype._sortTreeChildrenByY=function(Ie){var Le=new go.List().addAll(Ie.findTreeChildrenNodes());return Le.sort(function(Gt,We){var Ye=Gt.location,ce=We.location;return Ye.y<ce.y?-1:Ye.y>ce.y?1:Ye.x<ce.x?-1:Ye.x>ce.x?1:0}),Le},$n.prototype.copyToClipboard=function(Ie){go.CommandHandler.prototype.copyToClipboard.call(this,Ie),this._lastPasteOffset.set(this.pasteOffset)},$n.prototype.pasteFromClipboard=function(){var Ie=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ie,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ie},Object.defineProperty($n.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ie){if(Ie!=="move"&&Ie!=="select"&&Ie!=="scroll"&&Ie!=="tree"&&Ie!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ie);this._arrowKeyBehavior=Ie}}),Object.defineProperty($n.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ie){if(!(Ie instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ie);this._pasteOffset.set(Ie)}});var Pi=$n,Ot=bt(74413),Lt=bt(43604),St=bt(99064),It={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Kt=bt(24065),xt=bt(59301),Me=(Ie,Le,Gt)=>new Promise((We,Ye)=>{var ce=un=>{try{He(Gt.next(un))}catch(An){Ye(An)}},qt=un=>{try{He(Gt.throw(un))}catch(An){Ye(An)}},He=un=>un.done?We(un.value):Promise.resolve(un.value).then(ce,qt);He((Gt=Gt.apply(Ie,Le)).next())});function De({onCancel:Ie,callback:Le}){let Gt=(0,wt.useRef)(),We=(0,wt.useRef)(),Ye=(0,wt.useRef)(),ce=(0,wt.useRef)(!1);const qt=(0,wt.useRef)(!1),[He,un]=(0,wt.useState)(0);function An(){const oe=Ce.bx.make,qe={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"};Gt.current=new Ce.S0(We.current,{padding:20,grid:oe(Ce.s_,"Grid",oe(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),oe(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:jn=>{var qn=jn.diagram.commandHandler.addTopLevelParts(jn.diagram.selection,!0);qn||jn.diagram.currentTool.doCancel()},commandHandler:oe(Pi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:jn=>{var qn=jn.subject;qn.location=qn.location.copy().snapToGridPoint(jn.diagram.grid.gridOrigin,jn.diagram.grid.gridCellSize),setTimeout(()=>{jn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:jn=>{var qn=jn.subject;setTimeout(()=>{jn.diagram.commandHandler.editTextBlock()})},LinkRelinked:jn=>{var qn=jn.parameter.part;qn.invalidateConnectedLinks();var Mi=jn.subject;jn.diagram.toolManager.linkingTool.isForwards?Mi.toNode.invalidateConnectedLinks():Mi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Gt.current.nodeTemplate=oe(Ce.NB,"Auto",{locationSpot:Ce.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ce.$u(120,60),minSize:new Ce.$u(40,40),resizable:!0,resizeCellSize:new Ce.$u(10,10),rotatable:!0},new Ce.KX("location","loc",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),new Ce.KX("desiredSize","size",Ce.$u.parse).makeTwoWay(Ce.$u.stringify),oe(Ce.bn,{name:"SHAPE",fill:qe.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ce.z6.AllSides,toSpot:Ce.z6.AllSides},new Ce.KX("figure"),new Ce.KX("fill"),new Ce.KX("stroke","borderColor"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),oe(Ce.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),oe(Ce.al,{margin:1,textAlign:"center",overflow:Ce.al.OverflowEllipsis,editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),Gt.current.nodeTemplate.toolTip=oe("ToolTip",oe(Ce.s_,"Vertical",{maxSize:new Ce.$u(200,NaN)},oe(Ce.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ce.KX("text")),oe(Ce.al,{font:"10pt sans-serif",textAlign:"center"},new Ce.KX("text","details"))));function bn(jn,qn){var Mi=(vi,pi)=>{vi.handled=!0,vi.diagram.model.commit(Ui=>{var ki=pi.part.adornedPart,zi=new Ce.E9().setRectSpot(ki.actualBounds,jn);zi.subtract(ki.location),zi.scale(2,2),zi.x+=Math.sign(zi.x)*130,zi.y+=Math.sign(zi.y)*130,zi.add(ki.location),zi.snapToGridPoint(vi.diagram.grid.gridOrigin,vi.diagram.grid.gridCellSize);var uo=Ui.copyNodeData(ki.data);Ui.setGroupKeyForNodeData(uo,Ui.getGroupKeyForNodeData(ki.data)),Ui.addNodeData(uo);var cn={from:ki.key,to:Ui.getKeyForNodeData(uo)};Ui.addLinkData(cn);var Xo=vi.diagram.findNodeForData(uo);Xo.location=zi,vi.diagram.select(Xo),setTimeout(()=>{vi.diagram.commandHandler.editTextBlock()},20)})};return oe(Ce.bn,{figure:qn,alignment:jn,alignmentFocus:jn.opposite(),width:jn.equals(Ce.z6.Top)||jn.equals(Ce.z6.Bottom)?25:18,height:jn.equals(Ce.z6.Top)||jn.equals(Ce.z6.Bottom)?18:25,fill:"orange",stroke:qe.white,strokeWidth:4,mouseEnter:(vi,pi)=>pi.fill="dodgerblue",mouseLeave:(vi,pi)=>pi.fill="orange",isActionable:!0,click:Mi,contextClick:Mi})}function Jn(jn){return oe(Ce.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:(qn,Mi)=>Mi.fill="dodgerblue",mouseLeave:(qn,Mi)=>Mi.fill="orange",click:(qn,Mi)=>{qn.diagram.commandHandler.showContextMenu(Mi.part.adornedPart)}},jn||{})}Gt.current.nodeTemplate.selectionAdornmentTemplate=oe(Ce.uz,"Spot",oe(Ce.Vm,{padding:10}),bn(Ce.z6.Top,"TriangleUp"),bn(Ce.z6.Left,"TriangleLeft"),bn(Ce.z6.Right,"TriangleRight"),bn(Ce.z6.Bottom,"TriangleDown"),Jn({alignment:new Ce.z6(.75,0)}));function Ke(jn,qn){return(Mi,vi)=>{Mi.handled=!0,Mi.diagram.model.commit(pi=>{pi.set(vi.part.adornedPart.data,jn,qn)})}}function Qe(jn,qn){return qn||(qn="color"),oe(Ce.bn,{width:16,height:16,stroke:"lightgray",fill:jn,margin:1,background:"transparent",mouseEnter:(Mi,vi)=>vi.stroke="dodgerblue",mouseLeave:(Mi,vi)=>vi.stroke="lightgray",click:Ke(qn,jn),contextClick:Ke(qn,jn)})}function zn(){return[oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Qe(qe.white,"fill"),Qe(qe.beige,"fill"),Qe(qe.extralightblue,"fill"),Qe(qe.extralightred,"fill"))),oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Qe(qe.lightgray,"fill"),Qe(qe.lightgreen,"fill"),Qe(qe.lightblue,"fill"),Qe(qe.lightred,"fill")))]}function Wn(){return[oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Qe(qe.black),Qe(qe.green),Qe(qe.blue),Qe(qe.red))),oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Qe(qe.white),Qe(qe.magenta),Qe(qe.purple),Qe(qe.orange)))]}function fi(jn,qn){return qn||(qn="thickness"),oe(Ce.bn,"LineH",{width:16,height:16,strokeWidth:jn,margin:1,background:"transparent",mouseEnter:(Mi,vi)=>vi.background="dodgerblue",mouseLeave:(Mi,vi)=>vi.background="transparent",click:Ke(qn,jn),contextClick:Ke(qn,jn)})}function Hn(jn,qn){return qn||(qn="dash"),oe(Ce.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:jn,margin:1,background:"transparent",mouseEnter:(Mi,vi)=>vi.background="dodgerblue",mouseLeave:(Mi,vi)=>vi.background="transparent",click:Ke(qn,jn),contextClick:Ke(qn,jn)})}function _n(){return[oe("ContextMenuButton",oe(Ce.s_,"Horizontal",fi(1),fi(2),fi(3),fi(4))),oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Hn(null),Hn([2,4]),Hn([4,4])))]}function Vn(jn,qn){return qn||(qn="figure"),oe(Ce.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:jn,margin:1,background:"transparent",mouseEnter:(Mi,vi)=>vi.fill="dodgerblue",mouseLeave:(Mi,vi)=>vi.fill="lightgray",click:Ke(qn,jn),contextClick:Ke(qn,jn)})}Gt.current.nodeTemplate.contextMenu=oe("ContextMenu",oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Vn("Rectangle"),Vn("RoundedRectangle"),Vn("Ellipse"),Vn("Diamond"))),oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Vn("Parallelogram2"),Vn("ManualOperation"),Vn("Procedure"),Vn("Cylinder1"))),oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Vn("Terminator"),Vn("CreateRequest"),Vn("Document"),Vn("TriangleDown"))),zn(),Wn(),_n()),Gt.current.groupTemplate=oe(Ce.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ce.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(jn,qn)=>{var Mi=qn.addMembers(qn.diagram.selection,!0);Mi||qn.diagram.currentTool.doCancel()},avoidable:!1},new Ce.KX("location","loc",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),oe(Ce.s_,"Auto",{name:"BODY"},oe(Ce.bn,{parameter1:10,fill:qe.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ce.z6.AllSides,toSpot:Ce.z6.AllSides},new Ce.KX("fill"),new Ce.KX("stroke","color"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),oe(Ce.Vm,{background:"transparent",margin:20})),oe(Ce.al,{alignment:Ce.z6.Top,alignmentFocus:Ce.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ce.KX("text"),new Ce.KX("stroke","color"))),Gt.current.groupTemplate.selectionAdornmentTemplate=oe(Ce.uz,"Spot",oe(Ce.s_,"Auto",oe(Ce.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),oe(Ce.Vm,{margin:1.5})),Jn({alignment:Ce.z6.TopRight,alignmentFocus:Ce.z6.BottomRight})),Gt.current.groupTemplate.contextMenu=oe("ContextMenu",zn(),Wn(),_n()),Gt.current.linkTemplate=oe(Ce.rU,{layerName:"Foreground",routing:Ce.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ce.KX("fromSpot","fromSpot",Ce.z6.parse),new Ce.KX("toSpot","toSpot",Ce.z6.parse),new Ce.KX("fromShortLength","dir",jn=>jn>=1?10:0),new Ce.KX("toShortLength","dir",jn=>jn>=1?10:0),new Ce.KX("points").makeTwoWay(),oe(Ce.bn,{strokeWidth:2},new Ce.KX("stroke","color"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),oe(Ce.bn,{segmentIndex:0,segmentOffset:new Ce.E9(15,0),segmentOrientation:Ce.rU.OrientAlong,alignmentFocus:Ce.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",jn=>jn===1)),oe(Ce.bn,{segmentIndex:-1,segmentOffset:new Ce.E9(-10,6),segmentOrientation:Ce.rU.OrientPlus90,alignmentFocus:Ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",jn=>jn>=1),new Ce.KX("width","thickness",jn=>7+3*jn),new Ce.KX("height","thickness",jn=>7+3*jn),new Ce.KX("segmentOffset","thickness",jn=>new Ce.E9(-15,4+1.5*jn))),oe(Ce.bn,{segmentIndex:0,segmentOffset:new Ce.E9(15,-6),segmentOrientation:Ce.rU.OrientMinus90,alignmentFocus:Ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",jn=>jn===2),new Ce.KX("width","thickness",jn=>7+3*jn),new Ce.KX("height","thickness",jn=>7+3*jn),new Ce.KX("segmentOffset","thickness",jn=>new Ce.E9(-15,4+1.5*jn))),oe(Ce.al,{alignmentFocus:new Ce.z6(0,1,-4,0),editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),Gt.current.linkTemplate.selectionAdornmentTemplate=oe(Ce.uz,oe(Ce.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:wi(2)},new Ce.KX("pathPattern","thickness",wi)),Jn({alignmentFocus:new Ce.z6(0,0,-6,-4)}));function wi(jn){return oe(Ce.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(jn+4).toString()+" H3"})}function Qi(jn){var qn="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return jn===0?qn="M0 0 M16 16 M0 8 L16 8":jn===2&&(qn="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),oe(Ce.bn,{geometryString:qn,margin:2,background:"transparent",mouseEnter:(Mi,vi)=>vi.background="dodgerblue",mouseLeave:(Mi,vi)=>vi.background="transparent",click:Ke("dir",jn),contextClick:Ke("dir",jn)})}function qi(jn){var qn=(Mi,vi)=>{Mi.handled=!0,Mi.diagram.model.commit(pi=>{var Ui=vi.part.adornedPart;pi.set(Ui.data,jn?"toSpot":"fromSpot",Ce.z6.stringify(Ce.z6.AllSides)),(jn?Ui.toNode:Ui.fromNode).invalidateConnectedLinks()})};return oe(Ce.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Mi,vi)=>vi.background="dodgerblue",mouseLeave:(Mi,vi)=>vi.background="transparent",click:qn,contextClick:qn})}function $e(jn,qn){var Mi=0,vi=Ce.z6.RightSide;jn.equals(Ce.z6.Top)?(Mi=270,vi=Ce.z6.TopSide):jn.equals(Ce.z6.Left)?(Mi=180,vi=Ce.z6.LeftSide):jn.equals(Ce.z6.Bottom)&&(Mi=90,vi=Ce.z6.BottomSide),qn||(Mi-=180);var pi=(Ui,ki)=>{Ui.handled=!0,Ui.diagram.model.commit(zi=>{var uo=ki.part.adornedPart;zi.set(uo.data,qn?"toSpot":"fromSpot",Ce.z6.stringify(vi)),(qn?uo.toNode:uo.fromNode).invalidateConnectedLinks()})};return oe(Ce.bn,{alignment:jn,alignmentFocus:jn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Mi,background:"transparent",mouseEnter:(Ui,ki)=>ki.background="dodgerblue",mouseLeave:(Ui,ki)=>ki.background="transparent",click:pi,contextClick:pi})}Gt.current.linkTemplate.contextMenu=oe("ContextMenu",Wn(),_n(),oe("ContextMenuButton",oe(Ce.s_,"Horizontal",Qi(0),Qi(1),Qi(2))),oe("ContextMenuButton",oe(Ce.s_,"Horizontal",oe(Ce.s_,"Spot",qi(!1),$e(Ce.z6.Top,!1),$e(Ce.z6.Left,!1),$e(Ce.z6.Right,!1),$e(Ce.z6.Bottom,!1)),oe(Ce.s_,"Spot",{margin:new Ce.Zt(0,0,0,2)},qi(!0),$e(Ce.z6.Top,!0),$e(Ce.z6.Left,!0),$e(Ce.z6.Right,!0),$e(Ce.z6.Bottom,!0)))));const lo=`{ "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 Co=["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 jo(jn){return console.log("shapeName:",jn),Co.indexOf(jn)>=0}var Ue=new Ce.YI(Ye.current,{maxSelectionCount:1,linkTemplate:oe(Ce.rU,{locationSpot:Ce.z6.Center,selectionAdornmentTemplate:oe(Ce.uz,"Link",{locationSpot:Ce.z6.Center},oe(Ce.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),oe(Ce.bn,{toArrow:"Standard",stroke:null}))},{routing:Ce.rU.AvoidsNodes,curve:Ce.rU.JumpOver,corner:5,toShortLength:4},new Ce.KX("points"),oe(Ce.bn,{isPanelMain:!0,strokeWidth:2}),oe(Ce.bn,{toArrow:"Standard",stroke:null})),model:new Ce.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ce.bn.getFigureGenerators().toArray().map(jn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:jn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Gt.current.addDiagramListener("TextEdited",function(jn){var qn;const Mi=jn.subject.part;var vi=(qn=document.activeElement)==null?void 0:qn.value;typeof vi=="string"&&vi.trim()===""&&Gt.current.model.commit(function(pi){pi.set(Mi.data,"text","\u672A\u547D\u540D"),Gt.current.commandHandler.stopCommand()},"increment")}),Ue.nodeTemplate=oe(Ce.NB,"Auto",{locationSpot:Ce.z6.Center},new Ce.KX("location","location",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),oe(Ce.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 Ce.KX("stroke").makeTwoWay(),new Ce.KX("fill").makeTwoWay(),new Ce.KX("figure")),oe(Ce.al,{margin:new Ce.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ce.$u(16,16),maxSize:new Ce.$u(10,NaN),textAlign:"center",editable:!0},new Ce.KX("key").makeTwoWay())),setTimeout(()=>{Gt.current.grid=oe(Ce.s_,"Grid",oe(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),oe(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Gt.current.grid.visible=!0,Gt.current.grid.gridCellStroke="darkgray",Gt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Gt.current,Gt.current}const Fn=()=>Me(this,null,function*(){var oe,qe=Gt.current.makeImage();const bn=yield(0,St.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:qe.src,file_data:JSON.stringify({login:(oe=(0,Kt.eY)())==null?void 0:oe.login,data:JSON.parse(Gt.current.model.toJson())})}});Le({src:bn.url})});return(0,wt.useEffect)(()=>(setTimeout(()=>{An()},500),un(He+1),()=>{Gt.current=null}),[]),xt.createElement("div",{ref:qt,className:ce.current?`${It.maxH60} body-overflow-initial`:"body-overflow-initial"},xt.createElement(pn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!He,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:xt.createElement(Tn.Z,null,xt.createElement(Lt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),xt.createElement(Lt.Z,{onClick:()=>{var oe,qe,bn=Gt.current.selection.first();if(ce.current=!ce.current,document.activeElement&&bn){let Jn=(qe=(oe=document.activeElement)==null?void 0:oe.value)==null?void 0:qe.trim();typeof Jn=="string"&&Gt.current.model.commit(function(Ke){Ke.set(bn.data,"text",Jn||"\u672A\u547D\u540D"),Gt.current.commandHandler.stopCommand()},"increment")}un(He+1)}},xt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ie},xt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:It.flowChartWrp},xt.createElement("div",{style:{display:"flex",height:"100%"}},xt.createElement("div",{style:{width:"300px",height:"100%"}},xt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),xt.createElement("div",{style:{height:"calc(100% - 50px)"},className:It.myPaletteDiv,ref:Ye})),xt.createElement("div",{style:{flex:1,position:"relative"}},xt.createElement("div",{ref:We,style:{height:"80vh"}}))),xt.createElement("div",{className:"tr"},xt.createElement(Zt.ZP,{size:"large",onClick:Fn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var le=De,ee=bt(5112),Se=bt(5871);const xe=ee.ZP.Group,ue={margin:"0 8px"};var Te=({callback:Ie,onCancel:Le})=>{function Gt(We){Ie(We)}return wt.createElement(Vt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Gt},wt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},wt.createElement("span",{style:ue},"\u5355\u5143\u683C\u6570\uFF1A"),wt.createElement("span",{style:ue},"\u884C\u6570"),wt.createElement(Vt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},wt.createElement(Se.Z,null)),wt.createElement("span",{style:ue},"\u5217\u6570"),wt.createElement(Vt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},wt.createElement(Se.Z,null))),wt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},wt.createElement("span",{style:ue},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),wt.createElement(Vt.default.Item,{name:"align"},wt.createElement(xe,null,wt.createElement(ee.ZP,{value:"default"},wt.createElement("i",{className:"fa fa-align-justify"})),wt.createElement(ee.ZP,{value:"left"},wt.createElement("i",{className:"fa fa-align-left"})),wt.createElement(ee.ZP,{value:"center"},wt.createElement("i",{className:"fa fa-align-center"})),wt.createElement(ee.ZP,{value:"right"},wt.createElement("i",{className:"fa fa-align-right"}))))),wt.createElement("div",{className:"flex-container flex-end"},wt.createElement(Zt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),wt.createElement(Zt.ZP,{type:"ghost",onClick:Le},"\u53D6\u6D88")))},vn=bt(78673),fn=bt(80727),en=bt.n(fn),ln=(0,wt.forwardRef)(({use3d:Ie,width:Le,height:Gt,callback:We,showSaveButton:Ye},ce)=>{const qt=(0,wt.useRef)(),He=(0,wt.useRef)(),[un,An]=(0,wt.useState)(!1),Fn=(0,wt.useRef)({id:qt,appName:"graphing",width:Le||1e3,height:Gt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,wt.useEffect)(()=>{He.current=new(en())(Fn.current,!0),window.onload=function(){He.current.inject("applet_container")}},[]);const oe=()=>{var qe=window.ggbApplet.getPNGBase64(1,!0,72);return We&&We(qe),qe};return(0,wt.useEffect)(()=>{Fn.current.appName=un?"3D":"graphing",He.current.inject("applet_container")},[un]),(0,wt.useEffect)(()=>{An(Ie)},[Ie]),(0,wt.useImperativeHandle)(ce,()=>({getImgData:oe})),wt.createElement(wt.Fragment,null,wt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:qt}),wt.createElement(Tn.Z,{align:"middle"},wt.createElement(Lt.Z,{flex:1},wt.createElement(vn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:un,onChange:qe=>An(qe)})),wt.createElement(Lt.Z,null,wt.createElement(Zt.ZP,{size:"large",onClick:oe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),tn=bt(41588),ii=bt(8591);const ri="link",Un="upload-image",si="add-flowchart",mi="draw-image",Hi="add-flowchart",Xi="code-block",Lo="add-table",Oo="------------",No={default:Oo,left:`:${Oo}`,center:`:${Oo}:`,right:`${Oo}:`};var Io=bt(58856);function _o(){}let qo=0;const Ni=1e4,$o="\u2581",Ro="@\u2581\u2581@",Mt="@\u2581@",cr=`
|
|
|
**\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`,ir=["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 pr(Ie){return/^\d+$/.test(Ie)?`${Ie}px`:Ie}const rs=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ls={[rs+"-B"]:"bold",[rs+"-I"]:"italic"},Ci={[ri]:"\u6DFB\u52A0\u94FE\u63A5",[Xi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Un]:"\u6DFB\u52A0\u56FE\u7247",[mi]:"\u6DFB\u52A0\u753B\u56FE",[si]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Lo]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var oi=({defaultValue:Ie="",onChange:Le,width:Gt="100%",height:We=400,miniToolbar:Ye=!1,isFocus:ce=!1,watch:qt,insertTemp:He,mode:un="markdown",id:An="markdown-editor-id",showResizeBar:Fn=!1,noStorage:oe=!1,showNullButton:qe=!1,showNullProgramButton:bn=!1,hidetoolBar:Jn=!1,fullScreen:Ke=!1,onBlur:Qe,onCMBeforeChange:zn,onFullScreen:Wn,className:fi="",disablePaste:Hn=!1,disabled:_n=!1,disabledFill:Vn=!1,placeholder:wi="",values:Qi="",extraUse:qi})=>{const[$e,lo]=(0,wt.useState)(null),[Co,jo]=(0,wt.useState)(Ie),[Ue,jn]=(0,wt.useState)(qt),[qn,Mi]=(0,wt.useState)(Ke),[vi,pi]=(0,wt.useState)(""),[Ui,ki]=(0,wt.useState)(0),[zi,uo]=(0,wt.useState)(We),[cn,Xo]=(0,wt.useState)(!1),[sn,ho]=(0,wt.useState)(0),[Er,zo]=(0,wt.useState)(0),Fr=(0,wt.useRef)(),mr=(0,wt.useRef)(),Di=(0,wt.useRef)(),Li=(0,wt.useRef)();(0,wt.useEffect)(()=>{const Ji=window.scrollY||window.pageYOffset;jo(Qi),$e==null||$e.setValue(Qi),window.scrollTo(0,Ji)},[Qi]),(0,wt.useEffect)(()=>{Wn==null||Wn(qn)},[qn]),(0,wt.useEffect)(()=>{if(Fr.current){let Ji=function(kn,Ki){var Jo;if(Hn){Ki.preventDefault();return}const jr=Ki.clipboardData;if(jr){const Ir=jr.types.toString(),Ur=jr.items;if(Ir==="Files"||jr.types.indexOf("Files")>-1){if(Ki.preventDefault(),un=="stex")return;try{let hs=Ur[1];((Jo=Ur[0])==null?void 0:Jo.kind)==="file"&&(hs=Ur[0]);const ns=hs.getAsFile(),sa=ns.name.split(".").pop();(0,Ne.I)(ns,Ys=>{var ga,Ze,vs;Ys.id?((ga=ns==null?void 0:ns.type)==null?void 0:ga.indexOf("image"))>-1?Ti.replaceSelection(`<img width="100%" src="/api/attachments/${Ys.id}?type=${Ys.content_type})" alt="" />`):((Ze=ns==null?void 0:ns.type)==null?void 0:Ze.indexOf("video"))>-1?Ti.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ys.id}"></video>`):((vs=ns==null?void 0:ns.type)==null?void 0:vs.indexOf("pdf"))>-1?Ti.replaceSelection(`<a href="/api/attachments/${Ys.id}?type=${ns.type}&disposition=inline" target="_blank">${ns.name}</a>`):ir.includes(sa)?Ti.replaceSelection(`<a href="/api/attachments/${Ys.id}?type=office&disposition=inline" target="_blank">${ns.name}</a>`):Ti.replaceSelection(`[${ns.name}](/api/attachments/${Ys.id}?type=${Ys.content_type})`):(Ys==null?void 0:Ys.status)===401&&(document.location.href="/user/login")})}catch(hs){ii.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ti=de().fromTextArea(Fr.current,{mode:un,lineNumbers:!Ye,lineWrapping:!0,value:Ie,autoCloseTags:!0,autoCloseBrackets:!0});return Ti.on("keyup",function(kn,Ki){Ki.keyCode===8&&(kn.getValue()==""?Ti.setOption("placeholder",wi):Ti.setOption("placeholder",null))}),Ti.on("keydown",function(kn,Ki){if(Ki.keyCode===8){var Jo=bo(kn);Jo&&Ki.preventDefault()}}),ce&&Ti.focus(),Ti.on("paste",Ji),_n&&Ti.on("beforeChange",function(kn,Ki){(Ki.origin==="paste"||Ki.origin==="+input")&&Ki.cancel()}),lo(Ti),()=>{Ti.off("paste",Ji)}}},[]);const yo=(0,wt.useCallback)(()=>{if(mr.current)try{}catch(Ji){console.log(Ji,"---- to set md editor body height")}},[zi,mr,qn]);(0,wt.useEffect)(()=>{function Ji(){let Ti=new Re.Z(kn=>{for(let Ki of kn)(Ki.target.offsetHeight>0||Ki.target.offsetWidth>0)&&(yo(),$e.setSize("100%","100%"),$e.refresh())});return Ti.observe(Fr.current.parentElement),Ti}if($e){const Ti=Ji();return()=>{var kn,Ki;(kn=Fr.current)!=null&&kn.parentElement&&Ti.unobserve((Ki=Fr.current)==null?void 0:Ki.parentElement)}}},[$e,yo]),(0,wt.useEffect)(()=>{if($e){let Ji=[];for(const[Ti,kn]of Object.entries(ls)){let Ki={[Ti]:()=>{Xn(kn)}};Ji.push(Ki),$e.addKeyMap(Ki)}return()=>{for(let Ti of Ji)$e.removeKeyMap(Ti)}}},[$e]),(0,wt.useEffect)(()=>{Ke!==qn&&Mi(Ke)},[Ke]),(0,Io.Z)(()=>{if(!oe&&Ui>0){let Ji=new Date().getTime(),Ti=window.sessionStorage.getItem(An);Ji>=Ui+Ni&&(!Ti||Ti!==Co)&&(window.sessionStorage.setItem(An,Co),Xo(!0))}},Ni),(0,wt.useEffect)(()=>{jn(qt)},[$e,qt]),(0,wt.useEffect)(()=>{$e&&ce&&$e.focus()},[$e,ce]),(0,wt.useEffect)(()=>{if(Ue&&$e){let Ji=function(kn){let Ki=kn.target;if(Li.current){let Jo=Ki.scrollTop/Ki.scrollHeight;Li.current.scrollTop=Li.current.scrollHeight*Jo}};const Ti=$e.getScrollerElement();return Ti.addEventListener("scroll",Ji),()=>{Ti.removeEventListener("scroll",Ji)}}},[$e,Ue]),(0,wt.useEffect)(()=>{if($e&&zn){let Ji=function(Ti,kn){zn(Ti,kn)};return $e.on("beforeChange",Ji),()=>{$e.off("beforeChange",Ji)}}},[$e,zn]),(0,wt.useEffect)(()=>{if($e&&Qe){let Ji=function(){Qe($e.getValue())};return $e.on("blur",Ji),()=>{$e.off("blur",Ji)}}},[$e,Qe]);function bo(Ji,Ti){var kn=Ji.getDoc(),Ki=kn.getCursor(),Jo=kn.getLine(Ki.line),jr=Jo.charAt(Ki.ch-1),Ir=Jo.lastIndexOf("@\u2581@",Ki.ch),Ur=Jo.lastIndexOf("@\u2581\u2581@",Ki.ch),hs=Ir>Ur?Ir:Ur,ns=Ir>Ur?3:4;if(Ro.indexOf(jr)===-1)return null;if(console.log("change1:",Ti,Ji,Jo,Ki,hs,Ir,Ur,jr),hs>=0&&Ki.ch-hs<5){var sa=hs+ns;return kn.replaceRange("",{line:Ki.line,ch:hs},{line:Ki.line,ch:sa}),{line:Ki.line,ch:sa}}return null}(0,wt.useEffect)(()=>{if($e){let Ji=function(Ti,kn){const Ki=Ti.getValue();jo(Ki),ki(new Date().getTime()),Ti.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Le&&(bn?Le(Ki,$i(Ki)):Le(Ki))};return $e.on("change",Ji),()=>{$e.off("change",Ji)}}},[$e,Le]),(0,wt.useEffect)(()=>{if($e)if(Ie==null)$e.setValue(""),jo("");else{const Ji=window.scrollY||window.pageYOffset;Ie!==$e.getValue()&&($e.setValue(Ie),jo(Ie),$e.setCursor(_n?1:$e.lineCount(),0),window.scrollTo(0,Ji))}},[$e,Ie]);const Xn=(0,wt.useCallback)(Ji=>{const Ti=$e.getCursor(),kn=$e.getSelection();let Ki=kn.split(`
|
|
|
`);switch(Ji){case"bold":return $e.replaceSelection("**"+kn+"**"),kn===""&&$e.setCursor(Ti.line,Ti.ch+2),$e.focus();case"italic":return $e.replaceSelection("*"+kn+"*"),kn===""&&$e.setCursor(Ti.line,Ti.ch+1),$e.focus();case"code":return $e.replaceSelection("`"+kn+"`"),kn===""&&$e.setCursor(Ti.line,Ti.ch+1),$e.focus();case"inline-latex":return pi("inline-latex"),$e.focus();case"latex":return $e.replaceSelection("```latex\n"+kn+"\n```"),$e.setCursor(Ti.line+1,kn.length+1),$e.focus();case"line-break":return $e.replaceSelection(`<br/>
|
|
|
`),$e.focus();case"list-ul":return kn===""?$e.replaceSelection("- "+kn):$e.replaceSelection(Ki.map(Jo=>Jo===""?"":`- ${Jo}`).join(`
|
|
|
`)),$e.focus();case"list-ol":return kn===""?$e.replaceSelection("1. "+kn):$e.replaceSelection(Ki.map((Jo,jr)=>Jo===""?"":`${jr+1}. ${Jo}`).join(`
|
|
|
`)),$e.focus();case"add-null-ch":return kn===""&&$e.setCursor(Ti.line,Ti.ch),$e.replaceSelection($o),$e.focus();case"add-signal":return kn===""&&$e.setCursor(Ti.line,Ti.ch),$e.replaceSelection(Mt),$e.focus();case"add-multiple":return kn===""&&$e.setCursor(Ti.line,Ti.ch),$e.replaceSelection(Ro),$e.focus();case"inster-template-1":return kn===""&&$e.setCursor(Ti.line,Ti.ch),$e.replaceSelection(cr),$e.focus();case"eraser":return $e.setValue(""),$e.focus();case"trigger-watch":return jn(!Ue),$e.focus();case"trigger-full-screen":return Mi(!qn),$e.focus();case ri:pi(ri);return;case Xi:pi(Xi);return;case Un:pi(Un);return;case mi:pi(mi);return;case"maths-latex":pi("maths-latex");return;case si:pi(si);return;case Lo:pi(Lo);return;default:throw new Error}},[$e,Ue,qn]),Rt=(0,wt.useCallback)((Ji,Ti)=>{var kn,Ki,Jo,jr,Ir,Ur;switch(pi(""),vi){case ri:const{title:ga,link:Ze}=Ji;return $e.replaceSelection(`[${ga}](${Ze})`),$e.focus();case Xi:const{language:vs,content:mu}=Ji;return $e.replaceSelection(["```"+vs,mu,"```"].join(`
|
|
|
`)),$e.focus();case"maths-latex":for(var hs=atob(Ji),ns=new Uint8Array(hs.length),sa=0;sa<hs.length;sa++)ns[sa]=hs.charCodeAt(sa);var Ys=new Blob([ns],{type:"image/png"});(0,Ne.I)(Ys,so=>{so.id?$e.replaceSelection(``):(so==null?void 0:so.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":$e.replaceSelection("`$$"+Ji+"$$`");break;case Un:case mi:case Hi:const{src:Ka,alt:gl}=Ji,Xr=Ti,pl=(Jo=(Ki=(kn=Xr==null?void 0:Xr.name)==null?void 0:kn.split("."))==null?void 0:Ki.pop)==null?void 0:Jo.call(Ki);return((jr=Xr==null?void 0:Xr.type)==null?void 0:jr.indexOf("image"))>-1||!(Xr!=null&&Xr.type)?Xr!=null&&Xr.align||Xr!=null&&Xr.width?$e.replaceSelection(`<p style="text-align:${Xr.align||"initial"}"><img width="${Xr.width?Xr.width+"%":"initial"}" src="${Ka}" alt="${gl||""}" /></p>`):$e.replaceSelection(`<img width="100%" src="${Ka}" alt="${gl||""}" />`):((Ir=Xr==null?void 0:Xr.type)==null?void 0:Ir.indexOf("video"))>-1?$e.replaceSelection(`<video width="100%" controls src="${Ka}"></video>`):((Ur=Xr==null?void 0:Xr.type)==null?void 0:Ur.indexOf("pdf"))>-1?$e.replaceSelection(`<a href="${Ka}?type=${Xr.type}&disposition=inline" target="_blank">${Xr.name}</a>`):ir.includes(pl)?$e.replaceSelection(`<a href="${Ka}?type=office&disposition=inline" target="_blank">${Xr.name}</a>`):$e.replaceSelection(`[${Xr.name}](${Ka})`),$e.focus();case Lo:const{row:Tu,col:Hr,align:As}=Ji;let kl=`
|
|
|
`;for(let so=0;so<Tu;so++){let hr=[],Zo=[];for(let hi=0;hi<Hr;hi++)so===1&&Zo.push(No[As]),hr.push(" ");so===1&&(kl+=`| ${Zo.join(" | ")} |
|
|
|
`),kl+=`| ${hr.join(Hr===1?"":" | ")} |
|
|
|
`}return $e.replaceSelection(kl+`
|
|
|
`),$e.focus();default:throw new Error}},[$e,vi]),Qo=(0,wt.useMemo)(()=>{switch(vi){case ri:return wt.createElement(Zn,{callback:Rt,onCancel:xr});case Xi:return wt.createElement(Dn.Z,{callback:Rt,onCancel:xr});case Un:return wt.createElement(Ne.Z,{callback:Rt,onCancel:xr});case si:return wt.createElement(le,{callback:Rt,onCancel:xr});case Lo:return wt.createElement(Te,{callback:Rt,onCancel:xr});case"maths-latex":return wt.createElement(ln,{showSaveButton:!0,callback:Rt});case"inline-latex":return wt.createElement(tn.Z,{showSaveButton:!0,callback:Rt});default:return null}},[vi]);function xr(){pi("")}(0,wt.useEffect)(()=>{if(Di.current){let Ji=function(Ir){Jo=!0,jr=Ir.pageY},Ti=function(){Jo=!1},kn=function(Ir){if(Jo){let Ur=Ir.pageY-jr;Ur<0&&(Ur=0),Ur>300&&(Ur=300);let hs=We+Ur+"px";uo(hs)}},Ki=Di.current,Jo=!1,jr=0;return Ki.addEventListener("mousedown",Ji),document.addEventListener("mousemove",kn),document.addEventListener("mouseup",Ti),()=>{Ki.removeEventListener("mousedown",Ji),document.removeEventListener("mousemove",kn),document.removeEventListener("mouseup",Ti)}}},[$e,Di]),(0,wt.useEffect)(()=>{uo(We)},[We]);const es=pr(Gt),cs=pr(zi),us={width:es,height:cs},no=(0,wt.useMemo)(()=>{if(Ui){let Ji=new Date(Ui),Ti=Ji.getHours(),kn=Ji.getMinutes(),Ki=Ji.getSeconds();return Ti=Ti<10?"0"+Ti:Ti,kn=kn<10?"0"+kn:kn,Ki=Ki<10?"0"+Ki:Ki,`${Ti}:${kn}:${Ki}`}return 0},[Ui]),$i=Ji=>{const Ti=[];if(bn){let kn=-1;Ji=Ji.replace(/(@▁▁@|@▁@)/g,function(Ki,Jo,jr){Ti.push({multiLine:Ki!==Mt})})}return Ti};function Ko(){window.sessionStorage.removeItem(An),Xo(!1),ki(0)}function ro(){Xo(!1),ki(0),$e.setValue(window.sessionStorage.getItem(An))}(0,wt.useEffect)(()=>{Ci[vi]&&vi!==mi&&vi!==si&&setTimeout(()=>{const Ji=document.getElementsByClassName("markdown-popup-form")[0],Ti=window.innerWidth/2-Ji.offsetWidth/2,kn=window.innerHeight/2-Ji.offsetHeight/2;ho(Ti),zo(kn)},0)},[vi]);const lr=Ji=>{Ji.preventDefault();const Ti=Ji.clientX-sn,kn=Ji.clientY-Er;document.body.onmousemove=Ki=>{let Jo=Ki.clientX-Ti,jr=Ki.clientY-kn;const Ir=document.getElementsByClassName("markdown-popup-form")[0],Ur=window.innerWidth-Ir.offsetWidth,hs=window.innerHeight-Ir.offsetHeight;Jo=Math.max(0,Math.min(Jo,Ur)),jr=Math.max(0,Math.min(jr,hs)),ms(Ki.clientX,Ki.clientY,Ti,kn)&&(ho(Jo),zo(jr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ms=(Ji,Ti,kn,Ki)=>{const Jo=document.body.clientHeight,jr=document.body.clientWidth;return Ji<20&&kn>Ji||Ji>jr-20&&kn<Ji||Ti<20&&Ki>Ti||Ti>Jo-20&&Ki<Ti?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return wt.createElement(wt.Fragment,null,wt.createElement("div",{className:"markdown-editor-wrapper",ref:mr},wt.createElement("div",{className:`markdown-editor-container ${fi} ${Ue?"on-preview":""} ${Ye?"mini":""} ${qn?"full-screen":""}`,style:us},wt.createElement(_t,{insertTemp:He,watch:Ue,fullScreen:qn,showNullButton:qe,showNullProgramButton:bn,onActionCallback:Xn,hidetoolBar:Jn,extraUse:qi}),wt.createElement("div",{className:"markdown-editor-body"},wt.createElement("div",{className:"codemirror-container"},wt.createElement("textarea",{ref:Fr,placeholder:wi})),Ue?wt.createElement("div",{ref:Li,className:"preview-container"},un==="stex"&&wt.createElement(pe,{value:Co}),un!=="stex"&&wt.createElement(Be.Z,{disabledFill:Vn,showProgramFill:bn,value:Co})):null))),Fn?wt.createElement("a",{ref:Di,className:"editor-resize"}):null,vi===mi&&wt.createElement(ui,{callback:Rt,onCancel:xr}),vi===si&&wt.createElement(le,{callback:Rt,onCancel:xr}),wt.createElement(se.Z,null,Ci[vi]&&vi!==mi&&vi!==si?wt.createElement(pn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:sn,top:Er},title:wt.createElement("div",{style:{cursor:"move"},onMouseDown:lr},Ci[vi]),open:!0,onCancel:xr,footer:null,destroyOnClose:!0,width:vi===si?"1200px":null,height:vi===si?"80vh":null,className:"markdown-popup-form"},Qo):null))}},28451:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return Bt},I:function(){return _t}});var wt=bt(78241),te=bt(8591),de=bt(92832),Re=bt(81327),ne=bt(5871),ae=bt(5112),Tt=bt(3113),be=bt(77903),ye=bt(59301),Jt=bt(59301),Be=Object.defineProperty,pe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(se,Vt,he)=>Vt in se?Be(se,Vt,{enumerable:!0,configurable:!0,writable:!0,value:he}):se[Vt]=he,lt=(se,Vt)=>{for(var he in Vt||(Vt={}))et.call(Vt,he)&&ht(se,he,Vt[he]);if(Nt)for(var he of Nt(Vt))nt.call(Vt,he)&&ht(se,he,Vt[he]);return se},gt=(se,Vt)=>pe(se,je(Vt));const{useForm:vt}=wt.default,Pt={width:280,marginRight:10},At={labelCol:{span:5},wrapperCol:{span:19}};var Bt=({callback:se,onCancel:Vt})=>{const[he]=vt();let Zt=(0,ye.useRef)();function Oe(Xe){Zt.current.width=he.getFieldValue("width"),Zt.current.align=he.getFieldValue("align"),se(Xe,Zt.current)}function me(Xe,Je){if(Xe.status===-1){te.ZP.error(Xe.message);return}he.setFieldsValue({src:`/api/attachments/${Xe.id}`,type:Je.type})}function Ve(Xe){let Je=Xe.target.files[0];Zt.current=Je,_t(Je,me)}return Jt.createElement(wt.default,gt(lt({form:he},At),{className:"upload-image-panel",onFinish:Oe,style:{width:470,overflow:"hidden"}}),Jt.createElement(wt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Jt.createElement("div",{className:"flex-container"},Jt.createElement(wt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Jt.createElement(de.default,{style:Pt})),Jt.createElement(jt,{onFileChange:Ve}))),Jt.createElement(wt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Jt.createElement(de.default,{style:{width:264}})),Jt.createElement(wt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Jt.createElement(Re.Z,null,Jt.createElement(wt.default.Item,{name:"width",style:{margin:0}},Jt.createElement(ne.Z,{style:{width:264}})),Jt.createElement("span",{className:"ml8"},"%"))),Jt.createElement(wt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Jt.createElement(ae.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"}]})),Jt.createElement("aside",null,Jt.createElement(wt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Jt.createElement(Tt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Jt.createElement(Tt.ZP,{type:"default",onClick:Vt},"\u53D6\u6D88"))))};function jt({onFileChange:se}){return Jt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Jt.createElement("input",{type:"file",onChange:se}))}function _t(se,Vt){if(!se)throw new String("\u6CA1\u6709\u6587\u4EF6");let he=new FormData;he.append("editormd-image-file",se),he.append("file_param_name","editormd-image-file"),he.append("byxhr","true");var Zt=new window.XMLHttpRequest;Zt.withCredentials=!0,Zt.addEventListener("load",function(Oe){Vt(JSON.parse(Oe.target.responseText),se)},!1),Zt.addEventListener("error",function(Oe){console.error(Oe)},!1),Zt.open("POST",`${be.KI}/api/attachments.json`),Zt.send(he)}},79346:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return de}});var wt=bt(59301),te=bt(4676);class de extends wt.Component{constructor(ne){super(ne);const ae=window.document;this.node=ae.createElement("div"),ae.body.appendChild(this.node)}render(){const{children:ne}=this.props;return(0,te.createPortal)(ne,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(gn,Ln,bt){"use strict";bt.d(Ln,{SV:function(){return Me},ZP:function(){return xt}});var wt=bt(59301),te=bt(76374);const de={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"]},Re={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"]},ne={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},ae={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(`
|
|
|
`)}]},Tt={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 be=bt(53184),ye=bt.n(be),Jt=Object.defineProperty,Be=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(De,le,ee)=>le in De?Jt(De,le,{enumerable:!0,configurable:!0,writable:!0,value:ee}):De[le]=ee,ht=(De,le)=>{for(var ee in le||(le={}))Nt.call(le,ee)&&nt(De,ee,le[ee]);if(je)for(var ee of je(le))et.call(le,ee)&&nt(De,ee,le[ee]);return De},lt=(De,le)=>Be(De,pe(le)),gt=(De,le,ee)=>new Promise((Se,xe)=>{var ue=fn=>{try{vn(ee.next(fn))}catch(en){xe(en)}},Te=fn=>{try{vn(ee.throw(fn))}catch(en){xe(en)}},vn=fn=>fn.done?Se(fn.value):Promise.resolve(fn.value).then(ue,Te);vn((ee=ee.apply(De,le)).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"]}},Pt=(De,le)=>le.map(ee=>({label:ee,kind:De.languages.CompletionItemKind.Keyword,insertText:ee})),At=De=>Object.keys(vt.tables).map(le=>({label:le,kind:De.languages.CompletionItemKind.Variable,insertText:le})),Bt=(De,le)=>{const ee=vt.tables[De];return ee?ee.map(Se=>({label:Se,kind:le.languages.CompletionItemKind.Field,insertText:Se})):[]};function jt(De,le,ee,Se,xe){let ue=le.getWordUntilPosition(ee),Te={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:ue.startColumn,endColumn:ue.endColumn},vn=Se.map(fn=>({label:fn,kind:De.languages.CompletionItemKind.Keyword,insertText:fn,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Te}));return xe.map(fn=>{vn.push(lt(ht({},fn),{range:Te}))}),vn}var _t=De=>{vt.languages.map(xe=>(De.languages.registerDocumentFormattingEditProvider(xe,{provideDocumentFormattingEdits(ue,Te,vn){return gt(this,null,function*(){const fn=ye()(ue.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:ue.getFullModelRange(),text:fn}]})}}),xe));const le=ne.quickKey.map(xe=>({label:xe.label,kind:De.languages.CompletionItemKind.Method,insertText:xe.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ee=ae.quickKey.map(xe=>({label:xe.label,kind:De.languages.CompletionItemKind.Method,insertText:xe.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Se=Re.quickKey.map(xe=>({label:xe.label,kind:De.languages.CompletionItemKind.Method,insertText:xe.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet}));De.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(xe,ue){var Te=xe.getWordUntilPosition(ue),vn={startLineNumber:ue.lineNumber,endLineNumber:ue.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},fn=xe.getLineContent(ue.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[...ne.keywords.map(en=>({label:en,kind:De.languages.CompletionItemKind.Function,documentation:en,insertText:en,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn})),...ne.quickKey.map(en=>({label:en.label,kind:De.languages.CompletionItemKind.Function,documentation:en.content,insertText:fn.startsWith("#")?en.content.replace(/#/,""):en.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn}))]}}}),De.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(xe,ue){var Te=xe.getWordUntilPosition(ue),vn={startLineNumber:ue.lineNumber,endLineNumber:ue.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn};return{suggestions:[...de.keywords.map(fn=>({label:fn,kind:De.languages.CompletionItemKind.Function,documentation:fn,insertText:fn,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn}))]}}}),De.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(xe,ue){var Te=xe.getWordUntilPosition(ue),vn={startLineNumber:ue.lineNumber,endLineNumber:ue.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},fn=xe.getLineContent(ue.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[...Re.keywords.map(en=>({label:en,kind:De.languages.CompletionItemKind.Function,documentation:en,insertText:en,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn})),...Re.quickKey.map(en=>({label:en.label,kind:De.languages.CompletionItemKind.Function,documentation:en.content,insertText:fn.startsWith("#")?en.content.replace(/#/,""):en.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn}))]}}}),De.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(xe,ue){var Te=xe.getWordUntilPosition(ue),vn={startLineNumber:ue.lineNumber,endLineNumber:ue.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},fn=xe.getLineContent(ue.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[...Tt.keywords.map(en=>({label:en,kind:De.languages.CompletionItemKind.Function,documentation:en,insertText:en,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn})),...Tt.quickKey.map(en=>({label:en.label,kind:De.languages.CompletionItemKind.Function,documentation:en.content,insertText:fn.startsWith("#")?en.content.replace(/#/,""):en.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn}))]}}}),De.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(xe,ue){var Te=xe.getWordUntilPosition(ue),vn={startLineNumber:ue.lineNumber,endLineNumber:ue.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},fn=xe.getLineContent(ue.lineNumber).substring(Te.startColumn-2,Te.endColumn);return{suggestions:[...ae.keywords.map(en=>({label:en,kind:De.languages.CompletionItemKind.Function,documentation:en,insertText:en,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn})),...ae.quickKey.map(en=>({label:en.label,kind:De.languages.CompletionItemKind.Function,documentation:en.content,insertText:fn.startsWith("#")?en.content.replace(/#/,""):en.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vn}))]}}})};const se="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Vt=Object.defineProperty,he=(De,le,ee)=>le in De?Vt(De,le,{enumerable:!0,configurable:!0,writable:!0,value:ee}):De[le]=ee,Zt=(De,le,ee)=>he(De,typeof le!="symbol"?le+"":le,ee);const Oe=class p1{constructor(le,ee,Se){this.placeholder=le,this.editor=ee,this.monaco=Se,ee.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return p1.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)}};Zt(Oe,"ID","editor.widget.placeholderHint");var Ve=Oe,Xe=bt(96236),Je=bt(8591),wn=bt(6848),Mn=bt(89392),we=bt(34604),Yt=bt(56102),_e=Object.defineProperty,Zn=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,pn=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,Yn=(De,le,ee)=>le in De?_e(De,le,{enumerable:!0,configurable:!0,writable:!0,value:ee}):De[le]=ee,mn=(De,le)=>{for(var ee in le||(le={}))pn.call(le,ee)&&Yn(De,ee,le[ee]);if(Ne)for(var ee of Ne(le))Tn.call(le,ee)&&Yn(De,ee,le[ee]);return De},ui=(De,le)=>Zn(De,Dn(le)),Ce=(De,le)=>{var ee={};for(var Se in De)pn.call(De,Se)&&le.indexOf(Se)<0&&(ee[Se]=De[Se]);if(De!=null&&Ne)for(var Se of Ne(De))le.indexOf(Se)<0&&Tn.call(De,Se)&&(ee[Se]=De[Se]);return ee},$n=(De,le,ee)=>new Promise((Se,xe)=>{var ue=fn=>{try{vn(ee.next(fn))}catch(en){xe(en)}},Te=fn=>{try{vn(ee.throw(fn))}catch(en){xe(en)}},vn=fn=>fn.done?Se(fn.value):Promise.resolve(fn.value).then(ue,Te);vn((ee=ee.apply(De,le)).next())});function Pi(De){return/^\d+$/.test(De)?`${De}px`:De}function Ot(){}let Lt=!1;const St={"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 It(De=[]){let le=De;if(Array.isArray(De)){for(let ee=0;ee<De.length;ee++){let Se=St[De[ee]];if(Se)return Se}return le[0]}return St[le]||le}let Kt=null;var xt=De=>{var le=De,{width:ee="100%",height:Se="100%",value:xe,language:ue="javascript",style:Te={},options:vn={},overrideServices:fn={},theme:en="vs-dark",onEditBlur:xn,isCopy:ln=!1,onSave:tn,autoHeight:ii=!1,forbidCopy:ri=!1,onChange:Un=Ot,editorDidMount:si=Ot,onFocus:mi=Ot,onBreakPoint:Hi=Ot,breakPointValue:Xi=[],filename:Lo="educoder.txt",errorLine:Oo,errorContent:No="",highlightLine:Io,openBreakPoint:_o=!1,placeholder:qo="",showMiniMap:Ni=!0}=le,$o=Ce(le,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Ro=(0,wt.useRef)(),Mt=(0,wt.useRef)({}),cr=(0,wt.useRef)(),ir=(0,wt.useRef)(),pr=(0,wt.useRef)([]),ts=(0,wt.useRef)(!1),rs=(0,wt.useRef)(),ls=(0,wt.useRef)(),Ci=(0,wt.useRef)(!1),[oi,Ie]=(0,wt.useState)(!1);function Le(){let Qe;return Ro.current&&(Qe=new te.Z(zn=>{for(let Wn of zn)(Wn.target.offsetHeight>0||Wn.target.offsetWidth>0)&&Mt.current.instance.layout()}),Qe.observe(Ro.current)),Qe}function Gt(){Je.ZP.warning({content:decodeURIComponent(se),key:"monaco-editor-tip"})}const We=()=>{let Qe=Mt.current.instance;if(xe!=null&&Qe&&oi){const zn=Qe.getModel();zn&&xe!==zn.getValue()&&(Lt=!0,zn.setValue(xe),Qe.layout(),Lt=!1)}};(0,wt.useEffect)(()=>{const Qe=we.Z.subscribe("formatDocument",zn=>{var Wn;let fi=Mt.current.instance;(Wn=fi==null?void 0:fi.getAction)==null||Wn.call(fi,"editor.action.formatDocument").run()});return window.updateMonacoValue=zn=>{Un(zn)},Qe},[]),(0,wt.useEffect)(()=>{var Qe;let zn=Mt.current.instance;ir.current&&clearTimeout(ir.current),ir.current=setTimeout(()=>{We()},500),xe&&(xe!=null&&xe.length)&&((Qe=zn==null?void 0:zn.updateOptions)==null||Qe.call(zn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(xe.split(/\r\n|\r|\n/g).length))+3,5)}))},[xe,oi,Mt.current]),(0,wt.useEffect)(()=>{if(Oo&&Mt.current&&Mt.current.instance){let zn=Mt.current.instance;zn.changeViewZones(function(Wn){var fi=document.createElement("div");fi.style.padding="10px 20px",fi.style.width="calc(100% - 20px)",fi.className="my-error-line-wrp",fi.innerHTML=No,Wn.addZone({afterLineNumber:Oo||11,heightInLines:3,domNode:fi})});var Qe={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}};zn.addOverlayWidget(Qe),zn.revealPositionInCenter({lineNumber:20,column:1})}},[Oo,Mt.current,oi]);const Ye=(Qe="",zn)=>{if(!Qe||Qe.trim()==="")return!0;const fi=Mt.current.instance.getModel().getLineTokens(zn);let Hn=!1;for(let _n=0;_n<2;_n++)fi.getStandardTokenType(_n)===1&&(Hn=!0);return Hn};(0,wt.useEffect)(()=>{var Qe;const zn=(Qe=Mt.current)==null?void 0:Qe.instance;if(zn&&oi&&ri){const Wn=zn.onDidBlurEditorWidget(()=>{Ci.current=!1}),fi=zn.onDidFocusEditorText(()=>{Ci.current=!0});return()=>{Wn.dispose(),fi.dispose()}}},[Mt.current,oi,ri]),(0,wt.useEffect)(()=>{var Qe;if((Qe=Mt.current)!=null&&Qe.instance&&oi&&_o){let zn=Mt.current.instance,Wn=zn.getModel();if(!Wn)return;(()=>{var Ue;let jn=[],qn=[];const Mi=Wn.getAllDecorations();for(let pi of Mi)pi.options.className==="highlighted-line"&&(jn.push((Ue=pi==null?void 0:pi.range)==null?void 0:Ue.startLineNumber),qn.push(pi==null?void 0:pi.id));if(Io===jn[0])return;Wn.deltaDecorations(qn,[]);const vi=Wn.getLineCount();Io&&Io<=vi&&(zn.deltaDecorations([],[{range:new Kt.Range(Io,1,Io,Wn.getLineMaxColumn(Io)),options:{isWholeLine:!0,className:"highlighted-line"}}]),zn.revealLineInCenter(Io))})();const Hn=(Ue=!1)=>{var jn;let qn=[],Mi=[];const vi=Wn.getAllDecorations();for(let pi of vi)pi.options.linesDecorationsClassName==="breakpoints-select"&&(qn.push((jn=pi==null?void 0:pi.range)==null?void 0:jn.startLineNumber),Mi.push(pi==null?void 0:pi.id));if(Ue)return{lines:qn,ids:Mi};Hi(qn)},_n=Ue=>$n(void 0,null,function*(){let jn={range:new Kt.Range(Ue,1,Ue,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Wn.deltaDecorations([],[jn]),Hn()}),Vn=Ue=>$n(void 0,null,function*(){let jn=[];const qn=zn.getLineDecorations(Ue);for(let Mi of qn)Mi.options.linesDecorationsClassName==="breakpoints-select"&&jn.push(Mi.id);yield Wn.deltaDecorations(jn,[]),Hn()}),wi=Ue=>{let jn=zn.getLineDecorations(Ue);for(let qn of jn)if(qn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Mn.isEqual)(Xi,Hn(!0).lines)){Wn.deltaDecorations(Hn(!0).ids,[]);const Ue=Xi.map(jn=>({range:new Kt.Range(jn,1,jn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Wn.deltaDecorations([],Ue)}const Qi=zn.onDidChangeModelContent(Ue=>{let jn=zn.getPosition();if(jn){let qn=jn.lineNumber;clearTimeout(ls.current),ls.current=setTimeout(()=>{Ye(Wn.getLineContent(qn),qn)?Vn(qn):wi(qn)?(Vn(qn),_n(qn)):Hn()},100)}}),qi=zn.onMouseDown(Ue=>{var jn,qn,Mi;if(Ue.target.detail&&((Mi=(qn=(jn=Ue.target)==null?void 0:jn.element)==null?void 0:qn.className)!=null&&Mi.includes("line-numbers"))){let vi=Ue.target.position.lineNumber;if(Ye(Wn.getLineContent(vi),vi))return;wi(vi)?Vn(vi):_n(vi)}}),$e=Ue=>{let jn={range:new Kt.Range(Ue,1,Ue,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};pr.current=zn.deltaDecorations(pr.current,[jn])},lo=()=>{pr.current=zn.deltaDecorations(pr.current,[])},Co=zn.onMouseMove(Ue=>{var jn,qn,Mi;if(lo(),Ue.target.detail&&((Mi=(qn=(jn=Ue.target)==null?void 0:jn.element)==null?void 0:qn.className)!=null&&Mi.includes("line-numbers"))){let vi=Ue.target.position.lineNumber;if(Ye(Wn.getLineContent(vi),vi))return;$e(vi)}}),jo=zn.onMouseLeave(()=>{lo()});return()=>{Qi.dispose(),qi.dispose(),Co.dispose(),jo.dispose()}}},[Mt.current,oi,Xi,Io,_o,ue]),(0,wt.useEffect)(()=>{var Qe;(Qe=Mt.current)!=null&&Qe.instance&&_o&&Mt.current.instance.setPosition({lineNumber:0,column:0})},[Io]);function ce(){let Qe=Mt.current.instance;if(Qe){const zn=Qe.getSelection(),Wn=Mt.current.pastePos||{},fi=new Kt.Range(Wn.startLineNumber||zn.endLineNumber,Wn.startColumn||zn.endColumn,Wn.endLineNumber||zn.endLineNumber,Wn.endColumn||zn.endColumn);setTimeout(()=>{Qe.executeEdits("",[{range:fi,text:""}])},300)}}function qt(Qe){(window.navigator.platform.match("Mac")?Qe.metaKey:Qe.ctrlKey)&&Qe.keyCode==83&&(Qe.preventDefault(),tn())}const He=()=>{if(ii&&Mt.current.instance){const Qe=Mt.current.instance.getContentHeight();Jn(Qe<Se?Se:Qe)}else Jn(Se)};function un(Qe){var zn=document.createEvent("MouseEvents");zn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Qe.dispatchEvent(zn)}const An=Qe=>{if(!Ci.current)return;const{keyCode:zn,ctrlKey:Wn,metaKey:fi,target:Hn,type:_n}=Qe;return(_n==="paste"||(zn===67||zn===86)&&(fi||Wn))&&Hn.nodeName==="TEXTAREA"&&(Gt(),Qe.preventDefault()),!1};function Fn(Qe,zn){var Wn=window.URL||window.webkitURL||window,fi=new Blob([zn]),Hn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Hn.href=Wn.createObjectURL(fi),Hn.download=Qe,un(Hn)}(0,wt.useEffect)(()=>{He()},[He]),(0,wt.useEffect)(()=>{Ro.current&&!oi&&Promise.all([bt.e(8909),bt.e(3267)]).then(bt.bind(bt,71448)).then(Qe=>{try{Kt=Qe,Mt.current.instance=Kt.editor.create(Ro.current,{value:xe,language:It(ue),theme:en,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ni||!1}},fn);const zn=Mt.current.instance;let Hn=[...Xe.BH._menuItems].find(Qi=>Qi[0]._debugName=="EditorContext")[1],_n=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Vn=(Qi,qi)=>{var $e,lo;let Co=Qi._first;do qi.includes((lo=($e=Co.element)==null?void 0:$e.command)==null?void 0:lo.id)&&Qi._remove(Co);while(Co=Co.next)};if(si(zn,Kt),setTimeout(()=>{He(),Mt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Fn(Lo||"educoder.txt",zn.getValue())}})},500),Mt.current.subscription=zn.onDidChangeModelContent(Qi=>{ts.current?clearTimeout(rs.current):(He(),Un(zn.getValue(),Qi)),rs.current=setTimeout(()=>{ts.current=!1},500)}),window.Monaco||_t(Kt,It(ue)),ri&&(Vn(Hn,_n),Ro.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",An),window.removeEventListener("paste",An),window.addEventListener("keydown",An),window.addEventListener("paste",An)),window.Monaco=Kt,xn&&zn.onDidBlurEditorWidget(()=>{xn(zn.getValue())}),mi&&zn.onDidFocusEditorText(()=>{mi(zn.getValue())}),ri)try{zn.onDidPaste(Qi=>{const qi=zn.getSelection(),$e=Mt.current.pastePos||{},lo=new Kt.Range($e.startLineNumber||qi.endLineNumber,$e.startColumn||qi.endColumn,$e.endLineNumber||qi.endLineNumber,$e.endColumn||qi.endColumn);zn.executeEdits("",[{range:Qi.range,text:""}])})}catch(Qi){}let wi=Le();return qo&&typeof qo=="string"&&new Ve(qo,zn,Kt),Ie(!0),()=>{const Qi=Mt.current.instance;Qi.dispose();const qi=Qi.getModel();qi&&qi.dispose(),Mt.current.subscription&&Mt.current.subscription.dispose(),wi.unobserve(Ro.current)}}catch(zn){}})},[]),(0,wt.useEffect)(()=>{if(Mt.current.instance&&oi)return document.addEventListener("keydown",qt,!1),()=>{document.removeEventListener("keydown",qt)}},[tn,oi]),(0,wt.useEffect)(()=>{let Qe=Mt.current.instance;if(Qe&&oi){let zn=It(ue);Kt.editor.setModelLanguage(Qe.getModel(),zn)}},[ue,oi]),(0,wt.useEffect)(()=>{Mt.current.instance&&oi&&Kt.editor.setTheme(en)},[en,oi]),(0,wt.useEffect)(()=>{let Qe=Mt.current.instance;cr.current=vn,Qe&&oi&&(Qe.updateOptions(mn({},vn)),setTimeout(()=>{Qe.getModel().updateOptions(mn({},vn))},200))},[JSON.stringify(vn),oi]),(0,wt.useEffect)(()=>{let Qe=Mt.current.instance;Qe&&oi&&Qe.layout()},[ee,Se,oi]);const[oe,qe]=(0,wt.useState)(Pi(ee)),[bn,Jn]=(0,wt.useState)(Pi(Se)),Ke=ui(mn({},Te),{width:oe,height:bn,position:"relative"});return wt.createElement("div",{className:"my-monaco-editor",ref:Ro,style:Ke},ln&&wt.createElement(Yt.CopyToClipboard,{text:xe,onCopy:()=>Je.ZP.success("\u590D\u5236\u6210\u529F")},wt.createElement(wn.Z,{title:"\u590D\u5236\u4EE3\u7801"},wt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},wt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Me({width:De="100%",height:le="100%",original:ee,modified:Se,language:xe,options:ue={}}){const Te=(0,wt.useRef)(),[vn,fn]=(0,wt.useState)(null);function en(ii){let ri;return Te.current&&(ri=new te.Z(Un=>{for(let si of Un)(si.target.offsetHeight>0||si.target.offsetWidth>0)&&ii.layout()}),ri.observe(Te.current)),ri}(0,wt.useEffect)(()=>(Te.current&&Promise.all([bt.e(8909),bt.e(9404)]).then(bt.bind(bt,2550)).then(ii=>{Kt=ii;const ri=Kt.editor.createDiffEditor(Te.current,ui(mn({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},ue),{wordWrap:!0}));fn(ri);let Un=en(ri);return()=>{ri.dispose();const si=ri.getModel();si&&si.dispose(),Un.unobserve(Te.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,wt.useEffect)(()=>{vn&&vn.setModel({original:Kt.editor.createModel(ee,xe),modified:Kt.editor.createModel(Se,xe)})},[ee,Se,xe,vn]);const xn=Pi(De),ln=Pi(le),tn={width:xn,height:ln};return wt.createElement("div",{className:"my-diff-editor",ref:Te,style:tn})}},85057:function(gn,Ln,bt){"use strict";bt.d(Ln,{jL:function(){return ne},w9:function(){return pn},QD:function(){return Un},cQ:function(){return Yt},op:function(){return en},O5:function(){return ls},_b:function(){return Oo},t7:function(){return lt},Gi:function(){return $n},YG:function(){return ui},qp:function(){return Be},vr:function(){return Hi},qE:function(){return tn},Je:function(){return Pt},wb:function(){return Xe},cq:function(){return Kt},tp:function(){return Nt}});var wt=bt(59301),te={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},de="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX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59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",ne=({dataSource:Ci=[],img:oi,imgWidth:Ie=346,title:Le,sunTitle:Gt,bannerExtraContent:We})=>wt.createElement("div",{className:te.banner},wt.createElement("div",{className:te.content},wt.createElement("aside",null,wt.createElement("p",null,wt.createElement("b",null,Le),wt.createElement("span",null,Gt)),Ci.length>0&&wt.createElement("div",{className:te.btns},Ci.map((Ye,ce)=>wt.createElement("div",{key:ce,onClick:Ye.click},Ye.name,Ye.sign?wt.createElement("img",{src:de,width:39}):null))),We),oi&&wt.createElement("img",{style:{marginTop:33,marginRight:38},src:oi,width:Ie}))),ae={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Tt=bt(92310),be=bt.n(Tt),ye=bt(89392),Be=({dataSource:Ci=[],value:oi,onChange:Ie,onTitleChange:Le,className:Gt,title:We,titleWidth:Ye=41,style:ce={},fontColor:qt="#6A7283",showCount:He})=>{const[un,An]=(0,wt.useState)(0),[Fn,oe]=(0,wt.useState)(!1),qe=(0,wt.useRef)(null),bn=(0,wt.useRef)(null);return(0,wt.useEffect)(()=>{var Jn;Ci.length!==0&&(((Jn=qe==null?void 0:qe.current)==null?void 0:Jn.clientHeight)>97?An(1):An(0)),Ci.length===0&&An(0),oe(!1)},[Ci]),wt.createElement("div",{className:be()(ae.row,Gt),style:ce},wt.createElement("div",{onClick:(0,ye.throttle)(()=>Le==null?void 0:Le(),2e3),style:{width:Ye,marginTop:Fn?12:4},className:`${ae.title} ${Le?"current":""}`},We),wt.createElement("div",{className:Fn?`${ae.tagsWrap} ${ae.tagsBorderWrap}`:ae.tagsWrap},wt.createElement("div",{className:ae.bar,ref:bn,style:un>0?{height:un===1?97:"auto",overflow:un===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},wt.createElement("div",{className:ae.tag,ref:qe},Ci==null?void 0:Ci.map(Jn=>wt.createElement("span",{onClick:()=>Ie(Jn.id),key:Jn.id,style:{color:qt},className:oi===Jn.id?ae.active:""},wt.createElement("span",{title:Jn.name,className:ae.name},Jn.name),!!He&&wt.createElement("span",{className:ae.num},Jn.count))))),!!un&&wt.createElement(wt.Fragment,null,un===1?wt.createElement("div",{onClick:()=>{var Jn;An(2),((Jn=qe==null?void 0:qe.current)==null?void 0:Jn.clientHeight)>245?oe(!0):oe(!1)},className:ae.action},"\u5C55\u5F00",wt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):wt.createElement("div",{onClick:()=>{bn.current.scrollTop=0,An(1),oe(!1)},className:ae.action},"\u6536\u8D77",wt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},pe={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Nt=({dataSource:Ci=[],value:oi,onChange:Ie,className:Le,style:Gt={}})=>wt.createElement("div",{style:Gt,className:be()(pe.tabs,Le)},Ci.map(We=>wt.createElement("span",{onClick:()=>Ie(We.id),className:oi===We.id?pe.active:"",key:We.id},We.name))),et={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},nt=bt(92832),lt=({dataSource:Ci=[],value:oi="",onChange:Ie,onInputChange:Le=()=>{},className:Gt,style:We={},placeholder:Ye,allowClear:ce=!1})=>{var qt;const[He,un]=(0,wt.useState)(""),[An,Fn]=(0,wt.useState)("");(0,wt.useEffect)(()=>{var bn;let Jn=oi;(bn=JSON.stringify(oi))!=null&&bn.includes("{")&&(un(oi.id),Jn=oi.value||"");try{Fn(decodeURIComponent(Jn||""))}catch(Ke){Fn(decodeURIComponent(Jn||""))}},[oi]);const oe=()=>{Ie(encodeURIComponent(An),He||null)},qe=bn=>{bn!==He&&(un(bn),Ie(encodeURIComponent(An),bn))};return wt.createElement("div",{className:be()(et.input,Gt),style:We},!!Ci.length&&wt.createElement("div",{className:et.dropdown},wt.createElement("div",{className:et.text},(qt=Ci.find(bn=>bn.id===He))==null?void 0:qt.name,wt.createElement("i",{className:"iconfont icon-zhankai4"}),wt.createElement("b",{className:et.b1}),wt.createElement("b",{className:et.b2})),wt.createElement("div",{className:et.menu},Ci.map((bn,Jn)=>wt.createElement("div",{key:Jn,onClick:()=>qe(bn.id)},bn.name)))),wt.createElement(nt.default,{onPressEnter:oe,value:An,onChange:bn=>{Fn(bn.target.value),Le(encodeURIComponent(bn.target.value),He||null)},bordered:!1,placeholder:Ye}),wt.createElement("i",{onClick:oe,className:"iconfont icon-sousuo9 font14 pl10 current"}))},gt={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},Pt=({value:Ci,onChange:oi,className:Ie,total:Le,pageSize:Gt,style:We={}})=>{const Ye=Ci<2,ce=Ci>=Math.ceil(Le/Gt);return Le<=Gt?wt.createElement(wt.Fragment,null):wt.createElement("div",{className:be()(gt.quickPager,Ie),style:We},wt.createElement("div",{onClick:()=>{Ye||oi(Ci-1,"prev")},className:Ye?gt.disabled:""},"\u4E0A\u4E00\u9875"),wt.createElement("div",{onClick:()=>{ce||oi(Ci+1,"next")},className:ce?gt.disabled:""},"\u4E0B\u4E00\u9875"))},At={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Bt=bt(71418),jt=bt(6848),_t=bt(13570),se=bt(3294),Vt=bt(955),he=bt(96908),Zt=bt(57177),Oe=bt(81378),me=bt(8797),Xe=({className:Ci,dataSource:oi=[],col:Ie=4,right:Le,bottom:Gt=23,precision:We=0,wrapWidth:Ye=1200,trackEventItems:ce,loading:qt})=>{const He=Math.floor((Ye-(Ie-1)*Le)/Ie);return wt.createElement(Bt.Z,{spinning:qt},wt.createElement("div",{className:be()(At.list,Ci)},!!oi.length&&oi.map((un,An)=>{const{name:Fn,id:oe,identifier:qe,power:bn,cover_image_id:Jn,pic:Ke}=un;return wt.createElement("div",{className:At.wrap,key:oe,style:{width:He,marginRight:(1+An)%Ie===0?0:Le+We,marginBottom:Gt}},wt.createElement("a",{target:"_blank",href:`/shixuns/${qe}/challenges`,className:At.li,onClick:Qe=>{Qe.preventDefault(),ce&&(0,Vt.L9)([ce]),bn&&(0,Vt.xg)(`/shixuns/${qe}/challenges`)}},wt.createElement("div",{className:At.img},wt.createElement("img",{className:At.cover,src:`${Ke}`}),un.is_jupyter&&wt.createElement("img",{className:At.sign,src:he}),un.is_jupyter_lab&&wt.createElement("img",{className:At.sign,src:Zt}),un.is_unity_3d&&wt.createElement("img",{className:At.sign,src:Oe})),wt.createElement("div",{className:At.name},wt.createElement(jt.Z,{title:Fn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},wt.createElement("span",{className:At.e},Fn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),wt.createElement("div",{className:At.tags},wt.createElement(jt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},wt.createElement("span",null,wt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),wt.createElement("span",null,un.challenges_count))),!!un.myshixuns_count&&wt.createElement(jt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},wt.createElement("span",null,wt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),wt.createElement("span",null,un.myshixuns_count))),wt.createElement(jt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},wt.createElement("span",null,wt.createElement("span",null,un.level))),wt.createElement("div",{className:At.rate},wt.createElement(_t.Z,{allowHalf:!0,disabled:!0,defaultValue:un.score_info}),wt.createElement("span",null,"\xA0",un.score_info?`${un.score_info}\u5206`:"5\u5206")))),!bn&&wt.createElement("div",{className:At.lockWrap},wt.createElement("img",{src:`${se.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),wt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!oi.length&&wt.createElement(me.Z,null)))},Je={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},wn=bt(24065),Mn=bt(59301),Yt=({className:Ci,dataSource:oi=[],col:Ie=4,right:Le,bottom:Gt=23,precision:We=0,wrapWidth:Ye=1200,trackEventItems:ce,loading:qt,onRemove:He=()=>{},isCurrent:un=!0,showAlias:An=!1})=>{const Fn=Math.floor((Ye-(Ie-1)*Le)/Ie),oe=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return Mn.createElement(Bt.Z,{spinning:qt},Mn.createElement("div",{className:be()(Je.list,Ci)},!!(oi!=null&&oi.length)&&(oi==null?void 0:oi.map((qe,bn)=>{var Jn;const{name:Ke,id:Qe,identifier:zn,featured:Wn,school_name:fi,image_url:Hn,excellent:_n,is_plan:Vn}=qe;return Mn.createElement("div",{key:Qe,className:Je.wrap,style:{width:Fn,marginRight:(1+bn)%Ie===0?0:Le+We,marginBottom:Gt}},Mn.createElement("a",{className:Je.li,onClick:wi=>{wi.preventDefault(),wi.stopPropagation(),ce&&(0,Vt.L9)([ce]),(0,Vt.xg)(`/paths/${zn}`)}},Mn.createElement("div",{className:Je.img},Mn.createElement("img",{className:Je.cover,src:`${Hn}`}),un&&(0,wn.bg)()&&(qe==null?void 0:qe.studying)&&Mn.createElement("div",{className:`${Je.movebq} user-path-items`,onClick:wi=>{wi.stopPropagation(),He(qe)}},Mn.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Mn.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Jn=qe==null?void 0:qe.subject_tags)==null?void 0:Jn.map((wi,Qi)=>{var qi,$e;if(Qi===0){const Co=(qi=oe.find(jo=>jo.name==wi))==null?void 0:qi.swimg;return Mn.createElement("img",{className:Je.sign,src:Co,style:{left:"-4px"}})}const lo=($e=oe.find(Co=>Co.name==wi))==null?void 0:$e.ptimg;return Mn.createElement("img",{className:Je.sign,src:lo,style:{left:`${48+52*(Qi-1)+2*Qi}px`}})}),Mn.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(qe==null?void 0:qe.excellent)&&Mn.createElement("div",{className:Je.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Mn.createElement("div",{className:Je.name},Mn.createElement(jt.Z,{title:An&&(qe!=null&&qe.excellent_alias_name)?Mn.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Ke}`,Mn.createElement("br",null),Mn.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${qe==null?void 0:qe.excellent_alias_name}`)):Ke},Mn.createElement("span",{className:Je.e},An&&(qe==null?void 0:qe.excellent_alias_name)||Ke))),Mn.createElement(jt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${fi}`},Mn.createElement("div",{className:Je.unit},Mn.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),fi)),Mn.createElement("div",{className:Je.tags},Mn.createElement("div",null,Mn.createElement(jt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Mn.createElement("span",null,Mn.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Mn.createElement("span",null,qe.stages_count))),Mn.createElement(jt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Mn.createElement("span",null,Mn.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Mn.createElement("span",null,qe.members_count)))))))})),!oi.length&&Mn.createElement(me.Z,null)))},_e={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Zn="data:image/png;base64,iV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PTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Dn=bt(59301),pn=({className:Ci,dataSource:oi=[],col:Ie=4,right:Le,bottom:Gt=23,precision:We=0,wrapWidth:Ye=1200,trackEventItems:ce,loading:qt,handleVery:He=()=>!0})=>{const un=Math.floor((Ye-(Ie-1)*Le)/Ie);return Dn.createElement(Bt.Z,{spinning:qt},Dn.createElement("div",{className:be()(_e.list,Ci)},!!oi.length&&oi.map((An,Fn)=>{const{subject_identifier:oe,id:qe,identifier:bn,power:Jn}=An,Ke=An.is_public!=0&&An.is_public;return Dn.createElement("div",{className:_e.wrap,key:qe,style:{width:un,marginRight:(1+Fn)%Ie===0?0:Le+We,marginBottom:Gt}},Dn.createElement("a",{className:_e.li,onClick:Qe=>{Qe.preventDefault(),He(An==null?void 0:An.first_category_url)&&(ce&&(0,Vt.L9)([ce]),(0,Vt.xg)(An.first_category_url))}},Dn.createElement("div",{className:_e.top},Dn.createElement(jt.Z,{title:An.name},Dn.createElement("div",{className:_e.name},An.name)),Dn.createElement("img",{className:_e.img,src:se.Z.IMG_SERVER+"/images/"+An.avatar_url}),Dn.createElement("div",{className:_e.text,title:An.creator},An.creator),oe&&Dn.createElement("div",{className:_e.btns},Dn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Dn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Ke&&Dn.createElement("div",{className:_e.sign},"\u516C\u5F00")),Dn.createElement("div",{className:_e.bottom},An.visits>0&&Dn.createElement(jt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Dn.createElement("span",null,Dn.createElement("i",{className:"iconfont icon-liulanyan"}),Dn.createElement("span",null,An.visits))),An.course_members_count>0&&Dn.createElement(jt.Z,{title:"\u6210\u5458",placement:"bottom"},Dn.createElement("span",null,Dn.createElement("i",{className:"iconfont icon-chengyuan"}),An.course_members_count)),An.tasks_count>0&&Dn.createElement(jt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Dn.createElement("span",null,Dn.createElement("i",{className:"iconfont icon-zuoye"}),An.tasks_count)),An.is_end?Dn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Dn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!An.is_accessible&&Dn.createElement("div",{className:_e.lockWrap},Dn.createElement("img",{src:`${se.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Dn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!oi.length&&Dn.createElement(me.Z,null)))},Tn={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Yn=bt(89070),ui=({dataSource:Ci=[],value:oi,onChange:Ie,className:Le,style:Gt={},tabBarExtraContent:We})=>wt.createElement("div",{className:be()(Tn.tabs,Le),style:Gt},wt.createElement("div",{className:Tn.tabsWrap},Ci.map((Ye,ce)=>!(Ye!=null&&Ye.hide)&&wt.createElement("aside",{className:Tn.tab,onClick:()=>{Ie(Ye.id),Ye.link&&Yn.history.push(Ye.link)},key:ce},wt.createElement("div",{className:oi===Ye.id?Tn.active:""},Ye.name),(Ye==null?void 0:Ye.resetCount)==null&&(Ye==null?void 0:Ye.total)!==void 0&&wt.createElement("span",null,"\uFF08",Ye==null?void 0:Ye.total,"\uFF09"),(Ye==null?void 0:Ye.resetCount)!==void 0&&(Ye==null?void 0:Ye.total)!==void 0&&wt.createElement(jt.Z,{title:(Ye==null?void 0:Ye.tip)!=null?Ye==null?void 0:Ye.tip:""},wt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",wt.createElement("span",{style:{color:"#000"}},Ye==null?void 0:Ye.resetCount),"/",wt.createElement("span",null,Ye==null?void 0:Ye.total),"\uFF09"))))),wt.createElement("div",{className:Tn.tabBar},We)),$n=({className:Ci,style:oi={},children:Ie})=>wt.createElement("div",{className:be()(Ci),style:oi},Ie),Pi={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Ot=bt(38854),Lt=bt(20834);const St=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Kt=({sortValue:Ci,dropValue:oi,className:Ie,onSort:Le,onDrop:Gt,dataSource:We=St})=>{var Ye;return wt.createElement("div",{className:be()(Pi.orderWrap,Ie)},wt.createElement(Ot.Z,{dropdownRender:()=>wt.createElement(Lt.default,null,We.map((ce,qt)=>wt.createElement(Lt.default.Item,{key:qt,onClick:()=>Gt(ce.id)},ce.name)))},wt.createElement("span",{className:Pi.orderTextWrap},(Ye=We.find(ce=>oi===ce.id))==null?void 0:Ye.name)),wt.createElement("span",{className:Pi.orderIconWrap},wt.createElement("span",{className:Pi.orderAsc},wt.createElement("i",{className:Ci==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Pi.cursorPointer} ${Pi.active}`:`iconfont icon-sanjiaoxing-up font12 ${Pi.cursorPointer}`,onClick:()=>Le(Ci==="asc"?"desc":"asc")})),wt.createElement("span",{className:Pi.orderDesc},wt.createElement("i",{className:Ci==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Pi.cursorPointer} ${Pi.active}`:`iconfont icon-sanjiaoxing-down font12 ${Pi.cursorPointer}`,onClick:()=>Le(Ci==="asc"?"desc":"asc")}))))},xt={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Me=bt(3113),De=Object.defineProperty,le=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,xe=(Ci,oi,Ie)=>oi in Ci?De(Ci,oi,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Ci[oi]=Ie,ue=(Ci,oi)=>{for(var Ie in oi||(oi={}))ee.call(oi,Ie)&&xe(Ci,Ie,oi[Ie]);if(le)for(var Ie of le(oi))Se.call(oi,Ie)&&xe(Ci,Ie,oi[Ie]);return Ci},Te=(Ci,oi)=>{var Ie={};for(var Le in Ci)ee.call(Ci,Le)&&oi.indexOf(Le)<0&&(Ie[Le]=Ci[Le]);if(Ci!=null&&le)for(var Le of le(Ci))oi.indexOf(Le)<0&&Se.call(Ci,Le)&&(Ie[Le]=Ci[Le]);return Ie},vn=(Ci,oi,Ie)=>new Promise((Le,Gt)=>{var We=qt=>{try{ce(Ie.next(qt))}catch(He){Gt(He)}},Ye=qt=>{try{ce(Ie.throw(qt))}catch(He){Gt(He)}},ce=qt=>qt.done?Le(qt.value):Promise.resolve(qt.value).then(We,Ye);ce((Ie=Ie.apply(Ci,oi)).next())}),en=Ci=>{var oi=Ci,{className:Ie,style:Le,children:Gt,loading:We=!1,openLoading:Ye,onClick:ce=()=>{},size:qt="middle",shape:He="round"}=oi,un=Te(oi,["className","style","children","loading","openLoading","onClick","size","shape"]);const[An,Fn]=(0,wt.useState)(!1);return wt.createElement(Me.ZP,ue({onClick:(0,ye.throttle)(oe=>vn(void 0,null,function*(){Ye&&Fn(!0);try{yield ce(oe)}catch(qe){console.log("error",qe)}Ye&&Fn(!1)}),2e3,{leading:!0,trailing:!1}),className:be()(xt.btn,xt[`${qt}-${He}`],Ie),style:Le,size:qt,shape:He,loading:An||We},un),Gt)},xn={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},tn=({className:Ci,style:oi,children:Ie=null,onClick:Le,title:Gt})=>wt.createElement("div",{className:be()(xn.head,Ci),style:oi},wt.createElement("span",{className:"primary-hover",onClick:Le},wt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),wt.createElement("b",{title:Gt},Gt),wt.createElement("div",{className:xn.node},Ie)),ii={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Un=({confirmShow:Ci=!0,confirmTitle:oi,confirmClick:Ie,cancelShow:Le=!0,cancelTitle:Gt,cancelClick:We,className:Ye,style:ce,confirmLoading:qt=!1})=>wt.createElement("div",{className:be()(ii.btns,Ye),style:ce},Ci&&wt.createElement(Me.ZP,{loading:qt,onClick:Ie,type:"primary",className:ii.confirm},oi),Le&&wt.createElement(Me.ZP,{onClick:We,className:ii.cancel},Gt)),si={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Hi=({className:Ci,style:oi={},LeftContent:Ie,children:Le,RightContent:Gt})=>wt.createElement("div",{className:be()(si.fixedBottom,Ci),style:oi},wt.createElement("div",{className:si.wrap},wt.createElement("div",{className:si.left},Ie),wt.createElement("div",{className:si.center},Le),wt.createElement("div",{className:si.right},Gt))),Xi={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Oo=({className:Ci,style:oi={},dataSource:Ie=[]})=>wt.createElement("div",{className:be()(Xi.crumbs,Ci),style:oi},Ie.map((Le,Gt)=>Gt<Ie.length-1?wt.createElement(wt.Fragment,{key:Gt},Le.path||Le.onClick?wt.createElement("span",{className:Xi.hover,onClick:Le!=null&&Le.onClick?Le.onClick:()=>Yn.history.push(Le.path)},Le.name):wt.createElement("span",null,Le.name),wt.createElement("span",null,"\xA0",">","\xA0")):wt.createElement("span",{key:Gt,style:{color:"#5F6368"}},Le.name))),No=bt(31797),Io=Object.defineProperty,_o=Object.defineProperties,qo=Object.getOwnPropertyDescriptors,Ni=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,Mt=(Ci,oi,Ie)=>oi in Ci?Io(Ci,oi,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Ci[oi]=Ie,cr=(Ci,oi)=>{for(var Ie in oi||(oi={}))$o.call(oi,Ie)&&Mt(Ci,Ie,oi[Ie]);if(Ni)for(var Ie of Ni(oi))Ro.call(oi,Ie)&&Mt(Ci,Ie,oi[Ie]);return Ci},ir=(Ci,oi)=>_o(Ci,qo(oi)),pr=(Ci,oi)=>{var Ie={};for(var Le in Ci)$o.call(Ci,Le)&&oi.indexOf(Le)<0&&(Ie[Le]=Ci[Le]);if(Ci!=null&&Ni)for(var Le of Ni(Ci))oi.indexOf(Le)<0&&Ro.call(Ci,Le)&&(Ie[Le]=Ci[Le]);return Ie};const{Countdown:ts}=No.default;var ls=Ci=>{var oi=Ci,{onChange:Ie}=oi,Le=pr(oi,["onChange"]);const[Gt,We]=(0,wt.useState)(null);(0,wt.useEffect)(()=>{typeof Gt=="number"&&Gt>=0&&Ie(Gt)},[Gt]);const Ye=ce=>{const qt=Math.floor(ce/1e3);We(qt)};return wt.createElement(ts,ir(cr({},Le),{onChange:Ye}))}},58856:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return te}});var wt=bt(59301);function te(de,Re){const ne=(0,wt.useRef)();(0,wt.useEffect)(()=>{ne.current=de}),(0,wt.useEffect)(()=>{function ae(){ne.current()}if(Re!==null){let Tt=setInterval(ae,Re);return()=>clearInterval(Tt)}},[Re])}},25600:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return ne}});var wt=bt(59301),te=bt(71418),de={loading:"loading___lueiN"},ne=({loading:ae})=>ae?wt.createElement("div",{className:de.loading},wt.createElement(te.Z,null)):wt.createElement(wt.Fragment,null)},82238:function(gn,Ln,bt){"use strict";var wt=bt(59301),te=bt(43418),de=bt(1710),Re=bt(99064),ne=bt(8797),ae=bt(61186),Tt=bt.n(ae),be=bt(12290),ye=Object.defineProperty,Jt=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,je=(ht,lt,gt)=>lt in ht?ye(ht,lt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):ht[lt]=gt,Nt=(ht,lt)=>{for(var gt in lt||(lt={}))Be.call(lt,gt)&&je(ht,gt,lt[gt]);if(Jt)for(var gt of Jt(lt))pe.call(lt,gt)&&je(ht,gt,lt[gt]);return ht},et=(ht,lt,gt)=>new Promise((vt,Pt)=>{var At=_t=>{try{jt(gt.next(_t))}catch(se){Pt(se)}},Bt=_t=>{try{jt(gt.throw(_t))}catch(se){Pt(se)}},jt=_t=>_t.done?vt(_t.value):Promise.resolve(_t.value).then(At,Bt);jt((gt=gt.apply(ht,lt)).next())});const nt=({visible:ht,identifier:lt,challenge_id:gt,onCancle:vt,onOK:Pt})=>{const[At,Bt]=(0,wt.useState)(0),[jt,_t]=(0,wt.useState)([]),[se,Vt]=(0,wt.useState)(!1),[he,Zt]=(0,wt.useState)({page:1,limit:10}),Oe=()=>et(void 0,null,function*(){var me,Ve;Vt(!0);const Xe=yield(0,Re.ZP)(`/api/shixuns/${lt}/challenges/${gt}/task_pass_histories.json`,{method:"get",params:Nt({},he)});(Xe==null?void 0:Xe.status)===0&&(Bt((me=Xe==null?void 0:Xe.data)==null?void 0:me.size),_t(((Ve=Xe==null?void 0:Xe.data)==null?void 0:Ve.list)||[])),Vt(!1)});return(0,wt.useEffect)(()=>{ht&&Oe()},[ht]),wt.createElement(te.default,{centered:!0,destroyOnClose:!0,open:ht,title:"\u7248\u672C\u7BA1\u7406",footer:null,width:620,onCancel:()=>{he.page=1,he.limit=10,Zt(Nt({},he)),vt()}},wt.createElement(de.default,{scroll:{y:47*10},loading:se,dataSource:jt,locale:{emptyText:wt.createElement(ne.Z,null)},columns:[{title:"\u7248\u672C\u4FDD\u5B58\u65F6\u95F4",dataIndex:"updated_at",ellipsis:!0,render:(me,Ve,Xe)=>Tt()(me).format("YYYY-MM-DD hh:mm:ss")},{title:"\u4FDD\u5B58\u4EBA",dataIndex:"user_name",width:110,ellipsis:!0,render:me=>me},{title:"\u64CD\u4F5C",dataIndex:"task_pass",align:"right",render(me,Ve,Xe){return wt.createElement("div",null,wt.createElement("a",{onClick:()=>{te.default.confirm({icon:null,width:800,centered:!0,closable:!0,title:"\u4EFB\u52A1\u8981\u6C42\u8BE6\u60C5",content:wt.createElement("div",{className:"mb10"},wt.createElement(be.Z,{key:gt||"3",watch:!0,defaultValue:Ve==null?void 0:Ve.task_pass})),footer:null})}},"\u67E5\u770B"),wt.createElement("a",{onClick:()=>et(this,null,function*(){te.default.confirm({icon:null,width:500,centered:!0,closable:!0,title:"\u7248\u672C\u5207\u6362\u786E\u8BA4",content:wt.createElement("div",null,wt.createElement("div",null,"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u4EFB\u52A1\u8981\u6C42\u5185\u5BB9\u5207\u6362\u81F3 ",Tt()(Ve==null?void 0:Ve.updated_at).format("YYYY-MM-DD hh:mm:ss")," \u7248\u672C\uFF1F"),wt.createElement("div",null,"\u7248\u672C\u5207\u6362\u4F1A\u5C06\u5F53\u524D\u4EFB\u52A1\u8981\u6C42\u5185\u5BB9\u5B8C\u5168\u8986\u76D6\uFF0C\u5EFA\u8BAE\u5C06\u6700\u65B0\u4EFB\u52A1\u8981\u6C42\u5185\u5BB9\u4FDD\u5B58\u540E\uFF0C\u518D\u8FDB\u884C\u5207\u6362\u3002")),okText:"\u786E\u8BA4\u5207\u6362",cancelText:"\u53D6\u6D88",onOk:()=>et(this,null,function*(){yield Pt(Ve==null?void 0:Ve.task_pass),vt()})})}),className:"ml20"},"\u5207\u6362\u81F3\u8BE5\u7248\u672C"))}}],onChange:me=>{he.page=me==null?void 0:me.current,he.limit=me==null?void 0:me.pageSize,Oe(),Zt(Nt({},he))},pagination:{pageSize:he.limit,total:At,current:he.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,showTotal:me=>wt.createElement("span",{className:"mr10"},"\u5171",wt.createElement("span",{className:"c-orange"},me),"\u6761\u6570\u636E")}}))};Ln.Z=nt},16349:function(gn,Ln,bt){"use strict";bt.d(Ln,{S:function(){return ae},m:function(){return Tt}});var wt=bt(955),te=bt(8591),de=bt(43418),Re=bt(59301),ne=(be,ye,Jt)=>new Promise((Be,pe)=>{var je=nt=>{try{et(Jt.next(nt))}catch(ht){pe(ht)}},Nt=nt=>{try{et(Jt.throw(nt))}catch(ht){pe(ht)}},et=nt=>nt.done?Be(nt.value):Promise.resolve(nt.value).then(je,Nt);et((Jt=Jt.apply(be,ye)).next())});const ae=be=>{let ye=document.createElement("textarea");return ye.value=be,ye.value},Tt=(be,ye,Jt,Be,pe)=>ne(void 0,null,function*(){var je,Nt;const et=yield be({type:"shixunsDetail/saveCopyForExercise",payload:{id:Jt,save_type:Be}});Be===1?((et==null?void 0:et.status)==0&&te.ZP.success("\u4FDD\u5B58\u6210\u529F"),(je=et==null?void 0:et.data)!=null&&je.exists_same_shixun_name?be({type:"classroomList/setActionTabs",payload:{key:"\u91CD\u540D\u4FEE\u6539",name:(Nt=et==null?void 0:et.data)==null?void 0:Nt.shixun_name}}):be({type:"classroomList/setActionTabs",payload:{}})):(be({type:"classroomList/setActionTabs",payload:{}}),(et==null?void 0:et.status)===0&&de.default.info({title:"\u63D0\u793A",width:460,icon:null,centered:!0,content:Re.createElement("div",null,Re.createElement("div",null,"\u5B9E\u8BAD\u540C\u6B65\u4FEE\u6539\u5B8C\u6210\uFF0C\u8BF7\u9A8C\u8BC1\u5B9E\u8BAD\u662F\u5426\u53EF\u4EE5\u6B63\u5E38\u4F7F\u7528\u3002")),okText:"\u524D\u5F80\u539F\u5B9E\u8BAD",onOk:()=>{var nt,ht;(0,wt.xg)(`/shixuns/${(ht=(nt=ye==null?void 0:ye.detail)==null?void 0:nt.fork_from)==null?void 0:ht.fork_identifier}/challenges`)}}))})},24768:function(gn,Ln,bt){"use strict";bt.d(Ln,{AL:function(){return Pt},Iy:function(){return Be},Qv:function(){return Nt},ez:function(){return vt},jb:function(){return pe}});var wt=bt(32834),te=bt.n(wt),de=bt(11690),Re=bt.n(de);let ne=1;function ae(se,Vt){const he=se.match(/^(\s+)(?:```)/);if(he===null)return Vt;const Zt=he[1];return Vt.split(`
|
|
|
`).map(Oe=>{const me=Oe.match(/^\s+/);if(me===null)return Oe;const[Ve]=me;return Ve.length>=Zt.length?Oe.slice(Zt.length):Oe}).join(`
|
|
|
`)}let Tt=[],be=["<ul>"];const ye=new(te()).Renderer,Jt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Be(){Tt.length=0,be=["<ul>"]}const pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function je(se,Vt,he,Zt){if(Vt>=se.length||se[Vt].level<=he)return Vt;var Oe=se[Vt];Zt.push("<li><a href='#"+ne+Oe.anchor+"'>"+Oe.text+"</a>"),Vt++;var me=[];return Vt=je(se,Vt,Oe.level,me),me.length>0&&(Zt.push("<ul>"),me.forEach(function(Ve){Zt.push(Ve)}),Zt.push("</ul>")),Zt.push("</li>"),Vt=je(se,Vt,he,Zt),Vt}function Nt(){return je(Tt,0,0,be),be.push("</ul>"),be.join("")}const et={heading(se){const Vt=Jt.exec(se);if(ne+=1,Vt)return{type:"heading",raw:Vt[0],depth:Vt[1].length,text:Vt[2]}},fences(se){const Vt=this.rules.block.fences.exec(se);if(Vt){const he=Vt[0];let Zt=ae(he,Vt[3]||"");const Oe=Vt[2]?Vt[2].trim():Vt[2];if(["latex","katex","math"].indexOf(Oe)>=0){const me=lt(),Ve=Zt;Zt=me,gt[me]={type:"block",expression:Ve}}return{type:"code",raw:he,lang:Oe,text:Zt}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const lt=()=>`__special_katext_id_${ht++}__`;let gt={};function vt(){return gt}function Pt(){ht=0,gt={}}function At(se){return se=se.replace(nt,(Vt,he)=>{const Zt=lt();return gt[Zt]={type:"inline",expression:he},Zt}),se}const Bt=ye.listitem;ye.listitem=function(se){return Bt(At(se))};const jt=ye.paragraph;ye.paragraph=function(se){return jt(At(se))};const _t=ye.tablecell;ye.tablecell=function(se,Vt){return _t(At(se),Vt)},ye.code=function(se,Vt,he){const Zt=(Vt||"").match(/\S*/)[0];return Zt?["latex","katex","math"].indexOf(Zt)>=0?`<p class='editormd-tex'>${se}</p>`:`<pre class="prettyprint linenums"><code class="language-${Vt}">${he?se:(0,de.escape)(se,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(he?se:(0,de.escape)(se,!0))+"</code></pre>"},ye.heading=function(se,Vt,he){let Zt=this.options.headerPrefix+he.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Tt.push({anchor:Zt,level:Vt,text:se}),"<h"+Vt+' id="'+ne+Zt+'">'+se+"</h"+Vt+">"},te().setOptions({silent:!0,gfm:!0,pedantic:!1}),te().use({tokenizer:et,renderer:ye}),Ln.ZP=te()},50371:function(gn,Ln){"use strict";function bt(){const wt=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let te=1;te<arguments.length;te++){const de=te<0||arguments.length<=te?void 0:arguments[te];de&&Object.keys(de).forEach(Re=>{const ne=de[Re];ne!==void 0&&(wt[Re]=ne)})}return wt}Ln.Z=bt},77578:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return wt}});const wt=te=>te?typeof te=="function"?te():te:null},13845:function(gn,Ln,bt){"use strict";bt.d(Ln,{F:function(){return wt},Z:function(){return te}});function wt(de){return de!=null&&de===de.window}function te(de,Re){var ne,ae;if(typeof window=="undefined")return 0;const Tt=Re?"scrollTop":"scrollLeft";let be=0;return wt(de)?be=de[Re?"pageYOffset":"pageXOffset"]:de instanceof Document?be=de.documentElement[Tt]:(de instanceof HTMLElement||de)&&(be=de[Tt]),de&&!wt(de)&&typeof be!="number"&&(be=(ae=((ne=de.ownerDocument)!==null&&ne!==void 0?ne:de).documentElement)===null||ae===void 0?void 0:ae[Tt]),be}},68031:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return Re}});var wt=bt(16089);function te(ne,ae,Tt,be){const ye=Tt-ae;return ne/=be/2,ne<1?ye/2*ne*ne*ne+ae:ye/2*((ne-=2)*ne*ne+2)+ae}var de=bt(13845);function Re(ne){let ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Tt=()=>window,callback:be,duration:ye=450}=ae,Jt=Tt(),Be=(0,de.Z)(Jt,!0),pe=Date.now(),je=()=>{const et=Date.now()-pe,nt=te(et>ye?ye:et,Be,ne,ye);(0,de.F)(Jt)?Jt.scrollTo(window.pageXOffset,nt):Jt instanceof Document||Jt.constructor.name==="HTMLDocument"?Jt.documentElement.scrollTop=nt:Jt.scrollTop=nt,et<ye?(0,wt.Z)(je):typeof be=="function"&&be()};(0,wt.Z)(je)}},93891:function(gn,Ln,bt){"use strict";var wt=bt(59301),te=bt(36355),de=bt(64165);const Re=ne=>{const{componentName:ae}=ne,{getPrefixCls:Tt}=(0,wt.useContext)(te.E_),be=Tt("empty");switch(ae){case"Table":case"List":return wt.createElement(de.Z,{image:de.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return wt.createElement(de.Z,{image:de.Z.PRESENTED_IMAGE_SIMPLE,className:`${be}-small`});default:return wt.createElement(de.Z,null)}};Ln.Z=Re},78241:function(gn,Ln,bt){"use strict";bt.d(Ln,{default:function(){return Le}});var wt=bt(80702),te=bt(92310),de=bt.n(te),Re=bt(77900),ne=bt(59301),ae=bt(62892),Tt=bt(32441);function be(Gt){const[We,Ye]=ne.useState(Gt);return ne.useEffect(()=>{const ce=setTimeout(()=>{Ye(Gt)},Gt.length?0:10);return()=>{clearTimeout(ce)}},[Gt]),We}var ye=bt(17313),Jt=bt(29878),Be=bt(8378),pe=bt(37613),je=bt(83116),et=Gt=>{const{componentCls:We}=Gt,Ye=`${We}-show-help`,ce=`${We}-show-help-item`;return{[Ye]:{transition:`opacity ${Gt.motionDurationSlow} ${Gt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[ce]:{overflow:"hidden",transition:`height ${Gt.motionDurationSlow} ${Gt.motionEaseInOut},
|
|
|
opacity ${Gt.motionDurationSlow} ${Gt.motionEaseInOut},
|
|
|
transform ${Gt.motionDurationSlow} ${Gt.motionEaseInOut} !important`,[`&${ce}-appear, &${ce}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${ce}-leave-active`]:{transform:"translateY(-5px)"}}}}};const nt=Gt=>({legend:{display:"block",width:"100%",marginBottom:Gt.marginLG,padding:0,color:Gt.colorTextDescription,fontSize:Gt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Gt.lineWidth}px ${Gt.lineType} ${Gt.colorBorder}`},label:{fontSize:Gt.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 ${Gt.controlOutlineWidth}px ${Gt.controlOutline}`},output:{display:"block",paddingTop:15,color:Gt.colorText,fontSize:Gt.fontSize,lineHeight:Gt.lineHeight}}),ht=(Gt,We)=>{const{formItemCls:Ye}=Gt;return{[Ye]:{[`${Ye}-label > label`]:{height:We},[`${Ye}-control-input`]:{minHeight:We}}}},lt=Gt=>{const{componentCls:We}=Gt;return{[Gt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ye.Wf)(Gt)),nt(Gt)),{[`${We}-text`]:{display:"inline-block",paddingInlineEnd:Gt.paddingSM},"&-small":Object.assign({},ht(Gt,Gt.controlHeightSM)),"&-large":Object.assign({},ht(Gt,Gt.controlHeightLG))})}},gt=Gt=>{const{formItemCls:We,iconCls:Ye,componentCls:ce,rootPrefixCls:qt,labelRequiredMarkColor:He,labelColor:un,labelFontSize:An,labelHeight:Fn,labelColonMarginInlineStart:oe,labelColonMarginInlineEnd:qe,itemMarginBottom:bn}=Gt;return{[We]:Object.assign(Object.assign({},(0,ye.Wf)(Gt)),{marginBottom:bn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${qt}-row`]:{display:"none"},"&-has-warning":{[`${We}-split`]:{color:Gt.colorError}},"&-has-error":{[`${We}-split`]:{color:Gt.colorWarning}},[`${We}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Gt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Fn,color:un,fontSize:An,[`> ${Ye}`]:{fontSize:Gt.fontSize,verticalAlign:"top"},[`&${We}-required:not(${We}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Gt.marginXXS,color:He,fontSize:Gt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${ce}-hide-required-mark &`]:{display:"none"}},[`${We}-optional`]:{display:"inline-block",marginInlineStart:Gt.marginXXS,color:Gt.colorTextDescription,[`${ce}-hide-required-mark &`]:{display:"none"}},[`${We}-tooltip`]:{color:Gt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Gt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:oe,marginInlineEnd:qe},[`&${We}-no-colon::after`]:{content:'"\\a0"'}}},[`${We}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${qt}-col-'"]):not([class*="' ${qt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Gt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[We]:{"&-explain, &-extra":{clear:"both",color:Gt.colorTextDescription,fontSize:Gt.fontSize,lineHeight:Gt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Gt.controlHeightSM,transition:`color ${Gt.motionDurationMid} ${Gt.motionEaseOut}`},"&-explain":{"&-error":{color:Gt.colorError},"&-warning":{color:Gt.colorWarning}}},[`&-with-help ${We}-explain`]:{height:"auto",opacity:1},[`${We}-feedback-icon`]:{fontSize:Gt.fontSize,textAlign:"center",visibility:"visible",animationName:Jt.kr,animationDuration:Gt.motionDurationMid,animationTimingFunction:Gt.motionEaseOutBack,pointerEvents:"none","&-success":{color:Gt.colorSuccess},"&-error":{color:Gt.colorError},"&-warning":{color:Gt.colorWarning},"&-validating":{color:Gt.colorPrimary}}})}},vt=Gt=>{const{componentCls:We,formItemCls:Ye}=Gt;return{[`${We}-horizontal`]:{[`${Ye}-label`]:{flexGrow:0},[`${Ye}-control`]:{flex:"1 1 0",minWidth:0},[`${Ye}-label[class$='-24'], ${Ye}-label[class*='-24 ']`]:{[`& + ${Ye}-control`]:{minWidth:"unset"}}}}},Pt=Gt=>{const{componentCls:We,formItemCls:Ye}=Gt;return{[`${We}-inline`]:{display:"flex",flexWrap:"wrap",[Ye]:{flex:"none",marginInlineEnd:Gt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Ye}-label,
|
|
|
> ${Ye}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Ye}-label`]:{flex:"none"},[`${We}-text`]:{display:"inline-block"},[`${Ye}-has-feedback`]:{display:"inline-block"}}}}},At=Gt=>({padding:Gt.verticalLabelPadding,margin:Gt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Bt=Gt=>{const{componentCls:We,formItemCls:Ye,rootPrefixCls:ce}=Gt;return{[`${Ye} ${Ye}-label`]:At(Gt),[We]:{[Ye]:{flexWrap:"wrap",[`${Ye}-label, ${Ye}-control`]:{[`&:not([class*=" ${ce}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},jt=Gt=>{const{componentCls:We,formItemCls:Ye,rootPrefixCls:ce}=Gt;return{[`${We}-vertical`]:{[Ye]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${We}-item-control`]:{width:"100%"}}},[`${We}-vertical ${Ye}-label,
|
|
|
.${ce}-col-24${Ye}-label,
|
|
|
.${ce}-col-xl-24${Ye}-label`]:At(Gt),[`@media (max-width: ${Gt.screenXSMax}px)`]:[Bt(Gt),{[We]:{[`.${ce}-col-xs-24${Ye}-label`]:At(Gt)}}],[`@media (max-width: ${Gt.screenSMMax}px)`]:{[We]:{[`.${ce}-col-sm-24${Ye}-label`]:At(Gt)}},[`@media (max-width: ${Gt.screenMDMax}px)`]:{[We]:{[`.${ce}-col-md-24${Ye}-label`]:At(Gt)}},[`@media (max-width: ${Gt.screenLGMax}px)`]:{[We]:{[`.${ce}-col-lg-24${Ye}-label`]:At(Gt)}}}},_t=(Gt,We)=>(0,pe.TS)(Gt,{formItemCls:`${Gt.componentCls}-item`,rootPrefixCls:We});var se=(0,je.Z)("Form",(Gt,We)=>{let{rootPrefixCls:Ye}=We;const ce=_t(Gt,Ye);return[lt(ce),gt(ce),et(ce),vt(ce),Pt(ce),jt(ce),(0,Be.Z)(ce),Jt.kr]},Gt=>({labelRequiredMarkColor:Gt.colorError,labelColor:Gt.colorTextHeading,labelFontSize:Gt.fontSize,labelHeight:Gt.controlHeight,labelColonMarginInlineStart:Gt.marginXXS/2,labelColonMarginInlineEnd:Gt.marginXS,itemMarginBottom:Gt.marginLG,verticalLabelPadding:`0 0 ${Gt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Vt=[];function he(Gt,We,Ye){let ce=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Gt=="string"?Gt:`${We}-${ce}`,error:Gt,errorStatus:Ye}}var Oe=Gt=>{let{help:We,helpStatus:Ye,errors:ce=Vt,warnings:qt=Vt,className:He,fieldId:un,onVisibleChanged:An}=Gt;const{prefixCls:Fn}=ne.useContext(Tt.Rk),oe=`${Fn}-item-explain`,[,qe]=se(Fn),bn=(0,ne.useMemo)(()=>(0,ae.Z)(Fn),[Fn]),Jn=be(ce),Ke=be(qt),Qe=ne.useMemo(()=>We!=null?[he(We,"help",Ye)]:[].concat((0,wt.Z)(Jn.map((Wn,fi)=>he(Wn,"error","error",fi))),(0,wt.Z)(Ke.map((Wn,fi)=>he(Wn,"warning","warning",fi)))),[We,Ye,Jn,Ke]),zn={};return un&&(zn.id=`${un}_help`),ne.createElement(Re.default,{motionDeadline:bn.motionDeadline,motionName:`${Fn}-show-help`,visible:!!Qe.length,onVisibleChanged:An},Wn=>{const{className:fi,style:Hn}=Wn;return ne.createElement("div",Object.assign({},zn,{className:de()(oe,fi,He,qe),style:Hn,role:"alert"}),ne.createElement(Re.CSSMotionList,Object.assign({keys:Qe},(0,ae.Z)(Fn),{motionName:`${Fn}-show-help-item`,component:!1}),_n=>{const{key:Vn,error:wi,errorStatus:Qi,className:qi,style:$e}=_n;return ne.createElement("div",{key:Vn,className:de()(qi,{[`${oe}-${Qi}`]:Qi}),style:$e},wi)}))})},me=bt(95013),Ve=bt(36355),Xe=bt(1684),Je=bt(52946),wn=bt(19716),Mn=bt(16722);const we=["parentNode"],Yt="form_item";function _e(Gt){return Gt===void 0||Gt===!1?[]:Array.isArray(Gt)?Gt:[Gt]}function Zn(Gt,We){if(!Gt.length)return;const Ye=Gt.join("_");return We?`${We}_${Ye}`:we.includes(Ye)?`${Yt}_${Ye}`:Ye}function Dn(Gt,We,Ye,ce,qt,He){let un=ce;return He!==void 0?un=He:Ye.validating?un="validating":Gt.length?un="error":We.length?un="warning":(Ye.touched||qt&&Ye.validated)&&(un="success"),un}function Ne(Gt){return _e(Gt).join("_")}function pn(Gt){const[We]=(0,me.useForm)(),Ye=ne.useRef({}),ce=ne.useMemo(()=>Gt!=null?Gt:Object.assign(Object.assign({},We),{__INTERNAL__:{itemRef:qt=>He=>{const un=Ne(qt);He?Ye.current[un]=He:delete Ye.current[un]}},scrollToField:function(qt){let He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const un=_e(qt),An=Zn(un,ce.__INTERNAL__.name),Fn=An?document.getElementById(An):null;Fn&&(0,Mn.Z)(Fn,Object.assign({scrollMode:"if-needed",block:"nearest"},He))},getFieldInstance:qt=>{const He=Ne(qt);return Ye.current[He]}}),[Gt,We]);return[ce]}var Tn=bt(28726),Yn=function(Gt,We){var Ye={};for(var ce in Gt)Object.prototype.hasOwnProperty.call(Gt,ce)&&We.indexOf(ce)<0&&(Ye[ce]=Gt[ce]);if(Gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ce=Object.getOwnPropertySymbols(Gt);qt<ce.length;qt++)We.indexOf(ce[qt])<0&&Object.prototype.propertyIsEnumerable.call(Gt,ce[qt])&&(Ye[ce[qt]]=Gt[ce[qt]]);return Ye};const mn=(Gt,We)=>{const Ye=ne.useContext(Xe.Z),{getPrefixCls:ce,direction:qt,form:He}=ne.useContext(Ve.E_),{prefixCls:un,className:An,rootClassName:Fn,size:oe,disabled:qe=Ye,form:bn,colon:Jn,labelAlign:Ke,labelWrap:Qe,labelCol:zn,wrapperCol:Wn,hideRequiredMark:fi,layout:Hn="horizontal",scrollToFirstError:_n,requiredMark:Vn,onFinishFailed:wi,name:Qi,style:qi,feedbackIcons:$e}=Gt,lo=Yn(Gt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Co=(0,wn.Z)(oe),jo=ne.useContext(Tn.Z),Ue=(0,ne.useMemo)(()=>Vn!==void 0?Vn:He&&He.requiredMark!==void 0?He.requiredMark:!fi,[fi,Vn,He]),jn=Jn!=null?Jn:He==null?void 0:He.colon,qn=ce("form",un),[Mi,vi]=se(qn),pi=de()(qn,`${qn}-${Hn}`,{[`${qn}-hide-required-mark`]:Ue===!1,[`${qn}-rtl`]:qt==="rtl",[`${qn}-${Co}`]:Co},vi,He==null?void 0:He.className,An,Fn),[Ui]=pn(bn),{__INTERNAL__:ki}=Ui;ki.name=Qi;const zi=(0,ne.useMemo)(()=>({name:Qi,labelAlign:Ke,labelCol:zn,labelWrap:Qe,wrapperCol:Wn,vertical:Hn==="vertical",colon:jn,requiredMark:Ue,itemRef:ki.itemRef,form:Ui,feedbackIcons:$e}),[Qi,Ke,zn,Wn,Hn,jn,Ue,Ui,$e]);ne.useImperativeHandle(We,()=>Ui);const uo=(Xo,sn)=>{if(Xo){let ho={block:"nearest"};typeof Xo=="object"&&(ho=Xo),Ui.scrollToField(sn,ho)}},cn=Xo=>{if(wi==null||wi(Xo),Xo.errorFields.length){const sn=Xo.errorFields[0].name;if(_n!==void 0){uo(_n,sn);return}He&&He.scrollToFirstError!==void 0&&uo(He.scrollToFirstError,sn)}};return Mi(ne.createElement(Xe.n,{disabled:qe},ne.createElement(Je.q,{size:Co},ne.createElement(Tt.RV,Object.assign({},{validateMessages:jo}),ne.createElement(Tt.q3.Provider,{value:zi},ne.createElement(me.default,Object.assign({id:Qi},lo,{name:Qi,onFinishFailed:cn,form:Ui,style:Object.assign(Object.assign({},He==null?void 0:He.style),qi),className:pi})))))))};var Ce=ne.forwardRef(mn),$n=bt(41799),Pi=bt(8654),Ot=bt(92343),Lt=bt(11592);function St(Gt){if(typeof Gt=="function")return Gt;const We=(0,Lt.Z)(Gt);return We.length<=1?We[0]:We}const It=()=>{const{status:Gt,errors:We=[],warnings:Ye=[]}=(0,ne.useContext)(Tt.aM);return{status:Gt,errors:We,warnings:Ye}};It.Context=Tt.aM;var Kt=It,xt=bt(16089);function Me(Gt){const[We,Ye]=ne.useState(Gt),ce=(0,ne.useRef)(null),qt=(0,ne.useRef)([]),He=(0,ne.useRef)(!1);ne.useEffect(()=>(He.current=!1,()=>{He.current=!0,xt.Z.cancel(ce.current),ce.current=null}),[]);function un(An){He.current||(ce.current===null&&(qt.current=[],ce.current=(0,xt.Z)(()=>{ce.current=null,Ye(Fn=>{let oe=Fn;return qt.current.forEach(qe=>{oe=qe(oe)}),oe})})),qt.current.push(An))}return[We,un]}function De(){const{itemRef:Gt}=ne.useContext(Tt.q3),We=ne.useRef({});function Ye(ce,qt){const He=qt&&typeof qt=="object"&&qt.ref,un=ce.join("_");return(We.current.name!==un||We.current.originRef!==He)&&(We.current.name=un,We.current.originRef=He,We.current.ref=(0,Pi.sQ)(Gt(ce),He)),We.current.ref}return Ye}var le=bt(29194),ee=bt(34280),Se=bt(2738),xe=bt(27382),ue=bt(37028);const Te=Gt=>{const{formItemCls:We}=Gt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${We}-control`]:{display:"flex"}}}};var vn=(0,je.b)(["Form","item-item"],(Gt,We)=>{let{rootPrefixCls:Ye}=We;const ce=_t(Gt,Ye);return[Te(ce)]}),en=Gt=>{const{prefixCls:We,status:Ye,wrapperCol:ce,children:qt,errors:He,warnings:un,_internalItemRender:An,extra:Fn,help:oe,fieldId:qe,marginBottom:bn,onErrorVisibleChanged:Jn}=Gt,Ke=`${We}-item`,Qe=ne.useContext(Tt.q3),zn=ce||Qe.wrapperCol||{},Wn=de()(`${Ke}-control`,zn.className),fi=ne.useMemo(()=>Object.assign({},Qe),[Qe]);delete fi.labelCol,delete fi.wrapperCol;const Hn=ne.createElement("div",{className:`${Ke}-control-input`},ne.createElement("div",{className:`${Ke}-control-input-content`},qt)),_n=ne.useMemo(()=>({prefixCls:We,status:Ye}),[We,Ye]),Vn=bn!==null||He.length||un.length?ne.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ne.createElement(Tt.Rk.Provider,{value:_n},ne.createElement(Oe,{fieldId:qe,errors:He,warnings:un,help:oe,helpStatus:Ye,className:`${Ke}-explain-connected`,onVisibleChanged:Jn})),!!bn&&ne.createElement("div",{style:{width:0,height:bn}})):null,wi={};qe&&(wi.id=`${qe}_extra`);const Qi=Fn?ne.createElement("div",Object.assign({},wi,{className:`${Ke}-extra`}),Fn):null,qi=An&&An.mark==="pro_table_render"&&An.render?An.render(Gt,{input:Hn,errorList:Vn,extra:Qi}):ne.createElement(ne.Fragment,null,Hn,Vn,Qi);return ne.createElement(Tt.q3.Provider,{value:fi},ne.createElement(ue.Z,Object.assign({},zn,{className:Wn}),qi),ne.createElement(vn,{prefixCls:We}))},xn=bt(61485),ln=bt(31724),tn=bt(9763),ii=bt(6848),ri=function(Gt,We){var Ye={};for(var ce in Gt)Object.prototype.hasOwnProperty.call(Gt,ce)&&We.indexOf(ce)<0&&(Ye[ce]=Gt[ce]);if(Gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ce=Object.getOwnPropertySymbols(Gt);qt<ce.length;qt++)We.indexOf(ce[qt])<0&&Object.prototype.propertyIsEnumerable.call(Gt,ce[qt])&&(Ye[ce[qt]]=Gt[ce[qt]]);return Ye};function Un(Gt){return Gt?typeof Gt=="object"&&!ne.isValidElement(Gt)?Gt:{title:Gt}:null}var mi=Gt=>{let{prefixCls:We,label:Ye,htmlFor:ce,labelCol:qt,labelAlign:He,colon:un,required:An,requiredMark:Fn,tooltip:oe}=Gt;var qe;const[bn]=(0,tn.Z)("Form"),{vertical:Jn,labelAlign:Ke,labelCol:Qe,labelWrap:zn,colon:Wn}=ne.useContext(Tt.q3);if(!Ye)return null;const fi=qt||Qe||{},Hn=He||Ke,_n=`${We}-item-label`,Vn=de()(_n,Hn==="left"&&`${_n}-left`,fi.className,{[`${_n}-wrap`]:!!zn});let wi=Ye;const Qi=un===!0||Wn!==!1&&un!==!1;Qi&&!Jn&&typeof Ye=="string"&&Ye.trim()!==""&&(wi=Ye.replace(/[:|:]\s*$/,""));const $e=Un(oe);if($e){const{icon:Ue=ne.createElement(xn.Z,null)}=$e,jn=ri($e,["icon"]),qn=ne.createElement(ii.Z,Object.assign({},jn),ne.cloneElement(Ue,{className:`${We}-item-tooltip`,title:""}));wi=ne.createElement(ne.Fragment,null,wi,qn)}const lo=Fn==="optional",Co=typeof Fn=="function";Co?wi=Fn(wi,{required:!!An}):lo&&!An&&(wi=ne.createElement(ne.Fragment,null,wi,ne.createElement("span",{className:`${We}-item-optional`,title:""},(bn==null?void 0:bn.optional)||((qe=ln.Z.Form)===null||qe===void 0?void 0:qe.optional))));const jo=de()({[`${We}-item-required`]:An,[`${We}-item-required-mark-optional`]:lo||Co,[`${We}-item-no-colon`]:!Qi});return ne.createElement(ue.Z,Object.assign({},fi,{className:Vn}),ne.createElement("label",{htmlFor:ce,className:jo,title:typeof Ye=="string"?Ye:""},wi))},Hi=bt(29679),Xi=bt(19248),Lo=bt(96512),Oo=bt(58617);const No={success:Hi.Z,warning:Lo.Z,error:Xi.Z,validating:Oo.Z};function Io(Gt){let{children:We,errors:Ye,warnings:ce,hasFeedback:qt,validateStatus:He,prefixCls:un,meta:An,noStyle:Fn}=Gt;const oe=`${un}-item`,{feedbackIcons:qe}=ne.useContext(Tt.q3),bn=Dn(Ye,ce,An,null,!!qt,He),{isFormItemInput:Jn,status:Ke}=ne.useContext(Tt.aM),Qe=ne.useMemo(()=>{var zn;let Wn;if(qt){const _n=qt!==!0&&qt.icons||qe,Vn=bn&&((zn=_n==null?void 0:_n({status:bn,errors:Ye,warnings:ce}))===null||zn===void 0?void 0:zn[bn]),wi=bn&&No[bn];Wn=Vn!==!1&&wi?ne.createElement("span",{className:de()(`${oe}-feedback-icon`,`${oe}-feedback-icon-${bn}`)},Vn||ne.createElement(wi,null)):null}let fi=!0,Hn=bn||"";return Fn&&(fi=Jn,Hn=(bn!=null?bn:Ke)||""),{status:Hn,errors:Ye,warnings:ce,hasFeedback:!!qt,feedbackIcon:Wn,isFormItemInput:fi}},[bn,qt,Fn,Jn,Ke]);return ne.createElement(Tt.aM.Provider,{value:Qe},We)}var _o=function(Gt,We){var Ye={};for(var ce in Gt)Object.prototype.hasOwnProperty.call(Gt,ce)&&We.indexOf(ce)<0&&(Ye[ce]=Gt[ce]);if(Gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ce=Object.getOwnPropertySymbols(Gt);qt<ce.length;qt++)We.indexOf(ce[qt])<0&&Object.prototype.propertyIsEnumerable.call(Gt,ce[qt])&&(Ye[ce[qt]]=Gt[ce[qt]]);return Ye};function qo(Gt){const{prefixCls:We,className:Ye,rootClassName:ce,style:qt,help:He,errors:un,warnings:An,validateStatus:Fn,meta:oe,hasFeedback:qe,hidden:bn,children:Jn,fieldId:Ke,required:Qe,isRequired:zn,onSubItemMetaChange:Wn}=Gt,fi=_o(Gt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Hn=`${We}-item`,{requiredMark:_n}=ne.useContext(Tt.q3),Vn=ne.useRef(null),wi=be(un),Qi=be(An),qi=He!=null,$e=!!(qi||un.length||An.length),lo=!!Vn.current&&(0,le.Z)(Vn.current),[Co,jo]=ne.useState(null);(0,ee.Z)(()=>{if($e&&Vn.current){const vi=getComputedStyle(Vn.current);jo(parseInt(vi.marginBottom,10))}},[$e,lo]);const Ue=vi=>{vi||jo(null)},qn=function(){let vi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const pi=vi?wi:oe.errors,Ui=vi?Qi:oe.warnings;return Dn(pi,Ui,oe,"",!!qe,Fn)}(),Mi=de()(Hn,Ye,ce,{[`${Hn}-with-help`]:qi||wi.length||Qi.length,[`${Hn}-has-feedback`]:qn&&qe,[`${Hn}-has-success`]:qn==="success",[`${Hn}-has-warning`]:qn==="warning",[`${Hn}-has-error`]:qn==="error",[`${Hn}-is-validating`]:qn==="validating",[`${Hn}-hidden`]:bn});return ne.createElement("div",{className:Mi,style:qt,ref:Vn},ne.createElement(xe.Z,Object.assign({className:`${Hn}-row`},(0,Se.Z)(fi,["_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"])),ne.createElement(mi,Object.assign({htmlFor:Ke},Gt,{requiredMark:_n,required:Qe!=null?Qe:zn,prefixCls:We})),ne.createElement(en,Object.assign({},Gt,oe,{errors:wi,warnings:Qi,prefixCls:We,status:qn,help:He,marginBottom:Co,onErrorVisibleChanged:Ue}),ne.createElement(Tt.qI.Provider,{value:Wn},ne.createElement(Io,{prefixCls:We,meta:oe,errors:oe.errors,warnings:oe.warnings,hasFeedback:qe,validateStatus:qn},Jn)))),!!Co&&ne.createElement("div",{className:`${Hn}-margin-offset`,style:{marginBottom:-Co}}))}const Ni="__SPLIT__",$o=null,Ro=ne.memo(Gt=>{let{children:We}=Gt;return We},(Gt,We)=>Gt.value===We.value&&Gt.update===We.update&&Gt.childProps.length===We.childProps.length&&Gt.childProps.every((Ye,ce)=>Ye===We.childProps[ce]));function Mt(Gt){return Gt!=null}function cr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function ir(Gt){const{name:We,noStyle:Ye,className:ce,dependencies:qt,prefixCls:He,shouldUpdate:un,rules:An,children:Fn,required:oe,label:qe,messageVariables:bn,trigger:Jn="onChange",validateTrigger:Ke,hidden:Qe,help:zn}=Gt,{getPrefixCls:Wn}=ne.useContext(Ve.E_),{name:fi}=ne.useContext(Tt.q3),Hn=St(Fn),_n=typeof Hn=="function",Vn=ne.useContext(Tt.qI),{validateTrigger:wi}=ne.useContext(me.FieldContext),Qi=Ke!==void 0?Ke:wi,qi=Mt(We),$e=Wn("form",He),[lo,Co]=se($e),jo=ne.useContext(me.ListContext),Ue=ne.useRef(),[jn,qn]=Me({}),[Mi,vi]=(0,$n.Z)(()=>cr()),pi=sn=>{const ho=jo==null?void 0:jo.getKey(sn.name);if(vi(sn.destroy?cr():sn,!0),Ye&&zn!==!1&&Vn){let Er=sn.name;if(sn.destroy)Er=Ue.current||Er;else if(ho!==void 0){const[zo,Fr]=ho;Er=[zo].concat((0,wt.Z)(Fr)),Ue.current=Er}Vn(sn,Er)}},Ui=(sn,ho)=>{qn(Er=>{const zo=Object.assign({},Er),mr=[].concat((0,wt.Z)(sn.name.slice(0,-1)),(0,wt.Z)(ho)).join(Ni);return sn.destroy?delete zo[mr]:zo[mr]=sn,zo})},[ki,zi]=ne.useMemo(()=>{const sn=(0,wt.Z)(Mi.errors),ho=(0,wt.Z)(Mi.warnings);return Object.values(jn).forEach(Er=>{sn.push.apply(sn,(0,wt.Z)(Er.errors||[])),ho.push.apply(ho,(0,wt.Z)(Er.warnings||[]))}),[sn,ho]},[jn,Mi.errors,Mi.warnings]),uo=De();function cn(sn,ho,Er){return Ye&&!Qe?ne.createElement(Io,{prefixCls:$e,hasFeedback:Gt.hasFeedback,validateStatus:Gt.validateStatus,meta:Mi,errors:ki,warnings:zi,noStyle:!0},sn):ne.createElement(qo,Object.assign({key:"row"},Gt,{className:de()(ce,Co),prefixCls:$e,fieldId:ho,isRequired:Er,errors:ki,warnings:zi,meta:Mi,onSubItemMetaChange:Ui}),sn)}if(!qi&&!_n&&!qt)return lo(cn(Hn));let Xo={};return typeof qe=="string"?Xo.label=qe:We&&(Xo.label=String(We)),bn&&(Xo=Object.assign(Object.assign({},Xo),bn)),lo(ne.createElement(me.Field,Object.assign({},Gt,{messageVariables:Xo,trigger:Jn,validateTrigger:Qi,onMetaChange:pi}),(sn,ho,Er)=>{const zo=_e(We).length&&ho?ho.name:[],Fr=Zn(zo,fi),mr=oe!==void 0?oe:!!(An&&An.some(yo=>{if(yo&&typeof yo=="object"&&yo.required&&!yo.warningOnly)return!0;if(typeof yo=="function"){const bo=yo(Er);return bo&&bo.required&&!bo.warningOnly}return!1})),Di=Object.assign({},sn);let Li=null;if(Array.isArray(Hn)&&qi)Li=Hn;else if(!(_n&&(!(un||qt)||qi))){if(!(qt&&!_n&&!qi))if((0,Ot.l$)(Hn)){const yo=Object.assign(Object.assign({},Hn.props),Di);if(yo.id||(yo.id=Fr),zn||ki.length>0||zi.length>0||Gt.extra){const Rt=[];(zn||ki.length>0)&&Rt.push(`${Fr}_help`),Gt.extra&&Rt.push(`${Fr}_extra`),yo["aria-describedby"]=Rt.join(" ")}ki.length>0&&(yo["aria-invalid"]="true"),mr&&(yo["aria-required"]="true"),(0,Pi.Yr)(Hn)&&(yo.ref=uo(zo,Hn)),new Set([].concat((0,wt.Z)(_e(Jn)),(0,wt.Z)(_e(Qi)))).forEach(Rt=>{yo[Rt]=function(){for(var Qo,xr,es,cs,us,no=arguments.length,$i=new Array(no),Ko=0;Ko<no;Ko++)$i[Ko]=arguments[Ko];(es=Di[Rt])===null||es===void 0||(Qo=es).call.apply(Qo,[Di].concat($i)),(us=(cs=Hn.props)[Rt])===null||us===void 0||(xr=us).call.apply(xr,[cs].concat($i))}});const Xn=[yo["aria-required"],yo["aria-invalid"],yo["aria-describedby"]];Li=ne.createElement(Ro,{value:Di[Gt.valuePropName||"value"],update:Hn,childProps:Xn},(0,Ot.Tm)(Hn,yo))}else _n&&(un||qt)&&!qi?Li=Hn(Er):Li=Hn}return cn(Li,Fr,mr)}))}const pr=ir;pr.useStatus=Kt;var ts=pr,rs=function(Gt,We){var Ye={};for(var ce in Gt)Object.prototype.hasOwnProperty.call(Gt,ce)&&We.indexOf(ce)<0&&(Ye[ce]=Gt[ce]);if(Gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ce=Object.getOwnPropertySymbols(Gt);qt<ce.length;qt++)We.indexOf(ce[qt])<0&&Object.prototype.propertyIsEnumerable.call(Gt,ce[qt])&&(Ye[ce[qt]]=Gt[ce[qt]]);return Ye},Ci=Gt=>{var{prefixCls:We,children:Ye}=Gt,ce=rs(Gt,["prefixCls","children"]);const{getPrefixCls:qt}=ne.useContext(Ve.E_),He=qt("form",We),un=ne.useMemo(()=>({prefixCls:He,status:"error"}),[He]);return ne.createElement(me.List,Object.assign({},ce),(An,Fn,oe)=>ne.createElement(Tt.Rk.Provider,{value:un},Ye(An.map(qe=>Object.assign(Object.assign({},qe),{fieldKey:qe.key})),Fn,{errors:oe.errors,warnings:oe.warnings})))};function oi(){const{form:Gt}=(0,ne.useContext)(Tt.q3);return Gt}const Ie=Ce;Ie.Item=ts,Ie.List=Ci,Ie.ErrorList=Oe,Ie.useForm=pn,Ie.useFormInstance=oi,Ie.useWatch=me.useWatch,Ie.Provider=Tt.RV,Ie.create=()=>{};var Le=Ie},8628:function(gn,Ln,bt){"use strict";var wt=bt(59301),te=bt(34280),de=bt(56762),Re=bt(69507);function ne(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Tt=(0,wt.useRef)({}),be=(0,de.Z)(),ye=(0,Re.ZP)();return(0,te.Z)(()=>{const Jt=ye.subscribe(Be=>{Tt.current=Be,ae&&be()});return()=>ye.unsubscribe(Jt)},[]),Tt.current}Ln.Z=ne},58421:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return De}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Re=de,ne=bt(7657),ae=function(ee,Se){return te.createElement(ne.Z,(0,wt.Z)({},ee,{ref:Se,icon:Re}))},Tt=te.forwardRef(ae),be=Tt,ye=bt(49198),Jt=bt(33853),Be=bt(38819),pe=bt(92310),je=bt.n(pe),Nt=bt(49618),et=bt(77321),nt=bt(96949),ht=bt(55090),lt=bt(77205),gt=bt(38793),vt=bt(26112),Pt={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},At=Pt,Bt=bt(91735),jt=function(le){(0,lt.Z)(Se,le);var ee=(0,gt.Z)(Se);function Se(){var xe;(0,nt.Z)(this,Se);for(var ue=arguments.length,Te=new Array(ue),vn=0;vn<ue;vn++)Te[vn]=arguments[vn];return xe=ee.call.apply(ee,[this].concat(Te)),xe.state={goInputText:""},xe.getValidValue=function(){var fn=xe.state.goInputText;return!fn||Number.isNaN(fn)?void 0:Number(fn)},xe.buildOptionText=function(fn){return"".concat(fn," ").concat(xe.props.locale.items_per_page)},xe.changeSize=function(fn){xe.props.changeSize(Number(fn))},xe.handleChange=function(fn){xe.setState({goInputText:fn.target.value})},xe.handleBlur=function(fn){var en=xe.props,xn=en.goButton,ln=en.quickGo,tn=en.rootPrefixCls,ii=xe.state.goInputText;xn||ii===""||(xe.setState({goInputText:""}),!(fn.relatedTarget&&(fn.relatedTarget.className.indexOf("".concat(tn,"-item-link"))>=0||fn.relatedTarget.className.indexOf("".concat(tn,"-item"))>=0))&&ln(xe.getValidValue()))},xe.go=function(fn){var en=xe.state.goInputText;en!==""&&(fn.keyCode===At.ENTER||fn.type==="click")&&(xe.setState({goInputText:""}),xe.props.quickGo(xe.getValidValue()))},xe}return(0,ht.Z)(Se,[{key:"getPageSizeOptions",value:function(){var ue=this.props,Te=ue.pageSize,vn=ue.pageSizeOptions;return vn.some(function(fn){return fn.toString()===Te.toString()})?vn:vn.concat([Te.toString()]).sort(function(fn,en){var xn=Number.isNaN(Number(fn))?0:Number(fn),ln=Number.isNaN(Number(en))?0:Number(en);return xn-ln})}},{key:"render",value:function(){var ue=this,Te=this.props,vn=Te.pageSize,fn=Te.locale,en=Te.rootPrefixCls,xn=Te.changeSize,ln=Te.quickGo,tn=Te.goButton,ii=Te.selectComponentClass,ri=Te.buildOptionText,Un=Te.selectPrefixCls,si=Te.disabled,mi=this.state.goInputText,Hi="".concat(en,"-options"),Xi=ii,Lo=null,Oo=null,No=null;if(!xn&&!ln)return null;var Io=this.getPageSizeOptions();if(xn&&Xi){var _o=Io.map(function(qo,Ni){return te.createElement(Xi.Option,{key:Ni,value:qo.toString()},(ri||ue.buildOptionText)(qo))});Lo=te.createElement(Xi,{disabled:si,prefixCls:Un,showSearch:!1,className:"".concat(Hi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(vn||Io[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ni){return Ni.parentNode},"aria-label":fn.page_size,defaultOpen:!1},_o)}return ln&&(tn&&(No=typeof tn=="boolean"?te.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:si,className:"".concat(Hi,"-quick-jumper-button")},fn.jump_to_confirm):te.createElement("span",{onClick:this.go,onKeyUp:this.go},tn)),Oo=te.createElement("div",{className:"".concat(Hi,"-quick-jumper")},fn.jump_to,te.createElement("input",{disabled:si,type:"text",value:mi,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":fn.page}),fn.page,No)),te.createElement("li",{className:"".concat(Hi)},Lo,Oo)}}]),Se}(te.Component);jt.defaultProps={pageSizeOptions:["10","20","50","100"]};var _t=jt,se=function(ee){var Se,xe=ee.rootPrefixCls,ue=ee.page,Te=ee.active,vn=ee.className,fn=ee.showTitle,en=ee.onClick,xn=ee.onKeyPress,ln=ee.itemRender,tn="".concat(xe,"-item"),ii=je()(tn,"".concat(tn,"-").concat(ue),(Se={},(0,Nt.Z)(Se,"".concat(tn,"-active"),Te),(0,Nt.Z)(Se,"".concat(tn,"-disabled"),!ue),(0,Nt.Z)(Se,ee.className,vn),Se)),ri=function(){en(ue)},Un=function(Hi){xn(Hi,en,ue)},si=ln(ue,"page",te.createElement("a",{rel:"nofollow"},ue));return si?te.createElement("li",{title:fn?ue.toString():null,className:ii,onClick:ri,onKeyPress:Un,tabIndex:0},si):null},Vt=se;function he(){}function Zt(le){var ee=Number(le);return typeof ee=="number"&&!Number.isNaN(ee)&&isFinite(ee)&&Math.floor(ee)===ee}var Oe=function(ee,Se,xe){return xe};function me(le,ee,Se){var xe=typeof le=="undefined"?ee.pageSize:le;return Math.floor((Se.total-1)/xe)+1}var Ve=function(le){(0,lt.Z)(Se,le);var ee=(0,gt.Z)(Se);function Se(xe){var ue;(0,nt.Z)(this,Se),ue=ee.call(this,xe),ue.paginationNode=te.createRef(),ue.getJumpPrevPage=function(){return Math.max(1,ue.state.current-(ue.props.showLessItems?3:5))},ue.getJumpNextPage=function(){return Math.min(me(void 0,ue.state,ue.props),ue.state.current+(ue.props.showLessItems?3:5))},ue.getItemIcon=function(xn,ln){var tn=ue.props.prefixCls,ii=xn||te.createElement("button",{type:"button","aria-label":ln,className:"".concat(tn,"-item-link")});return typeof xn=="function"&&(ii=te.createElement(xn,(0,et.Z)({},ue.props))),ii},ue.isValid=function(xn){var ln=ue.props.total;return Zt(xn)&&xn!==ue.state.current&&Zt(ln)&&ln>0},ue.shouldDisplayQuickJumper=function(){var xn=ue.props,ln=xn.showQuickJumper,tn=xn.total,ii=ue.state.pageSize;return tn<=ii?!1:ln},ue.handleKeyDown=function(xn){(xn.keyCode===At.ARROW_UP||xn.keyCode===At.ARROW_DOWN)&&xn.preventDefault()},ue.handleKeyUp=function(xn){var ln=ue.getValidValue(xn),tn=ue.state.currentInputValue;ln!==tn&&ue.setState({currentInputValue:ln}),xn.keyCode===At.ENTER?ue.handleChange(ln):xn.keyCode===At.ARROW_UP?ue.handleChange(ln-1):xn.keyCode===At.ARROW_DOWN&&ue.handleChange(ln+1)},ue.handleBlur=function(xn){var ln=ue.getValidValue(xn);ue.handleChange(ln)},ue.changePageSize=function(xn){var ln=ue.state.current,tn=me(xn,ue.state,ue.props);ln=ln>tn?tn:ln,tn===0&&(ln=ue.state.current),typeof xn=="number"&&("pageSize"in ue.props||ue.setState({pageSize:xn}),"current"in ue.props||ue.setState({current:ln,currentInputValue:ln})),ue.props.onShowSizeChange(ln,xn),"onChange"in ue.props&&ue.props.onChange&&ue.props.onChange(ln,xn)},ue.handleChange=function(xn){var ln=ue.props,tn=ln.disabled,ii=ln.onChange,ri=ue.state,Un=ri.pageSize,si=ri.current,mi=ri.currentInputValue;if(ue.isValid(xn)&&!tn){var Hi=me(void 0,ue.state,ue.props),Xi=xn;return xn>Hi?Xi=Hi:xn<1&&(Xi=1),"current"in ue.props||ue.setState({current:Xi}),Xi!==mi&&ue.setState({currentInputValue:Xi}),ii(Xi,Un),Xi}return si},ue.prev=function(){ue.hasPrev()&&ue.handleChange(ue.state.current-1)},ue.next=function(){ue.hasNext()&&ue.handleChange(ue.state.current+1)},ue.jumpPrev=function(){ue.handleChange(ue.getJumpPrevPage())},ue.jumpNext=function(){ue.handleChange(ue.getJumpNextPage())},ue.hasPrev=function(){return ue.state.current>1},ue.hasNext=function(){return ue.state.current<me(void 0,ue.state,ue.props)},ue.runIfEnter=function(xn,ln){if(xn.key==="Enter"||xn.charCode===13){for(var tn=arguments.length,ii=new Array(tn>2?tn-2:0),ri=2;ri<tn;ri++)ii[ri-2]=arguments[ri];ln.apply(void 0,ii)}},ue.runIfEnterPrev=function(xn){ue.runIfEnter(xn,ue.prev)},ue.runIfEnterNext=function(xn){ue.runIfEnter(xn,ue.next)},ue.runIfEnterJumpPrev=function(xn){ue.runIfEnter(xn,ue.jumpPrev)},ue.runIfEnterJumpNext=function(xn){ue.runIfEnter(xn,ue.jumpNext)},ue.handleGoTO=function(xn){(xn.keyCode===At.ENTER||xn.type==="click")&&ue.handleChange(ue.state.currentInputValue)},ue.renderPrev=function(xn){var ln=ue.props,tn=ln.prevIcon,ii=ln.itemRender,ri=ii(xn,"prev",ue.getItemIcon(tn,"prev page")),Un=!ue.hasPrev();return(0,te.isValidElement)(ri)?(0,te.cloneElement)(ri,{disabled:Un}):ri},ue.renderNext=function(xn){var ln=ue.props,tn=ln.nextIcon,ii=ln.itemRender,ri=ii(xn,"next",ue.getItemIcon(tn,"next page")),Un=!ue.hasNext();return(0,te.isValidElement)(ri)?(0,te.cloneElement)(ri,{disabled:Un}):ri};var Te=xe.onChange!==he,vn="current"in xe;vn&&!Te&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var fn=xe.defaultCurrent;"current"in xe&&(fn=xe.current);var en=xe.defaultPageSize;return"pageSize"in xe&&(en=xe.pageSize),fn=Math.min(fn,me(en,void 0,xe)),ue.state={current:fn,currentInputValue:fn,pageSize:en},ue}return(0,ht.Z)(Se,[{key:"componentDidUpdate",value:function(ue,Te){var vn=this.props.prefixCls;if(Te.current!==this.state.current&&this.paginationNode.current){var fn=this.paginationNode.current.querySelector(".".concat(vn,"-item-").concat(Te.current));if(fn&&document.activeElement===fn){var en;fn==null||(en=fn.blur)===null||en===void 0||en.call(fn)}}}},{key:"getValidValue",value:function(ue){var Te=ue.target.value,vn=me(void 0,this.state,this.props),fn=this.state.currentInputValue,en;return Te===""?en=Te:Number.isNaN(Number(Te))?en=fn:Te>=vn?en=vn:en=Number(Te),en}},{key:"getShowSizeChanger",value:function(){var ue=this.props,Te=ue.showSizeChanger,vn=ue.total,fn=ue.totalBoundaryShowSizeChanger;return typeof Te!="undefined"?Te:vn>fn}},{key:"render",value:function(){var ue=this.props,Te=ue.prefixCls,vn=ue.className,fn=ue.style,en=ue.disabled,xn=ue.hideOnSinglePage,ln=ue.total,tn=ue.locale,ii=ue.showQuickJumper,ri=ue.showLessItems,Un=ue.showTitle,si=ue.showTotal,mi=ue.simple,Hi=ue.itemRender,Xi=ue.showPrevNextJumpers,Lo=ue.jumpPrevIcon,Oo=ue.jumpNextIcon,No=ue.selectComponentClass,Io=ue.selectPrefixCls,_o=ue.pageSizeOptions,qo=this.state,Ni=qo.current,$o=qo.pageSize,Ro=qo.currentInputValue;if(xn===!0&&ln<=$o)return null;var Mt=me(void 0,this.state,this.props),cr=[],ir=null,pr=null,ts=null,rs=null,ls=null,Ci=ii&&ii.goButton,oi=ri?1:2,Ie=Ni-1>0?Ni-1:0,Le=Ni+1<Mt?Ni+1:Mt,Gt=(0,vt.Z)(this.props,{aria:!0,data:!0}),We=si&&te.createElement("li",{className:"".concat(Te,"-total-text")},si(ln,[ln===0?0:(Ni-1)*$o+1,Ni*$o>ln?ln:Ni*$o]));if(mi){Ci&&(typeof Ci=="boolean"?ls=te.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},tn.jump_to_confirm):ls=te.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ci),ls=te.createElement("li",{title:Un?"".concat(tn.jump_to).concat(Ni,"/").concat(Mt):null,className:"".concat(Te,"-simple-pager")},ls));var Ye=this.renderPrev(Ie);return te.createElement("ul",(0,wt.Z)({className:je()(Te,"".concat(Te,"-simple"),(0,Nt.Z)({},"".concat(Te,"-disabled"),en),vn),style:fn,ref:this.paginationNode},Gt),We,Ye?te.createElement("li",{title:Un?tn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:je()("".concat(Te,"-prev"),(0,Nt.Z)({},"".concat(Te,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Ye):null,te.createElement("li",{title:Un?"".concat(Ni,"/").concat(Mt):null,className:"".concat(Te,"-simple-pager")},te.createElement("input",{type:"text",value:Ro,disabled:en,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),te.createElement("span",{className:"".concat(Te,"-slash")},"/"),Mt),te.createElement("li",{title:Un?tn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:je()("".concat(Te,"-next"),(0,Nt.Z)({},"".concat(Te,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Le)),ls)}if(Mt<=3+oi*2){var ce={locale:tn,rootPrefixCls:Te,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Un,itemRender:Hi};Mt||cr.push(te.createElement(Vt,(0,wt.Z)({},ce,{key:"noPager",page:1,className:"".concat(Te,"-item-disabled")})));for(var qt=1;qt<=Mt;qt+=1){var He=Ni===qt;cr.push(te.createElement(Vt,(0,wt.Z)({},ce,{key:qt,page:qt,active:He})))}}else{var un=ri?tn.prev_3:tn.prev_5,An=ri?tn.next_3:tn.next_5,Fn=Hi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Lo,"prev page")),oe=Hi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Oo,"next page"));Xi&&(ir=Fn?te.createElement("li",{title:Un?un:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:je()("".concat(Te,"-jump-prev"),(0,Nt.Z)({},"".concat(Te,"-jump-prev-custom-icon"),!!Lo))},Fn):null,pr=oe?te.createElement("li",{title:Un?An:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:je()("".concat(Te,"-jump-next"),(0,Nt.Z)({},"".concat(Te,"-jump-next-custom-icon"),!!Oo))},oe):null),rs=te.createElement(Vt,{locale:tn,last:!0,rootPrefixCls:Te,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Mt,page:Mt,active:!1,showTitle:Un,itemRender:Hi}),ts=te.createElement(Vt,{locale:tn,rootPrefixCls:Te,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Un,itemRender:Hi});var qe=Math.max(1,Ni-oi),bn=Math.min(Ni+oi,Mt);Ni-1<=oi&&(bn=1+oi*2),Mt-Ni<=oi&&(qe=Mt-oi*2);for(var Jn=qe;Jn<=bn;Jn+=1){var Ke=Ni===Jn;cr.push(te.createElement(Vt,{locale:tn,rootPrefixCls:Te,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Jn,page:Jn,active:Ke,showTitle:Un,itemRender:Hi}))}Ni-1>=oi*2&&Ni!==3&&(cr[0]=(0,te.cloneElement)(cr[0],{className:"".concat(Te,"-item-after-jump-prev")}),cr.unshift(ir)),Mt-Ni>=oi*2&&Ni!==Mt-2&&(cr[cr.length-1]=(0,te.cloneElement)(cr[cr.length-1],{className:"".concat(Te,"-item-before-jump-next")}),cr.push(pr)),qe!==1&&cr.unshift(ts),bn!==Mt&&cr.push(rs)}var Qe=!this.hasPrev()||!Mt,zn=!this.hasNext()||!Mt,Wn=this.renderPrev(Ie),fi=this.renderNext(Le);return te.createElement("ul",(0,wt.Z)({className:je()(Te,vn,(0,Nt.Z)({},"".concat(Te,"-disabled"),en)),style:fn,ref:this.paginationNode},Gt),We,Wn?te.createElement("li",{title:Un?tn.prev_page:null,onClick:this.prev,tabIndex:Qe?null:0,onKeyPress:this.runIfEnterPrev,className:je()("".concat(Te,"-prev"),(0,Nt.Z)({},"".concat(Te,"-disabled"),Qe)),"aria-disabled":Qe},Wn):null,cr,fi?te.createElement("li",{title:Un?tn.next_page:null,onClick:this.next,tabIndex:zn?null:0,onKeyPress:this.runIfEnterNext,className:je()("".concat(Te,"-next"),(0,Nt.Z)({},"".concat(Te,"-disabled"),zn)),"aria-disabled":zn},fi):null,te.createElement(_t,{disabled:en,locale:tn,rootPrefixCls:Te,selectComponentClass:No,selectPrefixCls:Io,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ni,pageSize:$o,pageSizeOptions:_o,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ci}))}}],[{key:"getDerivedStateFromProps",value:function(ue,Te){var vn={};if("current"in ue&&(vn.current=ue.current,ue.current!==Te.current&&(vn.currentInputValue=vn.current)),"pageSize"in ue&&ue.pageSize!==Te.pageSize){var fn=Te.current,en=me(ue.pageSize,Te,ue);fn=fn>en?en:fn,"current"in ue||(vn.current=fn,vn.currentInputValue=fn),vn.pageSize=ue.pageSize}return vn}}]),Se}(te.Component);Ve.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:he,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:he,locale:Bt.Z,style:{},itemRender:Oe,totalBoundaryShowSizeChanger:50};var Xe=Ve,Je=bt(22075),wn=bt(36355),Mn=bt(19716),we=bt(8628),Yt=bt(9763),_e=bt(57809);const Zn=le=>te.createElement(_e.default,Object.assign({},le,{showSearch:!0,size:"small"})),Dn=le=>te.createElement(_e.default,Object.assign({},le,{showSearch:!0,size:"middle"}));Zn.Option=_e.default.Option,Dn.Option=_e.default.Option;var Ne=bt(9937),pn=bt(17313),Tn=bt(83116),Yn=bt(37613);const mn=le=>{const{componentCls:ee}=le;return{[`${ee}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${ee}-item-link`]:{color:le.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${ee}-item-link`]:{color:le.colorTextDisabled,cursor:"not-allowed"}}},[`&${ee}-disabled`]:{cursor:"not-allowed",[`${ee}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:le.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:le.colorBorder,backgroundColor:le.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:le.itemActiveBgDisabled},a:{color:le.itemActiveColorDisabled}}},[`${ee}-item-link`]:{color:le.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${ee}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${ee}-simple-pager`]:{color:le.colorTextDisabled},[`${ee}-jump-prev, ${ee}-jump-next`]:{[`${ee}-item-link-icon`]:{opacity:0},[`${ee}-item-ellipsis`]:{opacity:1}}},[`&${ee}-simple`]:{[`${ee}-prev, ${ee}-next`]:{[`&${ee}-disabled ${ee}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},ui=le=>{const{componentCls:ee}=le;return{[`&${ee}-mini ${ee}-total-text, &${ee}-mini ${ee}-simple-pager`]:{height:le.itemSizeSM,lineHeight:`${le.itemSizeSM}px`},[`&${ee}-mini ${ee}-item`]:{minWidth:le.itemSizeSM,height:le.itemSizeSM,margin:0,lineHeight:`${le.itemSizeSM-2}px`},[`&${ee}-mini:not(${ee}-disabled) ${ee}-item:not(${ee}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:le.colorBgTextHover},"&:active":{backgroundColor:le.colorBgTextActive}},[`&${ee}-mini ${ee}-prev, &${ee}-mini ${ee}-next`]:{minWidth:le.itemSizeSM,height:le.itemSizeSM,margin:0,lineHeight:`${le.itemSizeSM}px`},[`&${ee}-mini:not(${ee}-disabled)`]:{[`${ee}-prev, ${ee}-next`]:{[`&:hover ${ee}-item-link`]:{backgroundColor:le.colorBgTextHover},[`&:active ${ee}-item-link`]:{backgroundColor:le.colorBgTextActive},[`&${ee}-disabled:hover ${ee}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${ee}-mini ${ee}-prev ${ee}-item-link,
|
|
|
&${ee}-mini ${ee}-next ${ee}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:le.itemSizeSM,lineHeight:`${le.itemSizeSM}px`}},[`&${ee}-mini ${ee}-jump-prev, &${ee}-mini ${ee}-jump-next`]:{height:le.itemSizeSM,marginInlineEnd:0,lineHeight:`${le.itemSizeSM}px`},[`&${ee}-mini ${ee}-options`]:{marginInlineStart:le.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:le.miniOptionsSizeChangerTop},"&-quick-jumper":{height:le.itemSizeSM,lineHeight:`${le.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Ne.x0)(le)),{width:le.paginationMiniQuickJumperInputWidth,height:le.controlHeightSM})}}}},Ce=le=>{const{componentCls:ee}=le;return{[`
|
|
|
&${ee}-simple ${ee}-prev,
|
|
|
&${ee}-simple ${ee}-next
|
|
|
`]:{height:le.itemSizeSM,lineHeight:`${le.itemSizeSM}px`,verticalAlign:"top",[`${ee}-item-link`]:{height:le.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:le.colorBgTextHover},"&:active":{backgroundColor:le.colorBgTextActive},"&::after":{height:le.itemSizeSM,lineHeight:`${le.itemSizeSM}px`}}},[`&${ee}-simple ${ee}-simple-pager`]:{display:"inline-block",height:le.itemSizeSM,marginInlineEnd:le.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:le.marginXS,padding:`0 ${le.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:le.itemInputBg,border:`${le.lineWidth}px ${le.lineType} ${le.colorBorder}`,borderRadius:le.borderRadius,outline:"none",transition:`border-color ${le.motionDurationMid}`,color:"inherit","&:hover":{borderColor:le.colorPrimary},"&:focus":{borderColor:le.colorPrimaryHover,boxShadow:`${le.inputOutlineOffset}px 0 ${le.controlOutlineWidth}px ${le.controlOutline}`},"&[disabled]":{color:le.colorTextDisabled,backgroundColor:le.colorBgContainerDisabled,borderColor:le.colorBorder,cursor:"not-allowed"}}}}},$n=le=>{const{componentCls:ee}=le;return{[`${ee}-jump-prev, ${ee}-jump-next`]:{outline:0,[`${ee}-item-container`]:{position:"relative",[`${ee}-item-link-icon`]:{color:le.colorPrimary,fontSize:le.fontSizeSM,opacity:0,transition:`all ${le.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${ee}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:le.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:le.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:le.paginationEllipsisTextIndent,opacity:1,transition:`all ${le.motionDurationMid}`}},"&:hover":{[`${ee}-item-link-icon`]:{opacity:1},[`${ee}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${ee}-prev,
|
|
|
${ee}-jump-prev,
|
|
|
${ee}-jump-next
|
|
|
`]:{marginInlineEnd:le.marginXS},[`
|
|
|
${ee}-prev,
|
|
|
${ee}-next,
|
|
|
${ee}-jump-prev,
|
|
|
${ee}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:le.itemSize,height:le.itemSize,color:le.colorText,fontFamily:le.fontFamily,lineHeight:`${le.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:le.borderRadius,cursor:"pointer",transition:`all ${le.motionDurationMid}`},[`${ee}-prev, ${ee}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:le.colorText,cursor:"pointer",userSelect:"none"},[`${ee}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:le.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${le.lineWidth}px ${le.lineType} transparent`,borderRadius:le.borderRadius,outline:"none",transition:`all ${le.motionDurationMid}`},[`&:hover ${ee}-item-link`]:{backgroundColor:le.colorBgTextHover},[`&:active ${ee}-item-link`]:{backgroundColor:le.colorBgTextActive},[`&${ee}-disabled:hover`]:{[`${ee}-item-link`]:{backgroundColor:"transparent"}}},[`${ee}-slash`]:{marginInlineEnd:le.paginationSlashMarginInlineEnd,marginInlineStart:le.paginationSlashMarginInlineStart},[`${ee}-options`]:{display:"inline-block",marginInlineStart:le.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:le.controlHeight,marginInlineStart:le.marginXS,lineHeight:`${le.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Ne.ik)(le)),{width:le.controlHeightLG*1.25,height:le.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:le.marginXS,marginInlineEnd:le.marginXS})}}}},Pi=le=>{const{componentCls:ee}=le;return{[`${ee}-item`]:{display:"inline-block",minWidth:le.itemSize,height:le.itemSize,marginInlineEnd:le.marginXS,fontFamily:le.fontFamily,lineHeight:`${le.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${le.lineWidth}px ${le.lineType} transparent`,borderRadius:le.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${le.paginationItemPaddingInline}px`,color:le.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${ee}-item-active)`]:{"&:hover":{transition:`all ${le.motionDurationMid}`,backgroundColor:le.colorBgTextHover},"&:active":{backgroundColor:le.colorBgTextActive}},"&-active":{fontWeight:le.fontWeightStrong,backgroundColor:le.itemActiveBg,borderColor:le.colorPrimary,a:{color:le.colorPrimary},"&:hover":{borderColor:le.colorPrimaryHover},"&:hover a":{color:le.colorPrimaryHover}}}}},Ot=le=>{const{componentCls:ee}=le;return{[ee]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,pn.Wf)(le)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${ee}-total-text`]:{display:"inline-block",height:le.itemSize,marginInlineEnd:le.marginXS,lineHeight:`${le.itemSize-2}px`,verticalAlign:"middle"}}),Pi(le)),$n(le)),Ce(le)),ui(le)),mn(le)),{[`@media only screen and (max-width: ${le.screenLG}px)`]:{[`${ee}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${le.screenSM}px)`]:{[`${ee}-options`]:{display:"none"}}}),[`&${le.componentCls}-rtl`]:{direction:"rtl"}}},Lt=le=>{const{componentCls:ee}=le;return{[`${ee}${ee}-disabled:not(${ee}-mini)`]:{"&, &:hover":{[`${ee}-item-link`]:{borderColor:le.colorBorder}},"&:focus-visible":{[`${ee}-item-link`]:{borderColor:le.colorBorder}},[`${ee}-item, ${ee}-item-link`]:{backgroundColor:le.colorBgContainerDisabled,borderColor:le.colorBorder,[`&:hover:not(${ee}-item-active)`]:{backgroundColor:le.colorBgContainerDisabled,borderColor:le.colorBorder,a:{color:le.colorTextDisabled}},[`&${ee}-item-active`]:{backgroundColor:le.itemActiveBgDisabled}},[`${ee}-prev, ${ee}-next`]:{"&:hover button":{backgroundColor:le.colorBgContainerDisabled,borderColor:le.colorBorder,color:le.colorTextDisabled},[`${ee}-item-link`]:{backgroundColor:le.colorBgContainerDisabled,borderColor:le.colorBorder}}},[`${ee}:not(${ee}-mini)`]:{[`${ee}-prev, ${ee}-next`]:{"&:hover button":{borderColor:le.colorPrimaryHover,backgroundColor:le.itemBg},[`${ee}-item-link`]:{backgroundColor:le.itemLinkBg,borderColor:le.colorBorder},[`&:hover ${ee}-item-link`]:{borderColor:le.colorPrimary,backgroundColor:le.itemBg,color:le.colorPrimary},[`&${ee}-disabled`]:{[`${ee}-item-link`]:{borderColor:le.colorBorder,color:le.colorTextDisabled}}},[`${ee}-item`]:{backgroundColor:le.itemBg,border:`${le.lineWidth}px ${le.lineType} ${le.colorBorder}`,[`&:hover:not(${ee}-item-active)`]:{borderColor:le.colorPrimary,backgroundColor:le.itemBg,a:{color:le.colorPrimary}},"&-active":{borderColor:le.colorPrimary}}}}},St=le=>{const{componentCls:ee}=le;return{[`${ee}:not(${ee}-disabled)`]:{[`${ee}-item`]:Object.assign({},(0,pn.Qy)(le)),[`${ee}-jump-prev, ${ee}-jump-next`]:{"&:focus-visible":Object.assign({[`${ee}-item-link-icon`]:{opacity:1},[`${ee}-item-ellipsis`]:{opacity:0}},(0,pn.oN)(le))},[`${ee}-prev, ${ee}-next`]:{[`&:focus-visible ${ee}-item-link`]:Object.assign({},(0,pn.oN)(le))}}}};var It=(0,Tn.Z)("Pagination",le=>{const ee=(0,Yn.TS)(le,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:le.marginXXS/2,paginationMiniQuickJumperInputWidth:le.controlHeightLG*1.1,paginationItemPaddingInline:le.marginXXS*1.5,paginationEllipsisLetterSpacing:le.marginXXS/2,paginationSlashMarginInlineStart:le.marginXXS,paginationSlashMarginInlineEnd:le.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ne.e5)(le),(0,Ne.TM)(le));return[Ot(ee),St(ee),le.wireframe&&Lt(ee)]},le=>({itemBg:le.colorBgContainer,itemSize:le.controlHeight,itemSizeSM:le.controlHeightSM,itemActiveBg:le.colorBgContainer,itemLinkBg:le.colorBgContainer,itemActiveColorDisabled:le.colorTextDisabled,itemActiveBgDisabled:le.controlItemBgActiveDisabled,itemInputBg:le.colorBgContainer,miniOptionsSizeChangerTop:0})),Kt=function(le,ee){var Se={};for(var xe in le)Object.prototype.hasOwnProperty.call(le,xe)&&ee.indexOf(xe)<0&&(Se[xe]=le[xe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,xe=Object.getOwnPropertySymbols(le);ue<xe.length;ue++)ee.indexOf(xe[ue])<0&&Object.prototype.propertyIsEnumerable.call(le,xe[ue])&&(Se[xe[ue]]=le[xe[ue]]);return Se},Me=le=>{const{prefixCls:ee,selectPrefixCls:Se,className:xe,rootClassName:ue,style:Te,size:vn,locale:fn,selectComponentClass:en,responsive:xn,showSizeChanger:ln}=le,tn=Kt(le,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:ii}=(0,we.Z)(xn),{getPrefixCls:ri,direction:Un,pagination:si={}}=te.useContext(wn.E_),mi=ri("pagination",ee),[Hi,Xi]=It(mi),Lo=ln!=null?ln:si.showSizeChanger,Oo=te.useMemo(()=>{const Mt=te.createElement("span",{className:`${mi}-item-ellipsis`},"\u2022\u2022\u2022"),cr=te.createElement("button",{className:`${mi}-item-link`,type:"button",tabIndex:-1},Un==="rtl"?te.createElement(Be.Z,null):te.createElement(Jt.Z,null)),ir=te.createElement("button",{className:`${mi}-item-link`,type:"button",tabIndex:-1},Un==="rtl"?te.createElement(Jt.Z,null):te.createElement(Be.Z,null)),pr=te.createElement("a",{className:`${mi}-item-link`},te.createElement("div",{className:`${mi}-item-container`},Un==="rtl"?te.createElement(ye.Z,{className:`${mi}-item-link-icon`}):te.createElement(be,{className:`${mi}-item-link-icon`}),Mt)),ts=te.createElement("a",{className:`${mi}-item-link`},te.createElement("div",{className:`${mi}-item-container`},Un==="rtl"?te.createElement(be,{className:`${mi}-item-link-icon`}):te.createElement(ye.Z,{className:`${mi}-item-link-icon`}),Mt));return{prevIcon:cr,nextIcon:ir,jumpPrevIcon:pr,jumpNextIcon:ts}},[Un,mi]),[No]=(0,Yt.Z)("Pagination",Je.Z),Io=Object.assign(Object.assign({},No),fn),_o=(0,Mn.Z)(vn),qo=_o==="small"||!!(ii&&!_o&&xn),Ni=ri("select",Se),$o=je()({[`${mi}-mini`]:qo,[`${mi}-rtl`]:Un==="rtl"},si==null?void 0:si.className,xe,ue,Xi),Ro=Object.assign(Object.assign({},si==null?void 0:si.style),Te);return Hi(te.createElement(Xe,Object.assign({},Oo,tn,{style:Ro,prefixCls:mi,selectPrefixCls:Ni,className:$o,selectComponentClass:en||(qo?Zn:Dn),locale:Io,showSizeChanger:Lo})))},De=Me},14478:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return Vt}});var wt=bt(96512),te=bt(92310),de=bt.n(te),Re=bt(10228),ne=bt(18929),ae=bt(2738),Tt=bt(59301),be=bt(92343),ye=bt(36355),Jt=bt(60324),Be=bt(92806),pe=bt(77578),je=bt(3113),Nt=bt(67797),et=bt(9763),nt=bt(31724),ht=bt(39722),lt=bt(83116);const gt=he=>{const{componentCls:Zt,iconCls:Oe,antCls:me,zIndexPopup:Ve,colorText:Xe,colorWarning:Je,marginXXS:wn,marginXS:Mn,fontSize:we,fontWeightStrong:Yt,colorTextHeading:_e}=he;return{[Zt]:{zIndex:Ve,[`&${me}-popover`]:{fontSize:we},[`${Zt}-message`]:{marginBottom:Mn,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${Zt}-message-icon ${Oe}`]:{color:Je,fontSize:we,lineHeight:1,marginInlineEnd:Mn},[`${Zt}-title`]:{fontWeight:Yt,color:_e,"&:only-child":{fontWeight:"normal"}},[`${Zt}-description`]:{marginTop:wn,color:Xe}},[`${Zt}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:Mn}}}}};var vt=(0,lt.Z)("Popconfirm",he=>gt(he),he=>{const{zIndexPopupBase:Zt}=he;return{zIndexPopup:Zt+60}},{resetStyle:!1}),Pt=function(he,Zt){var Oe={};for(var me in he)Object.prototype.hasOwnProperty.call(he,me)&&Zt.indexOf(me)<0&&(Oe[me]=he[me]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,me=Object.getOwnPropertySymbols(he);Ve<me.length;Ve++)Zt.indexOf(me[Ve])<0&&Object.prototype.propertyIsEnumerable.call(he,me[Ve])&&(Oe[me[Ve]]=he[me[Ve]]);return Oe};const At=he=>{const{prefixCls:Zt,okButtonProps:Oe,cancelButtonProps:me,title:Ve,description:Xe,cancelText:Je,okText:wn,okType:Mn="primary",icon:we=Tt.createElement(wt.Z,null),showCancel:Yt=!0,close:_e,onConfirm:Zn,onCancel:Dn,onPopupClick:Ne}=he,{getPrefixCls:pn}=Tt.useContext(ye.E_),[Tn]=(0,et.Z)("Popconfirm",nt.Z.Popconfirm),Yn=(0,pe.Z)(Ve),mn=(0,pe.Z)(Xe);return Tt.createElement("div",{className:`${Zt}-inner-content`,onClick:Ne},Tt.createElement("div",{className:`${Zt}-message`},we&&Tt.createElement("span",{className:`${Zt}-message-icon`},we),Tt.createElement("div",{className:`${Zt}-message-text`},Yn&&Tt.createElement("div",{className:de()(`${Zt}-title`)},Yn),mn&&Tt.createElement("div",{className:`${Zt}-description`},mn))),Tt.createElement("div",{className:`${Zt}-buttons`},Yt&&Tt.createElement(je.ZP,Object.assign({onClick:Dn,size:"small"},me),Je!=null?Je:Tn==null?void 0:Tn.cancelText),Tt.createElement(Be.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,Nt.n)(Mn)),Oe),actionFn:Zn,close:_e,prefixCls:pn("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},wn!=null?wn:Tn==null?void 0:Tn.okText)))};var jt=he=>{const{prefixCls:Zt,placement:Oe,className:me,style:Ve}=he,Xe=Pt(he,["prefixCls","placement","className","style"]),{getPrefixCls:Je}=Tt.useContext(ye.E_),wn=Je("popconfirm",Zt),[Mn]=vt(wn);return Mn(Tt.createElement(ht.ZP,{placement:Oe,className:de()(wn,me),style:Ve,content:Tt.createElement(At,Object.assign({prefixCls:wn},Xe))}))},_t=function(he,Zt){var Oe={};for(var me in he)Object.prototype.hasOwnProperty.call(he,me)&&Zt.indexOf(me)<0&&(Oe[me]=he[me]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,me=Object.getOwnPropertySymbols(he);Ve<me.length;Ve++)Zt.indexOf(me[Ve])<0&&Object.prototype.propertyIsEnumerable.call(he,me[Ve])&&(Oe[me[Ve]]=he[me[Ve]]);return Oe};const se=Tt.forwardRef((he,Zt)=>{const{prefixCls:Oe,placement:me="top",trigger:Ve="click",okType:Xe="primary",icon:Je=Tt.createElement(wt.Z,null),children:wn,overlayClassName:Mn,onOpenChange:we,onVisibleChange:Yt}=he,_e=_t(he,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:Zn}=Tt.useContext(ye.E_),[Dn,Ne]=(0,ne.Z)(!1,{value:he.open,defaultValue:he.defaultOpen}),pn=(Lt,St)=>{Ne(Lt,!0),Yt==null||Yt(Lt),we==null||we(Lt,St)},Tn=Lt=>{pn(!1,Lt)},Yn=Lt=>{var St;return(St=he.onConfirm)===null||St===void 0?void 0:St.call(void 0,Lt)},mn=Lt=>{var St;pn(!1,Lt),(St=he.onCancel)===null||St===void 0||St.call(void 0,Lt)},ui=Lt=>{Lt.keyCode===Re.Z.ESC&&Dn&&pn(!1,Lt)},Ce=Lt=>{const{disabled:St=!1}=he;St||pn(Lt)},$n=Zn("popconfirm",Oe),Pi=de()($n,Mn),[Ot]=vt($n);return Ot(Tt.createElement(Jt.Z,Object.assign({},(0,ae.Z)(_e,["title"]),{trigger:Ve,placement:me,onOpenChange:Ce,open:Dn,ref:Zt,overlayClassName:Pi,content:Tt.createElement(At,Object.assign({okType:Xe,icon:Je},he,{prefixCls:$n,close:Tn,onConfirm:Yn,onCancel:mn})),"data-popover-inject":!0}),(0,be.Tm)(wn,{onKeyDown:Lt=>{var St,It;Tt.isValidElement(wn)&&((It=wn==null?void 0:(St=wn.props).onKeyDown)===null||It===void 0||It.call(St,Lt)),ui(Lt)}})))});se._InternalPanelDoNotUseOrYouWillBeFired=jt;var Vt=se},39722:function(gn,Ln,bt){"use strict";bt.d(Ln,{t5:function(){return Jt}});var wt=bt(92310),te=bt.n(wt),de=bt(55477),Re=bt(59301),ne=bt(36355),ae=bt(77578),Tt=bt(17356),be=function(pe,je){var Nt={};for(var et in pe)Object.prototype.hasOwnProperty.call(pe,et)&&je.indexOf(et)<0&&(Nt[et]=pe[et]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,et=Object.getOwnPropertySymbols(pe);nt<et.length;nt++)je.indexOf(et[nt])<0&&Object.prototype.propertyIsEnumerable.call(pe,et[nt])&&(Nt[et[nt]]=pe[et[nt]]);return Nt};const ye=(pe,je,Nt)=>{if(!(!je&&!Nt))return Re.createElement(Re.Fragment,null,je&&Re.createElement("div",{className:`${pe}-title`},(0,ae.Z)(je)),Re.createElement("div",{className:`${pe}-inner-content`},(0,ae.Z)(Nt)))},Jt=pe=>{const{hashId:je,prefixCls:Nt,className:et,style:nt,placement:ht="top",title:lt,content:gt,children:vt}=pe;return Re.createElement("div",{className:te()(je,Nt,`${Nt}-pure`,`${Nt}-placement-${ht}`,et),style:nt},Re.createElement("div",{className:`${Nt}-arrow`}),Re.createElement(de.G,Object.assign({},pe,{className:je,prefixCls:Nt}),vt||ye(Nt,lt,gt)))},Be=pe=>{const{prefixCls:je}=pe,Nt=be(pe,["prefixCls"]),{getPrefixCls:et}=Re.useContext(ne.E_),nt=et("popover",je),[ht,lt]=(0,Tt.Z)(nt);return ht(Re.createElement(Jt,Object.assign({},Nt,{prefixCls:nt,hashId:lt})))};Ln.ZP=Be},60324:function(gn,Ln,bt){"use strict";var wt=bt(92310),te=bt.n(wt),de=bt(59301),Re=bt(77578),ne=bt(62892),ae=bt(36355),Tt=bt(6848),be=bt(39722),ye=bt(17356),Jt=function(je,Nt){var et={};for(var nt in je)Object.prototype.hasOwnProperty.call(je,nt)&&Nt.indexOf(nt)<0&&(et[nt]=je[nt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,nt=Object.getOwnPropertySymbols(je);ht<nt.length;ht++)Nt.indexOf(nt[ht])<0&&Object.prototype.propertyIsEnumerable.call(je,nt[ht])&&(et[nt[ht]]=je[nt[ht]]);return et};const Be=je=>{let{title:Nt,content:et,prefixCls:nt}=je;return de.createElement(de.Fragment,null,Nt&&de.createElement("div",{className:`${nt}-title`},(0,Re.Z)(Nt)),de.createElement("div",{className:`${nt}-inner-content`},(0,Re.Z)(et)))},pe=de.forwardRef((je,Nt)=>{const{prefixCls:et,title:nt,content:ht,overlayClassName:lt,placement:gt="top",trigger:vt="hover",mouseEnterDelay:Pt=.1,mouseLeaveDelay:At=.1,overlayStyle:Bt={}}=je,jt=Jt(je,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:_t}=de.useContext(ae.E_),se=_t("popover",et),[Vt,he]=(0,ye.Z)(se),Zt=_t(),Oe=te()(lt,he);return Vt(de.createElement(Tt.Z,Object.assign({placement:gt,trigger:vt,mouseEnterDelay:Pt,mouseLeaveDelay:At,overlayStyle:Bt},jt,{prefixCls:se,overlayClassName:Oe,ref:Nt,overlay:nt||ht?de.createElement(Be,{prefixCls:se,title:nt,content:ht}):null,transitionName:(0,ne.m)(Zt,"zoom-big",jt.transitionName),"data-popover-inject":!0})))});pe._InternalPanelDoNotUseOrYouWillBeFired=be.ZP,Ln.Z=pe},17356:function(gn,Ln,bt){"use strict";var wt=bt(17313),te=bt(29878),de=bt(19447),Re=bt(33166),ne=bt(83116),ae=bt(37613);const Tt=Jt=>{const{componentCls:Be,popoverColor:pe,minWidth:je,fontWeightStrong:Nt,popoverPadding:et,boxShadowSecondary:nt,colorTextHeading:ht,borderRadiusLG:lt,zIndexPopup:gt,marginXS:vt,colorBgElevated:Pt,popoverBg:At}=Jt;return[{[Be]:Object.assign(Object.assign({},(0,wt.Wf)(Jt)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:gt,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":Pt,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${Be}-content`]:{position:"relative"},[`${Be}-inner`]:{backgroundColor:At,backgroundClip:"padding-box",borderRadius:lt,boxShadow:nt,padding:et},[`${Be}-title`]:{minWidth:je,marginBottom:vt,color:ht,fontWeight:Nt},[`${Be}-inner-content`]:{color:pe}})},(0,de.ZP)(Jt,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Be}-pure`]:{position:"relative",maxWidth:"none",margin:Jt.sizePopupArrow,display:"inline-block",[`${Be}-content`]:{display:"inline-block"}}}]},be=Jt=>{const{componentCls:Be}=Jt;return{[Be]:Re.i.map(pe=>{const je=Jt[`${pe}6`];return{[`&${Be}-${pe}`]:{"--antd-arrow-background-color":je,[`${Be}-inner`]:{backgroundColor:je},[`${Be}-arrow`]:{background:"transparent"}}}})}},ye=Jt=>{const{componentCls:Be,lineWidth:pe,lineType:je,colorSplit:Nt,paddingSM:et,controlHeight:nt,fontSize:ht,lineHeight:lt,padding:gt}=Jt,vt=nt-Math.round(ht*lt),Pt=vt/2,At=vt/2-pe,Bt=gt;return{[Be]:{[`${Be}-inner`]:{padding:0},[`${Be}-title`]:{margin:0,padding:`${Pt}px ${Bt}px ${At}px`,borderBottom:`${pe}px ${je} ${Nt}`},[`${Be}-inner-content`]:{padding:`${et}px ${Bt}px`}}}};Ln.Z=(0,ne.Z)("Popover",Jt=>{const{colorBgElevated:Be,colorText:pe,wireframe:je}=Jt,Nt=(0,ae.TS)(Jt,{popoverPadding:12,popoverBg:Be,popoverColor:pe});return[Tt(Nt),be(Nt),je&&ye(Nt),(0,te._y)(Nt,"zoom-big")]},Jt=>({width:177,minWidth:177,zIndexPopup:Jt.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},57809:function(gn,Ln,bt){"use strict";var wt=bt(92310),te=bt.n(wt),de=bt(77861),Re=bt(2738),ne=bt(59301),ae=bt(53487),Tt=bt(62892),be=bt(19080),ye=bt(36355),Jt=bt(1684),Be=bt(93891),pe=bt(19716),je=bt(32441),Nt=bt(33234),et=bt(14154),nt=bt(58582),ht=bt(84443),lt=bt(66339),gt=function(jt,_t){var se={};for(var Vt in jt)Object.prototype.hasOwnProperty.call(jt,Vt)&&_t.indexOf(Vt)<0&&(se[Vt]=jt[Vt]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Vt=Object.getOwnPropertySymbols(jt);he<Vt.length;he++)_t.indexOf(Vt[he])<0&&Object.prototype.propertyIsEnumerable.call(jt,Vt[he])&&(se[Vt[he]]=jt[Vt[he]]);return se};const vt="SECRET_COMBOBOX_MODE_DO_NOT_USE",Pt=(jt,_t)=>{var se,{prefixCls:Vt,bordered:he=!0,className:Zt,rootClassName:Oe,getPopupContainer:me,popupClassName:Ve,dropdownClassName:Xe,listHeight:Je=256,placement:wn,listItemHeight:Mn=24,size:we,disabled:Yt,notFoundContent:_e,status:Zn,builtinPlacements:Dn,dropdownMatchSelectWidth:Ne,popupMatchSelectWidth:pn,direction:Tn,style:Yn,allowClear:mn}=jt,ui=gt(jt,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ce,getPrefixCls:$n,renderEmpty:Pi,direction:Ot,virtual:Lt,popupMatchSelectWidth:St,popupOverflow:It,select:Kt}=ne.useContext(ye.E_),xt=$n("select",Vt),Me=$n(),De=Tn!=null?Tn:Ot,{compactSize:le,compactItemClassnames:ee}=(0,Nt.ri)(xt,De),[Se,xe]=(0,et.Z)(xt),ue=ne.useMemo(()=>{const{mode:Ro}=ui;if(Ro!=="combobox")return Ro===vt?"combobox":Ro},[ui.mode]),Te=ue==="multiple"||ue==="tags",vn=(0,ht.Z)(ui.suffixIcon,ui.showArrow),fn=(se=pn!=null?pn:Ne)!==null&&se!==void 0?se:St,{status:en,hasFeedback:xn,isFormItemInput:ln,feedbackIcon:tn}=ne.useContext(je.aM),ii=(0,be.F)(en,Zn);let ri;_e!==void 0?ri=_e:ue==="combobox"?ri=null:ri=(Pi==null?void 0:Pi("Select"))||ne.createElement(Be.Z,{componentName:"Select"});const{suffixIcon:Un,itemIcon:si,removeIcon:mi,clearIcon:Hi}=(0,lt.Z)(Object.assign(Object.assign({},ui),{multiple:Te,hasFeedback:xn,feedbackIcon:tn,showSuffixIcon:vn,prefixCls:xt,showArrow:ui.showArrow,componentName:"Select"})),Xi=mn===!0?{clearIcon:Hi}:mn,Lo=(0,Re.Z)(ui,["suffixIcon","itemIcon"]),Oo=te()(Ve||Xe,{[`${xt}-dropdown-${De}`]:De==="rtl"},Oe,xe),No=(0,pe.Z)(Ro=>{var Mt;return(Mt=we!=null?we:le)!==null&&Mt!==void 0?Mt:Ro}),Io=ne.useContext(Jt.Z),_o=Yt!=null?Yt:Io,qo=te()({[`${xt}-lg`]:No==="large",[`${xt}-sm`]:No==="small",[`${xt}-rtl`]:De==="rtl",[`${xt}-borderless`]:!he,[`${xt}-in-form-item`]:ln},(0,be.Z)(xt,ii,xn),ee,Kt==null?void 0:Kt.className,Zt,Oe,xe),Ni=ne.useMemo(()=>wn!==void 0?wn:De==="rtl"?"bottomRight":"bottomLeft",[wn,De]),$o=(0,nt.Z)(Dn,It);return Se(ne.createElement(de.ZP,Object.assign({ref:_t,virtual:Lt,showSearch:Kt==null?void 0:Kt.showSearch},Lo,{style:Object.assign(Object.assign({},Kt==null?void 0:Kt.style),Yn),dropdownMatchSelectWidth:fn,builtinPlacements:$o,transitionName:(0,Tt.m)(Me,"slide-up",ui.transitionName),listHeight:Je,listItemHeight:Mn,mode:ue,prefixCls:xt,placement:Ni,direction:De,suffixIcon:Un,menuItemSelectedIcon:si,removeIcon:mi,allowClear:Xi,notFoundContent:ri,className:qo,getPopupContainer:me||Ce,dropdownClassName:Oo,disabled:_o})))},At=ne.forwardRef(Pt),Bt=(0,ae.Z)(At);At.SECRET_COMBOBOX_MODE_DO_NOT_USE=vt,At.Option=de.Wx,At.OptGroup=de.Xo,At._InternalPanelDoNotUseOrYouWillBeFired=Bt,Ln.default=At},14154:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return At}});var wt=bt(17313),te=bt(74207),de=bt(37613),Re=bt(83116),ne=bt(13826),ae=bt(92899);const Tt=Bt=>{const{optionHeight:jt,optionFontSize:_t,optionLineHeight:se,optionPadding:Vt}=Bt;return{position:"relative",display:"block",minHeight:jt,padding:Vt,color:Bt.colorText,fontWeight:"normal",fontSize:_t,lineHeight:se,boxSizing:"border-box"}};var ye=Bt=>{const{antCls:jt,componentCls:_t}=Bt,se=`${_t}-item`,Vt=`&${jt}-slide-up-enter${jt}-slide-up-enter-active`,he=`&${jt}-slide-up-appear${jt}-slide-up-appear-active`,Zt=`&${jt}-slide-up-leave${jt}-slide-up-leave-active`,Oe=`${_t}-dropdown-placement-`;return[{[`${_t}-dropdown`]:Object.assign(Object.assign({},(0,wt.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,[`
|
|
|
${Vt}${Oe}bottomLeft,
|
|
|
${he}${Oe}bottomLeft
|
|
|
`]:{animationName:ne.fJ},[`
|
|
|
${Vt}${Oe}topLeft,
|
|
|
${he}${Oe}topLeft,
|
|
|
${Vt}${Oe}topRight,
|
|
|
${he}${Oe}topRight
|
|
|
`]:{animationName:ne.Qt},[`${Zt}${Oe}bottomLeft`]:{animationName:ne.Uw},[`
|
|
|
${Zt}${Oe}topLeft,
|
|
|
${Zt}${Oe}topRight
|
|
|
`]:{animationName:ne.ly},"&-hidden":{display:"none"},[`${se}`]:Object.assign(Object.assign({},Tt(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"},wt.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${se}-option-disabled)`]:{backgroundColor:Bt.optionActiveBg},[`&-selected:not(${se}-option-disabled)`]:{color:Bt.optionSelectedColor,fontWeight:Bt.optionSelectedFontWeight,backgroundColor:Bt.optionSelectedBg,[`${se}-option-state`]:{color:Bt.colorPrimary}},"&-disabled":{[`&${se}-option-selected`]:{backgroundColor:Bt.colorBgContainerDisabled},color:Bt.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Bt.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ne.oN)(Bt,"slide-up"),(0,ne.oN)(Bt,"slide-down"),(0,ae.Fm)(Bt,"move-up"),(0,ae.Fm)(Bt,"move-down")]};const Jt=2,Be=Bt=>{let{controlHeightSM:jt,controlHeight:_t,lineWidth:se}=Bt;const Vt=(_t-jt)/2-se,he=Math.ceil(Vt/2);return[Vt,he]};function pe(Bt,jt){const{componentCls:_t,iconCls:se}=Bt,Vt=`${_t}-selection-overflow`,he=Bt.multipleSelectItemHeight,[Zt]=Be(Bt),Oe=jt?`${_t}-${jt}`:"";return{[`${_t}-multiple${Oe}`]:{fontSize:Bt.fontSize,[Vt]:{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:`${Zt-Jt}px ${Jt*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:`${Jt}px 0`,lineHeight:`${he}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:he,marginTop:Jt,marginBottom:Jt,lineHeight:`${he-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:Jt*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,wt.Ro)()),{display:"inline-flex",alignItems:"center",color:Bt.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${se}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Bt.colorIconHover}})},[`${Vt}-item + ${Vt}-item`]:{[`${_t}-selection-search`]:{marginInlineStart:0}},[`${_t}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Bt.inputPaddingHorizontalBase-Zt,"\n &-input,\n &-mirror\n ":{height:he,fontFamily:Bt.fontFamily,lineHeight:`${he}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 Nt=Bt=>{const{componentCls:jt}=Bt,_t=(0,de.TS)(Bt,{controlHeight:Bt.controlHeightSM,multipleSelectItemHeight:Bt.controlHeightXS,borderRadius:Bt.borderRadiusSM,borderRadiusSM:Bt.borderRadiusXS}),se=(0,de.TS)(Bt,{fontSize:Bt.fontSizeLG,controlHeight:Bt.controlHeightLG,multipleSelectItemHeight:Bt.multipleItemHeightLG,borderRadius:Bt.borderRadiusLG,borderRadiusSM:Bt.borderRadius}),[,Vt]=Be(Bt);return[pe(Bt),pe(_t,"sm"),{[`${jt}-multiple${jt}-sm`]:{[`${jt}-selection-placeholder`]:{insetInline:Bt.controlPaddingHorizontalSM-Bt.lineWidth},[`${jt}-selection-search`]:{marginInlineStart:Vt}}},pe(se,"lg")]};function et(Bt,jt){const{componentCls:_t,inputPaddingHorizontalBase:se,borderRadius:Vt}=Bt,he=Bt.controlHeight-Bt.lineWidth*2,Zt=Math.ceil(Bt.fontSize*1.25),Oe=jt?`${_t}-${jt}`:"";return{[`${_t}-single${Oe}`]:{fontSize:Bt.fontSize,[`${_t}-selector`]:Object.assign(Object.assign({},(0,wt.Wf)(Bt)),{display:"flex",borderRadius:Vt,[`${_t}-selection-search`]:{position:"absolute",top:0,insetInlineStart:se,insetInlineEnd:se,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${_t}-selection-item,
|
|
|
${_t}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${he}px`,transition:`all ${Bt.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${he}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:Zt},[`&${_t}-open ${_t}-selection-item`]:{color:Bt.colorTextPlaceholder},[`&:not(${_t}-customize-input)`]:{[`${_t}-selector`]:{width:"100%",height:Bt.controlHeight,padding:`0 ${se}px`,[`${_t}-selection-search-input`]:{height:he},"&:after":{lineHeight:`${he}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 ${se}px`,"&:after":{display:"none"}}}}}}}function nt(Bt){const{componentCls:jt}=Bt,_t=Bt.controlPaddingHorizontalSM-Bt.lineWidth;return[et(Bt),et((0,de.TS)(Bt,{controlHeight:Bt.controlHeightSM,borderRadius:Bt.borderRadiusSM}),"sm"),{[`${jt}-single${jt}-sm`]:{[`&:not(${jt}-customize-input)`]:{[`${jt}-selection-search`]:{insetInlineStart:_t,insetInlineEnd:_t},[`${jt}-selector`]:{padding:`0 ${_t}px`},[`&${jt}-show-arrow ${jt}-selection-search`]:{insetInlineEnd:_t+Bt.fontSize*1.5},[`
|
|
|
&${jt}-show-arrow ${jt}-selection-item,
|
|
|
&${jt}-show-arrow ${jt}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Bt.fontSize*1.5}}}},et((0,de.TS)(Bt,{controlHeight:Bt.singleItemHeightLG,fontSize:Bt.fontSizeLG,borderRadius:Bt.borderRadiusLG}),"lg")]}const ht=Bt=>{const{componentCls:jt,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"},[`${jt}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${jt}-disabled&`]:{color:Bt.colorTextDisabled,background:Bt.colorBgContainerDisabled,cursor:"not-allowed",[`${jt}-multiple&`]:{background:Bt.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},lt=function(Bt,jt){let _t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:se,borderHoverColor:Vt,outlineColor:he,antCls:Zt}=jt,Oe=_t?{[`${se}-selector`]:{borderColor:Vt}}:{};return{[Bt]:{[`&:not(${se}-disabled):not(${se}-customize-input):not(${Zt}-pagination-size-changer)`]:Object.assign(Object.assign({},Oe),{[`${se}-focused& ${se}-selector`]:{borderColor:Vt,boxShadow:`0 0 0 ${jt.controlOutlineWidth}px ${he}`,outline:0},[`&:hover ${se}-selector`]:{borderColor:Vt}})}}},gt=Bt=>{const{componentCls:jt}=Bt;return{[`${jt}-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:jt,inputPaddingHorizontalBase:_t,iconCls:se}=Bt;return{[jt]:Object.assign(Object.assign({},(0,wt.Wf)(Bt)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${jt}-customize-input) ${jt}-selector`]:Object.assign(Object.assign({},ht(Bt)),gt(Bt)),[`${jt}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},wt.vS),[`${jt}-selection-placeholder`]:Object.assign(Object.assign({},wt.vS),{flex:1,color:Bt.colorTextPlaceholder,pointerEvents:"none"}),[`${jt}-arrow`]:Object.assign(Object.assign({},(0,wt.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",[se]:{verticalAlign:"top",transition:`transform ${Bt.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${jt}-suffix)`]:{pointerEvents:"auto"}},[`${jt}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${jt}-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":{[`${jt}-clear`]:{opacity:1}}}),[`${jt}-has-feedback`]:{[`${jt}-clear`]:{insetInlineEnd:_t+Bt.fontSize+Bt.paddingXS}}}},Pt=Bt=>{const{componentCls:jt}=Bt;return[{[jt]:{[`&-borderless ${jt}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${jt}-in-form-item`]:{width:"100%"}}},vt(Bt),nt(Bt),Nt(Bt),ye(Bt),{[`${jt}-rtl`]:{direction:"rtl"}},lt(jt,(0,de.TS)(Bt,{borderHoverColor:Bt.colorPrimaryHover,outlineColor:Bt.controlOutline})),lt(`${jt}-status-error`,(0,de.TS)(Bt,{borderHoverColor:Bt.colorErrorHover,outlineColor:Bt.colorErrorOutline}),!0),lt(`${jt}-status-warning`,(0,de.TS)(Bt,{borderHoverColor:Bt.colorWarningHover,outlineColor:Bt.colorWarningOutline}),!0),(0,te.c)(Bt,{borderElCls:`${jt}-selector`,focusElCls:`${jt}-focused`})]};var At=(0,Re.Z)("Select",(Bt,jt)=>{let{rootPrefixCls:_t}=jt;const se=(0,de.TS)(Bt,{rootPrefixCls:_t,inputPaddingHorizontalBase:Bt.paddingSM-1,multipleSelectItemHeight:Bt.multipleItemHeight});return[Pt(se)]},Bt=>{const{fontSize:jt,lineHeight:_t,controlHeight:se,controlPaddingHorizontal:Vt,zIndexPopupBase:he,colorText:Zt,fontWeightStrong:Oe,controlItemBgActive:me,controlItemBgHover:Ve,colorBgContainer:Xe,colorFillSecondary:Je,controlHeightLG:wn,controlHeightSM:Mn,colorBgContainerDisabled:we,colorTextDisabled:Yt}=Bt;return{zIndexPopup:he+50,optionSelectedColor:Zt,optionSelectedFontWeight:Oe,optionSelectedBg:me,optionActiveBg:Ve,optionPadding:`${(se-jt*_t)/2}px ${Vt}px`,optionFontSize:jt,optionLineHeight:_t,optionHeight:se,selectorBg:Xe,clearBg:Xe,singleItemHeightLG:wn,multipleItemBg:Je,multipleItemBorderColor:"transparent",multipleItemHeight:Mn,multipleItemHeightLG:se,multipleSelectorBgDisabled:we,multipleItemColorDisabled:Yt,multipleItemBorderColorDisabled:"transparent"}})},58582:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return te}});const wt=de=>{const ne={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:de==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ne),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ne),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ne),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ne),{points:["br","tr"],offset:[0,-4]})}};function te(de,Re){return de||wt(Re)}},84443:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return wt}});function wt(te,de){return de!==void 0?de:te!==null}},66339:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return be}});var wt=bt(40001),te=bt(19248),de=bt(99267),Re=bt(84105),ne=bt(58617),ae=bt(47472),Tt=bt(59301);function be(ye){let{suffixIcon:Jt,clearIcon:Be,menuItemSelectedIcon:pe,removeIcon:je,loading:Nt,multiple:et,hasFeedback:nt,prefixCls:ht,showSuffixIcon:lt,feedbackIcon:gt,showArrow:vt,componentName:Pt}=ye;const At=Be!=null?Be:Tt.createElement(te.Z,null),Bt=Vt=>Jt===null&&!nt&&!vt?null:Tt.createElement(Tt.Fragment,null,lt!==!1&&Vt,nt&>);let jt=null;if(Jt!==void 0)jt=Bt(Jt);else if(Nt)jt=Bt(Tt.createElement(ne.Z,{spin:!0}));else{const Vt=`${ht}-suffix`;jt=he=>{let{open:Zt,showSearch:Oe}=he;return Bt(Zt&&Oe?Tt.createElement(ae.Z,{className:Vt}):Tt.createElement(Re.Z,{className:Vt}))}}let _t=null;pe!==void 0?_t=pe:et?_t=Tt.createElement(wt.Z,null):_t=null;let se=null;return je!==void 0?se=je:se=Tt.createElement(de.Z,null),{clearIcon:At,suffixIcon:jt,itemIcon:_t,removeIcon:se}}},15969:function(gn,Ln,bt){"use strict";bt.d(Ln,{N:function(){return wt}});const wt=te=>({color:te.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${te.motionDurationSlow}`,"&:focus, &:hover":{color:te.colorLinkHover},"&:active":{color:te.colorLinkActive}})},78673:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return Oe}});var wt=bt(58617),te=bt(92310),de=bt.n(te),Re=bt(72308),ne=bt(49618),ae=bt(52487),Tt=bt(74416),be=bt(59301),ye=bt(18929),Jt=bt(10228),Be=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],pe=be.forwardRef(function(me,Ve){var Xe,Je=me.prefixCls,wn=Je===void 0?"rc-switch":Je,Mn=me.className,we=me.checked,Yt=me.defaultChecked,_e=me.disabled,Zn=me.loadingIcon,Dn=me.checkedChildren,Ne=me.unCheckedChildren,pn=me.onClick,Tn=me.onChange,Yn=me.onKeyDown,mn=(0,Tt.Z)(me,Be),ui=(0,ye.Z)(!1,{value:we,defaultValue:Yt}),Ce=(0,ae.Z)(ui,2),$n=Ce[0],Pi=Ce[1];function Ot(Kt,xt){var Me=$n;return _e||(Me=Kt,Pi(Me),Tn==null||Tn(Me,xt)),Me}function Lt(Kt){Kt.which===Jt.Z.LEFT?Ot(!1,Kt):Kt.which===Jt.Z.RIGHT&&Ot(!0,Kt),Yn==null||Yn(Kt)}function St(Kt){var xt=Ot(!$n,Kt);pn==null||pn(xt,Kt)}var It=de()(wn,Mn,(Xe={},(0,ne.Z)(Xe,"".concat(wn,"-checked"),$n),(0,ne.Z)(Xe,"".concat(wn,"-disabled"),_e),Xe));return be.createElement("button",(0,Re.Z)({},mn,{type:"button",role:"switch","aria-checked":$n,disabled:_e,className:It,ref:Ve,onKeyDown:Lt,onClick:St}),Zn,be.createElement("span",{className:"".concat(wn,"-inner")},be.createElement("span",{className:"".concat(wn,"-inner-checked")},Dn),be.createElement("span",{className:"".concat(wn,"-inner-unchecked")},Ne)))});pe.displayName="Switch";var je=pe,Nt=bt(14088),et=bt(36355),nt=bt(1684),ht=bt(19716),lt=bt(64993),gt=bt(17313),vt=bt(83116),Pt=bt(37613);const At=me=>{const{componentCls:Ve,trackHeightSM:Xe,trackPadding:Je,trackMinWidthSM:wn,innerMinMarginSM:Mn,innerMaxMarginSM:we,handleSizeSM:Yt}=me,_e=`${Ve}-inner`;return{[Ve]:{[`&${Ve}-small`]:{minWidth:wn,height:Xe,lineHeight:`${Xe}px`,[`${Ve}-inner`]:{paddingInlineStart:we,paddingInlineEnd:Mn,[`${_e}-checked`]:{marginInlineStart:`calc(-100% + ${Yt+Je*2}px - ${we*2}px)`,marginInlineEnd:`calc(100% - ${Yt+Je*2}px + ${we*2}px)`},[`${_e}-unchecked`]:{marginTop:-Xe,marginInlineStart:0,marginInlineEnd:0}},[`${Ve}-handle`]:{width:Yt,height:Yt},[`${Ve}-loading-icon`]:{top:(Yt-me.switchLoadingIconSize)/2,fontSize:me.switchLoadingIconSize},[`&${Ve}-checked`]:{[`${Ve}-inner`]:{paddingInlineStart:Mn,paddingInlineEnd:we,[`${_e}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${_e}-unchecked`]:{marginInlineStart:`calc(100% - ${Yt+Je*2}px + ${we*2}px)`,marginInlineEnd:`calc(-100% + ${Yt+Je*2}px - ${we*2}px)`}},[`${Ve}-handle`]:{insetInlineStart:`calc(100% - ${Yt+Je}px)`}},[`&:not(${Ve}-disabled):active`]:{[`&:not(${Ve}-checked) ${_e}`]:{[`${_e}-unchecked`]:{marginInlineStart:me.marginXXS/2,marginInlineEnd:-me.marginXXS/2}},[`&${Ve}-checked ${_e}`]:{[`${_e}-checked`]:{marginInlineStart:-me.marginXXS/2,marginInlineEnd:me.marginXXS/2}}}}}}},Bt=me=>{const{componentCls:Ve,handleSize:Xe}=me;return{[Ve]:{[`${Ve}-loading-icon${me.iconCls}`]:{position:"relative",top:(Xe-me.fontSize)/2,color:me.switchLoadingIconColor,verticalAlign:"top"},[`&${Ve}-checked ${Ve}-loading-icon`]:{color:me.switchColor}}}},jt=me=>{const{componentCls:Ve,motion:Xe,trackPadding:Je,handleBg:wn,handleShadow:Mn,handleSize:we}=me,Yt=`${Ve}-handle`;return{[Ve]:{[Yt]:{position:"absolute",top:Je,insetInlineStart:Je,width:we,height:we,transition:`all ${me.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:wn,borderRadius:we/2,boxShadow:Mn,transition:`all ${me.switchDuration} ease-in-out`,content:'""'}},[`&${Ve}-checked ${Yt}`]:{insetInlineStart:`calc(100% - ${we+Je}px)`},[`&:not(${Ve}-disabled):active`]:Xe?{[`${Yt}::before`]:{insetInlineEnd:me.switchHandleActiveInset,insetInlineStart:0},[`&${Ve}-checked ${Yt}::before`]:{insetInlineEnd:0,insetInlineStart:me.switchHandleActiveInset}}:{}}}},_t=me=>{const{componentCls:Ve,trackHeight:Xe,trackPadding:Je,innerMinMargin:wn,innerMaxMargin:Mn,handleSize:we}=me,Yt=`${Ve}-inner`;return{[Ve]:{[Yt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Mn,paddingInlineEnd:wn,transition:`padding-inline-start ${me.switchDuration} ease-in-out, padding-inline-end ${me.switchDuration} ease-in-out`,[`${Yt}-checked, ${Yt}-unchecked`]:{display:"block",color:me.colorTextLightSolid,fontSize:me.fontSizeSM,transition:`margin-inline-start ${me.switchDuration} ease-in-out, margin-inline-end ${me.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Yt}-checked`]:{marginInlineStart:`calc(-100% + ${we+Je*2}px - ${Mn*2}px)`,marginInlineEnd:`calc(100% - ${we+Je*2}px + ${Mn*2}px)`},[`${Yt}-unchecked`]:{marginTop:-Xe,marginInlineStart:0,marginInlineEnd:0}},[`&${Ve}-checked ${Yt}`]:{paddingInlineStart:wn,paddingInlineEnd:Mn,[`${Yt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Yt}-unchecked`]:{marginInlineStart:`calc(100% - ${we+Je*2}px + ${Mn*2}px)`,marginInlineEnd:`calc(-100% + ${we+Je*2}px - ${Mn*2}px)`}},[`&:not(${Ve}-disabled):active`]:{[`&:not(${Ve}-checked) ${Yt}`]:{[`${Yt}-unchecked`]:{marginInlineStart:Je*2,marginInlineEnd:-Je*2}},[`&${Ve}-checked ${Yt}`]:{[`${Yt}-checked`]:{marginInlineStart:-Je*2,marginInlineEnd:Je*2}}}}}},se=me=>{const{componentCls:Ve,trackHeight:Xe,trackMinWidth:Je}=me;return{[Ve]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(me)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Je,height:Xe,lineHeight:`${Xe}px`,verticalAlign:"middle",background:me.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${me.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ve}-disabled)`]:{background:me.colorTextTertiary}}),(0,gt.Qy)(me)),{[`&${Ve}-checked`]:{background:me.switchColor,[`&:hover:not(${Ve}-disabled)`]:{background:me.colorPrimaryHover}},[`&${Ve}-loading, &${Ve}-disabled`]:{cursor:"not-allowed",opacity:me.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ve}-rtl`]:{direction:"rtl"}})}};var Vt=(0,vt.Z)("Switch",me=>{const Ve=(0,Pt.TS)(me,{switchDuration:me.motionDurationMid,switchColor:me.colorPrimary,switchDisabledOpacity:me.opacityLoading,switchLoadingIconSize:me.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${me.opacityLoading})`,switchHandleActiveInset:"-30%"});return[se(Ve),_t(Ve),jt(Ve),Bt(Ve),At(Ve)]},me=>{const{fontSize:Ve,lineHeight:Xe,controlHeight:Je,colorWhite:wn}=me,Mn=Ve*Xe,we=Je/2,Yt=2,_e=Mn-Yt*2,Zn=we-Yt*2;return{trackHeight:Mn,trackHeightSM:we,trackMinWidth:_e*2+Yt*4,trackMinWidthSM:Zn*2+Yt*2,trackPadding:Yt,handleBg:wn,handleSize:_e,handleSizeSM:Zn,handleShadow:`0 2px 4px 0 ${new lt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:_e/2,innerMaxMargin:_e+Yt+Yt*2,innerMinMarginSM:Zn/2,innerMaxMarginSM:Zn+Yt+Yt*2}}),he=function(me,Ve){var Xe={};for(var Je in me)Object.prototype.hasOwnProperty.call(me,Je)&&Ve.indexOf(Je)<0&&(Xe[Je]=me[Je]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var wn=0,Je=Object.getOwnPropertySymbols(me);wn<Je.length;wn++)Ve.indexOf(Je[wn])<0&&Object.prototype.propertyIsEnumerable.call(me,Je[wn])&&(Xe[Je[wn]]=me[Je[wn]]);return Xe};const Zt=be.forwardRef((me,Ve)=>{const{prefixCls:Xe,size:Je,disabled:wn,loading:Mn,className:we,rootClassName:Yt,style:_e}=me,Zn=he(me,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Dn,direction:Ne,switch:pn}=be.useContext(et.E_),Tn=be.useContext(nt.Z),Yn=(wn!=null?wn:Tn)||Mn,mn=Dn("switch",Xe),ui=be.createElement("div",{className:`${mn}-handle`},Mn&&be.createElement(wt.Z,{className:`${mn}-loading-icon`})),[Ce,$n]=Vt(mn),Pi=(0,ht.Z)(Je),Ot=de()(pn==null?void 0:pn.className,{[`${mn}-small`]:Pi==="small",[`${mn}-loading`]:Mn,[`${mn}-rtl`]:Ne==="rtl"},we,Yt,$n),Lt=Object.assign(Object.assign({},pn==null?void 0:pn.style),_e);return Ce(be.createElement(Nt.Z,{component:"Switch"},be.createElement(je,Object.assign({},Zn,{prefixCls:mn,className:Ot,style:Lt,disabled:Yn,ref:Ve,loadingIcon:ui}))))});Zt.__ANT_SWITCH=!0;var Oe=Zt},1710:function(gn,Ln,bt){"use strict";bt.d(Ln,{default:function(){return Zg}});var wt={},te="rc-table-internal-hook",de=bt(52487),Re=bt(6089),ne=bt(34280),ae=bt(13697),Tt=bt(59301),be=bt(4676);function ye(Ut){var Qt=Tt.createContext(void 0),Pe=function(Ge){var Fe=Ge.value,hn=Ge.children,dn=Tt.useRef(Fe);dn.current=Fe;var rn=Tt.useState(function(){return{getValue:function(){return dn.current},listeners:new Set}}),Nn=(0,de.Z)(rn,1),Rn=Nn[0];return(0,ne.Z)(function(){(0,be.unstable_batchedUpdates)(function(){Rn.listeners.forEach(function(In){In(Fe)})})},[Fe]),Tt.createElement(Qt.Provider,{value:Rn},hn)};return{Context:Qt,Provider:Pe,defaultValue:Ut}}function Jt(Ut,Qt){var Pe=(0,Re.Z)(typeof Qt=="function"?Qt:function(In){if(Qt===void 0)return In;if(!Array.isArray(Qt))return In[Qt];var gi={};return Qt.forEach(function(di){gi[di]=In[di]}),gi}),Ee=Tt.useContext(Ut==null?void 0:Ut.Context),Ge=Ee||{},Fe=Ge.listeners,hn=Ge.getValue,dn=Tt.useRef();dn.current=Pe(Ee?hn():Ut==null?void 0:Ut.defaultValue);var rn=Tt.useState({}),Nn=(0,de.Z)(rn,2),Rn=Nn[1];return(0,ne.Z)(function(){if(!Ee)return;function In(gi){var di=Pe(gi);(0,ae.Z)(dn.current,di,!0)||Rn({})}return Fe.add(In),function(){Fe.delete(In)}},[Ee]),dn.current}var Be=bt(72308),pe=bt(8654);function je(){var Ut=Tt.createContext(null);function Qt(){return Tt.useContext(Ut)}function Pe(Ge,Fe){var hn=(0,pe.Yr)(Ge),dn=function(Nn,Rn){var In=hn?{ref:Rn}:{},gi=Tt.useRef(0),di=Tt.useRef(Nn),ei=Qt();return ei!==null?Tt.createElement(Ge,(0,Be.Z)({},Nn,In)):((!Fe||Fe(di.current,Nn))&&(gi.current+=1),di.current=Nn,Tt.createElement(Ut.Provider,{value:gi.current},Tt.createElement(Ge,(0,Be.Z)({},Nn,In))))};return hn?Tt.forwardRef(dn):dn}function Ee(Ge,Fe){var hn=(0,pe.Yr)(Ge),dn=function(Nn,Rn){var In=hn?{ref:Rn}:{};return Qt(),Tt.createElement(Ge,(0,Be.Z)({},Nn,In))};return hn?Tt.memo(Tt.forwardRef(dn),Fe):Tt.memo(dn,Fe)}return{makeImmutable:Pe,responseImmutable:Ee,useImmutableMark:Qt}}var Nt=je(),et=Nt.makeImmutable,nt=Nt.responseImmutable,ht=Nt.useImmutableMark,lt=je(),gt=lt.makeImmutable,vt=lt.responseImmutable,Pt=lt.useImmutableMark,At=ye(),Bt=At;function jt(Ut,Qt){var Pe=Tt.useRef(0);Pe.current+=1;var Ee=Tt.useRef(Ut),Ge=[];Object.keys(Ut||{}).map(function(hn){var dn;(Ut==null?void 0:Ut[hn])!==((dn=Ee.current)===null||dn===void 0?void 0:dn[hn])&&Ge.push(hn)}),Ee.current=Ut;var Fe=Tt.useRef([]);return Ge.length&&(Fe.current=Ge),Tt.useDebugValue(Pe.current),Tt.useDebugValue(Fe.current.join(", ")),Qt&&console.log("".concat(Qt,":"),Pe.current,Fe.current),Pe.current}var _t=null,se=Tt.memo(function(){var Ut=jt();return Tt.createElement("h1",null,"Render Times: ",Ut)});se.displayName="RenderBlock";var Vt=bt(62853),he=bt(77321),Zt=bt(49618),Oe=bt(92310),me=bt.n(Oe),Ve=bt(80547),Xe=bt(97938),Je=bt(48736),wn=Tt.createContext({renderWithProps:!1}),Mn=wn,we="RC_TABLE_KEY";function Yt(Ut){return Ut==null?[]:Array.isArray(Ut)?Ut:[Ut]}function _e(Ut){var Qt=[],Pe={};return Ut.forEach(function(Ee){for(var Ge=Ee||{},Fe=Ge.key,hn=Ge.dataIndex,dn=Fe||Yt(hn).join("-")||we;Pe[dn];)dn="".concat(dn,"_next");Pe[dn]=!0,Qt.push(dn)}),Qt}function Zn(Ut){return Ut!=null}function Dn(Ut){return Ut&&(0,Vt.Z)(Ut)==="object"&&!Array.isArray(Ut)&&!Tt.isValidElement(Ut)}function Ne(Ut,Qt,Pe,Ee,Ge,Fe){var hn=Tt.useContext(Mn),dn=Pt(),rn=(0,Ve.Z)(function(){if(Zn(Ee))return[Ee];var Nn=Qt==null||Qt===""?[]:Array.isArray(Qt)?Qt:[Qt],Rn=(0,Xe.Z)(Ut,Nn),In=Rn,gi=void 0;if(Ge){var di=Ge(Rn,Ut,Pe);Dn(di)?(In=di.children,gi=di.props,hn.renderWithProps=!0):In=di}return[In,gi]},[dn,Ut,Ee,Qt,Ge,Pe],function(Nn,Rn){if(Fe){var In=(0,de.Z)(Nn,2),gi=In[1],di=(0,de.Z)(Rn,2),ei=di[1];return Fe(ei,gi)}return hn.renderWithProps?!0:!(0,ae.Z)(Nn,Rn,!0)});return rn}function pn(Ut,Qt,Pe,Ee){var Ge=Ut+Qt-1;return Ut<=Ee&&Ge>=Pe}function Tn(Ut,Qt){return Jt(Bt,function(Pe){var Ee=pn(Ut,Qt||1,Pe.hoverStartRow,Pe.hoverEndRow);return[Ee,Pe.onHover]})}var Yn=function(Qt){var Pe=Qt.ellipsis,Ee=Qt.rowType,Ge=Qt.children,Fe,hn=Pe===!0?{showTitle:!0}:Pe;return hn&&(hn.showTitle||Ee==="header")&&(typeof Ge=="string"||typeof Ge=="number"?Fe=Ge.toString():Tt.isValidElement(Ge)&&typeof Ge.props.children=="string"&&(Fe=Ge.props.children)),Fe};function mn(Ut){var Qt,Pe,Ee,Ge,Fe,hn,dn,rn,Nn=Ut.component,Rn=Ut.children,In=Ut.ellipsis,gi=Ut.scope,di=Ut.prefixCls,ei=Ut.className,Fi=Ut.align,ai=Ut.record,Ai=Ut.render,bi=Ut.dataIndex,Vi=Ut.renderIndex,vo=Ut.shouldCellUpdate,Bo=Ut.index,Oi=Ut.rowType,fo=Ut.colSpan,or=Ut.rowSpan,Zi=Ut.fixLeft,io=Ut.fixRight,Wi=Ut.firstFixLeft,xi=Ut.lastFixLeft,to=Ut.firstFixRight,Mo=Ut.lastFixRight,Wo=Ut.appendNode,Uo=Ut.additionalProps,Ri=Uo===void 0?{}:Uo,sr=Ut.isSticky,fr="".concat(di,"-cell"),Qr=Jt(Bt,["supportSticky","allColumnsFixedLeft"]),br=Qr.supportSticky,Os=Qr.allColumnsFixedLeft,Bs=Ne(ai,bi,Vi,Rn,Ai,vo),ur=(0,de.Z)(Bs,2),Ao=ur[0],zr=ur[1],Rs={},Cs=typeof Zi=="number"&&br,ia=typeof io=="number"&&br;Cs&&(Rs.position="sticky",Rs.left=Zi),ia&&(Rs.position="sticky",Rs.right=io);var Vo=(Qt=(Pe=(Ee=zr==null?void 0:zr.colSpan)!==null&&Ee!==void 0?Ee:Ri.colSpan)!==null&&Pe!==void 0?Pe:fo)!==null&&Qt!==void 0?Qt:1,Do=(Ge=(Fe=(hn=zr==null?void 0:zr.rowSpan)!==null&&hn!==void 0?hn:Ri.rowSpan)!==null&&Fe!==void 0?Fe:or)!==null&&Ge!==void 0?Ge:1,Yo=Tn(Bo,Do),xo=(0,de.Z)(Yo,2),Kr=xo[0],wo=xo[1],rr=function(ta){var ma;ai&&wo(Bo,Bo+Do-1),Ri==null||(ma=Ri.onMouseEnter)===null||ma===void 0||ma.call(Ri,ta)},Nr=function(ta){var ma;ai&&wo(-1,-1),Ri==null||(ma=Ri.onMouseLeave)===null||ma===void 0||ma.call(Ri,ta)};if(Vo===0||Do===0)return null;var Tr=(dn=Ri.title)!==null&&dn!==void 0?dn:Yn({rowType:Oi,ellipsis:In,children:Ao}),Ea=me()(fr,ei,(rn={},(0,Zt.Z)(rn,"".concat(fr,"-fix-left"),Cs&&br),(0,Zt.Z)(rn,"".concat(fr,"-fix-left-first"),Wi&&br),(0,Zt.Z)(rn,"".concat(fr,"-fix-left-last"),xi&&br),(0,Zt.Z)(rn,"".concat(fr,"-fix-left-all"),xi&&Os&&br),(0,Zt.Z)(rn,"".concat(fr,"-fix-right"),ia&&br),(0,Zt.Z)(rn,"".concat(fr,"-fix-right-first"),to&&br),(0,Zt.Z)(rn,"".concat(fr,"-fix-right-last"),Mo&&br),(0,Zt.Z)(rn,"".concat(fr,"-ellipsis"),In),(0,Zt.Z)(rn,"".concat(fr,"-with-append"),Wo),(0,Zt.Z)(rn,"".concat(fr,"-fix-sticky"),(Cs||ia)&&sr&&br),(0,Zt.Z)(rn,"".concat(fr,"-row-hover"),!zr&&Kr),rn),Ri.className,zr==null?void 0:zr.className),la={};Fi&&(la.textAlign=Fi);var Va=(0,he.Z)((0,he.Z)((0,he.Z)((0,he.Z)({},Rs),Ri.style),la),zr==null?void 0:zr.style),Jr=Ao;return(0,Vt.Z)(Jr)==="object"&&!Array.isArray(Jr)&&!Tt.isValidElement(Jr)&&(Jr=null),In&&(xi||to)&&(Jr=Tt.createElement("span",{className:"".concat(fr,"-content")},Jr)),Tt.createElement(Nn,(0,Be.Z)({},zr,Ri,{className:Ea,style:Va,title:Tr,scope:gi,onMouseEnter:rr,onMouseLeave:Nr,colSpan:Vo!==1?Vo:null,rowSpan:Do!==1?Do:null}),Wo,Jr)}var ui=Tt.memo(mn);function Ce(Ut,Qt,Pe,Ee,Ge,Fe){var hn=Pe[Ut]||{},dn=Pe[Qt]||{},rn,Nn;hn.fixed==="left"?rn=Ee.left[Ge==="rtl"?Qt:Ut]:dn.fixed==="right"&&(Nn=Ee.right[Ge==="rtl"?Ut:Qt]);var Rn=!1,In=!1,gi=!1,di=!1,ei=Pe[Qt+1],Fi=Pe[Ut-1],ai=!(Fe!=null&&Fe.children);if(Ge==="rtl"){if(rn!==void 0){var Ai=Fi&&Fi.fixed==="left";di=!Ai&&ai}else if(Nn!==void 0){var bi=ei&&ei.fixed==="right";gi=!bi&&ai}}else if(rn!==void 0){var Vi=ei&&ei.fixed==="left";Rn=!Vi&&ai}else if(Nn!==void 0){var vo=Fi&&Fi.fixed==="right";In=!vo&&ai}return{fixLeft:rn,fixRight:Nn,lastFixLeft:Rn,firstFixRight:In,lastFixRight:gi,firstFixLeft:di,isSticky:Ee.isSticky}}var $n=Tt.createContext({}),Pi=$n;function Ot(Ut){var Qt=Ut.className,Pe=Ut.index,Ee=Ut.children,Ge=Ut.colSpan,Fe=Ge===void 0?1:Ge,hn=Ut.rowSpan,dn=Ut.align,rn=Jt(Bt,["prefixCls","direction"]),Nn=rn.prefixCls,Rn=rn.direction,In=Tt.useContext(Pi),gi=In.scrollColumnIndex,di=In.stickyOffsets,ei=In.flattenColumns,Fi=In.columns,ai=Pe+Fe-1,Ai=ai+1===gi?Fe+1:Fe,bi=Ce(Pe,Pe+Ai-1,ei,di,Rn,Fi==null?void 0:Fi[Pe]);return Tt.createElement(ui,(0,Be.Z)({className:Qt,index:Pe,component:"td",prefixCls:Nn,record:null,dataIndex:null,align:dn,colSpan:Ai,rowSpan:hn,render:function(){return Ee}},bi))}var Lt=bt(74416),St=["children"];function It(Ut){var Qt=Ut.children,Pe=(0,Lt.Z)(Ut,St);return Tt.createElement("tr",Pe,Qt)}function Kt(Ut){var Qt=Ut.children;return Qt}Kt.Row=It,Kt.Cell=Ot;var xt=Kt;function Me(Ut){var Qt=Ut.children,Pe=Ut.stickyOffsets,Ee=Ut.flattenColumns,Ge=Ut.columns,Fe=Jt(Bt,"prefixCls"),hn=Ee.length-1,dn=Ee[hn],rn=Tt.useMemo(function(){return{stickyOffsets:Pe,flattenColumns:Ee,scrollColumnIndex:dn!=null&&dn.scrollbar?hn:null,columns:Ge}},[dn,Ee,hn,Pe,Ge]);return Tt.createElement(Pi.Provider,{value:rn},Tt.createElement("tfoot",{className:"".concat(Fe,"-summary")},Qt))}var De=vt(Me),le=xt,ee=bt(70425),Se=bt(29301),xe=bt(29194),ue=bt(24514),Te=bt(75152),vn=bt(26112);function fn(Ut,Qt,Pe,Ee,Ge,Fe,hn){Ut.push({record:Qt,indent:Pe,index:hn});var dn=Fe(Qt),rn=Ge==null?void 0:Ge.has(dn);if(Qt&&Array.isArray(Qt[Ee])&&rn)for(var Nn=0;Nn<Qt[Ee].length;Nn+=1)fn(Ut,Qt[Ee][Nn],Pe+1,Ee,Ge,Fe,Nn)}function en(Ut,Qt,Pe,Ee){var Ge=Tt.useMemo(function(){if(Pe!=null&&Pe.size){for(var Fe=[],hn=0;hn<(Ut==null?void 0:Ut.length);hn+=1){var dn=Ut[hn];fn(Fe,dn,0,Qt,Pe,Ee,hn)}return Fe}return Ut==null?void 0:Ut.map(function(rn,Nn){return{record:rn,indent:0,index:Nn}})},[Ut,Qt,Pe,Ee]);return Ge}function xn(Ut){var Qt=Ut.prefixCls,Pe=Ut.children,Ee=Ut.component,Ge=Ut.cellComponent,Fe=Ut.className,hn=Ut.expanded,dn=Ut.colSpan,rn=Ut.isEmpty,Nn=Jt(Bt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Rn=Nn.scrollbarSize,In=Nn.fixHeader,gi=Nn.fixColumn,di=Nn.componentWidth,ei=Nn.horizonScroll,Fi=Pe;return(rn?ei&&di:gi)&&(Fi=Tt.createElement("div",{style:{width:di-(In?Rn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Qt,"-expanded-row-fixed")},Fi)),Tt.createElement(Ee,{className:Fe,style:{display:hn?null:"none"}},Tt.createElement(ui,{component:Ge,prefixCls:Qt,colSpan:dn},Fi))}var ln=xn;function tn(Ut,Qt,Pe,Ee){var Ge=Jt(Bt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Fe=Ge.flattenColumns,hn=Ge.expandableType,dn=Ge.expandedKeys,rn=Ge.childrenColumnName,Nn=Ge.onTriggerExpand,Rn=Ge.rowExpandable,In=Ge.onRow,gi=Ge.expandRowByClick,di=Ge.rowClassName,ei=hn==="nest",Fi=hn==="row"&&(!Rn||Rn(Ut)),ai=Fi||ei,Ai=dn&&dn.has(Qt),bi=rn&&Ut&&Ut[rn],Vi=(0,ee.useEvent)(Nn),vo=In==null?void 0:In(Ut,Pe),Bo=vo==null?void 0:vo.onClick,Oi=function(io){gi&&ai&&Nn(Ut,io);for(var Wi=arguments.length,xi=new Array(Wi>1?Wi-1:0),to=1;to<Wi;to++)xi[to-1]=arguments[to];Bo==null||Bo.apply(void 0,[io].concat(xi))},fo;typeof di=="string"?fo=di:typeof di=="function"&&(fo=di(Ut,Pe,Ee));var or=_e(Fe);return(0,he.Z)((0,he.Z)({},Ge),{},{columnsKey:or,nestExpandable:ei,expanded:Ai,hasNestChildren:bi,record:Ut,onTriggerExpand:Vi,rowSupportExpand:Fi,expandable:ai,rowProps:(0,he.Z)((0,he.Z)({},vo),{},{className:me()(fo,vo==null?void 0:vo.className),onClick:Oi})})}function ii(Ut,Qt,Pe,Ee,Ge){var Fe=Ut.record,hn=Ut.prefixCls,dn=Ut.columnsKey,rn=Ut.fixedInfoList,Nn=Ut.expandIconColumnIndex,Rn=Ut.nestExpandable,In=Ut.indentSize,gi=Ut.expandIcon,di=Ut.expanded,ei=Ut.hasNestChildren,Fi=Ut.onTriggerExpand,ai=dn[Pe],Ai=rn[Pe],bi;Pe===(Nn||0)&&Rn&&(bi=Tt.createElement(Tt.Fragment,null,Tt.createElement("span",{style:{paddingLeft:"".concat(In*Ee,"px")},className:"".concat(hn,"-row-indent indent-level-").concat(Ee)}),gi({prefixCls:hn,expanded:di,expandable:ei,record:Fe,onExpand:Fi})));var Vi;return Qt.onCell&&(Vi=Qt.onCell(Fe,Ge)),{key:ai,fixedInfo:Ai,appendCellNode:bi,additionalCellProps:Vi||{}}}function ri(Ut){var Qt=Ut.className,Pe=Ut.style,Ee=Ut.record,Ge=Ut.index,Fe=Ut.renderIndex,hn=Ut.rowKey,dn=Ut.indent,rn=dn===void 0?0:dn,Nn=Ut.rowComponent,Rn=Ut.cellComponent,In=Ut.scopeCellComponent,gi=tn(Ee,hn,Ge,rn),di=gi.prefixCls,ei=gi.flattenColumns,Fi=gi.expandedRowClassName,ai=gi.expandedRowRender,Ai=gi.rowProps,bi=gi.expanded,Vi=gi.rowSupportExpand,vo=Tt.useState(!1),Bo=(0,de.Z)(vo,2),Oi=Bo[0],fo=Bo[1];Tt.useEffect(function(){bi&&fo(!0)},[bi]);var or=Tt.createElement(Nn,(0,Be.Z)({},Ai,{"data-row-key":hn,className:me()(Qt,"".concat(di,"-row"),"".concat(di,"-row-level-").concat(rn),Ai==null?void 0:Ai.className),style:(0,he.Z)((0,he.Z)({},Pe),Ai==null?void 0:Ai.style)}),ei.map(function(xi,to){var Mo=xi.render,Wo=xi.dataIndex,Uo=xi.className,Ri=ii(gi,xi,to,rn,Ge),sr=Ri.key,fr=Ri.fixedInfo,Qr=Ri.appendCellNode,br=Ri.additionalCellProps;return Tt.createElement(ui,(0,Be.Z)({className:Uo,ellipsis:xi.ellipsis,align:xi.align,scope:xi.rowScope,component:xi.rowScope?In:Rn,prefixCls:di,key:sr,record:Ee,index:Ge,renderIndex:Fe,dataIndex:Wo,render:Mo,shouldCellUpdate:xi.shouldCellUpdate},fr,{appendNode:Qr,additionalProps:br}))})),Zi;if(Vi&&(Oi||bi)){var io=ai(Ee,Ge,rn+1,bi),Wi=Fi&&Fi(Ee,Ge,rn);Zi=Tt.createElement(ln,{expanded:bi,className:me()("".concat(di,"-expanded-row"),"".concat(di,"-expanded-row-level-").concat(rn+1),Wi),prefixCls:di,component:Nn,cellComponent:Rn,colSpan:ei.length,isEmpty:!1},io)}return Tt.createElement(Tt.Fragment,null,or,Zi)}ri.displayName="BodyRow";var Un=vt(ri);function si(Ut){var Qt=Ut.columnKey,Pe=Ut.onColumnResize,Ee=Tt.useRef();return Tt.useEffect(function(){Ee.current&&Pe(Qt,Ee.current.offsetWidth)},[]),Tt.createElement(Se.Z,{data:Qt},Tt.createElement("td",{ref:Ee,style:{padding:0,border:0,height:0}},Tt.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function mi(Ut){var Qt=Ut.prefixCls,Pe=Ut.columnsKey,Ee=Ut.onColumnResize;return Tt.createElement("tr",{"aria-hidden":"true",className:"".concat(Qt,"-measure-row"),style:{height:0,fontSize:0}},Tt.createElement(Se.Z.Collection,{onBatchResize:function(Fe){Fe.forEach(function(hn){var dn=hn.data,rn=hn.size;Ee(dn,rn.offsetWidth)})}},Pe.map(function(Ge){return Tt.createElement(si,{key:Ge,columnKey:Ge,onColumnResize:Ee})})))}function Hi(Ut){var Qt=Ut.data,Pe=Ut.measureColumnWidth,Ee=Jt(Bt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Ge=Ee.prefixCls,Fe=Ee.getComponent,hn=Ee.onColumnResize,dn=Ee.flattenColumns,rn=Ee.getRowKey,Nn=Ee.expandedKeys,Rn=Ee.childrenColumnName,In=Ee.emptyNode,gi=en(Qt,Rn,Nn,rn),di=Tt.useRef({renderWithProps:!1}),ei=Fe(["body","wrapper"],"tbody"),Fi=Fe(["body","row"],"tr"),ai=Fe(["body","cell"],"td"),Ai=Fe(["body","cell"],"th"),bi;Qt.length?bi=gi.map(function(vo,Bo){var Oi=vo.record,fo=vo.indent,or=vo.index,Zi=rn(Oi,Bo);return Tt.createElement(Un,{key:Zi,rowKey:Zi,record:Oi,index:Bo,renderIndex:or,rowComponent:Fi,cellComponent:ai,scopeCellComponent:Ai,getRowKey:rn,indent:fo})}):bi=Tt.createElement(ln,{expanded:!0,className:"".concat(Ge,"-placeholder"),prefixCls:Ge,component:Fi,cellComponent:ai,colSpan:dn.length,isEmpty:!0},In);var Vi=_e(dn);return Tt.createElement(Mn.Provider,{value:di.current},Tt.createElement(ei,{className:"".concat(Ge,"-tbody")},Pe&&Tt.createElement(mi,{prefixCls:Ge,columnsKey:Vi,onColumnResize:hn}),bi))}Hi.displayName="Body";var Xi=vt(Hi),Lo=["expandable"],Oo="RC_TABLE_INTERNAL_COL_DEFINE";function No(Ut){var Qt=Ut.expandable,Pe=(0,Lt.Z)(Ut,Lo),Ee;return"expandable"in Ut?Ee=(0,he.Z)((0,he.Z)({},Pe),Qt):Ee=Pe,Ee.showExpandColumn===!1&&(Ee.expandIconColumnIndex=-1),Ee}var Io=["columnType"];function _o(Ut){for(var Qt=Ut.colWidths,Pe=Ut.columns,Ee=Ut.columCount,Ge=[],Fe=Ee||Pe.length,hn=!1,dn=Fe-1;dn>=0;dn-=1){var rn=Qt[dn],Nn=Pe&&Pe[dn],Rn=Nn&&Nn[Oo];if(rn||Rn||hn){var In=Rn||{},gi=In.columnType,di=(0,Lt.Z)(In,Io);Ge.unshift(Tt.createElement("col",(0,Be.Z)({key:dn,style:{width:rn}},di))),hn=!0}}return Tt.createElement("colgroup",null,Ge)}var qo=_o,Ni=bt(80702),$o=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Ro(Ut,Qt){return(0,Tt.useMemo)(function(){for(var Pe=[],Ee=0;Ee<Qt;Ee+=1){var Ge=Ut[Ee];if(Ge!==void 0)Pe[Ee]=Ge;else return null}return Pe},[Ut.join("_"),Qt])}var Mt=Tt.forwardRef(function(Ut,Qt){var Pe=Ut.className,Ee=Ut.noData,Ge=Ut.columns,Fe=Ut.flattenColumns,hn=Ut.colWidths,dn=Ut.columCount,rn=Ut.stickyOffsets,Nn=Ut.direction,Rn=Ut.fixHeader,In=Ut.stickyTopOffset,gi=Ut.stickyBottomOffset,di=Ut.stickyClassName,ei=Ut.onScroll,Fi=Ut.maxContentScroll,ai=Ut.children,Ai=(0,Lt.Z)(Ut,$o),bi=Jt(Bt,["prefixCls","scrollbarSize","isSticky"]),Vi=bi.prefixCls,vo=bi.scrollbarSize,Bo=bi.isSticky,Oi=Bo&&!Rn?0:vo,fo=Tt.useRef(null),or=Tt.useCallback(function(Uo){(0,pe.mH)(Qt,Uo),(0,pe.mH)(fo,Uo)},[]);Tt.useEffect(function(){var Uo;function Ri(sr){var fr=sr,Qr=fr.currentTarget,br=fr.deltaX;br&&(ei({currentTarget:Qr,scrollLeft:Qr.scrollLeft+br}),sr.preventDefault())}return(Uo=fo.current)===null||Uo===void 0||Uo.addEventListener("wheel",Ri),function(){var sr;(sr=fo.current)===null||sr===void 0||sr.removeEventListener("wheel",Ri)}},[]);var Zi=Tt.useMemo(function(){return Fe.every(function(Uo){return Uo.width})},[Fe]),io=Fe[Fe.length-1],Wi={fixed:io?io.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Vi,"-cell-scrollbar")}}},xi=(0,Tt.useMemo)(function(){return Oi?[].concat((0,Ni.Z)(Ge),[Wi]):Ge},[Oi,Ge]),to=(0,Tt.useMemo)(function(){return Oi?[].concat((0,Ni.Z)(Fe),[Wi]):Fe},[Oi,Fe]),Mo=(0,Tt.useMemo)(function(){var Uo=rn.right,Ri=rn.left;return(0,he.Z)((0,he.Z)({},rn),{},{left:Nn==="rtl"?[].concat((0,Ni.Z)(Ri.map(function(sr){return sr+Oi})),[0]):Ri,right:Nn==="rtl"?Uo:[].concat((0,Ni.Z)(Uo.map(function(sr){return sr+Oi})),[0]),isSticky:Bo})},[Oi,rn,Bo]),Wo=Ro(hn,dn);return Tt.createElement("div",{style:(0,he.Z)({overflow:"hidden"},Bo?{top:In,bottom:gi}:{}),ref:or,className:me()(Pe,(0,Zt.Z)({},di,!!di))},Tt.createElement("table",{style:{tableLayout:"fixed",visibility:Ee||Wo?null:"hidden"}},(!Ee||!Fi||Zi)&&Tt.createElement(qo,{colWidths:Wo?[].concat((0,Ni.Z)(Wo),[Oi]):[],columCount:dn+1,columns:to}),ai((0,he.Z)((0,he.Z)({},Ai),{},{stickyOffsets:Mo,columns:xi,flattenColumns:to}))))});Mt.displayName="FixedHolder";var cr=Tt.memo(Mt);function ir(Ut){var Qt=Ut.cells,Pe=Ut.stickyOffsets,Ee=Ut.flattenColumns,Ge=Ut.rowComponent,Fe=Ut.cellComponent,hn=Ut.tdCellComponent,dn=Ut.onHeaderRow,rn=Ut.index,Nn=Jt(Bt,["prefixCls","direction"]),Rn=Nn.prefixCls,In=Nn.direction,gi;dn&&(gi=dn(Qt.map(function(ei){return ei.column}),rn));var di=_e(Qt.map(function(ei){return ei.column}));return Tt.createElement(Ge,gi,Qt.map(function(ei,Fi){var ai=ei.column,Ai=Ce(ei.colStart,ei.colEnd,Ee,Pe,In,ai),bi;return ai&&ai.onHeaderCell&&(bi=ei.column.onHeaderCell(ai)),Tt.createElement(ui,(0,Be.Z)({},ei,{scope:ai.title?ei.colSpan>1?"colgroup":"col":null,ellipsis:ai.ellipsis,align:ai.align,component:ai.title?Fe:hn,prefixCls:Rn,key:di[Fi]},Ai,{additionalProps:bi,rowType:"header"}))}))}ir.displayName="HeaderRow";var pr=ir;function ts(Ut){var Qt=[];function Pe(hn,dn){var rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Qt[rn]=Qt[rn]||[];var Nn=dn,Rn=hn.filter(Boolean).map(function(In){var gi={key:In.key,className:In.className||"",children:In.title,column:In,colStart:Nn},di=1,ei=In.children;return ei&&ei.length>0&&(di=Pe(ei,Nn,rn+1).reduce(function(Fi,ai){return Fi+ai},0),gi.hasSubColumns=!0),"colSpan"in In&&(di=In.colSpan),"rowSpan"in In&&(gi.rowSpan=In.rowSpan),gi.colSpan=di,gi.colEnd=gi.colStart+di-1,Qt[rn].push(gi),Nn+=di,di});return Rn}Pe(Ut,0);for(var Ee=Qt.length,Ge=function(dn){Qt[dn].forEach(function(rn){!("rowSpan"in rn)&&!rn.hasSubColumns&&(rn.rowSpan=Ee-dn)})},Fe=0;Fe<Ee;Fe+=1)Ge(Fe);return Qt}function rs(Ut){var Qt=Ut.stickyOffsets,Pe=Ut.columns,Ee=Ut.flattenColumns,Ge=Ut.onHeaderRow,Fe=Jt(Bt,["prefixCls","getComponent"]),hn=Fe.prefixCls,dn=Fe.getComponent,rn=Tt.useMemo(function(){return ts(Pe)},[Pe]),Nn=dn(["header","wrapper"],"thead"),Rn=dn(["header","row"],"tr"),In=dn(["header","cell"],"th"),gi=dn(["header","cell"],"td");return Tt.createElement(Nn,{className:"".concat(hn,"-thead")},rn.map(function(di,ei){var Fi=Tt.createElement(pr,{key:ei,flattenColumns:Ee,cells:di,stickyOffsets:Qt,rowComponent:Rn,cellComponent:In,tdCellComponent:gi,onHeaderRow:Ge,index:ei});return Fi}))}var ls=vt(rs),Ci=bt(11592);function oi(Ut){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Qt=="number"?Qt:Qt.endsWith("%")?Ut*parseFloat(Qt)/100:null}function Ie(Ut,Qt){return Tt.useMemo(function(){if(Qt&&Qt>0){var Pe=0,Ee=0;Ut.forEach(function(Nn){var Rn=oi(Qt,Nn.width);Rn?Pe+=Rn:Ee+=1});var Ge=Qt-Pe,Fe=Ee,hn=Ge/Ee,dn=0,rn=Ut.map(function(Nn){var Rn=(0,he.Z)({},Nn),In=oi(Qt,Rn.width);if(In)Rn.width=In;else{var gi=Math.floor(hn);Rn.width=Fe===1?Ge:gi,Ge-=gi,Fe-=1}return dn+=Rn.width,Rn});return[rn,dn]}return[Ut,Qt]},[Ut,Qt])}var Le=["children"],Gt=["fixed"];function We(Ut){return(0,Ci.Z)(Ut).filter(function(Qt){return Tt.isValidElement(Qt)}).map(function(Qt){var Pe=Qt.key,Ee=Qt.props,Ge=Ee.children,Fe=(0,Lt.Z)(Ee,Le),hn=(0,he.Z)({key:Pe},Fe);return Ge&&(hn.children=We(Ge)),hn})}function Ye(Ut){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Ut.filter(function(Pe){return Pe&&(0,Vt.Z)(Pe)==="object"}).reduce(function(Pe,Ee,Ge){var Fe=Ee.fixed,hn=Fe===!0?"left":Fe,dn="".concat(Qt,"-").concat(Ge),rn=Ee.children;return rn&&rn.length>0?[].concat((0,Ni.Z)(Pe),(0,Ni.Z)(Ye(rn,dn).map(function(Nn){return(0,he.Z)({fixed:hn},Nn)}))):[].concat((0,Ni.Z)(Pe),[(0,he.Z)((0,he.Z)({key:dn},Ee),{},{fixed:hn})])},[])}function ce(Ut){for(var Qt=!0,Pe=0;Pe<Ut.length;Pe+=1){var Ee=Ut[Pe];if(Qt&&Ee.fixed!=="left")Qt=!1;else if(!Qt&&Ee.fixed==="left"){warning(!1,"Index ".concat(Pe-1," of `columns` missing `fixed='left'` prop."));break}}for(var Ge=!0,Fe=Ut.length-1;Fe>=0;Fe-=1){var hn=Ut[Fe];if(Ge&&hn.fixed!=="right")Ge=!1;else if(!Ge&&hn.fixed==="right"){warning(!1,"Index ".concat(Fe+1," of `columns` missing `fixed='right'` prop."));break}}}function qt(Ut){return Ut.map(function(Qt){var Pe=Qt.fixed,Ee=(0,Lt.Z)(Qt,Gt),Ge=Pe;return Pe==="left"?Ge="right":Pe==="right"&&(Ge="left"),(0,he.Z)({fixed:Ge},Ee)})}function He(Ut,Qt){var Pe=Ut.prefixCls,Ee=Ut.columns,Ge=Ut.children,Fe=Ut.expandable,hn=Ut.expandedKeys,dn=Ut.columnTitle,rn=Ut.getRowKey,Nn=Ut.onTriggerExpand,Rn=Ut.expandIcon,In=Ut.rowExpandable,gi=Ut.expandIconColumnIndex,di=Ut.direction,ei=Ut.expandRowByClick,Fi=Ut.columnWidth,ai=Ut.fixed,Ai=Ut.scrollWidth,bi=Tt.useMemo(function(){return Ee||We(Ge)},[Ee,Ge]),Vi=Tt.useMemo(function(){if(Fe){var io,Wi=bi.slice();if(!Wi.includes(wt)){var xi=gi||0;xi>=0&&Wi.splice(xi,0,wt)}var to=Wi.indexOf(wt);Wi=Wi.filter(function(Ri,sr){return Ri!==wt||sr===to});var Mo=bi[to],Wo;(ai==="left"||ai)&&!gi?Wo="left":(ai==="right"||ai)&&gi===bi.length?Wo="right":Wo=Mo?Mo.fixed:null;var Uo=(io={},(0,Zt.Z)(io,Oo,{className:"".concat(Pe,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Zt.Z)(io,"title",dn),(0,Zt.Z)(io,"fixed",Wo),(0,Zt.Z)(io,"className","".concat(Pe,"-row-expand-icon-cell")),(0,Zt.Z)(io,"width",Fi),(0,Zt.Z)(io,"render",function(sr,fr,Qr){var br=rn(fr,Qr),Os=hn.has(br),Bs=In?In(fr):!0,ur=Rn({prefixCls:Pe,expanded:Os,expandable:Bs,record:fr,onExpand:Nn});return ei?Tt.createElement("span",{onClick:function(zr){return zr.stopPropagation()}},ur):ur}),io);return Wi.map(function(Ri){return Ri===wt?Uo:Ri})}return bi.filter(function(Ri){return Ri!==wt})},[Fe,bi,rn,hn,Rn,di]),vo=Tt.useMemo(function(){var io=Vi;return Qt&&(io=Qt(io)),io.length||(io=[{render:function(){return null}}]),io},[Qt,Vi,di]),Bo=Tt.useMemo(function(){return di==="rtl"?qt(Ye(vo)):Ye(vo)},[vo,di,Ai]),Oi=Ie(Bo,Ai),fo=(0,de.Z)(Oi,2),or=fo[0],Zi=fo[1];return[vo,or,Zi]}var un=He;function An(Ut){var Qt,Pe=Ut.prefixCls,Ee=Ut.record,Ge=Ut.onExpand,Fe=Ut.expanded,hn=Ut.expandable,dn="".concat(Pe,"-row-expand-icon");if(!hn)return Tt.createElement("span",{className:me()(dn,"".concat(Pe,"-row-spaced"))});var rn=function(Rn){Ge(Ee,Rn),Rn.stopPropagation()};return Tt.createElement("span",{className:me()(dn,(Qt={},(0,Zt.Z)(Qt,"".concat(Pe,"-row-expanded"),Fe),(0,Zt.Z)(Qt,"".concat(Pe,"-row-collapsed"),!Fe),Qt)),onClick:rn})}function Fn(Ut,Qt,Pe){var Ee=[];function Ge(Fe){(Fe||[]).forEach(function(hn,dn){Ee.push(Qt(hn,dn)),Ge(hn[Pe])})}return Ge(Ut),Ee}function oe(Ut,Qt,Pe){var Ee=No(Ut),Ge=Ee.expandIcon,Fe=Ee.expandedRowKeys,hn=Ee.defaultExpandedRowKeys,dn=Ee.defaultExpandAllRows,rn=Ee.expandedRowRender,Nn=Ee.onExpand,Rn=Ee.onExpandedRowsChange,In=Ee.childrenColumnName,gi=Ge||An,di=In||"children",ei=Tt.useMemo(function(){return rn?"row":Ut.expandable&&Ut.internalHooks===te&&Ut.expandable.__PARENT_RENDER_ICON__||Qt.some(function(Bo){return Bo&&(0,Vt.Z)(Bo)==="object"&&Bo[di]})?"nest":!1},[!!rn,Qt]),Fi=Tt.useState(function(){return hn||(dn?Fn(Qt,Pe,di):[])}),ai=(0,de.Z)(Fi,2),Ai=ai[0],bi=ai[1],Vi=Tt.useMemo(function(){return new Set(Fe||Ai||[])},[Fe,Ai]),vo=Tt.useCallback(function(Bo){var Oi=Pe(Bo,Qt.indexOf(Bo)),fo,or=Vi.has(Oi);or?(Vi.delete(Oi),fo=(0,Ni.Z)(Vi)):fo=[].concat((0,Ni.Z)(Vi),[Oi]),bi(fo),Nn&&Nn(!or,Bo),Rn&&Rn(fo)},[Pe,Vi,Qt,Nn,Rn]);return[Ee,ei,Vi,gi,di,vo]}function qe(Ut,Qt,Pe,Ee){var Ge=Ut.map(function(Fe,hn){return Ce(hn,hn,Ut,Qt,Pe,Ee==null?void 0:Ee[hn])});return(0,Ve.Z)(function(){return Ge},[Ge],function(Fe,hn){return!(0,ae.Z)(Fe,hn)})}function bn(Ut){var Qt=(0,Tt.useRef)(Ut),Pe=(0,Tt.useState)({}),Ee=(0,de.Z)(Pe,2),Ge=Ee[1],Fe=(0,Tt.useRef)(null),hn=(0,Tt.useRef)([]);function dn(rn){hn.current.push(rn);var Nn=Promise.resolve();Fe.current=Nn,Nn.then(function(){if(Fe.current===Nn){var Rn=hn.current,In=Qt.current;hn.current=[],Rn.forEach(function(gi){Qt.current=gi(Qt.current)}),Fe.current=null,In!==Qt.current&&Ge({})}})}return(0,Tt.useEffect)(function(){return function(){Fe.current=null}},[]),[Qt.current,dn]}function Jn(Ut){var Qt=(0,Tt.useRef)(Ut||null),Pe=(0,Tt.useRef)();function Ee(){window.clearTimeout(Pe.current)}function Ge(hn){Qt.current=hn,Ee(),Pe.current=window.setTimeout(function(){Qt.current=null,Pe.current=void 0},100)}function Fe(){return Qt.current}return(0,Tt.useEffect)(function(){return Ee},[]),[Ge,Fe]}function Ke(){var Ut=Tt.useState(-1),Qt=(0,de.Z)(Ut,2),Pe=Qt[0],Ee=Qt[1],Ge=Tt.useState(-1),Fe=(0,de.Z)(Ge,2),hn=Fe[0],dn=Fe[1],rn=Tt.useCallback(function(Nn,Rn){Ee(Nn),dn(Rn)},[]);return[Pe,hn,rn]}var Qe=bt(47273),zn=(0,Qe.Z)()?window:null;function Wn(Ut,Qt){var Pe=(0,Vt.Z)(Ut)==="object"?Ut:{},Ee=Pe.offsetHeader,Ge=Ee===void 0?0:Ee,Fe=Pe.offsetSummary,hn=Fe===void 0?0:Fe,dn=Pe.offsetScroll,rn=dn===void 0?0:dn,Nn=Pe.getContainer,Rn=Nn===void 0?function(){return zn}:Nn,In=Rn()||zn;return Tt.useMemo(function(){var gi=!!Ut;return{isSticky:gi,stickyClassName:gi?"".concat(Qt,"-sticky-holder"):"",offsetHeader:Ge,offsetSummary:hn,offsetScroll:rn,container:In}},[rn,Ge,hn,Qt,In])}function fi(Ut,Qt,Pe){var Ee=(0,Tt.useMemo)(function(){for(var Ge=[],Fe=[],hn=0,dn=0,rn=0;rn<Qt;rn+=1)if(Pe==="rtl"){Fe[rn]=dn,dn+=Ut[rn]||0;var Nn=Qt-rn-1;Ge[Nn]=hn,hn+=Ut[Nn]||0}else{Ge[rn]=hn,hn+=Ut[rn]||0;var Rn=Qt-rn-1;Fe[Rn]=dn,dn+=Ut[Rn]||0}return{left:Ge,right:Fe}},[Ut,Qt,Pe]);return Ee}var Hn=fi;function _n(Ut){var Qt=Ut.className,Pe=Ut.children;return Tt.createElement("div",{className:Qt},Pe)}var Vn=_n,wi=bt(8224),Qi=bt(55468),qi=function(Qt,Pe){var Ee,Ge,Fe=Qt.scrollBodyRef,hn=Qt.onScroll,dn=Qt.offsetScroll,rn=Qt.container,Nn=Jt(Bt,"prefixCls"),Rn=((Ee=Fe.current)===null||Ee===void 0?void 0:Ee.scrollWidth)||0,In=((Ge=Fe.current)===null||Ge===void 0?void 0:Ge.clientWidth)||0,gi=Rn&&In*(In/Rn),di=Tt.useRef(),ei=bn({scrollLeft:0,isHiddenScrollBar:!1}),Fi=(0,de.Z)(ei,2),ai=Fi[0],Ai=Fi[1],bi=Tt.useRef({delta:0,x:0}),Vi=Tt.useState(!1),vo=(0,de.Z)(Vi,2),Bo=vo[0],Oi=vo[1],fo=function(){Oi(!1)},or=function(to){to.persist(),bi.current.delta=to.pageX-ai.scrollLeft,bi.current.x=0,Oi(!0),to.preventDefault()},Zi=function(to){var Mo,Wo=to||((Mo=window)===null||Mo===void 0?void 0:Mo.event),Uo=Wo.buttons;if(!Bo||Uo===0){Bo&&Oi(!1);return}var Ri=bi.current.x+to.pageX-bi.current.x-bi.current.delta;Ri<=0&&(Ri=0),Ri+gi>=In&&(Ri=In-gi),hn({scrollLeft:Ri/In*(Rn+2)}),bi.current.x=to.pageX},io=function(){if(Fe.current){var to=(0,Qi.os)(Fe.current).top,Mo=to+Fe.current.offsetHeight,Wo=rn===window?document.documentElement.scrollTop+window.innerHeight:(0,Qi.os)(rn).top+rn.clientHeight;Mo-(0,Te.Z)()<=Wo||to>=Wo-dn?Ai(function(Uo){return(0,he.Z)((0,he.Z)({},Uo),{},{isHiddenScrollBar:!0})}):Ai(function(Uo){return(0,he.Z)((0,he.Z)({},Uo),{},{isHiddenScrollBar:!1})})}},Wi=function(to){Ai(function(Mo){return(0,he.Z)((0,he.Z)({},Mo),{},{scrollLeft:to/Rn*In||0})})};return Tt.useImperativeHandle(Pe,function(){return{setScrollLeft:Wi}}),Tt.useEffect(function(){var xi=(0,wi.Z)(document.body,"mouseup",fo,!1),to=(0,wi.Z)(document.body,"mousemove",Zi,!1);return io(),function(){xi.remove(),to.remove()}},[gi,Bo]),Tt.useEffect(function(){var xi=(0,wi.Z)(rn,"scroll",io,!1),to=(0,wi.Z)(window,"resize",io,!1);return function(){xi.remove(),to.remove()}},[rn]),Tt.useEffect(function(){ai.isHiddenScrollBar||Ai(function(xi){var to=Fe.current;return to?(0,he.Z)((0,he.Z)({},xi),{},{scrollLeft:to.scrollLeft/to.scrollWidth*to.clientWidth}):xi})},[ai.isHiddenScrollBar]),Rn<=In||!gi||ai.isHiddenScrollBar?null:Tt.createElement("div",{style:{height:(0,Te.Z)(),width:In,bottom:dn},className:"".concat(Nn,"-sticky-scroll")},Tt.createElement("div",{onMouseDown:or,ref:di,className:me()("".concat(Nn,"-sticky-scroll-bar"),(0,Zt.Z)({},"".concat(Nn,"-sticky-scroll-bar-active"),Bo)),style:{width:"".concat(gi,"px"),transform:"translate3d(".concat(ai.scrollLeft,"px, 0, 0)")}}))},$e=Tt.forwardRef(qi);function lo(Ut){return null}var Co=lo;function jo(Ut){return null}var Ue=jo,jn="rc-table",qn=[],Mi={};function vi(){return"No Data"}function pi(Ut){var Qt,Pe=(0,he.Z)({rowKey:"key",prefixCls:jn,emptyText:vi},Ut),Ee=Pe.prefixCls,Ge=Pe.className,Fe=Pe.rowClassName,hn=Pe.style,dn=Pe.data,rn=Pe.rowKey,Nn=Pe.scroll,Rn=Pe.tableLayout,In=Pe.direction,gi=Pe.title,di=Pe.footer,ei=Pe.summary,Fi=Pe.caption,ai=Pe.id,Ai=Pe.showHeader,bi=Pe.components,Vi=Pe.emptyText,vo=Pe.onRow,Bo=Pe.onHeaderRow,Oi=Pe.internalHooks,fo=Pe.transformColumns,or=Pe.internalRefs,Zi=Pe.tailor,io=Pe.sticky,Wi=dn||qn,xi=!!Wi.length,to=Oi===te,Mo=Tt.useCallback(function(qr,Fs){return(0,Xe.Z)(bi,qr)||Fs},[bi]),Wo=Tt.useMemo(function(){return typeof rn=="function"?rn:function(qr){var Fs=qr&&qr[rn];return Fs}},[rn]),Uo=Mo(["body"]),Ri=Ke(),sr=(0,de.Z)(Ri,3),fr=sr[0],Qr=sr[1],br=sr[2],Os=oe(Pe,Wi,Wo),Bs=(0,de.Z)(Os,6),ur=Bs[0],Ao=Bs[1],zr=Bs[2],Rs=Bs[3],Cs=Bs[4],ia=Bs[5],Vo=Nn==null?void 0:Nn.x,Do=Tt.useState(0),Yo=(0,de.Z)(Do,2),xo=Yo[0],Kr=Yo[1],wo=un((0,he.Z)((0,he.Z)((0,he.Z)({},Pe),ur),{},{expandable:!!ur.expandedRowRender,columnTitle:ur.columnTitle,expandedKeys:zr,getRowKey:Wo,onTriggerExpand:ia,expandIcon:Rs,expandIconColumnIndex:ur.expandIconColumnIndex,direction:In,scrollWidth:to&&Zi&&typeof Vo=="number"?Vo:null}),to?fo:null),rr=(0,de.Z)(wo,3),Nr=rr[0],Tr=rr[1],Ea=rr[2],la=Ea!=null?Ea:Vo,Va=Tt.useMemo(function(){return{columns:Nr,flattenColumns:Tr}},[Nr,Tr]),Jr=Tt.useRef(),La=Tt.useRef(),ta=Tt.useRef(),ma=Tt.useRef(),$u=Tt.useRef(),_r=Tt.useState(!1),ss=(0,de.Z)(_r,2),ps=ss[0],Qs=ss[1],va=Tt.useState(!1),Cr=(0,de.Z)(va,2),Ss=Cr[0],ya=Cr[1],Sl=bn(new Map),Wl=(0,de.Z)(Sl,2),Nl=Wl[0],nu=Wl[1],iu=_e(Tr),Kl=iu.map(function(qr){return Nl.get(qr)}),$r=Tt.useMemo(function(){return Kl},[Kl.join("_")]),ka=Hn($r,Tr.length,In),Zs=Nn&&Zn(Nn.y),xs=Nn&&Zn(la)||!!ur.fixed,Zl=xs&&Tr.some(function(qr){var Fs=qr.fixed;return Fs}),vh=Tt.useRef(),ou=Wn(io,Ee),ju=ou.isSticky,th=ou.offsetHeader,Tl=ou.offsetSummary,Zr=ou.offsetScroll,Ms=ou.stickyClassName,ua=ou.container,Es=Tt.useMemo(function(){return ei==null?void 0:ei(Wi)},[ei,Wi]),Rr=(Zs||ju)&&Tt.isValidElement(Es)&&Es.type===xt&&Es.props.fixed,Sa,xl,wu;Zs&&(xl={overflowY:"scroll",maxHeight:Nn.y}),xs&&(Sa={overflowX:"auto"},Zs||(xl={overflowY:"hidden"}),wu={width:la===!0?"auto":la,minWidth:"100%"});var uf=Tt.useCallback(function(qr,Fs){(0,xe.Z)(Jr.current)&&nu(function(Ra){if(Ra.get(qr)!==Fs){var ru=new Map(Ra);return ru.set(qr,Fs),ru}return Ra})},[]),ke=Jn(null),Ih=(0,de.Z)(ke,2),eh=Ih[0],hf=Ih[1];function Sd(qr,Fs){Fs&&(typeof Fs=="function"?Fs(qr):Fs.scrollLeft!==qr&&(Fs.scrollLeft=qr,Fs.scrollLeft!==qr&&setTimeout(function(){Fs.scrollLeft=qr},0)))}var id=(0,Re.Z)(function(qr){var Fs=qr.currentTarget,Ra=qr.scrollLeft,ru=In==="rtl",su=typeof Ra=="number"?Ra:Fs.scrollLeft,Dc=Fs||Mi;if(!hf()||hf()===Dc){var Rh;eh(Dc),Sd(su,La.current),Sd(su,ta.current),Sd(su,$u.current),Sd(su,(Rh=vh.current)===null||Rh===void 0?void 0:Rh.setScrollLeft)}var _d=Fs||La.current;if(_d){var Pu=_d.scrollWidth,yh=_d.clientWidth;if(Pu===yh){Qs(!1),ya(!1);return}ru?(Qs(-su<Pu-yh),ya(-su>0)):(Qs(su>0),ya(su<Pu-yh))}}),bc=function(){xs&&ta.current?id({currentTarget:ta.current}):(Qs(!1),ya(!1))},Ug=function(Fs){var Ra=Fs.width;Ra!==xo&&(bc(),Kr(Jr.current?Jr.current.offsetWidth:Ra))},Aa=Tt.useRef(!1);Tt.useEffect(function(){Aa.current&&bc()},[xs,dn,Nr.length]),Tt.useEffect(function(){Aa.current=!0},[]);var Qd=Tt.useState(0),kc=(0,de.Z)(Qd,2),Jd=kc[0],df=kc[1],Yf=Tt.useState(!0),cf=(0,de.Z)(Yf,2),Ac=cf[0],Ul=cf[1];Tt.useEffect(function(){(!Zi||!to)&&(ta.current instanceof Element?df((0,Te.o)(ta.current).width):df((0,Te.o)(ma.current).width)),Ul((0,ue.G)("position","sticky"))},[]),Tt.useEffect(function(){to&&or&&(or.body.current=ta.current)});var xd=Tt.useCallback(function(qr){return Tt.createElement(Tt.Fragment,null,Tt.createElement(ls,qr),Rr==="top"&&Tt.createElement(De,qr,Es))},[Rr,Es]),ff=Tt.useCallback(function(qr){return Tt.createElement(De,qr,Es)},[Es]),zu=Mo(["table"],"table"),Dh=Tt.useMemo(function(){return Rn||(Zl?la==="max-content"?"auto":"fixed":Zs||ju||Tr.some(function(qr){var Fs=qr.ellipsis;return Fs})?"fixed":"auto")},[Zs,Zl,Tr,Rn,ju]),wd,od={colWidths:$r,columCount:Tr.length,stickyOffsets:ka,onHeaderRow:Bo,fixHeader:Zs,scroll:Nn},wl=Tt.useMemo(function(){return xi?null:typeof Vi=="function"?Vi():Vi},[xi,Vi]),Nc=Tt.createElement(Xi,{data:Wi,measureColumnWidth:Zs||xs||ju}),Tc=Tt.createElement(qo,{colWidths:Tr.map(function(qr){var Fs=qr.width;return Fs}),columns:Tr}),Vl=Fi!=null?Tt.createElement("caption",{className:"".concat(Ee,"-caption")},Fi):void 0,Pd=(0,vn.Z)(Pe,{data:!0}),Bc=(0,vn.Z)(Pe,{aria:!0});if(Zs||ju){var Fc;typeof Uo=="function"?(Fc=Uo(Wi,{scrollbarSize:Jd,ref:ta,onScroll:id}),od.colWidths=Tr.map(function(qr,Fs){var Ra=qr.width,ru=Fs===Tr.length-1?Ra-Jd:Ra;return typeof ru=="number"&&!Number.isNaN(ru)?ru:0})):Fc=Tt.createElement("div",{style:(0,he.Z)((0,he.Z)({},Sa),xl),onScroll:id,ref:ta,className:me()("".concat(Ee,"-body"))},Tt.createElement(zu,(0,Be.Z)({style:(0,he.Z)((0,he.Z)({},wu),{},{tableLayout:Dh})},Bc),Vl,Tc,Nc,!Rr&&Es&&Tt.createElement(De,{stickyOffsets:ka,flattenColumns:Tr,columns:Nr},Es)));var Oh=(0,he.Z)((0,he.Z)((0,he.Z)({noData:!Wi.length,maxContentScroll:xs&&la==="max-content"},od),Va),{},{direction:In,stickyClassName:Ms,onScroll:id});wd=Tt.createElement(Tt.Fragment,null,Ai!==!1&&Tt.createElement(cr,(0,Be.Z)({},Oh,{stickyTopOffset:th,className:"".concat(Ee,"-header"),ref:La}),xd),Fc,Rr&&Rr!=="top"&&Tt.createElement(cr,(0,Be.Z)({},Oh,{stickyBottomOffset:Tl,className:"".concat(Ee,"-summary"),ref:$u}),ff),ju&&Tt.createElement($e,{ref:vh,offsetScroll:Zr,scrollBodyRef:ta,onScroll:id,container:ua}))}else wd=Tt.createElement("div",{style:(0,he.Z)((0,he.Z)({},Sa),xl),className:me()("".concat(Ee,"-content")),onScroll:id,ref:ta},Tt.createElement(zu,(0,Be.Z)({style:(0,he.Z)((0,he.Z)({},wu),{},{tableLayout:Dh})},Bc),Vl,Tc,Ai!==!1&&Tt.createElement(ls,(0,Be.Z)({},od,Va)),Nc,Es&&Tt.createElement(De,{stickyOffsets:ka,flattenColumns:Tr,columns:Nr},Es)));var al=Tt.createElement("div",(0,Be.Z)({className:me()(Ee,Ge,(Qt={},(0,Zt.Z)(Qt,"".concat(Ee,"-rtl"),In==="rtl"),(0,Zt.Z)(Qt,"".concat(Ee,"-ping-left"),ps),(0,Zt.Z)(Qt,"".concat(Ee,"-ping-right"),Ss),(0,Zt.Z)(Qt,"".concat(Ee,"-layout-fixed"),Rn==="fixed"),(0,Zt.Z)(Qt,"".concat(Ee,"-fixed-header"),Zs),(0,Zt.Z)(Qt,"".concat(Ee,"-fixed-column"),Zl),(0,Zt.Z)(Qt,"".concat(Ee,"-scroll-horizontal"),xs),(0,Zt.Z)(Qt,"".concat(Ee,"-has-fix-left"),Tr[0]&&Tr[0].fixed),(0,Zt.Z)(Qt,"".concat(Ee,"-has-fix-right"),Tr[Tr.length-1]&&Tr[Tr.length-1].fixed==="right"),Qt)),style:hn,id:ai,ref:Jr},Pd),gi&&Tt.createElement(Vn,{className:"".concat(Ee,"-title")},gi(Wi)),Tt.createElement("div",{ref:ma,className:"".concat(Ee,"-container")},wd),di&&Tt.createElement(Vn,{className:"".concat(Ee,"-footer")},di(Wi)));xs&&(al=Tt.createElement(Se.Z,{onResize:Ug},al));var Ic=qe(Tr,ka,In,Nr),ha=Tt.useMemo(function(){return{scrollX:la,prefixCls:Ee,getComponent:Mo,scrollbarSize:Jd,direction:In,fixedInfoList:Ic,isSticky:ju,supportSticky:Ac,componentWidth:xo,fixHeader:Zs,fixColumn:Zl,horizonScroll:xs,tableLayout:Dh,rowClassName:Fe,expandedRowClassName:ur.expandedRowClassName,expandIcon:Rs,expandableType:Ao,expandRowByClick:ur.expandRowByClick,expandedRowRender:ur.expandedRowRender,onTriggerExpand:ia,expandIconColumnIndex:ur.expandIconColumnIndex,indentSize:ur.indentSize,allColumnsFixedLeft:Tr.every(function(qr){return qr.fixed==="left"}),emptyNode:wl,columns:Nr,flattenColumns:Tr,onColumnResize:uf,hoverStartRow:fr,hoverEndRow:Qr,onHover:br,rowExpandable:ur.rowExpandable,onRow:vo,getRowKey:Wo,expandedKeys:zr,childrenColumnName:Cs}},[la,Ee,Mo,Jd,In,Ic,ju,Ac,xo,Zs,Zl,xs,Dh,Fe,ur.expandedRowClassName,Rs,Ao,ur.expandRowByClick,ur.expandedRowRender,ia,ur.expandIconColumnIndex,ur.indentSize,wl,Nr,Tr,uf,fr,Qr,br,ur.rowExpandable,vo,Wo,zr,Cs]);return Tt.createElement(Bt.Provider,{value:ha},al)}function Ui(Ut){return gt(pi,Ut)}var ki=Ui();ki.EXPAND_COLUMN=wt,ki.INTERNAL_HOOKS=te,ki.Column=Co,ki.ColumnGroup=Ue,ki.Summary=le;var zi=ki,uo=bt(45680),cn=ye(null),Xo=ye(null);function sn(Ut,Qt,Pe){var Ee=Qt||1;return Pe[Ut+Ee]-(Pe[Ut]||0)}function ho(Ut){var Qt=Ut.rowInfo,Pe=Ut.column,Ee=Ut.colIndex,Ge=Ut.indent,Fe=Ut.index,hn=Ut.renderIndex,dn=Ut.record,rn=Ut.style,Nn=Ut.className,Rn=Ut.inverse,In=Ut.getHeight,gi=Pe.render,di=Pe.dataIndex,ei=Pe.className,Fi=Pe.width,ai=Jt(Xo,["columnsOffset"]),Ai=ai.columnsOffset,bi=ii(Qt,Pe,Ee,Ge,Fe),Vi=bi.key,vo=bi.fixedInfo,Bo=bi.appendCellNode,Oi=bi.additionalCellProps,fo=Oi.style,or=Oi.colSpan,Zi=or===void 0?1:or,io=Oi.rowSpan,Wi=io===void 0?1:io,xi=Ee-1,to=sn(xi,Zi,Ai),Mo=Zi>1?Fi-to:0,Wo=(0,he.Z)((0,he.Z)((0,he.Z)({},fo),rn),{},{flex:"0 0 ".concat(to,"px"),width:"".concat(to,"px"),marginRight:Mo,pointerEvents:"auto"}),Uo=Tt.useMemo(function(){return Rn?Wi<=1:Zi===0||Wi===0||Wi>1},[Wi,Zi,Rn]);Uo?Wo.visibility="hidden":Rn&&(Wo.height=In==null?void 0:In(Wi));var Ri=Uo?function(){return null}:gi,sr={};return(Wi===0||Zi===0)&&(sr.rowSpan=1,sr.colSpan=1),Tt.createElement(ui,(0,Be.Z)({className:me()(ei,Nn),ellipsis:Pe.ellipsis,align:Pe.align,scope:Pe.rowScope,component:"div",prefixCls:Qt.prefixCls,key:Vi,record:dn,index:Fe,renderIndex:hn,dataIndex:di,render:Ri,shouldCellUpdate:Pe.shouldCellUpdate},vo,{appendNode:Bo,additionalProps:(0,he.Z)((0,he.Z)({},Oi),{},{style:Wo},sr)}))}var Er=ho,zo=["data","index","className","rowKey","style","extra","getHeight"],Fr=Tt.forwardRef(function(Ut,Qt){var Pe=Ut.data,Ee=Ut.index,Ge=Ut.className,Fe=Ut.rowKey,hn=Ut.style,dn=Ut.extra,rn=Ut.getHeight,Nn=(0,Lt.Z)(Ut,zo),Rn=Pe.record,In=Pe.indent,gi=Pe.index,di=Jt(Bt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),ei=di.scrollX,Fi=di.flattenColumns,ai=di.prefixCls,Ai=di.fixColumn,bi=di.componentWidth,Vi=tn(Rn,Fe,Ee,In),vo=Vi.rowSupportExpand,Bo=Vi.expanded,Oi=Vi.rowProps,fo=Vi.expandedRowRender,or=Vi.expandedRowClassName,Zi;if(vo&&Bo){var io=fo(Rn,Ee,In+1,Bo),Wi=or==null?void 0:or(Rn,Ee,In),xi={};Ai&&(xi={style:(0,Zt.Z)({},"--virtual-width","".concat(bi,"px"))});var to="".concat(ai,"-expanded-row-cell");Zi=Tt.createElement("div",{className:me()("".concat(ai,"-expanded-row"),"".concat(ai,"-expanded-row-level-").concat(In+1),Wi)},Tt.createElement(ui,{component:"div",prefixCls:ai,className:me()(to,(0,Zt.Z)({},"".concat(to,"-fixed"),Ai)),additionalProps:xi},io))}var Mo=(0,he.Z)((0,he.Z)({},hn),{},{width:ei});dn&&(Mo.position="absolute",Mo.pointerEvents="none");var Wo=Tt.createElement("div",(0,Be.Z)({},Oi,Nn,{ref:vo?null:Qt,className:me()(Ge,"".concat(ai,"-row"),Oi==null?void 0:Oi.className,(0,Zt.Z)({},"".concat(ai,"-row-extra"),dn)),style:(0,he.Z)((0,he.Z)({},Mo),Oi==null?void 0:Oi.style)}),Fi.map(function(Uo,Ri){return Tt.createElement(Er,{key:Ri,rowInfo:Vi,column:Uo,colIndex:Ri,indent:In,index:Ee,renderIndex:gi,record:Rn,inverse:dn,getHeight:rn})}));return vo?Tt.createElement("div",{ref:Qt},Wo,Zi):Wo}),mr=vt(Fr),Di=mr,Li=Tt.forwardRef(function(Ut,Qt){var Pe=Ut.data,Ee=Ut.onScroll,Ge=Jt(Bt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Fe=Ge.flattenColumns,hn=Ge.onColumnResize,dn=Ge.getRowKey,rn=Ge.expandedKeys,Nn=Ge.prefixCls,Rn=Ge.childrenColumnName,In=Ge.emptyNode,gi=Ge.scrollX,di=Jt(cn),ei=di.scrollY,Fi=di.listItemHeight,ai=Tt.useRef(),Ai=en(Pe,Rn,rn,dn),bi=Tt.useMemo(function(){var Zi=0;return Fe.map(function(io){var Wi=io.width,xi=io.key;return Zi+=Wi,[xi,Wi,Zi]})},[Fe]),Vi=Tt.useMemo(function(){return bi.map(function(Zi){return Zi[2]})},[bi]);Tt.useEffect(function(){bi.forEach(function(Zi){var io=(0,de.Z)(Zi,2),Wi=io[0],xi=io[1];hn(Wi,xi)})},[bi]),Tt.useImperativeHandle(Qt,function(){var Zi={};return Object.defineProperty(Zi,"scrollLeft",{get:function(){var Wi;return((Wi=ai.current)===null||Wi===void 0?void 0:Wi.getScrollInfo().x)||0},set:function(Wi){var xi;(xi=ai.current)===null||xi===void 0||xi.scrollTo({left:Wi})}}),Zi});var vo=function(io,Wi){var xi,to=(xi=Ai[Wi])===null||xi===void 0?void 0:xi.record,Mo=io.onCell;if(Mo){var Wo,Uo=Mo(to,Wi);return(Wo=Uo==null?void 0:Uo.rowSpan)!==null&&Wo!==void 0?Wo:1}return 1},Bo=function(io){var Wi=io.start,xi=io.end,to=io.getSize,Mo=io.offsetY;if(xi<0)return null;for(var Wo=Fe.filter(function(Vo){return vo(Vo,Wi)===0}),Uo=Wi,Ri=function(Do){if(Wo=Wo.filter(function(Yo){return vo(Yo,Do)===0}),!Wo.length)return Uo=Do,"break"},sr=Wi;sr>=0;sr-=1){var fr=Ri(sr);if(fr==="break")break}for(var Qr=Fe.filter(function(Vo){return vo(Vo,xi)!==1}),br=xi,Os=function(Do){if(Qr=Qr.filter(function(Yo){return vo(Yo,Do)!==1}),!Qr.length)return br=Math.max(Do-1,xi),"break"},Bs=xi;Bs<Ai.length;Bs+=1){var ur=Os(Bs);if(ur==="break")break}for(var Ao=[],zr=function(Do){var Yo=Ai[Do];if(!Yo)return"continue";Fe.some(function(xo){return vo(xo,Do)>1})&&Ao.push(Do)},Rs=Uo;Rs<=br;Rs+=1)var Cs=zr(Rs);var ia=Ao.map(function(Vo){var Do=Ai[Vo],Yo=dn(Do.record,Vo),xo=function(rr){var Nr=Vo+rr-1,Tr=dn(Ai[Nr].record,Nr),Ea=to(Yo,Tr);return Ea.bottom-Ea.top},Kr=to(Yo);return Tt.createElement(Di,{key:Vo,data:Do,rowKey:Yo,index:Vo,style:{top:-Mo+Kr.top},extra:!0,getHeight:xo})});return ia},Oi=Tt.useMemo(function(){return{columnsOffset:Vi}},[Vi]),fo="".concat(Nn,"-tbody"),or;return Ai.length?or=Tt.createElement(uo.Z,{fullHeight:!1,ref:ai,className:me()(fo,"".concat(fo,"-virtual")),height:ei,itemHeight:Fi||24,data:Ai,itemKey:function(io){return dn(io.record)},scrollWidth:gi,onVirtualScroll:function(io){var Wi=io.x;Ee({scrollLeft:Wi})},extraRender:Bo},function(Zi,io,Wi){var xi=dn(Zi.record,io);return Tt.createElement(Di,(0,Be.Z)({data:Zi,rowKey:xi,index:io},Wi))}):or=Tt.createElement("div",{className:me()("".concat(Nn,"-placeholder"))},Tt.createElement(ui,{component:"div",prefixCls:Nn},In)),Tt.createElement(Xo.Provider,{value:Oi},or)}),yo=vt(Li),bo=yo,Xn=function(Qt,Pe){var Ee=Pe.ref,Ge=Pe.onScroll;return Tt.createElement(bo,{ref:Ee,data:Qt,onScroll:Ge})},Rt=100;function Qo(Ut){var Qt=Ut.columns,Pe=Ut.scroll,Ee=Ut.prefixCls,Ge=Ee===void 0?jn:Ee,Fe=Ut.className,hn=Ut.listItemHeight,dn=Pe||{},rn=dn.x,Nn=dn.y;typeof rn!="number"&&(rn=((Qt||[]).length+1)*Rt),typeof Nn!="number"&&(Nn=500);var Rn=Tt.useMemo(function(){return{scrollY:Nn,listItemHeight:hn}},[Nn,hn]);return Tt.createElement(cn.Provider,{value:Rn},Tt.createElement(zi,(0,Be.Z)({},Ut,{className:me()(Fe,"".concat(Ge,"-virtual")),scroll:(0,he.Z)((0,he.Z)({},Pe),{},{x:rn}),components:{body:Xn},columns:Qt,internalHooks:te,tailor:!0})))}function xr(Ut){return gt(Qo,Ut)}var es=xr(),cs=null;function us(Ut){return null}var no=us;function $i(Ut){return null}var Ko=$i,ro=bt(2738),lr=bt(68031),ms=bt(36355),Ji=bt(93891),Ti=bt(19716),kn=bt(8628),Ki=bt(31724),Jo=bt(58421),jr=bt(71418),Ir=bt(88088);function Ur(Ut){return function(Pe){let{prefixCls:Ee,onExpand:Ge,record:Fe,expanded:hn,expandable:dn}=Pe;const rn=`${Ee}-row-expand-icon`;return Tt.createElement("button",{type:"button",onClick:Nn=>{Ge(Fe,Nn),Nn.stopPropagation()},className:me()(rn,{[`${rn}-spaced`]:!dn,[`${rn}-expanded`]:dn&&hn,[`${rn}-collapsed`]:dn&&!hn}),"aria-label":hn?Ut.collapse:Ut.expand,"aria-expanded":hn})}}var hs=Ur;function ns(Ut,Qt){return"key"in Ut&&Ut.key!==void 0&&Ut.key!==null?Ut.key:Ut.dataIndex?Array.isArray(Ut.dataIndex)?Ut.dataIndex.join("."):Ut.dataIndex:Qt}function sa(Ut,Qt){return Qt?`${Qt}-${Ut}`:`${Ut}`}function Ys(Ut,Qt){return typeof Ut=="function"?Ut(Qt):Ut}function ga(Ut,Qt){const Pe=Ys(Ut,Qt);return Object.prototype.toString.call(Pe)==="[object Object]"?"":Pe}var Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},vs=Ze,mu=bt(7657),Ka=function(Qt,Pe){return Tt.createElement(mu.Z,(0,Be.Z)({},Qt,{ref:Pe,icon:vs}))},gl=Tt.forwardRef(Ka),Xr=gl,pl=bt(56762);function Tu(Ut){const Qt=Tt.useRef(Ut),Pe=(0,pl.Z)();return[()=>Qt.current,Ee=>{Qt.current=Ee,Pe()}]}var Hr=bt(3113),As=bt(24905),kl=bt(38854),so=bt(64165),hr=bt(20834),Zo=bt(40875),hi=bt(5112),Ns=bt(17574),is=bt(47472),Js=bt(92832);function ol(Ut){let{value:Qt,onChange:Pe,filterSearch:Ee,tablePrefixCls:Ge,locale:Fe}=Ut;return Ee?Tt.createElement("div",{className:`${Ge}-filter-dropdown-search`},Tt.createElement(Js.default,{prefix:Tt.createElement(is.Z,null),placeholder:Fe.filterSearchPlaceholder,onChange:Pe,value:Qt,htmlSize:1,className:`${Ge}-filter-dropdown-search-input`})):null}var ml=ol,ti=bt(10228);const Vr=Ut=>{const{keyCode:Qt}=Ut;Qt===ti.Z.ENTER&&Ut.stopPropagation()};var ba=Tt.forwardRef((Ut,Qt)=>Tt.createElement("div",{className:Ut.className,onClick:Pe=>Pe.stopPropagation(),onKeyDown:Vr,ref:Qt},Ut.children));function Pa(Ut){let Qt=[];return(Ut||[]).forEach(Pe=>{let{value:Ee,children:Ge}=Pe;Qt.push(Ee),Ge&&(Qt=[].concat((0,Ni.Z)(Qt),(0,Ni.Z)(Pa(Ge))))}),Qt}function vl(Ut){return Ut.some(Qt=>{let{children:Pe}=Qt;return Pe})}function po(Ut,Qt){return typeof Qt=="string"||typeof Qt=="number"?Qt==null?void 0:Qt.toString().toLowerCase().includes(Ut.trim().toLowerCase()):!1}function Bu(Ut){let{filters:Qt,prefixCls:Pe,filteredKeys:Ee,filterMultiple:Ge,searchValue:Fe,filterSearch:hn}=Ut;return Qt.map((dn,rn)=>{const Nn=String(dn.value);if(dn.children)return{key:Nn||rn,label:dn.text,popupClassName:`${Pe}-dropdown-submenu`,children:Bu({filters:dn.children,prefixCls:Pe,filteredKeys:Ee,filterMultiple:Ge,searchValue:Fe,filterSearch:hn})};const Rn=Ge?As.default:hi.ZP,In={key:dn.value!==void 0?Nn:rn,label:Tt.createElement(Tt.Fragment,null,Tt.createElement(Rn,{checked:Ee.includes(Nn)}),Tt.createElement("span",null,dn.text))};return Fe.trim()?typeof hn=="function"?hn(Fe,dn)?In:null:po(Fe,dn.text)?In:null:In})}function Ia(Ut){var Qt,Pe;const{tablePrefixCls:Ee,prefixCls:Ge,column:Fe,dropdownPrefixCls:hn,columnKey:dn,filterMultiple:rn,filterMode:Nn="menu",filterSearch:Rn=!1,filterState:In,triggerFilter:gi,locale:di,children:ei,getPopupContainer:Fi}=Ut,{filterDropdownOpen:ai,onFilterDropdownOpenChange:Ai,filterResetToDefaultFilteredValue:bi,defaultFilteredValue:Vi,filterDropdownVisible:vo,onFilterDropdownVisibleChange:Bo}=Fe,[Oi,fo]=Tt.useState(!1),or=!!(In&&(!((Qt=In.filteredKeys)===null||Qt===void 0)&&Qt.length||In.forceFiltered)),Zi=wo=>{fo(wo),Ai==null||Ai(wo),Bo==null||Bo(wo)},io=(Pe=ai!=null?ai:vo)!==null&&Pe!==void 0?Pe:Oi,Wi=In==null?void 0:In.filteredKeys,[xi,to]=Tu(Wi||[]),Mo=wo=>{let{selectedKeys:rr}=wo;to(rr)},Wo=(wo,rr)=>{let{node:Nr,checked:Tr}=rr;Mo(rn?{selectedKeys:wo}:{selectedKeys:Tr&&Nr.key?[Nr.key]:[]})};Tt.useEffect(()=>{Oi&&Mo({selectedKeys:Wi||[]})},[Wi]);const[Uo,Ri]=Tt.useState([]),sr=wo=>{Ri(wo)},[fr,Qr]=Tt.useState(""),br=wo=>{const{value:rr}=wo.target;Qr(rr)};Tt.useEffect(()=>{Oi||Qr("")},[Oi]);const Os=wo=>{const rr=wo&&wo.length?wo:null;if(rr===null&&(!In||!In.filteredKeys)||(0,ae.Z)(rr,In==null?void 0:In.filteredKeys,!0))return null;gi({column:Fe,key:dn,filteredKeys:rr})},Bs=()=>{Zi(!1),Os(xi())},ur=function(){let{confirm:wo,closeDropdown:rr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};wo&&Os([]),rr&&Zi(!1),Qr(""),to(bi?(Vi||[]).map(Nr=>String(Nr)):[])},Ao=function(){let{closeDropdown:wo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};wo&&Zi(!1),Os(xi())},zr=wo=>{wo&&Wi!==void 0&&to(Wi||[]),Zi(wo),!wo&&!Fe.filterDropdown&&Bs()},Rs=me()({[`${hn}-menu-without-submenu`]:!vl(Fe.filters||[])}),Cs=wo=>{if(wo.target.checked){const rr=Pa(Fe==null?void 0:Fe.filters).map(Nr=>String(Nr));to(rr)}else to([])},ia=wo=>{let{filters:rr}=wo;return(rr||[]).map((Nr,Tr)=>{const Ea=String(Nr.value),la={title:Nr.text,key:Nr.value!==void 0?Ea:Tr};return Nr.children&&(la.children=ia({filters:Nr.children})),la})},Vo=wo=>{var rr;return Object.assign(Object.assign({},wo),{text:wo.title,value:wo.key,children:((rr=wo.children)===null||rr===void 0?void 0:rr.map(Nr=>Vo(Nr)))||[]})};let Do;if(typeof Fe.filterDropdown=="function")Do=Fe.filterDropdown({prefixCls:`${hn}-custom`,setSelectedKeys:wo=>Mo({selectedKeys:wo}),selectedKeys:xi(),confirm:Ao,clearFilters:ur,filters:Fe.filters,visible:io,close:()=>{Zi(!1)}});else if(Fe.filterDropdown)Do=Fe.filterDropdown;else{const wo=xi()||[],rr=()=>(Fe.filters||[]).length===0?Tt.createElement(so.Z,{image:so.Z.PRESENTED_IMAGE_SIMPLE,description:di.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Nn==="tree"?Tt.createElement(Tt.Fragment,null,Tt.createElement(ml,{filterSearch:Rn,value:fr,onChange:br,tablePrefixCls:Ee,locale:di}),Tt.createElement("div",{className:`${Ee}-filter-dropdown-tree`},rn?Tt.createElement(As.default,{checked:wo.length===Pa(Fe.filters).length,indeterminate:wo.length>0&&wo.length<Pa(Fe.filters).length,className:`${Ee}-filter-dropdown-checkall`,onChange:Cs},di.filterCheckall):null,Tt.createElement(Ns.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:rn,checkStrictly:!rn,className:`${hn}-menu`,onCheck:Wo,checkedKeys:wo,selectedKeys:wo,showIcon:!1,treeData:ia({filters:Fe.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:fr.trim()?Tr=>typeof Rn=="function"?Rn(fr,Vo(Tr)):po(fr,Tr.title):void 0}))):Tt.createElement(Tt.Fragment,null,Tt.createElement(ml,{filterSearch:Rn,value:fr,onChange:br,tablePrefixCls:Ee,locale:di}),Tt.createElement(hr.default,{selectable:!0,multiple:rn,prefixCls:`${hn}-menu`,className:Rs,onSelect:Mo,onDeselect:Mo,selectedKeys:wo,getPopupContainer:Fi,openKeys:Uo,onOpenChange:sr,items:Bu({filters:Fe.filters||[],filterSearch:Rn,prefixCls:Ge,filteredKeys:xi(),filterMultiple:rn,searchValue:fr})})),Nr=()=>bi?(0,ae.Z)((Vi||[]).map(Tr=>String(Tr)),wo,!0):wo.length===0;Do=Tt.createElement(Tt.Fragment,null,rr(),Tt.createElement("div",{className:`${Ge}-dropdown-btns`},Tt.createElement(Hr.ZP,{type:"link",size:"small",disabled:Nr(),onClick:()=>ur()},di.filterReset),Tt.createElement(Hr.ZP,{type:"primary",size:"small",onClick:Bs},di.filterConfirm)))}Fe.filterDropdown&&(Do=Tt.createElement(Zo.J,{selectable:void 0},Do));const Yo=()=>Tt.createElement(ba,{className:`${Ge}-dropdown`},Do);let xo;typeof Fe.filterIcon=="function"?xo=Fe.filterIcon(or):Fe.filterIcon?xo=Fe.filterIcon:xo=Tt.createElement(Xr,null);const{direction:Kr}=Tt.useContext(ms.E_);return Tt.createElement("div",{className:`${Ge}-column`},Tt.createElement("span",{className:`${Ee}-column-title`},ei),Tt.createElement(kl.Z,{dropdownRender:Yo,trigger:["click"],open:io,onOpenChange:zr,getPopupContainer:Fi,placement:Kr==="rtl"?"bottomLeft":"bottomRight"},Tt.createElement("span",{role:"button",tabIndex:-1,className:me()(`${Ge}-trigger`,{active:or}),onClick:wo=>{wo.stopPropagation()}},xo)))}var Da=Ia;function Ca(Ut,Qt,Pe){let Ee=[];return(Ut||[]).forEach((Ge,Fe)=>{var hn;const dn=sa(Fe,Pe);if(Ge.filters||"filterDropdown"in Ge||"onFilter"in Ge)if("filteredValue"in Ge){let rn=Ge.filteredValue;"filterDropdown"in Ge||(rn=(hn=rn==null?void 0:rn.map(String))!==null&&hn!==void 0?hn:rn),Ee.push({column:Ge,key:ns(Ge,dn),filteredKeys:rn,forceFiltered:Ge.filtered})}else Ee.push({column:Ge,key:ns(Ge,dn),filteredKeys:Qt&&Ge.defaultFilteredValue?Ge.defaultFilteredValue:void 0,forceFiltered:Ge.filtered});"children"in Ge&&(Ee=[].concat((0,Ni.Z)(Ee),(0,Ni.Z)(Ca(Ge.children,Qt,dn))))}),Ee}function zl(Ut,Qt,Pe,Ee,Ge,Fe,hn,dn){return Pe.map((rn,Nn)=>{const Rn=sa(Nn,dn),{filterMultiple:In=!0,filterMode:gi,filterSearch:di}=rn;let ei=rn;if(ei.filters||ei.filterDropdown){const Fi=ns(ei,Rn),ai=Ee.find(Ai=>{let{key:bi}=Ai;return Fi===bi});ei=Object.assign(Object.assign({},ei),{title:Ai=>Tt.createElement(Da,{tablePrefixCls:Ut,prefixCls:`${Ut}-filter`,dropdownPrefixCls:Qt,column:ei,columnKey:Fi,filterState:ai,filterMultiple:In,filterMode:gi,filterSearch:di,triggerFilter:Fe,locale:Ge,getPopupContainer:hn},Ys(rn.title,Ai))})}return"children"in ei&&(ei=Object.assign(Object.assign({},ei),{children:zl(Ut,Qt,ei.children,Ee,Ge,Fe,hn,Rn)})),ei})}function vu(Ut){const Qt={};return Ut.forEach(Pe=>{let{key:Ee,filteredKeys:Ge,column:Fe}=Pe;const{filters:hn,filterDropdown:dn}=Fe;if(dn)Qt[Ee]=Ge||null;else if(Array.isArray(Ge)){const rn=Pa(hn);Qt[Ee]=rn.filter(Nn=>Ge.includes(String(Nn)))}else Qt[Ee]=null}),Qt}function pa(Ut,Qt){return Qt.reduce((Pe,Ee)=>{const{column:{onFilter:Ge,filters:Fe},filteredKeys:hn}=Ee;return Ge&&hn&&hn.length?Pe.filter(dn=>hn.some(rn=>{const Nn=Pa(Fe),Rn=Nn.findIndex(gi=>String(gi)===String(rn)),In=Rn!==-1?Nn[Rn]:rn;return Ge(In,dn)})):Pe},Ut)}const Oa=Ut=>Ut.flatMap(Qt=>"children"in Qt?[Qt].concat((0,Ni.Z)(Oa(Qt.children||[]))):[Qt]);function Fu(Ut){let{prefixCls:Qt,dropdownPrefixCls:Pe,mergedColumns:Ee,onFilterChange:Ge,getPopupContainer:Fe,locale:hn}=Ut;const dn=Tt.useMemo(()=>Oa(Ee||[]),[Ee]),[rn,Nn]=Tt.useState(()=>Ca(dn,!0)),Rn=Tt.useMemo(()=>{const ei=Ca(dn,!1);if(ei.length===0)return ei;let Fi=!0,ai=!0;if(ei.forEach(Ai=>{let{filteredKeys:bi}=Ai;bi!==void 0?Fi=!1:ai=!1}),Fi){const Ai=(dn||[]).map((bi,Vi)=>ns(bi,sa(Vi)));return rn.filter(bi=>{let{key:Vi}=bi;return Ai.includes(Vi)}).map(bi=>{const Vi=dn[Ai.findIndex(vo=>vo===bi.key)];return Object.assign(Object.assign({},bi),{column:Object.assign(Object.assign({},bi.column),Vi),forceFiltered:Vi.filtered})})}return ei},[dn,rn]),In=Tt.useMemo(()=>vu(Rn),[Rn]),gi=ei=>{const Fi=Rn.filter(ai=>{let{key:Ai}=ai;return Ai!==ei.key});Fi.push(ei),Nn(Fi),Ge(vu(Fi),Fi)};return[ei=>zl(Qt,Pe,ei,Rn,hn,gi,Fe),Rn,In]}var kh=Fu;function ch(Ut,Qt,Pe){const Ee=Tt.useRef({});function Ge(Fe){if(!Ee.current||Ee.current.data!==Ut||Ee.current.childrenColumnName!==Qt||Ee.current.getRowKey!==Pe){let dn=function(rn){rn.forEach((Nn,Rn)=>{const In=Pe(Nn,Rn);hn.set(In,Nn),Nn&&typeof Nn=="object"&&Qt in Nn&&dn(Nn[Qt]||[])})};const hn=new Map;dn(Ut),Ee.current={data:Ut,childrenColumnName:Qt,kvMap:hn,getRowKey:Pe}}return Ee.current.kvMap.get(Fe)}return[Ge]}var qh=bt(50371),fh=function(Ut,Qt){var Pe={};for(var Ee in Ut)Object.prototype.hasOwnProperty.call(Ut,Ee)&&Qt.indexOf(Ee)<0&&(Pe[Ee]=Ut[Ee]);if(Ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Ee=Object.getOwnPropertySymbols(Ut);Ge<Ee.length;Ge++)Qt.indexOf(Ee[Ge])<0&&Object.prototype.propertyIsEnumerable.call(Ut,Ee[Ge])&&(Pe[Ee[Ge]]=Ut[Ee[Ge]]);return Pe};const yu=10;function tu(Ut,Qt){const Pe={current:Ut.current,pageSize:Ut.pageSize};return Object.keys(Qt&&typeof Qt=="object"?Qt:{}).forEach(Ge=>{const Fe=Ut[Ge];typeof Fe!="function"&&(Pe[Ge]=Fe)}),Pe}function Za(Ut,Qt,Pe){const Ee=Pe&&typeof Pe=="object"?Pe:{},{total:Ge=0}=Ee,Fe=fh(Ee,["total"]),[hn,dn]=(0,Tt.useState)(()=>({current:"defaultCurrent"in Fe?Fe.defaultCurrent:1,pageSize:"defaultPageSize"in Fe?Fe.defaultPageSize:yu})),rn=(0,qh.Z)(hn,Fe,{total:Ge>0?Ge:Ut}),Nn=Math.ceil((Ge||Ut)/rn.pageSize);rn.current>Nn&&(rn.current=Nn||1);const Rn=(gi,di)=>{dn({current:gi!=null?gi:1,pageSize:di||rn.pageSize})},In=(gi,di)=>{var ei;Pe&&((ei=Pe.onChange)===null||ei===void 0||ei.call(Pe,gi,di)),Rn(gi,di),Qt(gi,di||(rn==null?void 0:rn.pageSize))};return Pe===!1?[{},()=>{}]:[Object.assign(Object.assign({},rn),{onChange:In}),Rn]}var gh=Za,ph=bt(84105),Iu=bt(35654),nn=bt(90782),Si=bt(71430),mo=bt(18929);const So={},Ho="SELECT_ALL",ao="SELECT_INVERT",dr="SELECT_NONE",wr=[],Lr=(Ut,Qt)=>{let Pe=[];return(Qt||[]).forEach(Ee=>{Pe.push(Ee),Ee&&typeof Ee=="object"&&Ut in Ee&&(Pe=[].concat((0,Ni.Z)(Pe),(0,Ni.Z)(Lr(Ut,Ee[Ut]))))}),Pe};var Ws=(Ut,Qt)=>{const{preserveSelectedRowKeys:Pe,selectedRowKeys:Ee,defaultSelectedRowKeys:Ge,getCheckboxProps:Fe,onChange:hn,onSelect:dn,onSelectAll:rn,onSelectInvert:Nn,onSelectNone:Rn,onSelectMultiple:In,columnWidth:gi,type:di,selections:ei,fixed:Fi,renderCell:ai,hideSelectAll:Ai,checkStrictly:bi=!0}=Qt||{},{prefixCls:Vi,data:vo,pageData:Bo,getRecordByKey:Oi,getRowKey:fo,expandType:or,childrenColumnName:Zi,locale:io,getPopupContainer:Wi}=Ut,[xi,to]=(0,mo.Z)(Ee||Ge||wr,{value:Ee}),Mo=Tt.useRef(new Map),Wo=(0,Tt.useCallback)(Vo=>{if(Pe){const Do=new Map;Vo.forEach(Yo=>{let xo=Oi(Yo);!xo&&Mo.current.has(Yo)&&(xo=Mo.current.get(Yo)),Do.set(Yo,xo)}),Mo.current=Do}},[Oi,Pe]);Tt.useEffect(()=>{Wo(xi)},[xi]);const{keyEntities:Uo}=(0,Tt.useMemo)(()=>{if(bi)return{keyEntities:null};let Vo=vo;if(Pe){const Do=new Set(vo.map((xo,Kr)=>fo(xo,Kr))),Yo=Array.from(Mo.current).reduce((xo,Kr)=>{let[wo,rr]=Kr;return Do.has(wo)?xo:xo.concat(rr)},[]);Vo=[].concat((0,Ni.Z)(Vo),(0,Ni.Z)(Yo))}return(0,Si.I8)(Vo,{externalGetKey:fo,childrenPropName:Zi})},[vo,fo,bi,Zi,Pe]),Ri=(0,Tt.useMemo)(()=>Lr(Zi,Bo),[Zi,Bo]),sr=(0,Tt.useMemo)(()=>{const Vo=new Map;return Ri.forEach((Do,Yo)=>{const xo=fo(Do,Yo),Kr=(Fe?Fe(Do):null)||{};Vo.set(xo,Kr)}),Vo},[Ri,fo,Fe]),fr=(0,Tt.useCallback)(Vo=>{var Do;return!!(!((Do=sr.get(fo(Vo)))===null||Do===void 0)&&Do.disabled)},[sr,fo]),[Qr,br]=(0,Tt.useMemo)(()=>{if(bi)return[xi||[],[]];const{checkedKeys:Vo,halfCheckedKeys:Do}=(0,nn.S)(xi,!0,Uo,fr);return[Vo||[],Do]},[xi,bi,Uo,fr]),Os=(0,Tt.useMemo)(()=>{const Vo=di==="radio"?Qr.slice(0,1):Qr;return new Set(Vo)},[Qr,di]),Bs=(0,Tt.useMemo)(()=>di==="radio"?new Set:new Set(br),[br,di]),[ur,Ao]=(0,Tt.useState)(null);Tt.useEffect(()=>{Qt||to(wr)},[!!Qt]);const zr=(0,Tt.useCallback)((Vo,Do)=>{let Yo,xo;Wo(Vo),Pe?(Yo=Vo,xo=Vo.map(Kr=>Mo.current.get(Kr))):(Yo=[],xo=[],Vo.forEach(Kr=>{const wo=Oi(Kr);wo!==void 0&&(Yo.push(Kr),xo.push(wo))})),to(Yo),hn==null||hn(Yo,xo,{type:Do})},[to,Oi,hn,Pe]),Rs=(0,Tt.useCallback)((Vo,Do,Yo,xo)=>{if(dn){const Kr=Yo.map(wo=>Oi(wo));dn(Oi(Vo),Do,Kr,xo)}zr(Yo,"single")},[dn,Oi,zr]),Cs=(0,Tt.useMemo)(()=>!ei||Ai?null:(ei===!0?[Ho,ao,dr]:ei).map(Do=>Do===Ho?{key:"all",text:io.selectionAll,onSelect(){zr(vo.map((Yo,xo)=>fo(Yo,xo)).filter(Yo=>{const xo=sr.get(Yo);return!(xo!=null&&xo.disabled)||Os.has(Yo)}),"all")}}:Do===ao?{key:"invert",text:io.selectInvert,onSelect(){const Yo=new Set(Os);Bo.forEach((Kr,wo)=>{const rr=fo(Kr,wo),Nr=sr.get(rr);Nr!=null&&Nr.disabled||(Yo.has(rr)?Yo.delete(rr):Yo.add(rr))});const xo=Array.from(Yo);Nn&&Nn(xo),zr(xo,"invert")}}:Do===dr?{key:"none",text:io.selectNone,onSelect(){Rn==null||Rn(),zr(Array.from(Os).filter(Yo=>{const xo=sr.get(Yo);return xo==null?void 0:xo.disabled}),"none")}}:Do).map(Do=>Object.assign(Object.assign({},Do),{onSelect:function(){for(var Yo,xo,Kr=arguments.length,wo=new Array(Kr),rr=0;rr<Kr;rr++)wo[rr]=arguments[rr];(xo=Do.onSelect)===null||xo===void 0||(Yo=xo).call.apply(Yo,[Do].concat(wo)),Ao(null)}})),[ei,Os,Bo,fo,Nn,zr]);return[(0,Tt.useCallback)(Vo=>{var Do;if(!Qt)return Vo.filter(_r=>_r!==So);let Yo=(0,Ni.Z)(Vo);const xo=new Set(Os),Kr=Ri.map(fo).filter(_r=>!sr.get(_r).disabled),wo=Kr.every(_r=>xo.has(_r)),rr=Kr.some(_r=>xo.has(_r)),Nr=()=>{const _r=[];wo?Kr.forEach(ps=>{xo.delete(ps),_r.push(ps)}):Kr.forEach(ps=>{xo.has(ps)||(xo.add(ps),_r.push(ps))});const ss=Array.from(xo);rn==null||rn(!wo,ss.map(ps=>Oi(ps)),_r.map(ps=>Oi(ps))),zr(ss,"all"),Ao(null)};let Tr;if(di!=="radio"){let _r;if(Cs){const Cr={getPopupContainer:Wi,items:Cs.map((Ss,ya)=>{const{key:Sl,text:Wl,onSelect:Nl}=Ss;return{key:Sl!=null?Sl:ya,onClick:()=>{Nl==null||Nl(Kr)},label:Wl}})};_r=Tt.createElement("div",{className:`${Vi}-selection-extra`},Tt.createElement(kl.Z,{menu:Cr,getPopupContainer:Wi},Tt.createElement("span",null,Tt.createElement(ph.Z,null))))}const ss=Ri.map((Cr,Ss)=>{const ya=fo(Cr,Ss),Sl=sr.get(ya)||{};return Object.assign({checked:xo.has(ya)},Sl)}).filter(Cr=>{let{disabled:Ss}=Cr;return Ss}),ps=!!ss.length&&ss.length===Ri.length,Qs=ps&&ss.every(Cr=>{let{checked:Ss}=Cr;return Ss}),va=ps&&ss.some(Cr=>{let{checked:Ss}=Cr;return Ss});Tr=!Ai&&Tt.createElement("div",{className:`${Vi}-selection`},Tt.createElement(As.default,{checked:ps?Qs:!!Ri.length&&wo,indeterminate:ps?!Qs&&va:!wo&&rr,onChange:Nr,disabled:Ri.length===0||ps,"aria-label":_r?"Custom selection":"Select all",skipGroup:!0}),_r)}let Ea;di==="radio"?Ea=(_r,ss,ps)=>{const Qs=fo(ss,ps),va=xo.has(Qs);return{node:Tt.createElement(hi.ZP,Object.assign({},sr.get(Qs),{checked:va,onClick:Cr=>Cr.stopPropagation(),onChange:Cr=>{xo.has(Qs)||Rs(Qs,!0,[Qs],Cr.nativeEvent)}})),checked:va}}:Ea=(_r,ss,ps)=>{var Qs;const va=fo(ss,ps),Cr=xo.has(va),Ss=Bs.has(va),ya=sr.get(va);let Sl;return or==="nest"?Sl=Ss:Sl=(Qs=ya==null?void 0:ya.indeterminate)!==null&&Qs!==void 0?Qs:Ss,{node:Tt.createElement(As.default,Object.assign({},ya,{indeterminate:Sl,checked:Cr,skipGroup:!0,onClick:Wl=>Wl.stopPropagation(),onChange:Wl=>{let{nativeEvent:Nl}=Wl;const{shiftKey:nu}=Nl;let iu=-1,Kl=-1;if(nu&&bi){const $r=new Set([ur,va]);Kr.some((ka,Zs)=>{if($r.has(ka))if(iu===-1)iu=Zs;else return Kl=Zs,!0;return!1})}if(Kl!==-1&&iu!==Kl&&bi){const $r=Kr.slice(iu,Kl+1),ka=[];Cr?$r.forEach(xs=>{xo.has(xs)&&(ka.push(xs),xo.delete(xs))}):$r.forEach(xs=>{xo.has(xs)||(ka.push(xs),xo.add(xs))});const Zs=Array.from(xo);In==null||In(!Cr,Zs.map(xs=>Oi(xs)),ka.map(xs=>Oi(xs))),zr(Zs,"multiple")}else{const $r=Qr;if(bi){const ka=Cr?(0,Iu._5)($r,va):(0,Iu.L0)($r,va);Rs(va,!Cr,ka,Nl)}else{const ka=(0,nn.S)([].concat((0,Ni.Z)($r),[va]),!0,Uo,fr),{checkedKeys:Zs,halfCheckedKeys:xs}=ka;let Zl=Zs;if(Cr){const vh=new Set(Zs);vh.delete(va),Zl=(0,nn.S)(Array.from(vh),{checked:!1,halfCheckedKeys:xs},Uo,fr).checkedKeys}Rs(va,!Cr,Zl,Nl)}}Ao(Cr?null:va)}})),checked:Cr}};const la=(_r,ss,ps)=>{const{node:Qs,checked:va}=Ea(_r,ss,ps);return ai?ai(va,ss,ps,Qs):Qs};if(!Yo.includes(So))if(Yo.findIndex(_r=>{var ss;return((ss=_r[Oo])===null||ss===void 0?void 0:ss.columnType)==="EXPAND_COLUMN"})===0){const[_r,...ss]=Yo;Yo=[_r,So].concat((0,Ni.Z)(ss))}else Yo=[So].concat((0,Ni.Z)(Yo));const Va=Yo.indexOf(So);Yo=Yo.filter((_r,ss)=>_r!==So||ss===Va);const Jr=Yo[Va-1],La=Yo[Va+1];let ta=Fi;ta===void 0&&((La==null?void 0:La.fixed)!==void 0?ta=La.fixed:(Jr==null?void 0:Jr.fixed)!==void 0&&(ta=Jr.fixed)),ta&&Jr&&((Do=Jr[Oo])===null||Do===void 0?void 0:Do.columnType)==="EXPAND_COLUMN"&&Jr.fixed===void 0&&(Jr.fixed=ta);const ma=me()(`${Vi}-selection-col`,{[`${Vi}-selection-col-with-dropdown`]:ei&&di==="checkbox"}),$u={fixed:ta,width:gi,className:`${Vi}-selection-column`,title:Qt.columnTitle||Tr,render:la,onCell:Qt.onCell,[Oo]:{className:ma}};return Yo.map(_r=>_r===So?$u:_r)},[fo,Ri,Qt,Qr,Os,Bs,gi,Cs,or,ur,sr,In,Rs,fr]),Os]},fs=bt(89489),Ah=bt(59477),Du=bt(6848);const eu="ascend",Gi="descend";function Su(Ut){return typeof Ut.sorter=="object"&&typeof Ut.sorter.multiple=="number"?Ut.sorter.multiple:!1}function ve(Ut){return typeof Ut=="function"?Ut:Ut&&typeof Ut=="object"&&Ut.compare?Ut.compare:!1}function En(Ut,Qt){return Qt?Ut[Ut.indexOf(Qt)+1]:Ut[0]}function Qu(Ut,Qt,Pe){let Ee=[];function Ge(Fe,hn){Ee.push({column:Fe,key:ns(Fe,hn),multiplePriority:Su(Fe),sortOrder:Fe.sortOrder})}return(Ut||[]).forEach((Fe,hn)=>{const dn=sa(hn,Pe);Fe.children?("sortOrder"in Fe&&Ge(Fe,dn),Ee=[].concat((0,Ni.Z)(Ee),(0,Ni.Z)(Qu(Fe.children,Qt,dn)))):Fe.sorter&&("sortOrder"in Fe?Ge(Fe,dn):Qt&&Fe.defaultSortOrder&&Ee.push({column:Fe,key:ns(Fe,dn),multiplePriority:Su(Fe),sortOrder:Fe.defaultSortOrder}))}),Ee}function Ou(Ut,Qt,Pe,Ee,Ge,Fe,hn,dn){return(Qt||[]).map((rn,Nn)=>{const Rn=sa(Nn,dn);let In=rn;if(In.sorter){const gi=In.sortDirections||Ge,di=In.showSorterTooltip===void 0?hn:In.showSorterTooltip,ei=ns(In,Rn),Fi=Pe.find(or=>{let{key:Zi}=or;return Zi===ei}),ai=Fi?Fi.sortOrder:null,Ai=En(gi,ai);let bi;if(rn.sortIcon)bi=rn.sortIcon({sortOrder:ai});else{const or=gi.includes(eu)&&Tt.createElement(Ah.Z,{className:me()(`${Ut}-column-sorter-up`,{active:ai===eu})}),Zi=gi.includes(Gi)&&Tt.createElement(fs.Z,{className:me()(`${Ut}-column-sorter-down`,{active:ai===Gi})});bi=Tt.createElement("span",{className:me()(`${Ut}-column-sorter`,{[`${Ut}-column-sorter-full`]:!!(or&&Zi)})},Tt.createElement("span",{className:`${Ut}-column-sorter-inner`,"aria-hidden":"true"},or,Zi))}const{cancelSort:Vi,triggerAsc:vo,triggerDesc:Bo}=Fe||{};let Oi=Vi;Ai===Gi?Oi=Bo:Ai===eu&&(Oi=vo);const fo=typeof di=="object"?di:{title:Oi};In=Object.assign(Object.assign({},In),{className:me()(In.className,{[`${Ut}-column-sort`]:ai}),title:or=>{const Zi=Tt.createElement("div",{className:`${Ut}-column-sorters`},Tt.createElement("span",{className:`${Ut}-column-title`},Ys(rn.title,or)),bi);return di?Tt.createElement(Du.Z,Object.assign({},fo),Zi):Zi},onHeaderCell:or=>{const Zi=rn.onHeaderCell&&rn.onHeaderCell(or)||{},io=Zi.onClick,Wi=Zi.onKeyDown;Zi.onClick=Mo=>{Ee({column:rn,key:ei,sortOrder:Ai,multiplePriority:Su(rn)}),io==null||io(Mo)},Zi.onKeyDown=Mo=>{Mo.keyCode===ti.Z.ENTER&&(Ee({column:rn,key:ei,sortOrder:Ai,multiplePriority:Su(rn)}),Wi==null||Wi(Mo))};const xi=ga(rn.title,{}),to=xi==null?void 0:xi.toString();return ai?Zi["aria-sort"]=ai==="ascend"?"ascending":"descending":Zi["aria-label"]=to||"",Zi.className=me()(Zi.className,`${Ut}-column-has-sorters`),Zi.tabIndex=0,rn.ellipsis&&(Zi.title=(xi!=null?xi:"").toString()),Zi}})}return"children"in In&&(In=Object.assign(Object.assign({},In),{children:Ou(Ut,In.children,Pe,Ee,Ge,Fe,hn,Rn)})),In})}function Hl(Ut){const{column:Qt,sortOrder:Pe}=Ut;return{column:Qt,order:Pe,field:Qt.dataIndex,columnKey:Qt.key}}function Ju(Ut){const Qt=Ut.filter(Pe=>{let{sortOrder:Ee}=Pe;return Ee}).map(Hl);return Qt.length===0&&Ut.length?Object.assign(Object.assign({},Hl(Ut[Ut.length-1])),{column:void 0}):Qt.length<=1?Qt[0]||{}:Qt}function mh(Ut,Qt,Pe){const Ee=Qt.slice().sort((hn,dn)=>dn.multiplePriority-hn.multiplePriority),Ge=Ut.slice(),Fe=Ee.filter(hn=>{let{column:{sorter:dn},sortOrder:rn}=hn;return ve(dn)&&rn});return Fe.length?Ge.sort((hn,dn)=>{for(let rn=0;rn<Fe.length;rn+=1){const Nn=Fe[rn],{column:{sorter:Rn},sortOrder:In}=Nn,gi=ve(Rn);if(gi&&In){const di=gi(hn,dn,In);if(di!==0)return In===eu?di:-di}}return 0}).map(hn=>{const dn=hn[Pe];return dn?Object.assign(Object.assign({},hn),{[Pe]:mh(dn,Qt,Pe)}):hn}):Ge}function Mc(Ut){let{prefixCls:Qt,mergedColumns:Pe,onSorterChange:Ee,sortDirections:Ge,tableLocale:Fe,showSorterTooltip:hn}=Ut;const[dn,rn]=Tt.useState(Qu(Pe,!0)),Nn=Tt.useMemo(()=>{let ei=!0;const Fi=Qu(Pe,!1);if(!Fi.length)return dn;const ai=[];function Ai(Vi){ei?ai.push(Vi):ai.push(Object.assign(Object.assign({},Vi),{sortOrder:null}))}let bi=null;return Fi.forEach(Vi=>{bi===null?(Ai(Vi),Vi.sortOrder&&(Vi.multiplePriority===!1?ei=!1:bi=!0)):(bi&&Vi.multiplePriority!==!1||(ei=!1),Ai(Vi))}),ai},[Pe,dn]),Rn=Tt.useMemo(()=>{const ei=Nn.map(Fi=>{let{column:ai,sortOrder:Ai}=Fi;return{column:ai,order:Ai}});return{sortColumns:ei,sortColumn:ei[0]&&ei[0].column,sortOrder:ei[0]&&ei[0].order}},[Nn]);function In(ei){let Fi;ei.multiplePriority===!1||!Nn.length||Nn[0].multiplePriority===!1?Fi=[ei]:Fi=[].concat((0,Ni.Z)(Nn.filter(ai=>{let{key:Ai}=ai;return Ai!==ei.key})),[ei]),rn(Fi),Ee(Ju(Fi),Fi)}return[ei=>Ou(Qt,ei,Nn,In,Ge,Fe,hn),Nn,Rn,()=>Ju(Nn)]}function yd(Ut,Qt){return Ut.map(Pe=>{const Ee=Object.assign({},Pe);return Ee.title=Ys(Pe.title,Qt),"children"in Ee&&(Ee.children=yd(Ee.children,Qt)),Ee})}function Ks(Ut){return[Tt.useCallback(Pe=>yd(Pe,Ut),[Ut])]}var To=Ui((Ut,Qt)=>{const{_renderTimes:Pe}=Ut,{_renderTimes:Ee}=Qt;return Pe!==Ee}),rl=xr((Ut,Qt)=>{const{_renderTimes:Pe}=Ut,{_renderTimes:Ee}=Qt;return Pe!==Ee}),Ua=bt(64993),Ps=bt(17313),vr=bt(83116),aa=bt(37613),ys=Ut=>{const{componentCls:Qt}=Ut,Pe=`${Ut.lineWidth}px ${Ut.lineType} ${Ut.tableBorderColor}`,Ee=(Ge,Fe,hn)=>({[`&${Qt}-${Ge}`]:{[`> ${Qt}-container`]:{[`> ${Qt}-content, > ${Qt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Qt}-expanded-row-fixed`]:{margin:`-${Fe}px -${hn+Ut.lineWidth}px`}}}}}});return{[`${Qt}-wrapper`]:{[`${Qt}${Qt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Qt}-title`]:{border:Pe,borderBottom:0},[`> ${Qt}-container`]:{borderInlineStart:Pe,borderTop:Pe,[`
|
|
|
> ${Qt}-content,
|
|
|
> ${Qt}-header,
|
|
|
> ${Qt}-body,
|
|
|
> ${Qt}-summary
|
|
|
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:Pe},"> thead":{"> tr:not(:last-child) > th":{borderBottom:Pe},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Qt}-cell-fix-right-first::after`]:{borderInlineEnd:Pe}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Qt}-expanded-row-fixed`]:{margin:`-${Ut.tablePaddingVertical}px -${Ut.tablePaddingHorizontal+Ut.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Ut.lineWidth,bottom:0,borderInlineEnd:Pe,content:'""'}}}}}},[`&${Qt}-scroll-horizontal`]:{[`> ${Qt}-container > ${Qt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Qt}-expanded-row,
|
|
|
> tr${Qt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Ee("middle",Ut.tablePaddingVerticalMiddle,Ut.tablePaddingHorizontalMiddle)),Ee("small",Ut.tablePaddingVerticalSmall,Ut.tablePaddingHorizontalSmall)),{[`> ${Qt}-footer`]:{border:Pe,borderTop:0}}),[`${Qt}-cell`]:{[`${Qt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Ut.lineWidth}px 0 ${Ut.lineWidth}px ${Ut.tableHeaderBg}`}},[`${Qt}-bordered ${Qt}-cell-scrollbar`]:{borderInlineEnd:Pe}}}},Ma=Ut=>{const{componentCls:Qt}=Ut;return{[`${Qt}-wrapper`]:{[`${Qt}-cell-ellipsis`]:Object.assign(Object.assign({},Ps.vS),{wordBreak:"keep-all",[`
|
|
|
&${Qt}-cell-fix-left-last,
|
|
|
&${Qt}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Qt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Qt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Dr=Ut=>{const{componentCls:Qt}=Ut;return{[`${Qt}-wrapper`]:{[`${Qt}-tbody > tr${Qt}-placeholder`]:{textAlign:"center",color:Ut.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Ut.colorBgContainer}}}}},sl=bt(15969),gs=Ut=>{const{componentCls:Qt,antCls:Pe,controlInteractiveSize:Ee,motionDurationSlow:Ge,lineWidth:Fe,paddingXS:hn,lineType:dn,tableBorderColor:rn,tableExpandIconBg:Nn,tableExpandColumnWidth:Rn,borderRadius:In,fontSize:gi,fontSizeSM:di,lineHeight:ei,tablePaddingVertical:Fi,tablePaddingHorizontal:ai,tableExpandedRowBg:Ai,paddingXXS:bi}=Ut,Vi=Ee/2-Fe,vo=Vi*2+Fe*3,Bo=`${Fe}px ${dn} ${rn}`,Oi=bi-Fe;return{[`${Qt}-wrapper`]:{[`${Qt}-expand-icon-col`]:{width:Rn},[`${Qt}-row-expand-icon-cell`]:{textAlign:"center",[`${Qt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Qt}-row-indent`]:{height:1,float:"left"},[`${Qt}-row-expand-icon`]:Object.assign(Object.assign({},(0,sl.N)(Ut)),{position:"relative",float:"left",boxSizing:"border-box",width:vo,height:vo,padding:0,color:"inherit",lineHeight:`${vo}px`,background:Nn,border:Bo,borderRadius:In,transform:`scale(${Ee/vo})`,transition:`all ${Ge}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Ge} ease-out`,content:'""'},"&::before":{top:Vi,insetInlineEnd:Oi,insetInlineStart:Oi,height:Fe},"&::after":{top:Oi,bottom:Oi,insetInlineStart:Vi,width:Fe,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${Qt}-row-indent + ${Qt}-row-expand-icon`]:{marginTop:(gi*ei-Fe*3)/2-Math.ceil((di*1.4-Fe*3)/2),marginInlineEnd:hn},[`tr${Qt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Ai}},[`${Pe}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Qt}-expanded-row-fixed`]:{position:"relative",margin:`-${Fi}px -${ai}px`,padding:`${Fi}px ${ai}px`}}}},Xs=Ut=>{const{componentCls:Qt,antCls:Pe,iconCls:Ee,tableFilterDropdownWidth:Ge,tableFilterDropdownSearchWidth:Fe,paddingXXS:hn,paddingXS:dn,colorText:rn,lineWidth:Nn,lineType:Rn,tableBorderColor:In,tableHeaderIconColor:gi,fontSizeSM:di,tablePaddingHorizontal:ei,borderRadius:Fi,motionDurationSlow:ai,colorTextDescription:Ai,colorPrimary:bi,tableHeaderFilterActiveBg:Vi,colorTextDisabled:vo,tableFilterDropdownBg:Bo,tableFilterDropdownHeight:Oi,controlItemBgHover:fo,controlItemBgActive:or,boxShadowSecondary:Zi,filterDropdownMenuBg:io}=Ut,Wi=`${Pe}-dropdown`,xi=`${Qt}-filter-dropdown`,to=`${Pe}-tree`,Mo=`${Nn}px ${Rn} ${In}`;return[{[`${Qt}-wrapper`]:{[`${Qt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Qt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-hn,marginInline:`${hn}px ${-ei/2}px`,padding:`0 ${hn}px`,color:gi,fontSize:di,borderRadius:Fi,cursor:"pointer",transition:`all ${ai}`,"&:hover":{color:Ai,background:Vi},"&.active":{color:bi}}}},{[`${Pe}-dropdown`]:{[xi]:Object.assign(Object.assign({},(0,Ps.Wf)(Ut)),{minWidth:Ge,backgroundColor:Bo,borderRadius:Fi,boxShadow:Zi,overflow:"hidden",[`${Wi}-menu`]:{maxHeight:Oi,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:io,"&:empty::after":{display:"block",padding:`${dn}px 0`,color:vo,fontSize:di,textAlign:"center",content:'"Not Found"'}},[`${xi}-tree`]:{paddingBlock:`${dn}px 0`,paddingInline:dn,[to]:{padding:0},[`${to}-treenode ${to}-node-content-wrapper:hover`]:{backgroundColor:fo},[`${to}-treenode-checkbox-checked ${to}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:or}}},[`${xi}-search`]:{padding:dn,borderBottom:Mo,"&-input":{input:{minWidth:Fe},[Ee]:{color:vo}}},[`${xi}-checkall`]:{width:"100%",marginBottom:hn,marginInlineStart:hn},[`${xi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${dn-Nn}px ${dn}px`,overflow:"hidden",borderTop:Mo}})}},{[`${Pe}-dropdown ${xi}, ${xi}-submenu`]:{[`${Pe}-checkbox-wrapper + span`]:{paddingInlineStart:dn,color:rn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},td=Ut=>{const{componentCls:Qt,lineWidth:Pe,colorSplit:Ee,motionDurationSlow:Ge,zIndexTableFixed:Fe,tableBg:hn,zIndexTableSticky:dn}=Ut,rn=Ee;return{[`${Qt}-wrapper`]:{[`
|
|
|
${Qt}-cell-fix-left,
|
|
|
${Qt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Fe,background:hn},[`
|
|
|
${Qt}-cell-fix-left-first::after,
|
|
|
${Qt}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-Pe,width:30,transform:"translateX(100%)",transition:`box-shadow ${Ge}`,content:'""',pointerEvents:"none"},[`${Qt}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Qt}-cell-fix-right-first::after,
|
|
|
${Qt}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-Pe,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Ge}`,content:'""',pointerEvents:"none"},[`${Qt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:dn+1,width:30,transition:`box-shadow ${Ge}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Qt}-ping-left`]:{[`&:not(${Qt}-has-fix-left) ${Qt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${rn}`}},[`
|
|
|
${Qt}-cell-fix-left-first::after,
|
|
|
${Qt}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${rn}`},[`${Qt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Qt}-ping-right`]:{[`&:not(${Qt}-has-fix-right) ${Qt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${rn}`}},[`
|
|
|
${Qt}-cell-fix-right-first::after,
|
|
|
${Qt}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${rn}`}}}}},Wf=Ut=>{const{componentCls:Qt,antCls:Pe}=Ut;return{[`${Qt}-wrapper`]:{[`${Qt}-pagination${Pe}-pagination`]:{margin:`${Ut.margin}px 0`},[`${Qt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Ut.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Kf=Ut=>{const{componentCls:Qt,tableRadius:Pe}=Ut;return{[`${Qt}-wrapper`]:{[Qt]:{[`${Qt}-title, ${Qt}-header`]:{borderRadius:`${Pe}px ${Pe}px 0 0`},[`${Qt}-title + ${Qt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Qt}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:Pe,borderStartEndRadius:Pe,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:Pe},"> *:last-child":{borderStartEndRadius:Pe}}},"&-footer":{borderRadius:`0 0 ${Pe}px ${Pe}px`}}}}},Xd=Ut=>{const{componentCls:Qt}=Ut;return{[`${Qt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Qt}-pagination-left`]:{justifyContent:"flex-end"},[`${Qt}-pagination-right`]:{justifyContent:"flex-start"},[`${Qt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Qt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Qt}-row-indent`]:{float:"right"}}}}},Ec=Ut=>{const{componentCls:Qt,antCls:Pe,iconCls:Ee,fontSizeIcon:Ge,padding:Fe,paddingXS:hn,tableHeaderIconColor:dn,tableHeaderIconColorHover:rn,tableSelectionColumnWidth:Nn}=Ut;return{[`${Qt}-wrapper`]:{[`${Qt}-selection-col`]:{width:Nn,[`&${Qt}-selection-col-with-dropdown`]:{width:Nn+Ge+Fe/4}},[`${Qt}-bordered ${Qt}-selection-col`]:{width:Nn+hn*2,[`&${Qt}-selection-col-with-dropdown`]:{width:Nn+Ge+Fe/4+hn*2}},[`
|
|
|
table tr th${Qt}-selection-column,
|
|
|
table tr td${Qt}-selection-column
|
|
|
`]:{paddingInlineEnd:Ut.paddingXS,paddingInlineStart:Ut.paddingXS,textAlign:"center",[`${Pe}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Qt}-selection-column${Qt}-cell-fix-left`]:{zIndex:Ut.zIndexTableFixed+1},[`table tr th${Qt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Qt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Qt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Ut.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Ut.tablePaddingHorizontal/4}px`,[Ee]:{color:dn,fontSize:Ge,verticalAlign:"baseline","&:hover":{color:rn}}}}}},ed=Ut=>{const{componentCls:Qt}=Ut,Pe=(Ee,Ge,Fe,hn)=>({[`${Qt}${Qt}-${Ee}`]:{fontSize:hn,[`
|
|
|
${Qt}-title,
|
|
|
${Qt}-footer,
|
|
|
${Qt}-cell,
|
|
|
${Qt}-thead > tr > th,
|
|
|
${Qt}-tbody > tr > th,
|
|
|
${Qt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${Ge}px ${Fe}px`},[`${Qt}-filter-trigger`]:{marginInlineEnd:`-${Fe/2}px`},[`${Qt}-expanded-row-fixed`]:{margin:`-${Ge}px -${Fe}px`},[`${Qt}-tbody`]:{[`${Qt}-wrapper:only-child ${Qt}`]:{marginBlock:`-${Ge}px`,marginInline:`${Ut.tableExpandColumnWidth-Fe}px -${Fe}px`}},[`${Qt}-selection-column`]:{paddingInlineStart:`${Fe/4}px`}}});return{[`${Qt}-wrapper`]:Object.assign(Object.assign({},Pe("middle",Ut.tablePaddingVerticalMiddle,Ut.tablePaddingHorizontalMiddle,Ut.tableFontSizeMiddle)),Pe("small",Ut.tablePaddingVerticalSmall,Ut.tablePaddingHorizontalSmall,Ut.tableFontSizeSmall))}},_u=Ut=>{const{componentCls:Qt,marginXXS:Pe,fontSizeIcon:Ee,tableHeaderIconColor:Ge,tableHeaderIconColorHover:Fe}=Ut;return{[`${Qt}-wrapper`]:{[`${Qt}-thead th${Qt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Ut.motionDurationSlow}`,"&:hover":{background:Ut.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Ut.colorPrimary},[`
|
|
|
&${Qt}-cell-fix-left:hover,
|
|
|
&${Qt}-cell-fix-right:hover
|
|
|
`]:{background:Ut.tableFixedHeaderSortActiveBg}},[`${Qt}-thead th${Qt}-column-sort`]:{background:Ut.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Qt}-column-sort`]:{background:Ut.tableBodySortBg},[`${Qt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Qt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Qt}-column-sorter`]:{marginInlineStart:Pe,color:Ge,fontSize:0,transition:`color ${Ut.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Ee,"&.active":{color:Ut.colorPrimary}},[`${Qt}-column-sorter-up + ${Qt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Qt}-column-sorters:hover ${Qt}-column-sorter`]:{color:Fe}}}},nd=Ut=>{const{componentCls:Qt,opacityLoading:Pe,tableScrollThumbBg:Ee,tableScrollThumbBgHover:Ge,tableScrollThumbSize:Fe,tableScrollBg:hn,zIndexTableSticky:dn,stickyScrollBarBorderRadius:rn}=Ut,Nn=`${Ut.lineWidth}px ${Ut.lineType} ${Ut.tableBorderColor}`;return{[`${Qt}-wrapper`]:{[`${Qt}-sticky`]:{"&-holder":{position:"sticky",zIndex:dn,background:Ut.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Fe}px !important`,zIndex:dn,display:"flex",alignItems:"center",background:hn,borderTop:Nn,opacity:Pe,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Fe,backgroundColor:Ee,borderRadius:rn,transition:`all ${Ut.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Ge}}}}}}},qu=Ut=>{const{componentCls:Qt,lineWidth:Pe,tableBorderColor:Ee}=Ut,Ge=`${Pe}px ${Ut.lineType} ${Ee}`;return{[`${Qt}-wrapper`]:{[`${Qt}-summary`]:{position:"relative",zIndex:Ut.zIndexTableFixed,background:Ut.tableBg,"> tr":{"> th, > td":{borderBottom:Ge}}},[`div${Qt}-summary`]:{boxShadow:`0 -${Pe}px 0 ${Ee}`}}}},Th=Ut=>{const{componentCls:Qt}=Ut,Pe=`${Ut.lineWidth}px ${Ut.lineType} ${Ut.tableBorderColor}`,Ee=`${Qt}-expanded-row-cell`;return{[`${Qt}-wrapper`]:{[`${Qt}-tbody-virtual`]:{[`${Qt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Qt}-cell`]:{borderBottom:Pe},[`${Qt}-expanded-row`]:{[`${Ee}${Ee}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Ut.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Qt}-bordered`]:{[`${Qt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:Pe,position:"absolute"},[`${Qt}-cell`]:{borderInlineEnd:Pe,[`&${Qt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Ut.lineWidth,borderInlineStart:Pe}}}}}}};const Ru=Ut=>{const{componentCls:Qt,fontWeightStrong:Pe,tablePaddingVertical:Ee,tablePaddingHorizontal:Ge,lineWidth:Fe,lineType:hn,tableBorderColor:dn,tableFontSize:rn,tableBg:Nn,tableRadius:Rn,tableHeaderTextColor:In,motionDurationMid:gi,tableHeaderBg:di,tableHeaderCellSplitColor:ei,tableRowHoverBg:Fi,tableSelectedRowBg:ai,tableSelectedRowHoverBg:Ai,tableFooterTextColor:bi,tableFooterBg:Vi,paddingContentVerticalLG:vo}=Ut,Bo=`${Fe}px ${hn} ${dn}`;return{[`${Qt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ps.dF)()),{[Qt]:Object.assign(Object.assign({},(0,Ps.Wf)(Ut)),{fontSize:rn,background:Nn,borderRadius:`${Rn}px ${Rn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Rn}px ${Rn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${Qt}-cell,
|
|
|
${Qt}-thead > tr > th,
|
|
|
${Qt}-tbody > tr > th,
|
|
|
${Qt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${vo}px ${Ge}px`,overflowWrap:"break-word"},[`${Qt}-title`]:{padding:`${Ee}px ${Ge}px`},[`${Qt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:In,fontWeight:Pe,textAlign:"start",background:di,borderBottom:Bo,transition:`background ${gi} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Qt}-selection-column):not(${Qt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:ei,transform:"translateY(-50%)",transition:`background-color ${gi}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Qt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${gi}, border-color ${gi}`,borderBottom:Bo,[`
|
|
|
> ${Qt}-wrapper:only-child,
|
|
|
> ${Qt}-expanded-row-fixed > ${Qt}-wrapper:only-child
|
|
|
`]:{[Qt]:{marginBlock:`-${Ee}px`,marginInline:`${Ut.tableExpandColumnWidth-Ge}px -${Ge}px`,[`${Qt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:In,fontWeight:Pe,textAlign:"start",background:di,borderBottom:Bo,transition:`background ${gi} ease`},[`
|
|
|
&${Qt}-row:hover > th,
|
|
|
&${Qt}-row:hover > td,
|
|
|
> th${Qt}-cell-row-hover,
|
|
|
> td${Qt}-cell-row-hover
|
|
|
`]:{background:Fi},[`&${Qt}-row-selected`]:{"> th, > td":{background:ai},"&:hover > th, &:hover > td":{background:Ai}}}},[`${Qt}-footer`]:{padding:`${Ee}px ${Ge}px`,color:bi,background:Vi}})}};var Bh=(0,vr.Z)("Table",Ut=>{const{colorTextHeading:Qt,colorSplit:Pe,colorIcon:Ee,colorIconHover:Ge,opacityLoading:Fe,colorBgContainer:hn,controlInteractiveSize:dn,headerBg:rn,headerColor:Nn,headerSortActiveBg:Rn,headerSortHoverBg:In,bodySortBg:gi,rowHoverBg:di,rowSelectedBg:ei,rowSelectedHoverBg:Fi,rowExpandedBg:ai,cellPaddingBlock:Ai,cellPaddingInline:bi,cellPaddingBlockMD:Vi,cellPaddingInlineMD:vo,cellPaddingBlockSM:Bo,cellPaddingInlineSM:Oi,borderColor:fo,footerBg:or,footerColor:Zi,headerBorderRadius:io,cellFontSize:Wi,cellFontSizeMD:xi,cellFontSizeSM:to,headerSplitColor:Mo,fixedHeaderSortActiveBg:Wo,headerFilterHoverBg:Uo,filterDropdownBg:Ri,expandIconBg:sr,selectionColumnWidth:fr,stickyScrollBarBg:Qr}=Ut,br=new Ua.C(Ee),Os=new Ua.C(Ge),Bs=2,ur=(0,aa.TS)(Ut,{tableFontSize:Wi,tableBg:hn,tableRadius:io,tablePaddingVertical:Ai,tablePaddingHorizontal:bi,tablePaddingVerticalMiddle:Vi,tablePaddingHorizontalMiddle:vo,tablePaddingVerticalSmall:Bo,tablePaddingHorizontalSmall:Oi,tableBorderColor:fo,tableHeaderTextColor:Nn,tableHeaderBg:rn,tableFooterTextColor:Zi,tableFooterBg:or,tableHeaderCellSplitColor:Mo,tableHeaderSortBg:Rn,tableHeaderSortHoverBg:In,tableHeaderIconColor:br.clone().setAlpha(br.getAlpha()*Fe).toRgbString(),tableHeaderIconColorHover:Os.clone().setAlpha(Os.getAlpha()*Fe).toRgbString(),tableBodySortBg:gi,tableFixedHeaderSortActiveBg:Wo,tableHeaderFilterActiveBg:Uo,tableFilterDropdownBg:Ri,tableRowHoverBg:di,tableSelectedRowBg:ei,tableSelectedRowHoverBg:Fi,zIndexTableFixed:Bs,zIndexTableSticky:Bs+1,tableFontSizeMiddle:xi,tableFontSizeSmall:to,tableSelectionColumnWidth:fr,tableExpandIconBg:sr,tableExpandColumnWidth:dn+2*Ut.padding,tableExpandedRowBg:ai,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Qr,tableScrollThumbBgHover:Qt,tableScrollBg:Pe});return[Ru(ur),Wf(ur),qu(ur),_u(ur),Xs(ur),ys(ur),Kf(ur),gs(ur),qu(ur),Dr(ur),Ec(ur),td(ur),nd(ur),Ma(ur),ed(ur),Xd(ur),Th(ur)]},Ut=>{const{colorFillAlter:Qt,colorBgContainer:Pe,colorTextHeading:Ee,colorFillSecondary:Ge,colorFillContent:Fe,controlItemBgActive:hn,controlItemBgActiveHover:dn,padding:rn,paddingSM:Nn,paddingXS:Rn,colorBorderSecondary:In,borderRadiusLG:gi,fontSize:di,controlHeight:ei,colorTextPlaceholder:Fi}=Ut,ai=new Ua.C(Ge).onBackground(Pe).toHexShortString(),Ai=new Ua.C(Fe).onBackground(Pe).toHexShortString(),bi=new Ua.C(Qt).onBackground(Pe).toHexShortString();return{headerBg:bi,headerColor:Ee,headerSortActiveBg:ai,headerSortHoverBg:Ai,bodySortBg:bi,rowHoverBg:bi,rowSelectedBg:hn,rowSelectedHoverBg:dn,rowExpandedBg:Qt,cellPaddingBlock:rn,cellPaddingInline:rn,cellPaddingBlockMD:Nn,cellPaddingInlineMD:Rn,cellPaddingBlockSM:Rn,cellPaddingInlineSM:Rn,borderColor:In,headerBorderRadius:gi,footerBg:bi,footerColor:Ee,cellFontSize:di,cellFontSizeMD:di,cellFontSizeSM:di,headerSplitColor:In,fixedHeaderSortActiveBg:ai,headerFilterHoverBg:Fe,filterDropdownMenuBg:Pe,filterDropdownBg:Pe,expandIconBg:Pe,selectionColumnWidth:ei,stickyScrollBarBg:Fi,stickyScrollBarBorderRadius:100}});const Lc=[],af=(Ut,Qt)=>{const{prefixCls:Pe,className:Ee,rootClassName:Ge,style:Fe,size:hn,bordered:dn,dropdownPrefixCls:rn,dataSource:Nn,pagination:Rn,rowSelection:In,rowKey:gi="key",rowClassName:di,columns:ei,children:Fi,childrenColumnName:ai,onChange:Ai,getPopupContainer:bi,loading:Vi,expandIcon:vo,expandable:Bo,expandedRowRender:Oi,expandIconColumnIndex:fo,indentSize:or,scroll:Zi,sortDirections:io,locale:Wi,showSorterTooltip:xi=!0,virtual:to}=Ut,Mo=Tt.useMemo(()=>ei||We(Fi),[ei,Fi]),Wo=Tt.useMemo(()=>Mo.some(Zr=>Zr.responsive),[Mo]),Uo=(0,kn.Z)(Wo),Ri=Tt.useMemo(()=>{const Zr=new Set(Object.keys(Uo).filter(Ms=>Uo[Ms]));return Mo.filter(Ms=>!Ms.responsive||Ms.responsive.some(ua=>Zr.has(ua)))},[Mo,Uo]),sr=(0,ro.Z)(Ut,["className","style","columns"]),{locale:fr=Ki.Z,direction:Qr,table:br,renderEmpty:Os,getPrefixCls:Bs,getPopupContainer:ur}=Tt.useContext(ms.E_),Ao=(0,Ti.Z)(hn),zr=Object.assign(Object.assign({},fr.Table),Wi),Rs=Nn||Lc,Cs=Bs("table",Pe),ia=Bs("dropdown",rn),Vo=Object.assign({childrenColumnName:ai,expandIconColumnIndex:fo},Bo),{childrenColumnName:Do="children"}=Vo,Yo=Tt.useMemo(()=>Rs.some(Zr=>Zr==null?void 0:Zr[Do])?"nest":Oi||Bo&&Bo.expandedRowRender?"row":null,[Rs]),xo={body:Tt.useRef()},Kr=Tt.useMemo(()=>typeof gi=="function"?gi:Zr=>Zr==null?void 0:Zr[gi],[gi]),[wo]=ch(Rs,Do,Kr),rr={},Nr=function(Zr,Ms){let ua=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Es,Rr,Sa;const xl=Object.assign(Object.assign({},rr),Zr);ua&&((Es=rr.resetPagination)===null||Es===void 0||Es.call(rr),!((Rr=xl.pagination)===null||Rr===void 0)&&Rr.current&&(xl.pagination.current=1),Rn&&Rn.onChange&&Rn.onChange(1,(Sa=xl.pagination)===null||Sa===void 0?void 0:Sa.pageSize)),Zi&&Zi.scrollToFirstRowOnChange!==!1&&xo.body.current&&(0,lr.Z)(0,{getContainer:()=>xo.body.current}),Ai==null||Ai(xl.pagination,xl.filters,xl.sorter,{currentDataSource:pa(mh(Rs,xl.sorterStates,Do),xl.filterStates),action:Ms})},Tr=(Zr,Ms)=>{Nr({sorter:Zr,sorterStates:Ms},"sort",!1)},[Ea,la,Va,Jr]=Mc({prefixCls:Cs,mergedColumns:Ri,onSorterChange:Tr,sortDirections:io||["ascend","descend"],tableLocale:zr,showSorterTooltip:xi}),La=Tt.useMemo(()=>mh(Rs,la,Do),[Rs,la]);rr.sorter=Jr(),rr.sorterStates=la;const ta=(Zr,Ms)=>{Nr({filters:Zr,filterStates:Ms},"filter",!0)},[ma,$u,_r]=kh({prefixCls:Cs,locale:zr,dropdownPrefixCls:ia,mergedColumns:Ri,onFilterChange:ta,getPopupContainer:bi||ur}),ss=pa(La,$u);rr.filters=_r,rr.filterStates=$u;const ps=Tt.useMemo(()=>{const Zr={};return Object.keys(_r).forEach(Ms=>{_r[Ms]!==null&&(Zr[Ms]=_r[Ms])}),Object.assign(Object.assign({},Va),{filters:Zr})},[Va,_r]),[Qs]=Ks(ps),va=(Zr,Ms)=>{Nr({pagination:Object.assign(Object.assign({},rr.pagination),{current:Zr,pageSize:Ms})},"paginate")},[Cr,Ss]=gh(ss.length,va,Rn);rr.pagination=Rn===!1?{}:tu(Cr,Rn),rr.resetPagination=Ss;const ya=Tt.useMemo(()=>{if(Rn===!1||!Cr.pageSize)return ss;const{current:Zr=1,total:Ms,pageSize:ua=yu}=Cr;return ss.length<Ms?ss.length>ua?ss.slice((Zr-1)*ua,Zr*ua):ss:ss.slice((Zr-1)*ua,Zr*ua)},[!!Rn,ss,Cr&&Cr.current,Cr&&Cr.pageSize,Cr&&Cr.total]),[Sl,Wl]=Ws({prefixCls:Cs,data:ss,pageData:ya,getRowKey:Kr,getRecordByKey:wo,expandType:Yo,childrenColumnName:Do,locale:zr,getPopupContainer:bi||ur},In),Nl=(Zr,Ms,ua)=>{let Es;return typeof di=="function"?Es=me()(di(Zr,Ms,ua)):Es=me()(di),me()({[`${Cs}-row-selected`]:Wl.has(Kr(Zr,Ms))},Es)};Vo.__PARENT_RENDER_ICON__=Vo.expandIcon,Vo.expandIcon=Vo.expandIcon||vo||hs(zr),Yo==="nest"&&Vo.expandIconColumnIndex===void 0?Vo.expandIconColumnIndex=In?1:0:Vo.expandIconColumnIndex>0&&In&&(Vo.expandIconColumnIndex-=1),typeof Vo.indentSize!="number"&&(Vo.indentSize=typeof or=="number"?or:15);const nu=Tt.useCallback(Zr=>Qs(Sl(ma(Ea(Zr)))),[Ea,ma,Sl]);let iu,Kl;if(Rn!==!1&&(Cr!=null&&Cr.total)){let Zr;Cr.size?Zr=Cr.size:Zr=Ao==="small"||Ao==="middle"?"small":void 0;const Ms=Rr=>Tt.createElement(Jo.Z,Object.assign({},Cr,{className:me()(`${Cs}-pagination ${Cs}-pagination-${Rr}`,Cr.className),size:Zr})),ua=Qr==="rtl"?"left":"right",{position:Es}=Cr;if(Es!==null&&Array.isArray(Es)){const Rr=Es.find(wu=>wu.includes("top")),Sa=Es.find(wu=>wu.includes("bottom")),xl=Es.every(wu=>`${wu}`=="none");!Rr&&!Sa&&!xl&&(Kl=Ms(ua)),Rr&&(iu=Ms(Rr.toLowerCase().replace("top",""))),Sa&&(Kl=Ms(Sa.toLowerCase().replace("bottom","")))}else Kl=Ms(ua)}let $r;typeof Vi=="boolean"?$r={spinning:Vi}:typeof Vi=="object"&&($r=Object.assign({spinning:!0},Vi));const[ka,Zs]=Bh(Cs),[,xs]=(0,Ir.Z)(),Zl=me()(`${Cs}-wrapper`,br==null?void 0:br.className,{[`${Cs}-wrapper-rtl`]:Qr==="rtl"},Ee,Ge,Zs),vh=Object.assign(Object.assign({},br==null?void 0:br.style),Fe),ou=Wi&&Wi.emptyText||(Os==null?void 0:Os("Table"))||Tt.createElement(Ji.Z,{componentName:"Table"}),ju=to?rl:To,th={},Tl=Tt.useMemo(()=>{const{fontSize:Zr,lineHeight:Ms,padding:ua,paddingXS:Es,paddingSM:Rr}=xs,Sa=Math.floor(Zr*Ms);switch(Ao){case"large":return ua*2+Sa;case"small":return Es*2+Sa;default:return Rr*2+Sa}},[xs,Ao]);return to&&(th.listItemHeight=Tl),ka(Tt.createElement("div",{ref:Qt,className:Zl,style:vh},Tt.createElement(jr.Z,Object.assign({spinning:!1},$r),iu,Tt.createElement(ju,Object.assign({},th,sr,{columns:Ri,direction:Qr,expandable:Vo,prefixCls:Cs,className:me()({[`${Cs}-middle`]:Ao==="middle",[`${Cs}-small`]:Ao==="small",[`${Cs}-bordered`]:dn,[`${Cs}-empty`]:Rs.length===0}),data:ya,rowKey:Kr,rowClassName:Nl,emptyText:ou,internalHooks:te,internalRefs:xo,transformColumns:nu})),Kl)))};var lf=Tt.forwardRef(af);const Vf=(Ut,Qt)=>{const Pe=Tt.useRef(0);return Pe.current+=1,Tt.createElement(lf,Object.assign({},Ut,{ref:Qt,_renderTimes:Pe.current}))},yl=Tt.forwardRef(Vf);yl.SELECTION_COLUMN=So,yl.EXPAND_COLUMN=wt,yl.SELECTION_ALL=Ho,yl.SELECTION_INVERT=ao,yl.SELECTION_NONE=dr,yl.Column=no,yl.ColumnGroup=Ko,yl.Summary=le;var Fh=yl,Zg=Fh},17574:function(gn,Ln,bt){"use strict";bt.d(Ln,{default:function(){return we}});var wt=bt(54844),te=bt(80702),de=bt(52671),Re=bt(8657),ne=bt(72308),ae=bt(59301),Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},be=Tt,ye=bt(7657),Jt=function(_e,Zn){return ae.createElement(ye.Z,(0,ne.Z)({},_e,{ref:Zn,icon:be}))},Be=ae.forwardRef(Jt),pe=Be,je=bt(92310),Nt=bt.n(je),et=bt(35654),nt=bt(71430),ht=bt(36355),lt=bt(56082),gt=bt(62892),vt=bt(20648);const Pt=4;function At(Yt){const{dropPosition:_e,dropLevelOffset:Zn,prefixCls:Dn,indent:Ne,direction:pn="ltr"}=Yt,Tn=pn==="ltr"?"left":"right",Yn=pn==="ltr"?"right":"left",mn={[Tn]:-Zn*Ne+Pt,[Yn]:0};switch(_e){case-1:mn.top=-3;break;case 1:mn.bottom=-3;break;default:mn.bottom=-3,mn[Tn]=Ne+Pt;break}return ae.createElement("div",{style:mn,className:`${Dn}-drop-indicator`})}var Bt=bt(71997),_t=ae.forwardRef((Yt,_e)=>{const{getPrefixCls:Zn,direction:Dn,virtual:Ne,tree:pn}=ae.useContext(ht.E_),{prefixCls:Tn,className:Yn,showIcon:mn=!1,showLine:ui,switcherIcon:Ce,blockNode:$n=!1,children:Pi,checkable:Ot=!1,selectable:Lt=!0,draggable:St,motion:It,style:Kt}=Yt,xt=Zn("tree",Tn),Me=Zn(),De=It!=null?It:Object.assign(Object.assign({},(0,gt.Z)(Me)),{motionAppear:!1}),le=Object.assign(Object.assign({},Yt),{checkable:Ot,selectable:Lt,showIcon:mn,motion:De,blockNode:$n,showLine:!!ui,dropIndicatorRender:At}),[ee,Se]=(0,vt.ZP)(xt),xe=ae.useMemo(()=>{if(!St)return!1;let Te={};switch(typeof St){case"function":Te.nodeDraggable=St;break;case"object":Te=Object.assign({},St);break;default:break}return Te.icon!==!1&&(Te.icon=Te.icon||ae.createElement(lt.Z,null)),Te},[St]),ue=Te=>ae.createElement(Bt.Z,{prefixCls:xt,switcherIcon:Ce,treeNodeProps:Te,showLine:ui});return ee(ae.createElement(wt.Z,Object.assign({itemHeight:20,ref:_e,virtual:Ne},le,{style:Object.assign(Object.assign({},pn==null?void 0:pn.style),Kt),prefixCls:xt,className:Nt()({[`${xt}-icon-hide`]:!mn,[`${xt}-block-node`]:$n,[`${xt}-unselectable`]:!Lt,[`${xt}-rtl`]:Dn==="rtl"},pn==null?void 0:pn.className,Yn,Se),direction:Dn,checkable:Ot&&ae.createElement("span",{className:`${xt}-checkbox-inner`}),selectable:Lt,switcherIcon:ue,draggable:xe}),Pi))}),se;(function(Yt){Yt[Yt.None=0]="None",Yt[Yt.Start=1]="Start",Yt[Yt.End=2]="End"})(se||(se={}));function Vt(Yt,_e){function Zn(Dn){const{key:Ne,children:pn}=Dn;_e(Ne,Dn)!==!1&&Vt(pn||[],_e)}Yt.forEach(Zn)}function he(Yt){let{treeData:_e,expandedKeys:Zn,startKey:Dn,endKey:Ne}=Yt;const pn=[];let Tn=se.None;if(Dn&&Dn===Ne)return[Dn];if(!Dn||!Ne)return[];function Yn(mn){return mn===Dn||mn===Ne}return Vt(_e,mn=>{if(Tn===se.End)return!1;if(Yn(mn)){if(pn.push(mn),Tn===se.None)Tn=se.Start;else if(Tn===se.Start)return Tn=se.End,!1}else Tn===se.Start&&pn.push(mn);return Zn.includes(mn)}),pn}function Zt(Yt,_e){const Zn=(0,te.Z)(_e),Dn=[];return Vt(Yt,(Ne,pn)=>{const Tn=Zn.indexOf(Ne);return Tn!==-1&&(Dn.push(pn),Zn.splice(Tn,1)),!!Zn.length}),Dn}var Oe=function(Yt,_e){var Zn={};for(var Dn in Yt)Object.prototype.hasOwnProperty.call(Yt,Dn)&&_e.indexOf(Dn)<0&&(Zn[Dn]=Yt[Dn]);if(Yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,Dn=Object.getOwnPropertySymbols(Yt);Ne<Dn.length;Ne++)_e.indexOf(Dn[Ne])<0&&Object.prototype.propertyIsEnumerable.call(Yt,Dn[Ne])&&(Zn[Dn[Ne]]=Yt[Dn[Ne]]);return Zn};function me(Yt){const{isLeaf:_e,expanded:Zn}=Yt;return _e?ae.createElement(de.Z,null):Zn?ae.createElement(Re.Z,null):ae.createElement(pe,null)}function Ve(Yt){let{treeData:_e,children:Zn}=Yt;return _e||(0,nt.zn)(Zn)}const Xe=(Yt,_e)=>{var{defaultExpandAll:Zn,defaultExpandParent:Dn,defaultExpandedKeys:Ne}=Yt,pn=Oe(Yt,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const Tn=ae.useRef(),Yn=ae.useRef(),mn=()=>{const{keyEntities:xe}=(0,nt.I8)(Ve(pn));let ue;return Zn?ue=Object.keys(xe):Dn?ue=(0,et.r7)(pn.expandedKeys||Ne||[],xe):ue=pn.expandedKeys||Ne,ue},[ui,Ce]=ae.useState(pn.selectedKeys||pn.defaultSelectedKeys||[]),[$n,Pi]=ae.useState(()=>mn());ae.useEffect(()=>{"selectedKeys"in pn&&Ce(pn.selectedKeys)},[pn.selectedKeys]),ae.useEffect(()=>{"expandedKeys"in pn&&Pi(pn.expandedKeys)},[pn.expandedKeys]);const Ot=(xe,ue)=>{var Te;return"expandedKeys"in pn||Pi(xe),(Te=pn.onExpand)===null||Te===void 0?void 0:Te.call(pn,xe,ue)},Lt=(xe,ue)=>{var Te;const{multiple:vn}=pn,{node:fn,nativeEvent:en}=ue,{key:xn=""}=fn,ln=Ve(pn),tn=Object.assign(Object.assign({},ue),{selected:!0}),ii=(en==null?void 0:en.ctrlKey)||(en==null?void 0:en.metaKey),ri=en==null?void 0:en.shiftKey;let Un;vn&&ii?(Un=xe,Tn.current=xn,Yn.current=Un,tn.selectedNodes=Zt(ln,Un)):vn&&ri?(Un=Array.from(new Set([].concat((0,te.Z)(Yn.current||[]),(0,te.Z)(he({treeData:ln,expandedKeys:$n,startKey:xn,endKey:Tn.current}))))),tn.selectedNodes=Zt(ln,Un)):(Un=[xn],Tn.current=xn,Yn.current=Un,tn.selectedNodes=Zt(ln,Un)),(Te=pn.onSelect)===null||Te===void 0||Te.call(pn,Un,tn),"selectedKeys"in pn||Ce(Un)},{getPrefixCls:St,direction:It}=ae.useContext(ht.E_),{prefixCls:Kt,className:xt,showIcon:Me=!0,expandAction:De="click"}=pn,le=Oe(pn,["prefixCls","className","showIcon","expandAction"]),ee=St("tree",Kt),Se=Nt()(`${ee}-directory`,{[`${ee}-directory-rtl`]:It==="rtl"},xt);return ae.createElement(_t,Object.assign({icon:me,ref:_e,blockNode:!0},le,{showIcon:Me,expandAction:De,prefixCls:ee,className:Se,expandedKeys:$n,selectedKeys:ui,onSelect:Lt,onExpand:Ot}))};var wn=ae.forwardRef(Xe);const Mn=_t;Mn.DirectoryTree=wn,Mn.TreeNode=wt.O;var we=Mn},20648:function(gn,Ln,bt){"use strict";bt.d(Ln,{TM:function(){return je},Yk:function(){return pe}});var wt=bt(93083),te=bt(98447),de=bt(17313),Re=bt(8378),ne=bt(37613),ae=bt(83116);const Tt=new wt.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),be=(Nt,et)=>({[`.${Nt}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${et.motionDurationSlow}`}}}),ye=(Nt,et)=>({[`.${Nt}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:et.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${et.lineWidthBold}px solid ${et.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Jt=(Nt,et)=>{const{treeCls:nt,treeNodeCls:ht,treeNodePadding:lt,titleHeight:gt,nodeSelectedBg:vt,nodeHoverBg:Pt}=et,At=et.paddingXS;return{[nt]:Object.assign(Object.assign({},(0,de.Wf)(et)),{background:et.colorBgContainer,borderRadius:et.borderRadius,transition:`background-color ${et.motionDurationSlow}`,[`&${nt}-rtl`]:{[`${nt}-switcher`]:{"&_close":{[`${nt}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${nt}-active-focused)`]:Object.assign({},(0,de.oN)(et)),[`${nt}-list-holder-inner`]:{alignItems:"flex-start"},[`&${nt}-block-node`]:{[`${nt}-list-holder-inner`]:{alignItems:"stretch",[`${nt}-node-content-wrapper`]:{flex:"auto"},[`${ht}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:lt,insetInlineStart:0,border:`1px solid ${et.colorPrimary}`,opacity:0,animationName:Tt,animationDuration:et.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ht}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${lt}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${nt}-node-content-wrapper`]:{color:et.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${nt}-node-content-wrapper`]:Object.assign({},(0,de.oN)(et)),[`&:not(${ht}-disabled).filter-node ${nt}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${nt}-draggable-icon`]:{flexShrink:0,width:gt,lineHeight:`${gt}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${et.motionDurationSlow}`,[`${ht}:hover &`]:{opacity:.45}},[`&${ht}-disabled`]:{[`${nt}-draggable-icon`]:{visibility:"hidden"}}}},[`${nt}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:gt}},[`${nt}-draggable-icon`]:{visibility:"hidden"},[`${nt}-switcher`]:Object.assign(Object.assign({},be(Nt,et)),{position:"relative",flex:"none",alignSelf:"stretch",width:gt,margin:0,lineHeight:`${gt}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${nt}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:et.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:gt/2,bottom:-lt,marginInlineStart:-1,borderInlineEnd:`1px solid ${et.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:gt/2*.8,height:gt/2,borderBottom:`1px solid ${et.colorBorder}`,content:'""'}}}),[`${nt}-checkbox`]:{top:"initial",marginInlineEnd:At},[`${nt}-node-content-wrapper, ${nt}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:gt,margin:0,padding:`0 ${et.paddingXS/2}px`,color:"inherit",lineHeight:`${gt}px`,background:"transparent",borderRadius:et.borderRadius,cursor:"pointer",transition:`all ${et.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:Pt},[`&${nt}-node-selected`]:{backgroundColor:vt},[`${nt}-iconEle`]:{display:"inline-block",width:gt,height:gt,lineHeight:`${gt}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${nt}-unselectable ${nt}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${nt}-node-content-wrapper`]:Object.assign({lineHeight:`${gt}px`,userSelect:"none"},ye(Nt,et)),[`${ht}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${et.colorPrimary}`}},"&-show-line":{[`${nt}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:gt/2,bottom:-lt,borderInlineEnd:`1px solid ${et.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${nt}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ht}-leaf-last`]:{[`${nt}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${gt/2}px !important`}}}}})}},Be=Nt=>{const{treeCls:et,treeNodeCls:nt,treeNodePadding:ht,directoryNodeSelectedBg:lt,directoryNodeSelectedColor:gt}=Nt;return{[`${et}${et}-directory`]:{[nt]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ht,insetInlineStart:0,transition:`background-color ${Nt.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Nt.controlItemBgHover}},"> *":{zIndex:1},[`${et}-switcher`]:{transition:`color ${Nt.motionDurationMid}`},[`${et}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${et}-node-selected`]:{color:gt,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:lt},[`${et}-switcher`]:{color:gt},[`${et}-node-content-wrapper`]:{color:gt,background:"transparent"}}}}}},pe=(Nt,et)=>{const nt=`.${Nt}`,ht=`${nt}-treenode`,lt=et.paddingXS/2,gt=(0,ne.TS)(et,{treeCls:nt,treeNodeCls:ht,treeNodePadding:lt});return[Jt(Nt,gt),Be(gt)]},je=Nt=>{const{controlHeightSM:et}=Nt;return{titleHeight:et,nodeHoverBg:Nt.controlItemBgHover,nodeSelectedBg:Nt.controlItemBgActive}};Ln.ZP=(0,ae.Z)("Tree",(Nt,et)=>{let{prefixCls:nt}=et;return[{[Nt.componentCls]:(0,te.C2)(`${nt}-checkbox`,Nt)},pe(nt,Nt),(0,Re.Z)(Nt)]},Nt=>{const{colorTextLightSolid:et,colorPrimary:nt}=Nt;return Object.assign(Object.assign({},je(Nt)),{directoryNodeSelectedColor:et,directoryNodeSelectedBg:nt})})},71997:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return ht}});var wt=bt(72308),te=bt(59301),de={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},Re=de,ne=bt(7657),ae=function(gt,vt){return te.createElement(ne.Z,(0,wt.Z)({},gt,{ref:vt,icon:Re}))},Tt=te.forwardRef(ae),be=Tt,ye=bt(52671),Jt=bt(58617),Be=bt(15075),pe=bt(43531),je=bt(92310),Nt=bt.n(je),et=bt(92343),ht=lt=>{const{prefixCls:gt,switcherIcon:vt,treeNodeProps:Pt,showLine:At}=lt,{isLeaf:Bt,expanded:jt,loading:_t}=Pt;if(_t)return te.createElement(Jt.Z,{className:`${gt}-switcher-loading-icon`});let se;if(At&&typeof At=="object"&&(se=At.showLeafIcon),Bt){if(!At)return null;if(typeof se!="boolean"&&se){const Zt=typeof se=="function"?se(Pt):se,Oe=`${gt}-switcher-line-custom-icon`;return(0,et.l$)(Zt)?(0,et.Tm)(Zt,{className:Nt()(Zt.props.className||"",Oe)}):Zt}return se?te.createElement(ye.Z,{className:`${gt}-switcher-line-icon`}):te.createElement("span",{className:`${gt}-switcher-leaf-line`})}const Vt=`${gt}-switcher-icon`,he=typeof vt=="function"?vt(Pt):vt;return(0,et.l$)(he)?(0,et.Tm)(he,{className:Nt()(he.props.className||"",Vt)}):he!==void 0?he:At?jt?te.createElement(Be.Z,{className:`${gt}-switcher-line-icon`}):te.createElement(pe.Z,{className:`${gt}-switcher-line-icon`}):te.createElement(be,{className:Vt})}},99498:function(gn,Ln,bt){(function(wt){wt(bt(89780))})(function(wt){wt.defineOption("placeholder","",function(be,ye,Jt){var Be=Jt&&Jt!=wt.Init;if(ye&&!Be)be.on("blur",ne),be.on("change",ae),be.on("swapDoc",ae),wt.on(be.getInputField(),"compositionupdate",be.state.placeholderCompose=function(){Re(be)}),ae(be);else if(!ye&&Be){be.off("blur",ne),be.off("change",ae),be.off("swapDoc",ae),wt.off(be.getInputField(),"compositionupdate",be.state.placeholderCompose),te(be);var pe=be.getWrapperElement();pe.className=pe.className.replace(" CodeMirror-empty","")}ye&&!be.hasFocus()&&ne(be)});function te(be){be.state.placeholder&&(be.state.placeholder.parentNode.removeChild(be.state.placeholder),be.state.placeholder=null)}function de(be){te(be);var ye=be.state.placeholder=document.createElement("pre");ye.style.cssText="height: 0; overflow: visible",ye.style.direction=be.getOption("direction"),ye.className="CodeMirror-placeholder CodeMirror-line-like";var Jt=be.getOption("placeholder");typeof Jt=="string"&&(Jt=document.createTextNode(Jt)),ye.appendChild(Jt),be.display.lineSpace.insertBefore(ye,be.display.lineSpace.firstChild)}function Re(be){setTimeout(function(){var ye=!1,Jt=be.getInputField();Jt.nodeName=="TEXTAREA"?ye=!Jt.value:be.lineCount()==1&&(ye=!/[^\u200b]/.test(Jt.querySelector(".CodeMirror-line").textContent)),ye?de(be):te(be)},20)}function ne(be){Tt(be)&&de(be)}function ae(be){var ye=be.getWrapperElement(),Jt=Tt(be);ye.className=ye.className.replace(" CodeMirror-empty","")+(Jt?" CodeMirror-empty":""),Jt?de(be):te(be)}function Tt(be){return be.lineCount()===1&&be.getLine(0)===""}})},25717:function(gn,Ln,bt){(function(wt){wt(bt(89780))})(function(wt){var te={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},de=wt.Pos;wt.defineOption("autoCloseBrackets",!1,function(et,nt,ht){ht&&ht!=wt.Init&&(et.removeKeyMap(ne),et.state.closeBrackets=null),nt&&(ae(Re(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(ne))});function Re(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:te[nt]}var ne={Backspace:ye,Enter:Jt};function ae(et){for(var nt=0;nt<et.length;nt++){var ht=et.charAt(nt),lt="'"+ht+"'";ne[lt]||(ne[lt]=Tt(ht))}}ae(te.pairs+"`");function Tt(et){return function(nt){return pe(nt,et)}}function be(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var ht=et.getModeAt(et.getCursor());return ht.closeBrackets||nt}function ye(et){var nt=be(et);if(!nt||et.getOption("disableInput"))return wt.Pass;for(var ht=Re(nt,"pairs"),lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return wt.Pass;var vt=je(et,lt[gt].head);if(!vt||ht.indexOf(vt)%2!=0)return wt.Pass}for(var gt=lt.length-1;gt>=0;gt--){var Pt=lt[gt].head;et.replaceRange("",de(Pt.line,Pt.ch-1),de(Pt.line,Pt.ch+1),"+delete")}}function Jt(et){var nt=be(et),ht=nt&&Re(nt,"explode");if(!ht||et.getOption("disableInput"))return wt.Pass;for(var lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return wt.Pass;var vt=je(et,lt[gt].head);if(!vt||ht.indexOf(vt)%2!=0)return wt.Pass}et.operation(function(){var Pt=et.lineSeparator()||`
|
|
|
`;et.replaceSelection(Pt+Pt,null),et.execCommand("goCharLeft"),lt=et.listSelections();for(var At=0;At<lt.length;At++){var Bt=lt[At].head.line;et.indentLine(Bt,null,!0),et.indentLine(Bt+1,null,!0)}})}function Be(et){var nt=wt.cmpPos(et.anchor,et.head)>0;return{anchor:new de(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new de(et.head.line,et.head.ch+(nt?1:-1))}}function pe(et,nt){var ht=be(et);if(!ht||et.getOption("disableInput"))return wt.Pass;var lt=Re(ht,"pairs"),gt=lt.indexOf(nt);if(gt==-1)return wt.Pass;for(var vt=Re(ht,"closeBefore"),Pt=Re(ht,"triples"),At=lt.charAt(gt+1)==nt,Bt=et.listSelections(),jt=gt%2==0,_t,se=0;se<Bt.length;se++){var Vt=Bt[se],he=Vt.head,Zt,Oe=et.getRange(he,de(he.line,he.ch+1));if(jt&&!Vt.empty())Zt="surround";else if((At||!jt)&&Oe==nt)At&&Nt(et,he)?Zt="both":Pt.indexOf(nt)>=0&&et.getRange(he,de(he.line,he.ch+3))==nt+nt+nt?Zt="skipThree":Zt="skip";else if(At&&he.ch>1&&Pt.indexOf(nt)>=0&&et.getRange(de(he.line,he.ch-2),he)==nt+nt){if(he.ch>2&&/\bstring/.test(et.getTokenTypeAt(de(he.line,he.ch-2))))return wt.Pass;Zt="addFour"}else if(At){var me=he.ch==0?" ":et.getRange(de(he.line,he.ch-1),he);if(!wt.isWordChar(Oe)&&me!=nt&&!wt.isWordChar(me))Zt="both";else return wt.Pass}else if(jt&&(Oe.length===0||/\s/.test(Oe)||vt.indexOf(Oe)>-1))Zt="both";else return wt.Pass;if(!_t)_t=Zt;else if(_t!=Zt)return wt.Pass}var Ve=gt%2?lt.charAt(gt-1):nt,Xe=gt%2?nt:lt.charAt(gt+1);et.operation(function(){if(_t=="skip")et.execCommand("goCharRight");else if(_t=="skipThree")for(var Je=0;Je<3;Je++)et.execCommand("goCharRight");else if(_t=="surround"){for(var wn=et.getSelections(),Je=0;Je<wn.length;Je++)wn[Je]=Ve+wn[Je]+Xe;et.replaceSelections(wn,"around"),wn=et.listSelections().slice();for(var Je=0;Je<wn.length;Je++)wn[Je]=Be(wn[Je]);et.setSelections(wn)}else _t=="both"?(et.replaceSelection(Ve+Xe,null),et.triggerElectric(Ve+Xe),et.execCommand("goCharLeft")):_t=="addFour"&&(et.replaceSelection(Ve+Ve+Ve+Ve,"before"),et.execCommand("goCharRight"))})}function je(et,nt){var ht=et.getRange(de(nt.line,nt.ch-1),de(nt.line,nt.ch+1));return ht.length==2?ht:null}function Nt(et,nt){var ht=et.getTokenAt(de(nt.line,nt.ch+1));return/\bstring/.test(ht.type)&&ht.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},6313:function(gn,Ln,bt){(function(wt){wt(bt(89780),bt(32855))})(function(wt){wt.defineOption("autoCloseTags",!1,function(ye,Jt,Be){if(Be!=wt.Init&&Be&&ye.removeKeyMap("autoCloseTags"),!!Jt){var pe={name:"autoCloseTags"};(typeof Jt!="object"||Jt.whenClosing!==!1)&&(pe["'/'"]=function(je){return ae(je)}),(typeof Jt!="object"||Jt.whenOpening!==!1)&&(pe["'>'"]=function(je){return Re(je)}),ye.addKeyMap(pe)}});var te=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],de=["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 Re(ye){if(ye.getOption("disableInput"))return wt.Pass;for(var Jt=ye.listSelections(),Be=[],pe=ye.getOption("autoCloseTags"),je=0;je<Jt.length;je++){if(!Jt[je].empty())return wt.Pass;var Nt=Jt[je].head,et=ye.getTokenAt(Nt),nt=wt.innerMode(ye.getMode(),et.state),ht=nt.state,lt=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(ht),gt=lt&<.name;if(!gt)return wt.Pass;var vt=nt.mode.configuration=="html",Pt=typeof pe=="object"&&pe.dontCloseTags||vt&&te,At=typeof pe=="object"&&pe.indentTags||vt&&de;et.end>Nt.ch&&(gt=gt.slice(0,gt.length-et.end+Nt.ch));var Bt=gt.toLowerCase();if(!gt||et.type=="string"&&(et.end!=Nt.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&<.close||et.string.indexOf("/")==Nt.ch-et.start-1||Pt&&Tt(Pt,Bt)>-1||be(ye,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ht)||[],gt,Nt,!0))return wt.Pass;var jt=typeof pe=="object"&&pe.emptyTags;if(jt&&Tt(jt,gt)>-1){Be[je]={text:"/>",newPos:wt.Pos(Nt.line,Nt.ch+2)};continue}var _t=At&&Tt(At,Bt)>-1;Be[je]={indent:_t,text:">"+(_t?`
|
|
|
|
|
|
`:"")+"</"+gt+">",newPos:_t?wt.Pos(Nt.line+1,0):wt.Pos(Nt.line,Nt.ch+1)}}for(var se=typeof pe=="object"&&pe.dontIndentOnAutoClose,je=Jt.length-1;je>=0;je--){var Vt=Be[je];ye.replaceRange(Vt.text,Jt[je].head,Jt[je].anchor,"+insert");var he=ye.listSelections().slice(0);he[je]={head:Vt.newPos,anchor:Vt.newPos},ye.setSelections(he),!se&&Vt.indent&&(ye.indentLine(Vt.newPos.line,null,!0),ye.indentLine(Vt.newPos.line+1,null,!0))}}function ne(ye,Jt){for(var Be=ye.listSelections(),pe=[],je=Jt?"/":"</",Nt=ye.getOption("autoCloseTags"),et=typeof Nt=="object"&&Nt.dontIndentOnSlash,nt=0;nt<Be.length;nt++){if(!Be[nt].empty())return wt.Pass;var ht=Be[nt].head,lt=ye.getTokenAt(ht),gt=wt.innerMode(ye.getMode(),lt.state),vt=gt.state;if(Jt&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ht.ch-1))return wt.Pass;var Pt,At=gt.mode.name!="xml"&&ye.getMode().name=="htmlmixed";if(At&>.mode.name=="javascript")Pt=je+"script";else if(At&>.mode.name=="css")Pt=je+"style";else{var Bt=gt.mode.xmlCurrentContext&>.mode.xmlCurrentContext(vt);if(!Bt||Bt.length&&be(ye,Bt,Bt[Bt.length-1],ht))return wt.Pass;Pt=je+Bt[Bt.length-1]}ye.getLine(ht.line).charAt(lt.end)!=">"&&(Pt+=">"),pe[nt]=Pt}if(ye.replaceSelections(pe),Be=ye.listSelections(),!et)for(var nt=0;nt<Be.length;nt++)(nt==Be.length-1||Be[nt].head.line<Be[nt+1].head.line)&&ye.indentLine(Be[nt].head.line)}function ae(ye){return ye.getOption("disableInput")?wt.Pass:ne(ye,!0)}wt.commands.closeTag=function(ye){return ne(ye)};function Tt(ye,Jt){if(ye.indexOf)return ye.indexOf(Jt);for(var Be=0,pe=ye.length;Be<pe;++Be)if(ye[Be]==Jt)return Be;return-1}function be(ye,Jt,Be,pe,je){if(!wt.scanForClosingTag)return!1;var Nt=Math.min(ye.lastLine()+1,pe.line+500),et=wt.scanForClosingTag(ye,pe,null,Nt);if(!et||et.tag!=Be)return!1;for(var nt=je?1:0,ht=Jt.length-1;ht>=0&&Jt[ht]==Be;ht--)++nt;pe=et.to;for(var ht=1;ht<nt;ht++){var lt=wt.scanForClosingTag(ye,pe,null,Nt);if(!lt||lt.tag!=Be)return!1;pe=lt.to}return!0}})},32855:function(gn,Ln,bt){(function(wt){wt(bt(89780))})(function(wt){"use strict";var te=wt.Pos;function de(ht,lt){return ht.line-lt.line||ht.ch-lt.ch}var Re="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ne=Re+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ae=new RegExp("<(/?)(["+Re+"]["+ne+"]*)","g");function Tt(ht,lt,gt,vt){this.line=lt,this.ch=gt,this.cm=ht,this.text=ht.getLine(lt),this.min=vt?Math.max(vt.from,ht.firstLine()):ht.firstLine(),this.max=vt?Math.min(vt.to-1,ht.lastLine()):ht.lastLine()}function be(ht,lt){var gt=ht.cm.getTokenTypeAt(te(ht.line,lt));return gt&&/\btag\b/.test(gt)}function ye(ht){if(!(ht.line>=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function Jt(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function Be(ht){for(;;){var lt=ht.text.indexOf(">",ht.ch);if(lt==-1){if(ye(ht))continue;return}if(!be(ht,lt+1)){ht.ch=lt+1;continue}var gt=ht.text.lastIndexOf("/",lt),vt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,vt?"selfClose":"regular"}}function pe(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(lt==-1){if(Jt(ht))continue;return}if(!be(ht,lt+1)){ht.ch=lt;continue}ae.lastIndex=lt,ht.ch=lt;var gt=ae.exec(ht.text);if(gt&>.index==lt)return gt}}function je(ht){for(;;){ae.lastIndex=ht.ch;var lt=ae.exec(ht.text);if(!lt){if(ye(ht))continue;return}if(!be(ht,lt.index+1)){ht.ch=lt.index+1;continue}return ht.ch=lt.index+lt[0].length,lt}}function Nt(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(lt==-1){if(Jt(ht))continue;return}if(!be(ht,lt+1)){ht.ch=lt;continue}var gt=ht.text.lastIndexOf("/",lt),vt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,vt?"selfClose":"regular"}}function et(ht,lt){for(var gt=[];;){var vt=je(ht),Pt,At=ht.line,Bt=ht.ch-(vt?vt[0].length:0);if(!vt||!(Pt=Be(ht)))return;if(Pt!="selfClose")if(vt[1]){for(var jt=gt.length-1;jt>=0;--jt)if(gt[jt]==vt[2]){gt.length=jt;break}if(jt<0&&(!lt||lt==vt[2]))return{tag:vt[2],from:te(At,Bt),to:te(ht.line,ht.ch)}}else gt.push(vt[2])}}function nt(ht,lt){for(var gt=[];;){var vt=Nt(ht);if(!vt)return;if(vt=="selfClose"){pe(ht);continue}var Pt=ht.line,At=ht.ch,Bt=pe(ht);if(!Bt)return;if(Bt[1])gt.push(Bt[2]);else{for(var jt=gt.length-1;jt>=0;--jt)if(gt[jt]==Bt[2]){gt.length=jt;break}if(jt<0&&(!lt||lt==Bt[2]))return{tag:Bt[2],from:te(ht.line,ht.ch),to:te(Pt,At)}}}}wt.registerHelper("fold","xml",function(ht,lt){for(var gt=new Tt(ht,lt.line,0);;){var vt=je(gt);if(!vt||gt.line!=lt.line)return;var Pt=Be(gt);if(!Pt)return;if(!vt[1]&&Pt!="selfClose"){var At=te(gt.line,gt.ch),Bt=et(gt,vt[2]);return Bt&&de(Bt.from,At)>0?{from:At,to:Bt.from}:null}}}),wt.findMatchingTag=function(ht,lt,gt){var vt=new Tt(ht,lt.line,lt.ch,gt);if(!(vt.text.indexOf(">")==-1&&vt.text.indexOf("<")==-1)){var Pt=Be(vt),At=Pt&&te(vt.line,vt.ch),Bt=Pt&&pe(vt);if(!(!Pt||!Bt||de(vt,lt)>0)){var jt={from:te(vt.line,vt.ch),to:At,tag:Bt[2]};return Pt=="selfClose"?{open:jt,close:null,at:"open"}:Bt[1]?{open:nt(vt,Bt[2]),close:jt,at:"close"}:(vt=new Tt(ht,At.line,At.ch,gt),{open:jt,close:et(vt,Bt[2]),at:"open"})}}},wt.findEnclosingTag=function(ht,lt,gt,vt){for(var Pt=new Tt(ht,lt.line,lt.ch,gt);;){var At=nt(Pt,vt);if(!At)break;var Bt=new Tt(ht,lt.line,lt.ch,gt),jt=et(Bt,At.tag);if(jt)return{open:At,close:jt}}},wt.scanForClosingTag=function(ht,lt,gt,vt){var Pt=new Tt(ht,lt.line,lt.ch,vt?{from:0,to:vt}:null);return et(Pt,gt)}})},89780:function(gn){(function(Ln,bt){gn.exports=bt()})(this,function(){"use strict";var Ln=navigator.userAgent,bt=navigator.platform,wt=/gecko\/\d/i.test(Ln),te=/MSIE \d/.test(Ln),de=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ln),Re=/Edge\/(\d+)/.exec(Ln),ne=te||de||Re,ae=ne&&(te?document.documentMode||6:+(Re||de)[1]),Tt=!Re&&/WebKit\//.test(Ln),be=Tt&&/Qt\/\d+\.\d+/.test(Ln),ye=!Re&&/Chrome\//.test(Ln),Jt=/Opera\//.test(Ln),Be=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ln),je=/PhantomJS/.test(Ln),Nt=!Re&&/AppleWebKit/.test(Ln)&&/Mobile\/\w+/.test(Ln),et=/Android/.test(Ln),nt=Nt||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ln),ht=Nt||/Mac/.test(bt),lt=/\bCrOS\b/.test(Ln),gt=/win/i.test(bt),vt=Jt&&Ln.match(/Version\/(\d*\.\d*)/);vt&&(vt=Number(vt[1])),vt&&vt>=15&&(Jt=!1,Tt=!0);var Pt=ht&&(be||Jt&&(vt==null||vt<12.11)),At=wt||ne&&ae>=9;function Bt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var jt=function(it,st){var ct=it.className,dt=Bt(st).exec(ct);if(dt){var pt=ct.slice(dt.index+dt[0].length);it.className=ct.slice(0,dt.index)+(pt?dt[1]+pt:"")}};function _t(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function se(it,st){return _t(it).appendChild(st)}function Vt(it,st,ct,dt){var pt=document.createElement(it);if(ct&&(pt.className=ct),dt&&(pt.style.cssText=dt),typeof st=="string")pt.appendChild(document.createTextNode(st));else if(st)for(var Et=0;Et<st.length;++Et)pt.appendChild(st[Et]);return pt}function he(it,st,ct,dt){var pt=Vt(it,st,ct,dt);return pt.setAttribute("role","presentation"),pt}var Zt;document.createRange?Zt=function(it,st,ct,dt){var pt=document.createRange();return pt.setEnd(dt||it,ct),pt.setStart(it,st),pt}:Zt=function(it,st,ct){var dt=document.body.createTextRange();try{dt.moveToElementText(it.parentNode)}catch(pt){return dt}return dt.collapse(!0),dt.moveEnd("character",ct),dt.moveStart("character",st),dt};function Oe(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function me(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function Ve(it,st){var ct=it.className;Bt(st).test(ct)||(it.className+=(ct?" ":"")+st)}function Xe(it,st){for(var ct=it.split(" "),dt=0;dt<ct.length;dt++)ct[dt]&&!Bt(ct[dt]).test(st)&&(st+=" "+ct[dt]);return st}var Je=function(it){it.select()};Nt?Je=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:ne&&(Je=function(it){try{it.select()}catch(st){}});function wn(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function Mn(it,st,ct){st||(st={});for(var dt in it)it.hasOwnProperty(dt)&&(ct!==!1||!st.hasOwnProperty(dt))&&(st[dt]=it[dt]);return st}function we(it,st,ct,dt,pt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Et=dt||0,Ft=pt||0;;){var Wt=it.indexOf(" ",Et);if(Wt<0||Wt>=st)return Ft+(st-Et);Ft+=Wt-Et,Ft+=ct-Ft%ct,Et=Wt+1}}var Yt=function(){this.id=null,this.f=null,this.time=0,this.handler=wn(this.onTimeout,this)};Yt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Yt.prototype.set=function(it,st){this.f=st;var ct=+new Date+it;(!this.id||ct<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ct)};function _e(it,st){for(var ct=0;ct<it.length;++ct)if(it[ct]==st)return ct;return-1}var Zn=50,Dn={toString:function(){return"CodeMirror.Pass"}},Ne={scroll:!1},pn={origin:"*mouse"},Tn={origin:"+move"};function Yn(it,st,ct){for(var dt=0,pt=0;;){var Et=it.indexOf(" ",dt);Et==-1&&(Et=it.length);var Ft=Et-dt;if(Et==it.length||pt+Ft>=st)return dt+Math.min(Ft,st-pt);if(pt+=Et-dt,pt+=ct-pt%ct,dt=Et+1,pt>=st)return dt}}var mn=[""];function ui(it){for(;mn.length<=it;)mn.push(Ce(mn)+" ");return mn[it]}function Ce(it){return it[it.length-1]}function $n(it,st){for(var ct=[],dt=0;dt<it.length;dt++)ct[dt]=st(it[dt],dt);return ct}function Pi(it,st,ct){for(var dt=0,pt=ct(st);dt<it.length&&ct(it[dt])<=pt;)dt++;it.splice(dt,0,st)}function Ot(){}function Lt(it,st){var ct;return Object.create?ct=Object.create(it):(Ot.prototype=it,ct=new Ot),st&&Mn(st,ct),ct}var St=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function It(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||St.test(it))}function Kt(it,st){return st?st.source.indexOf("\\w")>-1&&It(it)?!0:st.test(it):It(it)}function xt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var Me=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function De(it){return it.charCodeAt(0)>=768&&Me.test(it)}function le(it,st,ct){for(;(ct<0?st>0:st<it.length)&&De(it.charAt(st));)st+=ct;return st}function ee(it,st,ct){for(var dt=st>ct?-1:1;;){if(st==ct)return st;var pt=(st+ct)/2,Et=dt<0?Math.ceil(pt):Math.floor(pt);if(Et==st)return it(Et)?st:ct;it(Et)?ct=Et:st=Et+dt}}function Se(it,st,ct,dt){if(!it)return dt(st,ct,"ltr",0);for(var pt=!1,Et=0;Et<it.length;++Et){var Ft=it[Et];(Ft.from<ct&&Ft.to>st||st==ct&&Ft.to==st)&&(dt(Math.max(Ft.from,st),Math.min(Ft.to,ct),Ft.level==1?"rtl":"ltr",Et),pt=!0)}pt||dt(st,ct,"ltr")}var xe=null;function ue(it,st,ct){var dt;xe=null;for(var pt=0;pt<it.length;++pt){var Et=it[pt];if(Et.from<st&&Et.to>st)return pt;Et.to==st&&(Et.from!=Et.to&&ct=="before"?dt=pt:xe=pt),Et.from==st&&(Et.from!=Et.to&&ct!="before"?dt=pt:xe=pt)}return dt!=null?dt:xe}var Te=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(re){return re<=247?it.charAt(re):1424<=re&&re<=1524?"R":1536<=re&&re<=1785?st.charAt(re-1536):1774<=re&&re<=2220?"r":8192<=re&&re<=8203?"w":re==8204?"b":"L"}var dt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,Et=/[LRr]/,Ft=/[Lb1n]/,Wt=/[1n]/;function zt(re,ze,ge){this.level=re,this.from=ze,this.to=ge}return function(re,ze){var ge=ze=="ltr"?"L":"R";if(re.length==0||ze=="ltr"&&!dt.test(re))return!1;for(var yn=re.length,an=[],Qn=0;Qn<yn;++Qn)an.push(ct(re.charCodeAt(Qn)));for(var li=0,yi=ge;li<yn;++li){var ji=an[li];ji=="m"?an[li]=yi:yi=ji}for(var co=0,eo=ge;co<yn;++co){var Eo=an[co];Eo=="1"&&eo=="r"?an[co]="n":Et.test(Eo)&&(eo=Eo,Eo=="r"&&(an[co]="R"))}for(var ar=1,_i=an[0];ar<yn-1;++ar){var Mr=an[ar];Mr=="+"&&_i=="1"&&an[ar+1]=="1"?an[ar]="1":Mr==","&&_i==an[ar+1]&&(_i=="1"||_i=="n")&&(an[ar]=_i),_i=Mr}for(var _s=0;_s<yn;++_s){var za=an[_s];if(za==",")an[_s]="N";else if(za=="%"){var oa=void 0;for(oa=_s+1;oa<yn&&an[oa]=="%";++oa);for(var Xl=_s&&an[_s-1]=="!"||oa<yn&&an[oa]=="1"?"1":"N",Pl=_s;Pl<oa;++Pl)an[Pl]=Xl;_s=oa-1}}for(var Ta=0,au=ge;Ta<yn;++Ta){var ll=an[Ta];au=="L"&&ll=="1"?an[Ta]="L":Et.test(ll)&&(au=ll)}for(var Ba=0;Ba<yn;++Ba)if(pt.test(an[Ba])){var as=void 0;for(as=Ba+1;as<yn&&pt.test(an[as]);++as);for(var da=(Ba?an[Ba-1]:ge)=="L",Ya=(as<yn?an[as]:ge)=="L",ul=da==Ya?da?"L":"R":ge,nh=Ba;nh<as;++nh)an[nh]=ul;Ba=as-1}for(var ra=[],Hu,xa=0;xa<yn;)if(Ft.test(an[xa])){var Sf=xa;for(++xa;xa<yn&&Ft.test(an[xa]);++xa);ra.push(new zt(0,Sf,xa))}else{var Cu=xa,lu=ra.length,Ql=ze=="rtl"?1:0;for(++xa;xa<yn&&an[xa]!="L";++xa);for(var zs=Cu;zs<xa;)if(Wt.test(an[zs])){Cu<zs&&(ra.splice(lu,0,new zt(1,Cu,zs)),lu+=Ql);var Xa=zs;for(++zs;zs<xa&&Wt.test(an[zs]);++zs);ra.splice(lu,0,new zt(2,Xa,zs)),lu+=Ql,Cu=zs}else++zs;Cu<xa&&ra.splice(lu,0,new zt(1,Cu,xa))}return ze=="ltr"&&(ra[0].level==1&&(Hu=re.match(/^\s+/))&&(ra[0].from=Hu[0].length,ra.unshift(new zt(0,0,Hu[0].length))),Ce(ra).level==1&&(Hu=re.match(/\s+$/))&&(Ce(ra).to-=Hu[0].length,ra.push(new zt(0,yn-Hu[0].length,yn)))),ze=="rtl"?ra.reverse():ra}}();function vn(it,st){var ct=it.order;return ct==null&&(ct=it.order=Te(it.text,st)),ct}var fn=[],en=function(it,st,ct){if(it.addEventListener)it.addEventListener(st,ct,!1);else if(it.attachEvent)it.attachEvent("on"+st,ct);else{var dt=it._handlers||(it._handlers={});dt[st]=(dt[st]||fn).concat(ct)}};function xn(it,st){return it._handlers&&it._handlers[st]||fn}function ln(it,st,ct){if(it.removeEventListener)it.removeEventListener(st,ct,!1);else if(it.detachEvent)it.detachEvent("on"+st,ct);else{var dt=it._handlers,pt=dt&&dt[st];if(pt){var Et=_e(pt,ct);Et>-1&&(dt[st]=pt.slice(0,Et).concat(pt.slice(Et+1)))}}}function tn(it,st){var ct=xn(it,st);if(ct.length)for(var dt=Array.prototype.slice.call(arguments,2),pt=0;pt<ct.length;++pt)ct[pt].apply(null,dt)}function ii(it,st,ct){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),tn(it,ct||st.type,it,st),Xi(st)||st.codemirrorIgnore}function ri(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var ct=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),dt=0;dt<st.length;++dt)_e(ct,st[dt])==-1&&ct.push(st[dt])}function Un(it,st){return xn(it,st).length>0}function si(it){it.prototype.on=function(st,ct){en(this,st,ct)},it.prototype.off=function(st,ct){ln(this,st,ct)}}function mi(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Hi(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Xi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Lo(it){mi(it),Hi(it)}function Oo(it){return it.target||it.srcElement}function No(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),ht&&it.ctrlKey&&st==1&&(st=3),st}var Io=function(){if(ne&&ae<9)return!1;var it=Vt("div");return"draggable"in it||"dragDrop"in it}(),_o;function qo(it){if(_o==null){var st=Vt("span","\u200B");se(it,Vt("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(_o=st.offsetWidth<=1&&st.offsetHeight>2&&!(ne&&ae<8))}var ct=_o?Vt("span","\u200B"):Vt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var Ni;function $o(it){if(Ni!=null)return Ni;var st=se(it,document.createTextNode("A\u062EA")),ct=Zt(st,0,1).getBoundingClientRect(),dt=Zt(st,1,2).getBoundingClientRect();return _t(it),!ct||ct.left==ct.right?!1:Ni=dt.right-ct.right<3}var Ro=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(it){for(var st=0,ct=[],dt=it.length;st<=dt;){var pt=it.indexOf(`
|
|
|
`,st);pt==-1&&(pt=it.length);var Et=it.slice(st,it.charAt(pt-1)=="\r"?pt-1:pt),Ft=Et.indexOf("\r");Ft!=-1?(ct.push(Et.slice(0,Ft)),st+=Ft+1):(ct.push(Et),st=pt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},Mt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(ct){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},cr=function(){var it=Vt("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),ir=null;function pr(it){if(ir!=null)return ir;var st=se(it,Vt("span","x")),ct=st.getBoundingClientRect(),dt=Zt(st,0,1).getBoundingClientRect();return ir=Math.abs(ct.left-dt.left)>1}var ts={},rs={};function ls(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),ts[it]=st}function Ci(it,st){rs[it]=st}function oi(it){if(typeof it=="string"&&rs.hasOwnProperty(it))it=rs[it];else if(it&&typeof it.name=="string"&&rs.hasOwnProperty(it.name)){var st=rs[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 oi("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return oi("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Ie(it,st){st=oi(st);var ct=ts[st.name];if(!ct)return Ie(it,"text/plain");var dt=ct(it,st);if(Le.hasOwnProperty(st.name)){var pt=Le[st.name];for(var Et in pt)pt.hasOwnProperty(Et)&&(dt.hasOwnProperty(Et)&&(dt["_"+Et]=dt[Et]),dt[Et]=pt[Et])}if(dt.name=st.name,st.helperType&&(dt.helperType=st.helperType),st.modeProps)for(var Ft in st.modeProps)dt[Ft]=st.modeProps[Ft];return dt}var Le={};function Gt(it,st){var ct=Le.hasOwnProperty(it)?Le[it]:Le[it]={};Mn(st,ct)}function We(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var ct={};for(var dt in st){var pt=st[dt];pt instanceof Array&&(pt=pt.concat([])),ct[dt]=pt}return ct}function Ye(it,st){for(var ct;it.innerMode&&(ct=it.innerMode(st),!(!ct||ct.mode==it));)st=ct.state,it=ct.mode;return ct||{mode:it,state:st}}function ce(it,st,ct){return it.startState?it.startState(st,ct):!0}var qt=function(it,st,ct){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ct};qt.prototype.eol=function(){return this.pos>=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qt.prototype.eat=function(it){var st=this.string.charAt(this.pos),ct;if(typeof it=="string"?ct=st==it:ct=st&&(it.test?it.test(st):it(st)),ct)return++this.pos,st},qt.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},qt.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},qt.prototype.backUp=function(it){this.pos-=it},qt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=we(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},qt.prototype.indentation=function(){return we(this.string,null,this.tabSize)-(this.lineStart?we(this.string,this.lineStart,this.tabSize):0)},qt.prototype.match=function(it,st,ct){if(typeof it=="string"){var dt=function(Ft){return ct?Ft.toLowerCase():Ft},pt=this.string.substr(this.pos,it.length);if(dt(pt)==dt(it))return st!==!1&&(this.pos+=it.length),!0}else{var Et=this.string.slice(this.pos).match(it);return Et&&Et.index>0?null:(Et&&st!==!1&&(this.pos+=Et[0].length),Et)}},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},qt.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},qt.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function He(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 ct=it;!ct.lines;)for(var dt=0;;++dt){var pt=ct.children[dt],Et=pt.chunkSize();if(st<Et){ct=pt;break}st-=Et}return ct.lines[st]}function un(it,st,ct){var dt=[],pt=st.line;return it.iter(st.line,ct.line+1,function(Et){var Ft=Et.text;pt==ct.line&&(Ft=Ft.slice(0,ct.ch)),pt==st.line&&(Ft=Ft.slice(st.ch)),dt.push(Ft),++pt}),dt}function An(it,st,ct){var dt=[];return it.iter(st,ct,function(pt){dt.push(pt.text)}),dt}function Fn(it,st){var ct=st-it.height;if(ct)for(var dt=it;dt;dt=dt.parent)dt.height+=ct}function oe(it){if(it.parent==null)return null;for(var st=it.parent,ct=_e(st.lines,it),dt=st.parent;dt;st=dt,dt=dt.parent)for(var pt=0;dt.children[pt]!=st;++pt)ct+=dt.children[pt].chunkSize();return ct+st.first}function qe(it,st){var ct=it.first;t:do{for(var dt=0;dt<it.children.length;++dt){var pt=it.children[dt],Et=pt.height;if(st<Et){it=pt;continue t}st-=Et,ct+=pt.chunkSize()}return ct}while(!it.lines);for(var Ft=0;Ft<it.lines.length;++Ft){var Wt=it.lines[Ft],zt=Wt.height;if(st<zt)break;st-=zt}return ct+Ft}function bn(it,st){return st>=it.first&&st<it.first+it.size}function Jn(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function Ke(it,st,ct){if(ct===void 0&&(ct=null),!(this instanceof Ke))return new Ke(it,st,ct);this.line=it,this.ch=st,this.sticky=ct}function Qe(it,st){return it.line-st.line||it.ch-st.ch}function zn(it,st){return it.sticky==st.sticky&&Qe(it,st)==0}function Wn(it){return Ke(it.line,it.ch)}function fi(it,st){return Qe(it,st)<0?st:it}function Hn(it,st){return Qe(it,st)<0?it:st}function _n(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function Vn(it,st){if(st.line<it.first)return Ke(it.first,0);var ct=it.first+it.size-1;return st.line>ct?Ke(ct,He(it,ct).text.length):wi(st,He(it,st.line).text.length)}function wi(it,st){var ct=it.ch;return ct==null||ct>st?Ke(it.line,st):ct<0?Ke(it.line,0):it}function Qi(it,st){for(var ct=[],dt=0;dt<st.length;dt++)ct[dt]=Vn(it,st[dt]);return ct}var qi=function(it,st){this.state=it,this.lookAhead=st},$e=function(it,st,ct,dt){this.state=st,this.doc=it,this.line=ct,this.maxLookAhead=dt||0,this.baseTokens=null,this.baseTokenPos=1};$e.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},$e.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}},$e.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},$e.fromSaved=function(it,st,ct){return st instanceof qi?new $e(it,We(it.mode,st.state),ct,st.lookAhead):new $e(it,We(it.mode,st),ct)},$e.prototype.save=function(it){var st=it!==!1?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new qi(st,this.maxLookAhead):st};function lo(it,st,ct,dt){var pt=[it.state.modeGen],Et={};Ui(it,st.text,it.doc.mode,ct,function(re,ze){return pt.push(re,ze)},Et,dt);for(var Ft=ct.state,Wt=function(re){ct.baseTokens=pt;var ze=it.state.overlays[re],ge=1,yn=0;ct.state=!0,Ui(it,st.text,ze.mode,ct,function(an,Qn){for(var li=ge;yn<an;){var yi=pt[ge];yi>an&&pt.splice(ge,1,an,pt[ge+1],yi),ge+=2,yn=Math.min(an,yi)}if(Qn)if(ze.opaque)pt.splice(li,ge-li,an,"overlay "+Qn),ge=li+2;else for(;li<ge;li+=2){var ji=pt[li+1];pt[li+1]=(ji?ji+" ":"")+"overlay "+Qn}},Et),ct.state=Ft,ct.baseTokens=null,ct.baseTokenPos=1},zt=0;zt<it.state.overlays.length;++zt)Wt(zt);return{styles:pt,classes:Et.bgClass||Et.textClass?Et:null}}function Co(it,st,ct){if(!st.styles||st.styles[0]!=it.state.modeGen){var dt=jo(it,oe(st)),pt=st.text.length>it.options.maxHighlightLength&&We(it.doc.mode,dt.state),Et=lo(it,st,dt);pt&&(dt.state=pt),st.stateAfter=dt.save(!pt),st.styles=Et.styles,Et.classes?st.styleClasses=Et.classes:st.styleClasses&&(st.styleClasses=null),ct===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function jo(it,st,ct){var dt=it.doc,pt=it.display;if(!dt.mode.startState)return new $e(dt,!0,st);var Et=ki(it,st,ct),Ft=Et>dt.first&&He(dt,Et-1).stateAfter,Wt=Ft?$e.fromSaved(dt,Ft,Et):new $e(dt,ce(dt.mode),Et);return dt.iter(Et,st,function(zt){Ue(it,zt.text,Wt);var re=Wt.line;zt.stateAfter=re==st-1||re%5==0||re>=pt.viewFrom&&re<pt.viewTo?Wt.save():null,Wt.nextLine()}),ct&&(dt.modeFrontier=Wt.line),Wt}function Ue(it,st,ct,dt){var pt=it.doc.mode,Et=new qt(st,it.options.tabSize,ct);for(Et.start=Et.pos=dt||0,st==""&&jn(pt,ct.state);!Et.eol();)qn(pt,Et,ct.state),Et.start=Et.pos}function jn(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ct=Ye(it,st);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function qn(it,st,ct,dt){for(var pt=0;pt<10;pt++){dt&&(dt[0]=Ye(it,ct).mode);var Et=it.token(st,ct);if(st.pos>st.start)return Et}throw new Error("Mode "+it.name+" failed to advance stream.")}var Mi=function(it,st,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ct};function vi(it,st,ct,dt){var pt=it.doc,Et=pt.mode,Ft;st=Vn(pt,st);var Wt=He(pt,st.line),zt=jo(it,st.line,ct),re=new qt(Wt.text,it.options.tabSize,zt),ze;for(dt&&(ze=[]);(dt||re.pos<st.ch)&&!re.eol();)re.start=re.pos,Ft=qn(Et,re,zt.state),dt&&ze.push(new Mi(re,Ft,We(pt.mode,zt.state)));return dt?ze:new Mi(re,Ft,zt.state)}function pi(it,st){if(it)for(;;){var ct=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ct)break;it=it.slice(0,ct.index)+it.slice(ct.index+ct[0].length);var dt=ct[1]?"bgClass":"textClass";st[dt]==null?st[dt]=ct[2]:new RegExp("(?:^|\\s)"+ct[2]+"(?:$|\\s)").test(st[dt])||(st[dt]+=" "+ct[2])}return it}function Ui(it,st,ct,dt,pt,Et,Ft){var Wt=ct.flattenSpans;Wt==null&&(Wt=it.options.flattenSpans);var zt=0,re=null,ze=new qt(st,it.options.tabSize,dt),ge,yn=it.options.addModeClass&&[null];for(st==""&&pi(jn(ct,dt.state),Et);!ze.eol();){if(ze.pos>it.options.maxHighlightLength?(Wt=!1,Ft&&Ue(it,st,dt,ze.pos),ze.pos=st.length,ge=null):ge=pi(qn(ct,ze,dt.state,yn),Et),yn){var an=yn[0].name;an&&(ge="m-"+(ge?an+" "+ge:an))}if(!Wt||re!=ge){for(;zt<ze.start;)zt=Math.min(ze.start,zt+5e3),pt(zt,re);re=ge}ze.start=ze.pos}for(;zt<ze.pos;){var Qn=Math.min(ze.pos,zt+5e3);pt(Qn,re),zt=Qn}}function ki(it,st,ct){for(var dt,pt,Et=it.doc,Ft=ct?-1:st-(it.doc.mode.innerMode?1e3:100),Wt=st;Wt>Ft;--Wt){if(Wt<=Et.first)return Et.first;var zt=He(Et,Wt-1),re=zt.stateAfter;if(re&&(!ct||Wt+(re instanceof qi?re.lookAhead:0)<=Et.modeFrontier))return Wt;var ze=we(zt.text,null,it.options.tabSize);(pt==null||dt>ze)&&(pt=Wt-1,dt=ze)}return pt}function zi(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var ct=it.first,dt=st-1;dt>ct;dt--){var pt=He(it,dt).stateAfter;if(pt&&(!(pt instanceof qi)||dt+pt.lookAhead<st)){ct=dt+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ct)}}var uo=!1,cn=!1;function Xo(){uo=!0}function sn(){cn=!0}function ho(it,st,ct){this.marker=it,this.from=st,this.to=ct}function Er(it,st){if(it)for(var ct=0;ct<it.length;++ct){var dt=it[ct];if(dt.marker==st)return dt}}function zo(it,st){for(var ct,dt=0;dt<it.length;++dt)it[dt]!=st&&(ct||(ct=[])).push(it[dt]);return ct}function Fr(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function mr(it,st,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var Et=it[pt],Ft=Et.marker,Wt=Et.from==null||(Ft.inclusiveLeft?Et.from<=st:Et.from<st);if(Wt||Et.from==st&&Ft.type=="bookmark"&&(!ct||!Et.marker.insertLeft)){var zt=Et.to==null||(Ft.inclusiveRight?Et.to>=st:Et.to>st);(dt||(dt=[])).push(new ho(Ft,Et.from,zt?null:Et.to))}}return dt}function Di(it,st,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var Et=it[pt],Ft=Et.marker,Wt=Et.to==null||(Ft.inclusiveRight?Et.to>=st:Et.to>st);if(Wt||Et.from==st&&Ft.type=="bookmark"&&(!ct||Et.marker.insertLeft)){var zt=Et.from==null||(Ft.inclusiveLeft?Et.from<=st:Et.from<st);(dt||(dt=[])).push(new ho(Ft,zt?null:Et.from-st,Et.to==null?null:Et.to-st))}}return dt}function Li(it,st){if(st.full)return null;var ct=bn(it,st.from.line)&&He(it,st.from.line).markedSpans,dt=bn(it,st.to.line)&&He(it,st.to.line).markedSpans;if(!ct&&!dt)return null;var pt=st.from.ch,Et=st.to.ch,Ft=Qe(st.from,st.to)==0,Wt=mr(ct,pt,Ft),zt=Di(dt,Et,Ft),re=st.text.length==1,ze=Ce(st.text).length+(re?pt:0);if(Wt)for(var ge=0;ge<Wt.length;++ge){var yn=Wt[ge];if(yn.to==null){var an=Er(zt,yn.marker);an?re&&(yn.to=an.to==null?null:an.to+ze):yn.to=pt}}if(zt)for(var Qn=0;Qn<zt.length;++Qn){var li=zt[Qn];if(li.to!=null&&(li.to+=ze),li.from==null){var yi=Er(Wt,li.marker);yi||(li.from=ze,re&&(Wt||(Wt=[])).push(li))}else li.from+=ze,re&&(Wt||(Wt=[])).push(li)}Wt&&(Wt=yo(Wt)),zt&&zt!=Wt&&(zt=yo(zt));var ji=[Wt];if(!re){var co=st.text.length-2,eo;if(co>0&&Wt)for(var Eo=0;Eo<Wt.length;++Eo)Wt[Eo].to==null&&(eo||(eo=[])).push(new ho(Wt[Eo].marker,null,null));for(var ar=0;ar<co;++ar)ji.push(eo);ji.push(zt)}return ji}function yo(it){for(var st=0;st<it.length;++st){var ct=it[st];ct.from!=null&&ct.from==ct.to&&ct.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function bo(it,st,ct){var dt=null;if(it.iter(st.line,ct.line+1,function(an){if(an.markedSpans)for(var Qn=0;Qn<an.markedSpans.length;++Qn){var li=an.markedSpans[Qn].marker;li.readOnly&&(!dt||_e(dt,li)==-1)&&(dt||(dt=[])).push(li)}}),!dt)return null;for(var pt=[{from:st,to:ct}],Et=0;Et<dt.length;++Et)for(var Ft=dt[Et],Wt=Ft.find(0),zt=0;zt<pt.length;++zt){var re=pt[zt];if(!(Qe(re.to,Wt.from)<0||Qe(re.from,Wt.to)>0)){var ze=[zt,1],ge=Qe(re.from,Wt.from),yn=Qe(re.to,Wt.to);(ge<0||!Ft.inclusiveLeft&&!ge)&&ze.push({from:re.from,to:Wt.from}),(yn>0||!Ft.inclusiveRight&&!yn)&&ze.push({from:Wt.to,to:re.to}),pt.splice.apply(pt,ze),zt+=ze.length-3}}return pt}function Xn(it){var st=it.markedSpans;if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.detachLine(it);it.markedSpans=null}}function Rt(it,st){if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.attachLine(it);it.markedSpans=st}}function Qo(it){return it.inclusiveLeft?-1:0}function xr(it){return it.inclusiveRight?1:0}function es(it,st){var ct=it.lines.length-st.lines.length;if(ct!=0)return ct;var dt=it.find(),pt=st.find(),Et=Qe(dt.from,pt.from)||Qo(it)-Qo(st);if(Et)return-Et;var Ft=Qe(dt.to,pt.to)||xr(it)-xr(st);return Ft||st.id-it.id}function cs(it,st){var ct=cn&&it.markedSpans,dt;if(ct)for(var pt=void 0,Et=0;Et<ct.length;++Et)pt=ct[Et],pt.marker.collapsed&&(st?pt.from:pt.to)==null&&(!dt||es(dt,pt.marker)<0)&&(dt=pt.marker);return dt}function us(it){return cs(it,!0)}function no(it){return cs(it,!1)}function $i(it,st){var ct=cn&&it.markedSpans,dt;if(ct)for(var pt=0;pt<ct.length;++pt){var Et=ct[pt];Et.marker.collapsed&&(Et.from==null||Et.from<st)&&(Et.to==null||Et.to>st)&&(!dt||es(dt,Et.marker)<0)&&(dt=Et.marker)}return dt}function Ko(it,st,ct,dt,pt){var Et=He(it,st),Ft=cn&&Et.markedSpans;if(Ft)for(var Wt=0;Wt<Ft.length;++Wt){var zt=Ft[Wt];if(zt.marker.collapsed){var re=zt.marker.find(0),ze=Qe(re.from,ct)||Qo(zt.marker)-Qo(pt),ge=Qe(re.to,dt)||xr(zt.marker)-xr(pt);if(!(ze>=0&&ge<=0||ze<=0&&ge>=0)&&(ze<=0&&(zt.marker.inclusiveRight&&pt.inclusiveLeft?Qe(re.to,ct)>=0:Qe(re.to,ct)>0)||ze>=0&&(zt.marker.inclusiveRight&&pt.inclusiveLeft?Qe(re.from,dt)<=0:Qe(re.from,dt)<0)))return!0}}}function ro(it){for(var st;st=us(it);)it=st.find(-1,!0).line;return it}function lr(it){for(var st;st=no(it);)it=st.find(1,!0).line;return it}function ms(it){for(var st,ct;st=no(it);)it=st.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function Ji(it,st){var ct=He(it,st),dt=ro(ct);return ct==dt?st:oe(dt)}function Ti(it,st){if(st>it.lastLine())return st;var ct=He(it,st),dt;if(!kn(it,ct))return st;for(;dt=no(ct);)ct=dt.find(1,!0).line;return oe(ct)+1}function kn(it,st){var ct=cn&&st.markedSpans;if(ct){for(var dt=void 0,pt=0;pt<ct.length;++pt)if(dt=ct[pt],!!dt.marker.collapsed){if(dt.from==null)return!0;if(!dt.marker.widgetNode&&dt.from==0&&dt.marker.inclusiveLeft&&Ki(it,st,dt))return!0}}}function Ki(it,st,ct){if(ct.to==null){var dt=ct.marker.find(1,!0);return Ki(it,dt.line,Er(dt.line.markedSpans,ct.marker))}if(ct.marker.inclusiveRight&&ct.to==st.text.length)return!0;for(var pt=void 0,Et=0;Et<st.markedSpans.length;++Et)if(pt=st.markedSpans[Et],pt.marker.collapsed&&!pt.marker.widgetNode&&pt.from==ct.to&&(pt.to==null||pt.to!=ct.from)&&(pt.marker.inclusiveLeft||ct.marker.inclusiveRight)&&Ki(it,st,pt))return!0}function Jo(it){it=ro(it);for(var st=0,ct=it.parent,dt=0;dt<ct.lines.length;++dt){var pt=ct.lines[dt];if(pt==it)break;st+=pt.height}for(var Et=ct.parent;Et;ct=Et,Et=ct.parent)for(var Ft=0;Ft<Et.children.length;++Ft){var Wt=Et.children[Ft];if(Wt==ct)break;st+=Wt.height}return st}function jr(it){if(it.height==0)return 0;for(var st=it.text.length,ct,dt=it;ct=us(dt);){var pt=ct.find(0,!0);dt=pt.from.line,st+=pt.from.ch-pt.to.ch}for(dt=it;ct=no(dt);){var Et=ct.find(0,!0);st-=dt.text.length-Et.from.ch,dt=Et.to.line,st+=dt.text.length-Et.to.ch}return st}function Ir(it){var st=it.display,ct=it.doc;st.maxLine=He(ct,ct.first),st.maxLineLength=jr(st.maxLine),st.maxLineChanged=!0,ct.iter(function(dt){var pt=jr(dt);pt>st.maxLineLength&&(st.maxLineLength=pt,st.maxLine=dt)})}var Ur=function(it,st,ct){this.text=it,Rt(this,st),this.height=ct?ct(this):1};Ur.prototype.lineNo=function(){return oe(this)},si(Ur);function hs(it,st,ct,dt){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Xn(it),Rt(it,ct);var pt=dt?dt(it):1;pt!=it.height&&Fn(it,pt)}function ns(it){it.parent=null,Xn(it)}var sa={},Ys={};function ga(it,st){if(!it||/^\s*$/.test(it))return null;var ct=st.addModeClass?Ys:sa;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function Ze(it,st){var ct=he("span",null,null,Tt?"padding-right: .1px":null),dt={pre:he("pre",[ct],"CodeMirror-line"),content:ct,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var pt=0;pt<=(st.rest?st.rest.length:0);pt++){var Et=pt?st.rest[pt-1]:st.line,Ft=void 0;dt.pos=0,dt.addToken=mu,$o(it.display.measure)&&(Ft=vn(Et,it.doc.direction))&&(dt.addToken=gl(dt.addToken,Ft)),dt.map=[];var Wt=st!=it.display.externalMeasured&&oe(Et);pl(Et,dt,Co(it,Et,Wt)),Et.styleClasses&&(Et.styleClasses.bgClass&&(dt.bgClass=Xe(Et.styleClasses.bgClass,dt.bgClass||"")),Et.styleClasses.textClass&&(dt.textClass=Xe(Et.styleClasses.textClass,dt.textClass||""))),dt.map.length==0&&dt.map.push(0,0,dt.content.appendChild(qo(it.display.measure))),pt==0?(st.measure.map=dt.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(dt.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(Tt){var zt=dt.content.lastChild;(/\bcm-tab\b/.test(zt.className)||zt.querySelector&&zt.querySelector(".cm-tab"))&&(dt.content.className="cm-tab-wrap-hack")}return tn(it,"renderLine",it,st.line,dt.pre),dt.pre.className&&(dt.textClass=Xe(dt.pre.className,dt.textClass||"")),dt}function vs(it){var st=Vt("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function mu(it,st,ct,dt,pt,Et,Ft){if(st){var Wt=it.splitSpaces?Ka(st,it.trailingSpace):st,zt=it.cm.state.specialChars,re=!1,ze;if(!zt.test(st))it.col+=st.length,ze=document.createTextNode(Wt),it.map.push(it.pos,it.pos+st.length,ze),ne&&ae<9&&(re=!0),it.pos+=st.length;else{ze=document.createDocumentFragment();for(var ge=0;;){zt.lastIndex=ge;var yn=zt.exec(st),an=yn?yn.index-ge:st.length-ge;if(an){var Qn=document.createTextNode(Wt.slice(ge,ge+an));ne&&ae<9?ze.appendChild(Vt("span",[Qn])):ze.appendChild(Qn),it.map.push(it.pos,it.pos+an,Qn),it.col+=an,it.pos+=an}if(!yn)break;ge+=an+1;var li=void 0;if(yn[0]==" "){var yi=it.cm.options.tabSize,ji=yi-it.col%yi;li=ze.appendChild(Vt("span",ui(ji),"cm-tab")),li.setAttribute("role","presentation"),li.setAttribute("cm-text"," "),it.col+=ji}else yn[0]=="\r"||yn[0]==`
|
|
|
`?(li=ze.appendChild(Vt("span",yn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),li.setAttribute("cm-text",yn[0]),it.col+=1):(li=it.cm.options.specialCharPlaceholder(yn[0]),li.setAttribute("cm-text",yn[0]),ne&&ae<9?ze.appendChild(Vt("span",[li])):ze.appendChild(li),it.col+=1);it.map.push(it.pos,it.pos+1,li),it.pos++}}if(it.trailingSpace=Wt.charCodeAt(st.length-1)==32,ct||dt||pt||re||Et||Ft){var co=ct||"";dt&&(co+=dt),pt&&(co+=pt);var eo=Vt("span",[ze],co,Et);if(Ft)for(var Eo in Ft)Ft.hasOwnProperty(Eo)&&Eo!="style"&&Eo!="class"&&eo.setAttribute(Eo,Ft[Eo]);return it.content.appendChild(eo)}it.content.appendChild(ze)}}function Ka(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ct=st,dt="",pt=0;pt<it.length;pt++){var Et=it.charAt(pt);Et==" "&&ct&&(pt==it.length-1||it.charCodeAt(pt+1)==32)&&(Et="\xA0"),dt+=Et,ct=Et==" "}return dt}function gl(it,st){return function(ct,dt,pt,Et,Ft,Wt,zt){pt=pt?pt+" cm-force-border":"cm-force-border";for(var re=ct.pos,ze=re+dt.length;;){for(var ge=void 0,yn=0;yn<st.length&&(ge=st[yn],!(ge.to>re&&ge.from<=re));yn++);if(ge.to>=ze)return it(ct,dt,pt,Et,Ft,Wt,zt);it(ct,dt.slice(0,ge.to-re),pt,Et,null,Wt,zt),Et=null,dt=dt.slice(ge.to-re),re=ge.to}}}function Xr(it,st,ct,dt){var pt=!dt&&ct.widgetNode;pt&&it.map.push(it.pos,it.pos+st,pt),!dt&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",ct.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=st,it.trailingSpace=!1}function pl(it,st,ct){var dt=it.markedSpans,pt=it.text,Et=0;if(!dt){for(var Ft=1;Ft<ct.length;Ft+=2)st.addToken(st,pt.slice(Et,Et=ct[Ft]),ga(ct[Ft+1],st.cm.options));return}for(var Wt=pt.length,zt=0,re=1,ze="",ge,yn,an=0,Qn,li,yi,ji,co;;){if(an==zt){Qn=li=yi=yn="",co=null,ji=null,an=1/0;for(var eo=[],Eo=void 0,ar=0;ar<dt.length;++ar){var _i=dt[ar],Mr=_i.marker;if(Mr.type=="bookmark"&&_i.from==zt&&Mr.widgetNode)eo.push(Mr);else if(_i.from<=zt&&(_i.to==null||_i.to>zt||Mr.collapsed&&_i.to==zt&&_i.from==zt)){if(_i.to!=null&&_i.to!=zt&&an>_i.to&&(an=_i.to,li=""),Mr.className&&(Qn+=" "+Mr.className),Mr.css&&(yn=(yn?yn+";":"")+Mr.css),Mr.startStyle&&_i.from==zt&&(yi+=" "+Mr.startStyle),Mr.endStyle&&_i.to==an&&(Eo||(Eo=[])).push(Mr.endStyle,_i.to),Mr.title&&((co||(co={})).title=Mr.title),Mr.attributes)for(var _s in Mr.attributes)(co||(co={}))[_s]=Mr.attributes[_s];Mr.collapsed&&(!ji||es(ji.marker,Mr)<0)&&(ji=_i)}else _i.from>zt&&an>_i.from&&(an=_i.from)}if(Eo)for(var za=0;za<Eo.length;za+=2)Eo[za+1]==an&&(li+=" "+Eo[za]);if(!ji||ji.from==zt)for(var oa=0;oa<eo.length;++oa)Xr(st,0,eo[oa]);if(ji&&(ji.from||0)==zt){if(Xr(st,(ji.to==null?Wt+1:ji.to)-zt,ji.marker,ji.from==null),ji.to==null)return;ji.to==zt&&(ji=!1)}}if(zt>=Wt)break;for(var Xl=Math.min(Wt,an);;){if(ze){var Pl=zt+ze.length;if(!ji){var Ta=Pl>Xl?ze.slice(0,Xl-zt):ze;st.addToken(st,Ta,ge?ge+Qn:Qn,yi,zt+Ta.length==an?li:"",yn,co)}if(Pl>=Xl){ze=ze.slice(Xl-zt),zt=Xl;break}zt=Pl,yi=""}ze=pt.slice(Et,Et=ct[re++]),ge=ga(ct[re++],st.cm.options)}}}function Tu(it,st,ct){this.line=st,this.rest=ms(st),this.size=this.rest?oe(Ce(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=kn(it,st)}function Hr(it,st,ct){for(var dt=[],pt,Et=st;Et<ct;Et=pt){var Ft=new Tu(it.doc,He(it.doc,Et),Et);pt=Et+Ft.size,dt.push(Ft)}return dt}var As=null;function kl(it){As?As.ops.push(it):it.ownsGroup=As={ops:[it],delayedCallbacks:[]}}function so(it){var st=it.delayedCallbacks,ct=0;do{for(;ct<st.length;ct++)st[ct].call(null);for(var dt=0;dt<it.ops.length;dt++){var pt=it.ops[dt];if(pt.cursorActivityHandlers)for(;pt.cursorActivityCalled<pt.cursorActivityHandlers.length;)pt.cursorActivityHandlers[pt.cursorActivityCalled++].call(null,pt.cm)}}while(ct<st.length)}function hr(it,st){var ct=it.ownsGroup;if(ct)try{so(ct)}finally{As=null,st(ct)}}var Zo=null;function hi(it,st){var ct=xn(it,st);if(ct.length){var dt=Array.prototype.slice.call(arguments,2),pt;As?pt=As.delayedCallbacks:Zo?pt=Zo:(pt=Zo=[],setTimeout(Ns,0));for(var Et=function(Wt){pt.push(function(){return ct[Wt].apply(null,dt)})},Ft=0;Ft<ct.length;++Ft)Et(Ft)}}function Ns(){var it=Zo;Zo=null;for(var st=0;st<it.length;++st)it[st]()}function is(it,st,ct,dt){for(var pt=0;pt<st.changes.length;pt++){var Et=st.changes[pt];Et=="text"?ti(it,st):Et=="gutter"?Is(it,st,ct,dt):Et=="class"?Vr(it,st):Et=="widget"&&ba(it,st,dt)}st.changes=null}function Js(it){return it.node==it.text&&(it.node=Vt("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),ne&&ae<8&&(it.node.style.zIndex=2)),it.node}function ol(it,st){var ct=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(ct&&(ct+=" CodeMirror-linebackground"),st.background)ct?st.background.className=ct:(st.background.parentNode.removeChild(st.background),st.background=null);else if(ct){var dt=Js(st);st.background=dt.insertBefore(Vt("div",null,ct),dt.firstChild),it.display.input.setUneditable(st.background)}}function ml(it,st){var ct=it.display.externalMeasured;return ct&&ct.line==st.line?(it.display.externalMeasured=null,st.measure=ct.measure,ct.built):Ze(it,st)}function ti(it,st){var ct=st.text.className,dt=ml(it,st);st.text==st.node&&(st.node=dt.pre),st.text.parentNode.replaceChild(dt.pre,st.text),st.text=dt.pre,dt.bgClass!=st.bgClass||dt.textClass!=st.textClass?(st.bgClass=dt.bgClass,st.textClass=dt.textClass,Vr(it,st)):ct&&(st.text.className=ct)}function Vr(it,st){ol(it,st),st.line.wrapClass?Js(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var ct=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=ct||""}function Is(it,st,ct,dt){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var pt=Js(st);st.gutterBackground=Vt("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px; width: "+dt.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),pt.insertBefore(st.gutterBackground,st.text)}var Et=st.line.gutterMarkers;if(it.options.lineNumbers||Et){var Ft=Js(st),Wt=st.gutter=Vt("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px");if(it.display.input.setUneditable(Wt),Ft.insertBefore(Wt,st.text),st.line.gutterClass&&(Wt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Et||!Et["CodeMirror-linenumbers"])&&(st.lineNumber=Wt.appendChild(Vt("div",Jn(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Et)for(var zt=0;zt<it.display.gutterSpecs.length;++zt){var re=it.display.gutterSpecs[zt].className,ze=Et.hasOwnProperty(re)&&Et[re];ze&&Wt.appendChild(Vt("div",[ze],"CodeMirror-gutter-elt","left: "+dt.gutterLeft[re]+"px; width: "+dt.gutterWidth[re]+"px"))}}}function ba(it,st,ct){st.alignable&&(st.alignable=null);for(var dt=Bt("CodeMirror-linewidget"),pt=st.node.firstChild,Et=void 0;pt;pt=Et)Et=pt.nextSibling,dt.test(pt.className)&&st.node.removeChild(pt);vl(it,st,ct)}function Pa(it,st,ct,dt){var pt=ml(it,st);return st.text=st.node=pt.pre,pt.bgClass&&(st.bgClass=pt.bgClass),pt.textClass&&(st.textClass=pt.textClass),Vr(it,st),Is(it,st,ct,dt),vl(it,st,dt),st.node}function vl(it,st,ct){if(po(it,st.line,st,ct,!0),st.rest)for(var dt=0;dt<st.rest.length;dt++)po(it,st.rest[dt],st,ct,!1)}function po(it,st,ct,dt,pt){if(st.widgets)for(var Et=Js(ct),Ft=0,Wt=st.widgets;Ft<Wt.length;++Ft){var zt=Wt[Ft],re=Vt("div",[zt.node],"CodeMirror-linewidget"+(zt.className?" "+zt.className:""));zt.handleMouseEvents||re.setAttribute("cm-ignore-events","true"),Bu(zt,re,ct,dt),it.display.input.setUneditable(re),pt&&zt.above?Et.insertBefore(re,ct.gutter||ct.text):Et.appendChild(re),hi(zt,"redraw")}}function Bu(it,st,ct,dt){if(it.noHScroll){(ct.alignable||(ct.alignable=[])).push(st);var pt=dt.wrapperWidth;st.style.left=dt.fixedPos+"px",it.coverGutter||(pt-=dt.gutterTotalWidth,st.style.paddingLeft=dt.gutterTotalWidth+"px"),st.style.width=pt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-dt.gutterTotalWidth+"px"))}function Ia(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!Oe(document.body,it.node)){var ct="position: relative;";it.coverGutter&&(ct+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ct+="width: "+st.display.wrapper.clientWidth+"px;"),se(st.display.measure,Vt("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function Da(it,st){for(var ct=Oo(st);ct!=it.wrapper;ct=ct.parentNode)if(!ct||ct.nodeType==1&&ct.getAttribute("cm-ignore-events")=="true"||ct.parentNode==it.sizer&&ct!=it.mover)return!0}function Ca(it){return it.lineSpace.offsetTop}function zl(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function vu(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=se(it.measure,Vt("pre","x","CodeMirror-line-like")),ct=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,dt={left:parseInt(ct.paddingLeft),right:parseInt(ct.paddingRight)};return!isNaN(dt.left)&&!isNaN(dt.right)&&(it.cachedPaddingH=dt),dt}function pa(it){return Zn-it.display.nativeBarWidth}function Oa(it){return it.display.scroller.clientWidth-pa(it)-it.display.barWidth}function Fu(it){return it.display.scroller.clientHeight-pa(it)-it.display.barHeight}function kh(it,st,ct){var dt=it.options.lineWrapping,pt=dt&&Oa(it);if(!st.measure.heights||dt&&st.measure.width!=pt){var Et=st.measure.heights=[];if(dt){st.measure.width=pt;for(var Ft=st.text.firstChild.getClientRects(),Wt=0;Wt<Ft.length-1;Wt++){var zt=Ft[Wt],re=Ft[Wt+1];Math.abs(zt.bottom-re.bottom)>2&&Et.push((zt.bottom+re.top)/2-ct.top)}}Et.push(ct.bottom-ct.top)}}function ch(it,st,ct){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var dt=0;dt<it.rest.length;dt++)if(it.rest[dt]==st)return{map:it.measure.maps[dt],cache:it.measure.caches[dt]};for(var pt=0;pt<it.rest.length;pt++)if(oe(it.rest[pt])>ct)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function qh(it,st){st=ro(st);var ct=oe(st),dt=it.display.externalMeasured=new Tu(it.doc,st,ct);dt.lineN=ct;var pt=dt.built=Ze(it,dt);return dt.text=pt.pre,se(it.display.lineMeasure,pt.pre),dt}function fh(it,st,ct,dt){return Za(it,tu(it,st),ct,dt)}function yu(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[Ua(it,st)];var ct=it.display.externalMeasured;if(ct&&st>=ct.lineN&&st<ct.lineN+ct.size)return ct}function tu(it,st){var ct=oe(st),dt=yu(it,ct);dt&&!dt.text?dt=null:dt&&dt.changes&&(is(it,dt,ct,Mc(it)),it.curOp.forceUpdate=!0),dt||(dt=qh(it,st));var pt=ch(dt,st,ct);return{line:st,view:dt,rect:null,map:pt.map,cache:pt.cache,before:pt.before,hasHeights:!1}}function Za(it,st,ct,dt,pt){st.before&&(ct=-1);var Et=ct+(dt||""),Ft;return st.cache.hasOwnProperty(Et)?Ft=st.cache[Et]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(kh(it,st.view,st.rect),st.hasHeights=!0),Ft=nn(it,st,ct,dt),Ft.bogus||(st.cache[Et]=Ft)),{left:Ft.left,right:Ft.right,top:pt?Ft.rtop:Ft.top,bottom:pt?Ft.rbottom:Ft.bottom}}var gh={left:0,right:0,top:0,bottom:0};function ph(it,st,ct){for(var dt,pt,Et,Ft,Wt,zt,re=0;re<it.length;re+=3)if(Wt=it[re],zt=it[re+1],st<Wt?(pt=0,Et=1,Ft="left"):st<zt?(pt=st-Wt,Et=pt+1):(re==it.length-3||st==zt&&it[re+3]>st)&&(Et=zt-Wt,pt=Et-1,st>=zt&&(Ft="right")),pt!=null){if(dt=it[re+2],Wt==zt&&ct==(dt.insertLeft?"left":"right")&&(Ft=ct),ct=="left"&&pt==0)for(;re&&it[re-2]==it[re-3]&&it[re-1].insertLeft;)dt=it[(re-=3)+2],Ft="left";if(ct=="right"&&pt==zt-Wt)for(;re<it.length-3&&it[re+3]==it[re+4]&&!it[re+5].insertLeft;)dt=it[(re+=3)+2],Ft="right";break}return{node:dt,start:pt,end:Et,collapse:Ft,coverStart:Wt,coverEnd:zt}}function Iu(it,st){var ct=gh;if(st=="left")for(var dt=0;dt<it.length&&(ct=it[dt]).left==ct.right;dt++);else for(var pt=it.length-1;pt>=0&&(ct=it[pt]).left==ct.right;pt--);return ct}function nn(it,st,ct,dt){var pt=ph(st.map,ct,dt),Et=pt.node,Ft=pt.start,Wt=pt.end,zt=pt.collapse,re;if(Et.nodeType==3){for(var ze=0;ze<4;ze++){for(;Ft&&De(st.line.text.charAt(pt.coverStart+Ft));)--Ft;for(;pt.coverStart+Wt<pt.coverEnd&&De(st.line.text.charAt(pt.coverStart+Wt));)++Wt;if(ne&&ae<9&&Ft==0&&Wt==pt.coverEnd-pt.coverStart?re=Et.parentNode.getBoundingClientRect():re=Iu(Zt(Et,Ft,Wt).getClientRects(),dt),re.left||re.right||Ft==0)break;Wt=Ft,Ft=Ft-1,zt="right"}ne&&ae<11&&(re=Si(it.display.measure,re))}else{Ft>0&&(zt=dt="right");var ge;it.options.lineWrapping&&(ge=Et.getClientRects()).length>1?re=ge[dt=="right"?ge.length-1:0]:re=Et.getBoundingClientRect()}if(ne&&ae<9&&!Ft&&(!re||!re.left&&!re.right)){var yn=Et.parentNode.getClientRects()[0];yn?re={left:yn.left,right:yn.left+mh(it.display),top:yn.top,bottom:yn.bottom}:re=gh}for(var an=re.top-st.rect.top,Qn=re.bottom-st.rect.top,li=(an+Qn)/2,yi=st.view.measure.heights,ji=0;ji<yi.length-1&&!(li<yi[ji]);ji++);var co=ji?yi[ji-1]:0,eo=yi[ji],Eo={left:(zt=="right"?re.right:re.left)-st.rect.left,right:(zt=="left"?re.left:re.right)-st.rect.left,top:co,bottom:eo};return!re.left&&!re.right&&(Eo.bogus=!0),it.options.singleCursorHeightPerLine||(Eo.rtop=an,Eo.rbottom=Qn),Eo}function Si(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!pr(it))return st;var ct=screen.logicalXDPI/screen.deviceXDPI,dt=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*ct,right:st.right*ct,top:st.top*dt,bottom:st.bottom*dt}}function mo(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function So(it){it.display.externalMeasure=null,_t(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)mo(it.display.view[st])}function Ho(it){So(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function ao(){return ye&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function dr(){return ye&&et?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function wr(it){var st=0;if(it.widgets)for(var ct=0;ct<it.widgets.length;++ct)it.widgets[ct].above&&(st+=Ia(it.widgets[ct]));return st}function Lr(it,st,ct,dt,pt){if(!pt){var Et=wr(st);ct.top+=Et,ct.bottom+=Et}if(dt=="line")return ct;dt||(dt="local");var Ft=Jo(st);if(dt=="local"?Ft+=Ca(it.display):Ft-=it.display.viewOffset,dt=="page"||dt=="window"){var Wt=it.display.lineSpace.getBoundingClientRect();Ft+=Wt.top+(dt=="window"?0:dr());var zt=Wt.left+(dt=="window"?0:ao());ct.left+=zt,ct.right+=zt}return ct.top+=Ft,ct.bottom+=Ft,ct}function Ts(it,st,ct){if(ct=="div")return st;var dt=st.left,pt=st.top;if(ct=="page")dt-=ao(),pt-=dr();else if(ct=="local"||!ct){var Et=it.display.sizer.getBoundingClientRect();dt+=Et.left,pt+=Et.top}var Ft=it.display.lineSpace.getBoundingClientRect();return{left:dt-Ft.left,top:pt-Ft.top}}function Ws(it,st,ct,dt,pt){return dt||(dt=He(it.doc,st.line)),Lr(it,dt,fh(it,dt,st.ch,pt),ct)}function fs(it,st,ct,dt,pt,Et){dt=dt||He(it.doc,st.line),pt||(pt=tu(it,dt));function Ft(Qn,li){var yi=Za(it,pt,Qn,li?"right":"left",Et);return li?yi.left=yi.right:yi.right=yi.left,Lr(it,dt,yi,ct)}var Wt=vn(dt,it.doc.direction),zt=st.ch,re=st.sticky;if(zt>=dt.text.length?(zt=dt.text.length,re="before"):zt<=0&&(zt=0,re="after"),!Wt)return Ft(re=="before"?zt-1:zt,re=="before");function ze(Qn,li,yi){var ji=Wt[li],co=ji.level==1;return Ft(yi?Qn-1:Qn,co!=yi)}var ge=ue(Wt,zt,re),yn=xe,an=ze(zt,ge,re=="before");return yn!=null&&(an.other=ze(zt,yn,re!="before")),an}function Ah(it,st){var ct=0;st=Vn(it.doc,st),it.options.lineWrapping||(ct=mh(it.display)*st.ch);var dt=He(it.doc,st.line),pt=Jo(dt)+Ca(it.display);return{left:ct,right:ct,top:pt,bottom:pt+dt.height}}function Du(it,st,ct,dt,pt){var Et=Ke(it,st,ct);return Et.xRel=pt,dt&&(Et.outside=dt),Et}function eu(it,st,ct){var dt=it.doc;if(ct+=it.display.viewOffset,ct<0)return Du(dt.first,0,null,-1,-1);var pt=qe(dt,ct),Et=dt.first+dt.size-1;if(pt>Et)return Du(dt.first+dt.size-1,He(dt,Et).text.length,null,1,1);st<0&&(st=0);for(var Ft=He(dt,pt);;){var Wt=En(it,Ft,pt,st,ct),zt=$i(Ft,Wt.ch+(Wt.xRel>0||Wt.outside>0?1:0));if(!zt)return Wt;var re=zt.find(1);if(re.line==pt)return re;Ft=He(dt,pt=re.line)}}function Gi(it,st,ct,dt){dt-=wr(st);var pt=st.text.length,Et=ee(function(Ft){return Za(it,ct,Ft-1).bottom<=dt},pt,0);return pt=ee(function(Ft){return Za(it,ct,Ft).top>dt},Et,pt),{begin:Et,end:pt}}function Su(it,st,ct,dt){ct||(ct=tu(it,st));var pt=Lr(it,st,Za(it,ct,dt),"line").top;return Gi(it,st,ct,pt)}function ve(it,st,ct,dt){return it.bottom<=ct?!1:it.top>ct?!0:(dt?it.left:it.right)>st}function En(it,st,ct,dt,pt){pt-=Jo(st);var Et=tu(it,st),Ft=wr(st),Wt=0,zt=st.text.length,re=!0,ze=vn(st,it.doc.direction);if(ze){var ge=(it.options.lineWrapping?Ou:Qu)(it,st,ct,Et,ze,dt,pt);re=ge.level!=1,Wt=re?ge.from:ge.to-1,zt=re?ge.to:ge.from-1}var yn=null,an=null,Qn=ee(function(ar){var _i=Za(it,Et,ar);return _i.top+=Ft,_i.bottom+=Ft,ve(_i,dt,pt,!1)?(_i.top<=pt&&_i.left<=dt&&(yn=ar,an=_i),!0):!1},Wt,zt),li,yi,ji=!1;if(an){var co=dt-an.left<an.right-dt,eo=co==re;Qn=yn+(eo?0:1),yi=eo?"after":"before",li=co?an.left:an.right}else{!re&&(Qn==zt||Qn==Wt)&&Qn++,yi=Qn==0?"after":Qn==st.text.length?"before":Za(it,Et,Qn-(re?1:0)).bottom+Ft<=pt==re?"after":"before";var Eo=fs(it,Ke(ct,Qn,yi),"line",st,Et);li=Eo.left,ji=pt<Eo.top?-1:pt>=Eo.bottom?1:0}return Qn=le(st.text,Qn,1),Du(ct,Qn,yi,ji,dt-li)}function Qu(it,st,ct,dt,pt,Et,Ft){var Wt=ee(function(ge){var yn=pt[ge],an=yn.level!=1;return ve(fs(it,Ke(ct,an?yn.to:yn.from,an?"before":"after"),"line",st,dt),Et,Ft,!0)},0,pt.length-1),zt=pt[Wt];if(Wt>0){var re=zt.level!=1,ze=fs(it,Ke(ct,re?zt.from:zt.to,re?"after":"before"),"line",st,dt);ve(ze,Et,Ft,!0)&&ze.top>Ft&&(zt=pt[Wt-1])}return zt}function Ou(it,st,ct,dt,pt,Et,Ft){var Wt=Gi(it,st,dt,Ft),zt=Wt.begin,re=Wt.end;/\s/.test(st.text.charAt(re-1))&&re--;for(var ze=null,ge=null,yn=0;yn<pt.length;yn++){var an=pt[yn];if(!(an.from>=re||an.to<=zt)){var Qn=an.level!=1,li=Za(it,dt,Qn?Math.min(re,an.to)-1:Math.max(zt,an.from)).right,yi=li<Et?Et-li+1e9:li-Et;(!ze||ge>yi)&&(ze=an,ge=yi)}}return ze||(ze=pt[pt.length-1]),ze.from<zt&&(ze={from:zt,to:ze.to,level:ze.level}),ze.to>re&&(ze={from:ze.from,to:re,level:ze.level}),ze}var Hl;function Ju(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Hl==null){Hl=Vt("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)Hl.appendChild(document.createTextNode("x")),Hl.appendChild(Vt("br"));Hl.appendChild(document.createTextNode("x"))}se(it.measure,Hl);var ct=Hl.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),_t(it.measure),ct||1}function mh(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=Vt("span","xxxxxxxxxx"),ct=Vt("pre",[st],"CodeMirror-line-like");se(it.measure,ct);var dt=st.getBoundingClientRect(),pt=(dt.right-dt.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function Mc(it){for(var st=it.display,ct={},dt={},pt=st.gutters.clientLeft,Et=st.gutters.firstChild,Ft=0;Et;Et=Et.nextSibling,++Ft){var Wt=it.display.gutterSpecs[Ft].className;ct[Wt]=Et.offsetLeft+Et.clientLeft+pt,dt[Wt]=Et.clientWidth}return{fixedPos:yd(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ct,gutterWidth:dt,wrapperWidth:st.wrapper.clientWidth}}function yd(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Ks(it){var st=Ju(it.display),ct=it.options.lineWrapping,dt=ct&&Math.max(5,it.display.scroller.clientWidth/mh(it.display)-3);return function(pt){if(kn(it.doc,pt))return 0;var Et=0;if(pt.widgets)for(var Ft=0;Ft<pt.widgets.length;Ft++)pt.widgets[Ft].height&&(Et+=pt.widgets[Ft].height);return ct?Et+(Math.ceil(pt.text.length/dt)||1)*st:Et+st}}function To(it){var st=it.doc,ct=Ks(it);st.iter(function(dt){var pt=ct(dt);pt!=dt.height&&Fn(dt,pt)})}function rl(it,st,ct,dt){var pt=it.display;if(!ct&&Oo(st).getAttribute("cm-not-content")=="true")return null;var Et,Ft,Wt=pt.lineSpace.getBoundingClientRect();try{Et=st.clientX-Wt.left,Ft=st.clientY-Wt.top}catch(ge){return null}var zt=eu(it,Et,Ft),re;if(dt&&zt.xRel>0&&(re=He(it.doc,zt.line).text).length==zt.ch){var ze=we(re,re.length,it.options.tabSize)-re.length;zt=Ke(zt.line,Math.max(0,Math.round((Et-vu(it.display).left)/mh(it.display))-ze))}return zt}function Ua(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var ct=it.display.view,dt=0;dt<ct.length;dt++)if(st-=ct[dt].size,st<0)return dt}function Ps(it,st,ct,dt){st==null&&(st=it.doc.first),ct==null&&(ct=it.doc.first+it.doc.size),dt||(dt=0);var pt=it.display;if(dt&&ct<pt.viewTo&&(pt.updateLineNumbers==null||pt.updateLineNumbers>st)&&(pt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=pt.viewTo)cn&&Ji(it.doc,st)<pt.viewTo&&aa(it);else if(ct<=pt.viewFrom)cn&&Ti(it.doc,ct+dt)>pt.viewFrom?aa(it):(pt.viewFrom+=dt,pt.viewTo+=dt);else if(st<=pt.viewFrom&&ct>=pt.viewTo)aa(it);else if(st<=pt.viewFrom){var Et=Al(it,ct,ct+dt,1);Et?(pt.view=pt.view.slice(Et.index),pt.viewFrom=Et.lineN,pt.viewTo+=dt):aa(it)}else if(ct>=pt.viewTo){var Ft=Al(it,st,st,-1);Ft?(pt.view=pt.view.slice(0,Ft.index),pt.viewTo=Ft.lineN):aa(it)}else{var Wt=Al(it,st,st,-1),zt=Al(it,ct,ct+dt,1);Wt&&zt?(pt.view=pt.view.slice(0,Wt.index).concat(Hr(it,Wt.lineN,zt.lineN)).concat(pt.view.slice(zt.index)),pt.viewTo+=dt):aa(it)}var re=pt.externalMeasured;re&&(ct<re.lineN?re.lineN+=dt:st<re.lineN+re.size&&(pt.externalMeasured=null))}function vr(it,st,ct){it.curOp.viewChanged=!0;var dt=it.display,pt=it.display.externalMeasured;if(pt&&st>=pt.lineN&&st<pt.lineN+pt.size&&(dt.externalMeasured=null),!(st<dt.viewFrom||st>=dt.viewTo)){var Et=dt.view[Ua(it,st)];if(Et.node!=null){var Ft=Et.changes||(Et.changes=[]);_e(Ft,ct)==-1&&Ft.push(ct)}}}function aa(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Al(it,st,ct,dt){var pt=Ua(it,st),Et,Ft=it.display.view;if(!cn||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var Wt=it.display.viewFrom,zt=0;zt<pt;zt++)Wt+=Ft[zt].size;if(Wt!=st){if(dt>0){if(pt==Ft.length-1)return null;Et=Wt+Ft[pt].size-st,pt++}else Et=Wt-st;st+=Et,ct+=Et}for(;Ji(it.doc,ct)!=ct;){if(pt==(dt<0?0:Ft.length-1))return null;ct+=dt*Ft[pt-(dt<0?1:0)].size,pt+=dt}return{index:pt,lineN:ct}}function ys(it,st,ct){var dt=it.display,pt=dt.view;pt.length==0||st>=dt.viewTo||ct<=dt.viewFrom?(dt.view=Hr(it,st,ct),dt.viewFrom=st):(dt.viewFrom>st?dt.view=Hr(it,st,dt.viewFrom).concat(dt.view):dt.viewFrom<st&&(dt.view=dt.view.slice(Ua(it,st))),dt.viewFrom=st,dt.viewTo<ct?dt.view=dt.view.concat(Hr(it,dt.viewTo,ct)):dt.viewTo>ct&&(dt.view=dt.view.slice(0,Ua(it,ct)))),dt.viewTo=ct}function Gl(it){for(var st=it.display.view,ct=0,dt=0;dt<st.length;dt++){var pt=st[dt];!pt.hidden&&(!pt.node||pt.changes)&&++ct}return ct}function Ma(it){it.display.input.showSelection(it.display.input.prepareSelection())}function $h(it,st){st===void 0&&(st=!0);for(var ct=it.doc,dt={},pt=dt.cursors=document.createDocumentFragment(),Et=dt.selection=document.createDocumentFragment(),Ft=0;Ft<ct.sel.ranges.length;Ft++)if(!(!st&&Ft==ct.sel.primIndex)){var Wt=ct.sel.ranges[Ft];if(!(Wt.from().line>=it.display.viewTo||Wt.to().line<it.display.viewFrom)){var zt=Wt.empty();(zt||it.options.showCursorWhenSelecting)&&Dr(it,Wt.head,pt),zt||Or(it,Wt,Et)}}return dt}function Dr(it,st,ct){var dt=fs(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),pt=ct.appendChild(Vt("div","\xA0","CodeMirror-cursor"));if(pt.style.left=dt.left+"px",pt.style.top=dt.top+"px",pt.style.height=Math.max(0,dt.bottom-dt.top)*it.options.cursorHeight+"px",dt.other){var Et=ct.appendChild(Vt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Et.style.display="",Et.style.left=dt.other.left+"px",Et.style.top=dt.other.top+"px",Et.style.height=(dt.other.bottom-dt.other.top)*.85+"px"}}function sl(it,st){return it.top-st.top||it.left-st.left}function Or(it,st,ct){var dt=it.display,pt=it.doc,Et=document.createDocumentFragment(),Ft=vu(it.display),Wt=Ft.left,zt=Math.max(dt.sizerWidth,Oa(it)-dt.sizer.offsetLeft)-Ft.right,re=pt.direction=="ltr";function ze(eo,Eo,ar,_i){Eo<0&&(Eo=0),Eo=Math.round(Eo),_i=Math.round(_i),Et.appendChild(Vt("div",null,"CodeMirror-selected","position: absolute; left: "+eo+`px;
|
|
|
top: `+Eo+"px; width: "+(ar==null?zt-eo:ar)+`px;
|
|
|
height: `+(_i-Eo)+"px"))}function ge(eo,Eo,ar){var _i=He(pt,eo),Mr=_i.text.length,_s,za;function oa(Ta,au){return Ws(it,Ke(eo,Ta),"div",_i,au)}function Xl(Ta,au,ll){var Ba=Su(it,_i,null,Ta),as=au=="ltr"==(ll=="after")?"left":"right",da=ll=="after"?Ba.begin:Ba.end-(/\s/.test(_i.text.charAt(Ba.end-1))?2:1);return oa(da,as)[as]}var Pl=vn(_i,pt.direction);return Se(Pl,Eo||0,ar==null?Mr:ar,function(Ta,au,ll,Ba){var as=ll=="ltr",da=oa(Ta,as?"left":"right"),Ya=oa(au-1,as?"right":"left"),ul=Eo==null&&Ta==0,nh=ar==null&&au==Mr,ra=Ba==0,Hu=!Pl||Ba==Pl.length-1;if(Ya.top-da.top<=3){var xa=(re?ul:nh)&&ra,Sf=(re?nh:ul)&&Hu,Cu=xa?Wt:(as?da:Ya).left,lu=Sf?zt:(as?Ya:da).right;ze(Cu,da.top,lu-Cu,da.bottom)}else{var Ql,zs,Xa,jh;as?(Ql=re&&ul&&ra?Wt:da.left,zs=re?zt:Xl(Ta,ll,"before"),Xa=re?Wt:Xl(au,ll,"after"),jh=re&&nh&&Hu?zt:Ya.right):(Ql=re?Xl(Ta,ll,"before"):Wt,zs=!re&&ul&&ra?zt:da.right,Xa=!re&&nh&&Hu?Wt:Ya.left,jh=re?Xl(au,ll,"after"):zt),ze(Ql,da.top,zs-Ql,da.bottom),da.bottom<Ya.top&&ze(Wt,da.bottom,null,Ya.top),ze(Xa,Ya.top,jh-Xa,Ya.bottom)}(!_s||sl(da,_s)<0)&&(_s=da),sl(Ya,_s)<0&&(_s=Ya),(!za||sl(da,za)<0)&&(za=da),sl(Ya,za)<0&&(za=Ya)}),{start:_s,end:za}}var yn=st.from(),an=st.to();if(yn.line==an.line)ge(yn.line,yn.ch,an.ch);else{var Qn=He(pt,yn.line),li=He(pt,an.line),yi=ro(Qn)==ro(li),ji=ge(yn.line,yn.ch,yi?Qn.text.length+1:null).end,co=ge(an.line,yi?0:null,an.ch).start;yi&&(ji.top<co.top-2?(ze(ji.right,ji.top,null,ji.bottom),ze(Wt,co.top,co.left,co.bottom)):ze(ji.right,ji.top,co.left-ji.right,ji.bottom)),ji.bottom<co.top&&ze(Wt,ji.bottom,null,co.top)}ct.appendChild(Et)}function gs(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var ct=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||td(it),st.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function Ds(it){it.state.focused||(it.display.input.focus(),Gr(it))}function Xs(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,td(it))},100)}function Gr(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(tn(it,"focus",it,st),it.state.focused=!0,Ve(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),Tt&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),gs(it))}function td(it,st){it.state.delayingBlurEvent||(it.state.focused&&(tn(it,"blur",it,st),it.state.focused=!1,jt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function ko(it){for(var st=it.display,ct=st.lineDiv.offsetTop,dt=0;dt<st.view.length;dt++){var pt=st.view[dt],Et=it.options.lineWrapping,Ft=void 0,Wt=0;if(!pt.hidden){if(ne&&ae<8){var zt=pt.node.offsetTop+pt.node.offsetHeight;Ft=zt-ct,ct=zt}else{var re=pt.node.getBoundingClientRect();Ft=re.bottom-re.top,!Et&&pt.text.firstChild&&(Wt=pt.text.firstChild.getBoundingClientRect().right-re.left-1)}var ze=pt.line.height-Ft;if((ze>.005||ze<-.005)&&(Fn(pt.line,Ft),Wf(pt.line),pt.rest))for(var ge=0;ge<pt.rest.length;ge++)Wf(pt.rest[ge]);if(Wt>it.display.sizerWidth){var yn=Math.ceil(Wt/mh(it.display));yn>it.display.maxLineLength&&(it.display.maxLineLength=yn,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function Wf(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var ct=it.widgets[st],dt=ct.node.parentNode;dt&&(ct.height=dt.offsetHeight)}}function Ar(it,st,ct){var dt=ct&&ct.top!=null?Math.max(0,ct.top):it.scroller.scrollTop;dt=Math.floor(dt-Ca(it));var pt=ct&&ct.bottom!=null?ct.bottom:dt+it.wrapper.clientHeight,Et=qe(st,dt),Ft=qe(st,pt);if(ct&&ct.ensure){var Wt=ct.ensure.from.line,zt=ct.ensure.to.line;Wt<Et?(Et=Wt,Ft=qe(st,Jo(He(st,Wt))+it.wrapper.clientHeight)):Math.min(zt,st.lastLine())>=Ft&&(Et=qe(st,Jo(He(st,zt))-it.wrapper.clientHeight),Ft=zt)}return{from:Et,to:Math.max(Ft,Et+1)}}function Kf(it,st){if(!ii(it,"scrollCursorIntoView")){var ct=it.display,dt=ct.sizer.getBoundingClientRect(),pt=null;if(st.top+dt.top<0?pt=!0:st.bottom+dt.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!je){var Et=Vt("div","\u200B",null,`position: absolute;
|
|
|
top: `+(st.top-ct.viewOffset-Ca(it.display))+`px;
|
|
|
height: `+(st.bottom-st.top+pa(it)+ct.barHeight)+`px;
|
|
|
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Et),Et.scrollIntoView(pt),it.display.lineSpace.removeChild(Et)}}}function Yd(it,st,ct,dt){dt==null&&(dt=0);var pt;!it.options.lineWrapping&&st==ct&&(st=st.ch?Ke(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ct=st.sticky=="before"?Ke(st.line,st.ch+1,"before"):st);for(var Et=0;Et<5;Et++){var Ft=!1,Wt=fs(it,st),zt=!ct||ct==st?Wt:fs(it,ct);pt={left:Math.min(Wt.left,zt.left),top:Math.min(Wt.top,zt.top)-dt,right:Math.max(Wt.left,zt.left),bottom:Math.max(Wt.bottom,zt.bottom)+dt};var re=Zf(it,pt),ze=it.doc.scrollTop,ge=it.doc.scrollLeft;if(re.scrollTop!=null&&(nd(it,re.scrollTop),Math.abs(it.doc.scrollTop-ze)>1&&(Ft=!0)),re.scrollLeft!=null&&(qu(it,re.scrollLeft),Math.abs(it.doc.scrollLeft-ge)>1&&(Ft=!0)),!Ft)break}return pt}function Xd(it,st){var ct=Zf(it,st);ct.scrollTop!=null&&nd(it,ct.scrollTop),ct.scrollLeft!=null&&qu(it,ct.scrollLeft)}function Zf(it,st){var ct=it.display,dt=Ju(it.display);st.top<0&&(st.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,Et=Fu(it),Ft={};st.bottom-st.top>Et&&(st.bottom=st.top+Et);var Wt=it.doc.height+zl(ct),zt=st.top<dt,re=st.bottom>Wt-dt;if(st.top<pt)Ft.scrollTop=zt?0:st.top;else if(st.bottom>pt+Et){var ze=Math.min(st.top,(re?Wt:st.bottom)-Et);ze!=pt&&(Ft.scrollTop=ze)}var ge=it.options.fixedGutter?0:ct.gutters.offsetWidth,yn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-ge,an=Oa(it)-ct.gutters.offsetWidth,Qn=st.right-st.left>an;return Qn&&(st.right=st.left+an),st.left<10?Ft.scrollLeft=0:st.left<yn?Ft.scrollLeft=Math.max(0,st.left+ge-(Qn?0:10)):st.right>an+yn-3&&(Ft.scrollLeft=st.right+(Qn?0:10)-an),Ft}function Ec(it,st){st!=null&&(_u(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function Nh(it){_u(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function ed(it,st,ct){(st!=null||ct!=null)&&_u(it),st!=null&&(it.curOp.scrollLeft=st),ct!=null&&(it.curOp.scrollTop=ct)}function Wr(it,st){_u(it),it.curOp.scrollToPos=st}function _u(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ct=Ah(it,st.from),dt=Ah(it,st.to);sf(it,ct,dt,st.margin)}}function sf(it,st,ct,dt){var pt=Zf(it,{left:Math.min(st.left,ct.left),top:Math.min(st.top,ct.top)-dt,right:Math.max(st.right,ct.right),bottom:Math.max(st.bottom,ct.bottom)+dt});ed(it,pt.scrollLeft,pt.scrollTop)}function nd(it,st){Math.abs(it.doc.scrollTop-st)<2||(wt||Ai(it,{top:st}),Uf(it,st,!0),wt&&Ai(it),Nn(it,100))}function Uf(it,st,ct){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!ct)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function qu(it,st,ct,dt){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ct?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!dt)&&(it.doc.scrollLeft=st,Bo(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function xu(it){var st=it.display,ct=st.gutters.offsetWidth,dt=Math.round(it.doc.height+zl(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?ct:0,docHeight:dt,scrollHeight:dt+pa(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ct}}var Th=function(it,st,ct){this.cm=ct;var dt=this.vert=Vt("div",[Vt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=Vt("div",[Vt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");dt.tabIndex=pt.tabIndex=-1,it(dt),it(pt),en(dt,"scroll",function(){dt.clientHeight&&st(dt.scrollTop,"vertical")}),en(pt,"scroll",function(){pt.clientWidth&&st(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ne&&ae<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Th.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,ct=it.scrollHeight>it.clientHeight+1,dt=it.nativeBarWidth;if(ct){this.vert.style.display="block",this.vert.style.bottom=st?dt+"px":"0";var pt=it.viewHeight-(st?dt:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+pt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=ct?dt+"px":"0",this.horiz.style.left=it.barLeft+"px";var Et=it.viewWidth-it.barLeft-(ct?dt:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Et)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(dt==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ct?dt:0,bottom:st?dt:0}},Th.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Th.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Th.prototype.zeroWidthHack=function(){var it=ht&&!pe?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Yt,this.disableVert=new Yt},Th.prototype.enableZeroWidthBar=function(it,st,ct){it.style.pointerEvents="auto";function dt(){var pt=it.getBoundingClientRect(),Et=ct=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);Et!=it?it.style.pointerEvents="none":st.set(1e3,dt)}st.set(1e3,dt)},Th.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Ru=function(){};Ru.prototype.update=function(){return{bottom:0,right:0}},Ru.prototype.setScrollLeft=function(){},Ru.prototype.setScrollTop=function(){},Ru.prototype.clear=function(){};function Bh(it,st){st||(st=xu(it));var ct=it.display.barWidth,dt=it.display.barHeight;Lc(it,st);for(var pt=0;pt<4&&ct!=it.display.barWidth||dt!=it.display.barHeight;pt++)ct!=it.display.barWidth&&it.options.lineWrapping&&ko(it),Lc(it,xu(it)),ct=it.display.barWidth,dt=it.display.barHeight}function Lc(it,st){var ct=it.display,dt=ct.scrollbars.update(st);ct.sizer.style.paddingRight=(ct.barWidth=dt.right)+"px",ct.sizer.style.paddingBottom=(ct.barHeight=dt.bottom)+"px",ct.heightForcer.style.borderBottom=dt.bottom+"px solid transparent",dt.right&&dt.bottom?(ct.scrollbarFiller.style.display="block",ct.scrollbarFiller.style.height=dt.bottom+"px",ct.scrollbarFiller.style.width=dt.right+"px"):ct.scrollbarFiller.style.display="",dt.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ct.gutterFiller.style.display="block",ct.gutterFiller.style.height=dt.bottom+"px",ct.gutterFiller.style.width=st.gutterWidth+"px"):ct.gutterFiller.style.display=""}var af={native:Th,null:Ru};function lf(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&jt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new af[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),en(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,ct){ct=="horizontal"?qu(it,st):nd(it,st)},it),it.display.scrollbars.addClass&&Ve(it.display.wrapper,it.display.scrollbars.addClass)}var Vf=0;function yl(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:++Vf},kl(it.curOp)}function Fh(it){var st=it.curOp;st&&hr(st,function(ct){for(var dt=0;dt<ct.ops.length;dt++)ct.ops[dt].cm.curOp=null;Zg(ct)})}function Zg(it){for(var st=it.ops,ct=0;ct<st.length;ct++)Ut(st[ct]);for(var dt=0;dt<st.length;dt++)Qt(st[dt]);for(var pt=0;pt<st.length;pt++)Pe(st[pt]);for(var Et=0;Et<st.length;Et++)Ee(st[Et]);for(var Ft=0;Ft<st.length;Ft++)Ge(st[Ft])}function Ut(it){var st=it.cm,ct=st.display;gi(st),it.updateMaxLine&&Ir(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ct.viewFrom||it.scrollToPos.to.line>=ct.viewTo)||ct.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new In(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function Qt(it){it.updatedDisplay=it.mustUpdate&&Fi(it.cm,it.update)}function Pe(it){var st=it.cm,ct=st.display;it.updatedDisplay&&ko(st),it.barMeasure=xu(st),ct.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=fh(st,ct.maxLine,ct.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ct.scroller.clientWidth,ct.sizer.offsetLeft+it.adjustWidthTo+pa(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ct.sizer.offsetLeft+it.adjustWidthTo-Oa(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ct.input.prepareSelection())}function Ee(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&qu(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ct=it.focus&&it.focus==me();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ct),(it.updatedDisplay||it.startHeight!=st.doc.height)&&Bh(st,it.barMeasure),it.updatedDisplay&&vo(st,it.barMeasure),it.selectionChanged&&gs(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ct&&Ds(it.cm)}function Ge(it){var st=it.cm,ct=st.display,dt=st.doc;if(it.updatedDisplay&&ai(st,it.update),ct.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ct.wheelStartX=ct.wheelStartY=null),it.scrollTop!=null&&Uf(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&qu(st,it.scrollLeft,!0,!0),it.scrollToPos){var pt=Yd(st,Vn(dt,it.scrollToPos.from),Vn(dt,it.scrollToPos.to),it.scrollToPos.margin);Kf(st,pt)}var Et=it.maybeHiddenMarkers,Ft=it.maybeUnhiddenMarkers;if(Et)for(var Wt=0;Wt<Et.length;++Wt)Et[Wt].lines.length||tn(Et[Wt],"hide");if(Ft)for(var zt=0;zt<Ft.length;++zt)Ft[zt].lines.length&&tn(Ft[zt],"unhide");ct.wrapper.offsetHeight&&(dt.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&tn(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function Fe(it,st){if(it.curOp)return st();yl(it);try{return st()}finally{Fh(it)}}function hn(it,st){return function(){if(it.curOp)return st.apply(it,arguments);yl(it);try{return st.apply(it,arguments)}finally{Fh(it)}}}function dn(it){return function(){if(this.curOp)return it.apply(this,arguments);yl(this);try{return it.apply(this,arguments)}finally{Fh(this)}}}function rn(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);yl(st);try{return it.apply(this,arguments)}finally{Fh(st)}}}function Nn(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,wn(Rn,it))}function Rn(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,dt=jo(it,st.highlightFrontier),pt=[];st.iter(dt.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Et){if(dt.line>=it.display.viewFrom){var Ft=Et.styles,Wt=Et.text.length>it.options.maxHighlightLength?We(st.mode,dt.state):null,zt=lo(it,Et,dt,!0);Wt&&(dt.state=Wt),Et.styles=zt.styles;var re=Et.styleClasses,ze=zt.classes;ze?Et.styleClasses=ze:re&&(Et.styleClasses=null);for(var ge=!Ft||Ft.length!=Et.styles.length||re!=ze&&(!re||!ze||re.bgClass!=ze.bgClass||re.textClass!=ze.textClass),yn=0;!ge&&yn<Ft.length;++yn)ge=Ft[yn]!=Et.styles[yn];ge&&pt.push(dt.line),Et.stateAfter=dt.save(),dt.nextLine()}else Et.text.length<=it.options.maxHighlightLength&&Ue(it,Et.text,dt),Et.stateAfter=dt.line%5==0?dt.save():null,dt.nextLine();if(+new Date>ct)return Nn(it,it.options.workDelay),!0}),st.highlightFrontier=dt.line,st.modeFrontier=Math.max(st.modeFrontier,dt.line),pt.length&&Fe(it,function(){for(var Et=0;Et<pt.length;Et++)vr(it,pt[Et],"text")})}}var In=function(it,st,ct){var dt=it.display;this.viewport=st,this.visible=Ar(dt,it.doc,st),this.editorIsHidden=!dt.wrapper.offsetWidth,this.wrapperHeight=dt.wrapper.clientHeight,this.wrapperWidth=dt.wrapper.clientWidth,this.oldDisplayWidth=Oa(it),this.force=ct,this.dims=Mc(it),this.events=[]};In.prototype.signal=function(it,st){Un(it,st)&&this.events.push(arguments)},In.prototype.finish=function(){for(var it=0;it<this.events.length;it++)tn.apply(null,this.events[it])};function gi(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=pa(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=pa(it)+"px",st.scrollbarsClipped=!0)}function di(it){if(it.hasFocus())return null;var st=me();if(!st||!Oe(it.display.lineDiv,st))return null;var ct={activeElt:st};if(window.getSelection){var dt=window.getSelection();dt.anchorNode&&dt.extend&&Oe(it.display.lineDiv,dt.anchorNode)&&(ct.anchorNode=dt.anchorNode,ct.anchorOffset=dt.anchorOffset,ct.focusNode=dt.focusNode,ct.focusOffset=dt.focusOffset)}return ct}function ei(it){if(!(!it||!it.activeElt||it.activeElt==me())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Oe(document.body,it.anchorNode)&&Oe(document.body,it.focusNode))){var st=window.getSelection(),ct=document.createRange();ct.setEnd(it.anchorNode,it.anchorOffset),ct.collapse(!1),st.removeAllRanges(),st.addRange(ct),st.extend(it.focusNode,it.focusOffset)}}function Fi(it,st){var ct=it.display,dt=it.doc;if(st.editorIsHidden)return aa(it),!1;if(!st.force&&st.visible.from>=ct.viewFrom&&st.visible.to<=ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo)&&ct.renderedView==ct.view&&Gl(it)==0)return!1;Oi(it)&&(aa(it),st.dims=Mc(it));var pt=dt.first+dt.size,Et=Math.max(st.visible.from-it.options.viewportMargin,dt.first),Ft=Math.min(pt,st.visible.to+it.options.viewportMargin);ct.viewFrom<Et&&Et-ct.viewFrom<20&&(Et=Math.max(dt.first,ct.viewFrom)),ct.viewTo>Ft&&ct.viewTo-Ft<20&&(Ft=Math.min(pt,ct.viewTo)),cn&&(Et=Ji(it.doc,Et),Ft=Ti(it.doc,Ft));var Wt=Et!=ct.viewFrom||Ft!=ct.viewTo||ct.lastWrapHeight!=st.wrapperHeight||ct.lastWrapWidth!=st.wrapperWidth;ys(it,Et,Ft),ct.viewOffset=Jo(He(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var zt=Gl(it);if(!Wt&&zt==0&&!st.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var re=di(it);return zt>4&&(ct.lineDiv.style.display="none"),bi(it,ct.updateLineNumbers,st.dims),zt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,ei(re),_t(ct.cursorDiv),_t(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,Wt&&(ct.lastWrapHeight=st.wrapperHeight,ct.lastWrapWidth=st.wrapperWidth,Nn(it,400)),ct.updateLineNumbers=null,!0}function ai(it,st){for(var ct=st.viewport,dt=!0;;dt=!1){if(!dt||!it.options.lineWrapping||st.oldDisplayWidth==Oa(it)){if(ct&&ct.top!=null&&(ct={top:Math.min(it.doc.height+zl(it.display)-Fu(it),ct.top)}),st.visible=Ar(it.display,it.doc,ct),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else dt&&(st.visible=Ar(it.display,it.doc,ct));if(!Fi(it,st))break;ko(it);var pt=xu(it);Ma(it),Bh(it,pt),vo(it,pt),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 Ai(it,st){var ct=new In(it,st);if(Fi(it,ct)){ko(it),ai(it,ct);var dt=xu(it);Ma(it),Bh(it,dt),vo(it,dt),ct.finish()}}function bi(it,st,ct){var dt=it.display,pt=it.options.lineNumbers,Et=dt.lineDiv,Ft=Et.firstChild;function Wt(Qn){var li=Qn.nextSibling;return Tt&&ht&&it.display.currentWheelTarget==Qn?Qn.style.display="none":Qn.parentNode.removeChild(Qn),li}for(var zt=dt.view,re=dt.viewFrom,ze=0;ze<zt.length;ze++){var ge=zt[ze];if(!ge.hidden)if(!ge.node||ge.node.parentNode!=Et){var yn=Pa(it,ge,re,ct);Et.insertBefore(yn,Ft)}else{for(;Ft!=ge.node;)Ft=Wt(Ft);var an=pt&&st!=null&&st<=re&&ge.lineNumber;ge.changes&&(_e(ge.changes,"gutter")>-1&&(an=!1),is(it,ge,re,ct)),an&&(_t(ge.lineNumber),ge.lineNumber.appendChild(document.createTextNode(Jn(it.options,re)))),Ft=ge.node.nextSibling}re+=ge.size}for(;Ft;)Ft=Wt(Ft)}function Vi(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function vo(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+pa(it)+"px"}function Bo(it){var st=it.display,ct=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var dt=yd(st)-st.scroller.scrollLeft+it.doc.scrollLeft,pt=st.gutters.offsetWidth,Et=dt+"px",Ft=0;Ft<ct.length;Ft++)if(!ct[Ft].hidden){it.options.fixedGutter&&(ct[Ft].gutter&&(ct[Ft].gutter.style.left=Et),ct[Ft].gutterBackground&&(ct[Ft].gutterBackground.style.left=Et));var Wt=ct[Ft].alignable;if(Wt)for(var zt=0;zt<Wt.length;zt++)Wt[zt].style.left=Et}it.options.fixedGutter&&(st.gutters.style.left=dt+pt+"px")}}function Oi(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ct=Jn(it.options,st.first+st.size-1),dt=it.display;if(ct.length!=dt.lineNumChars){var pt=dt.measure.appendChild(Vt("div",[Vt("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Et=pt.firstChild.offsetWidth,Ft=pt.offsetWidth-Et;return dt.lineGutter.style.width="",dt.lineNumInnerWidth=Math.max(Et,dt.lineGutter.offsetWidth-Ft)+1,dt.lineNumWidth=dt.lineNumInnerWidth+Ft,dt.lineNumChars=dt.lineNumInnerWidth?ct.length:-1,dt.lineGutter.style.width=dt.lineNumWidth+"px",Vi(it.display),!0}return!1}function fo(it,st){for(var ct=[],dt=!1,pt=0;pt<it.length;pt++){var Et=it[pt],Ft=null;if(typeof Et!="string"&&(Ft=Et.style,Et=Et.className),Et=="CodeMirror-linenumbers")if(st)dt=!0;else continue;ct.push({className:Et,style:Ft})}return st&&!dt&&ct.push({className:"CodeMirror-linenumbers",style:null}),ct}function or(it){var st=it.gutters,ct=it.gutterSpecs;_t(st),it.lineGutter=null;for(var dt=0;dt<ct.length;++dt){var pt=ct[dt],Et=pt.className,Ft=pt.style,Wt=st.appendChild(Vt("div",null,"CodeMirror-gutter "+Et));Ft&&(Wt.style.cssText=Ft),Et=="CodeMirror-linenumbers"&&(it.lineGutter=Wt,Wt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ct.length?"":"none",Vi(it)}function Zi(it){or(it.display),Ps(it),Bo(it)}function io(it,st,ct,dt){var pt=this;this.input=ct,pt.scrollbarFiller=Vt("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=Vt("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=he("div",null,"CodeMirror-code"),pt.selectionDiv=Vt("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=Vt("div",null,"CodeMirror-cursors"),pt.measure=Vt("div",null,"CodeMirror-measure"),pt.lineMeasure=Vt("div",null,"CodeMirror-measure"),pt.lineSpace=he("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var Et=he("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=Vt("div",[Et],null,"position: relative"),pt.sizer=Vt("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=Vt("div",null,null,"position: absolute; height: "+Zn+"px; width: 1px;"),pt.gutters=Vt("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=Vt("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=Vt("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),ne&&ae<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!Tt&&!(wt&&nt)&&(pt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(pt.wrapper):it(pt.wrapper)),pt.viewFrom=pt.viewTo=st.first,pt.reportedViewFrom=pt.reportedViewTo=st.first,pt.view=[],pt.renderedView=null,pt.externalMeasured=null,pt.viewOffset=0,pt.lastWrapHeight=pt.lastWrapWidth=0,pt.updateLineNumbers=null,pt.nativeBarWidth=pt.barHeight=pt.barWidth=0,pt.scrollbarsClipped=!1,pt.lineNumWidth=pt.lineNumInnerWidth=pt.lineNumChars=null,pt.alignWidgets=!1,pt.cachedCharWidth=pt.cachedTextHeight=pt.cachedPaddingH=null,pt.maxLine=null,pt.maxLineLength=0,pt.maxLineChanged=!1,pt.wheelDX=pt.wheelDY=pt.wheelStartX=pt.wheelStartY=null,pt.shift=!1,pt.selForContextMenu=null,pt.activeTouch=null,pt.gutterSpecs=fo(dt.gutters,dt.lineNumbers),or(pt),ct.init(pt)}var Wi=0,xi=null;ne?xi=-.53:wt?xi=15:ye?xi=-.7:Be&&(xi=-1/3);function to(it){var st=it.wheelDeltaX,ct=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),ct==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ct=it.detail:ct==null&&(ct=it.wheelDelta),{x:st,y:ct}}function Mo(it){var st=to(it);return st.x*=xi,st.y*=xi,st}function Wo(it,st){var ct=to(st),dt=ct.x,pt=ct.y,Et=it.display,Ft=Et.scroller,Wt=Ft.scrollWidth>Ft.clientWidth,zt=Ft.scrollHeight>Ft.clientHeight;if(dt&&Wt||pt&&zt){if(pt&&ht&&Tt){t:for(var re=st.target,ze=Et.view;re!=Ft;re=re.parentNode)for(var ge=0;ge<ze.length;ge++)if(ze[ge].node==re){it.display.currentWheelTarget=re;break t}}if(dt&&!wt&&!Jt&&xi!=null){pt&&zt&&nd(it,Math.max(0,Ft.scrollTop+pt*xi)),qu(it,Math.max(0,Ft.scrollLeft+dt*xi)),(!pt||pt&&zt)&&mi(st),Et.wheelStartX=null;return}if(pt&&xi!=null){var yn=pt*xi,an=it.doc.scrollTop,Qn=an+Et.wrapper.clientHeight;yn<0?an=Math.max(0,an+yn-50):Qn=Math.min(it.doc.height,Qn+yn+50),Ai(it,{top:an,bottom:Qn})}Wi<20&&(Et.wheelStartX==null?(Et.wheelStartX=Ft.scrollLeft,Et.wheelStartY=Ft.scrollTop,Et.wheelDX=dt,Et.wheelDY=pt,setTimeout(function(){if(Et.wheelStartX!=null){var li=Ft.scrollLeft-Et.wheelStartX,yi=Ft.scrollTop-Et.wheelStartY,ji=yi&&Et.wheelDY&&yi/Et.wheelDY||li&&Et.wheelDX&&li/Et.wheelDX;Et.wheelStartX=Et.wheelStartY=null,ji&&(xi=(xi*Wi+ji)/(Wi+1),++Wi)}},200)):(Et.wheelDX+=dt,Et.wheelDY+=pt))}}var Uo=function(it,st){this.ranges=it,this.primIndex=st};Uo.prototype.primary=function(){return this.ranges[this.primIndex]},Uo.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var ct=this.ranges[st],dt=it.ranges[st];if(!zn(ct.anchor,dt.anchor)||!zn(ct.head,dt.head))return!1}return!0},Uo.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new Ri(Wn(this.ranges[st].anchor),Wn(this.ranges[st].head));return new Uo(it,this.primIndex)},Uo.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Uo.prototype.contains=function(it,st){st||(st=it);for(var ct=0;ct<this.ranges.length;ct++){var dt=this.ranges[ct];if(Qe(st,dt.from())>=0&&Qe(it,dt.to())<=0)return ct}return-1};var Ri=function(it,st){this.anchor=it,this.head=st};Ri.prototype.from=function(){return Hn(this.anchor,this.head)},Ri.prototype.to=function(){return fi(this.anchor,this.head)},Ri.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function sr(it,st,ct){var dt=it&&it.options.selectionsMayTouch,pt=st[ct];st.sort(function(yn,an){return Qe(yn.from(),an.from())}),ct=_e(st,pt);for(var Et=1;Et<st.length;Et++){var Ft=st[Et],Wt=st[Et-1],zt=Qe(Wt.to(),Ft.from());if(dt&&!Ft.empty()?zt>0:zt>=0){var re=Hn(Wt.from(),Ft.from()),ze=fi(Wt.to(),Ft.to()),ge=Wt.empty()?Ft.from()==Ft.head:Wt.from()==Wt.head;Et<=ct&&--ct,st.splice(--Et,2,new Ri(ge?ze:re,ge?re:ze))}}return new Uo(st,ct)}function fr(it,st){return new Uo([new Ri(it,st||it)],0)}function Qr(it){return it.text?Ke(it.from.line+it.text.length-1,Ce(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function br(it,st){if(Qe(it,st.from)<0)return it;if(Qe(it,st.to)<=0)return Qr(st);var ct=it.line+st.text.length-(st.to.line-st.from.line)-1,dt=it.ch;return it.line==st.to.line&&(dt+=Qr(st).ch-st.to.ch),Ke(ct,dt)}function Os(it,st){for(var ct=[],dt=0;dt<it.sel.ranges.length;dt++){var pt=it.sel.ranges[dt];ct.push(new Ri(br(pt.anchor,st),br(pt.head,st)))}return sr(it.cm,ct,it.sel.primIndex)}function Bs(it,st,ct){return it.line==st.line?Ke(ct.line,it.ch-st.ch+ct.ch):Ke(ct.line+(it.line-st.line),it.ch)}function ur(it,st,ct){for(var dt=[],pt=Ke(it.first,0),Et=pt,Ft=0;Ft<st.length;Ft++){var Wt=st[Ft],zt=Bs(Wt.from,pt,Et),re=Bs(Qr(Wt),pt,Et);if(pt=Wt.to,Et=re,ct=="around"){var ze=it.sel.ranges[Ft],ge=Qe(ze.head,ze.anchor)<0;dt[Ft]=new Ri(ge?re:zt,ge?zt:re)}else dt[Ft]=new Ri(zt,zt)}return new Uo(dt,it.sel.primIndex)}function Ao(it){it.doc.mode=Ie(it.options,it.doc.modeOption),zr(it)}function zr(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,Nn(it,100),it.state.modeGen++,it.curOp&&Ps(it)}function Rs(it,st){return st.from.ch==0&&st.to.ch==0&&Ce(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Cs(it,st,ct,dt){function pt(co){return ct?ct[co]:null}function Et(co,eo,Eo){hs(co,eo,Eo,dt),hi(co,"change",co,st)}function Ft(co,eo){for(var Eo=[],ar=co;ar<eo;++ar)Eo.push(new Ur(re[ar],pt(ar),dt));return Eo}var Wt=st.from,zt=st.to,re=st.text,ze=He(it,Wt.line),ge=He(it,zt.line),yn=Ce(re),an=pt(re.length-1),Qn=zt.line-Wt.line;if(st.full)it.insert(0,Ft(0,re.length)),it.remove(re.length,it.size-re.length);else if(Rs(it,st)){var li=Ft(0,re.length-1);Et(ge,ge.text,an),Qn&&it.remove(Wt.line,Qn),li.length&&it.insert(Wt.line,li)}else if(ze==ge)if(re.length==1)Et(ze,ze.text.slice(0,Wt.ch)+yn+ze.text.slice(zt.ch),an);else{var yi=Ft(1,re.length-1);yi.push(new Ur(yn+ze.text.slice(zt.ch),an,dt)),Et(ze,ze.text.slice(0,Wt.ch)+re[0],pt(0)),it.insert(Wt.line+1,yi)}else if(re.length==1)Et(ze,ze.text.slice(0,Wt.ch)+re[0]+ge.text.slice(zt.ch),pt(0)),it.remove(Wt.line+1,Qn);else{Et(ze,ze.text.slice(0,Wt.ch)+re[0],pt(0)),Et(ge,yn+ge.text.slice(zt.ch),an);var ji=Ft(1,re.length-1);Qn>1&&it.remove(Wt.line+1,Qn-1),it.insert(Wt.line+1,ji)}hi(it,"change",it,st)}function ia(it,st,ct){function dt(pt,Et,Ft){if(pt.linked)for(var Wt=0;Wt<pt.linked.length;++Wt){var zt=pt.linked[Wt];if(zt.doc!=Et){var re=Ft&&zt.sharedHist;ct&&!re||(st(zt.doc,re),dt(zt.doc,pt,re))}}}dt(it,null,!0)}function Vo(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,To(it),Ao(it),Do(it),it.options.lineWrapping||Ir(it),it.options.mode=st.modeOption,Ps(it)}function Do(it){(it.doc.direction=="rtl"?Ve:jt)(it.display.lineDiv,"CodeMirror-rtl")}function Yo(it){Fe(it,function(){Do(it),Ps(it)})}function xo(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function Kr(it,st){var ct={from:Wn(st.from),to:Qr(st),text:un(it,st.from,st.to)};return Va(it,ct,st.from.line,st.to.line+1),ia(it,function(dt){return Va(dt,ct,st.from.line,st.to.line+1)},!0),ct}function wo(it){for(;it.length;){var st=Ce(it);if(st.ranges)it.pop();else break}}function rr(it,st){if(st)return wo(it.done),Ce(it.done);if(it.done.length&&!Ce(it.done).ranges)return Ce(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Ce(it.done)}function Nr(it,st,ct,dt){var pt=it.history;pt.undone.length=0;var Et=+new Date,Ft,Wt;if((pt.lastOp==dt||pt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&pt.lastModTime>Et-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Ft=rr(pt,pt.lastOp==dt)))Wt=Ce(Ft.changes),Qe(st.from,st.to)==0&&Qe(st.from,Wt.to)==0?Wt.to=Qr(st):Ft.changes.push(Kr(it,st));else{var zt=Ce(pt.done);for((!zt||!zt.ranges)&&la(it.sel,pt.done),Ft={changes:[Kr(it,st)],generation:pt.generation},pt.done.push(Ft);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(ct),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=Et,pt.lastOp=pt.lastSelOp=dt,pt.lastOrigin=pt.lastSelOrigin=st.origin,Wt||tn(it,"historyAdded")}function Tr(it,st,ct,dt){var pt=st.charAt(0);return pt=="*"||pt=="+"&&ct.ranges.length==dt.ranges.length&&ct.somethingSelected()==dt.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Ea(it,st,ct,dt){var pt=it.history,Et=dt&&dt.origin;ct==pt.lastSelOp||Et&&pt.lastSelOrigin==Et&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==Et||Tr(it,Et,Ce(pt.done),st))?pt.done[pt.done.length-1]=st:la(st,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=Et,pt.lastSelOp=ct,dt&&dt.clearRedo!==!1&&wo(pt.undone)}function la(it,st){var ct=Ce(st);ct&&ct.ranges&&ct.equals(it)||st.push(it)}function Va(it,st,ct,dt){var pt=st["spans_"+it.id],Et=0;it.iter(Math.max(it.first,ct),Math.min(it.first+it.size,dt),function(Ft){Ft.markedSpans&&((pt||(pt=st["spans_"+it.id]={}))[Et]=Ft.markedSpans),++Et})}function Jr(it){if(!it)return null;for(var st,ct=0;ct<it.length;++ct)it[ct].marker.explicitlyCleared?st||(st=it.slice(0,ct)):st&&st.push(it[ct]);return st?st.length?st:null:it}function La(it,st){var ct=st["spans_"+it.id];if(!ct)return null;for(var dt=[],pt=0;pt<st.text.length;++pt)dt.push(Jr(ct[pt]));return dt}function ta(it,st){var ct=La(it,st),dt=Li(it,st);if(!ct)return dt;if(!dt)return ct;for(var pt=0;pt<ct.length;++pt){var Et=ct[pt],Ft=dt[pt];if(Et&&Ft)t:for(var Wt=0;Wt<Ft.length;++Wt){for(var zt=Ft[Wt],re=0;re<Et.length;++re)if(Et[re].marker==zt.marker)continue t;Et.push(zt)}else Ft&&(ct[pt]=Ft)}return ct}function ma(it,st,ct){for(var dt=[],pt=0;pt<it.length;++pt){var Et=it[pt];if(Et.ranges){dt.push(ct?Uo.prototype.deepCopy.call(Et):Et);continue}var Ft=Et.changes,Wt=[];dt.push({changes:Wt});for(var zt=0;zt<Ft.length;++zt){var re=Ft[zt],ze=void 0;if(Wt.push({from:re.from,to:re.to,text:re.text}),st)for(var ge in re)(ze=ge.match(/^spans_(\d+)$/))&&_e(st,Number(ze[1]))>-1&&(Ce(Wt)[ge]=re[ge],delete re[ge])}}return dt}function $u(it,st,ct,dt){if(dt){var pt=it.anchor;if(ct){var Et=Qe(st,pt)<0;Et!=Qe(ct,pt)<0?(pt=st,st=ct):Et!=Qe(st,ct)<0&&(st=ct)}return new Ri(pt,st)}else return new Ri(ct||st,st)}function _r(it,st,ct,dt,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Ss(it,new Uo([$u(it.sel.primary(),st,ct,pt)],0),dt)}function ss(it,st,ct){for(var dt=[],pt=it.cm&&(it.cm.display.shift||it.extend),Et=0;Et<it.sel.ranges.length;Et++)dt[Et]=$u(it.sel.ranges[Et],st[Et],null,pt);var Ft=sr(it.cm,dt,it.sel.primIndex);Ss(it,Ft,ct)}function ps(it,st,ct,dt){var pt=it.sel.ranges.slice(0);pt[st]=ct,Ss(it,sr(it.cm,pt,it.sel.primIndex),dt)}function Qs(it,st,ct,dt){Ss(it,fr(st,ct),dt)}function va(it,st,ct){var dt={ranges:st.ranges,update:function(pt){this.ranges=[];for(var Et=0;Et<pt.length;Et++)this.ranges[Et]=new Ri(Vn(it,pt[Et].anchor),Vn(it,pt[Et].head))},origin:ct&&ct.origin};return tn(it,"beforeSelectionChange",it,dt),it.cm&&tn(it.cm,"beforeSelectionChange",it.cm,dt),dt.ranges!=st.ranges?sr(it.cm,dt.ranges,dt.ranges.length-1):st}function Cr(it,st,ct){var dt=it.history.done,pt=Ce(dt);pt&&pt.ranges?(dt[dt.length-1]=st,ya(it,st,ct)):Ss(it,st,ct)}function Ss(it,st,ct){ya(it,st,ct),Ea(it,it.sel,it.cm?it.cm.curOp.id:NaN,ct)}function ya(it,st,ct){(Un(it,"beforeSelectionChange")||it.cm&&Un(it.cm,"beforeSelectionChange"))&&(st=va(it,st,ct));var dt=ct&&ct.bias||(Qe(st.primary().head,it.sel.primary().head)<0?-1:1);Sl(it,Nl(it,st,dt,!0)),!(ct&&ct.scroll===!1)&&it.cm&&Nh(it.cm)}function Sl(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,ri(it.cm)),hi(it,"cursorActivity",it))}function Wl(it){Sl(it,Nl(it,it.sel,null,!1))}function Nl(it,st,ct,dt){for(var pt,Et=0;Et<st.ranges.length;Et++){var Ft=st.ranges[Et],Wt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Et],zt=iu(it,Ft.anchor,Wt&&Wt.anchor,ct,dt),re=iu(it,Ft.head,Wt&&Wt.head,ct,dt);(pt||zt!=Ft.anchor||re!=Ft.head)&&(pt||(pt=st.ranges.slice(0,Et)),pt[Et]=new Ri(zt,re))}return pt?sr(it.cm,pt,st.primIndex):st}function nu(it,st,ct,dt,pt){var Et=He(it,st.line);if(Et.markedSpans)for(var Ft=0;Ft<Et.markedSpans.length;++Ft){var Wt=Et.markedSpans[Ft],zt=Wt.marker,re="selectLeft"in zt?!zt.selectLeft:zt.inclusiveLeft,ze="selectRight"in zt?!zt.selectRight:zt.inclusiveRight;if((Wt.from==null||(re?Wt.from<=st.ch:Wt.from<st.ch))&&(Wt.to==null||(ze?Wt.to>=st.ch:Wt.to>st.ch))){if(pt&&(tn(zt,"beforeCursorEnter"),zt.explicitlyCleared))if(Et.markedSpans){--Ft;continue}else break;if(!zt.atomic)continue;if(ct){var ge=zt.find(dt<0?1:-1),yn=void 0;if((dt<0?ze:re)&&(ge=Kl(it,ge,-dt,ge&&ge.line==st.line?Et:null)),ge&&ge.line==st.line&&(yn=Qe(ge,ct))&&(dt<0?yn<0:yn>0))return nu(it,ge,st,dt,pt)}var an=zt.find(dt<0?-1:1);return(dt<0?re:ze)&&(an=Kl(it,an,dt,an.line==st.line?Et:null)),an?nu(it,an,st,dt,pt):null}}return st}function iu(it,st,ct,dt,pt){var Et=dt||1,Ft=nu(it,st,ct,Et,pt)||!pt&&nu(it,st,ct,Et,!0)||nu(it,st,ct,-Et,pt)||!pt&&nu(it,st,ct,-Et,!0);return Ft||(it.cantEdit=!0,Ke(it.first,0))}function Kl(it,st,ct,dt){return ct<0&&st.ch==0?st.line>it.first?Vn(it,Ke(st.line-1)):null:ct>0&&st.ch==(dt||He(it,st.line)).text.length?st.line<it.first+it.size-1?Ke(st.line+1,0):null:new Ke(st.line,st.ch+ct)}function $r(it){it.setSelection(Ke(it.firstLine(),0),Ke(it.lastLine()),Ne)}function ka(it,st,ct){var dt={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return dt.canceled=!0}};return ct&&(dt.update=function(pt,Et,Ft,Wt){pt&&(dt.from=Vn(it,pt)),Et&&(dt.to=Vn(it,Et)),Ft&&(dt.text=Ft),Wt!==void 0&&(dt.origin=Wt)}),tn(it,"beforeChange",it,dt),it.cm&&tn(it.cm,"beforeChange",it.cm,dt),dt.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:dt.from,to:dt.to,text:dt.text,origin:dt.origin}}function Zs(it,st,ct){if(it.cm){if(!it.cm.curOp)return hn(it.cm,Zs)(it,st,ct);if(it.cm.state.suppressEdits)return}if(!((Un(it,"beforeChange")||it.cm&&Un(it.cm,"beforeChange"))&&(st=ka(it,st,!0),!st))){var dt=uo&&!ct&&bo(it,st.from,st.to);if(dt)for(var pt=dt.length-1;pt>=0;--pt)xs(it,{from:dt[pt].from,to:dt[pt].to,text:pt?[""]:st.text,origin:st.origin});else xs(it,st)}}function xs(it,st){if(!(st.text.length==1&&st.text[0]==""&&Qe(st.from,st.to)==0)){var ct=Os(it,st);Nr(it,st,ct,it.cm?it.cm.curOp.id:NaN),ou(it,st,ct,Li(it,st));var dt=[];ia(it,function(pt,Et){!Et&&_e(dt,pt.history)==-1&&(Ms(pt.history,st),dt.push(pt.history)),ou(pt,st,null,Li(pt,st))})}}function Zl(it,st,ct){var dt=it.cm&&it.cm.state.suppressEdits;if(!(dt&&!ct)){for(var pt=it.history,Et,Ft=it.sel,Wt=st=="undo"?pt.done:pt.undone,zt=st=="undo"?pt.undone:pt.done,re=0;re<Wt.length&&(Et=Wt[re],!(ct?Et.ranges&&!Et.equals(it.sel):!Et.ranges));re++);if(re!=Wt.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(Et=Wt.pop(),Et.ranges){if(la(Et,zt),ct&&!Et.equals(it.sel)){Ss(it,Et,{clearRedo:!1});return}Ft=Et}else if(dt){Wt.push(Et);return}else break;var ze=[];la(Ft,zt),zt.push({changes:ze,generation:pt.generation}),pt.generation=Et.generation||++pt.maxGeneration;for(var ge=Un(it,"beforeChange")||it.cm&&Un(it.cm,"beforeChange"),yn=function(li){var yi=Et.changes[li];if(yi.origin=st,ge&&!ka(it,yi,!1))return Wt.length=0,{};ze.push(Kr(it,yi));var ji=li?Os(it,yi):Ce(Wt);ou(it,yi,ji,ta(it,yi)),!li&&it.cm&&it.cm.scrollIntoView({from:yi.from,to:Qr(yi)});var co=[];ia(it,function(eo,Eo){!Eo&&_e(co,eo.history)==-1&&(Ms(eo.history,yi),co.push(eo.history)),ou(eo,yi,null,ta(eo,yi))})},an=Et.changes.length-1;an>=0;--an){var Qn=yn(an);if(Qn)return Qn.v}}}}function vh(it,st){if(st!=0&&(it.first+=st,it.sel=new Uo($n(it.sel.ranges,function(pt){return new Ri(Ke(pt.anchor.line+st,pt.anchor.ch),Ke(pt.head.line+st,pt.head.ch))}),it.sel.primIndex),it.cm)){Ps(it.cm,it.first,it.first-st,st);for(var ct=it.cm.display,dt=ct.viewFrom;dt<ct.viewTo;dt++)vr(it.cm,dt,"gutter")}}function ou(it,st,ct,dt){if(it.cm&&!it.cm.curOp)return hn(it.cm,ou)(it,st,ct,dt);if(st.to.line<it.first){vh(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var pt=st.text.length-1-(it.first-st.from.line);vh(it,pt),st={from:Ke(it.first,0),to:Ke(st.to.line+pt,st.to.ch),text:[Ce(st.text)],origin:st.origin}}var Et=it.lastLine();st.to.line>Et&&(st={from:st.from,to:Ke(Et,He(it,Et).text.length),text:[st.text[0]],origin:st.origin}),st.removed=un(it,st.from,st.to),ct||(ct=Os(it,st)),it.cm?ju(it.cm,st,dt):Cs(it,st,dt),ya(it,ct,Ne),it.cantEdit&&iu(it,Ke(it.firstLine(),0))&&(it.cantEdit=!1)}}function ju(it,st,ct){var dt=it.doc,pt=it.display,Et=st.from,Ft=st.to,Wt=!1,zt=Et.line;it.options.lineWrapping||(zt=oe(ro(He(dt,Et.line))),dt.iter(zt,Ft.line+1,function(an){if(an==pt.maxLine)return Wt=!0,!0})),dt.sel.contains(st.from,st.to)>-1&&ri(it),Cs(dt,st,ct,Ks(it)),it.options.lineWrapping||(dt.iter(zt,Et.line+st.text.length,function(an){var Qn=jr(an);Qn>pt.maxLineLength&&(pt.maxLine=an,pt.maxLineLength=Qn,pt.maxLineChanged=!0,Wt=!1)}),Wt&&(it.curOp.updateMaxLine=!0)),zi(dt,Et.line),Nn(it,400);var re=st.text.length-(Ft.line-Et.line)-1;st.full?Ps(it):Et.line==Ft.line&&st.text.length==1&&!Rs(it.doc,st)?vr(it,Et.line,"text"):Ps(it,Et.line,Ft.line+1,re);var ze=Un(it,"changes"),ge=Un(it,"change");if(ge||ze){var yn={from:Et,to:Ft,text:st.text,removed:st.removed,origin:st.origin};ge&&hi(it,"change",it,yn),ze&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(yn)}it.display.selForContextMenu=null}function th(it,st,ct,dt,pt){var Et;dt||(dt=ct),Qe(dt,ct)<0&&(Et=[dt,ct],ct=Et[0],dt=Et[1]),typeof st=="string"&&(st=it.splitLines(st)),Zs(it,{from:ct,to:dt,text:st,origin:pt})}function Tl(it,st,ct,dt){ct<it.line?it.line+=dt:st<it.line&&(it.line=st,it.ch=0)}function Zr(it,st,ct,dt){for(var pt=0;pt<it.length;++pt){var Et=it[pt],Ft=!0;if(Et.ranges){Et.copied||(Et=it[pt]=Et.deepCopy(),Et.copied=!0);for(var Wt=0;Wt<Et.ranges.length;Wt++)Tl(Et.ranges[Wt].anchor,st,ct,dt),Tl(Et.ranges[Wt].head,st,ct,dt);continue}for(var zt=0;zt<Et.changes.length;++zt){var re=Et.changes[zt];if(ct<re.from.line)re.from=Ke(re.from.line+dt,re.from.ch),re.to=Ke(re.to.line+dt,re.to.ch);else if(st<=re.to.line){Ft=!1;break}}Ft||(it.splice(0,pt+1),pt=0)}}function Ms(it,st){var ct=st.from.line,dt=st.to.line,pt=st.text.length-(dt-ct)-1;Zr(it.done,ct,dt,pt),Zr(it.undone,ct,dt,pt)}function ua(it,st,ct,dt){var pt=st,Et=st;return typeof st=="number"?Et=He(it,_n(it,st)):pt=oe(st),pt==null?null:(dt(Et,pt)&&it.cm&&vr(it.cm,pt,ct),Et)}function Es(it){this.lines=it,this.parent=null;for(var st=0,ct=0;ct<it.length;++ct)it[ct].parent=this,st+=it[ct].height;this.height=st}Es.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var ct=it,dt=it+st;ct<dt;++ct){var pt=this.lines[ct];this.height-=pt.height,ns(pt),hi(pt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,ct){this.height+=ct,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var dt=0;dt<st.length;++dt)st[dt].parent=this},iterN:function(it,st,ct){for(var dt=it+st;it<dt;++it)if(ct(this.lines[it]))return!0}};function Rr(it){this.children=it;for(var st=0,ct=0,dt=0;dt<it.length;++dt){var pt=it[dt];st+=pt.chunkSize(),ct+=pt.height,pt.parent=this}this.size=st,this.height=ct,this.parent=null}Rr.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var ct=0;ct<this.children.length;++ct){var dt=this.children[ct],pt=dt.chunkSize();if(it<pt){var Et=Math.min(st,pt-it),Ft=dt.height;if(dt.removeInner(it,Et),this.height-=Ft-dt.height,pt==Et&&(this.children.splice(ct--,1),dt.parent=null),(st-=Et)==0)break;it=0}else it-=pt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Es))){var Wt=[];this.collapse(Wt),this.children=[new Es(Wt)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ct){this.size+=st.length,this.height+=ct;for(var dt=0;dt<this.children.length;++dt){var pt=this.children[dt],Et=pt.chunkSize();if(it<=Et){if(pt.insertInner(it,st,ct),pt.lines&&pt.lines.length>50){for(var Ft=pt.lines.length%25+25,Wt=Ft;Wt<pt.lines.length;){var zt=new Es(pt.lines.slice(Wt,Wt+=25));pt.height-=zt.height,this.children.splice(++dt,0,zt),zt.parent=this}pt.lines=pt.lines.slice(0,Ft),this.maybeSpill()}break}it-=Et}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ct=new Rr(st);if(it.parent){it.size-=ct.size,it.height-=ct.height;var pt=_e(it.parent.children,it);it.parent.children.splice(pt+1,0,ct)}else{var dt=new Rr(it.children);dt.parent=it,it.children=[dt,ct],it=dt}ct.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,ct){for(var dt=0;dt<this.children.length;++dt){var pt=this.children[dt],Et=pt.chunkSize();if(it<Et){var Ft=Math.min(st,Et-it);if(pt.iterN(it,Ft,ct))return!0;if((st-=Ft)==0)break;it=0}else it-=Et}}};var Sa=function(it,st,ct){if(ct)for(var dt in ct)ct.hasOwnProperty(dt)&&(this[dt]=ct[dt]);this.doc=it,this.node=st};Sa.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ct=this.line,dt=oe(ct);if(!(dt==null||!st)){for(var pt=0;pt<st.length;++pt)st[pt]==this&&st.splice(pt--,1);st.length||(ct.widgets=null);var Et=Ia(this);Fn(ct,Math.max(0,ct.height-Et)),it&&(Fe(it,function(){xl(it,ct,-Et),vr(it,dt,"widget")}),hi(it,"lineWidgetCleared",it,this,dt))}},Sa.prototype.changed=function(){var it=this,st=this.height,ct=this.doc.cm,dt=this.line;this.height=null;var pt=Ia(this)-st;pt&&(kn(this.doc,dt)||Fn(dt,dt.height+pt),ct&&Fe(ct,function(){ct.curOp.forceUpdate=!0,xl(ct,dt,pt),hi(ct,"lineWidgetChanged",ct,it,oe(dt))}))},si(Sa);function xl(it,st,ct){Jo(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&Ec(it,ct)}function wu(it,st,ct,dt){var pt=new Sa(it,ct,dt),Et=it.cm;return Et&&pt.noHScroll&&(Et.display.alignWidgets=!0),ua(it,st,"widget",function(Ft){var Wt=Ft.widgets||(Ft.widgets=[]);if(pt.insertAt==null?Wt.push(pt):Wt.splice(Math.min(Wt.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Ft,Et&&!kn(it,Ft)){var zt=Jo(Ft)<it.scrollTop;Fn(Ft,Ft.height+Ia(pt)),zt&&Ec(Et,pt.height),Et.curOp.forceUpdate=!0}return!0}),Et&&hi(Et,"lineWidgetAdded",Et,pt,typeof st=="number"?st:oe(st)),pt}var uf=0,ke=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++uf};ke.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&yl(it),Un(this,"clear")){var ct=this.find();ct&&hi(this,"clear",ct.from,ct.to)}for(var dt=null,pt=null,Et=0;Et<this.lines.length;++Et){var Ft=this.lines[Et],Wt=Er(Ft.markedSpans,this);it&&!this.collapsed?vr(it,oe(Ft),"text"):it&&(Wt.to!=null&&(pt=oe(Ft)),Wt.from!=null&&(dt=oe(Ft))),Ft.markedSpans=zo(Ft.markedSpans,Wt),Wt.from==null&&this.collapsed&&!kn(this.doc,Ft)&&it&&Fn(Ft,Ju(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var zt=0;zt<this.lines.length;++zt){var re=ro(this.lines[zt]),ze=jr(re);ze>it.display.maxLineLength&&(it.display.maxLine=re,it.display.maxLineLength=ze,it.display.maxLineChanged=!0)}dt!=null&&it&&this.collapsed&&Ps(it,dt,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Wl(it.doc)),it&&hi(it,"markerCleared",it,this,dt,pt),st&&Fh(it),this.parent&&this.parent.clear()}},ke.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ct,dt,pt=0;pt<this.lines.length;++pt){var Et=this.lines[pt],Ft=Er(Et.markedSpans,this);if(Ft.from!=null&&(ct=Ke(st?Et:oe(Et),Ft.from),it==-1))return ct;if(Ft.to!=null&&(dt=Ke(st?Et:oe(Et),Ft.to),it==1))return dt}return ct&&{from:ct,to:dt}},ke.prototype.changed=function(){var it=this,st=this.find(-1,!0),ct=this,dt=this.doc.cm;!st||!dt||Fe(dt,function(){var pt=st.line,Et=oe(st.line),Ft=yu(dt,Et);if(Ft&&(mo(Ft),dt.curOp.selectionChanged=dt.curOp.forceUpdate=!0),dt.curOp.updateMaxLine=!0,!kn(ct.doc,pt)&&ct.height!=null){var Wt=ct.height;ct.height=null;var zt=Ia(ct)-Wt;zt&&Fn(pt,pt.height+zt)}hi(dt,"markerChanged",dt,it)})},ke.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||_e(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},ke.prototype.detachLine=function(it){if(this.lines.splice(_e(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},si(ke);function Ih(it,st,ct,dt,pt){if(dt&&dt.shared)return hf(it,st,ct,dt,pt);if(it.cm&&!it.cm.curOp)return hn(it.cm,Ih)(it,st,ct,dt,pt);var Et=new ke(it,pt),Ft=Qe(st,ct);if(dt&&Mn(dt,Et,!1),Ft>0||Ft==0&&Et.clearWhenEmpty!==!1)return Et;if(Et.replacedWith&&(Et.collapsed=!0,Et.widgetNode=he("span",[Et.replacedWith],"CodeMirror-widget"),dt.handleMouseEvents||Et.widgetNode.setAttribute("cm-ignore-events","true"),dt.insertLeft&&(Et.widgetNode.insertLeft=!0)),Et.collapsed){if(Ko(it,st.line,st,ct,Et)||st.line!=ct.line&&Ko(it,ct.line,st,ct,Et))throw new Error("Inserting collapsed marker partially overlapping an existing one");sn()}Et.addToHistory&&Nr(it,{from:st,to:ct,origin:"markText"},it.sel,NaN);var Wt=st.line,zt=it.cm,re;if(it.iter(Wt,ct.line+1,function(ge){zt&&Et.collapsed&&!zt.options.lineWrapping&&ro(ge)==zt.display.maxLine&&(re=!0),Et.collapsed&&Wt!=st.line&&Fn(ge,0),Fr(ge,new ho(Et,Wt==st.line?st.ch:null,Wt==ct.line?ct.ch:null)),++Wt}),Et.collapsed&&it.iter(st.line,ct.line+1,function(ge){kn(it,ge)&&Fn(ge,0)}),Et.clearOnEnter&&en(Et,"beforeCursorEnter",function(){return Et.clear()}),Et.readOnly&&(Xo(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Et.collapsed&&(Et.id=++uf,Et.atomic=!0),zt){if(re&&(zt.curOp.updateMaxLine=!0),Et.collapsed)Ps(zt,st.line,ct.line+1);else if(Et.className||Et.startStyle||Et.endStyle||Et.css||Et.attributes||Et.title)for(var ze=st.line;ze<=ct.line;ze++)vr(zt,ze,"text");Et.atomic&&Wl(zt.doc),hi(zt,"markerAdded",zt,Et)}return Et}var eh=function(it,st){this.markers=it,this.primary=st;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};eh.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();hi(this,"clear")}},eh.prototype.find=function(it,st){return this.primary.find(it,st)},si(eh);function hf(it,st,ct,dt,pt){dt=Mn(dt),dt.shared=!1;var Et=[Ih(it,st,ct,dt,pt)],Ft=Et[0],Wt=dt.widgetNode;return ia(it,function(zt){Wt&&(dt.widgetNode=Wt.cloneNode(!0)),Et.push(Ih(zt,Vn(zt,st),Vn(zt,ct),dt,pt));for(var re=0;re<zt.linked.length;++re)if(zt.linked[re].isParent)return;Ft=Ce(Et)}),new eh(Et,Ft)}function Sd(it){return it.findMarks(Ke(it.first,0),it.clipPos(Ke(it.lastLine())),function(st){return st.parent})}function id(it,st){for(var ct=0;ct<st.length;ct++){var dt=st[ct],pt=dt.find(),Et=it.clipPos(pt.from),Ft=it.clipPos(pt.to);if(Qe(Et,Ft)){var Wt=Ih(it,Et,Ft,dt.primary,dt.primary.type);dt.markers.push(Wt),Wt.parent=dt}}}function bc(it){for(var st=function(dt){var pt=it[dt],Et=[pt.primary.doc];ia(pt.primary.doc,function(zt){return Et.push(zt)});for(var Ft=0;Ft<pt.markers.length;Ft++){var Wt=pt.markers[Ft];_e(Et,Wt.doc)==-1&&(Wt.parent=null,pt.markers.splice(Ft--,1))}},ct=0;ct<it.length;ct++)st(ct)}var Ug=0,Aa=function(it,st,ct,dt,pt){if(!(this instanceof Aa))return new Aa(it,st,ct,dt,pt);ct==null&&(ct=0),Rr.call(this,[new Es([new Ur("",null)])]),this.first=ct,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ct;var Et=Ke(ct,0);this.sel=fr(Et),this.history=new xo(null),this.id=++Ug,this.modeOption=st,this.lineSep=dt,this.direction=pt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Cs(this,{from:Et,to:Et,text:it}),Ss(this,fr(Et),Ne)};Aa.prototype=Lt(Rr.prototype,{constructor:Aa,iter:function(it,st,ct){ct?this.iterN(it-this.first,st-it,ct):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var ct=0,dt=0;dt<st.length;++dt)ct+=st[dt].height;this.insertInner(it-this.first,st,ct)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=An(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:rn(function(it){var st=Ke(this.first,0),ct=this.first+this.size-1;Zs(this,{from:st,to:Ke(ct,He(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&ed(this.cm,0,0),Ss(this,fr(st),Ne)}),replaceRange:function(it,st,ct,dt){st=Vn(this,st),ct=ct?Vn(this,ct):st,th(this,it,st,ct,dt)},getRange:function(it,st,ct){var dt=un(this,Vn(this,it),Vn(this,st));return ct===!1?dt:dt.join(ct||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(bn(this,it))return He(this,it)},getLineNumber:function(it){return oe(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=He(this,it)),ro(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Vn(this,it)},getCursor:function(it){var st=this.sel.primary(),ct;return it==null||it=="head"?ct=st.head:it=="anchor"?ct=st.anchor:it=="end"||it=="to"||it===!1?ct=st.to():ct=st.from(),ct},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:rn(function(it,st,ct){Qs(this,Vn(this,typeof it=="number"?Ke(it,st||0):it),null,ct)}),setSelection:rn(function(it,st,ct){Qs(this,Vn(this,it),Vn(this,st||it),ct)}),extendSelection:rn(function(it,st,ct){_r(this,Vn(this,it),st&&Vn(this,st),ct)}),extendSelections:rn(function(it,st){ss(this,Qi(this,it),st)}),extendSelectionsBy:rn(function(it,st){var ct=$n(this.sel.ranges,it);ss(this,Qi(this,ct),st)}),setSelections:rn(function(it,st,ct){if(it.length){for(var dt=[],pt=0;pt<it.length;pt++)dt[pt]=new Ri(Vn(this,it[pt].anchor),Vn(this,it[pt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Ss(this,sr(this.cm,dt,st),ct)}}),addSelection:rn(function(it,st,ct){var dt=this.sel.ranges.slice(0);dt.push(new Ri(Vn(this,it),Vn(this,st||it))),Ss(this,sr(this.cm,dt,dt.length-1),ct)}),getSelection:function(it){for(var st=this.sel.ranges,ct,dt=0;dt<st.length;dt++){var pt=un(this,st[dt].from(),st[dt].to());ct=ct?ct.concat(pt):pt}return it===!1?ct:ct.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],ct=this.sel.ranges,dt=0;dt<ct.length;dt++){var pt=un(this,ct[dt].from(),ct[dt].to());it!==!1&&(pt=pt.join(it||this.lineSeparator())),st[dt]=pt}return st},replaceSelection:function(it,st,ct){for(var dt=[],pt=0;pt<this.sel.ranges.length;pt++)dt[pt]=it;this.replaceSelections(dt,st,ct||"+input")},replaceSelections:rn(function(it,st,ct){for(var dt=[],pt=this.sel,Et=0;Et<pt.ranges.length;Et++){var Ft=pt.ranges[Et];dt[Et]={from:Ft.from(),to:Ft.to(),text:this.splitLines(it[Et]),origin:ct}}for(var Wt=st&&st!="end"&&ur(this,dt,st),zt=dt.length-1;zt>=0;zt--)Zs(this,dt[zt]);Wt?Cr(this,Wt):this.cm&&Nh(this.cm)}),undo:rn(function(){Zl(this,"undo")}),redo:rn(function(){Zl(this,"redo")}),undoSelection:rn(function(){Zl(this,"undo",!0)}),redoSelection:rn(function(){Zl(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,ct=0,dt=0;dt<it.done.length;dt++)it.done[dt].ranges||++st;for(var pt=0;pt<it.undone.length;pt++)it.undone[pt].ranges||++ct;return{undo:st,redo:ct}},clearHistory:function(){var it=this;this.history=new xo(this.history.maxGeneration),ia(this,function(st){return st.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:ma(this.history.done),undone:ma(this.history.undone)}},setHistory:function(it){var st=this.history=new xo(this.history.maxGeneration);st.done=ma(it.done.slice(0),null,!0),st.undone=ma(it.undone.slice(0),null,!0)},setGutterMarker:rn(function(it,st,ct){return ua(this,it,"gutter",function(dt){var pt=dt.gutterMarkers||(dt.gutterMarkers={});return pt[st]=ct,!ct&&xt(pt)&&(dt.gutterMarkers=null),!0})}),clearGutter:rn(function(it){var st=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&ua(st,ct,"gutter",function(){return ct.gutterMarkers[it]=null,xt(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!bn(this,it)||(st=it,it=He(this,it),!it))return null}else if(st=oe(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:rn(function(it,st,ct){return ua(this,it,st=="gutter"?"gutter":"class",function(dt){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!dt[pt])dt[pt]=ct;else{if(Bt(ct).test(dt[pt]))return!1;dt[pt]+=" "+ct}return!0})}),removeLineClass:rn(function(it,st,ct){return ua(this,it,st=="gutter"?"gutter":"class",function(dt){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Et=dt[pt];if(Et)if(ct==null)dt[pt]=null;else{var Ft=Et.match(Bt(ct));if(!Ft)return!1;var Wt=Ft.index+Ft[0].length;dt[pt]=Et.slice(0,Ft.index)+(!Ft.index||Wt==Et.length?"":" ")+Et.slice(Wt)||null}else return!1;return!0})}),addLineWidget:rn(function(it,st,ct){return wu(this,it,st,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ct){return Ih(this,Vn(this,it),Vn(this,st),ct,ct&&ct.type||"range")},setBookmark:function(it,st){var ct={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=Vn(this,it),Ih(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=Vn(this,it);var st=[],ct=He(this,it.line).markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt){var pt=ct[dt];(pt.from==null||pt.from<=it.ch)&&(pt.to==null||pt.to>=it.ch)&&st.push(pt.marker.parent||pt.marker)}return st},findMarks:function(it,st,ct){it=Vn(this,it),st=Vn(this,st);var dt=[],pt=it.line;return this.iter(it.line,st.line+1,function(Et){var Ft=Et.markedSpans;if(Ft)for(var Wt=0;Wt<Ft.length;Wt++){var zt=Ft[Wt];!(zt.to!=null&&pt==it.line&&it.ch>=zt.to||zt.from==null&&pt!=it.line||zt.from!=null&&pt==st.line&&zt.from>=st.ch)&&(!ct||ct(zt.marker))&&dt.push(zt.marker.parent||zt.marker)}++pt}),dt},getAllMarks:function(){var it=[];return this.iter(function(st){var ct=st.markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt)ct[dt].from!=null&&it.push(ct[dt].marker)}),it},posFromIndex:function(it){var st,ct=this.first,dt=this.lineSeparator().length;return this.iter(function(pt){var Et=pt.text.length+dt;if(Et>it)return st=it,!0;it-=Et,++ct}),Vn(this,Ke(ct,st))},indexFromPos:function(it){it=Vn(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var ct=this.lineSeparator().length;return this.iter(this.first,it.line,function(dt){st+=dt.text.length+ct}),st},copy:function(it){var st=new Aa(An(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,ct=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<ct&&(ct=it.to);var dt=new Aa(An(this,st,ct),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(dt.history=this.history),(this.linked||(this.linked=[])).push({doc:dt,sharedHist:it.sharedHist}),dt.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],id(dt,Sd(this)),dt},unlinkDoc:function(it){if(it instanceof os&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var ct=this.linked[st];if(ct.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),bc(Sd(this));break}}if(it.history==this.history){var dt=[it.id];ia(it,function(pt){return dt.push(pt.id)},!0),it.history=new xo(null),it.history.done=ma(this.history.done,dt),it.history.undone=ma(this.history.undone,dt)}},iterLinkedDocs:function(it){ia(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Ro(it)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:rn(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&Yo(this.cm))})}),Aa.prototype.eachLine=Aa.prototype.iter;var Qd=0;function kc(it){var st=this;if(Yf(st),!(ii(st,it)||Da(st.display,it))){mi(it),ne&&(Qd=+new Date);var ct=rl(st,it,!0),dt=it.dataTransfer.files;if(!(!ct||st.isReadOnly()))if(dt&&dt.length&&window.FileReader&&window.File)for(var pt=dt.length,Et=Array(pt),Ft=0,Wt=function(){++Ft==pt&&hn(st,function(){ct=Vn(st.doc,ct);var an={from:ct,to:ct,text:st.doc.splitLines(Et.filter(function(Qn){return Qn!=null}).join(st.doc.lineSeparator())),origin:"paste"};Zs(st.doc,an),Cr(st.doc,fr(Vn(st.doc,ct),Vn(st.doc,Qr(an))))})()},zt=function(an,Qn){if(st.options.allowDropFileTypes&&_e(st.options.allowDropFileTypes,an.type)==-1){Wt();return}var li=new FileReader;li.onerror=function(){return Wt()},li.onload=function(){var yi=li.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(yi)){Wt();return}Et[Qn]=yi,Wt()},li.readAsText(an)},re=0;re<dt.length;re++)zt(dt[re],re);else{if(st.state.draggingText&&st.doc.sel.contains(ct)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var ze=it.dataTransfer.getData("Text");if(ze){var ge;if(st.state.draggingText&&!st.state.draggingText.copy&&(ge=st.listSelections()),ya(st.doc,fr(ct,ct)),ge)for(var yn=0;yn<ge.length;++yn)th(st.doc,"",ge[yn].anchor,ge[yn].head,"drag");st.replaceSelection(ze,"around","paste"),st.display.input.focus()}}catch(an){}}}}function Jd(it,st){if(ne&&(!it.state.draggingText||+new Date-Qd<100)){Lo(st);return}if(!(ii(it,st)||Da(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!Be)){var ct=Vt("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Jt&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),st.dataTransfer.setDragImage(ct,0,0),Jt&&ct.parentNode.removeChild(ct)}}function df(it,st){var ct=rl(it,st);if(ct){var dt=document.createDocumentFragment();Dr(it,ct,dt),it.display.dragCursor||(it.display.dragCursor=Vt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),se(it.display.dragCursor,dt)}}function Yf(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function cf(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),ct=[],dt=0;dt<st.length;dt++){var pt=st[dt].CodeMirror;pt&&ct.push(pt)}ct.length&&ct[0].operation(function(){for(var Et=0;Et<ct.length;Et++)it(ct[Et])})}}var Ac=!1;function Ul(){Ac||(xd(),Ac=!0)}function xd(){var it;en(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,cf(ff)},100))}),en(window,"blur",function(){return cf(td)})}function ff(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var zu={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Dh=0;Dh<10;Dh++)zu[Dh+48]=zu[Dh+96]=String(Dh);for(var wd=65;wd<=90;wd++)zu[wd]=String.fromCharCode(wd);for(var od=1;od<=12;od++)zu[od+111]=zu[od+63235]="F"+od;var wl={};wl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},wl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},wl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},wl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},wl.default=ht?wl.macDefault:wl.pcDefault;function Nc(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ct,dt,pt,Et,Ft=0;Ft<st.length-1;Ft++){var Wt=st[Ft];if(/^(cmd|meta|m)$/i.test(Wt))Et=!0;else if(/^a(lt)?$/i.test(Wt))ct=!0;else if(/^(c|ctrl|control)$/i.test(Wt))dt=!0;else if(/^s(hift)?$/i.test(Wt))pt=!0;else throw new Error("Unrecognized modifier name: "+Wt)}return ct&&(it="Alt-"+it),dt&&(it="Ctrl-"+it),Et&&(it="Cmd-"+it),pt&&(it="Shift-"+it),it}function Tc(it){var st={};for(var ct in it)if(it.hasOwnProperty(ct)){var dt=it[ct];if(/^(name|fallthrough|(de|at)tach)$/.test(ct))continue;if(dt=="..."){delete it[ct];continue}for(var pt=$n(ct.split(" "),Nc),Et=0;Et<pt.length;Et++){var Ft=void 0,Wt=void 0;Et==pt.length-1?(Wt=pt.join(" "),Ft=dt):(Wt=pt.slice(0,Et+1).join(" "),Ft="...");var zt=st[Wt];if(!zt)st[Wt]=Ft;else if(zt!=Ft)throw new Error("Inconsistent bindings for "+Wt)}delete it[ct]}for(var re in st)it[re]=st[re];return it}function Vl(it,st,ct,dt){st=Oh(st);var pt=st.call?st.call(it,dt):st[it];if(pt===!1)return"nothing";if(pt==="...")return"multi";if(pt!=null&&ct(pt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return Vl(it,st.fallthrough,ct,dt);for(var Et=0;Et<st.fallthrough.length;Et++){var Ft=Vl(it,st.fallthrough[Et],ct,dt);if(Ft)return Ft}}}function Pd(it){var st=typeof it=="string"?it:zu[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Bc(it,st,ct){var dt=it;return st.altKey&&dt!="Alt"&&(it="Alt-"+it),(Pt?st.metaKey:st.ctrlKey)&&dt!="Ctrl"&&(it="Ctrl-"+it),(Pt?st.ctrlKey:st.metaKey)&&dt!="Mod"&&(it="Cmd-"+it),!ct&&st.shiftKey&&dt!="Shift"&&(it="Shift-"+it),it}function Fc(it,st){if(Jt&&it.keyCode==34&&it.char)return!1;var ct=zu[it.keyCode];return ct==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ct=it.code),Bc(ct,it,st))}function Oh(it){return typeof it=="string"?wl[it]:it}function al(it,st){for(var ct=it.doc.sel.ranges,dt=[],pt=0;pt<ct.length;pt++){for(var Et=st(ct[pt]);dt.length&&Qe(Et.from,Ce(dt).to)<=0;){var Ft=dt.pop();if(Qe(Ft.from,Et.from)<0){Et.from=Ft.from;break}}dt.push(Et)}Fe(it,function(){for(var Wt=dt.length-1;Wt>=0;Wt--)th(it.doc,"",dt[Wt].from,dt[Wt].to,"+delete");Nh(it)})}function Ic(it,st,ct){var dt=le(it.text,st+ct,ct);return dt<0||dt>it.text.length?null:dt}function ha(it,st,ct){var dt=Ic(it,st.ch,ct);return dt==null?null:new Ke(st.line,dt,ct<0?"after":"before")}function qr(it,st,ct,dt,pt){if(it){st.doc.direction=="rtl"&&(pt=-pt);var Et=vn(ct,st.doc.direction);if(Et){var Ft=pt<0?Ce(Et):Et[0],Wt=pt<0==(Ft.level==1),zt=Wt?"after":"before",re;if(Ft.level>0||st.doc.direction=="rtl"){var ze=tu(st,ct);re=pt<0?ct.text.length-1:0;var ge=Za(st,ze,re).top;re=ee(function(yn){return Za(st,ze,yn).top==ge},pt<0==(Ft.level==1)?Ft.from:Ft.to-1,re),zt=="before"&&(re=Ic(ct,re,1))}else re=pt<0?Ft.to:Ft.from;return new Ke(dt,re,zt)}}return new Ke(dt,pt<0?ct.text.length:0,pt<0?"before":"after")}function Fs(it,st,ct,dt){var pt=vn(st,it.doc.direction);if(!pt)return ha(st,ct,dt);ct.ch>=st.text.length?(ct.ch=st.text.length,ct.sticky="before"):ct.ch<=0&&(ct.ch=0,ct.sticky="after");var Et=ue(pt,ct.ch,ct.sticky),Ft=pt[Et];if(it.doc.direction=="ltr"&&Ft.level%2==0&&(dt>0?Ft.to>ct.ch:Ft.from<ct.ch))return ha(st,ct,dt);var Wt=function(ji,co){return Ic(st,ji instanceof Ke?ji.ch:ji,co)},zt,re=function(ji){return it.options.lineWrapping?(zt=zt||tu(it,st),Su(it,st,zt,ji)):{begin:0,end:st.text.length}},ze=re(ct.sticky=="before"?Wt(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Ft.level==1){var ge=Ft.level==1==dt<0,yn=Wt(ct,ge?1:-1);if(yn!=null&&(ge?yn<=Ft.to&&yn<=ze.end:yn>=Ft.from&&yn>=ze.begin)){var an=ge?"before":"after";return new Ke(ct.line,yn,an)}}var Qn=function(ji,co,eo){for(var Eo=function(_s,za){return za?new Ke(ct.line,Wt(_s,1),"before"):new Ke(ct.line,_s,"after")};ji>=0&&ji<pt.length;ji+=co){var ar=pt[ji],_i=co>0==(ar.level!=1),Mr=_i?eo.begin:Wt(eo.end,-1);if(ar.from<=Mr&&Mr<ar.to||(Mr=_i?ar.from:Wt(ar.to,-1),eo.begin<=Mr&&Mr<eo.end))return Eo(Mr,_i)}},li=Qn(Et+dt,dt,ze);if(li)return li;var yi=dt>0?ze.end:Wt(ze.begin,-1);return yi!=null&&!(dt>0&&yi==st.text.length)&&(li=Qn(dt>0?0:pt.length-1,dt,re(yi)),li)?li:null}var Ra={selectAll:$r,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Ne)},killLine:function(it){return al(it,function(st){if(st.empty()){var ct=He(it.doc,st.head.line).text.length;return st.head.ch==ct&&st.head.line<it.lastLine()?{from:st.head,to:Ke(st.head.line+1,0)}:{from:st.head,to:Ke(st.head.line,ct)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return al(it,function(st){return{from:Ke(st.from().line,0),to:Vn(it.doc,Ke(st.to().line+1,0))}})},delLineLeft:function(it){return al(it,function(st){return{from:Ke(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return al(it,function(st){var ct=it.charCoords(st.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return{from:dt,to:st.from()}})},delWrappedLineRight:function(it){return al(it,function(st){var ct=it.charCoords(st.head,"div").top+5,dt=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div");return{from:st.from(),to:dt}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(Ke(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Ke(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return ru(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Dc(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return su(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div")},Tn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:ct},"div")},Tn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return dt.ch<it.getLine(dt.line).search(/\S/)?Dc(it,st.head):dt},Tn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var st=[],ct=it.listSelections(),dt=it.options.tabSize,pt=0;pt<ct.length;pt++){var Et=ct[pt].from(),Ft=we(it.getLine(Et.line),Et.ch,dt);st.push(ui(dt-Ft%dt))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Fe(it,function(){for(var st=it.listSelections(),ct=[],dt=0;dt<st.length;dt++)if(st[dt].empty()){var pt=st[dt].head,Et=He(it.doc,pt.line).text;if(Et){if(pt.ch==Et.length&&(pt=new Ke(pt.line,pt.ch-1)),pt.ch>0)pt=new Ke(pt.line,pt.ch+1),it.replaceRange(Et.charAt(pt.ch-1)+Et.charAt(pt.ch-2),Ke(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Ft=He(it.doc,pt.line-1).text;Ft&&(pt=new Ke(pt.line,1),it.replaceRange(Et.charAt(0)+it.doc.lineSeparator()+Ft.charAt(Ft.length-1),Ke(pt.line-1,Ft.length-1),pt,"+transpose"))}}ct.push(new Ri(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return Fe(it,function(){for(var st=it.listSelections(),ct=st.length-1;ct>=0;ct--)it.replaceRange(it.doc.lineSeparator(),st[ct].anchor,st[ct].head,"+input");st=it.listSelections();for(var dt=0;dt<st.length;dt++)it.indentLine(st[dt].from().line,null,!0);Nh(it)})},openLine:function(it){return it.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function ru(it,st){var ct=He(it.doc,st),dt=ro(ct);return dt!=ct&&(st=oe(dt)),qr(!0,it,dt,st,1)}function su(it,st){var ct=He(it.doc,st),dt=lr(ct);return dt!=ct&&(st=oe(dt)),qr(!0,it,ct,st,-1)}function Dc(it,st){var ct=ru(it,st.line),dt=He(it.doc,ct.line),pt=vn(dt,it.doc.direction);if(!pt||pt[0].level==0){var Et=Math.max(ct.ch,dt.text.search(/\S/)),Ft=st.line==ct.line&&st.ch<=Et&&st.ch;return Ke(ct.line,Ft?0:Et,ct.sticky)}return ct}function Rh(it,st,ct){if(typeof st=="string"&&(st=Ra[st],!st))return!1;it.display.input.ensurePolled();var dt=it.display.shift,pt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ct&&(it.display.shift=!1),pt=st(it)!=Dn}finally{it.display.shift=dt,it.state.suppressEdits=!1}return pt}function _d(it,st,ct){for(var dt=0;dt<it.state.keyMaps.length;dt++){var pt=Vl(st,it.state.keyMaps[dt],ct,it);if(pt)return pt}return it.options.extraKeys&&Vl(st,it.options.extraKeys,ct,it)||Vl(st,it.options.keyMap,ct,it)}var Pu=new Yt;function yh(it,st,ct,dt){var pt=it.state.keySeq;if(pt){if(Pd(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:Pu.set(50,function(){it.state.keySeq==pt&&(it.state.keySeq=null,it.display.input.reset())}),Xf(it,pt+" "+st,ct,dt))return!0}return Xf(it,st,ct,dt)}function Xf(it,st,ct,dt){var pt=_d(it,st,dt);return pt=="multi"&&(it.state.keySeq=st),pt=="handled"&&hi(it,"keyHandled",it,st,ct),(pt=="handled"||pt=="multi")&&(mi(ct),gs(it)),!!pt}function Qf(it,st){var ct=Fc(st,!0);return ct?st.shiftKey&&!it.state.keySeq?yh(it,"Shift-"+ct,st,function(dt){return Rh(it,dt,!0)})||yh(it,ct,st,function(dt){if(typeof dt=="string"?/^go[A-Z]/.test(dt):dt.motion)return Rh(it,dt)}):yh(it,ct,st,function(dt){return Rh(it,dt)}):!1}function Jf(it,st,ct){return yh(it,"'"+ct+"'",st,function(dt){return Rh(it,dt,!0)})}var qd=null;function Vg(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=me(),!ii(st,it))){ne&&ae<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;st.display.shift=ct==16||it.shiftKey;var dt=Qf(st,it);Jt&&(qd=dt?ct:null,!dt&&ct==88&&!cr&&(ht?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),wt&&!ht&&!dt&&ct==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ct==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Yg(st)}}function Yg(it){var st=it.display.lineDiv;Ve(st,"CodeMirror-crosshair");function ct(dt){(dt.keyCode==18||!dt.altKey)&&(jt(st,"CodeMirror-crosshair"),ln(document,"keyup",ct),ln(document,"mouseover",ct))}en(document,"keyup",ct),en(document,"mouseover",ct)}function Xg(it){it.keyCode==16&&(this.doc.sel.shift=!1),ii(this,it)}function Sh(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(Da(st.display,it)||ii(st,it)||it.ctrlKey&&!it.altKey||ht&&it.metaKey)){var ct=it.keyCode,dt=it.charCode;if(Jt&&ct==qd){qd=null,mi(it);return}if(!(Jt&&(!it.which||it.which<10)&&Qf(st,it))){var pt=String.fromCharCode(dt==null?ct:dt);pt!="\b"&&(Jf(st,it,pt)||st.display.input.onKeyPress(it))}}}var om=400,Qg=function(it,st,ct){this.time=it,this.pos=st,this.button=ct};Qg.prototype.compare=function(it,st,ct){return this.time+om>it&&Qe(st,this.pos)==0&&ct==this.button};var Oc,$d;function Jg(it,st){var ct=+new Date;return $d&&$d.compare(ct,it,st)?(Oc=$d=null,"triple"):Oc&&Oc.compare(ct,it,st)?($d=new Qg(ct,it,st),Oc=null,"double"):(Oc=new Qg(ct,it,st),$d=null,"single")}function xh(it){var st=this,ct=st.display;if(!(ii(st,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,Da(ct,it)){Tt||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!$f(st,it)){var dt=rl(st,it),pt=No(it),Et=dt?Jg(dt,pt):"single";window.focus(),pt==1&&st.state.selectingText&&st.state.selectingText(it),!(dt&&_g(st,pt,dt,Et,it))&&(pt==1?dt?rm(st,dt,Et,it):Oo(it)==ct.scroller&&mi(it):pt==2?(dt&&_r(st.doc,dt),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(At?st.display.input.onContextMenu(it):Xs(st)))}}}function _g(it,st,ct,dt,pt){var Et="Click";return dt=="double"?Et="Double"+Et:dt=="triple"&&(Et="Triple"+Et),Et=(st==1?"Left":st==2?"Middle":"Right")+Et,yh(it,Bc(Et,pt),pt,function(Ft){if(typeof Ft=="string"&&(Ft=Ra[Ft]),!Ft)return!1;var Wt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Wt=Ft(it,ct)!=Dn}finally{it.state.suppressEdits=!1}return Wt})}function _f(it,st,ct){var dt=it.getOption("configureMouse"),pt=dt?dt(it,st,ct):{};if(pt.unit==null){var Et=lt?ct.shiftKey&&ct.metaKey:ct.altKey;pt.unit=Et?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||ct.shiftKey),pt.addNew==null&&(pt.addNew=ht?ct.metaKey:ct.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(ht?ct.altKey:ct.ctrlKey)),pt}function rm(it,st,ct,dt){ne?setTimeout(wn(Ds,it),0):it.curOp.focus=me();var pt=_f(it,ct,dt),Et=it.doc.sel,Ft;it.options.dragDrop&&Io&&!it.isReadOnly()&&ct=="single"&&(Ft=Et.contains(st))>-1&&(Qe((Ft=Et.ranges[Ft]).from(),st)<0||st.xRel>0)&&(Qe(Ft.to(),st)>0||st.xRel<0)?qg(it,dt,st,pt):ev(it,dt,st,pt)}function qg(it,st,ct,dt){var pt=it.display,Et=!1,Ft=hn(it,function(re){Tt&&(pt.scroller.draggable=!1),it.state.draggingText=!1,ln(pt.wrapper.ownerDocument,"mouseup",Ft),ln(pt.wrapper.ownerDocument,"mousemove",Wt),ln(pt.scroller,"dragstart",zt),ln(pt.scroller,"drop",Ft),Et||(mi(re),dt.addNew||_r(it.doc,ct,null,null,dt.extend),Tt&&!Be||ne&&ae==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),Wt=function(re){Et=Et||Math.abs(st.clientX-re.clientX)+Math.abs(st.clientY-re.clientY)>=10},zt=function(){return Et=!0};Tt&&(pt.scroller.draggable=!0),it.state.draggingText=Ft,Ft.copy=!dt.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),en(pt.wrapper.ownerDocument,"mouseup",Ft),en(pt.wrapper.ownerDocument,"mousemove",Wt),en(pt.scroller,"dragstart",zt),en(pt.scroller,"drop",Ft),Xs(it),setTimeout(function(){return pt.input.focus()},20)}function $g(it,st,ct){if(ct=="char")return new Ri(st,st);if(ct=="word")return it.findWordAt(st);if(ct=="line")return new Ri(Ke(st.line,0),Vn(it.doc,Ke(st.line+1,0)));var dt=ct(it,st);return new Ri(dt.from,dt.to)}function ev(it,st,ct,dt){var pt=it.display,Et=it.doc;mi(st);var Ft,Wt,zt=Et.sel,re=zt.ranges;if(dt.addNew&&!dt.extend?(Wt=Et.sel.contains(ct),Wt>-1?Ft=re[Wt]:Ft=new Ri(ct,ct)):(Ft=Et.sel.primary(),Wt=Et.sel.primIndex),dt.unit=="rectangle")dt.addNew||(Ft=new Ri(ct,ct)),ct=rl(it,st,!0,!0),Wt=-1;else{var ze=$g(it,ct,dt.unit);dt.extend?Ft=$u(Ft,ze.anchor,ze.head,dt.extend):Ft=ze}dt.addNew?Wt==-1?(Wt=re.length,Ss(Et,sr(it,re.concat([Ft]),Wt),{scroll:!1,origin:"*mouse"})):re.length>1&&re[Wt].empty()&&dt.unit=="char"&&!dt.extend?(Ss(Et,sr(it,re.slice(0,Wt).concat(re.slice(Wt+1)),0),{scroll:!1,origin:"*mouse"}),zt=Et.sel):ps(Et,Wt,Ft,pn):(Wt=0,Ss(Et,new Uo([Ft],0),pn),zt=Et.sel);var ge=ct;function yn(eo){if(Qe(ge,eo)!=0)if(ge=eo,dt.unit=="rectangle"){for(var Eo=[],ar=it.options.tabSize,_i=we(He(Et,ct.line).text,ct.ch,ar),Mr=we(He(Et,eo.line).text,eo.ch,ar),_s=Math.min(_i,Mr),za=Math.max(_i,Mr),oa=Math.min(ct.line,eo.line),Xl=Math.min(it.lastLine(),Math.max(ct.line,eo.line));oa<=Xl;oa++){var Pl=He(Et,oa).text,Ta=Yn(Pl,_s,ar);_s==za?Eo.push(new Ri(Ke(oa,Ta),Ke(oa,Ta))):Pl.length>Ta&&Eo.push(new Ri(Ke(oa,Ta),Ke(oa,Yn(Pl,za,ar))))}Eo.length||Eo.push(new Ri(ct,ct)),Ss(Et,sr(it,zt.ranges.slice(0,Wt).concat(Eo),Wt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(eo)}else{var au=Ft,ll=$g(it,eo,dt.unit),Ba=au.anchor,as;Qe(ll.anchor,Ba)>0?(as=ll.head,Ba=Hn(au.from(),ll.anchor)):(as=ll.anchor,Ba=fi(au.to(),ll.head));var da=zt.ranges.slice(0);da[Wt]=sm(it,new Ri(Vn(Et,Ba),as)),Ss(Et,sr(it,da,Wt),pn)}}var an=pt.wrapper.getBoundingClientRect(),Qn=0;function li(eo){var Eo=++Qn,ar=rl(it,eo,!0,dt.unit=="rectangle");if(ar)if(Qe(ar,ge)!=0){it.curOp.focus=me(),yn(ar);var _i=Ar(pt,Et);(ar.line>=_i.to||ar.line<_i.from)&&setTimeout(hn(it,function(){Qn==Eo&&li(eo)}),150)}else{var Mr=eo.clientY<an.top?-20:eo.clientY>an.bottom?20:0;Mr&&setTimeout(hn(it,function(){Qn==Eo&&(pt.scroller.scrollTop+=Mr,li(eo))}),50)}}function yi(eo){it.state.selectingText=!1,Qn=1/0,eo&&(mi(eo),pt.input.focus()),ln(pt.wrapper.ownerDocument,"mousemove",ji),ln(pt.wrapper.ownerDocument,"mouseup",co),Et.history.lastSelOrigin=null}var ji=hn(it,function(eo){eo.buttons===0||!No(eo)?yi(eo):li(eo)}),co=hn(it,yi);it.state.selectingText=co,en(pt.wrapper.ownerDocument,"mousemove",ji),en(pt.wrapper.ownerDocument,"mouseup",co)}function sm(it,st){var ct=st.anchor,dt=st.head,pt=He(it.doc,ct.line);if(Qe(ct,dt)==0&&ct.sticky==dt.sticky)return st;var Et=vn(pt);if(!Et)return st;var Ft=ue(Et,ct.ch,ct.sticky),Wt=Et[Ft];if(Wt.from!=ct.ch&&Wt.to!=ct.ch)return st;var zt=Ft+(Wt.from==ct.ch==(Wt.level!=1)?0:1);if(zt==0||zt==Et.length)return st;var re;if(dt.line!=ct.line)re=(dt.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var ze=ue(Et,dt.ch,dt.sticky),ge=ze-Ft||(dt.ch-ct.ch)*(Wt.level==1?-1:1);ze==zt-1||ze==zt?re=ge<0:re=ge>0}var yn=Et[zt+(re?-1:0)],an=re==(yn.level==1),Qn=an?yn.from:yn.to,li=an?"after":"before";return ct.ch==Qn&&ct.sticky==li?st:new Ri(new Ke(ct.line,Qn,li),dt)}function qf(it,st,ct,dt){var pt,Et;if(st.touches)pt=st.touches[0].clientX,Et=st.touches[0].clientY;else try{pt=st.clientX,Et=st.clientY}catch(yn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;dt&&mi(st);var Ft=it.display,Wt=Ft.lineDiv.getBoundingClientRect();if(Et>Wt.bottom||!Un(it,ct))return Xi(st);Et-=Wt.top-Ft.viewOffset;for(var zt=0;zt<it.display.gutterSpecs.length;++zt){var re=Ft.gutters.childNodes[zt];if(re&&re.getBoundingClientRect().right>=pt){var ze=qe(it.doc,Et),ge=it.display.gutterSpecs[zt];return tn(it,ct,it,ze,ge.className,st),Xi(st)}}}function $f(it,st){return qf(it,st,"gutterClick",!0)}function tg(it,st){Da(it.display,st)||am(it,st)||ii(it,st,"contextmenu")||At||it.display.input.onContextMenu(st)}function am(it,st){return Un(it,"gutterContextMenu")?qf(it,st,"gutterContextMenu",!1):!1}function eg(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ho(it)}var Cd={toString:function(){return"CodeMirror.Init"}},tp={},gf={};function lm(it){var st=it.optionHandlers;function ct(dt,pt,Et,Ft){it.defaults[dt]=pt,Et&&(st[dt]=Ft?function(Wt,zt,re){re!=Cd&&Et(Wt,zt,re)}:Et)}it.defineOption=ct,it.Init=Cd,ct("value","",function(dt,pt){return dt.setValue(pt)},!0),ct("mode",null,function(dt,pt){dt.doc.modeOption=pt,Ao(dt)},!0),ct("indentUnit",2,Ao,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(dt){zr(dt),Ho(dt),Ps(dt)},!0),ct("lineSeparator",null,function(dt,pt){if(dt.doc.lineSep=pt,!!pt){var Et=[],Ft=dt.doc.first;dt.doc.iter(function(zt){for(var re=0;;){var ze=zt.text.indexOf(pt,re);if(ze==-1)break;re=ze+pt.length,Et.push(Ke(Ft,ze))}Ft++});for(var Wt=Et.length-1;Wt>=0;Wt--)th(dt.doc,pt,Et[Wt],Ke(Et[Wt].line,Et[Wt].ch+pt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(dt,pt,Et){dt.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),Et!=Cd&&dt.refresh()}),ct("specialCharPlaceholder",vs,function(dt){return dt.refresh()},!0),ct("electricChars",!0),ct("inputStyle",nt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ct("spellcheck",!1,function(dt,pt){return dt.getInputField().spellcheck=pt},!0),ct("autocorrect",!1,function(dt,pt){return dt.getInputField().autocorrect=pt},!0),ct("autocapitalize",!1,function(dt,pt){return dt.getInputField().autocapitalize=pt},!0),ct("rtlMoveVisually",!gt),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(dt){eg(dt),Zi(dt)},!0),ct("keyMap","default",function(dt,pt,Et){var Ft=Oh(pt),Wt=Et!=Cd&&Oh(Et);Wt&&Wt.detach&&Wt.detach(dt,Ft),Ft.attach&&Ft.attach(dt,Wt||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,um,!0),ct("gutters",[],function(dt,pt){dt.display.gutterSpecs=fo(pt,dt.options.lineNumbers),Zi(dt)},!0),ct("fixedGutter",!0,function(dt,pt){dt.display.gutters.style.left=pt?yd(dt.display)+"px":"0",dt.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(dt){return Bh(dt)},!0),ct("scrollbarStyle","native",function(dt){lf(dt),Bh(dt),dt.display.scrollbars.setScrollTop(dt.doc.scrollTop),dt.display.scrollbars.setScrollLeft(dt.doc.scrollLeft)},!0),ct("lineNumbers",!1,function(dt,pt){dt.display.gutterSpecs=fo(dt.options.gutters,pt),Zi(dt)},!0),ct("firstLineNumber",1,Zi,!0),ct("lineNumberFormatter",function(dt){return dt},Zi,!0),ct("showCursorWhenSelecting",!1,Ma,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(dt,pt){pt=="nocursor"&&(td(dt),dt.display.input.blur()),dt.display.input.readOnlyChanged(pt)}),ct("screenReaderLabel",null,function(dt,pt){pt=pt===""?null:pt,dt.display.input.screenReaderLabelChanged(pt)}),ct("disableInput",!1,function(dt,pt){pt||dt.display.input.reset()},!0),ct("dragDrop",!0,ng),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,Ma,!0),ct("singleCursorHeightPerLine",!0,Ma,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,zr,!0),ct("addModeClass",!1,zr,!0),ct("pollInterval",100),ct("undoDepth",200,function(dt,pt){return dt.doc.history.undoDepth=pt}),ct("historyEventDelay",1250),ct("viewportMargin",10,function(dt){return dt.refresh()},!0),ct("maxHighlightLength",1e4,zr,!0),ct("moveInputWithCursor",!0,function(dt,pt){pt||dt.display.input.resetPosition()}),ct("tabindex",null,function(dt,pt){return dt.display.input.getField().tabIndex=pt||""}),ct("autofocus",null),ct("direction","ltr",function(dt,pt){return dt.doc.setDirection(pt)},!0),ct("phrases",null)}function ng(it,st,ct){var dt=ct&&ct!=Cd;if(!st!=!dt){var pt=it.display.dragFunctions,Et=st?en:ln;Et(it.display.scroller,"dragstart",pt.start),Et(it.display.scroller,"dragenter",pt.enter),Et(it.display.scroller,"dragover",pt.over),Et(it.display.scroller,"dragleave",pt.leave),Et(it.display.scroller,"drop",pt.drop)}}function um(it){it.options.lineWrapping?(Ve(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(jt(it.display.wrapper,"CodeMirror-wrap"),Ir(it)),To(it),Ps(it),Ho(it),setTimeout(function(){return Bh(it)},100)}function os(it,st){var ct=this;if(!(this instanceof os))return new os(it,st);this.options=st=st?Mn(st):{},Mn(tp,st,!1);var dt=st.value;typeof dt=="string"?dt=new Aa(dt,st.mode,null,st.lineSeparator,st.direction):st.mode&&(dt.modeOption=st.mode),this.doc=dt;var pt=new os.inputStyles[st.inputStyle](this),Et=this.display=new io(it,dt,pt,st);Et.wrapper.CodeMirror=this,eg(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),lf(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 Yt,keySeq:null,specialChars:null},st.autofocus&&!nt&&Et.input.focus(),ne&&ae<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Rc(this),Ul(),yl(this),this.curOp.forceUpdate=!0,Vo(this,dt),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&Gr(ct)},20):td(this);for(var Ft in gf)gf.hasOwnProperty(Ft)&&gf[Ft](this,st[Ft],Cd);Oi(this),st.finishInit&&st.finishInit(this);for(var Wt=0;Wt<tc.length;++Wt)tc[Wt](this);Fh(this),Tt&&st.lineWrapping&&getComputedStyle(Et.lineDiv).textRendering=="optimizelegibility"&&(Et.lineDiv.style.textRendering="auto")}os.defaults=tp,os.optionHandlers=gf;function Rc(it){var st=it.display;en(st.scroller,"mousedown",hn(it,xh)),ne&&ae<11?en(st.scroller,"dblclick",hn(it,function(zt){if(!ii(it,zt)){var re=rl(it,zt);if(!(!re||$f(it,zt)||Da(it.display,zt))){mi(zt);var ze=it.findWordAt(re);_r(it.doc,ze.anchor,ze.head)}}})):en(st.scroller,"dblclick",function(zt){return ii(it,zt)||mi(zt)}),en(st.scroller,"contextmenu",function(zt){return tg(it,zt)}),en(st.input.getField(),"contextmenu",function(zt){st.scroller.contains(zt.target)||tg(it,zt)});var ct,dt={end:0};function pt(){st.activeTouch&&(ct=setTimeout(function(){return st.activeTouch=null},1e3),dt=st.activeTouch,dt.end=+new Date)}function Et(zt){if(zt.touches.length!=1)return!1;var re=zt.touches[0];return re.radiusX<=1&&re.radiusY<=1}function Ft(zt,re){if(re.left==null)return!0;var ze=re.left-zt.left,ge=re.top-zt.top;return ze*ze+ge*ge>20*20}en(st.scroller,"touchstart",function(zt){if(!ii(it,zt)&&!Et(zt)&&!$f(it,zt)){st.input.ensurePolled(),clearTimeout(ct);var re=+new Date;st.activeTouch={start:re,moved:!1,prev:re-dt.end<=300?dt:null},zt.touches.length==1&&(st.activeTouch.left=zt.touches[0].pageX,st.activeTouch.top=zt.touches[0].pageY)}}),en(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),en(st.scroller,"touchend",function(zt){var re=st.activeTouch;if(re&&!Da(st,zt)&&re.left!=null&&!re.moved&&new Date-re.start<300){var ze=it.coordsChar(st.activeTouch,"page"),ge;!re.prev||Ft(re,re.prev)?ge=new Ri(ze,ze):!re.prev.prev||Ft(re,re.prev.prev)?ge=it.findWordAt(ze):ge=new Ri(Ke(ze.line,0),Vn(it.doc,Ke(ze.line+1,0))),it.setSelection(ge.anchor,ge.head),it.focus(),mi(zt)}pt()}),en(st.scroller,"touchcancel",pt),en(st.scroller,"scroll",function(){st.scroller.clientHeight&&(nd(it,st.scroller.scrollTop),qu(it,st.scroller.scrollLeft,!0),tn(it,"scroll",it))}),en(st.scroller,"mousewheel",function(zt){return Wo(it,zt)}),en(st.scroller,"DOMMouseScroll",function(zt){return Wo(it,zt)}),en(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(zt){ii(it,zt)||Lo(zt)},over:function(zt){ii(it,zt)||(df(it,zt),Lo(zt))},start:function(zt){return Jd(it,zt)},drop:hn(it,kc),leave:function(zt){ii(it,zt)||Yf(it)}};var Wt=st.input.getField();en(Wt,"keyup",function(zt){return Xg.call(it,zt)}),en(Wt,"keydown",hn(it,Vg)),en(Wt,"keypress",hn(it,Sh)),en(Wt,"focus",function(zt){return Gr(it,zt)}),en(Wt,"blur",function(zt){return td(it,zt)})}var tc=[];os.defineInitHook=function(it){return tc.push(it)};function ja(it,st,ct,dt){var pt=it.doc,Et;ct==null&&(ct="add"),ct=="smart"&&(pt.mode.indent?Et=jo(it,st).state:ct="prev");var Ft=it.options.tabSize,Wt=He(pt,st),zt=we(Wt.text,null,Ft);Wt.stateAfter&&(Wt.stateAfter=null);var re=Wt.text.match(/^\s*/)[0],ze;if(!dt&&!/\S/.test(Wt.text))ze=0,ct="not";else if(ct=="smart"&&(ze=pt.mode.indent(Et,Wt.text.slice(re.length),Wt.text),ze==Dn||ze>150)){if(!dt)return;ct="prev"}ct=="prev"?st>pt.first?ze=we(He(pt,st-1).text,null,Ft):ze=0:ct=="add"?ze=zt+it.options.indentUnit:ct=="subtract"?ze=zt-it.options.indentUnit:typeof ct=="number"&&(ze=zt+ct),ze=Math.max(0,ze);var ge="",yn=0;if(it.options.indentWithTabs)for(var an=Math.floor(ze/Ft);an;--an)yn+=Ft,ge+=" ";if(yn<ze&&(ge+=ui(ze-yn)),ge!=re)return th(pt,ge,Ke(st,0),Ke(st,re.length),"+input"),Wt.stateAfter=null,!0;for(var Qn=0;Qn<pt.sel.ranges.length;Qn++){var li=pt.sel.ranges[Qn];if(li.head.line==st&&li.head.ch<re.length){var yi=Ke(st,re.length);ps(pt,Qn,new Ri(yi,yi));break}}}var Yl=null;function ec(it){Yl=it}function pf(it,st,ct,dt,pt){var Et=it.doc;it.display.shift=!1,dt||(dt=Et.sel);var Ft=+new Date-200,Wt=pt=="paste"||it.state.pasteIncoming>Ft,zt=Ro(st),re=null;if(Wt&&dt.ranges.length>1)if(Yl&&Yl.text.join(`
|
|
|
`)==st){if(dt.ranges.length%Yl.text.length==0){re=[];for(var ze=0;ze<Yl.text.length;ze++)re.push(Et.splitLines(Yl.text[ze]))}}else zt.length==dt.ranges.length&&it.options.pasteLinesPerSelection&&(re=$n(zt,function(ji){return[ji]}));for(var ge=it.curOp.updateInput,yn=dt.ranges.length-1;yn>=0;yn--){var an=dt.ranges[yn],Qn=an.from(),li=an.to();an.empty()&&(ct&&ct>0?Qn=Ke(Qn.line,Qn.ch-ct):it.state.overwrite&&!Wt?li=Ke(li.line,Math.min(He(Et,li.line).text.length,li.ch+Ce(zt).length)):Wt&&Yl&&Yl.lineWise&&Yl.text.join(`
|
|
|
`)==zt.join(`
|
|
|
`)&&(Qn=li=Ke(Qn.line,0)));var yi={from:Qn,to:li,text:re?re[yn%re.length]:zt,origin:pt||(Wt?"paste":it.state.cutIncoming>Ft?"cut":"+input")};Zs(it.doc,yi),hi(it,"inputRead",it,yi)}st&&!Wt&&np(it,st),Nh(it),it.curOp.updateInput<2&&(it.curOp.updateInput=ge),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function ep(it,st){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&Fe(st,function(){return pf(st,ct,0,null,"paste")}),!0}function np(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ct=it.doc.sel,dt=ct.ranges.length-1;dt>=0;dt--){var pt=ct.ranges[dt];if(!(pt.head.ch>100||dt&&ct.ranges[dt-1].head.line==pt.head.line)){var Et=it.getModeAt(pt.head),Ft=!1;if(Et.electricChars){for(var Wt=0;Wt<Et.electricChars.length;Wt++)if(st.indexOf(Et.electricChars.charAt(Wt))>-1){Ft=ja(it,pt.head.line,"smart");break}}else Et.electricInput&&Et.electricInput.test(He(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Ft=ja(it,pt.head.line,"smart"));Ft&&hi(it,"electricInput",it,pt.head.line)}}}function ip(it){for(var st=[],ct=[],dt=0;dt<it.doc.sel.ranges.length;dt++){var pt=it.doc.sel.ranges[dt].head.line,Et={anchor:Ke(pt,0),head:Ke(pt+1,0)};ct.push(Et),st.push(it.getRange(Et.anchor,Et.head))}return{text:st,ranges:ct}}function op(it,st,ct,dt){it.setAttribute("autocorrect",ct?"":"off"),it.setAttribute("autocapitalize",dt?"":"off"),it.setAttribute("spellcheck",!!st)}function rp(){var it=Vt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=Vt("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Tt?it.style.width="1000px":it.setAttribute("wrap","off"),Nt&&(it.style.border="1px solid black"),op(it),st}function Md(it){var st=it.optionHandlers,ct=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(dt,pt){var Et=this.options,Ft=Et[dt];Et[dt]==pt&&dt!="mode"||(Et[dt]=pt,st.hasOwnProperty(dt)&&hn(this,st[dt])(this,pt,Ft),tn(this,"optionChange",this,dt))},getOption:function(dt){return this.options[dt]},getDoc:function(){return this.doc},addKeyMap:function(dt,pt){this.state.keyMaps[pt?"push":"unshift"](Oh(dt))},removeKeyMap:function(dt){for(var pt=this.state.keyMaps,Et=0;Et<pt.length;++Et)if(pt[Et]==dt||pt[Et].name==dt)return pt.splice(Et,1),!0},addOverlay:dn(function(dt,pt){var Et=dt.token?dt:it.getMode(this.options,dt);if(Et.startState)throw new Error("Overlays may not be stateful.");Pi(this.state.overlays,{mode:Et,modeSpec:dt,opaque:pt&&pt.opaque,priority:pt&&pt.priority||0},function(Ft){return Ft.priority}),this.state.modeGen++,Ps(this)}),removeOverlay:dn(function(dt){for(var pt=this.state.overlays,Et=0;Et<pt.length;++Et){var Ft=pt[Et].modeSpec;if(Ft==dt||typeof dt=="string"&&Ft.name==dt){pt.splice(Et,1),this.state.modeGen++,Ps(this);return}}}),indentLine:dn(function(dt,pt,Et){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),bn(this.doc,dt)&&ja(this,dt,pt,Et)}),indentSelection:dn(function(dt){for(var pt=this.doc.sel.ranges,Et=-1,Ft=0;Ft<pt.length;Ft++){var Wt=pt[Ft];if(Wt.empty())Wt.head.line>Et&&(ja(this,Wt.head.line,dt,!0),Et=Wt.head.line,Ft==this.doc.sel.primIndex&&Nh(this));else{var zt=Wt.from(),re=Wt.to(),ze=Math.max(Et,zt.line);Et=Math.min(this.lastLine(),re.line-(re.ch?0:1))+1;for(var ge=ze;ge<Et;++ge)ja(this,ge,dt);var yn=this.doc.sel.ranges;zt.ch==0&&pt.length==yn.length&&yn[Ft].from().ch>0&&ps(this.doc,Ft,new Ri(zt,yn[Ft].to()),Ne)}}}),getTokenAt:function(dt,pt){return vi(this,dt,pt)},getLineTokens:function(dt,pt){return vi(this,Ke(dt),pt,!0)},getTokenTypeAt:function(dt){dt=Vn(this.doc,dt);var pt=Co(this,He(this.doc,dt.line)),Et=0,Ft=(pt.length-1)/2,Wt=dt.ch,zt;if(Wt==0)zt=pt[2];else for(;;){var re=Et+Ft>>1;if((re?pt[re*2-1]:0)>=Wt)Ft=re;else if(pt[re*2+1]<Wt)Et=re+1;else{zt=pt[re*2+2];break}}var ze=zt?zt.indexOf("overlay "):-1;return ze<0?zt:ze==0?null:zt.slice(0,ze-1)},getModeAt:function(dt){var pt=this.doc.mode;return pt.innerMode?it.innerMode(pt,this.getTokenAt(dt).state).mode:pt},getHelper:function(dt,pt){return this.getHelpers(dt,pt)[0]},getHelpers:function(dt,pt){var Et=[];if(!ct.hasOwnProperty(pt))return Et;var Ft=ct[pt],Wt=this.getModeAt(dt);if(typeof Wt[pt]=="string")Ft[Wt[pt]]&&Et.push(Ft[Wt[pt]]);else if(Wt[pt])for(var zt=0;zt<Wt[pt].length;zt++){var re=Ft[Wt[pt][zt]];re&&Et.push(re)}else Wt.helperType&&Ft[Wt.helperType]?Et.push(Ft[Wt.helperType]):Ft[Wt.name]&&Et.push(Ft[Wt.name]);for(var ze=0;ze<Ft._global.length;ze++){var ge=Ft._global[ze];ge.pred(Wt,this)&&_e(Et,ge.val)==-1&&Et.push(ge.val)}return Et},getStateAfter:function(dt,pt){var Et=this.doc;return dt=_n(Et,dt==null?Et.first+Et.size-1:dt),jo(this,dt+1,pt).state},cursorCoords:function(dt,pt){var Et,Ft=this.doc.sel.primary();return dt==null?Et=Ft.head:typeof dt=="object"?Et=Vn(this.doc,dt):Et=dt?Ft.from():Ft.to(),fs(this,Et,pt||"page")},charCoords:function(dt,pt){return Ws(this,Vn(this.doc,dt),pt||"page")},coordsChar:function(dt,pt){return dt=Ts(this,dt,pt||"page"),eu(this,dt.left,dt.top)},lineAtHeight:function(dt,pt){return dt=Ts(this,{top:dt,left:0},pt||"page").top,qe(this.doc,dt+this.display.viewOffset)},heightAtLine:function(dt,pt,Et){var Ft=!1,Wt;if(typeof dt=="number"){var zt=this.doc.first+this.doc.size-1;dt<this.doc.first?dt=this.doc.first:dt>zt&&(dt=zt,Ft=!0),Wt=He(this.doc,dt)}else Wt=dt;return Lr(this,Wt,{top:0,left:0},pt||"page",Et||Ft).top+(Ft?this.doc.height-Jo(Wt):0)},defaultTextHeight:function(){return Ju(this.display)},defaultCharWidth:function(){return mh(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(dt,pt,Et,Ft,Wt){var zt=this.display;dt=fs(this,Vn(this.doc,dt));var re=dt.bottom,ze=dt.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),zt.sizer.appendChild(pt),Ft=="over")re=dt.top;else if(Ft=="above"||Ft=="near"){var ge=Math.max(zt.wrapper.clientHeight,this.doc.height),yn=Math.max(zt.sizer.clientWidth,zt.lineSpace.clientWidth);(Ft=="above"||dt.bottom+pt.offsetHeight>ge)&&dt.top>pt.offsetHeight?re=dt.top-pt.offsetHeight:dt.bottom+pt.offsetHeight<=ge&&(re=dt.bottom),ze+pt.offsetWidth>yn&&(ze=yn-pt.offsetWidth)}pt.style.top=re+"px",pt.style.left=pt.style.right="",Wt=="right"?(ze=zt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(Wt=="left"?ze=0:Wt=="middle"&&(ze=(zt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=ze+"px"),Et&&Xd(this,{left:ze,top:re,right:ze+pt.offsetWidth,bottom:re+pt.offsetHeight})},triggerOnKeyDown:dn(Vg),triggerOnKeyPress:dn(Sh),triggerOnKeyUp:Xg,triggerOnMouseDown:dn(xh),execCommand:function(dt){if(Ra.hasOwnProperty(dt))return Ra[dt].call(null,this)},triggerElectric:dn(function(dt){np(this,dt)}),findPosH:function(dt,pt,Et,Ft){var Wt=1;pt<0&&(Wt=-1,pt=-pt);for(var zt=Vn(this.doc,dt),re=0;re<pt&&(zt=mf(this.doc,zt,Wt,Et,Ft),!zt.hitSide);++re);return zt},moveH:dn(function(dt,pt){var Et=this;this.extendSelectionsBy(function(Ft){return Et.display.shift||Et.doc.extend||Ft.empty()?mf(Et.doc,Ft.head,dt,pt,Et.options.rtlMoveVisually):dt<0?Ft.from():Ft.to()},Tn)}),deleteH:dn(function(dt,pt){var Et=this.doc.sel,Ft=this.doc;Et.somethingSelected()?Ft.replaceSelection("",null,"+delete"):al(this,function(Wt){var zt=mf(Ft,Wt.head,dt,pt,!1);return dt<0?{from:zt,to:Wt.head}:{from:Wt.head,to:zt}})}),findPosV:function(dt,pt,Et,Ft){var Wt=1,zt=Ft;pt<0&&(Wt=-1,pt=-pt);for(var re=Vn(this.doc,dt),ze=0;ze<pt;++ze){var ge=fs(this,re,"div");if(zt==null?zt=ge.left:ge.left=zt,re=Ed(this,ge,Wt,Et),re.hitSide)break}return re},moveV:dn(function(dt,pt){var Et=this,Ft=this.doc,Wt=[],zt=!this.display.shift&&!Ft.extend&&Ft.sel.somethingSelected();if(Ft.extendSelectionsBy(function(ze){if(zt)return dt<0?ze.from():ze.to();var ge=fs(Et,ze.head,"div");ze.goalColumn!=null&&(ge.left=ze.goalColumn),Wt.push(ge.left);var yn=Ed(Et,ge,dt,pt);return pt=="page"&&ze==Ft.sel.primary()&&Ec(Et,Ws(Et,yn,"div").top-ge.top),yn},Tn),Wt.length)for(var re=0;re<Ft.sel.ranges.length;re++)Ft.sel.ranges[re].goalColumn=Wt[re]}),findWordAt:function(dt){var pt=this.doc,Et=He(pt,dt.line).text,Ft=dt.ch,Wt=dt.ch;if(Et){var zt=this.getHelper(dt,"wordChars");(dt.sticky=="before"||Wt==Et.length)&&Ft?--Ft:++Wt;for(var re=Et.charAt(Ft),ze=Kt(re,zt)?function(ge){return Kt(ge,zt)}:/\s/.test(re)?function(ge){return/\s/.test(ge)}:function(ge){return!/\s/.test(ge)&&!Kt(ge)};Ft>0&&ze(Et.charAt(Ft-1));)--Ft;for(;Wt<Et.length&&ze(Et.charAt(Wt));)++Wt}return new Ri(Ke(dt.line,Ft),Ke(dt.line,Wt))},toggleOverwrite:function(dt){dt!=null&&dt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ve(this.display.cursorDiv,"CodeMirror-overwrite"):jt(this.display.cursorDiv,"CodeMirror-overwrite"),tn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==me()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dn(function(dt,pt){ed(this,dt,pt)}),getScrollInfo:function(){var dt=this.display.scroller;return{left:dt.scrollLeft,top:dt.scrollTop,height:dt.scrollHeight-pa(this)-this.display.barHeight,width:dt.scrollWidth-pa(this)-this.display.barWidth,clientHeight:Fu(this),clientWidth:Oa(this)}},scrollIntoView:dn(function(dt,pt){dt==null?(dt={from:this.doc.sel.primary().head,to:null},pt==null&&(pt=this.options.cursorScrollMargin)):typeof dt=="number"?dt={from:Ke(dt,0),to:null}:dt.from==null&&(dt={from:dt,to:null}),dt.to||(dt.to=dt.from),dt.margin=pt||0,dt.from.line!=null?Wr(this,dt):sf(this,dt.from,dt.to,dt.margin)}),setSize:dn(function(dt,pt){var Et=this,Ft=function(zt){return typeof zt=="number"||/^\d+$/.test(String(zt))?zt+"px":zt};dt!=null&&(this.display.wrapper.style.width=Ft(dt)),pt!=null&&(this.display.wrapper.style.height=Ft(pt)),this.options.lineWrapping&&So(this);var Wt=this.display.viewFrom;this.doc.iter(Wt,this.display.viewTo,function(zt){if(zt.widgets){for(var re=0;re<zt.widgets.length;re++)if(zt.widgets[re].noHScroll){vr(Et,Wt,"widget");break}}++Wt}),this.curOp.forceUpdate=!0,tn(this,"refresh",this)}),operation:function(dt){return Fe(this,dt)},startOperation:function(){return yl(this)},endOperation:function(){return Fh(this)},refresh:dn(function(){var dt=this.display.cachedTextHeight;Ps(this),this.curOp.forceUpdate=!0,Ho(this),ed(this,this.doc.scrollLeft,this.doc.scrollTop),Vi(this.display),(dt==null||Math.abs(dt-Ju(this.display))>.5||this.options.lineWrapping)&&To(this),tn(this,"refresh",this)}),swapDoc:dn(function(dt){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),Vo(this,dt),Ho(this),this.display.input.reset(),ed(this,dt.scrollLeft,dt.scrollTop),this.curOp.forceScroll=!0,hi(this,"swapDoc",this,pt),pt}),phrase:function(dt){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,dt)?pt[dt]:dt},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}},si(it),it.registerHelper=function(dt,pt,Et){ct.hasOwnProperty(dt)||(ct[dt]=it[dt]={_global:[]}),ct[dt][pt]=Et},it.registerGlobalHelper=function(dt,pt,Et,Ft){it.registerHelper(dt,pt,Ft),ct[dt]._global.push({pred:Et,val:Ft})}}function mf(it,st,ct,dt,pt){var Et=st,Ft=ct,Wt=He(it,st.line),zt=pt&&it.direction=="rtl"?-ct:ct;function re(){var co=st.line+zt;return co<it.first||co>=it.first+it.size?!1:(st=new Ke(co,st.ch,st.sticky),Wt=He(it,co))}function ze(co){var eo;if(dt=="codepoint"){var Eo=Wt.text.charCodeAt(st.ch+(dt>0?0:-1));isNaN(Eo)?eo=null:eo=new Ke(st.line,Math.max(0,Math.min(Wt.text.length,st.ch+ct*(Eo>=55296&&Eo<56320?2:1))),-ct)}else pt?eo=Fs(it.cm,Wt,st,ct):eo=ha(Wt,st,ct);if(eo==null)if(!co&&re())st=qr(pt,it.cm,Wt,st.line,zt);else return!1;else st=eo;return!0}if(dt=="char"||dt=="codepoint")ze();else if(dt=="column")ze(!0);else if(dt=="word"||dt=="group")for(var ge=null,yn=dt=="group",an=it.cm&&it.cm.getHelper(st,"wordChars"),Qn=!0;!(ct<0&&!ze(!Qn));Qn=!1){var li=Wt.text.charAt(st.ch)||`
|
|
|
`,yi=Kt(li,an)?"w":yn&&li==`
|
|
|
`?"n":!yn||/\s/.test(li)?null:"p";if(yn&&!Qn&&!yi&&(yi="s"),ge&&ge!=yi){ct<0&&(ct=1,ze(),st.sticky="after");break}if(yi&&(ge=yi),ct>0&&!ze(!Qn))break}var ji=iu(it,st,Et,Ft,!0);return zn(Et,ji)&&(ji.hitSide=!0),ji}function Ed(it,st,ct,dt){var pt=it.doc,Et=st.left,Ft;if(dt=="page"){var Wt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),zt=Math.max(Wt-.5*Ju(it.display),3);Ft=(ct>0?st.bottom:st.top)+ct*zt}else dt=="line"&&(Ft=ct>0?st.bottom+3:st.top-3);for(var re;re=eu(it,Et,Ft),!!re.outside;){if(ct<0?Ft<=0:Ft>=pt.height){re.hitSide=!0;break}Ft+=ct*5}return re}var js=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Yt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};js.prototype.init=function(it){var st=this,ct=this,dt=ct.cm,pt=ct.div=it.lineDiv;op(pt,dt.options.spellcheck,dt.options.autocorrect,dt.options.autocapitalize);function Et(Wt){for(var zt=Wt.target;zt;zt=zt.parentNode){if(zt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(zt.className))break}return!1}en(pt,"paste",function(Wt){!Et(Wt)||ii(dt,Wt)||ep(Wt,dt)||ae<=11&&setTimeout(hn(dt,function(){return st.updateFromDOM()}),20)}),en(pt,"compositionstart",function(Wt){st.composing={data:Wt.data,done:!1}}),en(pt,"compositionupdate",function(Wt){st.composing||(st.composing={data:Wt.data,done:!1})}),en(pt,"compositionend",function(Wt){st.composing&&(Wt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),en(pt,"touchstart",function(){return ct.forceCompositionEnd()}),en(pt,"input",function(){st.composing||st.readFromDOMSoon()});function Ft(Wt){if(!(!Et(Wt)||ii(dt,Wt))){if(dt.somethingSelected())ec({lineWise:!1,text:dt.getSelections()}),Wt.type=="cut"&&dt.replaceSelection("",null,"cut");else if(dt.options.lineWiseCopyCut){var zt=ip(dt);ec({lineWise:!0,text:zt.text}),Wt.type=="cut"&&dt.operation(function(){dt.setSelections(zt.ranges,0,Ne),dt.replaceSelection("",null,"cut")})}else return;if(Wt.clipboardData){Wt.clipboardData.clearData();var re=Yl.text.join(`
|
|
|
`);if(Wt.clipboardData.setData("Text",re),Wt.clipboardData.getData("Text")==re){Wt.preventDefault();return}}var ze=rp(),ge=ze.firstChild;dt.display.lineSpace.insertBefore(ze,dt.display.lineSpace.firstChild),ge.value=Yl.text.join(`
|
|
|
`);var yn=document.activeElement;Je(ge),setTimeout(function(){dt.display.lineSpace.removeChild(ze),yn.focus(),yn==pt&&ct.showPrimarySelection()},50)}}en(pt,"copy",Ft),en(pt,"cut",Ft)},js.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},js.prototype.prepareSelection=function(){var it=$h(this.cm,!1);return it.focus=document.activeElement==this.div,it},js.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},js.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},js.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,ct=st.doc.sel.primary(),dt=ct.from(),pt=ct.to();if(st.display.viewTo==st.display.viewFrom||dt.line>=st.display.viewTo||pt.line<st.display.viewFrom){it.removeAllRanges();return}var Et=vf(st,it.anchorNode,it.anchorOffset),Ft=vf(st,it.focusNode,it.focusOffset);if(!(Et&&!Et.bad&&Ft&&!Ft.bad&&Qe(Hn(Et,Ft),dt)==0&&Qe(fi(Et,Ft),pt)==0)){var Wt=st.display.view,zt=dt.line>=st.display.viewFrom&&ig(st,dt)||{node:Wt[0].measure.map[2],offset:0},re=pt.line<st.display.viewTo&&ig(st,pt);if(!re){var ze=Wt[Wt.length-1].measure,ge=ze.maps?ze.maps[ze.maps.length-1]:ze.map;re={node:ge[ge.length-1],offset:ge[ge.length-2]-ge[ge.length-3]}}if(!zt||!re){it.removeAllRanges();return}var yn=it.rangeCount&&it.getRangeAt(0),an;try{an=Zt(zt.node,zt.offset,re.offset,re.node)}catch(Qn){}an&&(!wt&&st.state.focused?(it.collapse(zt.node,zt.offset),an.collapsed||(it.removeAllRanges(),it.addRange(an))):(it.removeAllRanges(),it.addRange(an)),yn&&it.anchorNode==null?it.addRange(yn):wt&&this.startGracePeriod()),this.rememberSelection()}},js.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},js.prototype.showMultipleSelections=function(it){se(this.cm.display.cursorDiv,it.cursors),se(this.cm.display.selectionDiv,it.selection)},js.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},js.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return Oe(this.div,st)},js.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},js.prototype.blur=function(){this.div.blur()},js.prototype.getField=function(){return this.div},js.prototype.supportsTouch=function(){return!0},js.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():Fe(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},js.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},js.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(et&&ye&&this.cm.display.gutterSpecs.length&&sp(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ct=vf(st,it.anchorNode,it.anchorOffset),dt=vf(st,it.focusNode,it.focusOffset);ct&&dt&&Fe(st,function(){Ss(st.doc,fr(ct,dt),Ne),(ct.bad||dt.bad)&&(st.curOp.selectionChanged=!0)})}}},js.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,ct=it.doc.sel.primary(),dt=ct.from(),pt=ct.to();if(dt.ch==0&&dt.line>it.firstLine()&&(dt=Ke(dt.line-1,He(it.doc,dt.line-1).length)),pt.ch==He(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=Ke(pt.line+1,0)),dt.line<st.viewFrom||pt.line>st.viewTo-1)return!1;var Et,Ft,Wt;dt.line==st.viewFrom||(Et=Ua(it,dt.line))==0?(Ft=oe(st.view[0].line),Wt=st.view[0].node):(Ft=oe(st.view[Et].line),Wt=st.view[Et-1].node.nextSibling);var zt=Ua(it,pt.line),re,ze;if(zt==st.view.length-1?(re=st.viewTo-1,ze=st.lineDiv.lastChild):(re=oe(st.view[zt+1].line)-1,ze=st.view[zt+1].node.previousSibling),!Wt)return!1;for(var ge=it.doc.splitLines(zc(it,Wt,ze,Ft,re)),yn=un(it.doc,Ke(Ft,0),Ke(re,He(it.doc,re).text.length));ge.length>1&&yn.length>1;)if(Ce(ge)==Ce(yn))ge.pop(),yn.pop(),re--;else if(ge[0]==yn[0])ge.shift(),yn.shift(),Ft++;else break;for(var an=0,Qn=0,li=ge[0],yi=yn[0],ji=Math.min(li.length,yi.length);an<ji&&li.charCodeAt(an)==yi.charCodeAt(an);)++an;for(var co=Ce(ge),eo=Ce(yn),Eo=Math.min(co.length-(ge.length==1?an:0),eo.length-(yn.length==1?an:0));Qn<Eo&&co.charCodeAt(co.length-Qn-1)==eo.charCodeAt(eo.length-Qn-1);)++Qn;if(ge.length==1&&yn.length==1&&Ft==dt.line)for(;an&&an>dt.ch&&co.charCodeAt(co.length-Qn-1)==eo.charCodeAt(eo.length-Qn-1);)an--,Qn++;ge[ge.length-1]=co.slice(0,co.length-Qn).replace(/^\u200b+/,""),ge[0]=ge[0].slice(an).replace(/\u200b+$/,"");var ar=Ke(Ft,an),_i=Ke(re,yn.length?Ce(yn).length-Qn:0);if(ge.length>1||ge[0]||Qe(ar,_i))return th(it.doc,ge,ar,_i,"+input"),!0},js.prototype.ensurePolled=function(){this.forceCompositionEnd()},js.prototype.reset=function(){this.forceCompositionEnd()},js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},js.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))},js.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Fe(this.cm,function(){return Ps(it.cm)})},js.prototype.setUneditable=function(it){it.contentEditable="false"},js.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||hn(this.cm,pf)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},js.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},js.prototype.onContextMenu=function(){},js.prototype.resetPosition=function(){},js.prototype.needsContentAttribute=!0;function ig(it,st){var ct=yu(it,st.line);if(!ct||ct.hidden)return null;var dt=He(it.doc,st.line),pt=ch(ct,dt,st.line),Et=vn(dt,it.doc.direction),Ft="left";if(Et){var Wt=ue(Et,st.ch);Ft=Wt%2?"right":"left"}var zt=ph(pt.map,st.ch,Ft);return zt.offset=zt.collapse=="right"?zt.end:zt.start,zt}function sp(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function jc(it,st){return st&&(it.bad=!0),it}function zc(it,st,ct,dt,pt){var Et="",Ft=!1,Wt=it.doc.lineSeparator(),zt=!1;function re(an){return function(Qn){return Qn.id==an}}function ze(){Ft&&(Et+=Wt,zt&&(Et+=Wt),Ft=zt=!1)}function ge(an){an&&(ze(),Et+=an)}function yn(an){if(an.nodeType==1){var Qn=an.getAttribute("cm-text");if(Qn){ge(Qn);return}var li=an.getAttribute("cm-marker"),yi;if(li){var ji=it.findMarks(Ke(dt,0),Ke(pt+1,0),re(+li));ji.length&&(yi=ji[0].find(0))&&ge(un(it.doc,yi.from,yi.to).join(Wt));return}if(an.getAttribute("contenteditable")=="false")return;var co=/^(pre|div|p|li|table|br)$/i.test(an.nodeName);if(!/^br$/i.test(an.nodeName)&&an.textContent.length==0)return;co&&ze();for(var eo=0;eo<an.childNodes.length;eo++)yn(an.childNodes[eo]);/^(pre|p)$/i.test(an.nodeName)&&(zt=!0),co&&(Ft=!0)}else an.nodeType==3&&ge(an.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;yn(st),st!=ct;)st=st.nextSibling,zt=!1;return Et}function vf(it,st,ct){var dt;if(st==it.display.lineDiv){if(dt=it.display.lineDiv.childNodes[ct],!dt)return jc(it.clipPos(Ke(it.display.viewTo-1)),!0);st=null,ct=0}else for(dt=st;;dt=dt.parentNode){if(!dt||dt==it.display.lineDiv)return null;if(dt.parentNode&&dt.parentNode==it.display.lineDiv)break}for(var pt=0;pt<it.display.view.length;pt++){var Et=it.display.view[pt];if(Et.node==dt)return hm(Et,st,ct)}}function hm(it,st,ct){var dt=it.text.firstChild,pt=!1;if(!st||!Oe(dt,st))return jc(Ke(oe(it.line),0),!0);if(st==dt&&(pt=!0,st=dt.childNodes[ct],ct=0,!st)){var Et=it.rest?Ce(it.rest):it.line;return jc(Ke(oe(Et),Et.text.length),pt)}var Ft=st.nodeType==3?st:null,Wt=st;for(!Ft&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Ft=st.firstChild,ct&&(ct=Ft.nodeValue.length));Wt.parentNode!=dt;)Wt=Wt.parentNode;var zt=it.measure,re=zt.maps;function ze(yi,ji,co){for(var eo=-1;eo<(re?re.length:0);eo++)for(var Eo=eo<0?zt.map:re[eo],ar=0;ar<Eo.length;ar+=3){var _i=Eo[ar+2];if(_i==yi||_i==ji){var Mr=oe(eo<0?it.line:it.rest[eo]),_s=Eo[ar]+co;return(co<0||_i!=yi)&&(_s=Eo[ar+(co?1:0)]),Ke(Mr,_s)}}}var ge=ze(Ft,Wt,ct);if(ge)return jc(ge,pt);for(var yn=Wt.nextSibling,an=Ft?Ft.nodeValue.length-ct:0;yn;yn=yn.nextSibling){if(ge=ze(yn,yn.firstChild,0),ge)return jc(Ke(ge.line,ge.ch-an),pt);an+=yn.textContent.length}for(var Qn=Wt.previousSibling,li=ct;Qn;Qn=Qn.previousSibling){if(ge=ze(Qn,Qn.firstChild,-1),ge)return jc(Ke(ge.line,ge.ch+li),pt);li+=Qn.textContent.length}}var Na=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Yt,this.hasSelection=!1,this.composing=null};Na.prototype.init=function(it){var st=this,ct=this,dt=this.cm;this.createField(it);var pt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Nt&&(pt.style.width="0px"),en(pt,"input",function(){ne&&ae>=9&&st.hasSelection&&(st.hasSelection=null),ct.poll()}),en(pt,"paste",function(Ft){ii(dt,Ft)||ep(Ft,dt)||(dt.state.pasteIncoming=+new Date,ct.fastPoll())});function Et(Ft){if(!ii(dt,Ft)){if(dt.somethingSelected())ec({lineWise:!1,text:dt.getSelections()});else if(dt.options.lineWiseCopyCut){var Wt=ip(dt);ec({lineWise:!0,text:Wt.text}),Ft.type=="cut"?dt.setSelections(Wt.ranges,null,Ne):(ct.prevInput="",pt.value=Wt.text.join(`
|
|
|
`),Je(pt))}else return;Ft.type=="cut"&&(dt.state.cutIncoming=+new Date)}}en(pt,"cut",Et),en(pt,"copy",Et),en(it.scroller,"paste",function(Ft){if(!(Da(it,Ft)||ii(dt,Ft))){if(!pt.dispatchEvent){dt.state.pasteIncoming=+new Date,ct.focus();return}var Wt=new Event("paste");Wt.clipboardData=Ft.clipboardData,pt.dispatchEvent(Wt)}}),en(it.lineSpace,"selectstart",function(Ft){Da(it,Ft)||mi(Ft)}),en(pt,"compositionstart",function(){var Ft=dt.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:Ft,range:dt.markText(Ft,dt.getCursor("to"),{className:"CodeMirror-composing"})}}),en(pt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},Na.prototype.createField=function(it){this.wrapper=rp(),this.textarea=this.wrapper.firstChild},Na.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Na.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ct=it.doc,dt=$h(it);if(it.options.moveInputWithCursor){var pt=fs(it,ct.sel.primary().head,"div"),Et=st.wrapper.getBoundingClientRect(),Ft=st.lineDiv.getBoundingClientRect();dt.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,pt.top+Ft.top-Et.top)),dt.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,pt.left+Ft.left-Et.left))}return dt},Na.prototype.showSelection=function(it){var st=this.cm,ct=st.display;se(ct.cursorDiv,it.cursors),se(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Na.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ct=st.getSelection();this.textarea.value=ct,st.state.focused&&Je(this.textarea),ne&&ae>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",ne&&ae>=9&&(this.hasSelection=null))}},Na.prototype.getField=function(){return this.textarea},Na.prototype.supportsTouch=function(){return!1},Na.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||me()!=this.textarea))try{this.textarea.focus()}catch(it){}},Na.prototype.blur=function(){this.textarea.blur()},Na.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Na.prototype.receivedFocus=function(){this.slowPoll()},Na.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Na.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ct(){var dt=st.poll();!dt&&!it?(it=!0,st.polling.set(60,ct)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ct)},Na.prototype.poll=function(){var it=this,st=this.cm,ct=this.textarea,dt=this.prevInput;if(this.contextMenuPending||!st.state.focused||Mt(ct)&&!dt&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var pt=ct.value;if(pt==dt&&!st.somethingSelected())return!1;if(ne&&ae>=9&&this.hasSelection===pt||ht&&/[\uf700-\uf7ff]/.test(pt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Et=pt.charCodeAt(0);if(Et==8203&&!dt&&(dt="\u200B"),Et==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ft=0,Wt=Math.min(dt.length,pt.length);Ft<Wt&&dt.charCodeAt(Ft)==pt.charCodeAt(Ft);)++Ft;return Fe(st,function(){pf(st,pt.slice(Ft),dt.length-Ft,null,it.composing?"*compose":null),pt.length>1e3||pt.indexOf(`
|
|
|
`)>-1?ct.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Na.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Na.prototype.onKeyPress=function(){ne&&ae>=9&&(this.hasSelection=null),this.fastPoll()},Na.prototype.onContextMenu=function(it){var st=this,ct=st.cm,dt=ct.display,pt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Et=rl(ct,it),Ft=dt.scroller.scrollTop;if(!Et||Jt)return;var Wt=ct.options.resetSelectionOnContextMenu;Wt&&ct.doc.sel.contains(Et)==-1&&hn(ct,Ss)(ct.doc,fr(Et),Ne);var zt=pt.style.cssText,re=st.wrapper.style.cssText,ze=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(it.clientY-ze.top-5)+"px; left: "+(it.clientX-ze.left-5)+`px;
|
|
|
z-index: 1000; background: `+(ne?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ge;Tt&&(ge=window.scrollY),dt.input.focus(),Tt&&window.scrollTo(null,ge),dt.input.reset(),ct.somethingSelected()||(pt.value=st.prevInput=" "),st.contextMenuPending=an,dt.selForContextMenu=ct.doc.sel,clearTimeout(dt.detectingSelectAll);function yn(){if(pt.selectionStart!=null){var li=ct.somethingSelected(),yi="\u200B"+(li?pt.value:"");pt.value="\u21DA",pt.value=yi,st.prevInput=li?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=yi.length,dt.selForContextMenu=ct.doc.sel}}function an(){if(st.contextMenuPending==an&&(st.contextMenuPending=!1,st.wrapper.style.cssText=re,pt.style.cssText=zt,ne&&ae<9&&dt.scrollbars.setScrollTop(dt.scroller.scrollTop=Ft),pt.selectionStart!=null)){(!ne||ne&&ae<9)&&yn();var li=0,yi=function(){dt.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&st.prevInput=="\u200B"?hn(ct,$r)(ct):li++<10?dt.detectingSelectAll=setTimeout(yi,500):(dt.selForContextMenu=null,dt.input.reset())};dt.detectingSelectAll=setTimeout(yi,200)}}if(ne&&ae>=9&&yn(),At){Lo(it);var Qn=function(){ln(window,"mouseup",Qn),setTimeout(an,20)};en(window,"mouseup",Qn)}else setTimeout(an,50)},Na.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Na.prototype.setUneditable=function(){},Na.prototype.needsContentAttribute=!1;function dm(it,st){if(st=st?Mn(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 ct=me();st.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function dt(){it.value=Wt.getValue()}var pt;if(it.form&&(en(it.form,"submit",dt),!st.leaveSubmitMethodAlone)){var Et=it.form;pt=Et.submit;try{var Ft=Et.submit=function(){dt(),Et.submit=pt,Et.submit(),Et.submit=Ft}}catch(zt){}}st.finishInit=function(zt){zt.save=dt,zt.getTextArea=function(){return it},zt.toTextArea=function(){zt.toTextArea=isNaN,dt(),it.parentNode.removeChild(zt.getWrapperElement()),it.style.display="",it.form&&(ln(it.form,"submit",dt),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var Wt=os(function(zt){return it.parentNode.insertBefore(zt,it.nextSibling)},st);return Wt}function Hc(it){it.off=ln,it.on=en,it.wheelEventPixels=Mo,it.Doc=Aa,it.splitLines=Ro,it.countColumn=we,it.findColumn=Yn,it.isWordChar=It,it.Pass=Dn,it.signal=tn,it.Line=Ur,it.changeEnd=Qr,it.scrollbarModel=af,it.Pos=Ke,it.cmpPos=Qe,it.modes=ts,it.mimeModes=rs,it.resolveMode=oi,it.getMode=Ie,it.modeExtensions=Le,it.extendMode=Gt,it.copyState=We,it.startState=ce,it.innerMode=Ye,it.commands=Ra,it.keyMap=wl,it.keyName=Fc,it.isModifierKey=Pd,it.lookupKey=Vl,it.normalizeKeyMap=Tc,it.StringStream=qt,it.SharedTextMarker=eh,it.TextMarker=ke,it.LineWidget=Sa,it.e_preventDefault=mi,it.e_stopPropagation=Hi,it.e_stop=Lo,it.addClass=Ve,it.contains=Oe,it.rmClass=jt,it.keyNames=zu}lm(os),Md(os);var rd="iter insert remove copy getEditor constructor".split(" ");for(var yf in Aa.prototype)Aa.prototype.hasOwnProperty(yf)&&_e(rd,yf)<0&&(os.prototype[yf]=function(it){return function(){return it.apply(this.doc,arguments)}}(Aa.prototype[yf]));return si(Aa),os.inputStyles={textarea:Na,contenteditable:js},os.defineMode=function(it){!os.defaults.mode&&it!="null"&&(os.defaults.mode=it),ls.apply(this,arguments)},os.defineMIME=Ci,os.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),os.defineMIME("text/plain","null"),os.defineExtension=function(it,st){os.prototype[it]=st},os.defineDocExtension=function(it,st){Aa.prototype[it]=st},os.fromTextArea=dm,Hc(os),os.version="5.58.2",os})},25419:function(gn,Ln,bt){(function(wt){wt(bt(89780),bt(15525),bt(98101))})(function(wt){"use strict";wt.defineMode("markdown",function(te,de){var Re=wt.getMode(te,"text/html"),ne=Re.name=="null";function ae(we){if(wt.findModeByName){var Yt=wt.findModeByName(we);Yt&&(we=Yt.mime||Yt.mimes[0])}var _e=wt.getMode(te,we);return _e.name=="null"?null:_e}de.highlightFormatting===void 0&&(de.highlightFormatting=!1),de.maxBlockquoteDepth===void 0&&(de.maxBlockquoteDepth=0),de.taskLists===void 0&&(de.taskLists=!1),de.strikethrough===void 0&&(de.strikethrough=!1),de.emoji===void 0&&(de.emoji=!1),de.fencedCodeBlockHighlighting===void 0&&(de.fencedCodeBlockHighlighting=!0),de.fencedCodeBlockDefaultMode===void 0&&(de.fencedCodeBlockDefaultMode="text/plain"),de.xml===void 0&&(de.xml=!0),de.tokenTypeOverrides===void 0&&(de.tokenTypeOverrides={});var Tt={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 be in Tt)Tt.hasOwnProperty(be)&&de.tokenTypeOverrides[be]&&(Tt[be]=de.tokenTypeOverrides[be]);var ye=/^([*\-_])(?:\s*\1){2,}\s*$/,Jt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Be=/^\[(x| )\](?=\s)/i,pe=de.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,je=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Nt=/^[^#!\[\]*_\\<>` "'(~:]+/,et=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\s*\[[^\]]+?\]:.*$/,ht=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 gt(we,Yt,_e){return Yt.f=Yt.inline=_e,_e(we,Yt)}function vt(we,Yt,_e){return Yt.f=Yt.block=_e,_e(we,Yt)}function Pt(we){return!we||!/\S/.test(we.string)}function At(we){if(we.linkTitle=!1,we.linkHref=!1,we.linkText=!1,we.em=!1,we.strong=!1,we.strikethrough=!1,we.quote=0,we.indentedCode=!1,we.f==jt){var Yt=ne;if(!Yt){var _e=wt.innerMode(Re,we.htmlState);Yt=_e.mode.name=="xml"&&_e.state.tagStart===null&&!_e.state.context&&_e.state.tokenize.isInText}Yt&&(we.f=he,we.block=Bt,we.htmlState=null)}return we.trailingSpace=0,we.trailingSpaceNewLine=!1,we.prevLine=we.thisLine,we.thisLine={stream:null},null}function Bt(we,Yt){var _e=we.column()===Yt.indentation,Zn=Pt(Yt.prevLine.stream),Dn=Yt.indentedCode,Ne=Yt.prevLine.hr,pn=Yt.list!==!1,Tn=(Yt.listStack[Yt.listStack.length-1]||0)+3;Yt.indentedCode=!1;var Yn=Yt.indentation;if(Yt.indentationDiff===null&&(Yt.indentationDiff=Yt.indentation,pn)){for(Yt.list=null;Yn<Yt.listStack[Yt.listStack.length-1];)Yt.listStack.pop(),Yt.listStack.length?Yt.indentation=Yt.listStack[Yt.listStack.length-1]:Yt.list=!1;Yt.list!==!1&&(Yt.indentationDiff=Yn-Yt.listStack[Yt.listStack.length-1])}var mn=!Zn&&!Ne&&!Yt.prevLine.header&&(!pn||!Dn)&&!Yt.prevLine.fencedCodeEnd,ui=(Yt.list===!1||Ne||Zn)&&Yt.indentation<=Tn&&we.match(ye),Ce=null;if(Yt.indentationDiff>=4&&(Dn||Yt.prevLine.fencedCodeEnd||Yt.prevLine.header||Zn))return we.skipToEnd(),Yt.indentedCode=!0,Tt.code;if(we.eatSpace())return null;if(_e&&Yt.indentation<=Tn&&(Ce=we.match(pe))&&Ce[1].length<=6)return Yt.quote=0,Yt.header=Ce[1].length,Yt.thisLine.header=!0,de.highlightFormatting&&(Yt.formatting="header"),Yt.f=Yt.inline,se(Yt);if(Yt.indentation<=Tn&&we.eat(">"))return Yt.quote=_e?1:Yt.quote+1,de.highlightFormatting&&(Yt.formatting="quote"),we.eatSpace(),se(Yt);if(!ui&&!Yt.setext&&_e&&Yt.indentation<=Tn&&(Ce=we.match(Jt))){var $n=Ce[1]?"ol":"ul";return Yt.indentation=Yn+we.current().length,Yt.list=!0,Yt.quote=0,Yt.listStack.push(Yt.indentation),Yt.em=!1,Yt.strong=!1,Yt.code=!1,Yt.strikethrough=!1,de.taskLists&&we.match(Be,!1)&&(Yt.taskList=!0),Yt.f=Yt.inline,de.highlightFormatting&&(Yt.formatting=["list","list-"+$n]),se(Yt)}else{if(_e&&Yt.indentation<=Tn&&(Ce=we.match(et,!0)))return Yt.quote=0,Yt.fencedEndRE=new RegExp(Ce[1]+"+ *$"),Yt.localMode=de.fencedCodeBlockHighlighting&&ae(Ce[2]||de.fencedCodeBlockDefaultMode),Yt.localMode&&(Yt.localState=wt.startState(Yt.localMode)),Yt.f=Yt.block=_t,de.highlightFormatting&&(Yt.formatting="code-block"),Yt.code=-1,se(Yt);if(Yt.setext||(!mn||!pn)&&!Yt.quote&&Yt.list===!1&&!Yt.code&&!ui&&!nt.test(we.string)&&(Ce=we.lookAhead(1))&&(Ce=Ce.match(je)))return Yt.setext?(Yt.header=Yt.setext,Yt.setext=0,we.skipToEnd(),de.highlightFormatting&&(Yt.formatting="header")):(Yt.header=Ce[0].charAt(0)=="="?1:2,Yt.setext=Yt.header),Yt.thisLine.header=!0,Yt.f=Yt.inline,se(Yt);if(ui)return we.skipToEnd(),Yt.hr=!0,Yt.thisLine.hr=!0,Tt.hr;if(we.peek()==="[")return gt(we,Yt,Xe)}return gt(we,Yt,Yt.inline)}function jt(we,Yt){var _e=Re.token(we,Yt.htmlState);if(!ne){var Zn=wt.innerMode(Re,Yt.htmlState);(Zn.mode.name=="xml"&&Zn.state.tagStart===null&&!Zn.state.context&&Zn.state.tokenize.isInText||Yt.md_inside&&we.current().indexOf(">")>-1)&&(Yt.f=he,Yt.block=Bt,Yt.htmlState=null)}return _e}function _t(we,Yt){var _e=Yt.listStack[Yt.listStack.length-1]||0,Zn=Yt.indentation<_e,Dn=_e+3;if(Yt.fencedEndRE&&Yt.indentation<=Dn&&(Zn||we.match(Yt.fencedEndRE))){de.highlightFormatting&&(Yt.formatting="code-block");var Ne;return Zn||(Ne=se(Yt)),Yt.localMode=Yt.localState=null,Yt.block=Bt,Yt.f=he,Yt.fencedEndRE=null,Yt.code=0,Yt.thisLine.fencedCodeEnd=!0,Zn?vt(we,Yt,Yt.block):Ne}else return Yt.localMode?Yt.localMode.token(we,Yt.localState):(we.skipToEnd(),Tt.code)}function se(we){var Yt=[];if(we.formatting){Yt.push(Tt.formatting),typeof we.formatting=="string"&&(we.formatting=[we.formatting]);for(var _e=0;_e<we.formatting.length;_e++)Yt.push(Tt.formatting+"-"+we.formatting[_e]),we.formatting[_e]==="header"&&Yt.push(Tt.formatting+"-"+we.formatting[_e]+"-"+we.header),we.formatting[_e]==="quote"&&(!de.maxBlockquoteDepth||de.maxBlockquoteDepth>=we.quote?Yt.push(Tt.formatting+"-"+we.formatting[_e]+"-"+we.quote):Yt.push("error"))}if(we.taskOpen)return Yt.push("meta"),Yt.length?Yt.join(" "):null;if(we.taskClosed)return Yt.push("property"),Yt.length?Yt.join(" "):null;if(we.linkHref?Yt.push(Tt.linkHref,"url"):(we.strong&&Yt.push(Tt.strong),we.em&&Yt.push(Tt.em),we.strikethrough&&Yt.push(Tt.strikethrough),we.emoji&&Yt.push(Tt.emoji),we.linkText&&Yt.push(Tt.linkText),we.code&&Yt.push(Tt.code),we.image&&Yt.push(Tt.image),we.imageAltText&&Yt.push(Tt.imageAltText,"link"),we.imageMarker&&Yt.push(Tt.imageMarker)),we.header&&Yt.push(Tt.header,Tt.header+"-"+we.header),we.quote&&(Yt.push(Tt.quote),!de.maxBlockquoteDepth||de.maxBlockquoteDepth>=we.quote?Yt.push(Tt.quote+"-"+we.quote):Yt.push(Tt.quote+"-"+de.maxBlockquoteDepth)),we.list!==!1){var Zn=(we.listStack.length-1)%3;Zn?Zn===1?Yt.push(Tt.list2):Yt.push(Tt.list3):Yt.push(Tt.list1)}return we.trailingSpaceNewLine?Yt.push("trailing-space-new-line"):we.trailingSpace&&Yt.push("trailing-space-"+(we.trailingSpace%2?"a":"b")),Yt.length?Yt.join(" "):null}function Vt(we,Yt){if(we.match(Nt,!0))return se(Yt)}function he(we,Yt){var _e=Yt.text(we,Yt);if(typeof _e!="undefined")return _e;if(Yt.list)return Yt.list=null,se(Yt);if(Yt.taskList){var Zn=we.match(Be,!0)[1]===" ";return Zn?Yt.taskOpen=!0:Yt.taskClosed=!0,de.highlightFormatting&&(Yt.formatting="task"),Yt.taskList=!1,se(Yt)}if(Yt.taskOpen=!1,Yt.taskClosed=!1,Yt.header&&we.match(/^#+$/,!0))return de.highlightFormatting&&(Yt.formatting="header"),se(Yt);var Dn=we.next();if(Yt.linkTitle){Yt.linkTitle=!1;var Ne=Dn;Dn==="("&&(Ne=")"),Ne=(Ne+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pn="^\\s*(?:[^"+Ne+"\\\\]+|\\\\\\\\|\\\\.)"+Ne;if(we.match(new RegExp(pn),!0))return Tt.linkHref}if(Dn==="`"){var Tn=Yt.formatting;de.highlightFormatting&&(Yt.formatting="code"),we.eatWhile("`");var Yn=we.current().length;if(Yt.code==0&&(!Yt.quote||Yn==1))return Yt.code=Yn,se(Yt);if(Yn==Yt.code){var mn=se(Yt);return Yt.code=0,mn}else return Yt.formatting=Tn,se(Yt)}else if(Yt.code)return se(Yt);if(Dn==="\\"&&(we.next(),de.highlightFormatting)){var ui=se(Yt),Ce=Tt.formatting+"-escape";return ui?ui+" "+Ce:Ce}if(Dn==="!"&&we.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Yt.imageMarker=!0,Yt.image=!0,de.highlightFormatting&&(Yt.formatting="image"),se(Yt);if(Dn==="["&&Yt.imageMarker&&we.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Yt.imageMarker=!1,Yt.imageAltText=!0,de.highlightFormatting&&(Yt.formatting="image"),se(Yt);if(Dn==="]"&&Yt.imageAltText){de.highlightFormatting&&(Yt.formatting="image");var ui=se(Yt);return Yt.imageAltText=!1,Yt.image=!1,Yt.inline=Yt.f=Oe,ui}if(Dn==="["&&!Yt.image)return Yt.linkText&&we.match(/^.*?\]/)||(Yt.linkText=!0,de.highlightFormatting&&(Yt.formatting="link")),se(Yt);if(Dn==="]"&&Yt.linkText){de.highlightFormatting&&(Yt.formatting="link");var ui=se(Yt);return Yt.linkText=!1,Yt.inline=Yt.f=we.match(/\(.*?\)| ?\[.*?\]/,!1)?Oe:he,ui}if(Dn==="<"&&we.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Yt.f=Yt.inline=Zt,de.highlightFormatting&&(Yt.formatting="link");var ui=se(Yt);return ui?ui+=" ":ui="",ui+Tt.linkInline}if(Dn==="<"&&we.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Yt.f=Yt.inline=Zt,de.highlightFormatting&&(Yt.formatting="link");var ui=se(Yt);return ui?ui+=" ":ui="",ui+Tt.linkEmail}if(de.xml&&Dn==="<"&&we.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var $n=we.string.indexOf(">",we.pos);if($n!=-1){var Pi=we.string.substring(we.start,$n);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Pi)&&(Yt.md_inside=!0)}return we.backUp(1),Yt.htmlState=wt.startState(Re),vt(we,Yt,jt)}if(de.xml&&Dn==="<"&&we.match(/^\/\w*?>/))return Yt.md_inside=!1,"tag";if(Dn==="*"||Dn==="_"){for(var Ot=1,Lt=we.pos==1?" ":we.string.charAt(we.pos-2);Ot<3&&we.eat(Dn);)Ot++;var St=we.peek()||" ",It=!/\s/.test(St)&&(!ht.test(St)||/\s/.test(Lt)||ht.test(Lt)),Kt=!/\s/.test(Lt)&&(!ht.test(Lt)||/\s/.test(St)||ht.test(St)),xt=null,Me=null;if(Ot%2&&(!Yt.em&&It&&(Dn==="*"||!Kt||ht.test(Lt))?xt=!0:Yt.em==Dn&&Kt&&(Dn==="*"||!It||ht.test(St))&&(xt=!1)),Ot>1&&(!Yt.strong&&It&&(Dn==="*"||!Kt||ht.test(Lt))?Me=!0:Yt.strong==Dn&&Kt&&(Dn==="*"||!It||ht.test(St))&&(Me=!1)),Me!=null||xt!=null){de.highlightFormatting&&(Yt.formatting=xt==null?"strong":Me==null?"em":"strong em"),xt===!0&&(Yt.em=Dn),Me===!0&&(Yt.strong=Dn);var mn=se(Yt);return xt===!1&&(Yt.em=!1),Me===!1&&(Yt.strong=!1),mn}}else if(Dn===" "&&(we.eat("*")||we.eat("_"))){if(we.peek()===" ")return se(Yt);we.backUp(1)}if(de.strikethrough){if(Dn==="~"&&we.eatWhile(Dn)){if(Yt.strikethrough){de.highlightFormatting&&(Yt.formatting="strikethrough");var mn=se(Yt);return Yt.strikethrough=!1,mn}else if(we.match(/^[^\s]/,!1))return Yt.strikethrough=!0,de.highlightFormatting&&(Yt.formatting="strikethrough"),se(Yt)}else if(Dn===" "&&we.match(/^~~/,!0)){if(we.peek()===" ")return se(Yt);we.backUp(2)}}if(de.emoji&&Dn===":"&&we.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Yt.emoji=!0,de.highlightFormatting&&(Yt.formatting="emoji");var De=se(Yt);return Yt.emoji=!1,De}return Dn===" "&&(we.match(/^ +$/,!1)?Yt.trailingSpace++:Yt.trailingSpace&&(Yt.trailingSpaceNewLine=!0)),se(Yt)}function Zt(we,Yt){var _e=we.next();if(_e===">"){Yt.f=Yt.inline=he,de.highlightFormatting&&(Yt.formatting="link");var Zn=se(Yt);return Zn?Zn+=" ":Zn="",Zn+Tt.linkInline}return we.match(/^[^>]+/,!0),Tt.linkInline}function Oe(we,Yt){if(we.eatSpace())return null;var _e=we.next();return _e==="("||_e==="["?(Yt.f=Yt.inline=Ve(_e==="("?")":"]"),de.highlightFormatting&&(Yt.formatting="link-string"),Yt.linkHref=!0,se(Yt)):"error"}var me={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ve(we){return function(Yt,_e){var Zn=Yt.next();if(Zn===we){_e.f=_e.inline=he,de.highlightFormatting&&(_e.formatting="link-string");var Dn=se(_e);return _e.linkHref=!1,Dn}return Yt.match(me[we]),_e.linkHref=!0,se(_e)}}function Xe(we,Yt){return we.match(/^([^\]\\]|\\.)*\]:/,!1)?(Yt.f=Je,we.next(),de.highlightFormatting&&(Yt.formatting="link"),Yt.linkText=!0,se(Yt)):gt(we,Yt,he)}function Je(we,Yt){if(we.match(/^\]:/,!0)){Yt.f=Yt.inline=wn,de.highlightFormatting&&(Yt.formatting="link");var _e=se(Yt);return Yt.linkText=!1,_e}return we.match(/^([^\]\\]|\\.)+/,!0),Tt.linkText}function wn(we,Yt){return we.eatSpace()?null:(we.match(/^[^\s]+/,!0),we.peek()===void 0?Yt.linkTitle=!0:we.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Yt.f=Yt.inline=he,Tt.linkHref+" url")}var Mn={startState:function(){return{f:Bt,prevLine:{stream:null},thisLine:{stream:null},block:Bt,htmlState:null,indentation:0,inline:he,text:Vt,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(we){return{f:we.f,prevLine:we.prevLine,thisLine:we.thisLine,block:we.block,htmlState:we.htmlState&&wt.copyState(Re,we.htmlState),indentation:we.indentation,localMode:we.localMode,localState:we.localMode?wt.copyState(we.localMode,we.localState):null,inline:we.inline,text:we.text,formatting:!1,linkText:we.linkText,linkTitle:we.linkTitle,linkHref:we.linkHref,code:we.code,em:we.em,strong:we.strong,strikethrough:we.strikethrough,emoji:we.emoji,header:we.header,setext:we.setext,hr:we.hr,taskList:we.taskList,list:we.list,listStack:we.listStack.slice(0),quote:we.quote,indentedCode:we.indentedCode,trailingSpace:we.trailingSpace,trailingSpaceNewLine:we.trailingSpaceNewLine,md_inside:we.md_inside,fencedEndRE:we.fencedEndRE}},token:function(we,Yt){if(Yt.formatting=!1,we!=Yt.thisLine.stream){if(Yt.header=0,Yt.hr=!1,we.match(/^\s*$/,!0))return At(Yt),null;if(Yt.prevLine=Yt.thisLine,Yt.thisLine={stream:we},Yt.taskList=!1,Yt.trailingSpace=0,Yt.trailingSpaceNewLine=!1,!Yt.localState&&(Yt.f=Yt.block,Yt.f!=jt)){var _e=we.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Yt.indentation=_e,Yt.indentationDiff=null,_e>0)return null}}return Yt.f(we,Yt)},innerMode:function(we){return we.block==jt?{state:we.htmlState,mode:Re}:we.localState?{state:we.localState,mode:we.localMode}:{state:we,mode:Mn}},indent:function(we,Yt,_e){return we.block==jt&&Re.indent?Re.indent(we.htmlState,Yt,_e):we.localState&&we.localMode.indent?we.localMode.indent(we.localState,Yt,_e):wt.Pass},blankLine:At,getType:se,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Mn},"xml"),wt.defineMIME("text/markdown","markdown"),wt.defineMIME("text/x-markdown","markdown")})},98101:function(gn,Ln,bt){(function(wt){wt(bt(89780))})(function(wt){"use strict";wt.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 te=0;te<wt.modeInfo.length;te++){var de=wt.modeInfo[te];de.mimes&&(de.mime=de.mimes[0])}wt.findModeByMIME=function(Re){Re=Re.toLowerCase();for(var ne=0;ne<wt.modeInfo.length;ne++){var ae=wt.modeInfo[ne];if(ae.mime==Re)return ae;if(ae.mimes){for(var Tt=0;Tt<ae.mimes.length;Tt++)if(ae.mimes[Tt]==Re)return ae}}if(/\+xml$/.test(Re))return wt.findModeByMIME("application/xml");if(/\+json$/.test(Re))return wt.findModeByMIME("application/json")},wt.findModeByExtension=function(Re){Re=Re.toLowerCase();for(var ne=0;ne<wt.modeInfo.length;ne++){var ae=wt.modeInfo[ne];if(ae.ext){for(var Tt=0;Tt<ae.ext.length;Tt++)if(ae.ext[Tt]==Re)return ae}}},wt.findModeByFileName=function(Re){for(var ne=0;ne<wt.modeInfo.length;ne++){var ae=wt.modeInfo[ne];if(ae.file&&ae.file.test(Re))return ae}var Tt=Re.lastIndexOf("."),be=Tt>-1&&Re.substring(Tt+1,Re.length);if(be)return wt.findModeByExtension(be)},wt.findModeByName=function(Re){Re=Re.toLowerCase();for(var ne=0;ne<wt.modeInfo.length;ne++){var ae=wt.modeInfo[ne];if(ae.name.toLowerCase()==Re)return ae;if(ae.alias){for(var Tt=0;Tt<ae.alias.length;Tt++)if(ae.alias[Tt].toLowerCase()==Re)return ae}}}})},67549:function(gn,Ln,bt){(function(wt){wt(bt(89780))})(function(wt){"use strict";wt.defineMode("stex",function(te,de){"use strict";function Re(Nt,et){Nt.cmdState.push(et)}function ne(Nt){return Nt.cmdState.length>0?Nt.cmdState[Nt.cmdState.length-1]:null}function ae(Nt){var et=Nt.cmdState.pop();et&&et.closeBracket()}function Tt(Nt){for(var et=Nt.cmdState,nt=et.length-1;nt>=0;nt--){var ht=et[nt];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function be(Nt,et,nt){return function(){this.name=Nt,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 ye={};ye.importmodule=be("importmodule","tag",["string","builtin"]),ye.documentclass=be("documentclass","tag",["","atom"]),ye.usepackage=be("usepackage","tag",["atom"]),ye.begin=be("begin","tag",["atom"]),ye.end=be("end","tag",["atom"]),ye.label=be("label","tag",["atom"]),ye.ref=be("ref","tag",["atom"]),ye.eqref=be("eqref","tag",["atom"]),ye.cite=be("cite","tag",["atom"]),ye.bibitem=be("bibitem","tag",["atom"]),ye.Bibitem=be("Bibitem","tag",["atom"]),ye.RBibitem=be("RBibitem","tag",["atom"]),ye.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Jt(Nt,et){Nt.f=et}function Be(Nt,et){var nt;if(Nt.match(/^\\[a-zA-Z@]+/)){var ht=Nt.current().slice(1);return nt=ye.hasOwnProperty(ht)?ye[ht]:ye.DEFAULT,nt=new nt,Re(et,nt),Jt(et,je),nt.style}if(Nt.match(/^\\[$&%#{}_]/)||Nt.match(/^\\[,;!\/\\]/))return"tag";if(Nt.match("\\["))return Jt(et,function(gt,vt){return pe(gt,vt,"\\]")}),"keyword";if(Nt.match("\\("))return Jt(et,function(gt,vt){return pe(gt,vt,"\\)")}),"keyword";if(Nt.match("$$"))return Jt(et,function(gt,vt){return pe(gt,vt,"$$")}),"keyword";if(Nt.match("$"))return Jt(et,function(gt,vt){return pe(gt,vt,"$")}),"keyword";var lt=Nt.next();if(lt=="%")return Nt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(nt=ne(et),nt)nt.closeBracket(lt),Jt(et,je);else return"error";return"bracket"}else return lt=="{"||lt=="["?(nt=ye.DEFAULT,nt=new nt,Re(et,nt),"bracket"):/\d/.test(lt)?(Nt.eatWhile(/[\w.%]/),"atom"):(Nt.eatWhile(/[\w\-_]/),nt=Tt(et),nt.name=="begin"&&(nt.argument=Nt.current()),nt.styleIdentifier())}function pe(Nt,et,nt){if(Nt.eatSpace())return null;if(nt&&Nt.match(nt))return Jt(et,Be),"keyword";if(Nt.match(/^\\[a-zA-Z@]+/))return"tag";if(Nt.match(/^[a-zA-Z]+/))return"variable-2";if(Nt.match(/^\\[$&%#{}_]/)||Nt.match(/^\\[,;!\/]/)||Nt.match(/^[\^_&]/))return"tag";if(Nt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Nt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=Nt.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(Nt.skipToEnd(),"comment"):"error"}function je(Nt,et){var nt=Nt.peek(),ht;return nt=="{"||nt=="["?(ht=ne(et),ht.openBracket(nt),Nt.eat(nt),Jt(et,Be),"bracket"):/[ \t\r]/.test(nt)?(Nt.eat(nt),null):(Jt(et,Be),ae(et),Be(Nt,et))}return{startState:function(){var Nt=de.inMathMode?function(et,nt){return pe(et,nt)}:Be;return{cmdState:[],f:Nt}},copyState:function(Nt){return{cmdState:Nt.cmdState.slice(),f:Nt.f}},token:function(Nt,et){return et.f(Nt,et)},blankLine:function(Nt){Nt.f=Be,Nt.cmdState.length=0},lineComment:"%"}}),wt.defineMIME("text/x-stex","stex"),wt.defineMIME("text/x-latex","stex")})},15525:function(gn,Ln,bt){(function(wt){wt(bt(89780))})(function(wt){"use strict";var te={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},de={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};wt.defineMode("xml",function(Re,ne){var ae=Re.indentUnit,Tt={},be=ne.htmlMode?te:de;for(var ye in be)Tt[ye]=be[ye];for(var ye in ne)Tt[ye]=ne[ye];var Jt,Be;function pe(Zt,Oe){function me(Je){return Oe.tokenize=Je,Je(Zt,Oe)}var Ve=Zt.next();if(Ve=="<")return Zt.eat("!")?Zt.eat("[")?Zt.match("CDATA[")?me(et("atom","]]>")):null:Zt.match("--")?me(et("comment","-->")):Zt.match("DOCTYPE",!0,!0)?(Zt.eatWhile(/[\w\._\-]/),me(nt(1))):null:Zt.eat("?")?(Zt.eatWhile(/[\w\._\-]/),Oe.tokenize=et("meta","?>"),"meta"):(Jt=Zt.eat("/")?"closeTag":"openTag",Oe.tokenize=je,"tag bracket");if(Ve=="&"){var Xe;return Zt.eat("#")?Zt.eat("x")?Xe=Zt.eatWhile(/[a-fA-F\d]/)&&Zt.eat(";"):Xe=Zt.eatWhile(/[\d]/)&&Zt.eat(";"):Xe=Zt.eatWhile(/[\w\.\-:]/)&&Zt.eat(";"),Xe?"atom":"error"}else return Zt.eatWhile(/[^&<]/),null}pe.isInText=!0;function je(Zt,Oe){var me=Zt.next();if(me==">"||me=="/"&&Zt.eat(">"))return Oe.tokenize=pe,Jt=me==">"?"endTag":"selfcloseTag","tag bracket";if(me=="=")return Jt="equals",null;if(me=="<"){Oe.tokenize=pe,Oe.state=vt,Oe.tagName=Oe.tagStart=null;var Ve=Oe.tokenize(Zt,Oe);return Ve?Ve+" tag error":"tag error"}else return/[\'\"]/.test(me)?(Oe.tokenize=Nt(me),Oe.stringStartCol=Zt.column(),Oe.tokenize(Zt,Oe)):(Zt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Nt(Zt){var Oe=function(me,Ve){for(;!me.eol();)if(me.next()==Zt){Ve.tokenize=je;break}return"string"};return Oe.isInAttribute=!0,Oe}function et(Zt,Oe){return function(me,Ve){for(;!me.eol();){if(me.match(Oe)){Ve.tokenize=pe;break}me.next()}return Zt}}function nt(Zt){return function(Oe,me){for(var Ve;(Ve=Oe.next())!=null;){if(Ve=="<")return me.tokenize=nt(Zt+1),me.tokenize(Oe,me);if(Ve==">")if(Zt==1){me.tokenize=pe;break}else return me.tokenize=nt(Zt-1),me.tokenize(Oe,me)}return"meta"}}function ht(Zt,Oe,me){this.prev=Zt.context,this.tagName=Oe,this.indent=Zt.indented,this.startOfLine=me,(Tt.doNotIndent.hasOwnProperty(Oe)||Zt.context&&Zt.context.noIndent)&&(this.noIndent=!0)}function lt(Zt){Zt.context&&(Zt.context=Zt.context.prev)}function gt(Zt,Oe){for(var me;;){if(!Zt.context||(me=Zt.context.tagName,!Tt.contextGrabbers.hasOwnProperty(me)||!Tt.contextGrabbers[me].hasOwnProperty(Oe)))return;lt(Zt)}}function vt(Zt,Oe,me){return Zt=="openTag"?(me.tagStart=Oe.column(),Pt):Zt=="closeTag"?At:vt}function Pt(Zt,Oe,me){return Zt=="word"?(me.tagName=Oe.current(),Be="tag",_t):Tt.allowMissingTagName&&Zt=="endTag"?(Be="tag bracket",_t(Zt,Oe,me)):(Be="error",Pt)}function At(Zt,Oe,me){if(Zt=="word"){var Ve=Oe.current();return me.context&&me.context.tagName!=Ve&&Tt.implicitlyClosed.hasOwnProperty(me.context.tagName)&<(me),me.context&&me.context.tagName==Ve||Tt.matchClosing===!1?(Be="tag",Bt):(Be="tag error",jt)}else return Tt.allowMissingTagName&&Zt=="endTag"?(Be="tag bracket",Bt(Zt,Oe,me)):(Be="error",jt)}function Bt(Zt,Oe,me){return Zt!="endTag"?(Be="error",Bt):(lt(me),vt)}function jt(Zt,Oe,me){return Be="error",Bt(Zt,Oe,me)}function _t(Zt,Oe,me){if(Zt=="word")return Be="attribute",se;if(Zt=="endTag"||Zt=="selfcloseTag"){var Ve=me.tagName,Xe=me.tagStart;return me.tagName=me.tagStart=null,Zt=="selfcloseTag"||Tt.autoSelfClosers.hasOwnProperty(Ve)?gt(me,Ve):(gt(me,Ve),me.context=new ht(me,Ve,Xe==me.indented)),vt}return Be="error",_t}function se(Zt,Oe,me){return Zt=="equals"?Vt:(Tt.allowMissing||(Be="error"),_t(Zt,Oe,me))}function Vt(Zt,Oe,me){return Zt=="string"?he:Zt=="word"&&Tt.allowUnquoted?(Be="string",_t):(Be="error",_t(Zt,Oe,me))}function he(Zt,Oe,me){return Zt=="string"?he:_t(Zt,Oe,me)}return{startState:function(Zt){var Oe={tokenize:pe,state:vt,indented:Zt||0,tagName:null,tagStart:null,context:null};return Zt!=null&&(Oe.baseIndent=Zt),Oe},token:function(Zt,Oe){if(!Oe.tagName&&Zt.sol()&&(Oe.indented=Zt.indentation()),Zt.eatSpace())return null;Jt=null;var me=Oe.tokenize(Zt,Oe);return(me||Jt)&&me!="comment"&&(Be=null,Oe.state=Oe.state(Jt||me,Zt,Oe),Be&&(me=Be=="error"?me+" error":Be)),me},indent:function(Zt,Oe,me){var Ve=Zt.context;if(Zt.tokenize.isInAttribute)return Zt.tagStart==Zt.indented?Zt.stringStartCol+1:Zt.indented+ae;if(Ve&&Ve.noIndent)return wt.Pass;if(Zt.tokenize!=je&&Zt.tokenize!=pe)return me?me.match(/^(\s*)/)[0].length:0;if(Zt.tagName)return Tt.multilineTagIndentPastTag!==!1?Zt.tagStart+Zt.tagName.length+2:Zt.tagStart+ae*(Tt.multilineTagIndentFactor||1);if(Tt.alignCDATA&&/<!\[CDATA\[/.test(Oe))return 0;var Xe=Oe&&/^<(\/)?([\w_:\.-]*)/.exec(Oe);if(Xe&&Xe[1])for(;Ve;)if(Ve.tagName==Xe[2]){Ve=Ve.prev;break}else if(Tt.implicitlyClosed.hasOwnProperty(Ve.tagName))Ve=Ve.prev;else break;else if(Xe)for(;Ve;){var Je=Tt.contextGrabbers[Ve.tagName];if(Je&&Je.hasOwnProperty(Xe[2]))Ve=Ve.prev;else break}for(;Ve&&Ve.prev&&!Ve.startOfLine;)Ve=Ve.prev;return Ve?Ve.indent+ae:Zt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Tt.htmlMode?"html":"xml",helperType:Tt.htmlMode?"html":"xml",skipAttribute:function(Zt){Zt.state==Vt&&(Zt.state=_t)},xmlCurrentTag:function(Zt){return Zt.tagName?{name:Zt.tagName,close:Zt.type=="closeTag"}:null},xmlCurrentContext:function(Zt){for(var Oe=[],me=Zt.context;me;me=me.prev)me.tagName&&Oe.push(me.tagName);return Oe.reverse()}}}),wt.defineMIME("text/xml","xml"),wt.defineMIME("application/xml","xml"),wt.mimeModes.hasOwnProperty("text/html")||wt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(gn,Ln,bt){"use strict";bt.d(Ln,{$u:function(){return ye},BD:function(){return Ot},E9:function(){return be},FF:function(){return _o},FJ:function(){return vt},Hn:function(){return gt},KX:function(){return At},NB:function(){return Se},S0:function(){return Ce},UL:function(){return Jt},Vk:function(){return lt},Vm:function(){return ue},YI:function(){return $n},ZA:function(){return de},Zt:function(){return Be},al:function(){return xt},bn:function(){return Kt},bx:function(){return Lt},g2:function(){return Pi},h1:function(){return Vt},hD:function(){return si},l4:function(){return ae},rU:function(){return xe},s_:function(){return St},uz:function(){return ee},z6:function(){return pe}}),gn=bt.hmd(gn),function(){var Mt;function cr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function ir(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:cr(a)}}function pr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var ts=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},rs;if(typeof Object.setPrototypeOf=="function")rs=Object.setPrototypeOf;else{var ls;t:{var Ci={a:!0},oi={};try{oi.__proto__=Ci,ls=oi.a;break t}catch(a){}ls=!1}rs=ls?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ie=rs;function Le(a,y){if(a.prototype=ts(y.prototype),a.prototype.constructor=a,Ie)Ie(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Gt=typeof bt.g!="undefined"&&bt.g!=null?bt.g:self,We=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},Ye=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ce(a,y){if(y){var x=Gt;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&Ye(x,a,{writable:!0,value:y})}}ce("Object.assign",function(a){return a||We}),ce("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var qt=typeof globalThis=="object"&&globalThis||typeof bt.g=="object"&&bt.g.global===bt.g&&bt.g||typeof self=="object"&&self.self===self&&self||{};qt.requestAnimationFrame===void 0&&(qt.setImmediate===void 0?qt.requestAnimationFrame=function(a){qt.setTimeout(a,0)}:qt.requestAnimationFrame=qt.setImmediate);function He(){}function un(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&qt.clearTimeout(x),x=An(function(){x=-1,a.apply(E,b)},y)}}function An(a,y){return qt.setTimeout(a,y)}function Fn(a){return qt.document.createElement(a)}function oe(a){throw Error(a)}function qe(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),oe(a)}function bn(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),oe(x+" is not in the range "+y+": "+a)}function Jn(a){qt.console&&qt.console.log(a)}function Ke(a){return typeof a=="object"&&a!==null}function Qe(a){return Array.isArray(a)||qt.NodeList&&a instanceof qt.NodeList||qt.HTMLCollection&&a instanceof qt.HTMLCollection}function zn(a){return Array.prototype.slice.call(a)}function Wn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):oe("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function fi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):oe("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Hn(){var a=jo.pop();return a===void 0?[]:a}function _n(a){a.length=0,jo.push(a)}function Vn(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(Ke(a)&&a.constructor)return Vn(a.constructor);return typeof a}function wi(a){var y=a;return Ke(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 Qi(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 qi(a,y,x){Object.defineProperty(Ar.prototype,a,{get:y,set:x})}function $e(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var lo=qt.navigator!==void 0&&0<qt.navigator.userAgent.indexOf("Trident/7"),Co=qt.navigator!==void 0&&qt.navigator.platform!==void 0&&qt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,jo=[];Object.freeze([]),He.className="Util",He.Dx="32ab5ff3b26f42dc0ed90f21472913b5",He.adym="gojs.net",He.vfo="28e645fdb266",He.className="Util";function Ue(a,y,x){ho(this),this.j=a,this.xa=y,this.o=x}Ue.prototype.toString=function(){return"EnumValue."+this.xa};function jn(a,y){return y==null||y===""?null:a[y]}Gt.Object.defineProperties(Ue.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Ue.className="EnumValue";function qn(){this.ew=[]}qn.prototype.toString=function(){return this.ew.join("")},qn.prototype.add=function(a){a!==""&&this.ew.push(a)},qn.className="StringBuilder";function Mi(){}Mi.className="PropertyCollection";var vi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){qt.console&&qt.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,ot){return function(){throw Error("Property "+tt.Zl[ot.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function pi(){}pi.prototype.reset=function(){},pi.prototype.next=function(){return!1},pi.prototype.Ad=function(){return!1},pi.prototype.first=function(){return null},pi.prototype.any=function(){return!1},pi.prototype.all=function(){return!0},pi.prototype.each=function(){return this},pi.prototype.map=function(){return this},pi.prototype.filter=function(){return this},pi.prototype.de=function(){},pi.prototype.toString=function(){return"EmptyIterator"},Gt.Object.defineProperties(pi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),pi.prototype.first=pi.prototype.first,pi.prototype.hasNext=pi.prototype.Ad,pi.prototype.next=pi.prototype.next,pi.prototype.reset=pi.prototype.reset;var Ui=null;pi.className="EmptyIterator",Ui=new pi;function ki(a){this.key=-1,this.value=a}ki.prototype.reset=function(){this.key=-1},ki.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},ki.prototype.Ad=function(){return this.next()},ki.prototype.first=function(){return this.key=0,this.value},ki.prototype.any=function(a){return this.key=-1,a(this.value)},ki.prototype.all=function(a){return this.key=-1,a(this.value)},ki.prototype.each=function(a){return this.key=-1,a(this.value),this},ki.prototype.map=function(a){return new ki(a(this.value))},ki.prototype.filter=function(a){return a(this.value)?new ki(this.value):Ui},ki.prototype.de=function(){this.value=null},ki.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Gt.Object.defineProperties(ki.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),ki.prototype.first=ki.prototype.first,ki.prototype.hasNext=ki.prototype.Ad,ki.prototype.next=ki.prototype.next,ki.prototype.reset=ki.prototype.reset,ki.className="SingletonIterator";function zi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}zi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},zi.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},zi.prototype.Ad=function(){return this.next()},zi.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},zi.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},zi.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},zi.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},zi.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new cn,a.s=x,a.xb(),a.iterator},zi.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new cn,a.s=x,a.xb(),a.iterator},zi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},zi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Gt.Object.defineProperties(zi.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),zi.prototype.first=zi.prototype.first,zi.prototype.hasNext=zi.prototype.Ad,zi.prototype.next=zi.prototype.next,zi.prototype.reset=zi.prototype.reset,zi.className="ListIterator";function uo(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}uo.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},uo.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},uo.prototype.Ad=function(){return this.next()},uo.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},uo.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},uo.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},uo.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},uo.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new cn,a.s=x,a.xb(),a.iterator},uo.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new cn,a.s=x,a.xb(),a.iterator},uo.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},uo.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Gt.Object.defineProperties(uo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),uo.prototype.first=uo.prototype.first,uo.prototype.hasNext=uo.prototype.Ad,uo.prototype.next=uo.prototype.next,uo.prototype.reset=uo.prototype.reset,uo.className="ListIteratorBackwards";function cn(a){ho(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=cn.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"List()#"+zo(this)},Mt.add=function(a){return a===null?this:(this._isFrozen&&qe(this,a),this.s.push(a),this.xb(),this)},Mt.push=function(a){this.add(a)},Mt.addAll=function(a){if(a===null)return this;this._isFrozen&&qe(this);var y=this.s;if(Qe(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Mt.clear=function(){this._isFrozen&&qe(this),this.s.length=0,this.xb()},Mt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Mt.has=function(a){return this.contains(a)},Mt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Mt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&bn(a,"0 <= i < length",cn,"elt:i"),y[a]},Mt.get=function(a){return this.M(a)},Mt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&bn(a,"0 <= i < length",cn,"setElt:i"),this._isFrozen&&qe(this,a),x[a]=y},Mt.set=function(a,y){this.cd(a,y)},Mt.first=function(){var a=this.s;return a.length===0?null:a[0]},Mt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Mt.pop=function(){this._isFrozen&&qe(this);var a=this.s;return 0<a.length?a.pop():null},cn.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},cn.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},cn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},cn.prototype.map=function(a){for(var y=new cn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},cn.prototype.filter=function(a){for(var y=new cn,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Mt=cn.prototype,Mt.Gb=function(a,y){0>a&&bn(a,">= 0",cn,"insertAt:i"),this._isFrozen&&qe(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&qe(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Mt.delete=function(a){return this.remove(a)},Mt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&bn(a,"0 <= i < length",cn,"removeAt:i"),this._isFrozen&&qe(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Mt.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&qe(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},cn.prototype.copy=function(){var a=new cn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Mt=cn.prototype,Mt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Mt.Iv=function(){for(var a=new sn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Mt.sort=function(a){return this._isFrozen&&qe(this),this.s.sort(a),this.xb(),this},Mt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&qe(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&bn(y,"0 <= from < length",cn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Mt.reverse=function(){return this._isFrozen&&qe(this),this.s.reverse(),this.xb(),this},Gt.Object.defineProperties(cn.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Ui;var a=this.Sa;return a!==null?(a.reset(),a):new zi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Ui;var a=this.Hg;return a!==null?(a.reset(),a):new uo(this)}}}),cn.prototype.reverse=cn.prototype.reverse,cn.prototype.sortRange=cn.prototype.zi,cn.prototype.sort=cn.prototype.sort,cn.prototype.toSet=cn.prototype.Iv,cn.prototype.toArray=cn.prototype.Fa,cn.prototype.removeRange=cn.prototype.removeRange,cn.prototype.removeAt=cn.prototype.mb,cn.prototype.delete=cn.prototype.delete,cn.prototype.remove=cn.prototype.remove,cn.prototype.insertAt=cn.prototype.Gb,cn.prototype.pop=cn.prototype.pop,cn.prototype.last=cn.prototype.jc,cn.prototype.first=cn.prototype.first,cn.prototype.set=cn.prototype.set,cn.prototype.setElt=cn.prototype.cd,cn.prototype.get=cn.prototype.get,cn.prototype.elt=cn.prototype.M,cn.prototype.indexOf=cn.prototype.indexOf,cn.prototype.has=cn.prototype.has,cn.prototype.contains=cn.prototype.contains,cn.prototype.clear=cn.prototype.clear,cn.prototype.addAll=cn.prototype.addAll,cn.prototype.push=cn.prototype.push,cn.prototype.add=cn.prototype.add,cn.prototype.thaw=cn.prototype.ka,cn.prototype.freeze=cn.prototype.freeze,cn.className="List";function Xo(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Xo.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Xo.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)},Xo.prototype.Ad=function(){return this.next()},Xo.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},Xo.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},Xo.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},Xo.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},Xo.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Xo.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new cn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Xo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Xo.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Gt.Object.defineProperties(Xo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Xo.prototype.first=Xo.prototype.first,Xo.prototype.hasNext=Xo.prototype.Ad,Xo.prototype.next=Xo.prototype.next,Xo.prototype.reset=Xo.prototype.reset,Xo.className="SetIterator";function sn(a){ho(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=sn.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"Set()#"+zo(this)},Mt.add=function(a){if(a===null)return this;this._isFrozen&&qe(this,a);var y=a;return Ke(a)&&(y=Er(a)),this.Tb[y]===void 0&&(this.Sb++,a=new yo(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Mt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&qe(this),Qe(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Mt.contains=function(a){if(a===null)return!1;var y=a;return Ke(a)&&(y=zo(a),y===void 0)?!1:this.Tb[y]!==void 0},Mt.has=function(a){return this.contains(a)},Mt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Mt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Mt.first=function(){var a=this.ea;return a===null?null:a.value},sn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},sn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},sn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},sn.prototype.map=function(a){for(var y=new sn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},sn.prototype.filter=function(a){for(var y=new sn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Mt=sn.prototype,Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&qe(this,a);var y=a;if(Ke(a)&&(y=zo(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Mt.delete=function(a){return this.remove(a)},Mt.hp=function(a){if(a===null)return this;if(this._isFrozen&&qe(this),Qe(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Mt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&qe(this);var y=new sn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Mt.clear=function(){this._isFrozen&&qe(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},sn.prototype.copy=function(){var a=new sn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},sn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},sn.prototype.Hv=function(){var a=new cn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function ho(a){a.__gohashid=Fr++}function Er(a){var y=a.__gohashid;return y===void 0&&(y=Fr++,a.__gohashid=y),y}function zo(a){return a.__gohashid}Gt.Object.defineProperties(sn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Ui;var a=this.Sa;return a!==null?(a.reset(),a):new Xo(this)}}}),sn.prototype.toList=sn.prototype.Hv,sn.prototype.toArray=sn.prototype.Fa,sn.prototype.clear=sn.prototype.clear,sn.prototype.retainAll=sn.prototype.pA,sn.prototype.removeAll=sn.prototype.hp,sn.prototype.delete=sn.prototype.delete,sn.prototype.remove=sn.prototype.remove,sn.prototype.first=sn.prototype.first,sn.prototype.containsAny=sn.prototype.Ty,sn.prototype.containsAll=sn.prototype.Sy,sn.prototype.has=sn.prototype.has,sn.prototype.contains=sn.prototype.contains,sn.prototype.addAll=sn.prototype.addAll,sn.prototype.add=sn.prototype.add,sn.prototype.thaw=sn.prototype.ka,sn.prototype.freeze=sn.prototype.freeze;var Fr=1;sn.className="Set",sn.uniqueHash=ho,sn.hashIdUnique=Er,sn.hashId=zo;function mr(a){this.ma=a,this.qa=a.Ja,this.sa=null}mr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},mr.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)},mr.prototype.Ad=function(){return this.next()},mr.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},mr.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},mr.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},mr.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},mr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},mr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new cn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},mr.prototype.de=function(){this.value=this.key=null,this.qa=-1},mr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Gt.Object.defineProperties(mr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),mr.prototype.first=mr.prototype.first,mr.prototype.hasNext=mr.prototype.Ad,mr.prototype.next=mr.prototype.next,mr.prototype.reset=mr.prototype.reset,mr.className="MapKeySetIterator";function Di(a){sn.call(this),ho(this),this._isFrozen=!0,this.ma=a}Le(Di,sn),Mt=Di.prototype,Mt.freeze=function(){return this},Mt.ka=function(){return this},Mt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Mt.add=function(){oe("This Set is read-only: "+this.toString())},Mt.contains=function(a){return this.ma.contains(a)},Mt.has=function(a){return this.contains(a)},Mt.remove=function(){oe("This Set is read-only: "+this.toString())},Mt.delete=function(a){return this.remove(a)},Mt.clear=function(){oe("This Set is read-only: "+this.toString())},Mt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Di.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Di.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Di.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Di.prototype.map=function(a){for(var y=new sn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Di.prototype.filter=function(a){for(var y=new sn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Di.prototype.copy=function(){return new Di(this.ma)},Di.prototype.Iv=function(){var a=new sn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Di.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Di.prototype.Hv=function(){var a=new cn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Gt.Object.defineProperties(Di.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Ui:new mr(this.ma)}}}),Di.prototype.toList=Di.prototype.Hv,Di.prototype.toArray=Di.prototype.Fa,Di.prototype.toSet=Di.prototype.Iv,Di.prototype.first=Di.prototype.first,Di.prototype.clear=Di.prototype.clear,Di.prototype.delete=Di.prototype.delete,Di.prototype.remove=Di.prototype.remove,Di.prototype.has=Di.prototype.has,Di.prototype.contains=Di.prototype.contains,Di.prototype.add=Di.prototype.add,Di.prototype.thaw=Di.prototype.ka,Di.prototype.freeze=Di.prototype.freeze,Di.className="MapKeySet";function Li(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Li.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Li.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)},Li.prototype.Ad=function(){return this.next()},Li.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},Li.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},Li.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},Li.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},Li.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Li.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new cn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Li.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Li.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Gt.Object.defineProperties(Li.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Li.prototype.first=Li.prototype.first,Li.prototype.hasNext=Li.prototype.Ad,Li.prototype.next=Li.prototype.next,Li.prototype.reset=Li.prototype.reset,Li.className="MapValueSetIterator";function yo(a,y){this.key=a,this.value=y,this.ll=this.va=null}yo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},yo.className="KeyValuePair";function bo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}bo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},bo.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)},bo.prototype.Ad=function(){return this.next()},bo.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},bo.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},bo.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},bo.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},bo.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},bo.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new cn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},bo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},bo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Gt.Object.defineProperties(bo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),bo.prototype.first=bo.prototype.first,bo.prototype.hasNext=bo.prototype.Ad,bo.prototype.next=bo.prototype.next,bo.prototype.reset=bo.prototype.reset,bo.className="MapIterator";function Xn(a){ho(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=Xn.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"Map()#"+zo(this)},Mt.add=function(a,y){this._isFrozen&&qe(this,a);var x=a;Ke(a)&&(x=Er(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new yo(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Mt.set=function(a,y){return this.add(a,y)},Mt.addAll=function(a){if(a===null)return this;if(Qe(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof Xn)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Mt.first=function(){return this.ea},Xn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Xn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Xn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Xn.prototype.map=function(a){for(var y=new Xn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Xn.prototype.filter=function(a){for(var y=new Xn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Mt=Xn.prototype,Mt.contains=function(a){var y=a;return Ke(a)&&(y=zo(a),y===void 0)?!1:this.Tb[y]!==void 0},Mt.has=function(a){return this.contains(a)},Mt.I=function(a){var y=a;return Ke(a)&&(y=zo(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Mt.get=function(a){return this.I(a)},Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&qe(this,a);var y=a;if(Ke(a)&&(y=zo(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Mt.delete=function(a){return this.remove(a)},Mt.clear=function(){this._isFrozen&&qe(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},Xn.prototype.copy=function(){var a=new Xn,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Xn.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new yo(b.key,b.value),x++}return y},Xn.prototype.Lf=function(){return new Di(this)},Gt.Object.defineProperties(Xn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Ui;var a=this.Sa;return a!==null?(a.reset(),a):new bo(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ui:new mr(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ui;var a=this.jf;return a!==null?(a.reset(),a):new Li(this)}}}),Xn.prototype.toKeySet=Xn.prototype.Lf,Xn.prototype.toArray=Xn.prototype.Fa,Xn.prototype.clear=Xn.prototype.clear,Xn.prototype.delete=Xn.prototype.delete,Xn.prototype.remove=Xn.prototype.remove,Xn.prototype.get=Xn.prototype.get,Xn.prototype.getValue=Xn.prototype.I,Xn.prototype.has=Xn.prototype.has,Xn.prototype.contains=Xn.prototype.contains,Xn.prototype.first=Xn.prototype.first,Xn.prototype.addAll=Xn.prototype.addAll,Xn.prototype.set=Xn.prototype.set,Xn.prototype.add=Xn.prototype.add,Xn.prototype.thaw=Xn.prototype.ka,Xn.prototype.freeze=Xn.prototype.freeze,Xn.className="Map";function Rt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):oe("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Qo,xr,es,cs,us;Rt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Rt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Rt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Rt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Rt.prototype.copy=function(){var a=new Rt;return a.x=this.x,a.y=this.y,a},Mt=Rt.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function no(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Rt(x,b)}return new Rt}function $i(a){return a.x.toString()+" "+a.y.toString()}Mt.toString=function(){return"Point("+this.x+","+this.y+")"},Mt.D=function(a){return a instanceof Rt?this.x===a.x&&this.y===a.y:!1},Mt.hi=function(a,y){return this.x===a&&this.y===y},Mt.Xa=function(a){return ve.B(this.x,a.x)&&ve.B(this.y,a.y)},Mt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Mt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},Rt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Mt=Rt.prototype,Mt.scale=function(a,y){return this.x*=a,this.y*=y,this},Mt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Mt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Mt.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Mt.ab=function(a){return Ko(a.x-this.x,a.y-this.y)},Mt.direction=function(a,y){return Ko(a-this.x,y-this.y)};function Ko(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Mt.Ry=function(a,y){return ve.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Mt.fA=function(a,y,x,E){return ve.qh(a,y,x,E,this.x,this.y,this),this},Mt.gA=function(a,y){return ve.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Mt.uA=function(a,y,x,E){return ve.No(this.x,this.y,a,y,x,E,this),this},Mt.vA=function(a,y){return ve.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Mt.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Mt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Mt.transform=function(a){return a.Ga(this),this};function ro(a,y){return y.Cd(a),a}function lr(a,y,x,E,b,z){var tt=b-x,ot=z-E,rt=tt*tt+ot*ot;x-=a,E-=y;var at=-x*tt-E*ot;return 0>=at||at>=rt?(tt=b-a,ot=z-y,Math.min(x*x+E*E,tt*tt+ot*ot)):(a=tt*E-ot*x,a*a/rt)}function ms(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Ji(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Mt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Rt.alloc=function(){var a=Ti.pop();return a===void 0?new Rt:a},Rt.allocAt=function(a,y){var x=Ti.pop();return x===void 0?new Rt(a,y):(x.x=a,x.y=y,x)},Rt.free=function(a){Ti.push(a)},Rt.prototype.isReal=Rt.prototype.w,Rt.prototype.setSpot=Rt.prototype.yi,Rt.prototype.setRectSpot=Rt.prototype.xi,Rt.prototype.snapToGridPoint=Rt.prototype.vA,Rt.prototype.snapToGrid=Rt.prototype.uA,Rt.prototype.projectOntoLineSegmentPoint=Rt.prototype.gA,Rt.prototype.projectOntoLineSegment=Rt.prototype.fA,Rt.intersectingLineSegments=function(a,y,x,E,b,z,tt,ot){return ve.Rl(a,y,x,E,b,z,tt,ot)},Rt.prototype.compareWithLineSegmentPoint=Rt.prototype.Ry,Rt.compareWithLineSegment=function(a,y,x,E,b,z){return ve.Fl(a,y,x,E,b,z)},Rt.prototype.direction=Rt.prototype.direction,Rt.prototype.directionPoint=Rt.prototype.ab,Rt.prototype.normalize=Rt.prototype.normalize,Rt.prototype.distanceSquared=Rt.prototype.zd,Rt.prototype.distanceSquaredPoint=Rt.prototype.Bf,Rt.prototype.scale=Rt.prototype.scale,Rt.prototype.rotate=Rt.prototype.rotate,Rt.prototype.offset=Rt.prototype.offset,Rt.prototype.subtract=Rt.prototype.re,Rt.prototype.add=Rt.prototype.add,Rt.prototype.equalsApprox=Rt.prototype.Xa,Rt.prototype.equalTo=Rt.prototype.hi,Rt.prototype.equals=Rt.prototype.D,Rt.prototype.set=Rt.prototype.set,Rt.prototype.setTo=Rt.prototype.sg;var Ti=[];Rt.className="Point",Rt.parse=no,Rt.stringify=$i,Rt.distanceLineSegmentSquared=lr,Rt.distanceSquared=ms,Rt.direction=Ji,Rt.Origin=Qo=new Rt(0,0).ja(),Rt.InfiniteTopLeft=xr=new Rt(-1/0,-1/0).ja(),Rt.InfiniteBottomRight=es=new Rt(1/0,1/0).ja(),Rt.SixPoint=cs=new Rt(6,6).ja(),Rt.NoPoint=us=new Rt(NaN,NaN).ja(),Rt.parse=no,Rt.stringify=$i,Rt.distanceLineSegmentSquared=lr,Rt.distanceSquared=ms,Rt.direction=Ji;function kn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):oe("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ki,Jo,jr,Ir,Ur,hs,ns;kn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.h=function(a,y){return this.width=a,this.height=y,this},kn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},kn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.copy=function(){var a=new kn;return a.width=this.width,a.height=this.height,a},Mt=kn.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function sa(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new kn(x,b)}return new kn}function Ys(a){return a.width.toString()+" "+a.height.toString()}Mt.toString=function(){return"Size("+this.width+","+this.height+")"},Mt.D=function(a){return a instanceof kn?this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y){return this.width===a&&this.height===y},Mt.Xa=function(a){return ve.B(this.width,a.width)&&ve.B(this.height,a.height)},Mt.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Mt.w=function(){return isFinite(this.width)&&isFinite(this.height)},kn.alloc=function(){var a=ga.pop();return a===void 0?new kn:a},kn.free=function(a){ga.push(a)},kn.prototype.isReal=kn.prototype.w,kn.prototype.inflate=kn.prototype.Bc,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 ga=[];kn.className="Size",kn.parse=sa,kn.stringify=Ys,kn.ZeroSize=Ki=new kn(0,0).ja(),kn.OneSize=Jo=new kn(1,1).ja(),kn.SixSize=jr=new kn(6,6).ja(),kn.EightSize=Ir=new kn(8,8).ja(),kn.TenSize=Ur=new kn(10,10).ja(),kn.InfiniteSize=hs=new kn(1/0,1/0).ja(),kn.NoSize=ns=new kn(NaN,NaN).ja(),kn.parse=sa,kn.stringify=Ys;function Ze(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof Rt?(x=a.x,a=a.y,y instanceof Rt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof kn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):oe("Incorrect second argument supplied to Rect constructor "+y)):oe("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Mt=Ze.prototype,Mt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Mt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function vs(a,y,x){a.width=y,a.height=x}Mt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Mt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Mt.dd=function(a){return this.x=a.x,this.y=a.y,this},Mt.tA=function(a){return this.width=a.width,this.height=a.height,this},Ze.prototype.copy=function(){var a=new Ze;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Mt=Ze.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function mu(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new Ze(x,b,z,tt)}return new Ze}function Ka(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Mt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Mt.D=function(a){return a instanceof Ze?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Mt.Xa=function(a){return ve.B(this.x,a.x)&&ve.B(this.y,a.y)&&ve.B(this.width,a.width)&&ve.B(this.height,a.height)};function gl(a,y){return ve.$(a.x,y.x)&&ve.$(a.y,y.y)&&ve.$(a.width,y.width)&&ve.$(a.height,y.height)}Mt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Mt.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Mt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},Mt.Bc=function(a,y){return Xr(this,y,a,y,a)},Mt.Co=function(a){return Xr(this,a.top,a.right,a.bottom,a.left)},Mt.Fv=function(a){return Xr(this,-a.top,-a.right,-a.bottom,-a.left)},Mt.Hz=function(a,y,x,E){return Xr(this,a,y,x,E)};function Xr(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Mt.Ex=function(a){return pl(this,a.x,a.y,a.width,a.height)},Mt.Uu=function(a,y,x,E){return pl(this,a,y,x,E)};function pl(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Mt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Mt.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function Tu(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Mt.Ye=function(a){return Hr(this,a.x,a.y,0,0)},Mt.ed=function(a){return Hr(this,a.x,a.y,a.width,a.height)},Mt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Hr(this,a,y,x,E)};function Hr(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Mt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function As(a,y,x,E,b,z,tt,ot){return tt===void 0&&(tt=0),ot===void 0&&(ot=0),a<=b&&b+tt<=a+x&&y<=z&&z+ot<=y+E}function kl(a,y,x,E,b,z,tt,ot){return a>tt+b||b>x+a?!1:!(y>ot+z||z>E+y)}Mt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Mt.Mz=function(){return this.width===0&&this.height===0},Ze.alloc=function(){var a=Zo.pop();return a===void 0?new Ze:a},Ze.allocAt=function(a,y,x,E){var b=Zo.pop();return b===void 0?new Ze(a,y,x,E):b.h(a,y,x,E)},Ze.free=function(a){Zo.push(a)},Gt.Object.defineProperties(Ze.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 Rt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new kn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Rt(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}}}),Ze.prototype.isEmpty=Ze.prototype.Mz,Ze.prototype.isReal=Ze.prototype.w,Ze.intersectsLineSegment=function(a,y,x,E,b,z,tt,ot){return ve.Fx(a,y,x,E,b,z,tt,ot)},Ze.prototype.setSpot=Ze.prototype.yi,Ze.prototype.union=Ze.prototype.Kv,Ze.prototype.unionRect=Ze.prototype.ed,Ze.prototype.unionPoint=Ze.prototype.Ye,Ze.prototype.intersects=Ze.prototype.Vu,Ze.prototype.intersectsRect=Ze.prototype.Yc,Ze.prototype.intersect=Ze.prototype.Uu,Ze.prototype.intersectRect=Ze.prototype.Ex,Ze.prototype.grow=Ze.prototype.Hz,Ze.prototype.subtractMargin=Ze.prototype.Fv,Ze.prototype.addMargin=Ze.prototype.Co,Ze.prototype.inflate=Ze.prototype.Bc,Ze.prototype.offset=Ze.prototype.offset,Ze.prototype.contains=Ze.prototype.contains,Ze.prototype.containsRect=Ze.prototype.Re,Ze.prototype.containsPoint=Ze.prototype.ca,Ze.prototype.equalsApprox=Ze.prototype.Xa,Ze.prototype.equalTo=Ze.prototype.hi,Ze.prototype.equals=Ze.prototype.D,Ze.prototype.setSize=Ze.prototype.tA,Ze.prototype.setPoint=Ze.prototype.dd,Ze.prototype.set=Ze.prototype.set,Ze.prototype.setTo=Ze.prototype.sg;var so=null,hr=null,Zo=[];Ze.className="Rect",Ze.parse=mu,Ze.stringify=Ka,Ze.contains=As,Ze.intersects=kl,Ze.ZeroRect=so=new Ze(0,0,0,0).ja(),Ze.NoRect=hr=new Ze(NaN,NaN,NaN,NaN).ja(),Ze.parse=mu,Ze.stringify=Ka,Ze.contains=As,Ze.intersects=kl;function hi(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):oe("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}hi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},hi.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},hi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},hi.prototype.copy=function(){var a=new hi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Mt=hi.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ns(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new hi;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new hi(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new hi(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new hi(x,b):new hi(x,b,z,tt)}return new hi}function is(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Mt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Mt.D=function(a){return a instanceof hi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Mt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Mt.Xa=function(a){return ve.B(this.top,a.top)&&ve.B(this.right,a.right)&&ve.B(this.bottom,a.bottom)&&ve.B(this.left,a.left)},Mt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},hi.alloc=function(){var a=ml.pop();return a===void 0?new hi:a},hi.free=function(a){ml.push(a)},hi.prototype.isReal=hi.prototype.w,hi.prototype.equalsApprox=hi.prototype.Xa,hi.prototype.equalTo=hi.prototype.hi,hi.prototype.equals=hi.prototype.D,hi.prototype.set=hi.prototype.set,hi.prototype.setTo=hi.prototype.sg;var Js=null,ol=null,ml=[];hi.className="Margin",hi.parse=Ns,hi.stringify=is,hi.ZeroMargin=Js=new hi(0,0,0,0).ja(),hi.TwoMargin=ol=new hi(2,2,2,2).ja(),hi.parse=Ns,hi.stringify=is;function ti(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Vr,Is,ba,Pa,vl,po,Bu,Ia,Da,Ca,zl,vu,pa,Oa,Fu,kh,ch,qh,fh,yu,tu,Za,gh,ph,Iu,nn,Si,mo,So,Ho,ao,dr,wr,Lr,Ts,Ws;ti.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ti.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},ti.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ti.prototype.copy=function(){var a=new ti;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Mt=ti.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function fs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Ah(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Vr;if(a==="TopLeft")return Is;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return ba;if(a==="TopRight")return Pa;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return vl;if(a==="Center")return po;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Bu;if(a==="BottomLeft")return Ia;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Da;if(a==="BottomRight")return Ca;if(a==="TopSide")return zl;if(a==="LeftSide")return vu;if(a==="RightSide")return pa;if(a==="BottomSide")return Oa;if(a==="TopBottomSides")return Fu;if(a==="LeftRightSides")return kh;if(a==="TopLeftSides")return ch;if(a==="TopRightSides")return qh;if(a==="BottomLeftSides")return fh;if(a==="BottomRightSides")return yu;if(a==="NotTopSide")return tu;if(a==="NotLeftSide")return Za;if(a==="NotRightSide")return gh;if(a==="NotBottomSide")return ph;if(a==="AllSides")return Iu;if(a==="Default")return nn;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new ti(x,b,z,tt)}return new ti}function Du(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Mt.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(Vr)?"None":this.D(Is)?"TopLeft":this.D(ba)?"Top":this.D(Pa)?"TopRight":this.D(vl)?"Left":this.D(po)?"Center":this.D(Bu)?"Right":this.D(Ia)?"BottomLeft":this.D(Da)?"Bottom":this.D(Ca)?"BottomRight":this.D(zl)?"TopSide":this.D(vu)?"LeftSide":this.D(pa)?"RightSide":this.D(Oa)?"BottomSide":this.D(Fu)?"TopBottomSides":this.D(kh)?"LeftRightSides":this.D(ch)?"TopLeftSides":this.D(qh)?"TopRightSides":this.D(fh)?"BottomLeftSides":this.D(yu)?"BottomRightSides":this.D(tu)?"NotTopSide":this.D(Za)?"NotLeftSide":this.D(gh)?"NotRightSide":this.D(ph)?"NotBottomSide":this.D(Iu)?"AllSides":this.D(nn)?"Default":"None"},Mt.D=function(a){return a instanceof ti?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Mt.gv=function(){return new ti(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Mt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Si))a=vu;else if(a.D(mo))a=pa;else if(a.D(So))a=zl;else if(a.D(Ho))a=Oa;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Mt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Mt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Mt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Mt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Mt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},ti.alloc=function(){var a=eu.pop();return a===void 0?new ti:a},ti.free=function(a){eu.push(a)},ti.prototype.isDefault=ti.prototype.Xb,ti.prototype.isNone=ti.prototype.ys,ti.prototype.isSide=ti.prototype.$c,ti.prototype.isNoSpot=ti.prototype.Mc,ti.prototype.isSpot=ti.prototype.sb,ti.prototype.includesSide=ti.prototype.Hf,ti.prototype.opposite=ti.prototype.gv,ti.prototype.equals=ti.prototype.D,ti.prototype.set=ti.prototype.set,ti.prototype.setTo=ti.prototype.sg;var eu=[];ti.className="Spot",ti.parse=Ah,ti.stringify=Du,ti.None=Vr=fs(new ti(0,0,0,0),0).ja(),ti.Default=nn=fs(new ti(0,0,-1,0),-1).ja(),ti.TopLeft=Is=new ti(0,0,0,0).ja(),ti.TopCenter=ba=new ti(.5,0,0,0).ja(),ti.TopRight=Pa=new ti(1,0,0,0).ja(),ti.LeftCenter=vl=new ti(0,.5,0,0).ja(),ti.Center=po=new ti(.5,.5,0,0).ja(),ti.RightCenter=Bu=new ti(1,.5,0,0).ja(),ti.BottomLeft=Ia=new ti(0,1,0,0).ja(),ti.BottomCenter=Da=new ti(.5,1,0,0).ja(),ti.BottomRight=Ca=new ti(1,1,0,0).ja(),ti.MiddleTop=ao=ba,ti.MiddleLeft=dr=vl,ti.MiddleRight=wr=Bu,ti.MiddleBottom=Lr=Da,ti.Top=So=ba,ti.Left=Si=vl,ti.Right=mo=Bu,ti.Bottom=Ho=Da,ti.TopSide=zl=fs(new ti(0,0,1,1),1).ja(),ti.LeftSide=vu=fs(new ti(0,0,1,2),1).ja(),ti.RightSide=pa=fs(new ti(0,0,1,4),1).ja(),ti.BottomSide=Oa=fs(new ti(0,0,1,8),1).ja(),ti.TopBottomSides=Fu=fs(new ti(0,0,1,9),1).ja(),ti.LeftRightSides=kh=fs(new ti(0,0,1,6),1).ja(),ti.TopLeftSides=ch=fs(new ti(0,0,1,3),1).ja(),ti.TopRightSides=qh=fs(new ti(0,0,1,5),1).ja(),ti.BottomLeftSides=fh=fs(new ti(0,0,1,10),1).ja(),ti.BottomRightSides=yu=fs(new ti(0,0,1,12),1).ja(),ti.NotTopSide=tu=fs(new ti(0,0,1,14),1).ja(),ti.NotLeftSide=Za=fs(new ti(0,0,1,13),1).ja(),ti.NotRightSide=gh=fs(new ti(0,0,1,11),1).ja(),ti.NotBottomSide=ph=fs(new ti(0,0,1,7),1).ja(),ti.AllSides=Iu=fs(new ti(0,0,1,15),1).ja(),Ts=new ti(.156,.156).ja(),Ws=new ti(.844,.844).ja(),ti.parse=Ah,ti.stringify=Du;function Gi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Gi.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Gi.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Gi.prototype.copy=function(){var a=new Gi;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Gi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Gi.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Gi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Gi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Gi.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Gi.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Gi.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Gi.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Mt=Gi.prototype,Mt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Mt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Mt.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Mt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Mt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Mt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,ot=this.m21,rt=this.m22,at=this.dx,ut=this.dy,ft=y*z+x*ot+at,mt=y*tt+x*rt+ut,yt=E*z+x*ot+at,Ct=E*tt+x*rt+ut;return x=y*z+b*ot+at,y=y*tt+b*rt+ut,z=E*z+b*ot+at,E=E*tt+b*rt+ut,b=Math.min(ft,yt),ft=Math.max(ft,yt),yt=Math.min(mt,Ct),mt=Math.max(mt,Ct),b=Math.min(b,x),ft=Math.max(ft,x),yt=Math.min(yt,y),mt=Math.max(mt,y),b=Math.min(b,z),ft=Math.max(ft,z),yt=Math.min(yt,E),mt=Math.max(mt,E),a.h(b,yt,ft-b,mt-yt),a},Gi.alloc=function(){var a=Su.pop();return a===void 0?new Gi:a},Gi.free=function(a){Su.push(a)},Gi.prototype.transformRect=Gi.prototype.pp,Gi.prototype.transformPoint=Gi.prototype.Ga,Gi.prototype.scale=Gi.prototype.scale,Gi.prototype.translate=Gi.prototype.translate,Gi.prototype.rotate=Gi.prototype.rotate,Gi.prototype.invert=Gi.prototype.Vj,Gi.prototype.multiplyInverted=Gi.prototype.bv,Gi.prototype.multiply=Gi.prototype.multiply,Gi.prototype.reset=Gi.prototype.reset,Gi.prototype.isIdentity=Gi.prototype.ws,Gi.prototype.equals=Gi.prototype.D,Gi.prototype.setTransform=Gi.prototype.setTransform,Gi.prototype.set=Gi.prototype.set;var Su=[];Gi.className="Transform",Gi.xF="54a702f3e53909c447824c6706603faf4c";var ve={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=ve.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);ve.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var ot=a,rt=x;else ot=x,rt=a;if(y<E)var at=y,ut=E;else at=E,ut=y;if(a===x)return at<=tt&&tt<=ut&&a-b<=z&&z<=a+b;if(y===E)return ot<=z&&z<=rt&&y-b<=tt&&tt<=y+b;if(rt+=b,ot-=b,ot<=z&&z<=rt&&(ut+=b,at-=b,at<=tt&&tt<=ut))if(rt-ot>ut-at)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,ot,rt,at,ut,ft){if(ve.Yb(a,y,tt,ot,ft,x,E)&&ve.Yb(a,y,tt,ot,ft,b,z))return ve.Yb(a,y,tt,ot,ft,at,ut);var mt=(a+x)/2,yt=(y+E)/2,Ct=(x+b)/2,kt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(mt+Ct)/2,x=(yt+kt)/2,Ct=(Ct+b)/2,kt=(kt+z)/2;var Ht=(E+Ct)/2,Dt=(x+kt)/2;return ve.cs(a,y,mt,yt,E,x,Ht,Dt,rt,at,ut,ft)||ve.cs(Ht,Dt,Ct,kt,b,z,tt,ot,rt,at,ut,ft)},ax:function(a,y,x,E,b,z,tt,ot,rt){var at=(x+b)/2,ut=(E+z)/2;return rt.h((((a+x)/2+at)/2+(at+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(z+ot)/2)/2)/2),rt},My:function(a,y,x,E,b,z,tt,ot){var rt=(x+b)/2,at=(E+z)/2;return Ji(((a+x)/2+rt)/2,((y+E)/2+at)/2,(rt+(b+tt)/2)/2,(at+(z+ot)/2)/2)},Dl:function(a,y,x,E,b,z,tt,ot,rt,at){if(ve.Yb(a,y,tt,ot,rt,x,E)&&ve.Yb(a,y,tt,ot,rt,b,z))Hr(at,a,y,0,0),Hr(at,tt,ot,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,mt=(x+b)/2,yt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(ut+mt)/2,x=(ft+yt)/2,mt=(mt+b)/2,yt=(yt+z)/2;var Ct=(E+mt)/2,kt=(x+yt)/2;ve.Dl(a,y,ut,ft,E,x,Ct,kt,rt,at),ve.Dl(Ct,kt,mt,yt,b,z,tt,ot,rt,at)}return at},Qe:function(a,y,x,E,b,z,tt,ot,rt,at){if(ve.Yb(a,y,tt,ot,rt,x,E)&&ve.Yb(a,y,tt,ot,rt,b,z))at.length===0&&(at.push(a),at.push(y)),at.push(tt),at.push(ot);else{var ut=(a+x)/2,ft=(y+E)/2,mt=(x+b)/2,yt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(ut+mt)/2,x=(ft+yt)/2,mt=(mt+b)/2,yt=(yt+z)/2;var Ct=(E+mt)/2,kt=(x+yt)/2;ve.Qe(a,y,ut,ft,E,x,Ct,kt,rt,at),ve.Qe(Ct,kt,mt,yt,b,z,tt,ot,rt,at)}return at},jv:function(a,y,x,E,b,z,tt,ot,rt,at){if(ve.Yb(a,y,b,z,at,x,E))return ve.Yb(a,y,b,z,at,ot,rt);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var mt=(ut+x)/2,yt=(ft+E)/2;return ve.jv(a,y,ut,ft,mt,yt,tt,ot,rt,at)||ve.jv(mt,yt,x,E,b,z,tt,ot,rt,at)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,ot){if(ve.Yb(a,y,b,z,tt,x,E))Hr(ot,a,y,0,0),Hr(ot,b,z,0,0);else{var rt=(a+x)/2,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(rt+x)/2,ft=(at+E)/2;ve.iv(a,y,rt,at,ut,ft,tt,ot),ve.iv(ut,ft,x,E,b,z,tt,ot)}return ot},ep:function(a,y,x,E,b,z,tt,ot){if(ve.Yb(a,y,b,z,tt,x,E))ot.length===0&&(ot.push(a),ot.push(y)),ot.push(b),ot.push(z);else{var rt=(a+x)/2,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(rt+x)/2,ft=(at+E)/2;ve.ep(a,y,rt,at,ut,ft,tt,ot),ve.ep(ut,ft,x,E,b,z,tt,ot)}return ot},Eo:function(a,y,x,E,b,z,tt,ot,rt,at,ut,ft,mt,yt){if(ve.Yb(a,y,tt,ot,mt,x,E)&&ve.Yb(a,y,tt,ot,mt,b,z))return!ve.Rl(a,y,tt,ot,rt,at,ut,ft)||(mt=(a-tt)*(at-ft)-(y-ot)*(rt-ut),mt===0)?!1:(yt.h(((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*ft-at*ut))/mt,((a*ot-y*tt)*(at-ft)-(y-ot)*(rt*ft-at*ut))/mt),!0);var Ct=(a+x)/2,kt=(y+E)/2,Ht=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(Ct+Ht)/2,x=(kt+Dt)/2,Ht=(Ht+b)/2,Dt=(Dt+z)/2;var Xt=(E+Ht)/2,$t=(x+Dt)/2,ie=1/0,fe=!1,Ae=0,Bn=0;return ve.Eo(a,y,Ct,kt,E,x,Xt,$t,rt,at,ut,ft,mt,yt)&&(a=(yt.x-rt)*(yt.x-rt)+(yt.y-at)*(yt.y-at),a<ie&&(ie=a,fe=!0,Ae=yt.x,Bn=yt.y)),ve.Eo(Xt,$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.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,ot,rt){return ve.B(a,x)&&ve.B(y,E)?(rt.h(a,y),!1):ve.$(b,tt)?ve.$(a,x)?(ve.qh(a,y,x,E,b,z,rt),!1):ve.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,rt):(ot=(ot-z)/(tt-b),ve.$(a,x)?(x=ot*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(rt.h(a,b),!1):x>y?(rt.h(a,y),!1):(rt.h(a,x),!0)):(tt=(E-y)/(x-a),ve.$(ot,tt)?(ve.qh(a,y,x,E,b,z,rt),!1):(b=(tt*a-ot*b+z-y)/(tt-ot),ve.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(rt.h(E,y),!1):b>a?(rt.h(a,y),!1):(rt.h(b,y),!0)):ve.qh(a,y,x,E,b,tt*(b-a)+y,rt))))},MA:function(a,y,x,E,b){return ve.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,ot,rt,at){function ut(Ht,Dt){var Xt=(Ht-a)*(Ht-a)+(Dt-y)*(Dt-y);Xt<ft&&(ft=Xt,rt.h(Ht,Dt))}var ft=1/0;ut(rt.x,rt.y);var mt=0,yt=0,Ct=0,kt=0;if(b<tt?(mt=b,yt=tt):(mt=tt,yt=b),z<ot?(Ct=b,kt=tt):(Ct=tt,kt=b),mt=(yt-mt)/2+at,at=(kt-Ct)/2+at,b=(b+tt)/2,z=(z+ot)/2,mt===0||at===0)return rt;if(.5>(x>a?x-a:a-x)){if(mt=1-(x-b)*(x-b)/(mt*mt),0>mt)return rt;mt=Math.sqrt(mt),E=-at*mt+z,ut(x,at*mt+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(mt*mt)+x*x/(at*at),ot=2*x*(y-x*a)/(at*at)-2*x*z/(at*at)-2*b/(mt*mt),mt=ot*ot-4*E*(2*x*a*z/(at*at)-2*y*z/(at*at)+z*z/(at*at)+b*b/(mt*mt)-1+(y-x*a)*(y-x*a)/(at*at)),0>mt)return rt;mt=Math.sqrt(mt),at=(-ot+mt)/(2*E),ut(at,x*at-x*a+y),mt=(-ot-mt)/(2*E),ut(mt,x*mt-x*a+y)}return rt},Ff:function(a,y,x,E,b,z,tt,ot,rt){var at=1e21,ut=a,ft=y;if(ve.Ve(a,y,a,E,b,z,tt,ot,rt)){var mt=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z);mt<at&&(at=mt,ut=rt.x,ft=rt.y)}return ve.Ve(x,y,x,E,b,z,tt,ot,rt)&&(mt=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z),mt<at&&(at=mt,ut=rt.x,ft=rt.y)),ve.Ve(a,y,x,y,b,z,tt,ot,rt)&&(y=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z),y<at&&(at=y,ut=rt.x,ft=rt.y)),ve.Ve(a,E,x,E,b,z,tt,ot,rt)&&(a=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z),a<at&&(at=a,ut=rt.x,ft=rt.y)),rt.h(ut,ft),1e21>at},us:function(a,y,x){return ve.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,ot){var rt=a+x,at=y+E;return b===tt?(z<ot?(tt=z,z=ot):tt=ot,a<=b&&b<=rt&&tt<=at&&z>=y):z===ot?(b<tt?(ot=b,b=tt):ot=tt,y<=z&&z<=at&&ot<=rt&&b>=a):!!(As(a,y,x,E,b,z)||As(a,y,x,E,tt,ot)||ve.Rl(a,y,rt,y,b,z,tt,ot)||ve.Rl(rt,y,rt,at,b,z,tt,ot)||ve.Rl(rt,at,a,at,b,z,tt,ot)||ve.Rl(a,at,a,y,b,z,tt,ot))},Rl:function(a,y,x,E,b,z,tt,ot){return a===x&&y===E&&b===tt&&z===ot?a===b&&y===z:0>=ve.Fl(a,y,x,E,b,z)*ve.Fl(a,y,x,E,tt,ot)&&0>=ve.Fl(b,z,tt,ot,a,y)*ve.Fl(b,z,tt,ot,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var ot=E>b?-1:1;z=[];var rt=tt/2,at=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return rt=at+ot*Math.min(E,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-5<E;)b=at+ot*Math.min(E,rt),z.push(ve.Vy(x,at,b,a,y)),E-=Math.abs(b-at),at=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),ot=a*Math.sin(z),rt=-ot,at=tt*tt+rt*rt,ut=at+tt*tt+rt*ot;return at=4/3*(Math.sqrt(2*at*ut)-ut)/(tt*ot-rt*tt),ot=tt-at*rt,tt=rt+at*tt,rt=-tt,at=z+y,z=Math.cos(at),at=Math.sin(at),[E+a*Math.cos(y),b+a*Math.sin(y),E+ot*z-tt*at,b+ot*at+tt*z,E+ot*z-rt*at,b+ot*at+rt*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var ot=x;return x+b-a<b/2&&(ot=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(ot,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,ot=0;else tt=0,ot=1;var rt=tt===0?a:y,at=tt===0?x:E;return(tt===0?b:z)&&(at=-at),tt=ot,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),ve.az(rt,tt===0?a:y,at,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,ot=-z+tt,rt=-z+Math.sqrt(a*a+tt*tt);y=ot;for(var at=0;9999999999>at&&(y=.5*(ot+rt),!(y===ot||y===rt));++at){var ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)ot=y;else if(0>ut)rt=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Mi,um:new Mi,Mf:new Mi,Nf:0,vm:100};ve.za=ve.AA;function En(a){ho(this),this.l=2,a===void 0&&(a=En.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===En.o?this.ee=new cn:(En.V===null&&(En.V=new cn().freeze()),this.ee=En.V),this.aq=this.ee.Ja,this.Ip=new Ze().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Is,this.gg=Ca,this.Rk=this.Sk=NaN,this.Uf=yn}En.prototype.copy=function(){var a=new En;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===En.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},En.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},En.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==En.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},En.prototype.ka=function(){if(Object.isFrozen(this)&&oe("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==En.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},En.prototype.Xa=function(a){if(!(a instanceof En))return!1;if(this.type!==a.type)return this.type===En.j&&a.type===En.o?Qu(this,a):a.type===En.j&&this.type===En.o?Qu(a,this):!1;if(this.type===En.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return ve.B(this.startX,a.startX)&&ve.B(this.startY,a.startY)&&ve.B(this.endX,a.endX)&&ve.B(this.endY,a.endY)};function Qu(a,y){return a.type!==En.j||y.type!==En.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&ve.B(a.startX,y.startX)&&ve.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===vr&&ve.B(a.endX,y.endX)&&ve.B(a.endY,y.endY))))}En.ia=function(a){return a.toString()},En.prototype.qb=function(a){a.classType===En&&(this.type=a)},En.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case En.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case En.u:var y=new Ze(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 En.F:if(y=new Ze(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 En.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},En.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},En.parse=function(a,y){function x(){return kt>=ie-1?!0:at[kt+1].match(fe)!==null}function E(){return kt++,at[kt]}function b(Bi){var Ei=parseFloat(E()),Go=parseFloat(E());Ht===Ht.toLowerCase()&&(Ei=$t.x+Ei,Go=$t.y+Go),Bi.h(Ei,Go)}function z(){return b($t),$t}function tt(){return b(Xt),Xt}function ot(){var Bi=Dt.toLowerCase();return Bi!=="c"&&Bi!=="s"&&Bi!=="q"&&Bi!=="t"?$t:new Rt(2*$t.x-Xt.x,2*$t.y-Xt.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<at.length;a++){var ut=at[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){rt=Hn();for(var ft="",mt=!1,yt=0;yt<ut.length;yt++){var Ct=ut[yt];Ct!=="."||mt?Ct==="."?(rt.push(ft),ft="."):ft+=Ct:(mt=!0,ft+=Ct)}for(rt.push(ft),at.splice(a,1),ut=0;ut<rt.length;ut++)at.splice(a+ut,0,rt[ut]);a+=rt.length-1,_n(rt)}}var kt=-1,Ht="",Dt="";rt=new Rt(0,0);var Xt=new Rt(0,0),$t=new Rt(0,0),ie=at.length;a=NS(null),mt=ft=ut=!1,yt=!0,Ct=null;for(var fe=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(kt>=ie-1);)if(Dt=Ht,Ht=E(),Ht!=="")switch(Ht.toUpperCase()){case"X":yt=!0,ft=ut=!1;break;case"M":for(Ct=z(),a.mc===null||yt===!0?(vg(a,Ct.x,Ct.y,ut,!ft,mt),yt=!1):a.moveTo(Ct.x,Ct.y),rt.assign($t);!x();)Ct=z(),a.lineTo(Ct.x,Ct.y);break;case"L":for(;!x();)Ct=z(),a.lineTo(Ct.x,Ct.y);break;case"H":for(;!x();)$t=new Rt((Ht===Ht.toLowerCase()?$t.x:0)+parseFloat(E()),$t.y),a.lineTo($t.x,$t.y);break;case"V":for(;!x();)$t=new Rt($t.x,(Ht===Ht.toLowerCase()?$t.y:0)+parseFloat(E())),a.lineTo($t.x,$t.y);break;case"C":for(;!x();){Ct=new Rt,b(Ct);var Ae=tt(),Bn=z();Ad(a,Ct.x,Ct.y,Ae.x,Ae.y,Bn.x,Bn.y)}break;case"S":for(;!x();)Ct=ot(),Ae=tt(),Bn=z(),Ad(a,Ct.x,Ct.y,Ae.x,Ae.y,Bn.x,Bn.y);break;case"Q":for(;!x();)Ct=tt(),Ae=z(),Gm(a,Ct.x,Ct.y,Ae.x,Ae.y);break;case"T":for(;!x();)Xt=Ct=ot(),Ae=z(),Gm(a,Ct.x,Ct.y,Ae.x,Ae.y);break;case"B":for(;!x();){Ct=parseFloat(E()),Ae=parseFloat(E()),Bn=parseFloat(E());var Kn=parseFloat(E()),Gn=parseFloat(E()),Pn=Gn,on=!1;x()||(Pn=parseFloat(E()),x()||(on=parseFloat(E())!==0)),Ht===Ht.toLowerCase()&&(Bn+=$t.x,Kn+=$t.y),a.arcTo(Ct,Ae,Bn,Kn,Gn,Pn,on)}break;case"A":for(;!x();)Ct=Math.abs(parseFloat(E())),Ae=Math.abs(parseFloat(E())),Bn=parseFloat(E()),Gn=Kn=!1,on=Pn=0,Pn=E(),Pn.length===1?(Kn=!!parseFloat(Pn),Gn=!!parseFloat(E()),Pn=parseFloat(E())):Pn.length===2?(Kn=!!parseFloat(Pn[0]),Gn=!!parseFloat(Pn[1]),Pn=parseFloat(E())):(Kn=!!parseFloat(Pn[0]),Gn=!!parseFloat(Pn[1]),Pn=parseFloat(Pn.slice(2))),on=parseFloat(E()),Ht===Ht.toLowerCase()&&(Pn=$t.x+Pn,on=$t.y+on),$t.h(Pn,on),P1(a,Ct,Ae,Bn,Kn,Gn,Pn,on);break;case"Z":w1(a),$t.assign(rt);break;case"F":for(Ct="",Ae=1;at[kt+Ae];)if(at[kt+Ae]==="0")mt=!0,Ae++;else if(at[kt+Ae].match(/[Uu]/)!==null)Ae++;else if(at[kt+Ae].match(fe)===null)Ae++;else{Ct=at[kt+Ae];break}Ct.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ct="",Ae=1;at[kt+Ae];)if(at[kt+Ae].match(/[Ff]/)!==null)Ae++;else if(at[kt+Ae].match(fe)===null)Ae++;else{Ct=at[kt+Ae];break}Ct.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(rt=a.os,Wm=a,y)for(y=rt.figures.iterator;y.next();)y.value.isFilled=!0;return rt},En.Ha=function(a,y){for(var x=a.length,E=Rt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}Rt.free(E)},En.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===En.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},En.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===En.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Ou(this,a,!1),Hr(a,0,0,0,0),a.freeze()},En.prototype.ix=function(){var a=new Ze;return Ou(this,a,!0),a};function Ou(a,y,x){switch(a.type){case En.j:case En.u:case En.F:x?y.h(a.od,a.pd,0,0):Hr(y,a.od,a.pd,0,0),Hr(y,a.Dc,a.Ec,0,0);break;case En.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):Hr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,ot=tt.length,rt=z.startX,at=z.startY,ut=0;ut<ot;ut++){var ft=tt[ut];switch(ft.type){case vr:case Ps:rt=ft.endX,at=ft.endY,Hr(y,rt,at,0,0);break;case aa:ve.Dl(rt,at,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),rt=ft.endX,at=ft.endY;break;case Al:ve.iv(rt,at,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),rt=ft.endX,at=ft.endY;break;case ys:case Gl:var mt=ft.type===ys?rl(ft,z):Ua(ft,z,rt,at),yt=mt.length;if(yt===0){rt=ft.type===ys?ft.centerX:ft.endX,at=ft.type===ys?ft.centerY:ft.endY,Hr(y,rt,at,0,0);break}ft=null;for(var Ct=0;Ct<yt;Ct++)ft=mt[Ct],ve.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(rt=ft[6],at=ft[7]);break;default:oe("Unknown Segment type: "+ft.type)}}}break;default:oe("Unknown Geometry type: "+a.type)}}En.prototype.normalize=function(){this._isFrozen&&qe(this);var a=this.ix();return this.offset(-a.x,-a.y),new Rt(-a.x,-a.y)},En.prototype.offset=function(a,y){return this._isFrozen&&qe(this),this.transform(1,0,0,1,a,y),this},En.prototype.scale=function(a,y){return this._isFrozen&&qe(this),this.transform(a,0,0,y,0,0),this},En.prototype.rotate=function(a,y,x){this._isFrozen&&qe(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Gi.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Gi.free(E),this},Mt=En.prototype,Mt.transform=function(a,y,x,E,b,z){switch(this.type){case En.j:case En.u:case En.F:var tt=this.od,ot=this.pd;this.od=tt*a+ot*x+b,this.pd=tt*y+ot*E+z,tt=this.Dc,ot=this.Ec,this.Dc=tt*a+ot*x+b,this.Ec=tt*y+ot*E+z;break;case En.o:for(var rt=this.figures.s,at=rt.length,ut=0;ut<at;ut++){var ft=rt[ut];tt=ft.startX,ot=ft.startY,ft.startX=tt*a+ot*x+b,ft.startY=tt*y+ot*E+z,ft=ft.segments.s;for(var mt=ft.length,yt=0;yt<mt;yt++){var Ct=ft[yt];switch(Ct.type){case vr:case Ps:tt=Ct.endX,ot=Ct.endY,Ct.endX=tt*a+ot*x+b,Ct.endY=tt*y+ot*E+z;break;case aa:tt=Ct.point1X,ot=Ct.point1Y,Ct.point1X=tt*a+ot*x+b,Ct.point1Y=tt*y+ot*E+z,tt=Ct.point2X,ot=Ct.point2Y,Ct.point2X=tt*a+ot*x+b,Ct.point2Y=tt*y+ot*E+z,tt=Ct.endX,ot=Ct.endY,Ct.endX=tt*a+ot*x+b,Ct.endY=tt*y+ot*E+z;break;case Al:tt=Ct.point1X,ot=Ct.point1Y,Ct.point1X=tt*a+ot*x+b,Ct.point1Y=tt*y+ot*E+z,tt=Ct.endX,ot=Ct.endY,Ct.endX=tt*a+ot*x+b,Ct.endY=tt*y+ot*E+z;break;case ys:tt=Ct.centerX,ot=Ct.centerY,Ct.centerX=tt*a+ot*x+b,Ct.centerY=tt*y+ot*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Ct.startAngle+=tt),0>a&&(Ct.startAngle=180-Ct.startAngle,Ct.sweepAngle=-Ct.sweepAngle),0>E&&(Ct.startAngle=-Ct.startAngle,Ct.sweepAngle=-Ct.sweepAngle),Ct.radiusX*=Math.sqrt(a*a+x*x),Ct.radiusY!==void 0&&(Ct.radiusY*=Math.sqrt(y*y+E*E));break;case Gl:if(tt=Ct.endX,ot=Ct.endY,Ct.endX=tt*a+ot*x+b,Ct.endY=tt*y+ot*E+z,Ct.radiusX===0||Ct.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Ct.xAxisRotation+=tt),0>a&&(Ct.xAxisRotation=180-Ct.xAxisRotation,Ct.isClockwiseArc=!Ct.isClockwiseArc),0>E&&(Ct.xAxisRotation=-Ct.xAxisRotation,Ct.isClockwiseArc=!Ct.isClockwiseArc),Ct.radiusX*=Math.sqrt(a*a+x*x),Ct.radiusY*=Math.sqrt(y*y+E*E);break;default:oe("Unknown Segment type: "+Ct.type)}}}}return this._isInvalidBounds=!0,this},Mt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case En.j:return ve.Yb(x,E,b,z,y,a.x,a.y);case En.u:var tt=Ze.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),Ze.free(tt),a;case En.F:tt=Math.min(x,b)-y;var ot=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),ot=a.y-(ot+y),1>=tt*tt/(x*x)+ot*ot/(y*y));case En.o:return Hl(this,a,y,!0,!1);default:return!1}};function Hl(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,ot=0,rt,at,ut,ft,mt=a.figures.s,yt=mt.length,Ct=0;Ct<yt;Ct++){var kt=mt[Ct],Ht=!kt.isEvenOdd;if(kt.isFilled){if(E&&kt.ca(z,y,x))return!0;var Dt=kt.segments;rt=kt.startX,at=kt.startY;for(var Xt=rt,$t=at,ie=Dt.s,fe=0;fe<=Dt.length;fe++){var Ae=void 0;if(fe!==Dt.length){Ae=ie[fe];var Bn=Ae.type;a=Ae.endX,ft=Ae.endY}else Bn=vr,a=Xt,ft=$t;switch(Bn){case Ps:if(Xt=Ju(z,y,tt,y,rt,at,Xt,$t),isNaN(Xt))return!0;ot+=Xt,Xt=a,$t=ft;break;case vr:if(rt=Ju(z,y,tt,y,rt,at,a,ft),isNaN(rt))return!0;ot+=rt;break;case aa:ut=ve.Fo(rt,at,Ae.point1X,Ae.point1Y,Ae.point2X,Ae.point2Y,a,ft,tt,y,z,y,.5),ot+=ut;break;case Al:ut=ve.Fo(rt,at,(rt+2*Ae.point1X)/3,(at+2*Ae.point1Y)/3,(2*Ae.point1X+a)/3,(2*Ae.point1Y+ft)/3,a,ft,tt,y,z,y,.5),ot+=ut;break;case ys:case Gl:Bn=Ae.type===ys?rl(Ae,kt):Ua(Ae,kt,rt,at);var Kn=Bn.length;if(Kn===0){if(rt=Ju(z,y,tt,y,rt,at,Ae.type===ys?Ae.centerX:Ae.endX,Ae.type===ys?Ae.centerY:Ae.endY),isNaN(rt))return!0;ot+=rt;break}Ae=null;for(var Gn=0;Gn<Kn;Gn++){if(Ae=Bn[Gn],Gn===0){if(ut=Ju(z,y,tt,y,rt,at,Ae[0],Ae[1]),isNaN(ut))return!0;ot+=ut}ut=ve.Fo(Ae[0],Ae[1],Ae[2],Ae[3],Ae[4],Ae[5],Ae[6],Ae[7],tt,y,z,y,.5),ot+=ut}Ae!==null&&(a=Ae[6],ft=Ae[7]);break;default:oe("Unknown Segment type: "+Ae.type)}rt=a,at=ft}if(Ht){if(ot!==0)return!0}else if(ot%2!==0)return!0;ot=0}else if(kt.ca(z,y,b?x:x+2))return!0}return!1}function Ju(a,y,x,E,b,z,tt,ot){if(ve.Yb(b,z,tt,ot,.05,a,y))return NaN;var rt=(a-x)*(z-ot);if(rt===0)return 0;var at=((a*E-y*x)*(b-tt)-(a-x)*(b*ot-z*tt))/rt;if(y=(a*E-y*x)*(z-ot)/rt,at>=a)return 0;if((b>tt?b-tt:tt-b)<(z>ot?z-ot:ot-z)){if(z<ot){if(y<z||y>ot)return 0}else if(y<ot||y>z)return 0}else if(b<tt){if(at<b||at>tt)return 0}else if(at<tt||at>b)return 0;return 0<rt?1:-1}function mh(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Mt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Rt),this.type===En.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,ot=0;ot<b;ot++){var rt=E[ot],at=rt.length;for(a=0;a<at;a++){var ut=rt[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,x=x[ot],ot=x[2*a],b=x[2*a+1],y.h(ot+(x[2*a+2]-ot)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},Mt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===En.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var ot=x[tt],rt=ot.length;for(a=0;a<rt;a++){var at=ot[a];if(z+at>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=at}}return NaN},Mt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===En.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,ot=0;ot<b;ot++){var rt=E[ot],at=rt.length;for(a=0;a<at;a++){var ut=rt[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[ot],x=ut[2*a],ot=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=ot+(a-ot)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-ot)?0:1>Math.abs(b-x)?0<=a-ot?90:270:1>Math.abs(a-ot)?0<=b-x?0:180:180*Math.atan2(a-ot,b-x)/Math.PI,y;tt+=ut}}return y},Mt.xx=function(a){if(this.type===En.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var ot=Rt.alloc();return ve.qh(y,x,E,b,z,a,ot),a=ot.x,z=ot.y,Rt.free(ot),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===En.u){tt=this.startX,ot=this.startY;var rt=this.endX;if(b=this.endY,tt!==rt||ot!==b){y=rt-tt,x=b-ot,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),rt),a=Math.min(Math.max(a,ot),b),tt=Math.abs(E-tt),rt=Math.abs(E-rt),ot=Math.abs(a-ot),b=Math.abs(a-b);var at=Math.min(tt,rt,ot,b);if(at===ot)return E/z;if(at===rt)return(y+a)/z;if(at===b)return(2*y+x-E)/z;if(at===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Rt.alloc(),b=1/0,ot=tt=0,rt=y.length;for(var ut=at=0,ft=0;ft<rt;ft++)for(var mt=y[ft],yt=x[ft],Ct=mt.length,kt=0;kt<Ct;kt+=2){var Ht=mt[kt],Dt=mt[kt+1];if(kt!==0){ve.qh(at,ut,Ht,Dt,a.x,a.y,E);var Xt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);Xt<b&&(b=Xt,tt=ot,tt+=Math.sqrt((E.x-at)*(E.x-at)+(E.y-ut)*(E.y-ut))),ot+=yt[(kt-2)/2]}at=Ht,ut=Dt}return Rt.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function Mc(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===En.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===En.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===En.F){var z=new Ks;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new To(ys);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=rl(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var ot=0;ot<b;ot++){var rt=a[ot];ve.Qe(tt,z,rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],.5,E),tt=rt[6],z=rt[7]}}y.push(E),x.push(yd(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,ot=tt,rt=z;for(var at=b.segments.s,ut=at.length,ft=0;ft<ut;ft++){var mt=at[ft];switch(mt.type){case Ps:4<=E.length&&(y.push(E),x.push(yd(E))),E=[],E.push(mt.endX),E.push(mt.endY),tt=mt.endX,z=mt.endY,ot=tt,rt=z;break;case vr:E.push(mt.endX),E.push(mt.endY),tt=mt.endX,z=mt.endY;break;case aa:ve.Qe(tt,z,mt.point1X,mt.point1Y,mt.point2X,mt.point2Y,mt.endX,mt.endY,.5,E),tt=mt.endX,z=mt.endY;break;case Al:ve.ep(tt,z,mt.point1X,mt.point1Y,mt.endX,mt.endY,.5,E),tt=mt.endX,z=mt.endY;break;case ys:var yt=rl(mt,b),Ct=yt.length;if(Ct===0){E.push(mt.centerX),E.push(mt.centerY),tt=mt.centerX,z=mt.centerY;break}for(var kt=0;kt<Ct;kt++){var Ht=yt[kt];ve.Qe(tt,z,Ht[2],Ht[3],Ht[4],Ht[5],Ht[6],Ht[7],.5,E),tt=Ht[6],z=Ht[7]}break;case Gl:if(yt=Ua(mt,b,tt,z),Ct=yt.length,kt=mt.endX,Ht=mt.endY,Ct===0){E.push(kt),E.push(Ht),tt=kt,z=Ht;break}for(kt=0;kt<Ct;kt++)Ht=yt[kt],ve.Qe(tt,z,Ht[2],Ht[3],Ht[4],Ht[5],Ht[6],Ht[7],.5,E),tt=Ht[6],z=Ht[7];break;default:oe("Segment not of valid type: "+mt.type)}mt.isClosed&&(E.push(ot),E.push(rt))}4<=E.length&&(y.push(E),x.push(yd(E)))}}}function yd(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],ot=a[z+1];z!==0&&y.push(Math.sqrt(ms(x,E,tt,ot))),x=tt,E=ot}return y}Mt.add=function(a){return this.ee.add(a),this},Mt.pm=function(a,y,x,E,b,z,tt,ot){return this._isFrozen&&qe(this),this.fg=new ti(a,y,b,z).freeze(),this.gg=new ti(x,E,tt,ot).freeze(),this},Gt.Object.defineProperties(En.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return Mc(this),this.tk}},flattenedLengths:{get:function(){return Mc(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===En.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===En.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&qe(this,a),this.na=a,a===En.o?this.ee=new cn:(En.V===null&&(En.V=new cn().freeze()),this.ee=En.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&qe(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&qe(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&qe(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&qe(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&qe(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&qe(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&qe(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&qe(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),En.prototype.setSpots=En.prototype.pm,En.prototype.add=En.prototype.add,En.prototype.getFractionForPoint=En.prototype.xx,En.prototype.getPointAndAngleAlongPath=En.prototype.Qu,En.prototype.getAngleAlongPath=En.prototype.wx,En.prototype.getPointAlongPath=En.prototype.Pu,En.prototype.containsPoint=En.prototype.ca,En.prototype.transform=En.prototype.transform,En.prototype.rotate=En.prototype.rotate,En.prototype.scale=En.prototype.scale,En.prototype.offset=En.prototype.offset,En.prototype.normalize=En.prototype.normalize,En.prototype.computeBoundsWithoutOrigin=En.prototype.ix,En.prototype.equalsApprox=En.prototype.Xa,En.className="Geometry",En.j=new Ue(En,"Line",0),En.u=new Ue(En,"Rectangle",1),En.F=new Ue(En,"Ellipse",2),En.o=new Ue(En,"Path",3),En.V=null,En.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",En.className="Geometry",En.stringify=En.ia,En.fillPath=En.nb,En.parse=En.parse,En.Line=En.j,En.Rectangle=En.u,En.Ellipse=En.F,En.Path=En.o;function Ks(a,y,x,E,b){ho(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new cn,this.sr=this.pl.Ja,this.fw=null}Ks.prototype.copy=function(){var a=new Ks;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Mt=Ks.prototype,Mt.Xa=function(a){if(!(a instanceof Ks&&ve.B(this.startX,a.startX)&&ve.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Mt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Mt.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Mt.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Mt.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Mt.add=function(a){return this.pl.add(a),this},Mt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,ot=this.segments.s,rt=ot.length,at=0;at<rt;at++){var ut=ot[at];switch(ut.type){case Ps:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case vr:if(ve.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case aa:if(ve.cs(E,b,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Al:if(ve.jv(E,b,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case ys:case Gl:var ft=ut.type===ys?rl(ut,this):Ua(ut,this,E,b),mt=ft.length,yt=ut.type===ys?ut.centerX:ut.endX,Ct=ut.type===ys?ut.centerY:ut.endY;if(mt===0){if(ve.Yb(E,b,yt,Ct,x,a,y))return!0;E=yt,b=Ct;break}for(yt=null,Ct=0;Ct<mt;Ct++)if(yt=ft[Ct],Ct===0&&ve.Yb(E,b,yt[0],yt[1],x,a,y)||ve.cs(yt[0],yt[1],yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,a,y,x))return!0;yt!==null&&(E=yt[6],b=yt[7]);break;default:oe("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&ve.Yb(E,b,z,tt,x,a,y))return!0}return!1},Gt.Object.defineProperties(Ks.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&qe(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&qe(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&qe(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&qe(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&qe(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&qe(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Ks.prototype.add=Ks.prototype.add,Ks.prototype.equalsApprox=Ks.prototype.Xa,Ks.className="PathFigure";function To(a,y,x,E,b,z,tt,ot){ho(this),a===void 0&&(a=vr),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===Gl?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),ot&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===ys&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ys&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}To.prototype.copy=function(){var a=new To;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},Mt=To.prototype,Mt.Xa=function(a){if(!(a instanceof To)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ps:case vr:return ve.B(this.endX,a.endX)&&ve.B(this.endY,a.endY);case aa:return ve.B(this.endX,a.endX)&&ve.B(this.endY,a.endY)&&ve.B(this.point1X,a.point1X)&&ve.B(this.point1Y,a.point1Y)&&ve.B(this.point2X,a.point2X)&&ve.B(this.point2Y,a.point2Y);case Al:return ve.B(this.endX,a.endX)&&ve.B(this.endY,a.endY)&&ve.B(this.point1X,a.point1X)&&ve.B(this.point1Y,a.point1Y);case ys:return ve.B(this.startAngle,a.startAngle)&&ve.B(this.sweepAngle,a.sweepAngle)&&ve.B(this.centerX,a.centerX)&&ve.B(this.centerY,a.centerY)&&ve.B(this.radiusX,a.radiusX)&&ve.B(this.radiusY,a.radiusY);case Gl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&ve.B(this.xAxisRotation,a.xAxisRotation)&&ve.B(this.endX,a.endX)&&ve.B(this.endY,a.endY)&&ve.B(this.radiusX,a.radiusX)&&ve.B(this.radiusY,a.radiusY);default:return!1}},Mt.qb=function(a){a.classType===To&&(this.type=a)},Mt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ps:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case vr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case aa: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 Al: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 ys: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 Gl:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.close=function(){return this.isClosed=!0,this};function rl(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=ve.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Gi.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),En.Ha(z,tt),Gi.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function Ua(a,y,x,E){function b(kt,Ht,Dt,Xt){return(kt*Xt<Ht*Dt?-1:1)*Math.acos((kt*Dt+Ht*Xt)/(Math.sqrt(kt*kt+Ht*Ht)*Math.sqrt(Dt*Dt+Xt*Xt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,ot=a.isLargeArc,rt=a.isClockwiseArc,at=a.Dc,ut=a.Ec,ft=Math.cos(tt),mt=Math.sin(tt),yt=ft*(x-at)/2+mt*(E-ut)/2;tt=-mt*(x-at)/2+ft*(E-ut)/2;var Ct=yt*yt/(y*y)+tt*tt/(z*z);return 1<Ct&&(y*=Math.sqrt(Ct),z*=Math.sqrt(Ct)),Ct=(ot===rt?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*yt*yt)/(y*y*tt*tt+z*z*yt*yt)),isNaN(Ct)&&(Ct=0),ot=Ct*y*tt/z,Ct=Ct*-z*yt/y,isNaN(ot)&&(ot=0),isNaN(Ct)&&(Ct=0),x=(x+at)/2+ft*ot-mt*Ct,E=(E+ut)/2+mt*ot+ft*Ct,ut=b(1,0,(yt-ot)/y,(tt-Ct)/z),ft=(yt-ot)/y,at=(tt-Ct)/z,yt=(-yt-ot)/y,ot=(-tt-Ct)/z,tt=b(ft,at,yt,ot),yt=(ft*yt+at*ot)/(Math.sqrt(ft*ft+at*at)*Math.sqrt(yt*yt+ot*ot)),-1>=yt?tt=Math.PI:1<=yt&&(tt=0),!rt&&0<tt&&(tt-=2*Math.PI),rt&&0>tt&&(tt+=2*Math.PI),rt=y>z?1:y/z,yt=y>z?z/y:1,y=ve.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Gi.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(rt,yt),En.Ha(y,z),Gi.free(z),a.ae=y,a.ae}Gt.Object.defineProperties(To.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&&qe(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&qe(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&qe(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&qe(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&qe(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&qe(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&qe(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&qe(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&qe(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&bn(a,">= zero",To,"radiusX"),this._isFrozen&&qe(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&bn(a,">= zero",To,"radiusY"),this._isFrozen&&qe(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&qe(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&&qe(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&qe(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&&qe(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&&qe(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),To.prototype.equalsApprox=To.prototype.Xa;var Ps=new Ue(To,"Move",0),vr=new Ue(To,"Line",1),aa=new Ue(To,"Bezier",2),Al=new Ue(To,"QuadraticBezier",3),ys=new Ue(To,"Arc",4),Gl=new Ue(To,"SvgArc",4);To.className="PathSegment",To.Move=Ps,To.Line=vr,To.Bezier=aa,To.QuadraticBezier=Al,To.Arc=ys,To.SvgArc=Gl;function Ma(){this.H=null,this.xu=new Rt(0,0).freeze(),this.mt=new Rt(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}Ma.prototype.copy=function(){var a=new Ma;return this.clone(a)},Ma.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},Ma.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},Ma.prototype.So=function(a,y){var x=this.diagram;return x===null||Bc(x,a,y),y},Ma.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Bc(x,a,y),y.assign(x.Ps(y))),y},Gt.Object.defineProperties(Ma.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),Ma.prototype.getMultiTouchDocumentPoint=Ma.prototype.Bz,Ma.prototype.getMultiTouchViewPoint=Ma.prototype.So,Ma.className="InputEvent";function $h(){this.H=null,this.xa="",this.ar=this.Lr=null}$h.prototype.copy=function(){var a=new $h;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},$h.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Gt.Object.defineProperties($h.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}}}),$h.className="DiagramEvent";function Dr(){this.Fm=Or,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Dr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Dr.prototype.copy=function(){var a=new Dr;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=Ke(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Ke(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Ke(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Ke(y)&&typeof y.J=="function"?y.J():y,a},Dr.prototype.qb=function(a){a.classType===Dr&&(this.change=a)},Dr.prototype.toString=function(){var a="";return a=this.change===sl?a+"* ":this.change===Or?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===sl?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=wi(this.object)),this.oldValue!==null&&(a+=" old: "+wi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+wi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Dr.prototype.I=function(a){return a?this.oldValue:this.newValue},Dr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Dr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Dr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Dr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Dr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Gt.Object.defineProperties(Dr.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===sl&&(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}}}),Dr.prototype.redo=Dr.prototype.redo,Dr.prototype.canRedo=Dr.prototype.canRedo,Dr.prototype.undo=Dr.prototype.undo,Dr.prototype.canUndo=Dr.prototype.canUndo,Dr.prototype.getParam=Dr.prototype.Dz,Dr.prototype.getValue=Dr.prototype.I,Dr.prototype.clear=Dr.prototype.clear;var sl=new Ue(Dr,"Transaction",-1),Or=new Ue(Dr,"Property",0),gs=new Ue(Dr,"Insert",1),Ds=new Ue(Dr,"Remove",2);Dr.className="ChangedEvent",Dr.Transaction=sl,Dr.Property=Or,Dr.Insert=gs,Dr.Remove=Ds;function Xs(){this.o=new cn().freeze(),this.xa="",this.j=!1}Xs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
|
|
|
`+E.toString())}}return y},Xs.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},Xs.prototype.canUndo=function(){return this.isComplete},Xs.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},Xs.prototype.canRedo=function(){return this.isComplete},Xs.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},Xs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Xn,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Or&&E.object){var b=y.get(E.object);b||(b=new Xn,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Gt.Object.defineProperties(Xs.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}}}),Xs.prototype.optimize=Xs.prototype.ak,Xs.prototype.redo=Xs.prototype.redo,Xs.prototype.canRedo=Xs.prototype.canRedo,Xs.prototype.undo=Xs.prototype.undo,Xs.prototype.canUndo=Xs.prototype.canUndo,Xs.prototype.clear=Xs.prototype.clear,Xs.className="Transaction";function Gr(){this.Pt=new sn,this.Jd=!1,this.u=new cn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new cn().freeze(),this.hl=new cn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Gr.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
|
|
|
`+this.history.M(E).toString(a-1);return y},Gr.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},Gr.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Mt=Gr.prototype,Mt.Xw=function(a){this.Pt.add(a)},Mt.Rx=function(a){this.Pt.remove(a)},Mt.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Mt.eb=function(a){return a===void 0&&(a=""),td(this,!0,a)},Mt.Kf=function(){return td(this,!1,"")};function td(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Jn("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Mt.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},Gr.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Gr.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Jn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Gr.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Gr.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Jn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Gr.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Dr;for(E.change=sl,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Gr.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Xs);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Jn("Change not within a transaction: "+x.toString()))}},Gr.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},Gt.Object.defineProperties(Gr.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),Gr.prototype.handleChanged=Gr.prototype.Tu,Gr.prototype.redo=Gr.prototype.redo,Gr.prototype.undo=Gr.prototype.undo,Gr.prototype.canUndo=Gr.prototype.canUndo,Gr.prototype.discardHistoryAfterIndex=Gr.prototype.lx,Gr.prototype.rollbackTransaction=Gr.prototype.Kf,Gr.prototype.commitTransaction=Gr.prototype.eb,Gr.prototype.startTransaction=Gr.prototype.Ea,Gr.prototype.removeModel=Gr.prototype.Rx,Gr.prototype.addModel=Gr.prototype.Xw,Gr.prototype.clear=Gr.prototype.clear,Gr.className="UndoManager";function ko(){ho(this),this.H=eh,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ma,this.Zr=-1}ko.prototype.toString=function(){return this.name!==""?this.name+" Tool":Vn(this.constructor)},ko.prototype.updateAdornments=function(){},ko.prototype.canStart=function(){return this.isEnabled},ko.prototype.doStart=function(){},ko.prototype.doActivate=function(){this.isActive=!0},ko.prototype.doDeactivate=function(){this.isActive=!1},ko.prototype.doStop=function(){},ko.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},ko.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},ko.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},ko.prototype.doMouseMove=function(){},ko.prototype.doMouseUp=function(){this.stopTool()},ko.prototype.doMouseWheel=function(){},ko.prototype.canStartMultiTouch=function(){return!0},ko.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Rt.allocAt(NaN,NaN)),E=y.So(1,Rt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}Rt.free(x),Rt.free(E)},ko.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Rt.allocAt(NaN,NaN)),E=y.So(1,Rt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new Rt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var ot=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=ot}y.bubbles=!1}Rt.free(x),Rt.free(E)},ko.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},ko.prototype.doKeyUp=function(){},ko.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},ko.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},ko.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Co?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Co?y.meta:y.control)||y.shift||a.clearSelection()}},ko.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Wf(a,E,x),E.handled};function Wf(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}ko.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var ot=z.mouseLeave;if(ot!==null&&(E===z||E!==null&&E.rg(z)||(ot(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},ko.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},ko.prototype.doCurrentObjectChanged=function(){},ko.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===Xd&&!y.shift||b===Yd&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===Xd&&y.shift||b===Yd&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var ot="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ot,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ot,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:ot="pixel";break;case 1:ot="line";break;case 2:ot="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(ot,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(ot,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},ko.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},ko.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=An(function(){x.doWaitAfter(E)},a)},ko.prototype.cancelWaitAfter=function(){this.Zr!==-1&&qt.clearTimeout(this.Zr),this.Zr=-1},ko.prototype.doWaitAfter=function(){},ko.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Fo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},ko.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Gt.Object.defineProperties(ko.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof ke&&(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}}}),ko.prototype.startTransaction=ko.prototype.Ea,ko.className="Tool";function Ar(){ko.call(this),this.name="ToolManager",this.hb=new cn,this.ob=new cn,this.Hb=new cn,this.F=this.V=850,this.o=new kn(2,2).ja(),this.Ha=5e3,this.ia=Yd,this.u=Ec,this.Mp=this.j=null,this.zj=-1}Le(Ar,ko),Ar.prototype.initializeStandardTools=function(){},Ar.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Fo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ar.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Nh&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===ed){y.bubbles=!0;return}if(this.gestureBehavior===Nh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Yd?this.mouseWheelBehavior=Xd:this.mouseWheelBehavior===Xd&&(this.mouseWheelBehavior=Yd)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Ar.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===ed){y.bubbles=!0;return}if(this.gestureBehavior===Nh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}Kf(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Kf(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Ar.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Fo&&(y===a||y.rg(a))||this.hideToolTip()},Ar.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},Ar.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},Ar.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof Fo)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},Ar.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Fo){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof to&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(qt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=An(function(){b.hideToolTip()},a)}},Ar.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},Ar.prototype.hideToolTip=function(){this.zj!==-1&&(qt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Fo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof to&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ar.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Ar.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ar.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ar.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ar.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},Ar.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},Ar.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},Gt.Object.defineProperties(Ar.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof Fo?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),Ar.prototype.replaceStandardTool=Ar.prototype.gb;var Yd=new Ue(Ar,"WheelScroll",0),Xd=new Ue(Ar,"WheelZoom",1),Zf=new Ue(Ar,"WheelNone",2),Ec=new Ue(Ar,"GestureZoom",3),Nh=new Ue(Ar,"GestureCancel",4),ed=new Ue(Ar,"GestureNone",5);Ar.className="ToolManager",Ar.WheelScroll=Yd,Ar.WheelZoom=Xd,Ar.WheelNone=Zf,Ar.GestureZoom=Ec,Ar.GestureCancel=Nh,Ar.GestureNone=ed;function Wr(){ko.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new Rt(NaN,NaN),this.Fr=new Rt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new sn().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var _u;Le(Wr,ko),Wr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},Wr.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},Wr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Co?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Wr.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),Ee=null,this.isActive=!0,this.tl.set(a.position),sf(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&Aa(a),Jf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Ee=this,Ge=this.diagram,this.doSimulatedDragOut()))};function sf(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Cn?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new ei,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Wr.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Wr.prototype.Pd=function(a){return a===void 0?new rd(Qo):this.isGridSnapEnabled?new rd(new Rt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new rd(a.copy())},Wr.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),nd(this),qd(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<_u.count){for(var y=_u,x=y.length,E=0;E<x;E++){var b=y.M(E);Th(b),xu(b),nd(b),b.diagram.ug()}y.clear()}Th(this),this.tl.h(NaN,NaN),Ge!==null&&(Ge.currentCursor=""),Ee=Ge=null,xu(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Qd(a,!0)},Wr.prototype.stopTransaction=function(){var a=this.diagram,y=ko.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function nd(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,af(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Uf(){var a=Ee;xu(a),Bh(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Wr.prototype.doCancel=function(){xu(this),Bh(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Wr.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Wr.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function qu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Bh(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Xn,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof Cn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,sf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bd(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function xu(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof Cn&&(x.value.point=new Rt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Th(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Ru(a,y,x){var E=a.diagram,b=a.startPoint,z=Rt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Rt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Aa(E),E.hk())}Wr.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&yh(E,a,y,this.dragOptions,x)};function Bh(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof Cn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Bd(E,-b.x,-b.y)}y.bd()}}function Lc(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),yl(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=af(a,b,E),!a.isActive&&Ee===null)return;var ot=E!==null?E.part:null;if(ot===null||x.handlesDragDropForTopLevelParts&&ot.isTopLevel&&!(ot instanceof Ii)){var rt=x.mouseDragOver;rt!==null&&(rt(b),tt=!0)}if(!a.isActive&&Ee===null||(a.doDragOver(y,E),!a.isActive&&Ee===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}Wr.prototype.findDragOverObject=function(a){var y=this;return zu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Fo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Wr.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function af(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var ot=a.Cg[tt],rt=ot.mouseDragLeave;if(rt!==null&&(rt(y,ot,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Ee===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=lf(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],ot=tt.mouseDragEnter,ot===null||(ot(y,tt,z),E=!0,!y.handled));x++);return E}function lf(a){var y=a.panel;return y!==null?y:a instanceof ci&&!(a instanceof Ii)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Vf(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(at){return E.findValidLinkablePort(at,x)});a=Rt.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var ot=b.value;if(ot.part!==null){var rt=ot.ga(po,a);rt=y.Bf(rt),rt<z&&(tt=ot,z=rt)}}return Rt.free(a),tt}function yl(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=Vf(a,x.i(0),!1),z!==null&&(tt=z.part));var ot=null,rt=null;x.toNode===null&&(ot=Vf(a,x.i(x.pointsCount-1),!0),ot!==null&&(rt=ot.part)),b.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!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):Fi(b,tt,z,rt,ot):Fi(b,null,null,null,null)}}}}Wr.prototype.doDragOver=function(){};function Fh(a,y){var x=a.diagram;a.dragsLink&&yl(a,!0),nd(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;Zg(a,b,z),z=lf(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Ee!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof On&&z.linksConnected.each(function(ot){ot.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Ee!==null){for(a=Ze.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof On&&Ut(x,E,a);Ze.free(a)}}}function Zg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Ii||(x=a.mouseDrop,x!==null&&x(y))}function Ut(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof Cn},!0,function(b){return b instanceof Cn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Wr.prototype.doDropOnto=function(){},Wr.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()?(qu(this,!1),Jf(a,this.copiedParts),Ru(this,this.copiedParts,!1),qd(a,this.copiedParts)):this.mayMove()?(xu(this),Ru(this,this.draggedParts,!0)):this.mayDragOut()?(qu(this,!1),Ru(this,this.copiedParts,!1)):xu(this),Lc(this,a.lastInput.documentPoint))}},Wr.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?(xu(this),qu(this,!0),Jf(a,this.copiedParts),Ru(this,this.copiedParts,!1),qd(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,xu(this),this.mayMove()&&(Ru(this,this.draggedParts,!0),Lc(this,a.lastInput.documentPoint))),this.Ym=!0,Fh(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Qt(this),a.Ya(),qd(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Wr.prototype.simulatedMouseMove=function(a,y,x){if(Ee===null)return!1;var E=Ee.diagram;x instanceof ke||(x=null);var b=Ge;return x!==b&&(b!==null&&b!==E&&(b.ug(),Ee.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),Ge=x,x!==null&&x!==E&&(Uf(),b=x.toolManager.findTool("Dragging"),b!==null&&(_u.contains(b)||_u.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},Wr.prototype.simulatedMouseUp=function(a,y,x){if(Ee===null)return!1;var E=Ge,b=Ee.diagram;if(x===null)return Ee.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Ee.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;Ge=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Uf(),_u.contains(E)||_u.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new Rt),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=Ee,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Qt(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof On&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Wr.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Co?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Wr.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Wr.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},Wr.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Wr.prototype.Az=function(){return Ee},Wr.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Ee;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Wr.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),al(a),a.animationManager.Cc(),a=Ee,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Wr.prototype.doSimulatedDragLeave=function(){var a=Ee;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Wr.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Ee;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Pe(this,y.draggedParts.Lf(),!1,a.firstInput),Ru(this,this.copiedParts,!1),Lc(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Wr.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Ee;if(y!==null){var x=y.diagram;if(y.Ym=!0,xu(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Pe(this,y.draggedParts.Lf(),!0,a.lastInput),Ru(this,this.copiedParts,!1);var E=new sn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Fh(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Pe(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=Ze.alloc();b=E=1/0;for(var tt=-1/0,ot=-1/0,rt=y.iterator;rt.next();){var at=rt.value;if(at.isVisible()){var ut=at.location;at=ut.x,ut=ut.y,isNaN(at)||isNaN(ut)||(at<E&&(E=at),ut<b&&(b=ut),at>tt&&(tt=at),ut>ot&&(ot=ut))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,ot-b),E=z.x+z.width/2,b=z.y+z.height/2,Ze.free(z),z=a.Fr,tt=new Xn,ot=Rt.alloc(),rt=y.iterator;rt.next();)at=rt.value,at instanceof Cn&&at.canCopy()&&(ut=x.I(at),ut!==null&&(ut.points=at.points,Bd(ut,z.x-E,z.y-b),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-(E-at.x),z.y-(b-at.y)),rt.location=ot,rt.Va(),tt.add(rt,a.Pd(ot))));Rt.free(ot),a.copiedParts=tt,sf(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bd(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Wr.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Wr.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Rt},Gt.Object.defineProperties(Wr.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}}}),Wr.prototype.getDraggingSource=Wr.prototype.Az;var Ee=null,Ge=null;Wr.className="DraggingTool",_u=new cn,qi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ar.prototype.doCancel=function(){Ee!==null&&Ee.doCancel(),ko.prototype.doCancel.call(this)};function Fe(){ko.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Cn,y=new Yi;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Yi,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new On,y=new Yi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Jo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new On,y=new Yi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Jo,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 Xn,this.Of=this.gj=this.Pf=null}Le(Fe,ko),Fe.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Fe.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=kn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,kn.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=po,z=Rt.alloc(),x.location=y.ga(po,z),Rt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Fe.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Jo,y.fromSpot=Vr,y.toSpot=Vr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Fe.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Fe.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof On){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)}},Fe.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof On))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof On)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Fe.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,ot=tt.part;if(ot instanceof On){var rt=tt.ga(po,Rt.alloc()),at=x.x-rt.x,ut=x.y-rt.y;Rt.free(rt),rt=at*at+ut*ut,rt<E&&(at=this.validPortsCache.I(tt),at!==null?at&&(y=tt,E=rt):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ot,tt)||!a&&this.isValidLink(ot,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=rt):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof On&&(x.layer===null||x.layer.allowLink))?y:null},Fe.prototype.isValidFrom=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.fromLinkable!==!0))return!1;var x=y.fromMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalFromNode&&y===this.originalFromPort)return!0;if(y=y.portId,y===null&&(y=""),a.Mo(y).count>=x)return!1}return!0},Fe.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},Fe.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Fe.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof On))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof On))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},Fe.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},Fe.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new sn;return E.add(a),hn(this,x,y,E)};function hn(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),hn(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),hn(a,y.labeledLink,x,E))))}Fe.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==pf){if(E===op){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!dn(this,a,y,x,!0)}if(E===rp){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!dn(this,a,y,x,!0)}if(E===ep)return a===y?a=!0:(E=new sn,E.add(y),a=rn(this,E,a,y,x)),!a;if(E===np)return!dn(this,a,y,x,!1);if(E===ip)return a===y?a=!0:(E=new sn,E.add(y),a=Nn(this,E,a,y,x)),!a}return!0};function dn(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&dn(a,tt,x,E,b)))return!0}return!1}function rn(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&rn(a,y,tt,E,b)))return!0}return!1}function Nn(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var ot=tt.fromNode;if(tt=tt.toNode,ot=ot===x?tt:ot,ot!==x&&Nn(a,y,ot,E,b))return!0}}return!1}Gt.Object.defineProperties(Fe.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}}}),Fe.className="LinkingBaseTool";function Rn(){Fe.call(this),this.name="Linking",this.V={},this.F=null,this.K=In,this.Xd=null}Le(Rn,Fe),Rn.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},Rn.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 On)))return null;var x=this.direction;if(x===In||x===gi){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===In||x===di)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Rn.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 On&&(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 On&&(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)},Rn.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()},Rn.prototype.doStop=function(){Fe.prototype.doStop.call(this),this.startObject=null},Rn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var ot=tt.part;ot instanceof On&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=ot,b=tt):(y=ot,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Rn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Cn)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},Rn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Rn.prototype.doNoLink=function(){},Gt.Object.defineProperties(Rn.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 In=new Ue(Rn,"Either",0),gi=new Ue(Rn,"ForwardsOnly",0),di=new Ue(Rn,"BackwardsOnly",0);Rn.className="LinkingTool",Rn.Either=In,Rn.ForwardsOnly=gi,Rn.BackwardsOnly=di;function ei(){Fe.call(this),this.name="Relinking";var a=new Yi;a.figure="Diamond",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Yi,a.figure="Diamond",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Ze}Le(ei,Fe),ei.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Cn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},ei.prototype.makeAdornment=function(a,y){var x=new Fo;return x.type=Sn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},ei.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},ei.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 Fo&&x.adornedPart instanceof Cn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=Ki),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ki),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},ei.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===xg||x===Fd)&&(x=_a),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},ei.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()},ei.prototype.doStop=function(){Fe.prototype.doStop.call(this),this.handle=null},ei.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof On&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},ei.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},ei.prototype.doNoRelink=function(){};function Fi(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Gt.Object.defineProperties(ei.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof Fo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),ei.className="RelinkingTool",qi("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),qi("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ai(){ko.call(this),this.name="LinkReshaping";var a=new Yi;a.figure="Rectangle",a.desiredSize=jr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Yi,a.figure="Diamond",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Rt,this.Yq=new cn}Le(ai,ko),ai.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:bi},ai.prototype.om=function(a,y){a.reshapingBehavior=y},ai.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Cn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},ai.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Fo,b.type=Sn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==_l)for(var ot=x+tt;ot<z-tt;ot++){var rt=this.makeResegmentHandle(a,ot);rt!==null&&(rt.segmentIndex=ot,rt.segmentFraction=.5,rt.fromMaxLinks=999,b.add(rt))}for(tt=x+1;tt<z;tt++)if(ot=this.makeHandle(a,tt),ot!==null){if(ot.segmentIndex=tt,tt!==x)if(tt===x+1&&E){rt=y.i(x);var at=y.i(x+1);ve.B(rt.x,at.x)&&ve.B(rt.y,at.y)&&(at=y.i(x-1)),ve.B(rt.x,at.x)?(this.om(ot,vo),ot.cursor="n-resize"):ve.B(rt.y,at.y)&&(this.om(ot,Vi),ot.cursor="w-resize")}else tt===z-1&&E?(rt=y.i(z-1),at=y.i(z),ve.B(rt.x,at.x)&&ve.B(rt.y,at.y)&&(rt=y.i(z+1)),ve.B(rt.x,at.x)?(this.om(ot,vo),ot.cursor="n-resize"):ve.B(rt.y,at.y)&&(this.om(ot,Vi),ot.cursor="w-resize")):tt!==z&&(this.om(ot,Bo),ot.cursor="move");b.add(ot)}b.adornedObject=a}return b},ai.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ai.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ai.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},ai.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof Cn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},ai.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ai.prototype.stopTransaction=function(){var a=this.diagram,y=ko.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ai.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ai.prototype.getResegmentingPoint=function(){return this.handle.ga(po)},ai.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ai.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Ai(this,tt,E,b,z,!0)||Ai(this,tt,E,b,z,!1))){var ot=y.points.copy();Ai(this,tt,E,b,z,!0)?(ot.cd(x-2,new Rt(tt.x,(z.y+tt.y)/2)),ot.cd(x+1,new Rt(z.x,(z.y+tt.y)/2))):(ot.cd(x-2,new Rt((z.x+tt.x)/2,tt.y)),ot.cd(x+1,new Rt((z.x+tt.x)/2,z.y))),ot.mb(x),ot.mb(x-1),y.points=ot,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Ai(this,E,b,z,tt,!0)||Ai(this,E,b,z,tt,!1))&&(ot=y.points.copy(),Ai(this,E,b,z,tt,!0)?(ot.cd(x-1,new Rt(E.x,(E.y+tt.y)/2)),ot.cd(x+2,new Rt(tt.x,(E.y+tt.y)/2))):(ot.cd(x-1,new Rt((E.x+tt.x)/2,E.y)),ot.cd(x+2,new Rt((E.x+tt.x)/2,tt.y))),ot.mb(x+1),ot.mb(x),y.points=ot,y.Wb())}}else tt=Rt.alloc(),ve.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Rt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Ai(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}ai.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===vo?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===Vi&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===vo?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===Vi&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);ve.B(z.x,b.x)&&ve.B(b.y,tt.y)?(ve.B(z.x,y.i(E-2).x)&&!ve.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),ve.B(tt.y,y.i(E+2).y)&&!ve.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):ve.B(z.y,b.y)&&ve.B(b.x,tt.x)?(ve.B(z.y,y.i(E-2).y)&&!ve.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),ve.B(tt.x,y.i(E+2).x)&&!ve.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):ve.B(z.x,b.x)&&ve.B(b.x,tt.x)?(ve.B(z.x,y.i(E-2).x)&&!ve.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),ve.B(tt.x,y.i(E+2).x)&&!ve.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):ve.B(z.y,b.y)&&ve.B(b.y,tt.y)&&(ve.B(z.y,y.i(E-2).y)&&!ve.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),ve.B(tt.y,y.i(E+2).y)&&!ve.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(po,Rt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Rt.alloc()),y.L(0,E.x,E.y),Rt.free(z),Rt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(po,Rt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Rt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Rt.free(x),Rt.free(a));y.zf()},ai.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Bo:return a;case vo:return new Rt(y.i(x).x,a.y);case Vi:return new Rt(a.x,y.i(x).y);default:case bi:return y.i(x)}},Gt.Object.defineProperties(ai.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Fo))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),ai.prototype.setReshapingBehavior=ai.prototype.om,ai.prototype.getReshapingBehavior=ai.prototype.Ru;var bi=new Ue(ai,"None",0),Vi=new Ue(ai,"Horizontal",1),vo=new Ue(ai,"Vertical",2),Bo=new Ue(ai,"All",3);ai.className="LinkReshapingTool",ai.None=bi,ai.Horizontal=Vi,ai.Vertical=vo,ai.All=Bo,qi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Oi(){ko.call(this),this.name="Resizing",this.o=new kn(1,1).freeze(),this.j=new kn(9999,9999).freeze(),this.yg=new kn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Yi;a.alignmentFocus=po,a.figure="Rectangle",a.desiredSize=jr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Rt,this.Dw=new kn,this.Tn=new Rt,this.rt=new kn(0,0),this.qt=new kn(1/0,1/0),this.pt=new kn(1,1)}Le(Oi,ko),Oi.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Cn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),oc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Oi.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Fo,y.type=Sn.Spot,y.locationSpot=po;var x=new Ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Is)),y.add(this.makeHandle(a,Pa)),y.add(this.makeHandle(a,Ca)),y.add(this.makeHandle(a,Ia)),y.add(this.makeHandle(a,ao)),y.add(this.makeHandle(a,wr)),y.add(this.makeHandle(a,Lr)),y.add(this.makeHandle(a,dr))}else if(Eu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Oi.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Oi.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=po),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Sn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Oi.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},Oi.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))},Oi.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Oi.prototype.stopTransaction=function(){var a=this.diagram,y=ko.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Oi.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Oi.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Rt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Rt.free(b)}},Oi.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Rt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Rt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Oi.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 Ii){var E=new cn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new st;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Oi.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=po);var tt=this.adornedObject.naturalBounds,ot=tt.x,rt=tt.y,at=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var mt=tt.height;0>=ft&&(ft=1),0>=mt&&(mt=1),ft=mt/ft}return mt=Rt.alloc(),ve.No(a.x,a.y,ot,rt,b.width,b.height,mt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(mt.x,at-E.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-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=at-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(mt.x,at-E.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,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=at-a.width)):(a.x=Math.max(mt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=at-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=rt+.5*(ut-rt-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(mt.x-ot,E.width),x.width),a.y=Math.max(mt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(mt.x-ot,E.width),x.width),a.height=Math.max(Math.min(mt.y-rt,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(mt.x-ot,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=rt+.5*(ut-rt-a.height))):0>=y.y?(a.y=Math.max(mt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=ot+.5*(at-ot-a.width))):1<=y.y&&(a.height=Math.max(Math.min(mt.y-rt,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=ot+.5*(at-ot-a.width))),Rt.free(mt),a},Oi.prototype.computeReshape=function(){var a=an;return this.adornedObject instanceof Yi&&(a=Mv(this.adornedObject)),!(a===Qn||this.diagram.lastInput.shift)},Oi.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},Oi.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},Oi.prototype.computeCellSize=function(){var a=new kn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Gt.Object.defineProperties(Oi.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof Fo))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Fo)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),Oi.className="ResizingTool",qi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function fo(){ko.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Rt,this.ue=null;var a=new Yi;a.figure="Ellipse",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Rt(NaN,NaN),this.u=0,this.F=50}Le(fo,ko),fo.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},fo.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Fo,y.type=Sn.Position,y.locationSpot=po;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Eu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},fo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},fo.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},fo.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(po)},fo.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},fo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Rt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},fo.prototype.stopTransaction=function(){var a=this.diagram,y=ko.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},fo.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},fo.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},fo.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()},fo.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},fo.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Gt.Object.defineProperties(fo.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 Fo))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 Fo)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}}}),fo.className="RotatingTool",qi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function or(){ko.call(this),this.name="ClickSelecting"}Le(or,ko),or.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},or.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},or.className="ClickSelectingTool";function Zi(){ko.call(this),this.name="Action",this.pk=null}Le(Zi,ko),Zi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},Zi.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()},Zi.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))}},Zi.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()},Zi.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())},Zi.prototype.doStop=function(){this.pk=null},Zi.className="ActionTool";function io(){ko.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Rt(0,0)}Le(io,ko),io.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)},io.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},io.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof ci)x.Zc()&&(Eu(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Ke(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Rt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Qf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Rt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Gt.Object.defineProperties(io.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}}}),io.className="ClickCreatingTool";function Wi(){ko.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new ci;a.layerName="Tool",a.selectable=!1;var y=new Yi;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Le(Wi,ko),Wi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},Wi.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Wi.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Wi.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=kn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),kn.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Wi.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},Wi.prototype.computeBoxBounds=function(){var a=this.diagram;return new Ze(a.firstInput.documentPoint,a.lastInput.documentPoint)},Wi.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Co?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new cn,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Gt.Object.defineProperties(Wi.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),Wi.className="DragSelectingTool";function xi(){ko.call(this),this.name="Panning",this.Xt=new Rt,this.xy=new Rt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(qt.document,"scroll",a.Kw,!1),a.stopTool()}}Le(xi,ko),xi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},xi.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(qt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},xi.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},xi.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},xi.prototype.doMouseMove=function(){this.move()},xi.prototype.doMouseUp=function(){this.move(),this.stopTool()},xi.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Gt.Object.defineProperties(xi.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),xi.className="PanningTool",qi("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),qi("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),qi("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),qi("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),qi("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function to(){this.F=this.u=this.j=this.o=null}Gt.Object.defineProperties(to.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),to.className="HTMLInfo";function Mo(a,y,x){this.text=a,this.hx=y,this.visible=x}Mo.className="ContextMenuButtonInfo";function Wo(){ko.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Rt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Le(Wo,ko);function Uo(a){var y=new to;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},br=y,a.tu=function(){a.stopTool()},y=Fn("div");var x=Fn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=Fn("style");qt.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",Ri,!1),E.addEventListener(y,"selectstart",Ri,!1),E.addEventListener(x,"contextmenu",Ri,!1)),y.className="goCXforeground",x.className="goCXbackground",qt.document.body&&(qt.document.body.appendChild(y),qt.document.body.appendChild(x)),ur=y,Bs=x,Os=!0}function Ri(a){return a.preventDefault(),!1}Wo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},Wo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Wo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Wo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof ke||(a instanceof ge?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},Wo.prototype.doActivate=function(){},Wo.prototype.doMouseDown=function(){if(ko.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Fo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&sr(this)},Wo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Fo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}sr(this)};function sr(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof to||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(fr(a,!0),a.isActive||a.stopTool())}Wo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function fr(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=br,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof ge?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Fo&&!a.currentContextMenu.visible&&a.stopTool()}}Wo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Wo.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Fo){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof to&&a.show(y,x,this);this.currentContextMenu=a},Wo.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},Wo.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Fo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof to&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Qr(a){var y=new cn;return y.add(new Mo("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Mo("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Mo("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Mo("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Mo("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Mo("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Mo("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Mo("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Mo("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Mo("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Mo("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Mo("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Mo("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Wo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Qr(this)),ur.innerHTML="",Bs.addEventListener("pointerdown",this.tu,!1);var y=this,x=Fn("ul");x.className="goCXul",ur.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=Fn("li"),z.className="goCXli";var tt=Fn("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(ot){return this.ky(a),y.stopTool(),ot.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}ur.style.display="block",Bs.style.display="block"},Wo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===br){ur.style.display="none",Bs.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Bs,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Gt.Object.defineProperties(Wo.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Fo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Os===!1&&br===null&&os&&Uo(this),br},set:function(a){a===null&&(Os=!0),br=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var br=null,Os=!1,Bs=null,ur=null;Wo.className="ContextMenuTool",qi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Ao(){ko.call(this),this.name="TextEditing",this.Zh=new yr,this.ia=null,this.V=xo,this.vj=null,this.qa=wo,this.u=1,this.F=!0,this.o=null,this.j=new to,this.kt=null,zr(this,this.j)}Le(Ao,ko);function zr(a,y){if(os){var x=Fn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(Do)):b==="Tab"?(a.acceptText(Vo),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==wo){var E=a.kt;a.qa===rr&&(a.qa=Nr),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==wo){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof yr&&z instanceof Ao)if(z.state===Ea)x.style.border="3px solid red",x.focus();else{var tt=E.ga(po),ot=b.position,rt=b.scale,at=E.Df()*rt;at<z.minimumEditorScale&&(at=z.minimumEditorScale);var ut=E.naturalBounds.width*at+6,ft=E.naturalBounds.height*at+2,mt=(tt.x-ot.x)*rt;tt=(tt.y-ot.y)*rt,ot=E.verticalAlignment,rt=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*at,ft=ot.y*ft-ot.y*rt+ot.offsetY-(.5*ft-.5*rt)-rt/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*at+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(mt-ut/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=at,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}Ao.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Va&&Va!==this&&(Va.acceptText(ia),Va&&Va!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof yr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===xo&&!y.isSelected||this.starting===Kr&&2>a.lastInput.clickCount)):!1},Ao.prototype.doStart=function(){Va=this,this.textBlock!==null&&this.doActivate()},Ao.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 yr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=rr;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Ze(this.textBlock.ga(Is),this.textBlock.ga(Ca));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Ao.prototype.doCancel=function(){this.stopTool()},Ao.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Ao.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ia)},Ao.prototype.acceptText=function(a){switch(a){case ia:this.qa===la?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===rr||this.qa===Ea||this.qa===Nr)&&(this.qa=Tr,Rs(this));break;case Cs:case Do:case Vo:(Do!==a||this.textBlock.isMultiline!==!0)&&(this.qa===rr||this.qa===Ea||this.qa===Nr)&&(this.qa=Tr,Rs(this))}};function Rs(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=la,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Ea,a.doError(b,z))}}Ao.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)},Ao.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Ao.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=wo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Ao.prototype.doStop=function(){Va=null},Ao.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},Ao.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Gt.Object.defineProperties(Ao.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)}}}),Ao.prototype.measureTemporaryTextBlock=Ao.prototype.Lx;var Cs=new Ue(Ao,"LostFocus",0),ia=new Ue(Ao,"MouseDown",1),Vo=new Ue(Ao,"Tab",2),Do=new Ue(Ao,"Enter",3),Yo=new Ue(Ao,"SingleClick",0),xo=new Ue(Ao,"SingleClickSelected",1),Kr=new Ue(Ao,"DoubleClick",2),wo=new Ue(Ao,"StateNone",0),rr=new Ue(Ao,"StateActive",1),Nr=new Ue(Ao,"StateEditing",2),Tr=new Ue(Ao,"StateValidating",3),Ea=new Ue(Ao,"StateInvalid",4),la=new Ue(Ao,"StateValidated",5),Va=null;Ao.className="TextEditingTool",Ao.LostFocus=Cs,Ao.MouseDown=ia,Ao.Tab=Vo,Ao.Enter=Do,Ao.SingleClick=Yo,Ao.SingleClickSelected=xo,Ao.DoubleClick=Kr,Ao.StateNone=wo,Ao.StateActive=rr,Ao.StateEditing=Nr,Ao.StateValidating=Tr,Ao.StateInvalid=Ea,Ao.StateValidated=la,qi("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Jr(a){Nl||(Sl(),Nl=!0),this.H=eh,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=nu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new sn,this.ce=new $r,this.ce.Yd=this,this.Ei=new sn,this.pu=new sn,this.Sr=new sn,this.pr=new sn,a&&Object.assign(this,a)}Jr.prototype.Xe=function(a){this.H=a},Jr.prototype.canStart=function(){return!0};function La(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ha(a.H),a.zb=!0)}function ta(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===nu?(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===Kl&&y.vc.clear(),a.Qw=!!(a.Pk===iu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),ka(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==ja&&E!==null&&(delete E.start.scale,delete E.end.scale),qt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Aa(x),kc(x),a.zb=!1,y.start(),y.bc&&(ps(a),x.Ya(),vh(y,0),al(x,!0),Qs(a),x.R("AnimationStarting",a)))}))}}function ma(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function $u(a,y,x,E){a.isTicking||ma(a)||y instanceof Cn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Mt=Jr.prototype,Mt.fv=function(a){return this.ce.fv(a)},Mt.Xu=function(a){return this.ce.Xu(a)};function _r(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var ot=!0;else{for(ot=tt.vc.iterator;ot.next();){var rt=ot.key;if(rt instanceof ge&&rt.diagram!==null||rt instanceof ke){ot=!0;break t}}ot=!1}ot?Zl(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(ps(b),al(b.H),Qs(b)),qt.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),qt.requestAnimationFrame(function(){x()}))}function ss(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ps(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Qs(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Mt.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),ka(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),ka(y,this.H)},Mt.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Mt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Ss(this,a))},Mt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Zs(this.ce,y,"position",y.position,y.position),Ss(this,a))};function va(a,y,x){!a.zb||y.D(x)||ma(a)||(a.H.pi||(y=x.copy()),Zs(a.ce,a.H,"position",y,x))}function Cr(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Ss(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function ya(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],ot=a[2];a=a[3];var rt=y[0],at=y[1],ut=y[2];return y=y[3],ot===0||ot===100?(z=rt,tt=at):(ut===0||ut===100)&&(rt=z,at=tt),180<Math.abs(rt-z)&&(rt>z?z+=360:rt+=360),z=b(x,z,rt-z,E)%360,tt=b(x,tt,at-tt,E),ot=b(x,ot,ut-ot,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+ot+"%, "+x+")"}function Sl(){function a(x,E,b,z,tt,ot){x.position=new Rt(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot))}var y=new Xn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,ot){tt<ot?x.mm(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot),!1):x.position=new Rt(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot))}),y.add("location",function(x,E,b,z,tt,ot){tt<ot?x.mm(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot),!0):x.location=new Rt(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot))}),y.add("position:placeholder",function(x,E,b,z,tt,ot){tt<ot?x.mm(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot),!1):x.position=new Rt(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,ot){var rt=x.actualBounds,at=b.actualBounds;b=at.x+at.width/2-rt.width/2,rt=at.y+at.height/2-rt.height/2,tt<ot?x.mm(z(tt,E.x,b-E.x,ot),z(tt,E.y,rt-E.y,ot),!1):x.position=new Rt(z(tt,E.x,b-E.x,ot),z(tt,E.y,rt-E.y,ot))}),y.add("desiredSize",function(x,E,b,z,tt,ot){x.desiredSize=new Ze(z(tt,E.width,b.width-E.width,ot),z(tt,E.height,b.height-E.height,ot))}),y.add("width",function(x,E,b,z,tt,ot){x.width=z(tt,E,b-E,ot)}),y.add("height",function(x,E,b,z,tt,ot){x.height=z(tt,E,b-E,ot)}),y.add("fill",function(x,E,b,z,tt,ot){x.fill=ya(E,b,tt,ot,z)}),y.add("stroke",function(x,E,b,z,tt,ot){x.stroke=ya(E,b,tt,ot,z)}),y.add("strokeWidth",function(x,E,b,z,tt,ot){x.strokeWidth=z(tt,E,b-E,ot)}),y.add("strokeDashOffset",function(x,E,b,z,tt,ot){x.strokeDashOffset=z(tt,E,b-E,ot)}),y.add("background",function(x,E,b,z,tt,ot){x.background=ya(E,b,tt,ot,z)}),y.add("areaBackground",function(x,E,b,z,tt,ot){x.areaBackground=ya(E,b,tt,ot,z)}),y.add("opacity",function(x,E,b,z,tt,ot){x.opacity=z(tt,E,b-E,ot)}),y.add("scale",function(x,E,b,z,tt,ot){x.scale=z(tt,E,b-E,ot)}),y.add("angle",function(x,E,b,z,tt,ot){x.angle=z(tt,E,b-E,ot)}),Wl=y}Gt.Object.defineProperties(Jr.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&bn(a,">= 1",Jr,"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}}}),Jr.prototype.stopAnimation=Jr.prototype.Cc;var Wl=null,Nl=!1,nu=new Ue(Jr,"Default",1),iu=new Ue(Jr,"AnimateLocations",2),Kl=new Ue(Jr,"None",3);Jr.className="AnimationManager",Jr.defineAnimationEffect=function(a,y){Nl||(Sl(),Nl=!0),Wl.add(a,y)},Jr.Default=nu,Jr.AnimateLocations=iu,Jr.None=Kl;function $r(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=ou,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Qo,this.vc=new Xn,this.Tt=new Xn,this.yl=new sn,this.Ut=new sn,this.dw=Md,a&&Object.assign(this,a)}$r.prototype.suspend=function(){this.Xk=!0},$r.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Zl(this,!0),ps(this.Yd),al(this.H),Qs(this.Yd),this.H.redraw()};function ka(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}Mt=$r.prototype,Mt.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof ke?a=x:x instanceof ge&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===nu&&this===y.defaultAnimation&&(this.Lp=ju,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=mf),ps(y),this.yl.each(function(E){E.data=null,a.add(E)}),Qs(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,_r(y,this),this)},Mt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Mt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof ke?this.H=a:a instanceof ge&&a.diagram!==null&&(this.H=a.diagram)),a instanceof ci){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Zs(this,a,y,x,E,b),this};function Zs(a,y,x,E,b,z){var tt=a.vc;if(y instanceof ke&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(ad(E),sv(),E=[Jl.j,Jl.u,Jl.o,Jl.F],ad(b),sv(),b=[Jl.j,Jl.u,Jl.o,Jl.F]),tt.contains(y)){var ot=tt.I(y),rt=ot.start,at=ot.end;rt[x]===void 0&&(rt[x]=xs(E)),at[x]=xs(b)}else rt={},at={},rt[x]=xs(E),at[x]=xs(b),ot=rt.position,y instanceof ge&&ot instanceof Rt&&!ot.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ot.assign(at.position),ot=new th(rt,at,z),tt.add(y,ot);tt=rt[x],tt instanceof Rt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof ci?ot.Ku.location=xs(y.location):z&&(ot.Ku[x]=xs(E))}function xs(a){return a instanceof Rt||a instanceof kn?a.copy():a}Mt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Mt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Zl(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),ps(x),vh(a,b),al(a.H,!0),Qs(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function vh(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof ge&&z.diagram===null)){var tt=E.value,ot=b?tt.end:tt.start;tt=b?tt.start:tt.end;var rt=Wl,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)}}}Mt.stop=function(){return this.bc?(this.Ml(!0),this):this},Mt.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,ps(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=Wl;E.next();){var tt=E.key,ot=E.value,rt=b?ot.end:ot.start,at=b?ot.start:ot.end,ut=ot.Ku,ft;for(ft in at)if(z.get(ft)!==null){var mt=ft;!ot.Hu||mt!=="position:nodeCollapse"&&mt!=="position:placeholder"||(mt="position"),z.get(mt)(tt,rt[ft],ut[ft]!==void 0?ut[ft]:ot.Hu?rt[ft]:at[ft],this.Lp,this.Gd,this.Gd,this)}ot.Hu&&ut.location!==void 0&&tt instanceof ci&&(tt.location=ut.location),ot.nv&&tt instanceof ci&&tt.Zb(!1)}if(y.As.clear(),Qd(y,!1),y.Ya(),y.N(),al(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}al(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Qs(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),ka(this,null),x.Ml(this),y.$b())}},Mt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof Ii&&(E=y.placeholder),E!==null?(x=E.ga(Is),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Rt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Ii)for(a=a.memberParts;a.next();)E=a.value,E instanceof On&&this.Cj(E,y)},Mt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Ii&&(x=y.placeholder),x!==null){var E=x.ga(Is);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof Ii)for(a=a.memberParts;a.next();)E=a.value,E instanceof On&&this.Aj(E,y)}},Mt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Gt.Object.defineProperties($r.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&bn(a,">= 1",$r,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:oe("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),$r.prototype.getTemporaryState=$r.prototype.Ez,$r.prototype.stop=$r.prototype.stop,$r.prototype.add=$r.prototype.add,$r.prototype.addTemporaryPart=$r.prototype.Iy;function ou(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function ju(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}$r.className="Animation",$r.EaseLinear=function(a,y,x,E){return x*a/E+y},$r.EaseInOutQuad=ou,$r.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},$r.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},$r.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},$r.EaseOutExpo=ju;function th(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}th.className="AnimationState";function Tl(a,y,x){this.xd=null,this.rf=a,this.so=x||Ms,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ua))}Tl.prototype.copy=function(){var a=new Tl(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function Zr(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))}Gt.Object.defineProperties(Tl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var Ms=new Ue(Tl,"Default",1),ua=new Ue(Tl,"Immediate",2),Es=new Ue(Tl,"Bundled",3);Tl.className="AnimationTrigger",Tl.Default=Ms,Tl.Immediate=ua,Tl.Bundled=Es;function Rr(a){ho(this),this.H=null,this.Pa=new cn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}Mt=Rr.prototype,Mt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Ba(x)}a.clear(),this.Zq.length=0},Mt.Xe=function(a){this.H=a},Mt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,ot=this.Pa.iterator;ot.next();){var rt=ot.value;rt instanceof Ii?b++:rt instanceof On?E++:rt instanceof Cn?z++:rt instanceof Fo?tt++:x++}if(ot="",0<x&&(ot+=x+" Parts "),0<E&&(ot+=E+" Nodes "),0<b&&(ot+=b+" Groups "),0<z&&(ot+=z+" Links "),0<tt&&(ot+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ot+=`
|
|
|
`+x.toString(),E=x.data,E!==null&&zo(E)&&(ot+=" #"+zo(E)),x instanceof On?ot+=" "+wi(E):x instanceof Cn&&(ot+=" "+wi(x.fromNode)+" "+wi(x.toNode));return y+" "+this.Pa.count+": "+ot},Mt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Rt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var ot=z[tt];if((E!==!0||oc(ot)!==!1)&&ot.isVisible()&&(b.assign(a),ro(b,ot.oe),ot=ot.ic(b,y,x),ot!==null&&(y!==null&&(ot=y(ot)),ot!==null&&(x===null||x(ot)))))return Rt.free(b),ot}return Rt.free(b),null},Mt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof cn||E instanceof sn||(E=new sn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Rt.alloc(),tt=this.Pa.s,ot=tt.length;ot--;){var rt=tt[ot];if((b!==!0||oc(rt)!==!1)&&rt.isVisible()){z.assign(a),ro(z,rt.oe);var at=rt;rt.ji(z,y,x,E)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||E.add(at))}}return Rt.free(z),E},Mt.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof cn||b instanceof sn||(b=new sn),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,ot=tt.length;ot--;){var rt=tt[ot];if((z!==!0||oc(rt)!==!1)&&rt.isVisible()){var at=rt;rt.Cf(a,y,x,E,b)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||b.add(at))}}return b},Mt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var ot=this.Pa.s,rt=ot.length;rt--;){var at=ot[rt];if((tt!==!0||oc(at)!==!1)&&z(at)&&at.isVisible()){var ut=at;at.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},Mt.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof cn||b instanceof sn)&&(z=b),b=!0),z instanceof cn||z instanceof sn||(z=new sn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var ot=Rt.alloc(),rt=Rt.alloc(),at=this.Pa.s,ut=at.length;ut--;){var ft=at[ut];if((tt!==!0||oc(ft)!==!1)&&ft.isVisible()){ot.assign(a),ro(ot,ft.oe),rt.h(a.x+y,a.y),ro(rt,ft.oe);var mt=ft;ft.og(ot,rt,x,E,b,z)&&(x!==null&&(mt=x(mt)),mt===null||E!==null&&!E(mt)||z.add(mt))}}return Rt.free(ot),Rt.free(rt),z},Mt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Hn();for(var b=Hn(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Cn){if(tt.fd===!1)continue}else if(tt instanceof Fo&&tt.adornedPart!==null)continue;var ot=tt.actualBounds;tt.isVisible()&&Tu(ot,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Dv(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Dv(b[y]);_n(a),_n(b)}}};function Sa(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Mt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=Sa(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,ot=Ze.alloc(),rt=0;rt<E;rt++)this.Oj(a,x[rt],y,z,tt,ot,!0);if(Ze.free(ot),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function xl(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=Sa(a,y),ot=a.Zq;ot.length=0;for(var rt=x.scale,at=Ze.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,ot,rt,at,!1)}Ze.free(at),y.globalAlpha=tt}}}Mt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!oc(y))a.Hs(y);else{if(E!==null&&y instanceof Cn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var ot=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(ot)){a.Hs(y);return}E=!z.Re(ot)}E&&(a.save(),a instanceof Bl?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),ot.width*b>x.Oq||ot.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(as(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(as(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),as(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Mt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Or,a,this,y,x,E,b)},Mt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Ba(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),wu(this,a,y),a},Mt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,Ba(y),a};function wu(a,y,x){if(y=uf(a,y,x),x instanceof Ii&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var ot=b[tt];if(ot===x&&(y=tt,0<=E)||0>E&&ot.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&wu(a,-1,y)}x.svg!==null&&x.svg.remove()}function uf(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var ot=y+1,rt=NaN;ot<b&&(rt=a.M(ot).zOrder,!!isNaN(rt));)ot++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(rt)&&rt<E)for(;;){if(ot===b||rt>=E){if(ot--,ot===y)break;return a.mb(y),a.Gb(ot,x),ot}for(rt=NaN;++ot<b&&(rt=a.M(ot).zOrder,isNaN(rt)););}return y}Gt.Object.defineProperties(Rr.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&oe("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&oe("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&bn(a,"0 <= value <= 1",Rr,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),Rr.prototype.findObjectsNear=Rr.prototype.og,Rr.prototype.findObjectsIn=Rr.prototype.Cf,Rr.prototype.findObjectsAt=Rr.prototype.ji,Rr.prototype.findObjectAt=Rr.prototype.ic,Rr.className="Layer";function ke(a,y){if(hm||(Na(),hm=!0),ho(this),eh=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,os){var x=this,E=function(){x.removeEventListener(qt.document,"DOMContentLoaded",E,!1),x.setRTL()};qt.document.body!==null?this.setRTL():x.addEventListener(qt.document,"DOMContentLoaded",E,!1)}this.ol=null,ng.add("Model",er);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var ot=z.change;z.modelChange===""&&ot===Or&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,hf(this),this.model=hy(),this.Wg=!0,Jd(this),this.layout=new Br,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new dm,a!==void 0&&(typeof a=="string"||qt.Element&&a instanceof Element?bc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Ih,eh;function hf(a){a.Yd=new Jr,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new cn,a.pj=new Xn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Rt(NaN,NaN).freeze(),a.du=new Rt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Rt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Gi,a.zu=new Rt(NaN,NaN).freeze(),a.ut=new Ze(NaN,NaN,NaN,NaN).freeze(),a.rj=new hi(0,0,0,0).freeze(),a.sj=Md,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ja,a.zk=nn,a.Fg=ja,a.pq=nn,a.yt=Is,a.Bt=Is,a.Fc=!0,a.pn=!1,a.De=new sn,a.Eh=new Xn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new hi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ma,a.bq.diagram=a,a.Qg=new Ma,a.Qg.diagram=a,a.cj=new Ma,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,ev(a),a.ai=new sn,a.Ht=!0,a.uu=Ed,a.pw=!1,a.wu=pf,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Xn,a.Xn=new cn,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new hi(5).freeze(),a.Hw=new sn().freeze(),a.Nt=999999999,a.nw=new sn().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new sn,a.ow=new sn,a.Xh=null,a.aw=new kn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Rt,bounds:new Ze,Py:new kn,bA:new kn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Ze(NaN,NaN,NaN,NaN).freeze(),a.wo=new kn(NaN,NaN).freeze(),a.Sp=new Ze(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Xn;var y=new On,x=new yr;x.bind(new Ls("text","",wi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new On,x=new yr,x.stroke="brown",x.bind(new Ls("text","",wi)),y.add(x),a.Lg.add("Comment",y),y=new On,y.selectable=!1,y.avoidable=!1,x=new Yi,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new kn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Xn,y=new Ii,y.selectionObjectName="GROUPPANEL",y.type=Sn.Vertical,x=new yr,x.font="bold 12pt sans-serif",x.bind(new Ls("text","",wi)),y.add(x),x=new Sn(Sn.Auto),x.name="GROUPPANEL";var E=new Yi;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Ja,E.padding=new hi(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Xn,y=new Cn,x=new Yi,x.isPanelMain=!0,y.add(x),x=new Yi,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Cn,x=new Yi,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Fo,y.type=Sn.Auto,x=new Yi,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ja,x.margin=new hi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Fo,y.type=Sn.Link,x=new Yi,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new er,a.toolManager=new Ar,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=id(),a.eq=null,a.fq=us,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new Rt,a.zy=500,a.wp=new Rt,a.wq=!1}ke.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Rc=null,tc="",Sd(this,!1),this.Xn.clear(),pg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Sd(a,y){a.animationManager.Cc(!0),a.Hw=new sn().freeze(),a.nw=new sn().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var ot=a.Wa.s[y].parts;ot.next();){var rt=ot.value;rt!==b&&rt.data===null&&z.push(rt)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),pg(),a.Og.clear(),jo=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function id(){return null}ke.prototype.reset=function(){this.clear(),this.vb=!0,hf(this),xh(this),this.Wg=!0,Jd(this),this.layout=new Br,this.Wg=!1,this.model=hy(),this.model.undoManager=new Gr,this.vb=this.rn=!1,this.N()},ke.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=qt.document.body);var y=Fn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},ke.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=qt.document.body);var y=0;if(os){var x=um;y=Ih,x===null&&(x=um=Fn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Ih=Fn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Co||(y=11)}this.Db=y,this.Gw=!0},ke.prototype.qb=function(a){a.classType===ke&&(this.autoScale=a)},ke.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);return y};function bc(a,y){if(os){if(y!=null||oe("Diagram setup requires an argument DIV."),a.Ka!==null&&oe("Diagram has already completed setup."),typeof y=="string"?a.Ka=qt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:oe("No DIV or DIV id supplied: "+y),a.Ka===null&&oe("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&oe("Invalid div id; div already has a Diagram associated with it."),!a.ol&&qt.ResizeObserver){var x=un(function(){a.$b()},250);a.ol=new qt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}qt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=qt.go;var b=new Mu(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",qt.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Dc(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Mu(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,os){b=Fn("div");var z=Fn("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=Yf,b.addEventListener("pointerdown",cf),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=un(function(){a.Yh=null,a.N()},300),a.Ov=un(function(){kc(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var ot=wl(a,tt,!0);ot.bubbles=!0;var rt=0,at=0;ot.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(rt=0<tt.deltaX?1:-1),tt.deltaY!==0&&(at=0<tt.deltaY?1:-1),ot.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-rt:-at):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(rt=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(at=0<tt.wheelDeltaY?-1:1),ot.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-rt:-at):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(ot.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Vl(ot,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,wl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var ot=a.Yt;ot[tt.pointerId]===void 0&&(ot[tt.pointerId]=tt),ot=a.oj;var rt=!1;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,rt=!0;else if(ot[0]===null)ot[0]=tt;else if(ot[1]===null)ot[1]=tt,rt=!0;else{tt.preventDefault();return}else ot[0]=tt;(ot=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var at=rt;rt=Tc(a,tt,!0,!1,!0,at),Pd(a,tt,rt),rt.targetDiagram=Nc(tt,tt.target),rt.targetObject=null,at||rt.clone(a.bq),at=a.uw,ot=ot?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(at.x-tt.screenX)>ot||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():Vl(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=Tc(a,tt,!1,!1,!1,ot[1]!==null);var rt=qt.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(),Vl(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=Tc(a,tt,!1,!0,!0,!1);var at=qt.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 ke&&at.H!==a&&Pd(at.H,tt,rt),at===null&&(at=tt.target),Pd(a,tt,rt),rt.clickCount=a.yq,rt.targetDiagram=Nc(tt,at),rt.targetObject=null,a.doMouseUp(),Vl(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=E.Z["d"+yf[1]+yf[2]+"wI"+zc.slice(1,5)]["b"+B1.slice(1,y)](E.Z,vf,y,y),E.Vc(!0),Ug(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}ke.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},ke.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function Ug(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(qt,"resize",a.Ov,!1)}function Aa(a){30<a.Sq&&(a.Yh=1)}function Qd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),vi&&vi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}ke.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:qt.devicePixelRatio||1},ke.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},ke.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},ke.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},ke.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},ke.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},ke.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},ke.prototype.doFocus=function(){this.focus()},ke.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=qt.scrollX||qt.pageXOffset,y=qt.scrollY||qt.pageYOffset;this.ta.focus(),qt.scrollTo(a,y)}},ke.prototype.Oy=function(){this.H.R("GainedFocus")},ke.prototype.Ny=function(){this.H.R("LostFocus")};function kc(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===ja&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Jd(a){var y=new Rr;y.name="Background",a.Al(y),y=new Rr,y.name="",a.Al(y),y=new Rr,y.name="Foreground",a.Al(y),y=new Rr,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Rr,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Rr,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function df(a){var y=new Sn(Sn.Grid);y.name="GRID";var x=new Yi;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Yi,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Yi,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Yi,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Yi,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Yi,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ci,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function Yf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Rh(this.H)}function cf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Rh(this.H)}ke.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,ot=E.y-z.top,rt=E.width+z.left+z.right,at=E.height+z.top+z.bottom,ut=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var mt=b.width,yt=b.height,Ct=b.right,kt=b.bottom;b=this.scale;var Ht=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ht=Ht+a.scrollWidth-a.clientWidth;break;case"reverse":Ht=a.scrollWidth-Ht-a.clientWidth}var Dt=Ht;mt<rt||yt<at?(Ht=Rt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Dt&&(Ht.x=Dt/b+tt,this.ju=Dt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ht.y=a.scrollTop/b+ot,this.lu=a.scrollTop),this.position=Ht,Rt.free(Ht),this.Ee=this.qr=!1):(Ht=Rt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Ht.h(Dt+tt,this.position.y)),ut>Ct&&(this.position=Ht.h(-(y.scrollWidth-this.Aa)+Dt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(ot<E&&(this.position=Ht.h(this.position.x,a.scrollTop+ot)),z>kt&&(this.position=Ht.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Rt.free(Ht),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,Ct=b.right,z=E.bottom,kt=b.bottom,tt=E.x,ft=b.x,ot=E.y,E=b.y,mt>=rt&&tt>=ft&&ut<=Ct&&(x.style.width="1px"),yt>=at&&ot>=E&&z<=kt&&(x.style.height="1px"))}},ke.prototype.computeBounds=function(a){return a===void 0&&(a=new Ze),ha(this),Ac(this,a)};function Ac(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var ot=tt.length,rt=0;rt<ot;rt++){var at=tt[rt];at.isInDocumentBounds&&at.isVisible()&&(at=at.actualBounds,at.w()&&(x?(x=!1,y.assign(at)):y.ed(at)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}ke.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Qe(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Cn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof Cn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Ze(NaN,NaN,0,0):x};function Ul(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=Rt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Ze.allocAt(0,0,E.width,E.height);var b=Rt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Ze.free(E),Rt.free(b),Rt.free(x)}x=a.yh,y&&a.Fg!==ja&&(x=a.Fg);var z=x!==ja?xd(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,ot=a.zk,rt=a.pq;y&&!ot.sb()&&(rt.sb()||rt.Xb())&&(ot=rt.Xb()?po:rt),ff(a,a.documentBounds,b,tt,ot,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,ve.B(z.x,x)&&ve.B(z.y,E)&&ve.B(z.width,b)&&ve.B(z.height,tt)||a.onViewportBoundsChanged(new Ze(x,E,b,tt),z,y,!1)}}function xd(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),ot=z/b,rt=tt/E;return y===Yl?(y=Math.min(rt,ot),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===ec?(y=rt>ot?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}ke.prototype.zoomToFit=function(){var a=this.sj;this.sj=Md,this.scale=xd(this,Yl),a!==Md&&(Ul(this,!1),ff(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Mt=ke.prototype,Mt.BA=function(a,y){y===void 0&&(y=Yl);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Yl||y===ec)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===ec?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new Rt(a.x,a.y)}},Mt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Rt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Mt.zz=function(a){if(a instanceof ge){this.eq=a;var y=Rt.alloc();this.fq=this.op(a.ga(Is,y)),Rt.free(y)}else this.eq=null,this.fq=us};function ff(a,y,x,E,b,z){var tt=Rt.allocAt(a.pa.x,a.pa.y),ot=tt.x,rt=tt.y;if(a.eq!==null){var at=Rt.alloc();at=a.eq.ga(Is,at),ot=at.x-a.fq.x/a.scale,rt=at.y-a.fq.y/a.scale,b=Vr,Rt.free(at)}(z||a.scrollMode===Md)&&(b.sb()&&(x>y.width&&(ot=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(rt=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(ot=Math.min(ot+x/2,y.right+Math.max(z,b.right)-x/2),ot=Math.max(ot,y.left-Math.max(z,b.left)+x/2),ot-=x/2):ot>y.left?ot=y.left:ot<y.right-x&&(ot=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(rt=Math.min(rt+E/2,y.bottom+Math.max(x,b.bottom)-E/2),rt=Math.max(rt,y.top-Math.max(x,b.top)+E/2),rt-=E/2):rt>y.top?rt=y.top:rt<y.bottom-E&&(rt=y.bottom-E)),tt.x=isFinite(ot)?ot:-a.yb.left,tt.y=isFinite(rt)?rt:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),va(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),xh(a),Rt.free(tt)}Mt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=zu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof ci)return a}else if(a=zu(this,a,function(x){return x.part}),a instanceof ci)return a;return null},Mt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ha(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function zu(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),ha(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Mt.lz=function(a,y,x){return y===void 0&&(y=!0),Dh(this,a,function(E){return E.part},y?function(E){return E instanceof ci&&E.canSelect()}:null,x)};function Dh(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof cn||b instanceof sn||(b=new sn),ha(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Mt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof cn||E instanceof sn||(E=new sn),ha(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Mt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),wd(this,a,function(b){return b instanceof ci&&(!x||b.canSelect())},y,E)},Mt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof cn||b instanceof sn||(b=new sn),ha(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Mt.Nu=function(a,y,x,E,b,z){var tt=new sn;ha(this);for(var ot=this.Wa.iteratorBackwards;ot.next();){var rt=ot.value;rt.visible&&rt.Nu(a,y,x,E,tt,b,z)}return tt};function wd(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof cn||b instanceof sn||(b=new sn),ha(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Mt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),od(this,a,y,function(z){return z instanceof ci&&(!E||z.canSelect())},x,b)},Mt.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof cn||b instanceof sn)&&(z=b),b=!0),z instanceof cn||z instanceof sn||(z=new sn),ha(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var ot=tt.value;ot.visible&&ot.og(a,y,x,E,b,z)}return z};function od(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof cn||b instanceof sn)&&(z=b),b=!0),z instanceof cn||z instanceof sn||(z=new sn),ha(a),a=a.Wa.iteratorBackwards;a.next();){var ot=a.value;ot.visible&&!ot.isTemporary&&ot.og(y,x,tt,E,b,z)}return z}ke.prototype.acceptEvent=function(a){return wl(this,a,a instanceof MouseEvent)};function wl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Pd(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Co&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=Nc(y,y.target),E.targetObject=null,E}function Nc(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function Tc(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,Co&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Vl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}ke.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=wl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),Vl(x,a)},ke.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=wl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),Vl(x,a)},ke.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=wl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Vl(x,a)},ke.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=wl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Vl(x,a)},ke.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Rt(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?ro(new Rt(y,a),this.Ab):new Rt(y,a)};function Pd(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,ot=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,ot=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,ot),a.Ab!==null?(y=Rt.allocAt(tt,ot),a.Ab.Cd(y),x.documentPoint.assign(y),Rt.free(y)):x.documentPoint.h(tt,ot)}function Bc(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}ke.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Fc(a){a.ld||ha(a),a.Va()}ke.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Mt=ke.prototype,Mt.Pz=function(){return this.kg},Mt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,al(this),this.hf=!1,this.du=new Rt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&An(function(){E.ld=!1,La(y,"Model"),a(E)},1)},Mt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;qt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Mt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),al(this))};function Oh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Rh(a)||(y&&ha(a),x&&Ul(a,!1))}function al(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var ot=b[tt];zs(ot,!1),ot.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(rt){rt.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||kc(a),Oh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Sh(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ha(a),z=!1,(!a.hf||a.xh)&&(a.hf?qg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),qg(a,!1)),z=!0),a.Jk=!1,ha(a),a.ou||Fc(a),Oh(a,!0,!1),tt=!1,z?(x=Ze.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Ic(a)),a.R("LayoutCompleted"),Oh(a,!0,!1),Ze.free(x)):x.Ok&&x.Qw&&(a.Fg!==ja?a.scale=xd(a,a.Fg):a.yh!==ja?a.scale=xd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Ul(a,!0)),z&&tt&&a.eb("Initial Layout"),ha(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Ic(a){if(a.Fg!==ja)a.scale=xd(a,a.Fg);else if(a.yh!==ja)a.scale=xd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Ul(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Sh(a)}function ha(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new sn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof Ii&&E.U&65536&&(E.U=E.U^65536)})}}Mt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Ii||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Ii&&x.isVisible()&&qr(this,x);for(a.reset();a.next();)x=a.value,x instanceof Cn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Fo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function qr(a,y){for(var x=Hn(),E=Hn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof Ii?(Ql(z)||Xa(z)||ic(z))&&qr(a,z):z instanceof Cn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(_n(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();_n(E)}Mt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Mt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&oe("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){su(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,ot=this.Ab;for(ot.reset(),b!==1&&ot.scale(b),y.x===0&&y.y===0||ot.translate(-z,-tt),a.ti=null,Xy(a,ot.m11,ot.m12,ot.m21,ot.m22,ot.dx,ot.dy),this.pb!==1&&(a.globalAlpha=this.pb),Ra(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?Hc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Gi.prototype.Cd=Gi.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,su(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,ot=this.pa;var rt=this.Ca,at=Math.round(ot.x*rt)/rt,ut=Math.round(ot.y*rt)/rt;for(rt!==1&&z.scale(rt),ot.x===0&&ot.y===0||z.translate(-at,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Ra(this,a),ot=0;ot<b;ot++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[ot].gc(a,this);if(y=!1,this.Yf?Hc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Gi.prototype.Cd=Gi.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=vi&&vi.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function Fs(a,y,x,E,b,z,tt,ot,rt,at){if(a.Ka!==null){a.ta===null&&oe("No canvas specified"),tt===void 0&&(tt=null),ot===void 0&&(ot=null),rt===void 0&&(rt=!1),at===void 0&&(at=!1),su(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var ft=a.Wa.s,mt=ft.length;try{var yt=new Ze(z.x,z.y,E.width/b,E.height/b),Ct=yt.copy();Ct.Co(x),Sh(a,Ct),ha(a),a.Fd(ft,mt,a,yt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),ot!==null&&ot!==""&&(y.fillStyle=ot,y.ox(0,0,E.width,E.height));var kt=a.Mb;y.scale(kt,kt);var Ht=Gi.alloc();Ht.reset(),Ht.translate(x.left,x.top),Ht.scale(b),z.x===0&&z.y===0||Ht.translate(-z.x,-z.y),y.setTransform(Ht.m11,Ht.m12,Ht.m21,Ht.m22,Ht.dx,Ht.dy),y.yc(),y instanceof Bl&&Xy(y,Ht.m11,Ht.m12,Ht.m21,Ht.m22,Ht.dx,Ht.dy),Gi.free(Ht),Ra(a,y),y.globalAlpha=a.pb;var Dt=a.Qj("Grid");if(tt){var Xt=new sn,$t=tt.iterator;for($t.reset();$t.next();){var ie=$t.value;ie instanceof ci&&(at||ie.layer!==Dt)&&(ie.Gj(),Xt.add(ie))}for(at=0;at<mt;at++)xl(ft[at],y,a,Xt,rt);Xt.each(function(Ae){return Ae.Gj()})}else for(Xt=0;Xt<mt;Xt++){var fe=ft[Xt];fe===Dt?at&&fe.gc(y,a,!0):fe.gc(y,a,rt)}a.$i=!1,a.Yf&&Hc(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,mt,a,a.viewportBounds),Sh(a),a.ib instanceof Bl&&(a.ib.Nj.PA(),a.redraw())}}}Mt.Gf=function(a){return this.Rg[a]},Mt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Mt.Tx=function(){this.Rg=new Mi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Co||lo),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Ra(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Mt.Ql=function(a){return this.on[a]},Mt.sA=function(a,y){this.on[a]=y},Mt.Sx=function(){this.on=new Mi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Mt.set=function(a){return Object.assign(this,a),this},Mt.Du=function(a){return this.nm(a)},Mt.nm=function(a){return ru(this,a),this};function ru(a,y){var x=a instanceof Sn,E=a instanceof ke,b;for(b in y){b===""&&oe("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var ot=b.indexOf(".");if(0<ot){var rt=b.substring(0,ot);x?z=a.fb(rt):(z=a[rt],z==null&&(z=a.toolManager[rt])),Ke(z)?tt=b.substr(ot+1):oe("Unable to find object named: "+rt+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!Qi(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Qi(a.toolManager,tt))z=a.toolManager;else if(E&&sm(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof ni&&tt==="Changed"){a.Pe(y[tt]);continue}else oe('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof ge&&z.Vw(tt)}}Mt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Xn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Mt.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},ke.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==mf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=Ze.alloc(),_g(this,this.computeBounds(E)),Ze.free(E)),E=this.ta,E===null||E instanceof wh)))){var tt=this.Mb;b=this.Aa*tt;var ot=this.ya*tt,rt=this.scale*tt;z=Math.round(Math.round(y.x*rt)-Math.round(a.x*rt)),y=Math.round(Math.round(y.y*rt)-Math.round(a.y*rt)),rt=this.jw,a=this.oy,rt.width!==b&&(rt.width=b),rt.height!==ot&&(rt.height=ot),a.clearRect(0,0,b,ot),rt=190*tt;var at=70*tt,ut=Math.max(z,0),ft=Math.max(y,0),mt=Math.floor(b-ut),yt=Math.floor(ot-ft);a.drawImage(E.Oa,ut,ft,mt,yt,0,0,mt,yt),Hc(this.Yf,this)&&a.clearRect(0,0,rt,at),E=Hn(),a=Hn(),yt=Math.abs(z),mt=Math.abs(y);var Ct=ut===0?0:b-yt;ut=Rt.allocAt(Ct,0),yt=Rt.allocAt(yt+Ct,ot),a.push(new Ze(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y)));var kt=this.Ab;if(kt.reset(),kt.scale(tt,tt),this.Ca!==1&&kt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&kt.translate(-tt.x,-tt.y),ro(ut,kt),ro(yt,kt),E.push(new Ze(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Ct=ft===0?0:ot-mt,ut.h(0,Ct),yt.h(b,mt+Ct),a.push(new Ze(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),ro(ut,kt),ro(yt,kt),E.push(new Ze(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Hc(this.Yf,this)&&(b=0<z?0:-z,ot=0<y?0:-y,ut.h(b,ot),yt.h(rt+b,at+ot),a.push(new Ze(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),ro(ut,kt),ro(yt,kt),E.push(new Ze(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y)))),Rt.free(ut),Rt.free(yt),Oh(this,!1,!0),this.Ka===null&&oe("No div specified"),this.ta===null&&oe("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(su(this),ot=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*ot,this.ya*ot),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,rt=Math.round(z.x*tt)/tt,at=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-rt,-at),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)rt=a[tt],rt.width!==0&&rt.height!==0&&b.rect(Math.floor(rt.x),Math.floor(rt.y),Math.ceil(rt.width),Math.ceil(rt.height));for(b.clip(),b.setTransform(ot,0,0,ot,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),Ra(this,b),b.globalAlpha=this.pb,ot=0;ot<z;ot++)if(tt=y[ot],rt=E,tt.visible&&tt.pb!==0){at=Sa(tt,b),ft=tt.Zq,ft.length=0,ut=this.scale,mt=Ze.alloc(),yt=tt.Pa.s,kt=yt.length,Ct=rt.length;for(var Ht=0;Ht<kt;Ht++){var Dt=yt[Ht],Xt=Yc(Dt,Dt.actualBounds);t:{for(var $t=2/ut,ie=4/ut,fe=0;fe<Ct;fe++){var Ae=rt[fe];if(Ae.width!==0&&Ae.height!==0&&Xt.Vu(Ae.x-$t,Ae.y-$t,Ae.width+ie,Ae.height+ie)){Xt=!0;break t}}Xt=!1}Xt&&tt.Oj(b,Dt,this,ft,ut,mt,!0)}Ze.free(mt),b.globalAlpha=at}b.restore(),b.Vc(!0),this.Yf&&Hc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}_n(E),_n(a),this.ld=!1}}else this.bd();x&&(Aa(this),this.bd(),Qd(this,!0))}else x?(Aa(this),this.bd(),Qd(this,!0)):this.bd()}};function su(a){a.pn!==!1&&(a.pn=!1,Dc(a,a.Aa,a.ya))}function Dc(a,y,x){xh(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Rh(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,ot=a.Be?a.Db:0,rt=b.clientWidth||x+tt,at=b.clientHeight||E+ot,ut=a.viewportBounds;b=ut.x;var ft=ut.y,mt=ut.width,yt=ut.height;if((rt!==x+tt||at!==E+ot)&&(a.gf=!1,a.Be=!1,ot=tt=0,a.Aa=rt,a.ya=at,z=a.pn=!0,xh(a)),!a.hf||!a.viewportBounds.w())return!0;var Ct=a.ku,kt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Ht=a.documentBounds,Dt=0,Xt=0,$t=0,ie=0,fe=ut.width,Ae=ut.height,Bn=a.rj;a.contentAlignment.sb()?(Ht.width>fe&&(Dt=Bn.left,Xt=Bn.right),Ht.height>Ae&&($t=Bn.top,ie=Bn.bottom)):(Dt=Bn.left,Xt=Bn.right,$t=Bn.top,ie=Bn.bottom);var Kn=Ht.width+Dt+Xt,Gn=Ht.height+$t+ie;Bn=a.scale;var Pn=Kn>rt/Bn,on=Gn>at/Bn;if(!(z||a.gf||a.Be||Pn||on))return!0;Dt=Ht.x-Dt,rt=ut.x,Xt=Ht.right+Xt,at=ut.right+tt,$t=Ht.y-$t;var Bi=ut.y;Ht=Ht.bottom+ie,ut=ut.bottom+ot;var Ei="1px";if(ie="1px",a.scrollMode===Md&&(Pn||on)&&(Pn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Pn=1,Dt+1<rt&&(Pn=Math.max((rt-Dt)*Bn+a.Aa,Pn)),Xt>at+1&&(Pn=Math.max((Xt-at)*Bn+a.Aa,Pn)),fe+tt+1<Kn&&(Pn=Math.max((Kn-fe)*Bn+a.Aa,Pn)),Ei=Pn.toString()+"px"),on&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Pn=1,$t+1<Bi&&(Pn=Math.max((Bi-$t)*Bn+a.ya,Pn)),Ht>ut+1&&(Pn=Math.max((Ht-ut)*Bn+a.ya,Pn)),Ae+ot+1<Gn&&(Pn=Math.max((Gn-Ae)*Bn+a.ya,Pn)),ie=Pn.toString()+"px")),Pn=Ei!=="1px",on=ie!=="1px",Pn&&on||!Pn&&!on||(on&&(at-=a.Db),Pn&&(ut-=a.Db),Kn<fe+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Dt+1<rt&&(tt=Math.max((rt-Dt)*Bn+a.Aa,tt)),Xt>at+1&&(tt=Math.max((Xt-at)*Bn+a.Aa,tt)),fe+1<Kn&&(tt=Math.max((Kn-fe)*Bn+a.Aa,tt)),Ei=tt.toString()+"px"),Pn=Ei!=="1px",tt=a.ya,Pn!==a.Be&&(tt=Pn?a.ya-a.Db:a.ya+a.Db),Gn<Ae+ot||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ot=1,$t+1<Bi&&(ot=Math.max((Bi-$t)*Bn+tt,ot)),Ht>ut+1&&(ot=Math.max((Ht-ut)*Bn+tt,ot)),Ae+1<Gn&&(ot=Math.max((Gn-Ae)*Bn+tt,ot)),ie=ot.toString()+"px"),on=ie!=="1px"),a.qr&&Pn===a.Be&&on===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Pn!==a.Be&&(Ei==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Pn,kt.style.width=Ei,on!==a.gf&&(ie==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(ot=Rt.alloc(),on?(y.style.left=a.Db+"px",a.position=ot.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ot.h(a.pa.x-a.Db/a.scale,a.pa.y)),Rt.free(ot))),z&&xh(a),a.gf=on,kt.style.height=ie,a.gu=!0,z&&(a.pn=!0),y=Ct.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(fe+1<Kn?y=(a.position.x-Dt)*Bn:Dt+1<rt?y=Ct.scrollWidth-Ct.clientWidth:Xt>at+1&&(y=a.position.x*Bn)),a.tn)switch(a.bu){case"negative":y=-(Ct.scrollWidth-y-Ct.clientWidth);break;case"reverse":y=Ct.scrollWidth-y-Ct.clientWidth}return Ct.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ae+1<Gn?Ct.scrollTop=(a.position.y-$t)*Bn:$t+1<Bi?Ct.scrollTop=Ct.scrollHeight-Ct.clientHeight:Ht>ut+1&&(Ct.scrollTop=a.position.y*Bn)),rt=a.Aa,at=a.ya,Ct.style.width=rt+(a.gf?a.Db:0)+"px",Ct.style.height=at+(a.Be?a.Db:0)+"px",x!==rt||E!==at||a.animationManager.zb?(x=Ze.allocAt(b,ft,mt,yt),a.onViewportBoundsChanged(x,a.viewportBounds,Bn,z),Ze.free(x),!1):!0}Mt=ke.prototype,Mt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&oe("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&oe('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(gs,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Mt.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){Oc(y,x)}),(a instanceof Fo||a instanceof Ii&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){ay(y.partManager,x)}),Xa(a)!==!0&&ic(a)!==!0||this.De.add(a),RS(a,!0,this),zS(a)?(a.actualBounds.w()&&this.N(Yc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yc(a,a.actualBounds)),this.$b()},Mt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zc(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),zS(a)?(a.actualBounds.w()&&this.N(Yc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yc(a,a.actualBounds)),this.$b()},Mt.remove=function(a){_d(this,a,!0)};function _d(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Ds,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Mt.Is=function(a,y){if(y===void 0&&(y=!1),Qe(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new sn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Mt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},ke.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Xf(this)),this.toolManager!==null){var b=new Xn;if(a!==null)if(Qe(a))for(var z=0;z<a.length;z++)Pu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Pu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Pu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Pu(this,b,a.value,x,E);for(a=this.links;a.next();)Pu(this,b,a.value,x,E)}yh(this,b,y,E,x)}};function Pu(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=Xf(a)),x instanceof On){if(y.add(x,a.Pd(b,x,x.location)),x instanceof Ii&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Pu(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var ot=tt.fromNode,rt=tt.toNode;ot!==null&&y.contains(ot)&&rt!==null&&y.contains(rt)&&Pu(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Pu(a,y,x.value,E,b)}else if(x instanceof Cn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Pu(a,y,x.value,E,b);else x instanceof Fo||y.add(x,a.Pd(b,x,x.location))}function yh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Rt.alloc(),tt=Rt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||Jf(a,y);for(var ot=Hn(),rt=Hn(),at=y.iterator,ut=Rt.alloc();at.next();){var ft=at.key,mt=at.value;if(ft.Zc()){var yt=Vg(a,ft,y);yt!==null?ot.push(new it(ft,mt,yt)):(!b||ft.canMove())&&(yt=mt.point,z.assign(yt),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,mt.shifted===void 0&&(mt.shifted=new Rt),mt.shifted.assign(ut.re(yt)))}else at.key instanceof Cn&&rt.push(at.sa)}for(Rt.free(ut),b=ot.length,at=0;at<b;at++)ft=ot[at],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Rt),ft.node.location=z.add(ft.Su.shifted);for(b=Rt.alloc(),at=Rt.alloc(),ft=rt.length,mt=0;mt<ft;mt++){var Ct=rt[mt];if(yt=Ct.key,yt instanceof Cn)if(yt.suspendsRouting){yt.Tg=null,ut=yt.fromNode;var kt=yt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(kt=Ct.value.point,yt.dragComputation===null)y.add(yt,a.Pd(E,yt,tt)),Bd(yt,tt.x-kt.x,tt.y-kt.y);else{Ct=Rt.allocAt(0,0),(ut=yt.i(0))&&ut.w()&&Ct.assign(ut);var Ht=ut=Rt.alloc().assign(Ct).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Ht=Rt.alloc(),Qf(a,yt,ut,Ht,E)),ut.assign(yt.dragComputation(yt,ut,Ht)).re(Ct),y.add(yt,a.Pd(E,yt,ut)),Bd(yt,ut.x-kt.x,ut.y-kt.y),Rt.free(Ct),Rt.free(ut),Ht!==ut&&Rt.free(Ht)}else ut!==null&&(b.assign(ut.location),Ht=y.I(ut),Ht!==null&&b.re(Ht.point)),kt!==null&&(at.assign(kt.location),Ht=y.I(kt),Ht!==null&&at.re(Ht.point)),ut!==null&&kt!==null?b.Xa(at)?(ut=Ct.value.point,kt=z,kt.assign(b),kt.re(ut),y.add(yt,a.Pd(E,yt,b)),Bd(yt,kt.x,kt.y)):(yt.suspendsRouting=!1,yt.bb()):(Ct=Ct.value.point,ut=ut!==null?b:kt!==null?at:tt,y.add(yt,a.Pd(E,yt,ut)),Bd(yt,ut.x-Ct.x,ut.y-Ct.y))}else(yt.fromNode===null||yt.toNode===null)&&(ut=Ct.value.point,y.add(yt,a.Pd(E,yt,tt)),Bd(yt,tt.x-ut.x,tt.y-ut.y))}Rt.free(z),Rt.free(tt),Rt.free(b),Rt.free(at),_n(ot),_n(rt),x||(ha(a),qd(a,y))}}ke.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Rt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Rt.alloc(),Qf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,ot=tt.x;isNaN(ot)&&(ot=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var rt=a.maxLocation,at=rt.x;return isNaN(at)&&(at=z?Math.round(1e3*a.location.x)/1e3:a.location.x),rt=rt.y,isNaN(rt)&&(rt=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(ot,Math.min(x.x,at)),Math.max(tt,Math.min(x.y,rt))),b!==y&&Rt.free(b),E};function Xf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Qf(a,y,x,E,b){if(b===void 0&&(b=Xf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,ot=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var rt=z.gridCellSize;isNaN(a)&&(a=rt.width),isNaN(y)&&(y=rt.height),z=z.gridOrigin,isNaN(ot)&&(ot=z.x),isNaN(tt)&&(tt=z.y)}z=Rt.allocAt(0,0),z.yi(0,0,a,y,b),ve.No(x.x,x.y,ot+z.x,tt+z.y,a,y,E),Rt.free(z)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Cn&&(y.suspendsRouting=!0)}function qd(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Cn&&(x.suspendsRouting=!1,Yv(x)&&x.bb())}a.Mr=!1}}function Vg(a,y,x){return y=y.containingGroup,y!==null&&(a=Vg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Mt=ke.prototype,Mt.Pd=function(a,y,x){if(x===void 0)return new rd(Qo);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new rd(new Rt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new rd(x.copy())};function Yg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&oe("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&oe("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&oe("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&oe("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&oe("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Mt.Al=function(a){Yg(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(gs,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Mt.Ww=function(a,y){Yg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Ds,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(gs,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Mt.Cy=function(a,y){Yg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Ds,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(gs,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Mt.kA=function(a){if(a.diagram!==this&&oe("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Ds,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Mt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Mt.Yw=function(a){return this.pf===null&&(this.pf=new cn),this.pf.add(a),this.model.Pe(a),this},Mt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Mt.Pe=function(a){return this.zg===null&&(this.zg=new cn),this.zg.add(a),this},Mt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Mt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==sl&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Mt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var ot=new Dr;ot.diagram=this,ot.change=a,ot.propertyName=y,ot.object=x,ot.oldValue=E,ot.oldParam=z,ot.newValue=b,ot.newParam=tt,this.ds(ot)},Mt.g=function(a,y,x,E,b){this.cb(Or,a,this,y,x,E,b)},ke.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===Or){var b=a.object;if(kr(b,a.propertyName,a.I(y)),b instanceof ge){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===gs){var tt=a.object,ot=a.newParam,rt=a.newValue;if(tt instanceof Sn)if(typeof ot=="number"&&rt instanceof ge){y?tt.pc(ot):tt.Gb(ot,rt);var at=tt.part;at!==null&&at.Wb()}else typeof ot=="number"&&rt instanceof Hs&&(rt.isRow?hS(tt,ot,y?void 0:rt):dS(tt,ot,y?void 0:rt));else if(tt instanceof Rr){var ut=a.oldParam===!0;typeof ot=="number"&&rt instanceof ci&&(y?(rt.isSelected=!1,rt.isHighlighted=!1,rt.Wb(),tt.pc(ut?ot:-1,rt,ut)):tt.oi(ot,rt,ut))}else tt instanceof ke?typeof ot=="number"&&rt instanceof Rr&&(y?this.Wa.mb(ot):(rt.Xe(this),this.Wa.Gb(ot,rt))):oe("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Ds){var ft=a.object,mt=a.oldParam,yt=a.oldValue;if(ft instanceof Sn)typeof mt=="number"&&yt instanceof ge?y?ft.Gb(mt,yt):ft.pc(mt):typeof mt=="number"&&yt instanceof Hs&&(yt.isRow?hS(ft,mt,y?yt:void 0):dS(ft,mt,y?yt:void 0));else if(ft instanceof Rr){var Ct=a.newParam===!0;typeof mt=="number"&&yt instanceof ci&&(y?0>ft.Pa.indexOf(yt)&&ft.oi(mt,yt,Ct):(yt.isSelected=!1,yt.isHighlighted=!1,yt.Wb(),ft.pc(Ct?mt:-1,yt,Ct)))}else ft instanceof ke?typeof mt=="number"&&yt instanceof Rr&&(y?(yt.Xe(this),this.Wa.Gb(mt,yt)):this.Wa.mb(mt)):oe("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==sl&&oe("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},ke.prototype.Ea=function(a){return this.undoManager.Ea(a)},ke.prototype.eb=function(a){return this.undoManager.eb(a)},ke.prototype.Kf=function(){return this.undoManager.Kf()},ke.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},ke.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},ke.prototype.rp=function(){this.partManager.rp()};function Xg(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,xh(a),a.N(),a.Ee=!0,E.zb&&(ma(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,xh(a);else{a.vb=!0;var b=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(vu)?ot=0:at.Hf(pa)&&(ot=z-1):ot=at.sb()?at.x*(z-1):z/2),isNaN(rt)&&(at.$c()?at.Hf(zl)?rt=0:at.Hf(Oa)&&(rt=tt-1):rt=at.sb()?at.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Rt.allocAt(a.pa.x+ot/y-ot/x,a.pa.y+rt/y-rt/x),a.position=z,Rt.free(z),a.Ca=x,xh(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Ul(a,!1),E.zb&&(ma(E)||E.ce.add(E.H,"scale",y,a.Ca))}}ke.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==ja||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Ar&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Kf(b,this)),this.vb||this.invalidateViewport(a,y),Sh(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Sh(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=kn.alloc(),b=1,z=1,tt=x.O.s,ot=tt.length,rt=0;rt<ot;rt++){var at=tt[rt],ut=Math.abs(at.interval);2>ut||(pv(at.figure)?z=z*ut/ve.vx(z,ut):b=b*ut/ve.vx(b,ut))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=Ze.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ze.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Ze.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Rt.alloc(),ve.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),kn.free(E),x.part.location=y,Rt.free(y)}}ke.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},ke.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},ke.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Qe(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof ci||oe("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof ci||oe("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},ke.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Mt=ke.prototype,Mt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Mt.Jz=function(a){a=new sn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof ci||oe("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Mt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Rt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),Rt.free(z);return}oe("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):oe("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Rt.free(z)},Mt.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Mt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Mt.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Mt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,ot=y.m12,rt=y.m21,at=y.m22,ut=y.dx,ft=y.dy,mt=x*tt+E*rt+ut;y=x*ot+E*at+ft;var yt=b*tt+E*rt+ut;return a=b*ot+E*at+ft,E=x*tt+z*rt+ut,x=x*ot+z*at+ft,tt=b*tt+z*rt+ut,b=b*ot+z*at+ft,z=Math.min(mt,yt),mt=Math.max(mt,yt),yt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),mt=Math.max(mt,E),yt=Math.min(yt,x),y=Math.max(y,x),z=Math.min(z,tt),mt=Math.max(mt,tt),yt=Math.min(yt,b),y=Math.max(y,b),new Ze(z,yt,mt-z,y-yt)},Mt.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),ro(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Qg(a){return a=ng.get(a),a!==null?new a:new er}ke.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===sl&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(rt){return rt.diagram=b}),a.mouseMoveTools.each(function(rt){return rt.diagram=b}),a.mouseUpTools.each(function(rt){return rt.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===sl){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ha(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ta(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(om(this),this.As.clear(),ss(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var ot=this;An(function(){ot.currentTool.standardMouseOver(),ot.Rt=!1},10)}}}finally{this.aa=!0}}}};function Oc(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)$d(a,y[E])}function $d(a,y){if(y instanceof dl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof sn&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function Jg(a,y){if(y instanceof dl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof sn&&x.Bg.remove(a),pg(E));break}}}}}ke.prototype.Wd=function(){this.partManager.Wd()},ke.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},ke.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},ke.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},ke.prototype.Vb=function(a){return this.partManager.Vb(a)},ke.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Mt=ke.prototype,Mt.Lc=function(a){return this.partManager.Lc(a)},Mt.ii=function(a){return this.partManager.ii(a)},Mt.Kc=function(a){return this.partManager.Kc(a)},Mt.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:pr(ir(y)))},Mt.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:pr(ir(y)))};function xh(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function _g(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Ul(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Mt.Va=function(){if(this.Zi){var a=Ze.alloc();_g(this,this.computeBounds(a)),Ze.free(a)}},Mt.rz=function(){for(var a=new sn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Mt.qz=function(){return this.ai.iterator},Mt.Uz=function(a){ha(this),a&&_f(this,!0),this.ld?qg(this,!1):(this.Jk=!0,al(this))};function _f(a,y){for(var x=a.ai.iterator;x.next();)rm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function rm(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)rm(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function qg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||La(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)$g(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),ha(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||ta(z),a.aa=x}}}function $g(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)$g(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),qr(a,y),b.isValidLayout=!0):a.xh=!0)}}Mt.yz=function(){for(var a=new cn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function ev(a){function y(b){var z=b.toLowerCase(),tt=new cn;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new Xn,E=new Xn;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function sm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function qf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;oe("Unknown DiagramEvent name: "+y)}Mt.Bj=function(a,y){return a=qf(this,a),a!==null&&a.add(y),this},Mt.am=function(a,y){a=qf(this,a),a!==null&&a.remove(y)},Mt.R=function(a,y,x){var E=qf(this,a),b=new $h;if(b.diagram=this,a=sm(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function $f(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Mt.Yj=function(a,y){return tg(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},ke.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Ac(this,a):a.assign(this.documentBounds)};function tg(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new kp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=am(a,x)),x===null){y=Ze.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,ot=tt.layer;ot!==null&&ot.visible&&!ot.isTemporary&&eg(a,tt,E,y)}Ze.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Ze.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof On&&eg(a,tt,E,y);Ze.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ox(b);return b}function am(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?am(a,y.containingGroup):null}function eg(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(wg(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(Id,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=Id}else if(y instanceof Ii)for(y=y.memberParts;y.next();)b=y.value,b instanceof On&&eg(a,b,x,E)}}function Cd(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}ke.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():tp(this)};function tp(a){a.vk===-1&&(a.vk=An(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=Ze.alloc(),a.computeBounds(y),y.ed(a.documentBounds),_g(a,y),Ze.free(y),a.Fc=!0,a.bd(),tp(a))}},a.vp))}ke.prototype.ug=function(){this.vk!==-1&&(qt.clearTimeout(this.vk),this.vk=-1)},ke.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=Ze.allocAt(0,0,E.width*b,E.height*b);var z=Rt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Qo)||(y=new Rt(y.x+z.x/b,y.y+z.y/b)),Ze.free(E),Rt.free(z),y},Mt=ke.prototype,Mt.Cs=function(){return null},Mt.av=function(){return null},Mt.bs=function(a,y){this.pj.add(a,y)},Mt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Ii&&(y.$p=null)})};function gf(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-at>rt?y(x,b,ot):qt.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var ot=a,rt=x.callbackTimeout||300,at=+new Date;return qt.requestAnimationFrame(function(){E()}),null}Mt.Wz=function(a){return os?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Mt.Jx=function(a){return a===void 0&&(a={}),gf(this,this.Xz,a)},Mt.Xz=function(a,y,x){var E=lm(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case zc+"data":b=E.getImageData(0,0,x.width,x.height);break;case zc:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&oe('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function lm(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&oe("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new kn(1/0,1/0):new kn(2e3,2e3));var ot=y.position||null,rt=y.parts||null,at=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var mt=y.document||document,yt=y.elementFinished||null,Ct=y.showTemporary;Ct===void 0&&(Ct=!ft),y=y.showGrid,y===void 0&&(y=Ct),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof at=="number"?at=new hi(at):at instanceof hi||oe("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),ft=new Mu(null,mt,void 0,!0);var kt=ft.context;if(!(b||z||rt||ot))return ft.width=a.Aa+Math.ceil(at.left+at.right),ft.height=a.ya+Math.ceil(at.top+at.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=mt,E.hs=yt,Fs(a,E.context,at,new kn(ft.width,ft.height),a.Ca,a.pa,rt,ut,Ct,y),E.context):(a.Xm=!1,Fs(a,kt,at,new kn(ft.width,ft.height),a.Ca,a.pa,rt,ut,Ct,y),a.Xm=!0,ft.context);var Ht=a.Pp,Dt=a.documentBounds.copy();if(Dt.Fv(a.yb),Ct)for(var Xt=a.Wa.s,$t=Xt.length,ie=0;ie<$t;ie++){var fe=Xt[ie];if(fe.visible&&fe.isTemporary){fe=fe.Pa.s;for(var Ae=fe.length,Bn=0;Bn<Ae;Bn++){var Kn=fe[Bn];Kn.isInDocumentBounds&&Kn.isVisible()&&(Kn=Kn.actualBounds,Kn.w()&&Dt.ed(Kn))}}}if(Xt=new Rt(Dt.x,Dt.y),rt!==null){for($t=new Ze(0,0,0,0),ie=!0,fe=rt.iterator,fe.reset();fe.next();)Ae=fe.value,Ae instanceof ci&&(Bn=Ae.layer,Bn!==null&&!Bn.visible||Bn!==null&&!Ct&&Bn.isTemporary||!Ae.isVisible()||(Ae=Ae.actualBounds,Ae.w()&&(ie?(ie=!1,$t.assign(Ae)):$t.ed(Ae))));Dt.width=$t.width,Dt.height=$t.height,Xt.x=$t.x,Xt.y=$t.y}return ot!==null&&ot.w()&&(Xt=ot,z||(z=Ht)),$t=ot=0,at!==null&&(ot=at.left+at.right,$t=at.top+at.bottom),ie=fe=0,b!==null&&(fe=b.width,ie=b.height,isFinite(fe)&&(fe=Math.max(0,fe-ot)),isFinite(ie)&&(ie=Math.max(0,ie-$t))),b!==null&&z!==null?(z==="NaN"&&(z=Ht),b.w()?(b=fe,Dt=ie):isNaN(ie)?(b=fe,Dt=Dt.height*z):(b=Dt.width*z,Dt=ie)):b!==null?b.w()?(z=Math.min(fe/Dt.width,ie/Dt.height),b=fe,Dt=ie):isNaN(ie)?(z=fe/Dt.width,b=fe,Dt=Dt.height*z):(z=ie/Dt.height,b=Dt.width*z,Dt=ie):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-ot)/Dt.width,(tt.height-$t)/Dt.height),z>Ht?(z=Ht,b=Dt.width,Dt=Dt.height):(b=tt.width,Dt=tt.height)):(b=Dt.width*z,Dt=Dt.height*z):(z=Ht,b=Dt.width,Dt=Dt.height),at!==null?(b+=ot,Dt+=$t):at=new hi(0),tt!==null&&(Ht=tt.width,tt=tt.height,isNaN(Ht)&&(Ht=2e3),isNaN(tt)&&(tt=2e3),isFinite(Ht)&&(b=Math.min(b,Ht)),isFinite(tt)&&(Dt=Math.min(Dt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Dt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=mt,E.hs=yt,Fs(a,E.context,at,new kn(Math.ceil(b),Math.ceil(Dt)),z,Xt,rt,ut,Ct,y),E.context):(a.Xm=!1,Fs(a,kt,at,new kn(Math.ceil(b),Math.ceil(Dt)),z,Xt,rt,ut,Ct,y),a.Xm=!0,ft.context)}Gt.Object.defineProperties(ke.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pt||(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 wh(this,qt.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 wh(this,qt.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(qt,"resize",this.Ov,!1),this.removeEventListener(qt,"wheel",this.$j,!0),eh===this&&(eh=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),bc(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&bn(a,"0 <= value <= 1",ke,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),Ul(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),Ul(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),Ul(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),Ul(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&bn(a,">= 0",ke,"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&&bn(a,">= 0",ke,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else bn(a,">= 0",ke,"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||om(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&oe("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Sd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,La(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=Qg(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(qt,"pointermove",this.dk,!0),this.addEventListener(qt,"pointerdown",this.ui,!0),this.addEventListener(qt,"pointerup",this.fk,!0),this.addEventListener(qt,"pointerout",this.ek,!0),this.addEventListener(qt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(qt,"wheel",this.$j,!0),this.addEventListener(qt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(qt,"pointermove",this.dk,!0),this.removeEventListener(qt,"pointerdown",this.ui,!0),this.removeEventListener(qt,"pointerup",this.fk,!0),this.removeEventListener(qt,"pointerout",this.ek,!0),this.removeEventListener(qt,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(qt,"wheel",this.$j,!0),this.removeEventListener(qt,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=Rt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),va(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?xh(this):(this.vb=!0,a=this.scale,ff(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}Rt.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=df(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=df(this)),a.type!==Sn.Grid&&oe("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Sh(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),xh(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||oe("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new hi(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===Md&&Ul(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,Ul(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,Xg(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&Xg(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==ja&&Ul(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||oe("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||oe("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):bn(a,"> 0",ke,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):bn(a,"> 0",ke,"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),Ul(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 hi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&oe("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)yp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ed&&a!==js&&a!==ig&&oe("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new kn(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 hi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Gt.Object.defineProperties(ke,{licenseKey:{get:function(){return sp.jc()},set:function(a){sp.add(a.replace(/\s/g,""))}},version:{get:function(){return jc}}}),ke.prototype.makeImageData=ke.prototype.Jx,ke.prototype.makeImage=ke.prototype.Wz,ke.prototype.cacheGroupExternalLinks=ke.prototype.Fu,ke.prototype.addRenderer=ke.prototype.bs,ke.prototype.makeSVG=ke.prototype.av,ke.prototype.makeSvg=ke.prototype.Cs,ke.prototype.stopAutoScroll=ke.prototype.ug,ke.prototype.doAutoScroll=ke.prototype.gs,ke.prototype.isUnoccupied=ke.prototype.Yj,ke.prototype.raiseDiagramEvent=ke.prototype.R,ke.prototype.removeDiagramListener=ke.prototype.am,ke.prototype.addDiagramListener=ke.prototype.Bj,ke.prototype.findTreeRoots=ke.prototype.yz,ke.prototype.layoutDiagram=ke.prototype.Uz,ke.prototype.findTopLevelGroups=ke.prototype.qz,ke.prototype.findTopLevelNodesAndLinks=ke.prototype.rz,ke.prototype.ensureBounds=ke.prototype.Va,ke.prototype.findLinksByExample=ke.prototype.ls,ke.prototype.findNodesByExample=ke.prototype.ms,ke.prototype.findLinkForData=ke.prototype.Kc,ke.prototype.findNodeForData=ke.prototype.ii,ke.prototype.findPartForData=ke.prototype.Lc,ke.prototype.findLinkForKey=ke.prototype.findLinkForKey,ke.prototype.findNodeForKey=ke.prototype.Vb,ke.prototype.findPartForKey=ke.prototype.findPartForKey,ke.prototype.rebuildParts=ke.prototype.Wd,ke.prototype.transformViewToDoc=ke.prototype.Ps,ke.prototype.transformRectDocToView=ke.prototype.zA,ke.prototype.transformDocToView=ke.prototype.op,ke.prototype.centerRect=ke.prototype.es,ke.prototype.scrollToRect=ke.prototype.tv,ke.prototype.scroll=ke.prototype.scroll,ke.prototype.highlightCollection=ke.prototype.Jz,ke.prototype.highlight=ke.prototype.Iz,ke.prototype.selectCollection=ke.prototype.rA,ke.prototype.select=ke.prototype.select,ke.prototype.updateAllRelationshipsFromData=ke.prototype.rp,ke.prototype.updateAllTargetBindings=ke.prototype.updateAllTargetBindings,ke.prototype.commit=ke.prototype.commit,ke.prototype.rollbackTransaction=ke.prototype.Kf,ke.prototype.commitTransaction=ke.prototype.eb,ke.prototype.startTransaction=ke.prototype.Ea,ke.prototype.raiseChanged=ke.prototype.g,ke.prototype.raiseChangedEvent=ke.prototype.cb,ke.prototype.removeChangedListener=ke.prototype.ik,ke.prototype.addChangedListener=ke.prototype.Pe,ke.prototype.removeModelChangedListener=ke.prototype.mA,ke.prototype.addModelChangedListener=ke.prototype.Yw,ke.prototype.findLayer=ke.prototype.Qj,ke.prototype.removeLayer=ke.prototype.kA,ke.prototype.addLayerAfter=ke.prototype.Cy,ke.prototype.addLayerBefore=ke.prototype.Ww,ke.prototype.addLayer=ke.prototype.Al,ke.prototype.moveParts=ke.prototype.moveParts,ke.prototype.copyParts=ke.prototype.Kj,ke.prototype.removeParts=ke.prototype.Is,ke.prototype.remove=ke.prototype.remove,ke.prototype.add=ke.prototype.add,ke.prototype.clearDelayedGeometries=ke.prototype.bx,ke.prototype.setProperties=ke.prototype.nm,ke.prototype.attach=ke.prototype.Du,ke.prototype.set=ke.prototype.set,ke.prototype.resetInputOptions=ke.prototype.Sx,ke.prototype.setInputOption=ke.prototype.sA,ke.prototype.getInputOption=ke.prototype.Ql,ke.prototype.resetRenderingHints=ke.prototype.Tx,ke.prototype.setRenderingHint=ke.prototype.Xx,ke.prototype.getRenderingHint=ke.prototype.Gf,ke.prototype.maybeUpdate=ke.prototype.bd,ke.prototype.requestUpdate=ke.prototype.$b,ke.prototype.delayInitialization=ke.prototype.Xy,ke.prototype.isUpdateRequested=ke.prototype.Pz,ke.prototype.invalidateDocumentBounds=ke.prototype.Ya,ke.prototype.findObjectsNear=ke.prototype.og,ke.prototype.findPartsNear=ke.prototype.mz,ke.prototype.findObjectsIn=ke.prototype.Cf,ke.prototype.findPartsIn=ke.prototype.ux,ke.prototype.findObjectsAt=ke.prototype.ji,ke.prototype.findPartsAt=ke.prototype.lz,ke.prototype.findObjectAt=ke.prototype.ic,ke.prototype.findPartAt=ke.prototype.Ol,ke.prototype.focusObject=ke.prototype.zz,ke.prototype.alignDocument=ke.prototype.Jy,ke.prototype.zoomToRect=ke.prototype.BA,ke.prototype.zoomToFit=ke.prototype.zoomToFit,ke.prototype.diagramScroll=ke.prototype.kx,ke.prototype.focus=ke.prototype.focus;var ng=new Xn,um=null,os=qt.document!==void 0,Rc=null,tc="",ja=new Ue(ke,"None",0),Yl=new Ue(ke,"Uniform",1),ec=new Ue(ke,"UniformToFill",2),pf=new Ue(ke,"CycleAll",10),ep=new Ue(ke,"CycleNotDirected",11),np=new Ue(ke,"CycleNotDirectedFast",12),ip=new Ue(ke,"CycleNotUndirected",13),op=new Ue(ke,"CycleDestinationTree",14),rp=new Ue(ke,"CycleSourceTree",15),Md=new Ue(ke,"DocumentScroll",1),mf=new Ue(ke,"InfiniteScroll",2),Ed=new Ue(ke,"TreeParentCollapsed",21),js=new Ue(ke,"AllParentsCollapsed",22),ig=new Ue(ke,"AnyParentsCollapsed",23),sp=new cn,jc="2.3.10",zc="image",vf=null,hm=!1;function Na(){if(os){var a=qt.document.createElement("canvas"),y=a.getContext("2d"),x=$e("7ca11abfd022028846");y[x]=$e("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",He.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",ve.za],b=1;5>b;b++)y[$e("7ca11abfd7330390")]($e(E[b-1]),10,15*b);for(y[x]=$e("39f046ebb36e4b"),x=1;5>x;x++)y[$e("7ca11abfd7330390")]($e(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Gi.prototype.Cd=Gi.prototype.Eu),vf=a}}ke.className="Diagram",ke.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=qt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof ke?y.H:null},ke.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},ke.useDOM=function(a){os=a?qt.document!==void 0:!1},ke.isUsingDOM=function(){return os},ke.None=ja,ke.Uniform=Yl,ke.UniformToFill=ec,ke.CycleAll=pf,ke.CycleNotDirected=ep,ke.CycleNotDirectedFast=np,ke.CycleNotUndirected=ip,ke.CycleDestinationTree=op,ke.CycleSourceTree=rp,ke.DocumentScroll=Md,ke.InfiniteScroll=mf,ke.TreeParentCollapsed=Ed,ke.AllParentsCollapsed=js,ke.AnyParentsCollapsed=ig;function dm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Hc(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=qt[$e("76a715b2f73f148a")][$e("72ba13b5")]||"";if(a.Rc=!0,os){var E=ke[$e("76a115b6ed251eaf4692")];if(E)for(var b=sp.iterator;b.next()&&(E=b.value,E=$e(E).split($e("39e9")),!(6>E.length));){var z=$e(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=$e(He[$e("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var ot=qt[$e("74a900bae4370f8b51")][$e("6fbb13a1c2311e8a57")].toLowerCase();if(tt=ot[$e("73a612b6fb191d")]($e("3aad1ab6e022098b4dc4")),z=$e(E[2]),-1<tt&&(ot=ot[$e("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<ot&&ot<tt),!a.Rc))break;for(tt=x[$e("76ad18b4f73e")],ot=x[$e("73a612b6fb191d")]($e("35e7"))+2;ot<tt;ot++)y+=x[ot];if(tt=y[$e("73a612b6fb191d")](z),0>tt&&z!==$e("7da71ca0ad381e90")&&(tt=y[$e("73a612b6fb191d")]($e("76a715b2ef3e149757"))),0>tt&&(tt=y[$e("73a612b6fb191d")]($e("76a715b2ef3e149757"))),0>tt&&(tt=y[$e("73a612b6fb191d")]($e("2bfa41fdb3784bca12"))),0>tt&&(tt=x[$e("73a612b6fb191d")]($e("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[$e("73a612b6fb191d")]($e("35"))||y[$e("73a612b6fb191d")]($e("35"))===-1),!a.Rc||x[$e("73a612b6fb191d")]($e("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[$e("73a612b6fb191d")](z)),!a.Rc)||(tt=qt[$e("76a715b2f73f148a")][$e("69ad17a1e03e")],ot=tt[$e("73a612b6fb191d")]($e("7fb002b6ed25128b4da25b2e")),-1<ot&&(a.Rc=!(tt[$e("73a612b6fb191d")](z)>ot),!a.Rc)))break;if(z[0]==="#"){tt=qt.document.createElement("div");for(var rt=E[0].replace(/[A-Za-z]/g,"");4>rt.length;)rt+="9";if(ot=rt,rt=rt.substr(rt.length-4),E="",E+=["gsh","gsf"][parseInt(rt.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(rt.substr(0,1),10)%4],tt[$e("79a417a0f0181a8946")]=E,qt.document[$e("78a712aa")]){qt.document[$e("78a712aa")][$e("7bb806b6ed32388c4a875b")](tt),rt=qt.getComputedStyle(tt).getPropertyValue($e("78a704b7e62456904c9b12701b6532a8"));var at=qt.getComputedStyle(tt).getPropertyValue($e("75b817b0ea2202"));if(qt.document[$e("78a712aa")][$e("68ad1bbcf533388c4a875b")](tt),rt){if(tt=qt[$e("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($e("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(E===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[$e("76ad18b4f73e")],b=x[$e("73a612b6fb191d")]($e("35e7"))+2;b<ut;b++)y+=x[b];x=y[$e("73a612b6fb191d")]($e("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[$e("73a612b6fb191d")]($e("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function rd(a){this.j=a===void 0?new Rt:a,this.o=new Rt}Gt.Object.defineProperties(rd.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var yf="DraggingInfo";rd.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new kn(NaN,NaN).freeze(),this.gridSnapCellSpot=Is,this.gridSnapOrigin=new Rt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function ct(a,y){if(typeof a=="string"||qt.Element&&a instanceof Element)var x=ke.call(this,a)||this;else x=ke.call(this)||this,y=a;return dt(x),y&&x.nm(y),x}Le(ct,ke);function dt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=ba,a.layout=new ca}ct.prototype.reset=function(){ke.prototype.reset.call(this),dt(this)},ct.className="Palette";function pt(a,y){if(typeof a=="string"||qt.Element&&a instanceof Element)var x=ke.call(this,a)||this;else x=ke.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new ci;var b=new Yi;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new hi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Wt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,ot=E.lastInput.documentPoint;z.position=new Rt(ot.x-tt.width/2,ot.y-tt.height/2)}},x.Pf=function(){E.Ya(),Ft(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Ft(E)},x.autoScale=Yl,x.vb=!1,y&&Object.assign(x,y),x}Le(pt,ke),pt.prototype.computePixelRatio=function(){return 1},pt.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(su(this),this.ql===null){var x=new Mu(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),Et(this)}finally{this.ta=a,this.ib=y}}}ke.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&oe("No div specified"),this.ta===null&&oe("No canvas specified"),!(this.ta instanceof wh)&&(Dv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){su(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?Et(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Et(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=Ze.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Sh(y,b),Ze.free(b),ha(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var ot=y[tt],rt=a;if(ot.visible&&ot.opacity!==0){var at=ot.diagram.grid.part;if(!x&&ot.isTemporary)E&&at.layer===ot&&(ot=Sa(ot,b),at.gc(b,rt),b.globalAlpha=ot);else{for(var ut=Sa(ot,b),ft=rt.scale,mt=Ze.alloc(),yt=ot.Pa.s,Ct=yt.length,kt=0;kt<Ct;kt++){var Ht=yt[kt];(E||Ht!==at)&&ot.Oj(b,Ht,rt,null,ft,mt,!1)}Ze.free(mt),b.globalAlpha=ut}}}}}function Ft(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=kn.alloc();b.h(x.width,x.height),E.desiredSize=b,kn.free(b),a=2/a.scale,E instanceof Yi&&(E.strokeWidth=a),y.location=new Rt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}pt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return so;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},pt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},pt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Ft(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Gt.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&oe("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),Ft(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),Ft(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),pt.className="Overview";function Wt(){Wr.call(this),this.j=null}Le(Wt,Wr),Wt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new Rt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Rt(a.x-this.j.x,a.y-this.j.y)),!0)},Wt.prototype.doActivate=function(){this.j=null,Wr.prototype.doActivate.call(this)},Wt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Wt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new Rt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Rt(a.x-this.j.x,a.y-this.j.y)}}},Wt.className="OverviewDraggingTool";function zt(){ho(this),this.H=eh,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=so,this.hb=!0,this.cg=null,this.ob=200}zt.prototype.toString=function(){return"CommandHandler"},zt.prototype.Xe=function(a){this.H=a},zt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Co?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},zt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},zt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ar&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},zt.prototype.canStopCommand=function(){return!0},zt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},zt.prototype.canSelectAll=function(){return this.diagram.allowSelect},zt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new sn,x=a.selection.iterator;x.next();)rc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},zt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},zt.prototype.copySelection=function(){var a=this.diagram,y=new sn;for(a=a.selection.iterator;a.next();)rc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},zt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},zt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},zt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},zt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Rc=null,tc="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new cn,x.addAll(z),Rc=x,tc=y.model.dataFormat}}y.R("ClipboardChanged",x)},zt.prototype.pasteFromClipboard=function(){var a=new sn,y=Rc;if(y===null)return a;var x=this.diagram;if(tc!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},zt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);yh(y,z,new Rt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},zt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Rc===null||Rc.count===0||tc!==a.model.dataFormat)},zt.prototype.undo=function(){this.diagram.undoManager.undo()},zt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},zt.prototype.redo=function(){this.diagram.undoManager.redo()},zt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},zt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ja&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},zt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ja?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},zt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ja&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},zt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ja?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},zt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},zt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},zt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;La(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=so):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ta(y)},zt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},zt.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&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;La(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=re(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var rt=b.pop();0<b.length&&rt instanceof On&&rt.isTreeExpanded&&(!(rt instanceof Ii)||rt.isSubGraphExpanded);)rt=b.pop();0<b.length?(rt instanceof ci&&y.tv(rt.actualBounds),rt instanceof On&&!rt.isTreeExpanded&&(rt.isTreeExpanded=!0),rt instanceof Ii&&!rt.isSubGraphExpanded&&(rt.isSubGraphExpanded=!0)):(rt instanceof ci&&y.es(rt.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){An(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var ot=y.position.copy();y.es(a.actualBounds),ot.Xa(y.position)&&x.Cc()}}};function re(a,y,x){if(y.isVisible())return x;if(y instanceof Fo)re(a,y.adornedPart,x);else if(y instanceof Cn){var E=y.fromNode;E!==null&&re(a,E,x),y=y.toNode,y!==null&&re(a,y,x)}else y instanceof On&&(E=y.labeledLink,E!==null&&re(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),re(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),re(a,y,x));return x}zt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof ci)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},zt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),La(y.animationManager,"Collapse Tree");var x=new cn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof On&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},zt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof On&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof On&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},zt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),La(y.animationManager,"Expand Tree");var x=new cn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof On&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},zt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof On)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof On&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},zt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new cn,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var ot=new cn,rt=b.iterator;rt.next();){var at=rt.value;z=!1;for(var ut=b.iterator;ut.next();)if(at.Td(ut.value)){z=!0;break}z||ot.add(at)}if(0<ot.count){var ft=ot.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var mt=ot.iterator;mt.next();)if(!mt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof Ii)Eu(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var yt=y.copyNodeData(x);Ke(yt)&&(y.xf(yt),E=a.ii(yt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Ct=ot.iterator;Ct.next();){var kt=Ct.value;this.isValidMember(E,kt)&&(kt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},zt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function ze(a){var y=Hn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Cn||y.push(x)}a=new sn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return _n(y),a}zt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Cn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},zt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new cn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof Ii&&z.canUngroup()&&E.add(z)}var tt=new cn;if(0<E.count){y.clearSelection(!0);for(var ot=E.iterator;ot.next();){var rt=ot.value;rt.expandSubGraph();var at=rt.containingGroup,ut=at!==null&&at.data!==null?x.wa(at.data):void 0;tt.addAll(rt.memberParts);for(var ft=tt.iterator;ft.next();){var mt=ft.value;if(mt.isSelected=!0,!(mt instanceof Cn)){var yt=mt.data;yt!==null?x.mp(yt,ut):mt.containingGroup=at}}y.remove(rt)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},zt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof Ii))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ii&&y.canUngroup())return!0;return!1},zt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=ze(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},zt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),La(y.animationManager,"Collapse SubGraph");var x=new cn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Ii&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},zt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Ii&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ii&&y.isSubGraphExpanded)return!0;return!1},zt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),La(y.animationManager,"Expand SubGraph");var x=new cn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Ii&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},zt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Ii&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ii&&!y.isSubGraphExpanded)return!0;return!1},zt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof yr&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},zt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof yr))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof yr&&x.editable}),a!==null))return!0;return!1},zt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof ge?b=a.ga(po):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Rt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,fr(x,!1,a)}},zt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},zt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new Xn,a===null)return E;for(var z=a.iterator;z.next();)Pu(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof Cn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Gt.Object.defineProperties(zt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||oe("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),zt.className="CommandHandler",id=function(){return new zt};function ge(){ho(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Rt(NaN,NaN).freeze(),this.jd=ns,this.Ab=new Gi,this.wh=new Gi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Js,this.uc=new Ze(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Ze(NaN,NaN,NaN,NaN).freeze(),this.dc=new Ze(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=nn,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var yn,an,Qn,li,yi,ji,co,eo,Eo,ar;ge.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=zn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},ge.prototype.Vw=function(a){var y=this.Dh;if(Qe(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},ge.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},ge.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},ge.prototype.copy=function(){return this.clone()},Mt=ge.prototype,Mt.qb=function(a){a.classType===Cn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:oe("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ge&&(this.stretch=a)},Mt.toString=function(){return Vn(this.constructor)+"#"+zo(this)},Mt.th=function(){this.A!==null&&(this.A.nc=!0)};function _i(a){a.A===null?a.A=new xf:a.A.nc&&(a.A=a.A.copy())}Mt.Xc=function(){if(this.ba===null){var a=new ap;a.Xi=Vr,a.yj=Vr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Mt.cb=function(a,y,x,E,b,z,tt){var ot=this.part;if(ot!==null&&(ot.gk(a,y,x,E,b,z,tt),x===this&&a===Or&&xa(this)&&Mr(this,ot,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new Xn),tt=z.undoManager.transactionLevel===0,a.startCondition===ua?tt=!0:a.startCondition===Es&&(tt=!1),tt?(z=new $r,Zr(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(La(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Sn&&x===ot&&(ot.l&16777216)!==0&&ot.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)ot=x[b],ot instanceof Sn&&Zc(ot,function(rt){rt.data!==null&&rt.l&16777216&&rt.La(y)})};function Mr(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=Lx(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,ot.model.modelData,x,E)}else{if(ot=E.data,ot===null)continue;var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,ot,x,E)}tt===a&&(ot=E.ks(z.Ai),ot!==null&&z.Mv(ot,tt,x))}}Mt.ks=function(a){return this.bindingId===a?this:null},Mt.g=function(a,y,x){this.cb(Or,a,this,y,x)},Mt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Gi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function _s(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Mt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?lr(a.x,a.y,0,0,0,E.height)<=y||lr(a.x,a.y,0,E.height,E.width,E.height)<=y||lr(a.x,a.y,E.width,E.height,E.width,0)<=y||lr(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Mt.se=function(){return!0},Mt.ca=function(a){var y=Rt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Rt.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,ot=this.naturalBounds;E=this.Df()*E.scale;var rt=1/E;if(ot.width*E<b&&ot.height*E<b)return a=As(x.x-tt*rt,x.y-tt*rt,x.width+z*rt,x.height+z*rt,y.x,y.y),Rt.free(y),a}return b=!1,(this instanceof Fo||this instanceof Yi?As(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),Rt.free(y),b},Mt.gh=function(a){var y=this.naturalBounds;return As(0,0,y.width,y.height,a.x,a.y)},Mt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Ze.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Rt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),Rt.free(b),Ze.free(y),E},Mt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Rt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),Rt.free(b),E},Mt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Rt.allocAt(0,0),b=Rt.allocAt(0,x.height),z=Rt.allocAt(x.width,x.height),tt=Rt.allocAt(x.width,0),ot=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))ot=!0;else{x=Ze.allocAt(0,0,x.width,x.height);var rt=Rt.allocAt(a.x,a.y);x.ca(y.Cd(rt))?ot=!0:(rt.h(a.x,a.bottom),x.ca(y.Cd(rt))?ot=!0:(rt.h(a.right,a.bottom),x.ca(y.Cd(rt))?ot=!0:(rt.h(a.right,a.y),x.ca(y.Cd(rt))&&(ot=!0)))),Rt.free(rt),Ze.free(x),!ot&&(ve.us(a,E,b)||ve.us(a,b,z)||ve.us(a,z,tt)||ve.us(a,tt,E))&&(ot=!0)}return Rt.free(E),Rt.free(b),Rt.free(z),Rt.free(tt),ot},Mt.ga=function(a,y){if(y===void 0&&(y=new Rt),a instanceof ti){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Mt.mi=function(a){a===void 0&&(a=new Ze);var y=this.naturalBounds,x=this.oe,E=Rt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Hr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Hr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Hr(a,E.x,E.y,0,0),Rt.free(E),a},Mt.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Mt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Mt.qs=function(a,y){return y===void 0&&(y=new Rt),y.assign(a),this.oe.Cd(y),y},Mt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Mt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),ot=z.m22*tt,rt=-z.m12*tt,at=-z.m21*tt,ut=z.m11*tt,ft=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,ve.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*ot+y*at+ft,a=a*rt+y*ut+mt,y=x*ot+E*at+ft,x=x*rt+E*ut+mt,b.h(0,0),E=this.naturalBounds,x=ve.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},ge.prototype.measure=function(a,y,x,E){if(Ql(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var ot=this instanceof Sn;switch(ul(this,!0)){case an:tt=b=0,ot&&(y=a=1/0);break;case yn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case li:isFinite(a)&&a>x&&(b=a),tt=0,ot&&(y=1/0);break;case yi:isFinite(y)&&y>E&&(tt=y),b=0,ot&&(a=1/0)}ot=this.maxSize;var rt=this.minSize;b>ot.width&&rt.width<ot.width&&(b=ot.width),tt>ot.height&&rt.height<ot.height&&(tt=ot.height),x=Math.max(b,rt.width),E=Math.max(tt,rt.height),ot.width<x&&(x=Math.min(rt.width,x)),ot.height<E&&(E=Math.min(rt.height,E)),a=Math.min(ot.width,a),y=Math.min(ot.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||oe("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),zs(this,!1)}},ge.prototype.Wl=function(){},ge.prototype.Dd=function(){return!1},ge.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Ze.alloc();z.assign(this.Ib),this.Ib.ka(),Xa(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&kd(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof yr&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||oe("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),jh(this,!1),Ze.free(z)},Mt=ge.prototype,Mt.eh=function(){};function za(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=ul(a,!0),x===E&&z===b&&(y=an),y){case an:(x>E||z>b)&&(zs(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case yn:zs(a,!0),a.measure(E,b,0,0);break;case li:zs(a,!0),a.measure(E,z,0,0);break;case yi:zs(a,!0),a.measure(x,b,0,0)}}}Mt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||jv(x,!0),this.N(),gl(a,y)||(x.oh(),this.Pn(x)))},Mt.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof On&&KS(a,this))},Mt.gc=function(a,y){if(!au(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof Sn&&kd(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&&(as(this,a,at,!0,!0,rt,ot),at instanceof tr&&at.type===hu?(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&&(as(this,a,ut,!0,!1,rt,ot),ut instanceof tr&&ut.type===hu?(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&&da(this),at=this.part,rt=!1;var ft=0;at&&y.Gf("drawShadows")&&(rt=at.isShadowed)&&(ut=at.shadowOffset,ft=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 Ct=mt.m11,kt=mt.m21,Ht=mt.dx,Dt=mt.m12,Xt=mt.m22,$t=mt.dy,ie,fe=ie=0;mt=ie*Ct+fe*kt+Ht;var Ae=ie*Dt+fe*Xt+$t;ie=yt.width+ft,fe=0;var Bn=ie*Ct+fe*kt+Ht;ie=ie*Dt+fe*Xt+$t,fe=Math.min(mt,Bn);var Kn=Math.min(Ae,ie),Gn=Math.max(mt+0,Bn)-fe,Pn=Math.max(Ae+0,ie)-Kn;mt=fe,Ae=Kn,ie=yt.width+ft,fe=yt.height+ft,Bn=ie*Ct+fe*kt+Ht,ie=ie*Dt+fe*Xt+$t,fe=Math.min(mt,Bn),Kn=Math.min(Ae,ie),Gn=Math.max(mt+Gn,Bn)-fe,Pn=Math.max(Ae+Pn,ie)-Kn,mt=fe,Ae=Kn,ie=0,fe=yt.height+ft,Bn=ie*Ct+fe*kt+Ht,ie=ie*Dt+fe*Xt+$t,fe=Math.min(mt,Bn),Kn=Math.min(Ae,ie),Gn=Math.max(mt+Gn,Bn)-fe,Pn=Math.max(Ae+Pn,ie)-Kn,mt=fe,Ae=Kn,ft=y.viewportBounds,yt=ft.x,Ct=ft.y,mt=!(mt>ft.width+yt||yt>Gn+mt||Ae>ft.height+Ct||Ct>Pn+Ae)}if(mt){if(mt=(this.l&256)!==0,a.clipInsteadOfFill&&(mt=!1),this instanceof yr&&(a.font=this.font),mt){if(Ae=ot.se()?ot.naturalBounds:ot.actualBounds,Gn=Math.max(tt.x,Ae.x),Pn=Math.max(tt.y,Ae.y),ft=Math.min(tt.right,Ae.right)-Gn,yt=Math.min(tt.bottom,Ae.bottom)-Pn,Ct=this.tb,Ct!==null&&(Gn=Ct.x,Pn=Ct.y,ft=Ct.width,yt=Ct.height),Gn>tt.width+tt.x||tt.x>Ae.width+Ae.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Gn,Pn,ft,yt),a.clip()}if(ut){if(!at.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}rt&&(Ae=at.shadowOffset,a.Ev(Ae.x*y.scale*this.scale*y.Mb,Ae.y*y.scale*this.scale*y.Mb,at.shadowBlur),sd(a),a.shadowColor=at.shadowColor)}rt&&this.shadowVisible===!0?sd(a):rt&&this.shadowVisible===!1&&zh(a),at=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Xl(this,a,at,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),rt&&oa(this,ot)&&this.shadowVisible===null&&zh(a),this.Ma!==null&&(a.yc(),Pl(this,a,at,tt)),rt&&(this.Ma!==null||this.areaBackground!==null||oa(this,ot))?(Hu(this,!0),this.shadowVisible===null&&zh(a)):Hu(this,!1),this.hh(a,y),rt&&this.l&512&&sd(a),ut&&rt&&zh(a),mt&&(a.restore(),a.Vc(this instanceof Sn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function oa(a,y){return y===null?!1:(kd(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Sn.Auto||y.type===Sn.Spot)&&y.Pb()!==a)}Mt.Dv=function(){};function Xl(a,y,x,E){as(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof tr&&a.areaBackground.type===hu?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function Pl(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,ot=x.width+b,rt=x.height+b;as(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof tr&&a.Ma.type===hu?(y.beginPath(),y.rect(z-b/2,tt-b/2,ot,rt),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,ot,rt)}function Ta(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Sn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function au(a,y,x){if(!(y instanceof Bl))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&Ta(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),sd(y),y.shadowColor=a.shadowColor}a instanceof yr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Sn;var ot=a instanceof Sn?kd(a):!1;a.l&4096&&da(a);var rt=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&ot?(lp(y,1,0,0,1,0,0),a.svg=y.ad):z?(lp(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):lp(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var at=tt.copy().Vj();y.rb.ha=[at.m11,at.m12,at.m21,at.m22,at.dx,at.dy],Xl(a,y,b,rt),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(ot&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),Pl(a,y,b,rt),ot&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Pl(a,y,b,rt)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,ot=!1,b&&x.Gf("drawShadows")&&(ot=b.isShadowed),y.clipInsteadOfFill&&(ot=!1),a.Dd()&&ot&&sd(y),ot&&a.shadowVisible===!0?sd(y):ot&&a.shadowVisible===!1&&zh(y),b=a.panel,ot&&oa(a,b)&&a.shadowVisible===null&&zh(y),y.Il&&(at=x.computePixelRatio(),at="drop-shadow("+y.shadowOffsetX/at+"px "+y.shadowOffsetY/at+"px "+y.shadowBlur/at/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",at),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",at)),ot&&(a.Ma!==null||a.areaBackground!==null||oa(a,b))?(Hu(a,!0),a.shadowVisible===null&&zh(y)):Hu(a,!1),b=ot,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,ot=z?a.svg:y.yd,at=a.svg,!z&&at!==null&&ot!==at&&at.parentNode===a.panel.svg?(a.svg.replaceWith(ot),a.svg=ot,ot!==null&&a.$o(y,E,rt,ot),ll(y,at),!0):(a.svg=ot,tt!==null&&ot===null&&(fm(y),y.nh.pop()),ot===null||(a.$o(y,E,rt,ot),y.Il&&(x=x.computePixelRatio(),a.Dv(ot,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&sd(y),a.Dd()&&zh(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ot.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ot.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ot):y.Nj.prepend(ot),y.ti=ot):E!==null&&Ta(a,E,ot),tt!==null&&tt(a,ot)),!0)}Mt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var ot=null;z!==null&&(ot=a.svg.getElementById(z.split("#")[1].slice(0,-1))),ot===null?(z="CLIP"+Fr++,ot=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof Sn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),ot.appendChild(y),a.svg.appendChild(ot),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=ot.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),ll(a,E)};function ll(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Ba(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=ir(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Mt.hh=function(){},Mt.lv=function(){this.Uc=!0},Mt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof Sn?kd(this):!1;if(!(this instanceof Sn&&b))if(this instanceof dl){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Qy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Sn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Yi){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Xl(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&gm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Sn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Pl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&gm(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Mt.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function as(a,y,x,E,b,z,tt){if(x!==null){var ot=1,rt=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===bd)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var at=a.kq();if(ot=z.width,rt=z.height,b?(ot=tt.width,rt=tt.height):E||(ot+=at,rt+=at),(z=y instanceof Kc)&&x.xe&&(x.type===hg||x.yk===ot&&x.ft===rt))var ut=x.xe;else{var ft=0,mt=0,yt=0,Ct=0,kt=0,Ht=0;if(Ht=kt=0,b?(kt=tt.x,Ht=tt.y):E||(kt-=at/2,Ht-=at/2),ft=x.start.x*ot+x.start.offsetX,mt=x.start.y*rt+x.start.offsetY,yt=x.end.x*ot+x.end.offsetX,Ct=x.end.y*rt+x.end.offsetY,ft+=kt,yt+=kt,mt+=Ht,Ct+=Ht,x.type===ld)ut=y.createLinearGradient(ft,mt,yt,Ct);else if(x.type===hu)Ht=isNaN(x.endRadius)?Math.max(ot,rt)/2:x.endRadius,isNaN(x.startRadius)?(kt=0,Ht=Math.max(ot,rt)/2):kt=x.startRadius,ut=y.createRadialGradient(ft,mt,kt,yt,Ct,Ht);else if(x.type===hg)try{ut=y.createPattern(x.pattern,"repeat")}catch(Xt){ut=null}if(x.type!==hg&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ut.addColorStop(b.key,b.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=ot,x.ft=rt),ut===null&&x.type===hg&&x.yk!==-1)){x.yk=-1;var Dt=a.diagram;Dt!==null&&x.yk===-1&&An(function(){Dt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Mt.rg=function(a){if(a instanceof Sn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Mt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Mt.If=function(){for(var a=this instanceof Sn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function da(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Cu(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}Cu(a,!1),lu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,lu(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,lu(a,!1)))}Mt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Rt.alloc();z.yi(y,x,E,b,po),a.rotate(this.Kb,z.x,z.y),Rt.free(z)}},Mt.v=function(a){if(!Ql(this)){a===void 0&&(a=!1),zs(this,!0),jh(this,!0);var y=this.panel;y===null||a||y.v()}},Mt.Uj=function(){Ql(this)||(zs(this,!0),jh(this,!0))};function Ya(a){if(!Xa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof On&&a.Bd(),y.$b())),jh(a,!0)}}Mt.Uk=function(){!(this.l&2048)&&(Cu(this,!0),lu(this,!0))},Mt.Wu=function(){lu(this,!0)},Mt.N=function(){var a=this.part;a!==null&&a.N()};function ul(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Sn.Table?nh(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Sn.Auto&&E.Pb()===a?ra(a,yn,y):x===ji?E!==null?E.type===Sn.Spot&&E.Pb()===a?ra(a,yn,y):(x=E.defaultStretch,x===ji?ra(a,an,y):ra(a,x,y)):ra(a,an,y):ra(a,x,y)}function nh(a,y,x,E){var b=a.stretch;if(b!==ji)return ra(a,b,E);var z=b=null;switch(y.stretch){case yi:z=!0;break;case yn:z=!0}switch(x.stretch){case li:b=!0;break;case yn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===li||y===yn),z===null&&(z=y===yi||y===yn),b===!0&&z===!0?ra(a,yn,E):b===!0?ra(a,li,E):z===!0?ra(a,yi,E):ra(a,an,E)}function ra(a,y,x){if(x)return y;if(y===an||(x=a.desiredSize,x.w()))return an;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===li)return an;if(y===yn)return yi}else{if(y===yi)return an;if(y===yn)return li}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===yi)return an;if(y===yn)return li}else{if(y===li)return an;if(y===yn)return yi}return y}function Hu(a,y){a.l=y?a.l|512:a.l&-513}function xa(a){return(a.l&1024)!==0}function Sf(a,y){a.l=y?a.l|1024:a.l&-1025}function Cu(a,y){a.l=y?a.l|2048:a.l&-2049}function lu(a,y){a.l=y?a.l|4096:a.l&-4097}function Ql(a){return(a.l&8192)!==0}function zs(a,y){a.l=y?a.l|8192:a.l&-8193}function Xa(a){return(a.l&16384)!==0}function jh(a,y){a.l=y?a.l|16384:a.l&-16385}Mt.Gj=function(){this.svg=null},Mt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Mt.Av=function(){},Mt.zv=function(a){return this.pa=a,Ya(this),!0},Mt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Mt.kq=function(){return 0};function Gc(a){var y=a.part;if(y instanceof On&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||KS(y,a)}}function Yy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Sn?a instanceof On?a.Bd():a.qm(a,function(x){Gc(x)}):Gc(a))}Mt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ls(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&cS(a)&&oe("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new cn),this.localBindings.add(b),this},Mt.set=function(a){return Object.assign(this,a),this},Mt.Du=function(a){return nv(this,a),this},Mt.apply=function(a){return a(this),this},Mt.nm=function(a){return ru(this,a),this},Mt.pz=function(){return this.ih()},Mt.ih=function(){for(var a=this instanceof Sn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Mt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Xn),this.animationTriggers.add(a.propertyName,a),this};function uu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=og.I(a);typeof z=="function"?(x=zn(arguments),E=z(x),Ke(E)||oe('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=qt.go[a]}if(E===null&&(b!=null&&b.constructor||oe("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof ke&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(bc(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?oe("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):nv(E,z);return E}function nv(a,y){if(typeof y=="string")if(a instanceof yr)a.text=y;else if(a instanceof Yi)a.figure=y;else if(a instanceof dl)a.source=y;else if(a instanceof Sn)y=Gu.I(y),y!==null&&(a.type=y);else if(a instanceof tr){var x=jn(tr,y);x!==null?a.type=x:oe("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof En?(y=jn(En,y),y!==null&&(a.type=y)):a instanceof To&&(y=jn(To,y),y!==null&&(a.type=y));else if(y instanceof ge)a instanceof Sn||oe("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Hs){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof Hs?Nm(E,y):oe("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Ue)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Us)a.type=y;else if(y instanceof Ls)a instanceof ge||a instanceof Hs?a.bind(y):oe("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Tl)a instanceof ge?a.Jv(y):oe("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Ks)a instanceof En&&a.type===En.o?a.figures.add(y):oe("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof To)a instanceof Ks?a.segments.add(y):oe("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Br)a instanceof ke||a instanceof Ii?a.layout=y:oe("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)nv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof tr){x=new Mi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);ru(a,x)}else if(a instanceof Hs){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&oe("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&oe("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Mi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);ru(a,b)}else ru(a,y);else oe('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Ld(a,y){og.add(a,y)}function cm(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Gt.Object.defineProperties(ge.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new xf),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new xf),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new xf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(_i(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&&(_i(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:_a},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===_a&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Qo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new nc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:ji},set:function(a){var y=this.stretch;y!==a&&(_i(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(_i(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&bn(a,"0 <= value <= 1",ge,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Yc(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Yc(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Yy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Pf(a,"GraphObject.areaBackground"),a instanceof tr&&a.freeze(),_i(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Pf(a,"GraphObject.background"),a instanceof tr&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof ci)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Rt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&oe("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,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,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Yi&&this.qc(),this.g("desiredSize",E,a),xa(this)&&(a=this.part,a!==null&&(Mr(this,a,"width"),Mr(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 kn(a,this.jd.height).freeze(),this.v(),this instanceof Yi&&this.qc(),this.g("desiredSize",y,a),xa(this)&&(a=this.part,a!==null&&Mr(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 kn(this.jd.width,a).freeze(),this.v(),this instanceof Yi&&this.qc(),this.g("desiredSize",y,a),xa(this)&&(a=this.part,a!==null&&Mr(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Ki},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(),_i(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:hs},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(),_i(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 hi(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&da(this),this.Ab}},oe:{get:function(){return this.l&4096&&da(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(_i(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:an},set:function(a){this.reshapingBehavior!==a&&(_i(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&oe("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ya(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&&bn(a,">= 0",ge,"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&&bn(a,">= 1",ge,"columnSpan"),_i(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&&bn(a,">= 0",ge,"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&&bn(a,">= 1",ge,"rowSpan"),_i(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&&(_i(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 On||oe("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Wv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,VS(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Vr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Gc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&bn(a,">= 0",ge,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Gc(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),Gc(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&&bn(a,">= 0",ge,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Vr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Gc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&bn(a,">= 0",ge,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Gc(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),Gc(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&&bn(a,">= 0",ge,"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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(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&&(_i(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),ge.prototype.trigger=ge.prototype.Jv,ge.prototype.findBindingPanel=ge.prototype.ih,ge.prototype.findTemplateBinder=ge.prototype.pz,ge.prototype.setProperties=ge.prototype.nm,ge.prototype.apply=ge.prototype.apply,ge.prototype.attach=ge.prototype.Du,ge.prototype.set=ge.prototype.set,ge.prototype.isEnabledObject=ge.prototype.If,ge.prototype.isVisibleObject=ge.prototype.Ed,ge.prototype.isContainedBy=ge.prototype.rg,ge.prototype.getNearestIntersectionPoint=ge.prototype.rs,ge.prototype.getLocalPoint=ge.prototype.qs,ge.prototype.getDocumentScale=ge.prototype.Df,ge.prototype.getDocumentAngle=ge.prototype.li,ge.prototype.getDocumentBounds=ge.prototype.mi,ge.prototype.getDocumentPoint=ge.prototype.ga,ge.prototype.intersectsRect=ge.prototype.Yc,ge.prototype.containedInRect=ge.prototype.fh,ge.prototype.containsRect=ge.prototype.Re,ge.prototype.containsPoint=ge.prototype.ca,ge.prototype.raiseChanged=ge.prototype.g,ge.prototype.raiseChangedEvent=ge.prototype.cb,ge.prototype.addCopyProperty=ge.prototype.Vw;var og=null;ge.className="GraphObject",og=new Xn,Ld("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=uu(Sn,Sn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Sn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},uu(Yi,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new ti(0,0,2.76142374915397,2.761423749153969),spot2:new ti(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof Sn&&(x=E.fb("ButtonBorder"),x instanceof Yi)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof Sn&&(x=E.fb("ButtonBorder"),x instanceof Yi&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Sn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Yi){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof Sn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Yi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof Sn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Yi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof Sn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Yi))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),Ld("TreeExpanderButton",function(){var a=uu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},uu(Yi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ir},new Ls("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Ls("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Fo&&(x=x.adornedPart),x instanceof On){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),Ld("SubGraphExpanderButton",function(){var a=uu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},uu(Yi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ir},new Ls("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 Fo&&(x=x.adornedPart),x instanceof Ii){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),Ld("ToolTip",function(){return uu(Fo,Sn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Rt(0,3),shadowBlur:5},uu(Yi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ti(0,0,4,6),spot2:new ti(1,1,-4,-4)}))}),Ld("ContextMenu",function(){return uu(Fo,Sn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Rt(0,3),shadowBlur:5},new Ls("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ld("ContextMenuButton",function(){var a=uu("Button");a.stretch=li;var y=a.fb("ButtonBorder");return y instanceof Yi&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new ti(0,0,2,3),y.spot2=new ti(1,1,-2,-2)),a}),Ld("PanelExpanderButton",function(a){var y=cm(a,"COLLAPSIBLE"),x=uu("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},uu(Yi,{name:"ButtonIcon",strokeWidth:2},new Ls("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Yi&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Ld("CheckBoxButton",function(a){var y=cm(a);return a=uu("Button",{desiredSize:new kn(14,14)},uu(Yi,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:yn,geometryStretch:Qn,visible:!1},y!==""?new Ls("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Sn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),Ld("CheckBox",function(a){a=cm(a),a=uu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new hi(0,1,0,0)});var y=uu(Sn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new hi(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}),ge.None=an=new Ue(ge,"None",0),ge.Default=ji=new Ue(ge,"Default",0),ge.Vertical=yi=new Ue(ge,"Vertical",4),ge.Horizontal=li=new Ue(ge,"Horizontal",5),ge.Fill=yn=new Ue(ge,"Fill",3),ge.Uniform=Qn=new Ue(ge,"Uniform",1),ge.UniformToFill=co=new Ue(ge,"UniformToFill",2),ge.FlipVertical=eo=new Ue(ge,"FlipVertical",1),ge.FlipHorizontal=Eo=new Ue(ge,"FlipHorizontal",2),ge.FlipBoth=ar=new Ue(ge,"FlipBoth",3),ge.make=uu,ge.getBuilders=function(){var a=new Xn,y;for(y in og)if(y!==y.toLowerCase()){var x=og.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},ge.defineBuilder=Ld,ge.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=og.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof ge))return y&&E.set(y),E;oe('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},ge.takeBuilderArgument=cm;function xf(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=Ki,this.o=hs,this.hg=ji,this.ob=this.Bi=1,this.Pf=an,this.Pc=this.Ci=this.gd=null,this.Oc="category"}xf.prototype.copy=function(){var a=new xf;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function nc(){this.u=-1/0,this.o=0,this.F=Qo,this.rr=_a,this.j=this.V="None"}nc.prototype.copy=function(){var a=new nc;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},nc.className="LinkElementSettings";function ap(){this.yj=this.Xi=nn,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}ap.prototype.copy=function(){var a=new ap;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},ap.className="LinkSettings";function Wc(){this.ha=[1,0,0,1,0,0]}Wc.prototype.copy=function(){var a=new Wc;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Wc.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Wc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Wc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Wc.className="STransform";function wf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}wf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},wf.className="SGradient";function wh(a,y,x){this.ownerDocument=a=y===void 0?qt.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 Bl(this,x)}wh.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},wh.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Ke(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},wh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},wh.prototype.focus=function(){this.Oa.focus()},wh.prototype.mx=function(){this.ownerDocument=null},Gt.Object.defineProperties(wh.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}}}),wh.className="SVGSurface";function Bl(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 Wc,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Fr++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Xy(a,y,x,E,b,z,tt){a.Nj===void 0?lp(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Mt=Bl.prototype,Mt.arc=function(a,y,x,E,b,z,tt,ot){var rt=2*Math.PI,at=rt-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),mt=a+ut,yt=y+ft,Ct=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-mt)||1e-6<Math.abs(ot-yt))&&this.path.push(["L",mt,+yt]),0>E&&(E=E%rt+rt),E>at?(this.path.push(["A",x,x,0,1,Ct,a-ut,y-ft]),this.path.push(["A",x,x,0,1,Ct,mt,yt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Ct,a+x*Math.cos(b),y+x*Math.sin(b)])},Mt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Mt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Mt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Mt.clearRect=function(){},Mt.clip=function(){this.Yl.clipPath=!0},Mt.closePath=function(){this.path.push(["z"])},Mt.createLinearGradient=function(a,y,x,E){var b=new wf("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Mt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+Fr++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(zc,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Mt.createRadialGradient=function(a,y,x,E,b,z){var tt=new wf("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function Qy(a,y,x,E,b,z,tt,ot,rt){E=ot/E,b=rt/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Mt.drawImage=function(a,y,x,E,b,z,tt,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,E===void 0&&(z=y,tt=x,ot=E=ut,rt=b=a),E=E||0,b=b||0,ot=ot||0,rt=rt||0,Qy(this,y,x,E,b,z||0,tt||0,ot,rt),z={x:0,y:0,width:ut||E,height:a||b,href:at},ve.$(E,ot)&&ve.$(b,rt)?at.toLowerCase().indexOf(".svg")===-1&&at.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),rg(this,zc,z,this.rb),this.addElement(zc,z)},Mt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},Mt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Mt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},rg(this,"fill",a,this.rb),this.addElement("rect",a)},Mt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},rg(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},Mt.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},rg(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Mt.lineTo=function(a,y){this.path.push(["L",a,y])},Mt.moveTo=function(a,y){this.path.push(["M",a,y])},Mt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Mt.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Mt.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},Mt.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Mt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||lp(this,a,y,x,E,b,z)};function Jy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Mt.scale=function(a,y){this.rb.scale(a,y)},Mt.translate=function(a,y){this.rb.translate(a,y)},Mt.transform=function(){},Mt.yc=function(){},Mt.stroke=function(){qy(this,this.Yl)},Mt.jk=function(){this.clipInsteadOfFill||this.stroke()},Mt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Mt.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function rg(a,y,x,E){y==="fill"?iv(a,x):y==="stroke"&&qy(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof wf?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function _y(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof wf?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof wf)y.stroke=ov(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function ov(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+Fr++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var ot=b[tt],rt=ot.color;ot={offset:ot.offset,"stop-color":rt},/^rgba\(/.test(rt)&&(rt=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(rt),ot["stop-color"]="rgb("+rt[1]+","+rt[2]+","+rt[3]+")",ot["stop-opacity"]=rt[4]),z.push(ot)}for(z.sort(function(at,ut){return at.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Mt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=zn(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,rg(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ot in a)ot!=="transform"&&y.setAttributeNS(null,ot,a[ot]);else{ot=y.getElementsByTagName("path");for(var rt in a)rt!=="transform"&&ot[x].setAttributeNS(null,rt,a[rt])}else this.addElement("path",a)};function lp(a,y,x,E,b,z,tt){var ot=new Wc;ot.ha=[y,x,E,b,z,tt],y={},rg(a,"g",y,ot),ot=a.addElement("g",y),a.nh.push(ot)}function fm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Mt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function zh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function sd(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Mt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Mt.fs=function(){this.Ct=!1},Mt.Vc=function(){},Mt.Wx=function(){},Bl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Bl.prototype.getImageData=function(){return null},Bl.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Bl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Bl.className="SVGContext",ke.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new wh(this,qt.document));var y=new wh(this,qt.document,!0);a===void 0&&(a=new Mi);var x=this;return gf(this,function(E,b){return E=lm(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},ke.prototype.makeSvg=ke.prototype.Cs,ke.prototype.av=function(a){return this.Cs(a)},ke.prototype.makeSVG=ke.prototype.av;function Mu(a,y,x,E){this.ownerDocument=y=y===void 0?qt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Kc(y,x,E),y.H=a}Mu.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},Mu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Mu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Mu.prototype.focus=function(){this.Oa.focus()},Mu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Gt.Object.defineProperties(Mu.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),Mu.className="CanvasSurface";function Kc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&oe("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Gi,this.isTemporary=!!x}Mt=Kc.prototype,Mt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Mt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Mt.beginPath=function(){this.Z.beginPath()},Mt.Se=function(){},Mt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Mt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Mt.clip=function(){this.Z.clip()},Mt.closePath=function(){this.Z.closePath()},Mt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Mt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Mt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Mt.drawImage=function(a,y,x,E,b,z,tt,ot,rt){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,ot,rt)},Mt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Mt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Mt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Mt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Mt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Mt.lineTo=function(a,y){this.Z.lineTo(a,y)},Mt.measureText=function(a){return this.Z.measureText(a)},Mt.moveTo=function(a,y){this.Z.moveTo(a,y)},Mt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Mt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Mt.restore=function(){this.Z.restore()},Mt.save=function(){this.yc(),this.Z.save()},Kc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Mt=Kc.prototype,Mt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Mt.scale=function(a,y){this.El.scale(a,y)},Mt.translate=function(a,y){this.El.translate(a,y)},Mt.stroke=function(){this.Z.stroke()},Mt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,ot=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=ot,tt.m12=a,tt.m21=y,tt.m22=x}},Mt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Mt.ng=function(a,y){if(a instanceof tr&&a.type===hu){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Mt.jk=function(){this.Hm||this.stroke()},Mt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Mt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Mt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(m1),a.lineDashOffset=0)},Mt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Mt.Hs=function(){},Gt.Object.defineProperties(Kc.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 m1=Object.freeze([]);Kc.className="CanvasSurfaceContext";function up(){this.F=this.o=this.u=this.j=0}up.className="ColorNumbers";function tr(a,y){ug||(hv(),ug=!0),ho(this),this._isFrozen=!1,a===void 0?(this.na=bd,this.xk="black"):typeof a=="string"?(this.na=bd,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===ld?(this.Qd=ba,this.Lk=Da):this.Lk=a===hu?this.Qd=po:this.Qd=Vr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}tr.prototype.copy=function(){var a=new tr;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Mt=tr.prototype,Mt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Mt.ka=function(){return Object.isFrozen(this)&&oe("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Mt.qb=function(a){a.classType===tr&&(this.type=a)},Mt.toString=function(){var a="Brush(";if(this.type===bd)a+=this.color;else if(a=this.type===ld?a+"Linear ":this.type===hu?a+"Radial ":this.type===hg?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},Mt.addColorStop=function(a,y){return this._isFrozen&&qe(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&bn(a,"0 <= loc <= 1",tr,"addColorStop:loc"),this.we===null&&(this.we=new Xn),this.we.add(a,y),this.na===bd&&(this.type=ld),this.xe=null,this},Mt.Vz=function(a,y){if(this._isFrozen&&qe(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===bd)ad(this.color),this.color=ag(a,y);else if((this.type===ld||this.type===hu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)ad(x.value),this.addColorStop(x.key,ag(a,y));return this};function $y(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,ad(a),ag(y,x)}Mt.Wy=function(a,y){if(this._isFrozen&&qe(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===bd)ad(this.color),this.color=ag(-a,y);else if((this.type===ld||this.type===hu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)ad(x.value),this.addColorStop(x.key,ag(-a,y));return this};function tS(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,ad(a),ag(-y,x)}function rv(a,y,x){ad(a),a=Pr.j;var E=Pr.u,b=Pr.o,z=Pr.F;return ad(y),x===void 0&&(x=.5),"rgba("+Math.round((Pr.j-a)*x+a)+", "+Math.round((Pr.u-E)*x+E)+", "+Math.round((Pr.o-b)*x+b)+", "+Math.round((Pr.F-z)*x+z)+")"}Mt.Gx=function(){if(this.type===bd)return sg(this.color);if((this.type===ld||this.type===hu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===hu)return sg(a.first().value);if(a.get(.5)!==null)return sg(a.get(.5));if(a.count===2)return a=a.Fa(),sg(rv(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,ot=Math.abs(.5-y.key);b>z&&ot<b?(x=tt,b=ot):z>=b&&ot<z&&(E=tt,z=ot)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,sg(rv(a.get(x),a.get(E),1-z/b))}return!1};function sg(a){return a?a instanceof tr?a.Gx():(ad(a),128>(299*Pr.j+587*Pr.u+114*Pr.o)/1e3):!1}function ag(a,y){switch(y){case dg:y=100*av(Pr.j);var x=100*av(Pr.u),E=100*av(Pr.o);return Qa.j=.4124564*y+.3575761*x+.1804375*E,Qa.u=.2126729*y+.7151522*x+.072175*E,Qa.o=.0193339*y+.119192*x+.9503041*E,Qa.F=Pr.F,y=uv(Qa.j/lg[0]),x=uv(Qa.u/lg[1]),E=uv(Qa.o/lg[2]),Hh.j=116*x-16,Hh.u=500*(y-x),Hh.o=200*(x-E),Hh.F=Qa.F,Hh.j=Math.min(100,Math.max(0,Hh.j+100*a)),a=(Hh.j+16)/116,y=a-Hh.o/200,Qa.j=lg[0]*eS(Hh.u/500+a),Qa.u=lg[1]*(Hh.j>pm*dv?Math.pow(a,3):Hh.j/pm),Qa.o=lg[2]*eS(y),Qa.F=Hh.F,a=-.969266*Qa.j+1.8760108*Qa.u+.041556*Qa.o,y=.0556434*Qa.j+-.2040259*Qa.u+1.0572252*Qa.o,Pr.j=255*lv((3.2404542*Qa.j+-1.5371385*Qa.u+-.4985314*Qa.o)/100),Pr.u=255*lv(a/100),Pr.o=255*lv(y/100),Pr.F=Qa.F,Pr.j=Math.round(Pr.j),255<Pr.j?Pr.j=255:0>Pr.j&&(Pr.j=0),Pr.u=Math.round(Pr.u),255<Pr.u?Pr.u=255:0>Pr.u&&(Pr.u=0),Pr.o=Math.round(Pr.o),255<Pr.o?Pr.o=255:0>Pr.o&&(Pr.o=0),"rgba("+Pr.j+", "+Pr.u+", "+Pr.o+", "+Pr.F+")";case nS:return sv(),Jl.o=Math.min(100,Math.max(0,Jl.o+100*a)),"hsla("+Jl.j+", "+Jl.u+"%, "+Jl.o+"%, "+Jl.F+")";default:oe("Unknown color space: "+y)}}function ad(a){ug||(hv(),ug=!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,Pr.j=a[0],Pr.u=a[1],Pr.o=a[2],Pr.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Pr.j=0,Pr.u=0,Pr.o=0,Pr.F=1)}}function sv(){var a=Pr.j/255,y=Pr.u/255,x=Pr.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}Jl.j=Math.round(tt),Jl.u=Math.round(100*a),Jl.o=Math.round(100*b),Jl.F=Pr.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):(pm*a+16)/116}function eS(a){var y=a*a*a;return y>dv?y:(116*a-16)/pm}function Pf(a,y){typeof a!="string"&&(a instanceof tr||oe("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=os?new Mu(null,void 0,{willReadFrequently:!0}).context:null}Gt.Object.defineProperties(tr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&qe(this,a),this.na=a,this.start.Mc()&&(a===ld?this.start=ba:a===hu&&(this.start=po)),this.end.Mc()&&(a===ld?this.end=Da:a===hu&&(this.end=po)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&qe(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&qe(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&qe(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&qe(this,a),0>a&&bn(a,">= zero",tr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&qe(this,a),0>a&&bn(a,">= zero",tr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&qe(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&qe(this,a),this.cr=a,this.xe=null}}}),tr.prototype.isDark=tr.prototype.Gx,tr.prototype.darkenBy=tr.prototype.Wy,tr.prototype.lightenBy=tr.prototype.Vz,tr.prototype.addColorStop=tr.prototype.addColorStop;var dv=216/24389,pm=24389/27,lg=[95.047,100,108.883],cv=null,Pr=new up,Jl=new up,Qa=new up,Hh=new up,ug=!1;tr.className="Brush";var bd;tr.Solid=bd=new Ue(tr,"Solid",0);var ld;tr.Linear=ld=new Ue(tr,"Linear",1);var hu;tr.Radial=hu=new Ue(tr,"Radial",2);var hg;tr.Pattern=hg=new Ue(tr,"Pattern",4);var dg;tr.Lab=dg=new Ue(tr,"Lab",5);var nS;tr.HSL=nS=new Ue(tr,"HSL",6),tr.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},tr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;ug||(hv(),ug=!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)},tr.lighten=function(a){return $y(a)},tr.lightenBy=$y,tr.darken=function(a){return tS(a)},tr.darkenBy=tS,tr.mix=rv,tr.isDark=sg;function Us(){this.xa="Base"}Us.prototype.measure=function(){},Us.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Us.prototype.arrange=function(){},Us.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Us.prototype.iA=function(a){a.Uj()},Us.prototype.gc=function(){},Gt.Object.defineProperties(Us.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Sn}}}),Us.prototype.remeasureObject=Us.prototype.iA,Us.prototype.arrangeElement=Us.prototype.Ly,Us.prototype.measureElement=Us.prototype.Yz,Us.className="PanelLayout";function mm(){this.xa="Base"}Le(mm,Us),mm.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length;a=ud(a);for(var rt=0;rt<ot;rt++){var at=E[rt];if(at.visible||at===a){var ut=at.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,at.measure(y,x,z,tt);var mt=at.measuredBounds;ft=Math.max(mt.width+ft,0),ut=Math.max(mt.height+ut,0),mt=at.position.x;var yt=at.position.y;isFinite(mt)||(mt=0),isFinite(yt)||(yt=0),at instanceof Yi&&at.isGeometryPositioned&&(at=at.strokeWidth/2,mt-=at,yt-=at),Hr(b,mt,yt,ft,ut)}}},mm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,ot=z.margin,rt=z.position.x,at=z.position.y;if(rt=isNaN(rt)?-a:rt-a,at=isNaN(at)?-x:at-x,z instanceof Yi&&z.isGeometryPositioned){var ut=z.strokeWidth/2;rt-=ut,at-=ut}z.visible&&z.arrange(rt+ot.left,at+ot.top,tt.width,tt.height)}};function vm(){this.xa="Base"}Le(vm,Us),vm.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length;y=Hn(),z=ud(a);for(var rt=0;rt<ot;rt++){var at=E[rt];if(at.visible||at===z){var ut=ul(at,!1);if(ut!==an&&ut!==li)y.push(at);else{at.measure(1/0,x,0,tt),ut=at.margin,at=at.measuredBounds;var ft=Math.max(at.height+ut.top+ut.bottom,0);b.width+=Math.max(at.width+ut.right+ut.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)rt=y[a],(rt.visible||rt===z)&&(ut=rt.margin,ot=ut.right+ut.left,ut=ut.top+ut.bottom,rt.measure(1/0,x,0,tt),rt=rt.measuredBounds,ut=Math.max(rt.height+ut,0),b.width+=Math.max(rt.width+ot,0),b.height=Math.max(b.height,ut));_n(y)},vm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,ot=tt?x.width:b.left,rt=0;rt<E;rt++){var at=z,ut=y[rt];if(ut.visible){var ft=ut.measuredBounds,mt=ut.margin,yt=mt.top+mt.bottom,Ct=z+b.bottom,kt=ft.height,Ht=ul(ut,!1);(isNaN(ut.desiredSize.height)&&Ht===yn||Ht===yi)&&(kt=Math.max(x.height-yt-Ct,0)),yt=kt+yt+Ct,Ct=ut.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=po),tt&&(ot-=ft.width+mt.left+mt.right),ut.arrange(ot+Ct.offsetX+mt.left,at+Ct.offsetY+mt.top+(x.height*Ct.y-yt*Ct.y),ft.width,kt),tt||(ot+=ft.width+mt.left+mt.right)}}};function ym(){this.xa="Base"}Le(ym,Us),ym.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=Hn();for(var ot=ud(a),rt=0;rt<tt;rt++){var at=E[rt];if(at.visible||at===ot){var ut=ul(at,!1);if(ut!==an&&ut!==yi)x.push(at);else{var ft=at.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,at.measure(y,1/0,z,0),at=at.measuredBounds,vs(b,Math.max(b.width,Math.max(at.width+ut,0)),b.height+Math.max(at.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)rt=x[a],(rt.visible||rt===ot)&&(at=rt.margin,tt=at.right+at.left,at=at.top+at.bottom,rt.measure(y,1/0,z,0),rt=rt.measuredBounds,at=Math.max(rt.height+at,0),b.width=Math.max(b.width,Math.max(rt.width+tt,0)),b.height+=at);_n(x)}},ym.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,ot=tt?x.height:b.top,rt=0;rt<E;rt++){var at=z,ut=y[rt];if(ut.visible){var ft=ut.measuredBounds,mt=ut.margin,yt=mt.left+mt.right,Ct=z+b.right,kt=ft.width,Ht=ul(ut,!1);(isNaN(ut.desiredSize.width)&&Ht===yn||Ht===li)&&(kt=Math.max(x.width-yt-Ct,0)),yt=kt+yt+Ct,Ct=ut.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=po),tt&&(ot-=ft.height+mt.bottom+mt.top),ut.arrange(at+Ct.offsetX+mt.left+(x.width*Ct.x-yt*Ct.x),ot+Ct.offsetY+mt.top,kt,ft.height),tt||(ot+=ft.height+mt.bottom+mt.top)}}};function Sm(){this.xa="Base"}Le(Sm,Us),Sm.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length,rt=a.Pb(),at=rt.margin,ut=at.right+at.left,ft=at.top+at.bottom;rt.measure(y,x,z,tt);var mt=rt.measuredBounds;z=mt.width,tt=mt.height;var yt=Math.max(z+ut,0),Ct=Math.max(tt+ft,0),kt=a.isClipping,Ht=Ze.allocAt(-at.left,-at.top,yt,Ct),Dt=Ze.allocAt(0,0,z,tt);fv(rt,Dt,!0),z=Dt.width,tt=Dt.height;for(var Xt=!0,$t=ud(a),ie=0;ie<ot;ie++){var fe=E[ie];mt=y;var Ae=x;if(fe!==rt&&(fe.visible||fe===$t)){at=fe.margin;var Bn=at.left,Kn=at.top;switch(yt=at.right+at.left,Ct=at.top+at.bottom,at=ul(fe,!1),at){case yn:mt=z,Ae=tt,Kn=Bn=Ct=yt=0;break;case li:mt=z,Bn=yt=0;break;case yi:Ae=tt,Kn=Ct=0}fe.measure(mt,Ae,0,0),mt=fe.measuredBounds,yt=Math.max(mt.width+yt,0),Ct=Math.max(mt.height+Ct,0),at=fe.alignment,at.Xb()&&(at=a.defaultAlignment),at.sb()||(at=po);var Gn=fe.alignmentFocus;if(Gn.Xb()&&(Gn=po),Ae=null,fe instanceof Sn&&fe.$e!==""&&(Ae=fe.fb(fe.$e),Ae===fe&&(Ae=null)),Bn=Dt.x-Bn,Kn=Dt.y-Kn,Ae!==null){for(fe.arrange(0,0,mt.width,mt.height),mt=Ae.actualBounds,mt=Rt.allocAt(mt.x+(Gn.x*mt.width-Gn.offsetX),mt.y+(Gn.y*mt.height-Gn.offsetY)),Ae=Ae.panel;Ae!==fe;)Ae.transform.Ga(mt),Ae=Ae.panel;Bn+=at.x*z+at.offsetX-mt.x,Kn+=at.y*tt+at.offsetY-mt.y,Rt.free(mt)}else Bn+=at.x*z+at.offsetX-(Gn.x*mt.width+Gn.offsetX),Kn+=at.y*tt+at.offsetY-(Gn.y*mt.height+Gn.offsetY);Xt?(Xt=!1,b.h(Bn,Kn,yt,Ct)):Hr(b,Bn,Kn,yt,Ct)}}switch(Xt?b.assign(Ht):kt?b.Uu(Dt.x,Dt.y,Dt.width,Dt.height):Hr(b,Ht.x,Ht.y,Ht.width,Ht.height),Ze.free(Ht),Ze.free(Dt),at=rt.stretch,at===ji&&(at=ul(rt,!1)),at){case an:return;case yn:if(!isFinite(y)&&!isFinite(x))return;break;case li:if(!isFinite(y))return;break;case yi:if(!isFinite(x))return}for(mt=rt.measuredBounds,z=mt.width,tt=mt.height,yt=Math.max(z+ut,0),Ct=Math.max(tt+ft,0),at=rt.margin,Dt=Ze.allocAt(-at.left,-at.top,yt,Ct),fv(rt,Dt,!0),z=Dt.width,tt=Dt.height,y=0;y<ot;y++)x=E[y],x===rt||!x.visible&&x!==$t||(at=x.margin,yt=at.right+at.left,Ct=at.top+at.bottom,mt=x.measuredBounds,yt=Math.max(mt.width+yt,0),Ct=Math.max(mt.height+Ct,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=po),x=x.alignmentFocus,x.Xb()&&(x=po),Xt?(Xt=!1,b.h(ut.x*z+ut.offsetX-(x.x*mt.width+x.offsetX)-at.left,ut.y*tt+ut.offsetY-(x.y*mt.height+x.offsetY)-at.top,yt,Ct)):Hr(b,ut.x*z+ut.offsetX-(x.x*mt.width+x.offsetX)-at.left,ut.y*tt+ut.offsetY-(x.y*mt.height+x.offsetY)-at.top,yt,Ct));Xt?b.assign(Ht):kt?b.Uu(Dt.x,Dt.y,Dt.width,Dt.height):Hr(b,Ht.x,Ht.y,Ht.width,Ht.height),Ze.free(Dt)},Sm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,ot=z.height,rt=a.padding;z=rt.left,rt=rt.top;var at=z-x.x,ut=rt-x.y;for(b.arrange(at,ut,tt,ot),tt=Ze.allocAt(0,0,tt,ot),fv(b,tt,!1),ot=0;ot<E;ot++){var ft=y[ot];if(ft!==b){at=ft.measuredBounds;var mt=at.width,yt=at.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=po);var Ct=ft.alignmentFocus;if(Ct.Xb()&&(Ct=po),at=null,ft instanceof Sn&&ft.$e!==""&&(at=ft.fb(ft.$e),at===ft&&(at=null)),at!==null){var kt=at.actualBounds;for(Ct=Rt.allocAt(kt.x+(Ct.x*kt.width-Ct.offsetX),kt.y+(Ct.y*kt.height-Ct.offsetY)),at=at.panel;at!==ft;)at.transform.Ga(Ct),at=at.panel;at=ut.x*tt.width+ut.offsetX-Ct.x,ut=ut.y*tt.height+ut.offsetY-Ct.y,Rt.free(Ct)}else at=ut.x*tt.width+ut.offsetX-(Ct.x*mt+Ct.offsetX),ut=ut.y*tt.height+ut.offsetY-(Ct.y*yt+Ct.offsetY);at+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+at,rt+ut,mt,yt)}}Ze.free(tt)};function fv(a,y,x){var E=null;if(a instanceof Sn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function xm(){this.xa="Base"}Le(xm,Us),xm.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length,rt=a.Pb(),at=rt.margin,ut=y,ft=x,mt=at.right+at.left,yt=at.top+at.bottom;rt.measure(y,x,z,tt),at=rt.measuredBounds;var Ct=0,kt=null;rt instanceof Yi&&(kt=rt,Ct=kt.strokeWidth*kt.scale);var Ht=Math.max(at.width+mt,0);at=Math.max(at.height+yt,0);var Dt=vv(rt),Xt=Dt.x*Ht+Dt.offsetX;Dt=Dt.y*at+Dt.offsetY;var $t=yv(rt),ie=$t.x*Ht+$t.offsetX;for($t=$t.y*at+$t.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(Xt-ie)-Ct,0)),isFinite(x)&&(ft=Math.max(Math.abs(Dt-$t)-Ct,0)),Ct=kn.alloc(),Ct.h(0,0),a=ud(a),$t=0;$t<ot;$t++)Dt=E[$t],Dt===rt||!Dt.visible&&Dt!==a||(at=Dt.margin,Ht=at.right+at.left,Xt=at.top+at.bottom,Dt.measure(ut,ft,0,0),at=Dt.measuredBounds,Ht=Math.max(at.width+Ht,0),at=Math.max(at.height+Xt,0),Ct.h(Math.max(Ht,Ct.width),Math.max(at,Ct.height)));if(ot===1)b.width=Ht,b.height=at,kn.free(Ct);else{switch(Dt=vv(rt),$t=yv(rt),ot=E=0,$t.x!==Dt.x&&$t.y!==Dt.y&&(E=Ct.width/Math.abs($t.x-Dt.x),ot=Ct.height/Math.abs($t.y-Dt.y)),kn.free(Ct),Ct=0,kt!==null&&(Ct=kt.strokeWidth*kt.scale,Mv(kt)===Qn&&(E=ot=Math.max(E,ot))),E+=Math.abs(Dt.offsetX)+Math.abs($t.offsetX)+Ct,ot+=Math.abs(Dt.offsetY)+Math.abs($t.offsetY)+Ct,kt=rt.stretch,kt===ji&&(kt=ul(rt,!1)),kt){case an:tt=z=0;break;case yn:isFinite(y)&&(E=y),isFinite(x)&&(ot=x);break;case li:isFinite(y)&&(E=y),tt=0;break;case yi:z=0,isFinite(x)&&(ot=x)}rt.Uj(),rt.measure(E,ot,z,tt),b.width=rt.measuredBounds.width+mt,b.height=rt.measuredBounds.height+yt}},xm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Ze.alloc();z.h(0,0,1,1);var tt=E.margin,ot=tt.left;tt=tt.top;var rt=a.padding,at=rt.left;rt=rt.top,E.arrange(at+ot,rt+tt,b.width,b.height);var ut=vv(E),ft=yv(E),mt=ut.y*b.height+ut.offsetY,yt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=mt,Hr(z,yt,ft,0,0),z.x+=ot+at,z.y+=tt+rt,b=0;b<x;b++)ot=y[b],ot!==E&&(at=ot.measuredBounds,tt=ot.margin,rt=Math.max(at.width+tt.right+tt.left,0),ut=Math.max(at.height+tt.top+tt.bottom,0),mt=ot.alignment,mt.Xb()&&(mt=a.defaultAlignment),mt.sb()||(mt=po),rt=z.width*mt.x+mt.offsetX-rt*mt.x+tt.left+z.x,tt=z.height*mt.y+mt.offsetY-ut*mt.y+tt.top+z.y,ot.visible&&(As(z.x,z.y,z.width,z.height,rt,tt,at.width,at.height)?ot.arrange(rt,tt,at.width,at.height):ot.arrange(rt,tt,at.width,at.height,new Ze(z.x,z.y,z.width,z.height))));Ze.free(z)};function wm(){this.xa="Base",this.name="Table"}Le(wm,Us),wm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=Hn(),ot=Hn(),rt=0;rt<z;rt++){var at=E[rt],ut=at instanceof Sn?at:null;if(ut!==null&&kd(ut)&&at.visible){ot.push(ut);for(var ft=ut.O.s,mt=ft.length,yt=0;yt<mt;yt++){var Ct=ft[yt];ut.type===Sn.TableRow?Ct.row=at.row:ut.type===Sn.TableColumn&&(Ct.column=at.column),tt.push(Ct)}}else tt.push(at)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var kt=[],Ht=0;Ht<z;Ht++){var Dt=tt[Ht];Dt.visible&&(zs(Dt,!0),jh(Dt,!0),kt[Dt.row]||(kt[Dt.row]=[]),kt[Dt.row][Dt.column]||(kt[Dt.row][Dt.column]=[]),kt[Dt.row][Dt.column].push(Dt))}_n(tt);var Xt=Hn(),$t=Hn(),ie=Hn(),fe={count:0},Ae={count:0},Bn=y,Kn=x,Gn=a.rowDefs,Pn=a.colDefs,on=null;z=Gn.length;for(var Bi=0;Bi<z;Bi++)on=Gn[Bi],on!==void 0&&(on.actual=0);z=Pn.length;for(var Ei=0;Ei<z;Ei++)on=Pn[Ei],on!==void 0&&(on.actual=0);for(var Go=kt.length,gr=0,qs=0;qs<Go;qs++)kt[qs]&&(gr=Math.max(gr,kt[qs].length));var na=Math.min(a.topIndex,Go-1),Ha=Math.min(a.leftIndex,gr-1),$s=0;Go=kt.length;for(var jd=ud(a),bs=0;bs<Go;bs++)if(kt[bs]){gr=kt[bs].length;var ah=a.Fb(bs);ah.actual=0;for(var Ga=ah.oc=0;Ga<gr;Ga++)if(kt[bs][Ga]){var zd=a.Eb(Ga);Xt[Ga]===void 0&&(zd.actual=0,zd.oc=0,Xt[Ga]=!0);for(var $l=kt[bs][Ga],ku=$l.length,Dl=0;Dl<ku;Dl++){var Ml=$l[Dl];if(Ml.visible||Ml===jd){var mc=1<Ml.rowSpan||1<Ml.columnSpan;mc&&(bs<na||Ga<Ha||$t.push(Ml));var lh=Ml.margin,Ig=lh.right+lh.left,Ol=lh.top+lh.bottom,Wa=nh(Ml,ah,zd,!1),Jp=Ml.desiredSize,If=!isNaN(Jp.height),Mh=!isNaN(Jp.width)&&If;if(mc||Wa===an||Mh||bs<na||Ga<Ha||(fe[Ga]!==void 0||Wa!==yn&&Wa!==li||(fe[Ga]=-1,fe.count++),Ae[bs]!==void 0||Wa!==yn&&Wa!==yi||(Ae[bs]=-1,Ae.count++),ie.push(Ml)),Ml.measure(1/0,1/0,0,0),!(bs<na||Ga<Ha)){var El=Ml.measuredBounds,qc=Math.max(El.width+Ig,0),Rl=Math.max(El.height+Ol,0);if(Ml.rowSpan===1&&(Wa===an||Wa===li)){on=a.Fb(bs);var vc=on.Wc();$s=Math.max(Rl-on.actual,0),$s+vc>Kn&&($s=Math.max(Kn-vc,0));var Z0=on.oa===0;on.oc=on.oc+$s,on.actual=on.oa+$s,Kn=Math.max(Kn-($s+(Z0?vc:0)),0)}if(Ml.columnSpan===1&&(Wa===an||Wa===yi)){on=a.Eb(Ga);var _p=on.Wc();$s=Math.max(qc-on.actual,0),$s+_p>Bn&&($s=Math.max(Bn-_p,0));var Hy=on.oa===0;on.oc=on.oc+$s,on.actual=on.oa+$s,Bn=Math.max(Bn-($s+(Hy?_p:0)),0)}mc&&Ml.Uj()}}}}}_n(Xt);var Qh=0,cd=0;z=a.columnCount;for(var Df=0;Df<z;Df++){var yc=Pn[Df];yc!==void 0&&(Qh+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Qh+=yc.Wc()))}z=a.rowCount;for(var Dg=0;Dg<z;Dg++){var Sc=Gn[Dg];Sc!==void 0&&(cd+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(cd+=Sc.Wc()))}Bn=Math.max(y-Qh,0);var Jh=Kn=Math.max(x-cd,0),Hd=Bn;z=ie.length;for(var Ll=0;Ll<z;Ll++){var Eh=ie[Ll],U0=a.Fb(Eh.row),fd=a.Eb(Eh.column),Og=Eh.measuredBounds,uh=Eh.margin,$c=uh.right+uh.left,Lh=uh.top+uh.bottom;fe[Eh.column]=fd.oc===0&&fe[Eh.column]!==void 0?Math.max(Og.width+$c,fe[Eh.column]):null,Ae[Eh.row]=U0.oc===0&&Ae[Eh.row]!==void 0?Math.max(Og.height+Lh,Ae[Eh.row]):null}var Of=0,Rg=0,Yu;for(Yu in Ae)Yu!=="count"&&(Of+=Ae[Yu]);for(Yu in fe)Yu!=="count"&&(Rg+=fe[Yu]);for(var fa=kn.alloc(),qp=0;qp<z;qp++){var nl=ie[qp];if(nl.visible||nl===jd){var ks=a.Fb(nl.row),il=a.Eb(nl.column),gd=0;isFinite(il.width)?gd=il.width:(isFinite(Bn)&&fe[nl.column]!==null?Rg===0?gd=il.actual+Bn:gd=fe[nl.column]/Rg*Hd:fe[nl.column]!==null?gd=Bn:gd=il.actual||Bn,gd=Math.max(0,gd-il.Wc()));var Gd=0;switch(isFinite(ks.height)?Gd=ks.height:(isFinite(Kn)&&Ae[nl.row]!==null?Of===0?Gd=ks.actual+Kn:Gd=Ae[nl.row]/Of*Jh:Ae[nl.row]!==null?Gd=Kn:Gd=ks.actual||Kn,Gd=Math.max(0,Gd-ks.Wc())),fa.h(Math.max(il.minimum,Math.min(gd,il.maximum)),Math.max(ks.minimum,Math.min(Gd,ks.maximum))),Wa=nh(nl,ks,il,!1),Wa){case li:fa.height=Math.max(fa.height,ks.actual+Kn);break;case yi:fa.width=Math.max(fa.width,il.actual+Bn)}var tf=nl.margin,Gy=tf.right+tf.left,V0=tf.top+tf.bottom;nl.Uj(),nl.measure(fa.width,fa.height,il.minimum,ks.minimum);var jg=nl.measuredBounds,ef=Math.max(jg.width+Gy,0),Rf=Math.max(jg.height+V0,0);isFinite(Bn)&&(ef=Math.min(ef,fa.width)),isFinite(Kn)&&(Rf=Math.min(Rf,fa.height));var bl=0;bl=ks.actual,ks.actual=Math.max(ks.actual,Rf),ks.oc=Math.max(ks.oc,Rf),$s=ks.actual-bl,Kn=Math.max(Kn-$s,0),Ae[nl.row]===null&&(Jh=Math.max(Jh-$s,0)),bl=il.actual,il.actual=Math.max(il.actual,ef),il.oc=Math.max(il.oc,ef),$s=il.actual-bl,Bn=Math.max(Bn-$s,0),fe[nl.column]===null&&(Hd=Math.max(Hd-$s,0))}}_n(ie);var pd=kn.alloc(),hh=Hn(),pu=Hn();if(z=$t.length,z!==0){for(var xc=0;xc<Go;xc++)if(kt[xc]){gr=kt[xc].length;var zg=a.Fb(xc);hh[xc]=zg.actual;for(var wc=0;wc<gr;wc++)if(kt[xc][wc]){var Y0=a.Eb(wc);pu[wc]=Y0.actual}}}for(var Hg=0;Hg<z;Hg++){var ds=$t[Hg];if(ds.visible||ds===jd){var Xu=a.Fb(ds.row),Au=a.Eb(ds.column);switch(fa.h(Math.max(Au.minimum,Math.min(y,Au.maximum)),Math.max(Xu.minimum,Math.min(x,Xu.maximum))),Wa=nh(ds,Xu,Au,!1),Wa){case yn:pu[Au.index]!==0&&(fa.width=Math.min(fa.width,pu[Au.index])),hh[Xu.index]!==0&&(fa.height=Math.min(fa.height,hh[Xu.index]));break;case li:pu[Au.index]!==0&&(fa.width=Math.min(fa.width,pu[Au.index]));break;case yi:hh[Xu.index]!==0&&(fa.height=Math.min(fa.height,hh[Xu.index]))}isFinite(Au.width)&&(fa.width=Au.width),isFinite(Xu.height)&&(fa.height=Xu.height),pd.h(0,0);for(var X0=Au.minimum,jl=Xu.minimum,Wd=1;Wd<ds.rowSpan&&!(ds.row+Wd>=a.rowCount);Wd++)on=a.Fb(ds.row+Wd),$s=0,$s=Wa===yn||Wa===yi?Math.max(on.minimum,hh[ds.row+Wd]===0?on.maximum:Math.min(hh[ds.row+Wd],on.maximum)):Math.max(on.minimum,isNaN(on.Hc)?on.maximum:Math.min(on.Hc,on.maximum)),pd.height+=$s,jl+=on.minimum;for(var Nu=1;Nu<ds.columnSpan&&!(ds.column+Nu>=a.columnCount);Nu++)on=a.Eb(ds.column+Nu),$s=0,$s=Wa===yn||Wa===li?Math.max(on.minimum,pu[ds.column+Nu]===0?on.maximum:Math.min(pu[ds.column+Nu],on.maximum)):Math.max(on.minimum,isNaN(on.Hc)?on.maximum:Math.min(on.Hc,on.maximum)),pd.width+=$s,X0+=on.minimum;fa.width+=pd.width,fa.height+=pd.height;var Gg=ds.margin,Pc=Gg.right+Gg.left,$p=Gg.top+Gg.bottom;ds.measure(fa.width,fa.height,X0,jl);for(var Wg=ds.measuredBounds,bh=Math.max(Wg.width+Pc,0),nf=Math.max(Wg.height+$p,0),Cc=0,Kg=0;Kg<ds.rowSpan&&!(ds.row+Kg>=a.rowCount);Kg++)on=a.Fb(ds.row+Kg),Cc+=on.total||0;if(Cc<nf){var Kd=nf-Cc,_h=nf-Cc;if(ds.spanAllocation!==null)for(var Zd=ds.spanAllocation,md=0;md<ds.rowSpan&&!(0>=Kd)&&!(ds.row+md>=a.rowCount);md++){on=a.Fb(ds.row+md);var Ud=on.oa||0,of=Zd(ds,on,_h);on.actual=Math.min(on.maximum,Ud+of),on.oa!==Ud&&(Kd-=on.oa-Ud)}for(;0<Kd;){var dh=on.oa||0;if(isNaN(on.height)&&on.maximum>dh&&(on.actual=Math.min(on.maximum,dh+Kd),on.oa!==dh&&(Kd-=on.oa-dh)),on.index===0)break;on=a.Fb(on.index-1)}}for(var jf=0,Vd=0;Vd<ds.columnSpan&&!(ds.column+Vd>=a.columnCount);Vd++)on=a.Eb(ds.column+Vd),jf+=on.total||0;if(jf<bh){var zf=bh-jf,Wy=bh-jf;if(ds.spanAllocation!==null)for(var vd=ds.spanAllocation,rf=0;rf<ds.columnSpan&&!(0>=zf)&&!(ds.column+rf>=a.columnCount);rf++){on=a.Eb(ds.column+rf);var tm=on.oa||0,Ky=vd(ds,on,Wy);on.actual=Math.min(on.maximum,tm+Ky),on.oa!==tm&&(zf-=on.oa-tm)}for(;0<zf;){var Q0=on.oa||0;if(isNaN(on.width)&&on.maximum>Q0&&(on.actual=Math.min(on.maximum,Q0+zf),on.oa!==Q0&&(zf-=on.oa-Q0)),on.index===0)break;on=a.Eb(on.index-1)}}}}_n($t),kn.free(pd),kn.free(fa),hh!==void 0&&_n(hh),pu!==void 0&&_n(pu);var Hf=0,Gf=0,J0=a.desiredSize,g1=a.maxSize;Wa=ul(a,!0);var em=cd=Qh=0,nm=0;z=a.columnCount;for(var _0=0;_0<z;_0++)Pn[_0]!==void 0&&(on=a.Eb(_0),isFinite(on.width)?(em+=on.width,em+=on.Wc()):Tm(on)===fp?(em+=on.oa,em+=on.Wc()):on.oa!==0&&(Qh+=on.oa,Qh+=on.Wc()));isFinite(J0.width)?Hf=Math.min(J0.width,g1.width):Hf=Wa!==an&&isFinite(y)?y:Qh,Hf=Math.max(Hf,a.minSize.width),Hf=Math.max(Hf-em,0);for(var _1=Qh===0?1:Math.max(Hf/Qh,1),q0=0;q0<z;q0++)Pn[q0]!==void 0&&(on=a.Eb(q0),isFinite(on.width)||Tm(on)===fp||(on.actual=on.oa*_1),on.position=b.width,on.oa!==0&&(b.width+=on.oa,b.width+=on.Wc()));z=a.rowCount;for(var $0=0;$0<z;$0++)Gn[$0]!==void 0&&(on=a.Fb($0),isFinite(on.height)?(nm+=on.height,nm+=on.Wc()):Tm(on)===fp?(nm+=on.oa,nm+=on.Wc()):on.oa!==0&&(cd+=on.oa,cd+=on.Wc()));isFinite(J0.height)?Gf=Math.min(J0.height,g1.height):Gf=Wa!==an&&isFinite(x)?x:cd,Gf=Math.max(Gf,a.minSize.height),Gf=Math.max(Gf-nm,0);for(var q1=cd===0?1:Math.max(Gf/cd,1),tv=0;tv<z;tv++)Gn[tv]!==void 0&&(on=a.Fb(tv),isFinite(on.height)||Tm(on)===fp||(on.actual=on.oa*q1),on.position=b.height,on.oa!==0&&(b.height+=on.oa,b.height+=on.Wc()));z=ot.length;for(var Zy=0;Zy<z;Zy++){var im=ot[Zy],Uy=0,Vy=0;im.type===Sn.TableRow?(Uy=b.width,on=a.Fb(im.row),Vy=on.actual):(on=a.Eb(im.column),Uy=on.actual,Vy=b.height),im.measuredBounds.h(0,0,Uy,Vy),zs(im,!1)}_n(ot),a.inRowsCols=kt},wm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var ot,rt,at=tt.length,ut=0,ft=0;ft<at;ft++)tt[ft]&&(ut=Math.max(ut,tt[ft].length));rt=a.rowDefs,ot=a.colDefs;var mt=ft=0,yt=Math.min(a.topIndex,at-1);if(0<rt.length){for(;yt!==at&&(rt[yt]===void 0||rt[yt].oa===0);)yt++;yt=Math.max(Math.min(yt,at-1),0),ft=-rt[yt].position}var Ct=Math.min(a.leftIndex,ut-1);if(0<ot.length){for(;Ct!==ut&&(ot[Ct]===void 0||ot[Ct].oa===0);)Ct++;Ct=Math.max(Math.min(Ct,ut-1),0),mt=-ot[Ct].position}for(var kt=0,Ht=0;kt!==at&&rt[kt]===void 0;)kt++;for(;Ht!==at&&ot[Ht]===void 0;)Ht++;ut=a.part,a.Fb(kt),a.Eb(Ht);for(var Dt=0;Dt<y.length;Dt++){var Xt=y[Dt];if(Xt instanceof Sn&&Xt.visible&&kd(Xt)){if(Xt.type===Sn.TableRow){ot=a.Fb(Xt.row);var $t=a.Eb(Ht)}else ot=a.Fb(kt),$t=a.Eb(Xt.column);rt=ot.position+ft+b,ot.oa!==0&&(rt+=ot.Io(Math.max(kt,yt))),ot=$t.position+mt+z,$t.oa!==0&&(ot+=$t.Io(Math.max(Ht,Ct))),$t=Xt.measuredBounds,Xt.Uk(),Xt.actualBounds.ka();var ie=Xt.actualBounds,fe=Ze.allocAt(ie.x,ie.y,ie.width,ie.height);ie.x=Xt.type===Sn.TableRow?z:ot,ie.y=Xt.type===Sn.TableColumn?b:rt,ie.width=$t.width,ie.height=$t.height,Xt.actualBounds.freeze(),jh(Xt,!1),gl(fe,ie)||ut===null||(ut.oh(),Xt.Pn(ut)),Ze.free(fe)}}for(Dt=kn.alloc(),Xt=0;Xt<at;Xt++)if(tt[Xt]){for(ut=tt[Xt].length,$t=a.Fb(Xt),rt=$t.position+ft+b,$t.oa!==0&&(rt+=$t.Io(Math.max(kt,yt))),ie=0;ie<ut;ie++)if(tt[Xt][ie]){fe=a.Eb(ie),ot=fe.position+mt+z,fe.oa!==0&&(ot+=fe.Io(Math.max(Ht,Ct)));for(var Ae=tt[Xt][ie],Bn=Ae.length,Kn=0;Kn<Bn;Kn++){var Gn=Ae[Kn],Pn=Gn.measuredBounds;Dt.h(0,0);for(var on=1;on<Gn.rowSpan&&!(Xt+on>=a.rowCount);on++){var Bi=a.Fb(Xt+on);Bi.oa!==0&&(Dt.height+=Bi.total)}for(on=1;on<Gn.columnSpan&&!(ie+on>=a.columnCount);on++)Bi=a.Eb(ie+on),Bi.oa!==0&&(Dt.width+=Bi.total);var Ei=fe.oa+Dt.width,Go=$t.oa+Dt.height;on=ot,Bi=rt;var gr=Ei,qs=Go,na=ot,Ha=rt,$s=Ei,jd=Go;ot+Ei>x.width&&($s=Math.max(x.width-ot,0)),rt+Go>x.height&&(jd=Math.max(x.height-rt,0));var bs=Gn.alignment;if(bs.Xb()){bs=a.defaultAlignment,bs.sb()||(bs=po);var ah=bs.x,Ga=bs.y,zd=bs.offsetX;bs=bs.offsetY;var $l=fe.alignment,ku=$t.alignment;$l.sb()&&(ah=$l.x,zd=$l.offsetX),ku.sb()&&(Ga=ku.y,bs=ku.offsetY)}else ah=bs.x,Ga=bs.y,zd=bs.offsetX,bs=bs.offsetY;(isNaN(ah)||isNaN(Ga))&&(Ga=ah=.5,bs=zd=0),$l=Pn.width,ku=Pn.height;var Dl=Gn.margin,Ml=Dl.left+Dl.right,mc=Dl.top+Dl.bottom,lh=nh(Gn,$t,fe,!1);!isNaN(Gn.desiredSize.width)||lh!==yn&&lh!==li||($l=Math.max(Ei-Ml,0)),!isNaN(Gn.desiredSize.height)||lh!==yn&&lh!==yi||(ku=Math.max(Go-mc,0)),Ei=Gn.maxSize,Go=Gn.minSize,$l=Math.min(Ei.width,$l),ku=Math.min(Ei.height,ku),$l=Math.max(Go.width,$l),ku=Math.max(Go.height,ku),Ei=ku+mc,on+=gr*ah-($l+Ml)*ah+zd+Dl.left,Bi+=qs*Ga-Ei*Ga+bs+Dl.top,Gn.visible&&(As(na,Ha,$s,jd,on,Bi,Pn.width,Pn.height)?Gn.arrange(on,Bi,$l,ku):Gn.arrange(on,Bi,$l,ku,new Ze(na,Ha,$s,jd)))}}}for(kn.free(Dt),a=0;a<E;a++)x=y[a],z=x instanceof Sn?x:null,z!==null&&kd(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Pm(){this.xa="Base"}Le(Pm,Us),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Le(Cm,Us),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Mm(){this.xa="Base"}Le(Mm,Us),Mm.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&oe("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var ot=E.measuredBounds,rt=E.margin,at=rt.right+rt.left;if(rt=rt.top+rt.bottom,isFinite(y)||isFinite(x)){var ut=E.scale,ft=ot.width;ot=ot.height;var mt=Math.max(y-at,0),yt=Math.max(x-rt,0),Ct=1;a.viewboxStretch===Qn?ft!==0&&ot!==0&&(Ct=Math.min(mt/ft,yt/ot)):ft!==0&&ot!==0&&(Ct=Math.max(mt/ft,yt/ot)),Ct===0&&(Ct=1e-4),E.Ca*=Ct,ut!==E.scale&&(zs(E,!0),E.measure(1/0,1/0,z,tt))}ot=E.measuredBounds,b.width=isFinite(y)?y:Math.max(ot.width+at,0),b.height=isFinite(x)?x:Math.max(ot.height+rt,0)},Mm.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=po),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function hp(){this.xa="Base"}Le(hp,Us),hp.prototype.measure=function(){},hp.prototype.arrange=function(){},hp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,ot=z.width,rt=z.height,at=Math.ceil(ot/b),ut=Math.ceil(rt/E),ft=a.gridOrigin,mt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,ot,rt),y.clip(),y.Se();for(var yt=[],Ct=a.O.s,kt=Ct.length,Ht=0;Ht<kt;Ht++){var Dt=Ct[Ht],Xt=[];if(yt.push(Xt),Dt.visible){var $t=Dt.interval;if(!(0>$t)){Dt=pv(Dt.figure);for(var ie=0;ie<kt;ie++)if(ie!==Ht){var fe=Ct[ie];fe.visible&&pv(fe.figure)===Dt&&(fe=fe.interval,fe>$t&&Xt.push(fe))}}}}for(Ct=a.O.s,kt=Ct.length,Ht=0;Ht<kt;Ht++){var Ae=Ct[Ht];if(Ae.visible&&(Xt=Ae.interval||1,Dt=Math.abs(Xt),!(2>b*Dt*x))){if($t=Ae.segmentIndex,(!isFinite($t)||isNaN($t))&&($t=0),0>$t&&($t=Dt-Math.min(-$t,Dt)),$t=Math.round($t%Dt),Dt=Ae.opacity,ie=1,Dt!==1){if(Dt===0)continue;ie=y.globalAlpha,y.globalAlpha=ie*Dt}fe=yt[Ht];var Bn=!1,Kn=Ae.strokeDashArray;if(Kn!==null&&(Bn=!0,y.js(Kn,Ae.strokeDashOffset)),Ae.figure==="LineV"&&Ae.stroke!==null&&0<Ae.strokeWidth){for(y.lineWidth=Ae.strokeWidth,as(a,y,Ae.stroke,!1,!1,z,tt),y.beginPath(),Kn=Ae=Math.floor((mt-b)/b);Kn<=Ae+at;Kn++){var Gn=Kn*b+mt;0<=Gn&&Gn<=ot&&Em(Kn,Xt,$t,fe)&&(y.moveTo(Gn,0),y.lineTo(Gn,rt))}y.stroke(),y.Se()}else if(Ae.figure==="LineH"&&Ae.stroke!==null&&0<Ae.strokeWidth){for(y.lineWidth=Ae.strokeWidth,as(a,y,Ae.stroke,!1,!1,z,tt),y.beginPath(),Kn=Ae=Math.floor((ft-E)/E);Kn<=Ae+ut;Kn++)Gn=Kn*E+ft,0<=Gn&&Gn<=rt&&Em(Kn,Xt,$t,fe)&&(y.moveTo(0,Gn),y.lineTo(ot,Gn));y.stroke(),y.Se()}else if(Ae.figure==="BarV"&&Ae.fill!==null)for(as(a,y,Ae.fill,!0,!1,z,tt),Ae=Ae.width,isNaN(Ae)&&(Ae=b),Gn=Kn=Math.floor((mt-b)/b);Gn<=Kn+at;Gn++){var Pn=Gn*b+mt;0<=Pn+Ae&&Pn<=ot&&Em(Gn,Xt,$t,fe)&&y.fillRect(Pn,0,Ae,rt)}else if(Ae.figure==="BarH"&&Ae.fill!==null)for(as(a,y,Ae.fill,!0,!1,z,tt),Ae=Ae.height,isNaN(Ae)&&(Ae=E),Gn=Kn=Math.floor((ft-E)/E);Gn<=Kn+ut;Gn++)Pn=Gn*E+ft,0<=Pn+Ae&&Pn<=rt&&Em(Gn,Xt,$t,fe)&&y.fillRect(0,Pn,ot,Ae);Bn&&y.fs(),Dt!==1&&(y.globalAlpha=ie)}}y.restore(),y.Vc(!1)};function Em(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Lm(){this.xa="Base"}Le(Lm,Us),Lm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Fo||a instanceof Cn){var tt=null,ot=null;if(a instanceof Cn&&(tt=a),a instanceof Fo&&(ot=a,tt=ot.adornedPart,a.j===null&&(a.j=[])),tt instanceof Cn){var rt=tt;if(z===0)vs(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var at=a instanceof Fo?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=rt.points,ft=tt.pointsCount;ot!==null?ot.Ul(!1):tt!==null&&tt.Ul(!1),ot=y.width;var mt=y.height,yt=a.j;if(yt.length=0,at!==null){iS(a,ot,mt,at);var Ct=at.measuredBounds;x.ed(Ct),yt.push(Ct)}Ct=Gi.alloc();for(var kt=Rt.alloc(),Ht=Rt.alloc(),Dt=0;Dt<z;Dt++){var Xt=E[Dt];if(Xt!==at)if(Xt.isPanelMain&&Xt instanceof Yi){iS(a,ot,mt,Xt);var $t=Xt.measuredBounds;x.ed($t),yt.push($t)}else if(2>ft)Xt.measure(1/0,1/0,0,0),$t=Xt.measuredBounds,x.ed($t),yt.push($t);else{var ie=Xt.segmentIndex,fe=Xt.segmentFraction,Ae=Xt.alignmentFocus;Ae.Mc()&&(Ae=po);var Bn=Xt.segmentOrientation,Kn=Xt.segmentOffset;if(isNaN(ie)){var Gn=rt.ua;$t=Hn(),Gn.Qu(fe,$t);var Pn=Rt.allocAt($t[0],$t[1]);if(Pn.add(rt.i(0)),Gn.type===En.j?Pn.offset(-Gn.startX,-Gn.startY):(Gn=Gn.figures.first(),Gn!==null&&Pn.offset(-Gn.startX,-Gn.startY)),Gn=$t[2],Bn!==_a){var on=rt.computeAngle(Xt,Bn,Gn);Xt.Kb=on}on=Pn.x-y.x;var Bi=Pn.y-y.y;Rt.free(Pn),_n($t)}else if(ie<-ft||ie>=ft)$t=Rt.alloc(),rt.vg(),rt.computeMidPoint($t),Gn=rt.midAngle,Bn!==_a&&(on=rt.computeAngle(Xt,Bn,Gn),Xt.Kb=on),on=$t.x-y.x,Bi=$t.y-y.y,Rt.free($t);else{if(on=0,0<=ie?(Bi=ut.M(ie),$t=ie<ft-1?ut.M(ie+1):Bi):(on=ft+ie,Bi=ut.M(on),$t=0<on?ut.M(on-1):Bi),Bi.Xa($t)){0<=ie?(Gn=0<ie?ut.M(ie-1):Bi,on=ie<ft-2?ut.M(ie+2):$t):(Gn=on<ft-1?ut.M(on+1):Bi,on=1<on?ut.M(on-2):$t),Pn=Gn.Bf(Bi);var Ei=$t.Bf(on);Gn=Pn>Ei+10?0<=ie?Gn.ab(Bi):Bi.ab(Gn):Ei>Pn+10?0<=ie?$t.ab(on):on.ab($t):0<=ie?Gn.ab(on):on.ab(Gn)}else Gn=0<=ie?Bi.ab($t):$t.ab(Bi);Bn!==_a&&(on=rt.computeAngle(Xt,Bn,Gn),Xt.Kb=on),on=Bi.x+($t.x-Bi.x)*fe-y.x,Bi=Bi.y+($t.y-Bi.y)*fe-y.y}Xt.measure(1/0,1/0,0,0),$t=Xt.measuredBounds,Pn=Xt.naturalBounds;var Go=0;Xt instanceof Yi&&(Go=Xt.strokeWidth),Ei=Pn.width+Go;var gr=Pn.height+Go;Ct.reset(),Ct.translate(-$t.x,-$t.y),Ct.scale(Xt.scale,Xt.scale),Ct.rotate(Bn===_a?Xt.angle:Gn,Ei/2,gr/2),Bn!==Cp&&Bn!==Ep||Ct.rotate(90,Ei/2,gr/2),Bn!==Mp&&Bn!==Lp||Ct.rotate(-90,Ei/2,gr/2),Bn===n0&&(45<Gn&&135>Gn||225<Gn&&315>Gn)&&Ct.rotate(-Gn,Ei/2,gr/2),Pn=new Ze(0,0,Ei,gr),kt.xi(Pn,Ae),Ct.Ga(kt),Ae=-kt.x+Go/2*Xt.scale,Xt=-kt.y+Go/2*Xt.scale,Ht.assign(Kn),Go=isNaN(Kn.x);var qs=isNaN(Kn.y);if(Go||qs){Ei=Ei/2+3,gr=gr/2+3;var na=45<=Gn&&135>=Gn,Ha=225<=Gn&&315>=Gn;Bn===_a&&(na||Ha)?(Ht.x=qs?Ei:Kn.y,Ht.y=Go?gr:Kn.x,na?0<=ie||isNaN(ie)&&.5>fe||!Go||(Ht.y=-gr):Ha&&((0<=ie||isNaN(ie)&&.5>fe)&&Go&&(Ht.y=-gr),qs&&(Ht.x=-Ei))):(Go&&(Ht.x=0<=ie||isNaN(ie)&&.5>fe?Ei:-Ei),qs&&(Ht.y=-gr),Ht.rotate(Gn))}else Ht.rotate(Gn);on+=Ht.x,Bi+=Ht.y,Pn.set($t),Pn.h(on+Ae,Bi+Xt,$t.width,$t.height),yt.push(Pn),x.ed(Pn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),vs(b,x.width||0,x.height||0),Gi.free(Ct),Rt.free(kt),Rt.free(Ht)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Fo||a instanceof Cn){var E=a,b=null;a instanceof Fo&&(b=a,E=b.adornedPart);var z=a instanceof Fo?null:E.path,tt=a.j;if(tt.length!==0){var ot=0;if(z!==null&&ot<tt.length){var rt=tt[ot];ot++,z.arrange(rt.x-a.jg.x,rt.y-a.jg.y,rt.width,rt.height)}for(rt=0;rt<x;rt++){var at=y[rt];if(at!==z&&ot<tt.length){var ut=tt[ot];ot++,at.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Cn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,ot=tt.segmentIndex,rt=tt.segmentFraction;var mt=tt.alignmentFocus;if(at=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(ot)){var yt=ft.ua,Ct=Hn();yt.Qu(rt,Ct);var kt=Rt.allocAt(Ct[0],Ct[1]);kt.add(ft.i(0)),yt.type===En.j||(yt=yt.figures.first()),kt.offset(-yt.startX,-yt.startY),yt=Ct[2],at!==_a&&(ft=ft.computeAngle(tt,at,yt),tt.angle=ft),ft=kt.x;var Ht=kt.y;Rt.free(kt),_n(Ct)}else if(ot<-x||ot>=x)Ct=Rt.alloc(),yt=ft,Ht=Ct,yt.vg(),yt.computeMidPoint(Ht),yt=ft.midAngle,at!==_a&&(ft=ft.computeAngle(tt,at,yt),tt.angle=ft),ft=Ct.x,Ht=Ct.y,Rt.free(Ct);else{if(kt=0,0<=ot?(Ct=y.s[ot],Ht=ot<x-1?y.s[ot+1]:Ct):(kt=x+ot,Ct=y.s[kt],Ht=0<kt?y.s[kt-1]:Ct),Ct.Xa(Ht)){0<=ot?(yt=0<ot?y.s[ot-1]:Ct,kt=ot<x-2?y.s[ot+2]:Ht):(yt=kt<x-1?y.s[kt+1]:Ct,kt=1<kt?y.s[kt-2]:Ht);var Dt=yt.Bf(Ct),Xt=Ht.Bf(kt);yt=Dt>Xt+10?0<=ot?yt.ab(Ct):Ct.ab(yt):Xt>Dt+10?0<=ot?Ht.ab(kt):kt.ab(Ht):0<=ot?yt.ab(kt):kt.ab(yt)}else yt=0<=ot?Ct.ab(Ht):Ht.ab(Ct);at!==_a&&(ft=ft.computeAngle(tt,at,yt),tt.angle=ft),ft=Ct.x+(Ht.x-Ct.x)*rt,Ht=Ct.y+(Ht.y-Ct.y)*rt}if(mt.ys())tt.location=new Rt(ft,Ht);else{mt.Mc()&&(mt=po),Ct=Gi.alloc(),Ct.reset(),Ct.scale(tt.scale,tt.scale),Ct.rotate(tt.angle,0,0);var $t=tt.naturalBounds;kt=Ze.allocAt(0,0,$t.width,$t.height),Dt=Rt.alloc(),Dt.xi(kt,mt),Ct.Ga(Dt),mt=-Dt.x,Xt=-Dt.y;var ie=$t.width,fe=$t.height;$t=Rt.alloc(),$t.assign(ut);var Ae=isNaN(ut.x),Bn=isNaN(ut.y);if(Ae||Bn){ie=ie/2+3,fe=fe/2+3;var Kn=45<=yt&&135>=yt,Gn=225<=yt&&315>=yt;at===_a&&(Kn||Gn)?($t.x=Bn?ie:ut.y,$t.y=Ae?fe:ut.x,Kn?0<=ot||isNaN(ot)&&.5>rt||!Ae||($t.y=-fe):Gn&&((0<=ot||isNaN(ot)&&.5>rt)&&Ae&&($t.y=-fe),Bn&&($t.x=-ie))):(Ae&&($t.x=0<=ot||isNaN(ot)&&.5>rt?ie:-ie),Bn&&($t.y=-fe),$t.rotate(yt))}else $t.rotate(yt);ft+=$t.x,Ht+=$t.y,Ct.pp(kt),mt+=kt.x,Xt+=kt.y,ot=Rt.allocAt(ft+mt,Ht+Xt),tt.move(ot),Rt.free(ot),Rt.free($t),Rt.free(Dt),Ze.free(kt),Gi.free(Ct)}}b!==null?b.Ul(!1):E.Ul(!1),E=BS(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Rt.free(E)}};function iS(a,y,x,E){if(Ql(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Fo&&a.type===Sn.Link&&a.adornedObject instanceof Yi&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Cn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Fo&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),zs(E,!1)}}function dp(){this.xa="Base"}Le(dp,Us),dp.prototype.measure=function(a,y,x,E,b,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 ft=ot.measuredBounds,mt=new Ze(-rt.left,-rt.top,Math.max(ft.width+at,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(mt),b.assign(mt);for(var yt=ot.geometry,Ct=ot.strokeWidth,kt=yt.flattenedSegments,Ht=yt.flattenedLengths,Dt=yt.flattenedTotalLength,Xt=kt.length,$t=0,ie=0,fe=Hn(),Ae=0;Ae<Xt;Ae++){var Bn=kt[Ae],Kn=[];ie=$t=0;for(var Gn=Bn.length,Pn=0;Pn<Gn;Pn+=2){var on=Bn[Pn],Bi=Bn[Pn+1];if(Pn!==0){var Ei=180*Math.atan2(Bi-ie,on-$t)/Math.PI;0>Ei&&(Ei+=360),Kn.push(Ei)}$t=on,ie=Bi}fe.push(Kn)}if(a.graduatedIntervals===null){for(var Go=[],gr=a.O.s,qs=gr.length,na=0;na<qs;na++){var Ha=gr[na],$s=[];if(Go.push($s),Ha.visible){var jd=Ha.interval;if(!(0>jd)){for(var bs=0;bs<qs;bs++)if(bs!==na){var ah=gr[bs];if(ah.visible&&Ha.constructor===ah.constructor){var Ga=ah.interval;Ga>jd&&$s.push(Ga)}}}}}a.graduatedIntervals=Go}var zd=a.graduatedIntervals,$l=a.O.s,ku=$l.length,Dl=0,Ml=0,mc=Dt;a.graduatedMarks=[];for(var lh,Ig=0;Ig<ku;Ig++){var Ol=$l[Ig];if(lh=[],Ol.visible&&Ol!==ot){var Wa=Math.abs(Ol.interval),Jp=a.graduatedTickUnit;if(!(2>Jp*Wa*Dt/a.graduatedRange&&Ol.graduatedSkip===null)){var If=Ht[0][0],Mh=0,El=0;Ml=Dt*Ol.graduatedStart-1e-4,mc=Dt*Ol.graduatedEnd+1e-4;var qc=Jp*Wa,Rl=a.graduatedTickBase;if(Rl<a.graduatedMin){var vc=(a.graduatedMin-Rl)/qc;vc=vc%1===0?vc:Math.floor(vc+1),Rl+=vc*qc}else Rl>a.graduatedMin+qc&&(Rl-=Math.floor((Rl-a.graduatedMin)/qc)*qc);for(var Z0=zd[Ig],_p=Rl,Hy=1e-6*a.graduatedMax,Qh=1;Rl<=a.graduatedMax+Hy;Qh++){t:{for(var cd=Z0.length,Df=0;Df<cd;Df++){var yc=(Rl-a.graduatedTickBase)%(Z0[Df]*a.graduatedTickUnit),Dg=1e-6*a.graduatedTickUnit;if(yc<Dg&&yc>-Dg){var Sc=!1;break t}}Sc=!0}if(Sc&&(Rl>a.graduatedMax&&(Rl=a.graduatedMax),Ol.graduatedSkip===null||Ol instanceof yr&&!Ol.graduatedSkip(Rl,Ol)||Ol instanceof Yi&&!Ol.graduatedSkip(Rl,Ol))&&(Dl=(Rl-a.graduatedMin)*Dt/a.graduatedRange,Dl>Dt&&(Dl=Dt),Ml<=Dl&&Dl<=mc)){for(var Jh=fe[Mh][El],Hd=Ht[Mh][El];Mh<Ht.length;){for(;Dl>If&&El<Ht[Mh].length-1;)El++,Jh=fe[Mh][El],Hd=Ht[Mh][El],If+=Hd;if(Dl<=If)break;Mh++,El=0,Jh=fe[Mh][El],Hd=Ht[Mh][El],If+=Hd}var Ll=kt[Mh],Eh=Ll[2*El],U0=Ll[2*El+1],fd=(Dl-(If-Hd))/Hd,Og=new Rt(Eh+(Ll[2*El+2]-Eh)*fd+Ct/2-yt.bounds.x,U0+(Ll[2*El+3]-U0)*fd+Ct/2-yt.bounds.y);Og.scale(ot.scale,ot.scale);t:{var uh=Jh,$c=fe[Mh];if(!(.5005>fd&&.4995<fd)){var Lh=uh;if(.5>fd?0<El?Lh=$c[El-1]:ve.$(Ll[0],Ll[Ll.length-2])&&ve.$(Ll[1],Ll[Ll.length-1])&&(Lh=$c[$c.length-1]):.5<fd&&(El+1<$c.length?Lh=$c[El+1]:ve.$(Ll[0],Ll[Ll.length-2])&&ve.$(Ll[1],Ll[Ll.length-1])&&(Lh=$c[0])),uh!==Lh){var Of=Math.abs(uh-Lh);if(180<Of&&(uh<Lh?uh+=360:Lh+=360,Of=Math.abs(uh-Lh)),5e-4>fd||.9995<fd){Jh=(uh+Lh)/2%360;break t}if(10>Of){var Rg=1-Math.abs(.5-fd);Jh=(uh*Rg+Lh*(1-Rg))%360;break t}}}Jh=uh}if(Ol instanceof yr){var Yu="";Ol.graduatedFunction!==null?(Yu=Ol.graduatedFunction(Rl,Ol),Yu=Yu!=null?Yu.toString():""):Yu=(+Rl.toFixed(2)).toString(),Yu!==""&&lh.push({$l:Og,angle:Jh,text:Yu})}else lh.push({$l:Og,angle:Jh})}Rl=_p+Qh*qc}}}a.graduatedMarks.push(lh)}_n(fe);var fa=a.graduatedMarks;if(fa!==null)for(var qp=E.length,nl=0;nl<qp;nl++){var ks=E[nl],il=fa[nl];if(ks.visible&&ks!==ot&&il.length!==0){if(ks instanceof Yi){var gd=a,Gd=b,tf=ks.alignmentFocus;tf.Mc()&&(tf=ba);var Gy=ks.angle;ks.Kb=0,ks.measure(1/0,1/0,0,0),ks.Kb=Gy;var V0=ks.measuredBounds,jg=V0.width,ef=V0.height,Rf=Ze.allocAt(0,0,jg,ef),bl=Rt.alloc();bl.xi(Rf,tf),Ze.free(Rf);for(var pd=-bl.x,hh=-bl.y,pu=new Ze,xc=il.length,zg=0;zg<xc;zg++)for(var wc=il[zg],Y0=wc.$l.x,Hg=wc.$l.y,ds=wc.angle,Xu=0;4>Xu;Xu++){switch(Xu){case 0:bl.h(pd,hh);break;case 1:bl.h(pd+jg,hh);break;case 2:bl.h(pd,hh+ef);break;case 3:bl.h(pd+jg,hh+ef)}bl.rotate(ds+ks.angle),bl.offset(Y0,Hg),zg===0&&Xu===0?pu.h(bl.x,bl.y,0,0):pu.Ye(bl),bl.offset(-Y0,-Hg),bl.rotate(-ds-ks.angle)}Rt.free(bl),gd.graduatedBounds!==null&&gd.graduatedBounds.push(pu),Hr(Gd,pu.x,pu.y,pu.width,pu.height)}else if(ks instanceof yr){var Au=a,X0=b;Au.temporaryTextBlock===null&&(Au.temporaryTextBlock=new yr);var jl=Au.temporaryTextBlock;yS(jl,ks);var Wd=ks.alignmentFocus;Wd.Mc()&&(Wd=ba);for(var Nu=ks.segmentOrientation,Gg=ks.segmentOffset,Pc=new Ze,$p=0,Wg=0,bh=0,nf=0,Cc=0,Kg=il.length,Kd=0;Kd<Kg;Kd++){var _h=il[Kd];$p=_h.$l.x,Wg=_h.$l.y,bh=_h.angle,Cc=nf=ks.angle,Nu!==_a&&(Cc=Nu===Pp||Nu===e0?bh+ks.angle:bh,nf=Cn.computeAngle(Nu,Cc)),jl.Kb=nf,jl.text=_h.text||"",jl.measure(1/0,1/0,0,0);var Zd=jl.measuredBounds,md=jl.naturalBounds,Ud=md.width,of=md.height,dh=Gi.alloc();dh.reset(),dh.translate(-Zd.x,-Zd.y),dh.scale(jl.scale,jl.scale),dh.rotate(Cc,Ud/2,of/2),Nu!==Cp&&Nu!==Ep||dh.rotate(90,Ud/2,of/2),Nu!==Mp&&Nu!==Lp||dh.rotate(-90,Ud/2,of/2),Nu===n0&&(45<bh&&135>bh||225<bh&&315>bh)&&dh.rotate(-bh,Ud/2,of/2);var jf=Ze.allocAt(0,0,Ud,of),Vd=Rt.alloc();Vd.xi(jf,Wd),dh.Ga(Vd);var zf=-Vd.x,Wy=-Vd.y,vd=Rt.alloc();vd.assign(Gg),isNaN(vd.x)&&(vd.x=Ud/2+3),isNaN(vd.y)&&(vd.y=-(of/2+3)),vd.rotate(bh),$p+=vd.x+zf,Wg+=vd.y+Wy;var rf=new Ze($p,Wg,Zd.width,Zd.height),tm=new Ze(Zd.x,Zd.y,Zd.width,Zd.height),Ky=new Ze(md.x,md.y,md.width,md.height);_h.Sz=nf,_h.lineCount=jl.lineCount,_h.lines=[jl.Cb,jl.Ih,jl.df,jl.Le,jl.Qc,jl.Qb,jl.ze],_h.actualBounds=rf,_h.measuredBounds=tm,_h.naturalBounds=Ky,Kd===0?Pc.assign(rf):Pc.ed(rf),Rt.free(vd),Rt.free(Vd),Ze.free(jf),Gi.free(dh)}Au.graduatedBounds!==null&&Au.graduatedBounds.push(Pc),Hr(X0,Pc.x,Pc.y,Pc.width,Pc.height)}zs(ks,!1)}}},dp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,ot=z[tt];tt++,E!==null&&E.arrange(ot.x-x.x,ot.y-x.y,ot.width,ot.height);for(var rt=y.length,at=0;at<rt;at++){var ut=y[at];ot=b[at],ut.visible&&ut!==E&&ot.length!==0&&(ot=z[tt],tt++,ut.arrange(ot.x-x.x,ot.y-x.y,ot.width,ot.height))}a.graduatedBounds=null}}},dp.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof Bl,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var ot=z.actualBounds,rt=a.O.s,at=a.graduatedMarks,ut=rt.length,ft=0;ft<ut;ft++){var mt=rt[ft],yt=at[ft],Ct=yt.length;if(mt.visible&&mt!==z&&yt.length!==0){if(mt instanceof Yi){if(!(2>a.graduatedTickUnit*mt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&mt.graduatedSkip===null)){var kt=mt.measuredBounds,Ht=mt.strokeWidth*mt.scale,Dt=mt.alignmentFocus;Dt.Mc()&&(Dt=ba);for(var Xt=0;Xt<Ct;Xt++){var $t=yt[Xt].$l,ie=yt[Xt].angle,fe=Dt,Ae=mt.Ab;Ae.reset(),Ae.translate($t.x+ot.x,$t.y+ot.y),Ae.rotate(ie+mt.angle,0,0),Ae.translate(-kt.width*fe.x+fe.offsetX+Ht/2,-kt.height*fe.y+fe.offsetY+Ht/2),Ae.scale(mt.scale,mt.scale),Cu(mt,!1),mt.wh.set(mt.Ab),mt.Kk=mt.scale,lu(mt,!1),mt.gc(y,x),b&&(a.svg.appendChild(mt.svg),mt.svg=null),mt.Ab.reset()}}}else if(mt instanceof yr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new yr),kt=a.temporaryTextBlock,yS(kt,mt),Ht=0;Ht<Ct;Ht++)Dt=yt[Ht],Dt.actualBounds&&Dt.measuredBounds&&Dt.naturalBounds&&(kt.ec=Dt.text||"",kt.Kb=Dt.Sz||0,kt.Gc=Dt.lineCount||0,Xt=Dt.lines,Xt!==void 0&&(kt.Cb=Xt[0],kt.Ih=Xt[1],kt.df=Xt[2],kt.Le=Xt[3],kt.Qc=Xt[4],kt.Qb=Xt[5],kt.ze=Xt[6]),Dt.naturalBounds&&(kt.dc=Dt.naturalBounds),Dt.actualBounds&&(Xt=Dt.actualBounds,kt.arrange(Xt.x,Xt.y,Xt.width,Xt.height)),Xt=Dt.actualBounds,kt.arrange(Xt.x,Xt.y,Xt.width,Xt.height),$t=Dt.measuredBounds,Dt=Dt.naturalBounds,ie=kt.Ab,ie.reset(),ie.translate(Xt.x+ot.x,Xt.y+ot.y),ie.translate(-$t.x,-$t.y),kt.no(ie,Dt.x,Dt.y,Dt.width,Dt.height),Cu(kt,!1),kt.wh.set(kt.Ab),kt.Kk=kt.scale,lu(kt,!1),kt.Ng=mt.part,kt.Me=mt.panel,kt.gc(y,x),kt.Me=null,kt.Ng=null,b&&(a.svg.appendChild(kt.svg),kt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Sn(a,y){if(ge.call(this),this.na=null,a===void 0)this.na=Sn.Position;else if(typeof a=="string"){var x=Gu.I(a);x!==null&&(this.na=x)}else a instanceof Us?this.na=a:a&&(this.na=Sn.Position,y=a);this.na===null&&oe("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Sn.Grid?1048576:0),this.O=new cn,this.yb=Js,this.Tm=nn,this.Uf=ji,this.$g=null,this.$e="",this.jg=new Ze(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Qn,this.jn=Ur,this.kn=Qo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Le(Sn,ge),Sn.prototype.cloneProtected=function(a){ge.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Sn.prototype.Af=function(a){ge.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},Sn.prototype.copy=function(){var a=ge.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof On&&(z.Te=!0);var ot=a.diagram;ot!==null&&ot.undoManager.isUndoingRedoing||z.cb(gs,"elements",a,null,b,null,tt)}}return a}return null},Mt=Sn.prototype,Mt.toString=function(){return"Panel("+this.type.name+")#"+zo(this)},Mt.Pn=function(a){ge.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Mt.hh=function(a,y){if(this.na===Sn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Sn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Sn.Table)if(a.yc(),a instanceof Bl){var x=a.yd;a.yd=fm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Sn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var ot=b[tt];x&&ot===E&&(a.clipInsteadOfFill=!0),ot.gc(a,y),x&&ot===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&bm(a,y,!0,x,!0),E!==null&&bm(a,y,!1,E,!0),x!==null&&oS(a,y,!0,x),E!==null&&oS(a,y,!1,E),x!==null&&bm(a,y,!0,x,!1),E!==null&&bm(a,y,!1,E,!1)}function oS(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,ot=!0,rt=0;rt<b;rt++){var at=E[rt];if(at!==void 0&&at.actual!==0)if(ot)ot=!1;else{if(x){if(at.position>tt.height)continue}else if(at.position>tt.width)continue;var ut=at.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=at.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){as(a,y,ft,!1,!1,tt,z),ft=!1;var mt=at.separatorDashArray;mt===null&&(mt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),mt!==null&&(ft=!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(),ft&&y.fs()}}}}function bm(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,ot=a.naturalBounds,rt=rS(a,!0),at=rS(a,!1),ut=0;ut<z;ut++){var ft=E[ut];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var mt=x?tt.height:tt.width;if(!(ft.position>mt)){var yt=ft.Wc(),Ct=ft.separatorStrokeWidth;isNaN(Ct)&&(Ct=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var kt=ft.separatorStroke;kt===null&&(kt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(kt===null||ft.index===(x?rt:at))&&(Ct=0),yt-=Ct,Ct=ft.position+Ct,yt+=ft.actual,Ct+yt>mt&&(yt=mt-Ct),0>=yt||(mt=a.yb,as(a,y,ft.background,!0,!1,ot,tt),x?y.fillRect(mt.left,Ct+mt.top,tt.width-(mt.left+mt.right),yt):y.fillRect(Ct+mt.left,mt.top,yt,tt.height-(mt.top+mt.bottom)))}}}}function rS(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function pv(a){return a==="LineV"||a==="BarV"}Mt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Mt.kk=function(a,y,x){if(!ge.prototype.kk.call(this,a,y,x))return!1;if(this.type===Sn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Sn.Grid||this.na===Sn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Mt.nk=function(){return!0},Mt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var ot=y[tt].actualBounds;b=tt===0?ot.x:Math.min(ot.x,b),z=tt===0?ot.y:Math.min(ot.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else ge.prototype.$o.call(this,a,y,x,E)},Mt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,ot=1/(tt.m11*tt.m22-tt.m12*tt.m21),rt=tt.m22*ot,at=-tt.m12*ot,ut=-tt.m21*ot,ft=tt.m11*ot,mt=ot*(tt.m21*tt.dy-tt.m22*tt.dx),yt=ot*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,ve.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*rt+y*ut+mt,ot=a*at+y*ft+yt,a=x*rt+E*ut+mt,rt=x*at+E*ft+yt,b.h(0,0),x=this.naturalBounds,z=ve.Ff(0,0,x.width,x.height,z,ot,a,rt,b),b.transform(tt),z;z||(rt=1,ut=at=0,ft=1,yt=mt=0),ot=a*rt+y*ut+mt,a=a*at+y*ft+yt,rt=x*rt+E*ut+mt,x=x*at+E*ft+yt,b.h(rt,x),E=(rt-ot)*(rt-ot)+(x-a)*(x-a),at=!1,ft=this.O.s,yt=ft.length,ut=Rt.alloc(),mt=null,y=1/0;var Ct=null,kt=this.isClipping&&this.na===Sn.Spot;kt&&(Ct=Rt.alloc(),mt=this.Pb(),(at=mt.Sj(ot,a,rt,x,Ct))&&(y=(ot-Ct.x)*(ot-Ct.x)+(a-Ct.y)*(a-Ct.y)));for(var Ht=0;Ht<yt;Ht++){var Dt=ft[Ht];Dt.visible&&Dt!==mt&&Dt.Sj(ot,a,rt,x,ut)&&(at=!0,Dt=(ot-ut.x)*(ot-ut.x)+(a-ut.y)*(a-ut.y),Dt<E&&(E=Dt,b.set(ut)))}return kt&&(y>E&&b.set(Ct),Rt.free(Ct)),Rt.free(ut),z&&b.transform(tt),at},Mt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();ge.prototype.Gj.call(this)},Mt.v=function(a){if(!Ql(this)){ge.prototype.v.call(this,a),a=null,(this.na===Sn.Auto||this.na===Sn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=ul(b,!1);(b instanceof Ja||b instanceof Sn||b instanceof yr||z!==an)&&b.v(!0)}}}},Mt.Uj=function(){if(!Ql(this)){zs(this,!0),jh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Mt.Uk=function(){if(!(this.l&2048)){Cu(this,!0),lu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Mt.Wu=function(){lu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Mt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var ot=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,ot.width)),isNaN(z.height)||(y=Math.min(z.height,ot.height)),a=Math.max(x,a),y=Math.max(E,y);var rt=this.yb;a=Math.max(a-rt.left-rt.right,0),y=Math.max(y-rt.top-rt.bottom,0);var at=this.O.s;at.length!==0&&this.na.measure(this,a,y,at,b,x,E),a=b.width+rt.left+rt.right,rt=b.height+rt.top+rt.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(rt=z.height),a=Math.min(ot.width,a),rt=Math.min(ot.height,rt),a=Math.max(tt.width,a),rt=Math.max(tt.height,rt),a=Math.max(x,a),rt=Math.max(E,rt),vs(b,a,rt),vs(this.naturalBounds,a,rt),this.Ge(0,0,a,rt)},Mt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function ud(a){return a.part!==null?a.part.locationObject:null}Mt.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=ul(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,ot=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=an),a){case an:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case yn:this.v(!0),this.measure(x+ot,E+tt,0,0);break;case li:this.v(!0),this.measure(x+ot,z+tt,0,0);break;case yi:this.v(!0),this.measure(y+ot,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Mt.gh=function(a){var y=this.naturalBounds,x=ud(this);if(As(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Rt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(ro(b.set(a),z.transform),z.ca(b)))return Rt.free(b),!0}return Rt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Mt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Mt.qm=function(a,y){if(y(this,a),a instanceof Sn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Zc(a,y){sS(a,a,y)}function sS(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof Sn&&sS(a,z,x)}}function v1(a,y){aS(a,a,y)}function aS(a,y,x){if(x(y),y instanceof Sn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)aS(a,y[b],x)}}Mt.Nl=function(a){return lS(this,this,a)};function lS(a,y,x){if(x(y))return y;if(y instanceof Sn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=lS(a,y[b],x);if(z!==null)return z}}return null}Mt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=cp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Sn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function uS(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Sn?x=Math.max(x,uS(b)):b instanceof Yi&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Mt.se=function(){return!(this.type===Sn.TableRow||this.type===Sn.TableColumn)};function kd(a){return a.type===Sn.TableRow||a.type===Sn.TableColumn}Mt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Xa(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:ro(Rt.allocAt(a.x,a.y),this.transform),ot=this.diagram,rt=10,at=5;if(ot!==null&&(rt=ot.Ql("extraTouchArea"),at=rt/2),As(-(at*b),-(at*b),E.width+rt*b,E.height+rt*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var ut=b.length;if(ot=Rt.alloc(),at=(rt=this.isClipping&&this.na===Sn.Spot)?this.Pb():null,rt&&(at.se()?ro(ot.set(a),at.transform):ot.set(a),!at.ca(ot)))return Rt.free(ot),z||Rt.free(tt),null;for(var ft=ud(this);ut--;){var mt=b[ut];if((mt.visible||mt===ft)&&(mt.se()?ro(ot.set(a),mt.transform):ot.set(a),!rt||mt!==at)){var yt=null;if(mt instanceof Sn?yt=mt.ic(ot,y,x):mt.pickable===!0&&mt.ca(ot)&&(yt=mt),yt!==null&&(y!==null&&(yt=y(yt)),yt!==null&&(x===null||x(yt))))return Rt.free(ot),z||Rt.free(tt),yt}}Rt.free(ot)}return this.background===null&&this.areaBackground===null?(z||Rt.free(tt),null):(a=As(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Rt.free(tt),a)}return z||Rt.free(tt),null},Mt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:ro(Rt.allocAt(a.x,a.y),this.transform);if(b=As(0,0,b.width,b.height,tt.x,tt.y),kd(this)||b){if(!this.isAtomic){for(var ot=this.O.s,rt=ot.length,at=Rt.alloc(),ut=ud(this);rt--;){var ft=ot[rt];if(ft.visible||ft===ut){ft.se()?ro(at.set(a),ft.transform):at.set(a);var mt=ft;ft=ft instanceof Sn?ft:null,(ft!==null?ft.ji(at,y,x,E):mt.ca(at))&&mt.pickable!==!1&&(y!==null&&(mt=y(mt)),mt===null||x!==null&&!x(mt)||E.add(mt))}}Rt.free(at)}return z||Rt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Rt.free(tt),!1},Mt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Gi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&Gi.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var ot=ud(this),rt=this.O.s,at=rt.length;at--;){var ut=rt[at];if(ut.visible||ut===ot){var ft=ut.actualBounds,mt=this.naturalBounds;ft.x>mt.width||ft.y>mt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof Sn?ut:null,mt=Gi.alloc(),mt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,mt):_s(ft,a,E,mt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Gi.free(mt))}}return z===void 0&&Gi.free(tt),E}return z===void 0&&Gi.free(tt),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[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 Sn&&mv(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Mt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,ot=this.se(),rt=ot?a:ro(Rt.allocAt(a.x,a.y),this.transform),at=ot?y:ro(Rt.allocAt(y.x,y.y),this.transform),ut=rt.Bf(at),ft=0<rt.x&&rt.x<tt.width&&0<rt.y&&rt.y<tt.height||lr(rt.x,rt.y,0,0,0,tt.height)<=ut||lr(rt.x,rt.y,0,tt.height,tt.width,tt.height)<=ut||lr(rt.x,rt.y,tt.width,tt.height,tt.width,0)<=ut||lr(rt.x,rt.y,tt.width,0,0,0)<=ut;if(tt=rt.zd(0,0)<=ut&&rt.zd(0,tt.height)<=ut&&rt.zd(tt.width,0)<=ut&&rt.zd(tt.width,tt.height)<=ut,ot||(Rt.free(rt),Rt.free(at)),ft){if(!this.isAtomic){rt=Rt.alloc(),at=Rt.alloc(),ut=ud(this);for(var mt=this.O.s,yt=mt.length;yt--;){var Ct=mt[yt];if(Ct.visible||Ct===ut){var kt=Ct.actualBounds,Ht=this.naturalBounds;(!ot||!(kt.x>Ht.width||kt.y>Ht.height||0>kt.x+kt.width||0>kt.y+kt.height))&&(Ct.se()?(kt=Ct.transform,ro(rt.set(a),kt),ro(at.set(y),kt)):(rt.set(a),at.set(y)),kt=Ct,Ct=Ct instanceof Sn?Ct:null,(Ct!==null?Ct.og(rt,at,x,E,b,z):kt.tx(rt,at,b))&&(x!==null&&(kt=x(kt)),kt===null||E!==null&&!E(kt)||z.add(kt)))}}Rt.free(rt),Rt.free(at)}return b?ft:tt}return!1};function vv(a){var y=null;return a instanceof Yi&&(y=a.spot1,y===nn&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Is),y}function yv(a){var y=null;return a instanceof Yi&&(y=a.spot2,y===nn&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ca),y}Mt.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Mt.M=function(a){return this.O.M(a)},Mt.Gb=function(a,y){y instanceof ci&&oe("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&oe("Cannot make a Panel contain itself: "+this.toString()),oe("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&oe("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Sn.Grid||y instanceof Yi||oe("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Sn.Graduated||y instanceof Yi||y instanceof yr||oe("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new Xn),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,ot=tt.length,rt=0;rt<ot;rt++)if(tt[rt]===y){z=rt;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else oe("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Ql(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Sn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Am(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof On&&(x.Te=!0),x.Te&&x instanceof On&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Ds,"elements",this,y,null,E,null),x.cb(gs,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Mt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Mt.mb=function(a){0<=a&&this.pc(a,!0)},Mt.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),zs(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof On&&(E instanceof Sn?E.qm(E,function(tt,ot){Wv(z,ot,y)}):Wv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Ds,"elements",this,E,null,a,null))},Mt.Fb=function(a){0>a&&bn(a,">= 0",Sn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Hs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(gs,"rowdefs",this,null,x,null,a)}return y[a]},Mt.oA=function(a){if(0>a&&bn(a,">= 0",Sn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Ds,"rowdefs",this,x,null,a,null),this.v()}}};function hS(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Hs?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Mt.Eb=function(a){0>a&&bn(a,">= 0",Sn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Hs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(gs,"coldefs",this,null,x,null,a)}return y[a]},Mt.jA=function(a){if(0>a&&bn(a,">= 0",Sn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Ds,"coldefs",this,x,null,a,null),this.v()}}};function dS(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Hs?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Mt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Nm(y,a),this},Mt.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new Hs(y)),this},Mt.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new Hs(y)),this},Mt.nz=function(a){if(0>a||this.type!==Sn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Mt.fz=function(a){if(0>a||this.type!==Sn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Mt.Fz=function(a,y){if(y===void 0&&(y=new Rt(NaN,NaN)),this.type!==Sn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Mt.Gz=function(a){if(this.type!==Sn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function cS(a){return a=a.allBindings,a!==null&&a._isFrozen}function Eu(a){var y=a.allBindings;if(y===null)a.data!==null&&oe("Template cannot have .data be non-null: "+a),a.allBindings=y=new cn;else if(y._isFrozen)return;var x=new cn;Sv(a,!1),a.qm(a,function(at,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(Sf(ut,!1),ft=ft.iterator;ft.next();){var mt=ft.value;mt.mode===Ip&&Sf(ut,!0);var yt=mt.sourceName;yt!==null&&(yt==="/"&&Sv(at,!0),yt=Lx(mt,at,ut),yt!==null&&(x.add(yt),yt.srcBindings===null&&(yt.srcBindings=new cn),yt.srcBindings.add(mt))),y.add(mt)}if(ut instanceof Sn&&ut.type===Sn.Table){if(0<ut.rowCount){for(at=ut.rowDefs,ft=at.length,mt=0;mt<ft;mt++)if(yt=at[mt],yt!==void 0&&yt.be!==null)for(var Ct=yt.be.iterator;Ct.next();){var kt=Ct.value;kt.xd=yt,kt.to=2,kt.wl=yt.index,y.add(kt)}}if(0<ut.columnCount){for(ut=ut.colDefs,at=ut.length,ft=0;ft<at;ft++)if(mt=ut[ft],mt!==void 0&&mt.be!==null)for(yt=mt.be.iterator;yt.next();)Ct=yt.value,Ct.xd=mt,Ct.to=1,Ct.wl=mt.index,y.add(Ct)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Sf(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new cn),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var ot=b.targetProperty,rt=ot.indexOf(".");0<rt&&z instanceof Sn&&(tt=ot.substring(0,rt),ot=ot.substr(rt+1),rt=z.fb(tt),rt!==null?(z=rt,b.targetProperty=ot):Jn('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Hs?(tt=zo(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof ge?(tt=zo(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):oe("Unknown type of binding target: "+z)}y.freeze(),a instanceof ci&&a.Zc()&&a.Va()}Mt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return v1(y,function(x){x instanceof Sn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&Eu(y),y},Mt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof Sn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Mt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function y1(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof Sn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof Sn)||z.data!==y[tt])return!0;b++,tt++}return!1}function cp(a){if(a.type===Sn.Spot||a.type===Sn.Auto)return Math.min(a.O.length,1);if(a.type===Sn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Yi&&E.isPanelMain))break}return x}return a.type===Sn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Sn&&kd(a))?1:0}Mt.mv=function(){for(var a=cp(this);this.O.length>a;)this.pc(this.O.length-1,!1);fS(this,this.itemArray)};function fS(a,y){var x=cp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)km(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof Sn){if(tt.data!==z){var ot=wv(a,tt.data),rt=wv(a,z),at=rt!==ot;at||(ot=Pv(a,ot),at=Pv(a,rt)!==ot),at?(a.pc(E,!1),km(a,z,b,!1)):tt.data=z}}else km(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),Ql(a)||a.v(),a.graduatedIntervals=null,a.If()||Am(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof On&&(y.Te=!0),y.Te&&y instanceof On&&(y.wc=null))}}function km(a,y,x,E){if(!(y==null||0>x)){var b=wv(a,y);if(b=Pv(a,b),b!==null){if(Eu(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Xn),a.ge.add(y,b)),z=x+cp(a),a.Gb(z,b),E&&(b.ub=y,xv(a,z,x),b.ub=null),b.data=y}}}function xv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof Sn){var b=y,z=x;E.type===Sn.TableRow?E.row=b:E.type===Sn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function wv(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=ws(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;oe("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Pv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(gS||(gS=!0,Jn('No item template Panel found for category "'+y+'" on '+a),Jn(" Using default item template."),a=new Sn,y=new yr,y.bind(new Ls("text","",wi)),a.add(y),pS=a),E=pS)),E}function Am(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Sn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Sn&&!z.isEnabled||Am(a,z,x)}}}function Ph(a,y){y.name=a,Gu.add(a,y)}Gt.Object.defineProperties(Sn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Sn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&bn(a,">= 0",Sn,"padding"),a=new hi(a)):(0>a.left&&bn(a.left,">= 0",Sn,"padding:value.left"),0>a.right&&bn(a.right,">= 0",Sn,"padding:value.right"),0>a.top&&bn(a.top,">= 0",Sn,"padding:value.top"),0>a.bottom&&bn(a.bottom,">= 0",Sn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:Js},set:function(a){typeof a=="number"&&(a=new hi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new du),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 tr)&&(a instanceof tr&&a.freeze(),this.T===null&&(this.T=new du),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 du),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||oe("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new du),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof tr)&&(a instanceof tr&&a.freeze(),this.T===null&&(this.T=new du),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new du),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||oe("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new du),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new du),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||oe("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Sh(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||oe("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Sh(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new hd),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),xa(this)&&(a=this.part,a!==null&&Mr(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new hd),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),xa(this)&&(a=this.part,a!==null&&Mr(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new hd),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new hd),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new hd,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new hd,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new hd,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new hd,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new du),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new du),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Bm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new du),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Bm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new du),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&oe("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new du),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&oe("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new du),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 ci&&!(this instanceof Fo);Eu(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Cn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof ci&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new xf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&y1(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||fS(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 Xn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ci||a.isPanelMain)&&oe("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););_i(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&&(_i(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 Ii&&(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&&Am(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))}}}),Gt.Object.defineProperties(Sn,{Position:{get:function(){return Gu.I("Position")}},Horizontal:{get:function(){return Gu.I("Horizontal")}},Vertical:{get:function(){return Gu.I("Vertical")}},Spot:{get:function(){return Gu.I("Spot")}},Auto:{get:function(){return Gu.I("Auto")}},Table:{get:function(){return Gu.I("Table")}},Viewbox:{get:function(){return Gu.I("Viewbox")}},TableRow:{get:function(){return Gu.I("TableRow")}},TableColumn:{get:function(){return Gu.I("TableColumn")}},Link:{get:function(){return Gu.I("Link")}},Grid:{get:function(){return Gu.I("Grid")}},Graduated:{get:function(){return Gu.I("Graduated")}}}),Sn.prototype.rebuildItemElements=Sn.prototype.mv,Sn.prototype.findItemPanelForData=Sn.prototype.sx,Sn.prototype.updateTargetBindings=Sn.prototype.La,Sn.prototype.copyTemplate=Sn.prototype.Uy,Sn.prototype.graduatedValueForPoint=Sn.prototype.Gz,Sn.prototype.graduatedPointForValue=Sn.prototype.Fz,Sn.prototype.findColumnForLocalX=Sn.prototype.fz,Sn.prototype.findRowForLocalY=Sn.prototype.nz,Sn.prototype.addColumnDefinition=Sn.prototype.By,Sn.prototype.addRowDefinition=Sn.prototype.Hy,Sn.prototype.addRowColumnDefinition=Sn.prototype.Gy,Sn.prototype.removeColumnDefinition=Sn.prototype.jA,Sn.prototype.getColumnDefinition=Sn.prototype.Eb,Sn.prototype.removeRowDefinition=Sn.prototype.oA,Sn.prototype.getRowDefinition=Sn.prototype.Fb,Sn.prototype.removeAt=Sn.prototype.mb,Sn.prototype.remove=Sn.prototype.remove,Sn.prototype.insertAt=Sn.prototype.Gb,Sn.prototype.elt=Sn.prototype.M,Sn.prototype.add=Sn.prototype.add,Sn.prototype.findObject=Sn.prototype.fb,Sn.prototype.findInVisualTree=Sn.prototype.Nl,Sn.prototype.walkVisualTreeFrom=Sn.prototype.qm,Sn.prototype.findMainElement=Sn.prototype.Pb;var gS=!1,pS=null,Gu=new Xn;Sn.className="Panel",Sn.definePanelLayout=Ph,Ph("Position",new mm),Ph("Vertical",new ym),Ph("Auto",new xm),Ph("Link",new Lm);function hd(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}hd.prototype.copy=function(){var a=new hd;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},hd.className="GradPanelSettings";function du(){this.Pc=[],this.Oc=[],this.j=this.ob=Bm,this.hb=this.Hb=0,this.Qp=Js,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}du.prototype.copy=function(a){for(var y=new du,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},du.className="TablePanelSettings";function Hs(a){ho(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=nn,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=ji,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Hs.prototype.copy=function(){var a=new Hs;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=zn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Nm(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=zn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Mt=Hs.prototype,Mt.qb=function(a){a.classType===Hs&&(this.sizing=a)},Mt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+zo(this)},Mt.wi=function(a){this.Me=a},Mt.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Mt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Sn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Mt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Or,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function Tm(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Mt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ls(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&cS(y)&&oe("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new cn),this.be.add(b),this},Gt.Object.defineProperties(Hs.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&bn(a,">= 0",Hs,"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&&bn(a,">= 0",Hs,"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))&&bn(a,">= 0",Hs,"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&&bn(a,">= 0",Hs,"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 hi(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&&Pf(a,"RowColumnDefinition.separatorStroke"),a instanceof tr&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||oe("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Pf(a,"RowColumnDefinition.background"),a instanceof tr&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Hs.prototype.computeEffectiveSpacing=Hs.prototype.Wc,Hs.prototype.computeEffectiveSpacingTop=Hs.prototype.Io;var Cv=new Ue(Hs,"Default",0),fp=new Ue(Hs,"None",1),Bm=new Ue(Hs,"ProportionalExtra",2);Hs.className="RowColumnDefinition",Hs.Default=Cv,Hs.None=fp,Hs.ProportionalExtra=Bm;function Yi(a,y){ge.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}Le(Yi,ge),Yi.prototype.cloneProtected=function(a){ge.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=zn(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function Uc(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}Mt=Yi.prototype,Mt.th=function(){ge.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Mt.qb=function(a){a===an||a===Qn||a===co||a===ji?this.geometryStretch=a:ge.prototype.qb.call(this,a)},Mt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+zo(this)};function cg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var ot=x[0],rt=x[1],at,ut,ft,mt,yt,Ct,kt=0,Ht=Hn(),Dt=2;Dt<b;Dt+=2)at=x[Dt],ut=x[Dt+1],ft=at-ot,ot=ut-rt,ft===0&&(ft=.001),mt=ot/ft,yt=Math.atan2(ot,ft),Ct=Math.sqrt(ft*ft+ot*ot),Ht.push([ft,yt,mt,Ct]),kt+=Ct,ot=at,rt=ut;ot=x[0],rt=x[1],ft=E.measuredBounds.width,E instanceof Yi&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,at=tt/2,ut=at!==0,Dt=0,Ct=Ht[Dt],ft=Ct[0],yt=Ct[1],mt=Ct[2],Ct=Ct[3];for(var Xt=0;.1<=kt;){if(Xt===0&&(ut?(b=x,b-=at,kt-=at,ut=!1):b=x,b===0&&(b=1)),b>kt){_n(Ht);return}b>Ct?(Xt=b-Ct,b=Ct):Xt=0;var $t=Math.sqrt(b*b/(1+mt*mt));if(0>ft&&($t=-$t),ot+=$t,rt+=mt*$t,a.translate(ot,rt),a.rotate(yt),a.translate(-(tt/2),-(z/2)),Xt===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-yt),a.translate(-ot,-rt),kt-=b,Ct-=b,Xt!==0){if(Dt++,Dt===Ht.length){_n(Ht);return}Ct=Ht[Dt],ft=Ct[0],yt=Ct[1],mt=Ct[2],Ct=Ct[3],b=Xt}}_n(Ht)}}Mt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&as(this,a,E,!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===Sn.Link&&ot instanceof Fo&&ot.category==="Selection"&&ot.adornedObject instanceof Yi&&ot.adornedPart.Pb()===ot.adornedObject?ot.adornedObject.strokeWidth:0),rt===0&&(x=null),x!==null&&rt!==0&&(as(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||E!==null&&E!=="transparent"||(ot=!1),tt=!1,rt=this.strokeDashArray,rt!==null&&(tt=!0,a.js(rt,this.strokeDashOffset)),b.type===En.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===En.u){var at=b.startX;rt=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(at,ut);var mt=Math.min(rt,ft);at=Math.abs(ut-at),rt=Math.abs(ft-rt),a.beginPath(),a.rect(b,mt,at,rt),E!==null&&a.ng(E),x!==null&&(ot&&z&&zh(a),a.jk(),ot&&z&&sd(a)),a.Se()}else if(b.type===En.F)at=b.startX,rt=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-at)/2,mt=Math.abs(ft-rt)/2,at=Math.min(at,ut)+b,rt=Math.min(rt,ft)+mt,a.beginPath(),a.moveTo(at,rt-mt),a.bezierCurveTo(at+ve.wg*b,rt-mt,at+b,rt-ve.wg*mt,at+b,rt),a.bezierCurveTo(at+b,rt+ve.wg*mt,at+ve.wg*b,rt+mt,at,rt+mt),a.bezierCurveTo(at-ve.wg*b,rt+mt,at-b,rt+ve.wg*mt,at-b,rt),a.bezierCurveTo(at-b,rt-ve.wg*mt,at-ve.wg*b,rt-mt,at,rt-mt),a.closePath(),E!==null&&a.ng(E),x!==null&&(ot&&z&&zh(a),a.jk(),ot&&z&&sd(a)),a.Se();else if(b.type===En.o)for(b=b.figures,rt=b.length,mt=0;mt<rt;mt++){at=b.s[mt],a.beginPath(),a.moveTo(at.startX,at.startY),ut=at.segments.s,ft=ut.length;for(var yt=null,Ct=0;Ct<ft;Ct++){var kt=ut[Ct];switch(kt.type){case Ps:a.moveTo(kt.endX,kt.endY);break;case vr:a.lineTo(kt.endX,kt.endY);break;case aa:a.bezierCurveTo(kt.point1X,kt.point1Y,kt.point2X,kt.point2Y,kt.endX,kt.endY);break;case Al:a.quadraticCurveTo(kt.point1X,kt.point1Y,kt.endX,kt.endY);break;case ys:if(kt.radiusX===kt.radiusY){var Ht=Math.PI/180;a.arc(kt.point1X,kt.point1Y,kt.radiusX,kt.startAngle*Ht,(kt.startAngle+kt.sweepAngle)*Ht,0>kt.sweepAngle,yt!==null?yt.endX:at.startX,yt!==null?yt.endY:at.startY)}else if(yt=rl(kt,at),Ht=yt.length,Ht===0)a.lineTo(kt.centerX,kt.centerY);else for(var Dt=0;Dt<Ht;Dt++){var Xt=yt[Dt];Dt===0&&a.lineTo(Xt[0],Xt[1]),a.bezierCurveTo(Xt[2],Xt[3],Xt[4],Xt[5],Xt[6],Xt[7])}break;case Gl:if(Dt=Ht=0,yt!==null&&yt.type===ys){if(yt=rl(yt,at),Xt=yt.length,Xt===0){a.lineTo(kt.endX,kt.endY);break}yt=yt[Xt-1]||null,yt!==null&&(Ht=yt[6],Dt=yt[7])}else Ht=yt!==null?yt.endX:at.startX,Dt=yt!==null?yt.endY:at.startY;if(yt=Ua(kt,at,Ht,Dt),Ht=yt.length,Ht===0){a.lineTo(kt.endX,kt.endY);break}for(Dt=0;Dt<Ht;Dt++)Xt=yt[Dt],a.bezierCurveTo(Xt[2],Xt[3],Xt[4],Xt[5],Xt[6],Xt[7]);break;default:oe("Segment not of valid type: "+kt.type)}kt.isClosed&&a.closePath(),yt=kt}ut=at.isFilled,z?at.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&(ut&&ot&&zh(a),a.jk(),ut&&ot&&sd(a))):(zh(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk(),sd(a)):(ut&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk()),a.Se(mt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=Hn(),z.type===En.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),cg(a,y,E,x);else if(z.type===En.o)for(z=z.figures.iterator;z.next();){for(ot=z.value,E.length=0,E.push(ot.startX),E.push(ot.startY),tt=ot.startX,b=ot.startY,rt=tt,mt=b,at=ot.segments.s,ut=at.length,ft=0;ft<ut;ft++){switch(Ct=at[ft],Ct.type){case Ps:cg(a,y,E,x),E.length=0,E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY,rt=tt,mt=b;break;case vr:E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break;case aa:ve.Qe(tt,b,Ct.point1X,Ct.point1Y,Ct.point2X,Ct.point2Y,Ct.endX,Ct.endY,.5,E),tt=Ct.endX,b=Ct.endY;break;case Al:ve.ep(tt,b,Ct.point1X,Ct.point1Y,Ct.endX,Ct.endY,.5,E),tt=Ct.endX,b=Ct.endY;break;case ys:if(kt=rl(Ct,ot),yt=kt.length,yt===0){E.push(Ct.centerX),E.push(Ct.centerY),tt=Ct.centerX,b=Ct.centerY;break}for(Ht=0;Ht<yt;Ht++)Dt=kt[Ht],ve.Qe(tt,b,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,E),tt=Dt[6],b=Dt[7];break;case Gl:if(kt=Ua(Ct,ot,tt,b),yt=kt.length,yt===0){E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break}for(Ht=0;Ht<yt;Ht++)Dt=kt[Ht],ve.Qe(tt,b,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,E),tt=Dt[6],b=Dt[7];break;default:oe("Segment not of valid type: "+Ct.type)}Ct.isClosed&&(E.push(rt),E.push(mt),cg(a,y,E,x))}cg(a,y,E,x)}else if(z.type===En.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),cg(a,y,E,x);else if(z.type===En.F){if(b=new Ks,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new To(ys),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=rl(tt,b),ot=z.length,ot===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,rt=0;rt<ot;rt++)mt=z[rt],ve.Qe(tt,b,mt[2],mt[3],mt[4],mt[5],mt[6],mt[7],.5,E),tt=mt[6],b=mt[7];cg(a,y,E,x)}_n(E),a.restore(),a.Vc(!1)}}}},Mt.kk=function(a,y,x){return!ge.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Mt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:ge.prototype.nk.call(this,a)},Mt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Mt.ga=function(a,y){if(y===void 0&&(y=new Rt),a instanceof ti){a.Mc()&&oe("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Mt.mi=function(a){a===void 0&&(a=new Ze);var y=this.naturalBounds,x=this.oe;y=Ze.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Rt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Hr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Hr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Hr(a,E.x,E.y,0,0),Ze.free(y),Rt.free(E),a},Mt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==En.j||y||(b+=2);var z=Ze.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Ze.free(z),!1;if(E=b+1e-4,x.type===En.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(Ze.free(z),ve.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===En.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(-E,-E),z.ca(a))return Ze.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Ze.free(z),a}if(x.type===En.F){tt=x.startX,b=x.startY,ot=x.endX;var rt=x.endY;if(x=Math.min(tt,ot),y=Math.min(b,rt),tt=Math.abs(ot-tt)/2,b=Math.abs(rt-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return Ze.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Ze.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===En.o)return Ze.free(z),this.fill===null?mh(x,a.x,a.y,b):Hl(x,a,b,1<this.strokeWidth,y);oe("Unknown Geometry type: "+x.type)},Mt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var ot=this.figure,rt=Ev[ot];if(rt===void 0){var at=ve.Ze[ot];typeof at=="string"&&(at=ve.Ze[at]),typeof at=="function"?(rt=at(null,100,100),Ev[ot]=rt):oe("Unsupported Figure: "+ot)}tt=rt.bounds}ot=tt.width,rt=tt.height,at=tt.width;var ut=tt.height;switch(ul(this,!0)){case an:E=x=0;break;case yn:at=Math.max(a-z,0),ut=Math.max(y-z,0);break;case li:at=Math.max(a-z,0),E=0;break;case yi:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(at=b.width),isFinite(b.height)&&(ut=b.height);var ft=this.maxSize,mt=this.minSize;switch(x=Math.max(x-z,mt.width),E=Math.max(E-z,mt.height),at=Math.min(ft.width,at),ut=Math.min(ft.height,ut),at=isFinite(at)?Math.max(x,at):Math.max(ot,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(rt,E),x=Mv(this),x){case an:break;case yn:ot=at,rt=ut;break;case Qn:x=Math.min(at/ot,ut/rt),isFinite(x)||(x=1),ot*=x,rt*=x;break;default:oe(x+" is not a valid geometryStretch.")}this.Rd!==null?(ot===0&&(ot=.001),rt===0&&(rt=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=ot/tt.width,tt=rt/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&ve.$(this.ua.Sk,a-z)&&ve.$(this.ua.Rk,y-z)||(this.ua=Yi.makeGeometry(this,ot,rt)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&ot===0?0:tt.width+z,y===0&&rt===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),at+z,ut+z),b.w()?(at=b.width,ut=b.height,at=Math.min(ft.width,at),ut=Math.min(ft.height,ut),at=Math.max(mt.width,at),ut=Math.max(mt.height,ut),this.dc.h(0,0,at,ut)):this.dc.assign(tt)};function Mv(a){var y=a.geometryStretch;return a.Rd!==null?y===ji?yn:y:y===ji?Ev[a.figure].defaultStretch:y}Mt.eh=function(a,y,x,E){za(this,a,y,x,E)},Mt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Mt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),ot=z.m22*tt,rt=-z.m12*tt,at=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),mt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*ot+y*at+ft,tt=a*rt+y*ut+mt,ot=x*ot+E*at+ft,rt=x*rt+E*ut+mt,ft=this.ig/2,at=this.ua,at===null&&(this.measure(1/0,1/0),at=this.ua);var yt=at.bounds;if(ut=!1,at.type===En.j)if(1.5>=this.strokeWidth)ut=ve.Ve(at.startX,at.startY,at.endX,at.endY,z,tt,ot,rt,b);else{if(at.startX===at.endX?(E=ft,ut=0):(y=(at.endY-at.startY)/(at.endX-at.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=Hn(),a=new Rt,ve.Ve(at.startX+E,at.startY+ut,at.endX+E,at.endY+ut,z,tt,ot,rt,a)&&y.push(a),a=new Rt,ve.Ve(at.startX-E,at.startY-ut,at.endX-E,at.endY-ut,z,tt,ot,rt,a)&&y.push(a),a=new Rt,ve.Ve(at.startX+E,at.startY+ut,at.startX-E,at.startY-ut,z,tt,ot,rt,a)&&y.push(a),a=new Rt,ve.Ve(at.endX+E,at.endY+ut,at.endX-E,at.endY-ut,z,tt,ot,rt,a)&&y.push(a),ot=y.length,ot===0)return _n(y),!1;for(ut=!0,rt=1/0,E=0;E<ot;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<rt&&(rt=x,b.x=a.x,b.y=a.y);_n(y)}else if(at.type===En.u)ut=ve.Ff(yt.x-ft,yt.y-ft,yt.x+yt.width+ft,yt.y+yt.height+ft,z,tt,ot,rt,b);else if(at.type===En.F){y=Ze.allocAt(yt.x,yt.y,yt.width,yt.height).Bc(ft,ft);t:if(y.width===0)ut=ve.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,ot,rt,b);else if(y.height===0)ut=ve.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,ot,rt,b);else{if(a=y.width/2,at=y.height/2,E=y.x+a,ut=y.y+at,x=9999,z!==ot&&(x=(tt-rt)/(z-ot)),9999>Math.abs(x)){if(rt=tt-ut-x*(z-E),0>a*a*x*x+at*at-rt*rt){b.x=NaN,b.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+at*at-rt*rt),ot=(-(a*a*x*rt)+a*at*ft)/(at*at+a*a*x*x)+E,a=(-(a*a*x*rt)-a*at*ft)/(at*at+a*a*x*x)+E,at=x*(ot-E)+rt+ut,rt=x*(a-E)+rt+ut,Math.abs((z-ot)*(z-ot))+Math.abs((tt-at)*(tt-at))<Math.abs((z-a)*(z-a))+Math.abs((tt-rt)*(tt-rt))?(b.x=ot,b.y=at):(b.x=a,b.y=rt)}else{if(ot=at*at,rt=z-E,ot-=ot/(a*a)*rt*rt,0>ot){b.x=NaN,b.y=NaN,ut=!1;break t}rt=Math.sqrt(ot),ot=ut+rt,rt=ut-rt,Math.abs(ot-tt)<Math.abs(rt-tt)?(b.x=z,b.y=ot):(b.x=z,b.y=rt)}ut=!0}Ze.free(y)}else if(at.type===En.o){mt=Rt.alloc();var Ct=ot-z,kt=rt-tt,Ht=Ct*Ct+kt*kt,Dt=z,Xt=tt;if(0<Ht&&yt.contains(Dt,Xt)&&(mt.x=Dt,mt.y=Xt,this.ca(mt)))for(Ct!==0&&.5>Math.abs(Ct)?(kt*=.5/Ct,Ct=.5):kt!==0&&.5>Math.abs(kt)&&(Ct*=.5/kt,kt=.5),Dt-=Ct,Xt-=kt;yt.contains(Dt,Xt);)Dt-=Ct,Xt-=kt;for(b.x=ot,b.y=rt,kt=0;kt<at.figures.count;kt++){var $t=at.figures.s[kt],ie=$t.isFilled?Dt:z,fe=$t.isFilled?Xt:tt,Ae=$t.segments;yt=$t.startX,Ct=$t.startY;for(var Bn=yt,Kn=Ct,Gn=0;Gn<Ae.count;Gn++){var Pn=Ae.s[Gn],on=Pn.type,Bi=Pn.endX,Ei=Pn.endY,Go=!1;switch(on){case Ps:Bn=Bi,Kn=Ei;break;case vr:Go=Im(yt,Ct,Bi,Ei,ie,fe,ot,rt,mt);break;case aa:Go=ve.Eo(yt,Ct,Pn.point1X,Pn.point1Y,Pn.point2X,Pn.point2Y,Bi,Ei,ie,fe,ot,rt,.6,mt);break;case Al:Go=ve.Eo(yt,Ct,yt+2/3*(Pn.point1X-yt),Ct+2/3*(Pn.point1Y-Ct),Bi+2/3*(Pn.point1X-Bi),Ei+2/3*(Pn.point1Y-Ei),Bi,Ei,ie,fe,ot,rt,.6,mt);break;case ys:case Gl:on=Pn.type===ys?rl(Pn,$t):Ua(Pn,$t,yt,Ct);var gr=on.length;if(gr===0){Go=Im(yt,Ct,Pn.type===ys?Pn.centerX:Pn.endX,Pn.type===ys?Pn.centerY:Pn.endY,ie,fe,ot,rt,mt);break}for(Ei=null,Bi=0;Bi<gr;Bi++){if(Ei=on[Bi],Bi===0&&Im(yt,Ct,Ei[0],Ei[1],ie,fe,ot,rt,mt)){var qs=Fm(ie,fe,mt,Ht,b);qs<Ht&&(Ht=qs,ut=!0)}ve.Eo(Ei[0],Ei[1],Ei[2],Ei[3],Ei[4],Ei[5],Ei[6],Ei[7],ie,fe,ot,rt,.6,mt)&&(qs=Fm(ie,fe,mt,Ht,b),qs<Ht&&(Ht=qs,ut=!0))}Bi=Ei[6],Ei=Ei[7];break;default:oe("Unknown Segment type: "+on)}yt=Bi,Ct=Ei,Go&&(Go=Fm(ie,fe,mt,Ht,b),Go<Ht&&(Ht=Go,ut=!0)),Pn.isClosed&&(Bi=Bn,Ei=Kn,Im(yt,Ct,Bi,Ei,ie,fe,ot,rt,mt)&&(Pn=Fm(ie,fe,mt,Ht,b),Pn<Ht&&(Ht=Pn,ut=!0)))}}z=x-a,tt=E-y,ot=Math.sqrt(z*z+tt*tt),ot!==0&&(z/=ot,tt/=ot),b.x-=z*ft,b.y-=tt*ft,Rt.free(mt)}else oe("Unknown Geometry type: "+at.type);return ut?(this.transform.Ga(b),!0):!1};function Fm(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function Im(a,y,x,E,b,z,tt,ot,rt){if(ve.$(a,x)&&ve.$(y,E)||ve.$(b,tt)&&ve.$(z,ot))return!1;var at=!1,ut=(b-tt)*(y-E)-(z-ot)*(a-x);return ut===0?!1:(rt.x=((b*ot-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/ut,rt.y=((b*ot-z*tt)*(y-E)-(z-ot)*(a*E-y*x))/ut,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(rt.y>a||ve.$(rt.y,a))&&(rt.y<y||ve.$(rt.y,y))&&(at=!0)):(y=a<x?a:x,a=a<x?x:a,(rt.x>y||ve.$(rt.x,y))&&(rt.x<a||ve.$(rt.x,a))&&(at=!0)),at)}Mt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=Rt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),Rt.free(z),b},Mt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Gi.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Rt.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Rt.free(tt),!0;var ot=Rt.alloc(),rt=Rt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ot.x=b,ot.y=z,ot.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,Vc(this,tt,ot,rt)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Vc(this,tt,ot,rt)?y=!0:(ot.x=E,ot.y=a,ot.transform(x),Vc(this,tt,ot,rt)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Vc(this,tt,ot,rt)&&(y=!0)))),Rt.free(tt),Gi.free(x),Rt.free(ot),Rt.free(rt),y};function Vc(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Mt.tx=function(a,y,x){function E(Ht,Dt){for(var Xt=Ht.length,$t=0;$t<Xt;$t+=2)if(Dt.zd(Ht[$t],Ht[$t+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,ot=tt.x,rt=tt.y,at=tt.x+tt.width;if(tt=tt.y+tt.height,ms(a.x,a.y,ot,rt)<=b&&ms(a.x,a.y,at,rt)<=b&&ms(a.x,a.y,ot,tt)<=b&&ms(a.x,a.y,at,tt)<=b)return!0}if(ot=y.startX,rt=y.startY,at=y.endX,tt=y.endY,y.type===En.j){if(x=(ot-at)*(a.x-at)+(rt-tt)*(a.y-tt),lr(a.x,a.y,ot,rt,at,tt)<=(0<=(at-ot)*(a.x-ot)+(tt-rt)*(a.y-rt)&&0<=x?b:z))return!0}else{if(y.type===En.u)return y=!1,x&&(y=lr(a.x,a.y,ot,rt,ot,tt)<=b||lr(a.x,a.y,ot,rt,at,rt)<=b||lr(a.x,a.y,at,rt,at,tt)<=b||lr(a.x,a.y,ot,tt,at,tt)<=b),y;if(y.type===En.F){y=a.x-(ot+at)/2,z=a.y-(rt+tt)/2;var ut=Math.abs(at-ot)/2,ft=Math.abs(tt-rt)/2;if(ut===0||ft===0)return lr(a.x,a.y,ot,rt,at,tt)<=b;if(x){if(a=ve.$y(ut,ft,y,z),a*a<=b)return!0}else return!(ms(y,z,-ut,0)>=b||ms(y,z,0,-ft)>=b||ms(y,z,0,ft)>=b||ms(y,z,ut,0)>=b)}else if(y.type===En.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.x<z&&a.y>at&&a.y<ot&&lr(a.x,a.y,z,ot,z,at)>b&&lr(a.x,a.y,z,ot,rt,ot)>b&&lr(a.x,a.y,rt,at,z,at)>b&&lr(a.x,a.y,rt,at,rt,ot)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?mh(y,a.x,a.y,z):Hl(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>b)return!1;for(ot=z.segments.s,rt=ot.length,at=0;at<rt;at++)switch(ft=ot[at],ft.type){case Ps:case vr:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case aa:var mt=Hn();if(ve.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,mt),tt=E(mt,a),_n(mt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Al:if(mt=Hn(),ve.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,mt),tt=E(mt,a),_n(mt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ys:case Gl:mt=ft.type===ys?rl(ft,z):Ua(ft,z,tt,ut);var yt=mt.length;if(yt===0){if(tt=ft.type===ys?ft.centerX:ft.endX,ut=ft.type===ys?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var Ct=Hn(),kt=0;kt<yt;kt++)if(ft=mt[kt],Ct.length=0,ve.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Ct),E(Ct,a))return _n(Ct),!1;_n(Ct),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:oe("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Mt.qc=function(){this.ua=null},Mt.kq=function(){return this.ig};function mS(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Pp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=wr):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new ti(1-wr.x,wr.y)))}Yi.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Gh[a.toArrow];else a.fromArrow!=="None"?E=Gh[a.fromArrow]:(E=ve.Ze[a.figure],typeof E=="string"&&(E=ve.Ze[E]),E===void 0&&oe("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=ve.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function vS(a){var y=Gh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Gh[x],y===void 0){var E=null,b;for(b in ve.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=En.parse(ve.um[E],!1),Gh[E]=a,x!==E&&(Gh[x]=E),E}}return typeof y=="string"?y:y instanceof En?a:null}Gt.Object.defineProperties(Yi.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),xa(this)&&(a=this.part,a!==null&&Mr(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=En.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Rt.allocAt(-y.x,-y.y),Rt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Pf(a,"Shape.fill"),a instanceof tr&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Pf(a,"Shape.stroke"),a instanceof tr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else bn(a,"value >= 0",Yi,"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"?bn(a,'"butt", "round", or "square"',Yi,"strokeCap"):(Uc(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"?bn(a,'"miter", "bevel", or "round"',Yi,"strokeJoin"):(Uc(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){Uc(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||oe("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Uc(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=ve.Ze[a];typeof x=="function"?x=a:(x=ve.Ze[a.toLowerCase()])||oe("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vS(a);x===null?oe("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),mS(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vS(a);x===null?oe("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),mS(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:nn},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Uc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:nn},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Uc(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(Uc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:ji},set:function(a){var y=this.geometryStretch;y!==a&&(Uc(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Wh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Sh(x),this.v(),x=this.panel,x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Wh),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Wh),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Wh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Yi.prototype.intersectsRect=Yi.prototype.Yc,Yi.prototype.containedInRect=Yi.prototype.fh,Yi.prototype.getNearestIntersectionPoint=Yi.prototype.rs,Yi.prototype.getDocumentBounds=Yi.prototype.mi,Yi.prototype.getDocumentPoint=Yi.prototype.ga;var Gh=new Mi,Ev=new Mi;Yi.className="Shape",Yi.getFigureGenerators=function(){var a=new Xn,y;for(y in ve.Ze)y!==y.toLowerCase()&&a.add(y,ve.Ze[y]);return a.freeze(),a},Yi.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=ve.Ze;E[a]=y,E[x]=a},Yi.getArrowheadGeometries=function(){var a=new Xn;for(E in ve.um)if(Gh[E]===void 0){var y=En.parse(ve.um[E],!1);Gh[E]=y,y=E.toLowerCase(),y!==E&&(Gh[y]=E)}for(var x in Gh)if(x!==x.toLowerCase()){var E=Gh[x];E instanceof En&&a.add(x,E)}return a.freeze(),a},Yi.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=En.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||oe("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Gh;E[a]=x,E[y]=a};function Lv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=ji,this.gg=this.fg=nn}Lv.prototype.copy=function(){var a=new Lv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function yr(a,y){return ge.call(this),zm||(hl=os?new Mu(null).context:null,zm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Le(yr,ge),yr.prototype.cloneProtected=function(a){ge.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function Ch(a){a.da===null?a.da=new Fv:a.da.nc&&(a.da=a.da.copy())}Mt=yr.prototype,Mt.th=function(){ge.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function yS(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Mt.qb=function(a){a.classType===yr?this.wrap=a:ge.prototype.qb.call(this,a)},Mt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Mt.v=function(){ge.prototype.v.call(this)},Mt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=pp(this),ot=a.textAlign=this.textAlign,rt=y.tn;ot==="start"?ot=rt?"right":"left":ot==="end"&&(ot=rt?"left":"right"),rt=this.isUnderline;var at=this.isStrikethrough;as(this,a,this.xc,!0,!1,x,E),(rt||at)&&as(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var mt=y.scale;switch(8>(ft*ft+ut*ut)*mt*mt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Bl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Eo:a.translate(b,0),a.scale(-1,1);break;case eo:a.translate(0,z),a.scale(1,-1);break;case ar:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,mt=(y+tt+ft)*ut,z>mt&&(E=this.verticalAlignment,E=E.y*z-E.y*mt+E.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,ot,rt,at);else if(this.Qc!==null&&this.Qb!==null)for(mt=0;mt<ut;mt++){var yt=this.Qc[mt];yt>b&&(yt=b),E+=y,this.Oj(this.Qb[mt],a,0,E,b,tt,yt,x,ot,rt,at),E+=tt+ft}switch(this.flip){case Eo:a.scale(-1,1),a.translate(-b,0);break;case eo:a.scale(1,-1),a.translate(0,-z);break;case ar:a.scale(-1,-1),a.translate(-b,-z)}}},Mt.Oj=function(a,y,x,E,b,z,tt,ot,rt,at,ut){var ft=0;if(ot)rt==="left"?ft=0:rt==="right"?ft=b-tt:rt==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(rt==="left"?ft=0:rt==="right"?ft=b:rt==="center"&&(ft=b/2),b=Dm!==null?Dm(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),rt==="right"?ft-=tt:rt==="center"&&(ft-=tt/2),at){ot=Om!==null?Om(this,z):.8*z,rt=x+ft,at=E+ot,b=x+ft+tt,ot=E+ot;var mt=a;y.beginPath(),y.lineWidth=mt,y.moveTo(rt,at),y.lineTo(b,ot),y.stroke(),y.Se(),y instanceof Bl&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Bl&&y.ad.classList.add("gojs-td"))}},Mt.kk=function(a,y,x){if(!ge.prototype.kk.call(this,a,y,x))return!1;if(as(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)_y(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,_y(a,y,!0);return!0},Mt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:ge.prototype.nk.call(this,a)},Mt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Mt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;hl!==null&&ES!==z&&(ES=hl.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var ot=tt=0,rt=!1;!rt;){var at=z.indexOf(`
|
|
|
`,ot);at===-1&&(at=z.length,rt=!0),ot=z.substr(ot,at-ot),this.formatting===mp&&(ot=ot.trim()),tt=Math.max(tt,Wu(ot)),ot=at+1}z=tt}else tt=z.indexOf(`
|
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=Wu(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=xS(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,rt=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Rm&&(y=this.Ae,y=this.overflow===Rm?SS(y):0,at=this.spacingAbove+this.spacingBelow,at=Math.max(0,pp(this)+at),rt=Math.min(this.maxLines-1,Math.max(Math.floor(rt/at+.01)-1,0)),!(rt+1>=this.Qb.length))){for(this.l|=16777216,at=this.Qb[rt],y=Math.max(1,a-y);Wu(at)>y&&1<at.length;)at=at.substr(0,at.length-1);at+=vp,y=Wu(at),this.Qb[rt]=at,this.Qb=this.Qb.slice(0,rt+1),this.Qc[rt]=y,this.Qc=this.Qc.slice(0,rt+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===wS||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),vs(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Mt.eh=function(a,y,x,E){za(this,a,y,x,E)};function gp(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function bv(a,y,x,E){var b=a.formatting===mp;b&&(y=y.trim());var z=0,tt=a.Ae,ot=a.spacingAbove+a.spacingBelow;ot=Math.max(0,pp(a)+ot);var rt=a.overflow===Rm?SS(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,ot);else if(tt=y,a.wrap===kv){a.Le=1;var at=Wu(y);if(rt===0||at<=x)a.Cb=Math.max(a.Cb,at),gp(a,y,a.Cb),E!==null&&E.h(at,ot);else{for(z=fg(a,tt),tt=tt.substr(z.length),y=fg(a,tt),at=Wu(z+y);0<y.length&&at<=x;)z+=y,tt=tt.substr(y.length),y=fg(a,tt),at=z+y,b&&(at=at.trim()),at=Wu(at);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-rt);Wu(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=vp;var ut=Wu(z);a.Cb=ut,gp(a,z,ut),E!==null&&E.h(ut,ot)}}else{for(rt=0,tt.length===0&&(rt=1,gp(a,tt,0));0<tt.length;){for(y=fg(a,tt),tt=tt.substr(y.length);Wu(y)>x;){var ft=1;for(at=Wu(y.substr(0,ft)),ut=0;at<=x;)ft++,ut=at,at=Wu(y.substr(0,ft));if(ft===1){var mt=at;z=Math.max(z,at)}else mt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),gp(a,y.substr(0,ft),mt),rt++,y=y.substr(ft),a.Gc+rt>a.maxLines)break}for(ut=fg(a,tt),at=Wu(y+ut);0<ut.length&&at<=x;)y+=ut,tt=tt.substr(ut.length),ut=fg(a,tt),at=y+ut,b&&(at=at.trim()),at=Wu(at);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=at,z=Math.max(z,at)):(ft=ut=Wu(y),z=Math.max(z,ut)),gp(a,y,ft),rt++,a.Gc+rt>a.maxLines))break}a.Le=Math.min(a.maxLines,rt),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,ot*a.Le)}}function fg(a,y){if(a.wrap===PS)return y.substr(0,1);for(var x=y.length,E=0,b=S1;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===CS&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function Wu(a){return hl===null?8*a.length:hl.measureText(a).width}function pp(a){if(a.df!==null)return a.df;var y=a.Ae;if(hl===null){var x=16;return a.df=x}return Tv[y]!==void 0&&5e3>MS?x=Tv[y]:(x=1.3*hl.measureText("M").width,Tv[y]=x,MS++),a.df=x}function SS(a){if(hl===null)return 6;if(jm[a]!==void 0&&5e3>Bv)var y=jm[a];else y=hl.measureText(vp).width,jm[a]=y,Bv++;return y}function xS(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,pp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
|
|
|
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,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!==kv){a.Le=0;var rt=kn.alloc();bv(a,z,y,rt),b+=rt.height,kn.free(rt),a.Gc+=a.Le}else bv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(ot=!0)}z=tt+1}return a.Lq=b}Gt.Object.defineProperties(yr.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"||(Ch(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:an},set:function(a){var y=this.flip;y!==a&&(Ch(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:So},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ch(this),this.da.Yr=a,Ya(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=kn.alloc();bv(this,this.ec,999999,a);var y=a.width;kn.free(a),a=xS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),vs(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:Av},set:function(a){var y=this.wrap;y!==a&&(Ch(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Nv},set:function(a){var y=this.overflow;y!==a&&(Ch(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&&Pf(a,"TextBlock.stroke"),a instanceof tr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return pp(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&&(Ch(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&&(Ch(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 Wh),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Wh),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Wh),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new Wh),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Wh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(Ch(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(Ch(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(Ch(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(Ch(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:mp},set:function(a){var y=this.formatting;y!==a&&(Ch(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&bn(a,"> 0",yr,"maxLines"),Ch(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 Dm=null,Om=null,kv=new Ue(yr,"None",0),wS=new Ue(yr,"WrapFit",1),Av=new Ue(yr,"WrapDesiredSize",2),PS=new Ue(yr,"WrapBreakAll",3),Nv=new Ue(yr,"OverflowClip",0),Rm=new Ue(yr,"OverflowEllipsis",1),mp=new Ue(yr,"FormatTrim",0),CS=new Ue(yr,"FormatNone",0),S1=/[ \u200b\u00ad]/,Tv=new Mi,MS=0,jm=new Mi,Bv=0,vp="...",ES="",hl=null,zm=!1;yr.className="TextBlock";function Fv(){this.nc=!1,this.Hd=null,this.Xf=an,this.gq=mp,this.Jq=1/0,this.$q=Nv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=So,this.$r=Av}Fv.prototype.copy=function(){var a=new Fv;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},yr.getEllipsis=function(){return vp},yr.setEllipsis=function(a){vp=a,jm=new Mi,Bv=0},yr.getBaseline=function(){return Dm},yr.setBaseline=function(a){Dm=a},yr.getUnderline=function(){return Om},yr.setUnderline=function(a){Om=a},yr.isValidFont=function(a){if(zm||(hl=os?new Mu(null).context:null,zm=!0),hl===null)return!0;var y=hl.font;if(a===y||a==="10px sans-serif")return!0;hl.font="10px sans-serif",hl.font=a;var x=hl.font;if(x!=="10px sans-serif")return hl.font=y,!0;hl.font="19px serif";var E=hl.font;return hl.font=a,x=hl.font,hl.font=y,x!==E},yr.FormatNone=CS,yr.FormatTrim=mp,yr.None=kv,yr.OverflowClip=Nv,yr.OverflowEllipsis=Rm,yr.WrapBreakAll=PS,yr.WrapDesiredSize=Av,yr.WrapFit=wS;function Wh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Wh.prototype.copy=function(){var a=new Wh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Wh.className="GradElementSettings";function dl(a,y){ge.call(this),this.Eg=null,this.qo="",this.Xg=hr,this.Nk=yn,this.Zg=this.Hd=null,this.Mk=po,this.Xf=an,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 gg;Le(dl,ge),dl.prototype.cloneProtected=function(a){ge.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},dl.prototype.qb=function(a){a===an||a===Qn||a===co?this.imageStretch=a:ge.prototype.qb.call(this,a)},dl.prototype.toString=function(){return"Picture("+this.source+")#"+zo(this)};function pg(a){a===void 0&&(a=""),a!==""?gg[a]&&(delete gg[a],Hm--):(gg=new Mi,Hm=0)}function LS(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var ot=tt.length,rt=0;rt<ot;rt++)z=tt[rt],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(zs(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=Hn();for(var ot=0;ot<b;ot++)z.push(tt[ot]);if(y.hn)for(ot=0;ot<b;ot++)tt=z[ot],tt.Hd!==null&&tt.Hd(tt,x);_n(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}dl.prototype.hA=function(){if(this.source!==""){pg(this.source);var a=this.source;this.source="",this.source=a}},dl.prototype.redraw=function(){this.N(),this.Uc=!0},dl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof Kc)){var b=a instanceof Bl;E=this.naturalBounds;var z=0,tt=0,ot=this.qn,rt=ot?+x.width:x.naturalWidth;if(ot=ot?+x.height:x.naturalHeight,rt===void 0&&x.videoWidth&&(rt=x.videoWidth),ot===void 0&&x.videoHeight&&(ot=x.videoHeight),rt=rt||E.width,ot=ot||E.height,rt!==0&&ot!==0){var at=rt,ut=ot;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,rt=this.Xg.width,ot=this.Xg.height);var ft=rt,mt=ot,yt=this.Nk,Ct=this.Mk;switch(yt){case an:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)),mt>=E.height&&(tt=tt+Ct.offsetY+(mt*Ct.y-E.height*Ct.y)),rt=Math.min(E.width,ft),ot=Math.min(E.height,mt);break;case yn:ft=E.width,mt=E.height;break;case Qn:case co:yt===Qn?(yt=Math.min(E.height/mt,E.width/ft),ft*=yt,mt*=yt):yt===co&&(yt=Math.max(E.height/mt,E.width/ft),ft*=yt,mt*=yt,ft>=E.width&&(z=(z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)/ft)*rt),mt>=E.height&&(tt=(tt+Ct.offsetY+(mt*Ct.y-E.height*Ct.y)/mt)*ot),rt*=1/(ft/E.width),ot*=1/(mt/E.height),ft=E.width,mt=E.height)}yt=this.Df()*y.scale;var kt=ft*yt*mt*yt,Ht=rt*ot/kt,Dt=x.__goCache;yt=null;var Xt=x1;if(!b){if(x.sq&&Dt!==void 0&&4<kt&&Ht>Xt*Xt)for(Dt.gi===null&&(kS(Dt,4,at,ut,x),kS(Dt,16,at,ut,x)),b=Dt.gi,at=b.length,ut=0;ut<at&&b[ut].ratio*b[ut].ratio<Ht;ut++)yt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Mu(null).context;try{b.drawImage(this.Eg,0,0)}catch($t){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch($t){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Ct.offsetX+(E.width*Ct.x-ft*Ct.x):0,Ct=mt<E.height?Ct.offsetY+(E.height*Ct.y-mt*Ct.y):0,this.flip){case Eo:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case eo:a.translate(0,Math.min(E.height,mt)),a.scale(1,-1);break;case ar:a.translate(Math.min(E.width,ft),Math.min(E.height,mt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Dt!==void 0&&yt!==null&&yt.ratio!==1){a.save(),y=yt.ratio;try{a.drawImage(yt.source,z/y,tt/y,Math.min(yt.source.width,rt/y),Math.min(yt.source.height,ot/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,mt)),a instanceof Bl&&(this.bt=[z/y,tt/y,Math.min(yt.source.width,rt/y),Math.min(yt.source.height,ot/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,mt)])}catch($t){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,rt,ot,b,Ct,Math.min(E.width,ft),Math.min(E.height,mt)),a instanceof Bl&&(this.bt=[z,tt,rt,ot,b,Ct,Math.min(E.width,ft),Math.min(E.height,mt)])}catch($t){this.en=!1}switch(this.flip){case Eo:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case eo:a.scale(1,-1),a.translate(0,-Math.min(E.height,mt));break;case ar:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,mt))}}}}},dl.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=ul(this,!0),tt=this.Eg,ot=this.qn,rt=0,at=0;(ot||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(rt=ot?+tt.width:tt.naturalWidth,at=ot?+tt.height:tt.naturalHeight),isFinite(b.width)||z===yn||z===li?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=rt)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:rt),isFinite(b.height)||z===yn||z===yi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=at)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:at),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),vs(this.dc,a,y),this.Ge(0,0,a,y)},dl.prototype.eh=function(a,y,x,E){za(this,a,y,x,E)},Gt.Object.defineProperties(dl.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||oe("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Jg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new sn),E!==null&&x&&$d(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(zs(this,!1),this.v())):x&&LS(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=gg;if(os){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<Hm&&(pg(),x=gg),E=Fn("img"),E.hn=!0,LS(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,Hm++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new bS),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),dl.prototype.redraw=dl.prototype.redraw,dl.prototype.reloadSource=dl.prototype.hA;var Hm=0,x1=4;dl.className="Picture",gg=new Mi,dl.clearCache=pg;function bS(){this.gi=null}function kS(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Mu(null),tt=z.context,ot=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new AS(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(ot*x,0,0,ot*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}bS.className="PictureCacheArray";function AS(a,y){this.source=a,this.ratio=y}AS.className="PictureCacheInstance";function mg(){this.os=new En,this.mc=null}mg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new En,this.mc=null};function vg(a,y,x,E,b,z){a.mc=new Ks,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function w1(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}mg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new To(Ps);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},mg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new To(vr);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Ad(a,y,x,E,b,z,tt){var ot;ot===void 0&&(ot=!1);var rt=new To(aa);rt.point1X=y,rt.point1Y=x,rt.point2X=E,rt.point2Y=b,rt.endX=z,rt.endY=tt,ot&&rt.close(),a.mc.segments.add(rt)}function Gm(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new To(Al);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}mg.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var ot=new To(ys);ot.startAngle=a,ot.sweepAngle=y,ot.centerX=x,ot.centerY=E,ot.radiusX=b,ot.radiusY=z!==0?z:b,tt&&ot.close(),this.mc.segments.add(ot)};function P1(a,y,x,E,b,z,tt,ot){var rt;rt===void 0&&(rt=!1),y=new To(Gl,tt,ot,y,x,E,b,z),rt&&y.close(),a.mc.segments.add(y)}function NS(a){var y=Wm;return y!==null?(Wm=null,y.reset(a),y):(y=new mg,y.reset(a),y)}var Wm=null;mg.className="StreamGeometryContext";function Fa(a,y){var x=a.toLowerCase(),E=ve.Ze;E[a]=y,E[x]=a}Fa("Rectangle",function(a,y,x){a="r"+y+","+x;var E=ve.Mf[a];return E!==void 0||(E=new En(En.u),E.endX=y,E.endY=x,ve.Nf<ve.vm&&(ve.Mf[a]=E,ve.Nf++)),E}),Fa("Square",function(a,y,x){a="s"+y+","+x;var E=ve.Mf[a];return E!==void 0||(E=new En(En.u),E.endX=y,E.endY=x,E.defaultStretch=Qn,ve.Nf<ve.vm&&(ve.Mf[a]=E,ve.Nf++)),E}),Fa("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=ve.Mf[E];if(b!==void 0)return b;var z=a*ve.wg;return b=new En().add(new Ks(a,0,!0).add(new To(vr,y-a,0)).add(new To(aa,y,a,y-z,0,y,z)).add(new To(vr,y,x-a)).add(new To(aa,y-a,x,y,x-z,y-z,x)).add(new To(vr,a,x)).add(new To(aa,0,x-a,z,x,0,x-z)).add(new To(vr,0,a)).add(new To(aa,a,0,0,z,z,0).close())),1<z&&(b.spot1=new ti(0,0,z,z),b.spot2=new ti(1,1,-z,-z)),ve.Nf<ve.vm&&(ve.Mf[E]=b,ve.Nf++),b}),Fa("Border","RoundedRectangle"),Fa("Ellipse",function(a,y,x){a="e"+y+","+x;var E=ve.Mf[a];return E!==void 0||(E=new En(En.F),E.endX=y,E.endY=x,E.spot1=Ts,E.spot2=Ws,ve.Nf<ve.vm&&(ve.Mf[a]=E,ve.Nf++)),E}),Fa("Circle",function(a,y,x){a="c"+y+","+x;var E=ve.Mf[a];return E!==void 0||(E=new En(En.F),E.endX=y,E.endY=x,E.spot1=Ts,E.spot2=Ws,E.defaultStretch=Qn,ve.Nf<ve.vm&&(ve.Mf[a]=E,ve.Nf++)),E}),Fa("TriangleRight",function(a,y,x){return new En().add(new Ks(0,0).add(new To(vr,y,.5*x)).add(new To(vr,0,x).close())).pm(0,.25,.5,.75)}),Fa("TriangleDown",function(a,y,x){return new En().add(new Ks(0,0).add(new To(vr,y,0)).add(new To(vr,.5*y,x).close())).pm(.25,0,.75,.5)}),Fa("TriangleLeft",function(a,y,x){return new En().add(new Ks(y,x).add(new To(vr,0,.5*x)).add(new To(vr,y,0).close())).pm(.5,.25,1,.75)}),Fa("TriangleUp",function(a,y,x){return new En().add(new Ks(y,x).add(new To(vr,0,x)).add(new To(vr,.5*y,0).close())).pm(.25,.5,.75,1)}),Fa("Triangle","TriangleUp"),Fa("Diamond",function(a,y,x){return new En().add(new Ks(.5*y,0).add(new To(vr,0,.5*x)).add(new To(vr,.5*y,x)).add(new To(vr,y,.5*x).close())).pm(.25,.25,.75,.75)}),Fa("LineH",function(a,y,x){return a=new En(En.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Fa("LineV",function(a,y,x){return a=new En(En.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Fa("None","Rectangle"),Fa("BarH","Rectangle"),Fa("BarV","Rectangle"),Fa("MinusLine","LineH"),Fa("PlusLine",function(a,y,x){return new En().add(new Ks(0,x/2,!1).add(new To(vr,y,x/2)).add(new To(Ps,y/2,0)).add(new To(vr,y/2,x)))}),Fa("XLine",function(a,y,x){return new En().add(new Ks(0,x,!1).add(new To(vr,y,0)).add(new To(Ps,0,0)).add(new To(vr,y,x)))}),Fa("LineRight",function(a,y,x){return new En().add(new Ks(.25*y,0,!1).add(new To(vr,.75*y,.5*x)).add(new To(vr,.25*y,x)))}),Fa("LineDown",function(a,y,x){return new En().add(new Ks(0,.25*x,!1).add(new To(vr,.5*y,.75*x)).add(new To(vr,y,.25*x)))}),Fa("LineLeft",function(a,y,x){return new En().add(new Ks(.75*y,0,!1).add(new To(vr,.25*y,.5*x)).add(new To(vr,.75*y,x)))}),Fa("LineUp",function(a,y,x){return new En().add(new Ks(0,.75*x,!1).add(new To(vr,.5*y,.25*x)).add(new To(vr,y,.75*x)))}),ve.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Iv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=ns,this.ir=null,this.jr="",this.lr=nn,this.Gq="",this.Hq=Is,this.Pq=xr,this.Kq=es,this.Up=null,this.Cq=127,this.zr=cs,this.yr="gray",this.Vg=4}Iv.prototype.copy=function(){var a=new Iv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function ci(a,y){a===void 0||a instanceof Us||typeof a=="string"?Sn.call(this,a):(Sn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Rt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Ze,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Le(ci,Sn),ci.prototype.cloneProtected=function(a){Sn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Mt=ci.prototype,Mt.Af=function(a){Sn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Mt.toString=function(){var a=Vn(this.constructor)+"#"+zo(this);return this.data!==null&&(a+="("+wi(this.data)+")"),a};function cl(a){a.P===null?a.P=new Iv:a.P.nc&&(a.P=a.P.copy())}Mt.th=function(){Sn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Mt.gk=function(a,y,x,E,b,z,tt){var ot=this.diagram;ot!==null&&(a===gs&&y==="elements"?b instanceof Sn?Zc(b,function(rt){ay(ot.partManager,rt),Oc(ot,rt)}):$d(ot,b):a===Ds&&y==="elements"&&(b instanceof Sn?Zc(b,function(rt){ly(ot.partManager,rt,ot)}):Jg(ot,b)),ot.cb(a,y,x,E,b,z,tt))},Mt.La=function(a){if(Sn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof Sn&&Zc(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},ci.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},ci.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},ci.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new Xn),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},ci.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},ci.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Hn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);_n(y)}},ci.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Ii?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Fo))break t;Eu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Sn.Link),x.adornedObject=y)}if(x!==null){x.type===Sn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(C1(this,a),y=this.adornments;y.next();)y.value.La()}},ci.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Dv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function C1(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Km(a){if(ic(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function TS(a){if(a.G|=2097152,ic(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||IS(a,y,x),x=a.Ib;var E=Ze.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Ze.free(E),Rv(a,!1)}}ci.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Gi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},ci.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=po;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Rt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Rt.free(tt)}},ci.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ci.prototype.moveTo=function(a,y,x){a=Rt.allocAt(a,y),this.move(a,x),Rt.free(a)},ci.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},ci.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},ci.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Xn),y.I(a)!==null)return y.I(a);var x=Sn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Nd(a,y,x,E){E===void 0&&(E=new Rt),x=x.Mc()?po:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}ci.prototype.mi=function(a){return a===void 0&&(a=new Ze),a.assign(this.actualBounds)},ci.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function BS(a){var y=Rt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Yi?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function Yc(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=uS(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}ci.prototype.arrange=function(){if(Xa(this)===!1)TS(this);else{jh(this,!1);var a=this.Ib,y=Ze.alloc();y.assign(a);var x=oc(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;IS(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||ve.B(y.width,a.width)&&ve.B(y.height,a.height)||0<=this.vw&&this.C(16),Ze.free(y),Rv(this,!1)}},Mt=ci.prototype,Mt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Ze.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),Ze.free(b)}!(this.G&65536)&&a.D(y)||RS(this,E,x),x.N(),!a.w()&&!y.w()||gl(a,y)||(this instanceof On&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Mt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&FS(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Rt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),ic(this)===!1&&Xa(this)===!1&&(Km(this),TS(this)),!0};function FS(a,y,x,E,b){y===null||a instanceof Fo||(y=y.animationManager,y.zb&&$u(y,a,new Rt(E,b),x))}Mt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;ic(this)||Xa(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}Km(this)},Mt.Av=function(){this.G&=-2097153,Km(this)};function IS(a,y,x){var E=BS(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?DS(a,y,x,b,E):OS(a,y,x,b,E):z?DS(a,y,x,b,E):tt&&OS(a,y,x,b,E),a.G|=2097152,Rt.free(E),a.Uk()}function DS(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Fo||$u(x,a,new Rt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Rt(z,tt),y.copy()))}function OS(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function RS(a,y,x){jv(a,!1),a instanceof On&&Cd(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?oc(a)?(Tu(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Mt.si=function(){return!0},Mt.Zc=function(){return!0},Mt.ph=function(){return!1},Mt.Dd=function(){return!0};function Ov(a,y,x,E){y.constructor===a.constructor||HS||(HS=!0,Jn('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Jn(" Old class: "+Vn(a.constructor)+", new class: "+Vn(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,ot=!0,rt=!0,at=!1;a instanceof On&&(ot=a.isTreeLeaf,rt=a.isTreeExpanded,at=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof On&&(a.U=ot?a.U|4:a.U&-5,a.U=rt?a.U|1:a.U&-2,a.U=at?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}ci.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},ci.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},ci.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},ci.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},ci.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},ci.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},ci.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},ci.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},ci.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function ic(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function oc(a){return(a.G&131072)!==0}Mt=ci.prototype,Mt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}Mt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Mt.N=function(){var a=this.diagram;a!==null&&!Xa(this)&&!ic(this)&&this.isVisible()&&this.Ib.w()&&a.N(Yc(this,this.Ib))},Mt.v=function(){Sn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof On&&this.labeledLink!==null&&Ya(this.labeledLink),a.$b(!0))},Mt.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},Mt.Wo=function(a){a||(a=this.Ah,a!==null&&Uv(a,this))},Mt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Mt.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof On&&(y=y.labeledLink,y!==null)?zv(a,y):0}Mt.sz=function(){return jS(this,this)};function jS(a,y){var x=y.containingGroup;return x!==null||y instanceof On&&(x=y.labeledLink,x!==null)?jS(a,x):y}Mt.Td=function(a){return a instanceof Ii?Hv(this,this,a):!1};function Hv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!Hv(a,E,x)?y instanceof On&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}Mt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Ii&&Zm(y,!0),y instanceof On){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof On&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Ii&&Zm(y,!1),y instanceof On&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},ci.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof On&&this.isLinkLabel)},ci.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof On&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function zS(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function rc(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Fo)){if(a.add(y),y instanceof On){if(x&&y instanceof Ii)for(var tt=y.memberParts;tt.next();)rc(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var ot=tt.value;if(!a.contains(ot)){var rt=ot.fromNode,at=ot.toNode;rt=rt===null||a.contains(rt),at=at===null||a.contains(at),(b?rt&&at:rt||at)&&rc(a,ot,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)rc(a,y.value,x,E-1,b,z)}else if(y instanceof Cn)for(y=y.labelNodes;y.next();)rc(a,y.value,x,E,b,z)}}Gt.Object.defineProperties(ci.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Ui:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(Ds,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(gs,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(cl(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&wu(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof Fo?this.type!==Sn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:xr},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),cl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:es},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),cl(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(cl(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:Is},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),cl(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Xa(this)===!1&&(Km(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),FS(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof Fo)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof Fo?this instanceof Fo&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Eu(x),x=x.copy(),x!==null&&Ov(this,x,y,a))):(z!==null&&z.jm(E,a),x=dx(x.partManager,E,a),x!==null&&(Eu(x),x=x.copy(),x===null||x instanceof Cn||(E=this.location.copy(),Ov(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Ov(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(cl(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&&(cl(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&&(cl(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof Cn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(cl(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&&(cl(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&&(cl(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:ns},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),cl(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&&(cl(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&&(cl(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:nn},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),cl(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&oe("Cannot make a Group a member of itself: "+this.toString()),oe("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Uv(y,this):this instanceof Ii&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof Ii&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof Ii){for(x=new sn,rc(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof On)for(E=E.linksConnected;E.next();)yg(E.value)}if(this instanceof On){for(x=this.linksConnected;x.next();)yg(x.value);x=this.labeledLink,x!==null&&yg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&wu(y,-1,a))}}else oe("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(cl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof On&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(cl(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&&(cl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:cs},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),cl(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&&(cl(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&&(cl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),ci.prototype.invalidateLayout=ci.prototype.C,ci.prototype.findCommonContainingGroup=ci.prototype.px,ci.prototype.isMemberOf=ci.prototype.Td,ci.prototype.findTopLevelPart=ci.prototype.sz,ci.prototype.findSubGraphLevel=ci.prototype.oz,ci.prototype.ensureBounds=ci.prototype.Va,ci.prototype.getDocumentBounds=ci.prototype.mi,ci.prototype.findObject=ci.prototype.fb,ci.prototype.moveTo=ci.prototype.moveTo,ci.prototype.invalidateAdornments=ci.prototype.Wb,ci.prototype.clearAdornments=ci.prototype.Ej,ci.prototype.removeAdornment=ci.prototype.Jf,ci.prototype.addAdornment=ci.prototype.bh,ci.prototype.findAdornment=ci.prototype.Pj,ci.prototype.updateTargetBindings=ci.prototype.La;var HS=!1;ci.className="Part",ci.LayoutNone=0,ci.LayoutAdded=1,ci.LayoutRemoved=2,ci.LayoutShown=4,ci.LayoutHidden=8,ci.LayoutNodeSized=16,ci.LayoutGroupLayout=32,ci.LayoutNodeReplaced=64,ci.LayoutStandard=127,ci.LayoutAll=16777215;function Fo(a,y){a===void 0||a instanceof Us||typeof a=="string"?ci.call(this,a):(ci.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)}Le(Fo,ci),Fo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Fo.prototype.updateRelationshipsFromData=function(){},Fo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Cn&&y instanceof Yi){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof Yi&&(b.ua=a)}}},Fo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Xa(a))},Fo.prototype.Zc=function(){return!1},Fo.prototype.gk=function(a,y,x,E,b,z,tt){if(a===gs&&y==="elements"){if(b instanceof Ja)this.$a===null&&(this.$a=b);else if(b instanceof Sn){var ot=b.Nl(function(rt){return rt instanceof Ja});ot instanceof Ja&&this.$a===null&&(this.$a=ot)}}else a===Ds&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Sn&&this.$a.rg(E)&&(this.$a=null));ci.prototype.gk.call(this,a,y,x,E,b,z,tt)},Fo.prototype.updateAdornments=function(){},Fo.prototype.Lj=function(){},Gt.Object.defineProperties(Fo.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),Fo.className="Adornment";function Gv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=ol,this.er=Ym,this.Kr=this.ij=this.Nq=this.Mq=null}Gv.prototype.copy=function(){var a=new Gv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function On(a,y){a===void 0||a instanceof Us||typeof a=="string"?ci.call(this,a):(ci.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new cn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Le(On,ci),On.prototype.cloneProtected=function(a){ci.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Mt=On.prototype,Mt.Af=function(a){ci.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Td(a){a.Ba===null?a.Ba=new Gv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Mt.th=function(){ci.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function GS(a,y){y!==null&&(a.af===null&&(a.af=new sn),a.af.add(y))}function WS(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Mt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=WS(this,a,y,x),a!==null&&a.Sl()},Mt.gk=function(a,y,x,E,b,z,tt){a===gs&&y==="elements"?this.wc=null:a===Ds&&y==="elements"&&(this.wc=null),ci.prototype.gk.call(this,a,y,x,E,b,z,tt)},Mt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Fl(x.fromPort),Fl(x.toPort),x.bb())}};function KS(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Fl(x.fromPort),Fl(x.toPort),x.bb())}}function Fl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Fl(y.port)}}Mt.si=function(){return!0},On.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},On.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},On.prototype.isVisible=function(){if(!ci.prototype.isVisible.call(this))return!1;var a=!0,y=Ed,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ed){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===js){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===ig&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},On.prototype.Zb=function(a){ci.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},On.prototype.qx=function(){var a=new sn,y=new sn;return ZS(this,this,a,y),y.iterator};function ZS(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&ZS(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}On.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new zi(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Mt=On.prototype,Mt.Mo=function(a){a===void 0&&(a=null);var y=new zi(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Mt.Sd=function(a){a===void 0&&(a=null);var y=new zi(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Mt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new sn,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new sn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new ki(x):Ui},Mt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new sn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new ki(x):Ui},Mt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new sn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new ki(x):Ui},Mt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new zi(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Mt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new zi(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function Um(a,y,x){Fl(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function Vm(a,y,x){Fl(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):yp(y)))}function yp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}On.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Mt=On.prototype,Mt.Vo=function(a){ci.prototype.Vo.call(this,a),a||(yp(this),a=this.Yk,a!==null&&$S(a,this))},Mt.Wo=function(a){ci.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Mt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,ci.prototype.Lj.call(this)},Mt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;US(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function US(a){a.wc===null?a.wc=new Xn:a.wc.clear(),a.qm(a,function(y,x){VS(y,x)}),a.wc.count===0&&a.wc.add("",a)}function VS(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Wv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=Hn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);_n(x)}}}Mt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Mt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Mt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Zm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)Zm(y,!1),y=y.pg();return x},Mt.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Mt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof On)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Mt.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new sn;return a(this,y),y},Mt.uz=function(){return YS(this,this)};function YS(a,y){return y=y.pg(),y===null?0:1+YS(a,y)}Mt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new zi(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Mt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new cn,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new cn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new ki(x):Ui},Mt.wz=function(a){a===void 0&&(a=1/0);var y=new sn;return rc(y,this,!1,a,!0),y},On.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new sn;x.add(this),XS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ed),y.Ue=!1}};function XS(a,y,x,E,b,z,tt){if(1<E)for(var ot=x?a.Mo():a.Sd();ot.next();){var rt=ot.value;rt.isTreeLink&&(rt=rt.To(a),rt===null||rt===a||y.contains(rt)||(y.add(rt),XS(rt,y,x,E-1,b,z,tt)))}else QS(a,y,x,b,z,tt)}function QS(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),rt={};ot.next();){var at=ot.value;if(at.isTreeLink&&(at=at.To(a),at!==null&&at!==a)){var ut=y.contains(at);if(ut||y.add(at),tt){var ft=x?at.Oo():at.Po();rt.uv=a,ft.all(function(mt){return function(yt){return yt===mt.uv||!yt.isTreeExpanded}}(rt))&&E.Aj(at,b),at.oh(),at.Zb(!1)}at.isTreeExpanded&&(at.wasTreeExpanded=at.isTreeExpanded,ut||QS(at,y,x,E,b,z))}rt={uv:rt.uv}}a.isTreeExpanded=!1}On.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new sn;x.add(this),JS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ed),y.Ue=!1}};function JS(a,y,x,E,b,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 ft=x?ut.Oo():ut.Po();at.vv=a,ft.all(function(mt){return function(yt){return yt===mt.vv||!yt.isTreeExpanded}}(at))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,JS(ut,y,x,E-1,b,z,tt))}at={vv:at.vv}}a.isTreeExpanded=!0}Gt.Object.defineProperties(On.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Ym},set:function(a){var y=this.portSpreading;y!==a&&(Td(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Cd(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:ol},set:function(a){typeof a=="number"&&(a=new hi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Td(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Cd(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(Td(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(Td(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(Td(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&($S(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),Ya(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&US(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Td(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),On.prototype.expandTree=On.prototype.expandTree,On.prototype.collapseTree=On.prototype.collapseTree,On.prototype.findTreeParts=On.prototype.wz,On.prototype.findTreeChildrenNodes=On.prototype.Ou,On.prototype.findTreeChildrenLinks=On.prototype.Qo,On.prototype.findTreeLevel=On.prototype.uz,On.prototype.findTreeParentChain=On.prototype.vz,On.prototype.findTreeParentNode=On.prototype.pg,On.prototype.findTreeParentLink=On.prototype.kh,On.prototype.findCommonTreeParent=On.prototype.gz,On.prototype.findTreeRoot=On.prototype.xz,On.prototype.isInTreeOf=On.prototype.Nz,On.prototype.findPort=On.prototype.ns,On.prototype.findLinksTo=On.prototype.kz,On.prototype.findLinksBetween=On.prototype.jz,On.prototype.findNodesInto=On.prototype.Oo,On.prototype.findNodesOutOf=On.prototype.Po,On.prototype.findNodesConnected=On.prototype.Mu,On.prototype.findLinksInto=On.prototype.Sd,On.prototype.findLinksOutOf=On.prototype.Mo,On.prototype.findExternalTreeLinksConnected=On.prototype.qx,On.prototype.invalidateConnectedLinks=On.prototype.Bd,On.prototype.invalidateLinkBundle=On.prototype.Lz;var M1=new Ue(On,"SpreadingNone",10),Ym=new Ue(On,"SpreadingEvenly",11),Kv=new Ue(On,"SpreadingPacked",12);On.className="Node",On.SpreadingNone=M1,On.SpreadingEvenly=Ym,On.SpreadingPacked=Kv;function Ii(a,y){a===void 0||a instanceof Us||typeof a=="string"?On.call(this,a):(On.call(this),a&&(y=a)),this.U|=4608,this.Gn=new sn,this.$a=null,this.Sc=new Br,this.Sc.group=this,this.gl=new sn,this.tb=this.$p=null,y&&Object.assign(this,y)}Le(Ii,On),Ii.prototype.cloneProtected=function(a){On.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ja});y instanceof Ja?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},Mt=Ii.prototype,Mt.Af=function(a){On.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof On)x.Bd(y);else if(x instanceof Cn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Mt.gk=function(a,y,x,E,b,z,tt){if(a===gs&&y==="elements"){if(b instanceof Ja)this.$a===null?this.$a=b:this.$a!==b&&oe("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Sn){var ot=b.Nl(function(rt){return rt instanceof Ja});ot instanceof Ja&&(this.$a===null?this.$a=ot:this.$a!==ot&&oe("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Ds&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Sn&&this.$a.rg(E)&&(this.$a=null));On.prototype.gk.call(this,a,y,x,E,b,z,tt)},Mt.Xl=function(a,y){On.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Sn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Sn&&(a=a.Pb()),this.tb===null&&(this.tb=new Ze),a.mi(this.tb),a instanceof Yi&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Mt.eh=function(a,y,x,E){this.nf=this.$a,On.prototype.eh.call(this,a,y,x,E)},Mt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Cn||y.Va()}),On.prototype.Va.call(this)},Mt.si=function(){if(!On.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof On){if(y.isVisible()&&Xa(y))return!1}else if(y instanceof Cn&&y.isVisible()&&Xa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof Ii&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Cn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Uv(a,y){if(a.Gn.remove(y)){y instanceof Ii&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Cn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Mt.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}On.prototype.Lj.call(this)},Ii.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=ze(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Ii.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=ze(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},Ii.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Mt=Ii.prototype,Mt.Bd=function(a){var y=(this.U&65536)!==0;if(On.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(Fl(x.fromPort),Fl(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Fl(x.fromPort),Fl(x.toPort),x.bb()))}}},Mt.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new sn,E=y.iterator;E.next();){var b=E.value;if(b instanceof On)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Mt.iz=function(){var a=this.Rj();a.add(this);for(var y=new sn,x=a.iterator;x.next();){var E=x.value;if(E instanceof On)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Mt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new sn;return a(this,y),y},Mt.Rj=function(){var a=new sn;return rc(a,this,!0,0,!0),a.remove(this),a},Mt.Zb=function(a){On.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Ii.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();_S(this,y,a,this),a.Ue=!1}};function _S(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof Ii&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,_S(z,y,x,E)),z instanceof On)z.Bd(y),x.Aj(z,E);else if(z instanceof Cn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}Ii.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();qS(this,y,a,this),a.Ue=!1}};function qS(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof Ii&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,qS(z,y,x,E)),z instanceof On)z.Bd(y),x.Cj(z,E);else if(z instanceof Cn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}Ii.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=Rt.alloc(),On.prototype.move.call(this,a,y),a=new sn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Cn&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof On&&b.isLinkLabel)){var tt=b.position,ot=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):ot.w()&&(z.x=ot.x+E,z.y=ot.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Cn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),Yv(b)&&b.bb());Rt.free(z)}},Gt.Object.defineProperties(Ii.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&oe("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(Td(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(Td(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(Td(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(Td(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),Ii.prototype.expandSubGraph=Ii.prototype.expandSubGraph,Ii.prototype.collapseSubGraph=Ii.prototype.collapseSubGraph,Ii.prototype.findSubGraphParts=Ii.prototype.Rj,Ii.prototype.findContainingGroupChain=Ii.prototype.hz,Ii.prototype.findExternalNodesConnected=Ii.prototype.iz,Ii.prototype.findExternalLinksConnected=Ii.prototype.Lu,Ii.prototype.ensureBounds=Ii.prototype.Va,Ii.className="Group";function Ja(a){ge.call(this),this.yb=Js,this.ko=new Ze(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Le(Ja,ge),Ja.prototype.cloneProtected=function(a){ge.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return As(0,0,y.width,y.height,a.x,a.y)},Ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ii||a instanceof Fo)||oe("Placeholder is not inside a Group or Adornment."),a instanceof Ii){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(vs(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Rt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Rt.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof Yi&&(tt=z.strokeWidth);var ot=z.Df(),rt=z.naturalBounds,at=(rt.width+tt)*ot;tt=(rt.height+tt)*ot,a.type!==Sn.Link&&(ot=z.ga(a.category==="Selection"?Is:a.locationSpot,Rt.alloc()),a.location=ot,Rt.free(ot)),isNaN(at)||isNaN(tt)?(a=z.ga(Is,Rt.alloc()),at=Ze.allocAt(a.x,a.y,0,0),at.Ye(z.ga(Ca,a)),at.Ye(z.ga(Pa,a)),at.Ye(z.ga(Ia,a)),vs(y,at.width+E||0,at.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Rt.free(a),Ze.free(at)):(vs(y,at+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ja.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Ii&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=Ze.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof Ii&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),Ze.free(x),E&&y instanceof Ii&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Ii))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var ot=tt.value;if(ot.isVisible()){if(ot instanceof Cn&&(!y.computesBoundsIncludingLinks||Ql(ot)||ot.fromNode===y||ot.toNode===y))continue;ot=ot.actualBounds,ot.left<x&&(x=ot.left),ot.top<E&&(E=ot.top),ot.right>b&&(b=ot.right),ot.bottom>z&&(z=ot.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},Gt.Object.defineProperties(Ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new hi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ja.className="Placeholder";function Cn(a){ci.call(this,Sn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=_a,this.Om=0,this.Qm=_a,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new cn().freeze(),this.Tg=this.Mg=null,this.ml=new Ze,this.ua=new En,this.u=this.o=this.Sf=this.Wf=null,this.su=new Rt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Le(Cn,ci),Cn.prototype.cloneProtected=function(a){ci.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},Mt=Cn.prototype,Mt.Af=function(a){ci.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&&Fl(y),a=a.toPort,a!==null&&Fl(a)},Mt.qb=function(a){a.classType===Cn?(a.value&2)===2?this.routing=a:a===_l||a===Fd||a===xg?this.curve=a:a===wp||a===$m||a===t0?this.adjusting=a:a!==Jv&&a!==_a&&oe("Unknown Link enum value for a Link property: "+a):ci.prototype.qb.call(this,a)},Mt.Xc=function(){this.ba===null&&(this.ba=new ap)},Mt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Xa(a)||ic(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Xa(a)||ic(a)))},Mt.zv=function(){return!1},Mt.Av=function(){},Mt.Zc=function(){return!1},Cn.prototype.computeAngle=function(a,y,x){return Cn.computeAngle(y,x)},Cn.computeAngle=function(a,y){switch(a){default:case _a:a=0;break;case Pp:a=y;break;case Cp:a=y+90;break;case Mp:a=y-90;break;case _v:a=y+180;break;case e0:a=ve.bp(y),90<a&&270>a&&(a-=180);break;case Ep:a=ve.bp(y+90),90<a&&270>a&&(a-=180);break;case Lp:a=ve.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=ve.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return ve.bp(a)};function yg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&Uv(x,a),a.Ah=y,y!==null&&Zv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Mt=Cn.prototype,Mt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&ci.prototype.oh.call(this)},Mt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Mt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function $S(a,y){a.wd===null&&(a.wd=new sn),a.wd.add(y),a.v()}Mt.Vo=function(a){if(ci.prototype.Vo.call(this,a),Xc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Um(x,this,E)}Sp(this)}},Mt.Wo=function(a){if(ci.prototype.Wo.call(this,a),Xc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Vm(x,this,E)}xp(this)}},Mt.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},Cn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Cn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?ci.prototype.move.call(this,a,!1):(a=Rt.allocAt(x.x+E,x.y+b),ci.prototype.move.call(this,a,!1),Rt.free(a)),Bd(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Cn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Cn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Cn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(us),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===_l))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()===_l){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return ve.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),ve.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Cn.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===_l))return this.ua.wx(.5);if(this.computeCurve()===_l&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),ve.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Mt=Cn.prototype,Mt.i=function(a){return this.Nb.s[a]},Mt.dd=function(a,y){this.Nb.cd(a,y)},Mt.L=function(a,y,x){this.Nb.cd(a,new Rt(y,x))},Mt.Kz=function(a,y){this.Nb.Gb(a,y)},Mt.m=function(a,y,x){this.Nb.Gb(a,new Rt(y,x))},Mt.ne=function(a){this.Nb.add(a)},Mt.yf=function(a,y){this.Nb.add(new Rt(a,y))},Mt.pv=function(a){this.Nb.mb(a)},Mt.Fj=function(){this.Nb.clear()};function Bd(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new cn,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Rt(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Ya(a)),E?Xm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&Cr(tt.animationManager,a,b),a.g("points",z,b)}}Mt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Mt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var ot=b[tt];x=Math.min(ot.x,x),E=Math.min(ot.y,E)}ot=tt=1/0;for(var rt=y.s,at=rt.length,ut=0;ut<at;ut++){var ft=rt[ut];tt=Math.min(ft.x,tt),ot=Math.min(ft.y,ot),ft.freeze()}if(y.freeze(),at===z){for(z=0;z<at;z++)if(ut=b[z],ft=rt[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-ot){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Cr(x.animationManager,this,y),Xm(this),this.g("points",a,y)}},Mt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Xm(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),qm(a,!1))}Mt.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Mt.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},Cn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ef||(Ef=new On,Ef.desiredSize=Ki,Ef.Va()),this.defaultFromPoint&&(Ef.location=this.defaultFromPoint,Ef.Va(),y=a=Ef)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(Lf||(Lf=new On,Lf.desiredSize=Ki,Lf.Va()),this.defaultToPoint&&(Lf.location=this.defaultToPoint,Lf.Va(),b=E=Lf)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var ot=Sg(tt),rt=Sg(x),at=y===b&&y!==null,ut=this.isOrthogonal,ft=this.curve===_l;this.Wf=at&&!ut?ft=!0:!1;var mt=this.computeAdjusting()===_a||at;if(!ut&&!at&&ot&&rt){if(ot=!1,!mt&&3<=z&&(mt=this.getLinkPoint(a,y,tt,!0,!1,E,b),rt=this.getLinkPoint(E,b,x,!1,!1,a,y),ot=this.adjustPoints(0,mt,z-1,rt))&&(mt=this.getLinkPoint(a,y,tt,!0,!1,E,b),rt=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,mt,z-1,rt)),!ot)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),mt=this.getLinkPoint(E,b,x,!1,!1,a,y),ot=mt.x-z.x,rt=mt.y-z.y,at=this.computeCurviness(),ft=ut=0;var yt=z.x+ot/3,Ct=z.y+rt/3,kt=yt,Ht=Ct;ve.B(rt,0)?Ht=0<ot?Ht-at:Ht+at:(ut=-ot/rt,ft=Math.sqrt(at*at/(ut*ut+1)),0>at&&(ft=-ft),kt=(0>rt?-1:1)*ft+yt,Ht=ut*(kt-yt)+Ct),yt=z.x+2*ot/3,Ct=z.y+2*rt/3;var Dt=yt,Xt=Ct;ve.B(rt,0)?Xt=0<ot?Xt-at:Xt+at:(Dt=(0>rt?-1:1)*ft+yt,Xt=ut*(Dt-yt)+Ct),this.Fj(),this.ne(z),this.yf(kt,Ht),this.yf(Dt,Xt),this.ne(mt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,mt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,mt),b=this.getLinkPoint(z,mt,x,!1,!1,a,y),this.hasCurviness()?(mt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+mt/2,y=E.y+x/2,z=a,ot=y,ve.B(x,0)?ot=0<mt?ot-tt:ot+tt:(mt=-mt/x,z=Math.sqrt(tt*tt/(mt*mt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,ot=mt*(z-a)+y),this.ne(E),this.yf(z,ot),this.ne(b)):(this.ne(E),this.ne(b),ot=Ze.alloc(),y.mi(ot),rt=ot.ca(b),mt.mi(ot),at=ot.ca(E),(rt||at)&&(tt=y.ga(Jm(tt),new Rt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=mt.ga(Jm(x),new Rt),this.dd(1,this.getLinkPointFromPoint(z,mt,x,E,!1,x))),Ze.free(ot))}else{ft=this.isAvoiding,mt&&(ut&&ft||at)&&this.Fj();var $t=at?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),yt=kt=Ct=0,(ut||!ot||at)&&(Ht=this.computeEndSegmentLength(a,y,tt,!0),yt=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),at&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(yt-=ut?90:30,0>$t&&(yt-=180)),0>yt?yt+=360:360<=yt&&(yt-=360),at&&(Ht+=Math.abs($t)*(ut?1:2)),yt===0?Ct=Ht:yt===90?kt=Ht:yt===180?Ct=-Ht:yt===270?kt=-Ht:(Ct=Ht*Math.cos(yt*Math.PI/180),kt=Ht*Math.sin(yt*Math.PI/180)),tt.Mc()&&at&&(Ht=y.ga(po,Rt.alloc()),Dt=Rt.allocAt(Ht.x+1e3*Ct,Ht.y+1e3*kt),this.getLinkPointFromPoint(a,y,Ht,Dt,!0,ft),Rt.free(Ht),Rt.free(Dt))),Ht=this.getLinkPoint(E,b,x,!1,ut,a,y);var ie=Xt=Dt=0;if(ut||!rt||at){var fe=this.computeEndSegmentLength(E,b,x,!1);ie=this.getLinkDirection(E,b,Ht,x,!1,ut,a,y),at&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ie+=ut?0:30,0>$t&&(ie+=180)),0>ie?ie+=360:360<=ie&&(ie-=360),at&&(fe+=Math.abs($t)*(ut?1:2)),ie===0?Dt=fe:ie===90?Xt=fe:ie===180?Dt=-fe:ie===270?Xt=-fe:(Dt=fe*Math.cos(ie*Math.PI/180),Xt=fe*Math.sin(ie*Math.PI/180)),x.Mc()&&at&&(x=b.ga(po,Rt.alloc()),tt=Rt.allocAt(x.x+1e3*Dt,x.y+1e3*Xt),this.getLinkPointFromPoint(E,b,x,tt,!1,Ht),Rt.free(x),Rt.free(tt))}x=ft,(ut||!ot||at)&&(x=new Rt(ft.x+Ct,ft.y+kt)),tt=Ht,(ut||!rt||at)&&(tt=new Rt(Ht.x+Dt,Ht.y+Xt)),!mt&&!ut&&ot&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Ht):!mt&&!ut&&rt&&3<z&&this.adjustPoints(1,x,z-1,Ht)?this.dd(0,ft):!mt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Ht)):(this.Fj(),this.ne(ft),(ut||!ot||at)&&this.ne(x),ut&&this.addOrthoPoints(x,yt,tt,ie,a,E),(ut||!rt||at)&&this.ne(tt),this.ne(Ht))}return!0};function Vv(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}Cn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Rt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var ot=-a.m12*b,rt=-a.m21*b,at=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*rt+ut,E=E.x*ot+E.y*at+ft,tt=x.x*tt+x.y*rt+ut,x=x.x*ot+x.y*at+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function Qm(a,y){var x=y.Zn;return x===null&&(x=new bf,x.port=y,x.node=y.part,y.Zn=x),ax(x,a)}Cn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,ot){if(ot===void 0&&(ot=new Rt),x.sb()&&!Sg(x))return y.ga(x,ot),ot;if(x.$c()){var rt=Qm(this,y);if(rt!==null){if(ot.assign(rt.Zo),b&&this.routing===ex){var at=Qm(this,tt);if(at!==null&&rt.Gl<at.Gl){rt=Rt.alloc(),at=Rt.alloc();var ut=new Ze(y.ga(Is,rt),y.ga(Ca,at)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,at),(x.Hf(vu)||x.Hf(pa))&&a.y>=ut.y&&a.y<=ut.y+ut.height?ot.y=a.y:(x.Hf(zl)||x.Hf(Oa))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(ot.x=a.x),Rt.free(rt),Rt.free(at)}}return ot}}return x=y.ga(Jm(x),Rt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=Vv(x,tt.copy()))):(rt=this.computeSpot(!E,tt),z=Rt.alloc(),tt=tt.ga(Jm(rt),z),b&&(tt=Vv(x,tt)),Rt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,ot),Rt.free(x),ot},Cn.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,ot){t:if(E.sb())var rt=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(rt=Qm(this,y),rt!==null))switch(rt.Nc){case 1:rt=270;break t;case 2:rt=180;break t;default:case 4:rt=0;break t;case 8:rt=90;break t}rt=y.ga(po,Rt.alloc()),this.pointsCount>(z?6:2)?(ot=b?this.i(1):this.i(this.pointsCount-2),ot=z?Vv(rt,ot.copy()):x):(x=Rt.alloc(),ot=ot.ga(po,x),Rt.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,Rt.free(rt),rt=x}return E.Mc()&&tt.Td(a)&&(rt+=180,360<=rt&&(rt-=360)),Sg(E)||(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},Cn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Qm(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Cn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=po:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===nn?Vr:y)):(a=y||this.toPort,a===null?a=po:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===nn?Vr:y)),a};function Sg(a){return a===Vr||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:po}Cn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==_a&&4<this.pointsCount?this.computeMidPoint(new Rt):(a=y.Zn,a=a!==null?ax(a,this):null,a!==null?a.Zo:y.ga(po))},Cn.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},Cn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Gi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&Gi.free(tt),!0;if(this.Yc(a,tt)){var ot=!1;if(!this.isAtomic)for(var rt=this.O.s,at=rt.length;at--;){var ut=rt[at];if(ut.visible||ut===this.locationObject){var ft=ut.actualBounds,mt=this.naturalBounds;if(!(ft.x>mt.width||ft.y>mt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Gi.alloc(),ft.set(tt),ut instanceof Sn)ot=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof Yi)if(ot=a,mt=E,ut.pickable===!1)ot=!1;else if(ft.multiply(ut.transform),mt)t:{var yt=ot,Ct=ft;if(ut.fh(yt,Ct))ot=!0;else{if(Ct===void 0&&(Ct=ut.transform,yt.Re(ut.actualBounds))){ot=!0;break t}ot=yt.left,mt=yt.right;var kt=yt.top;yt=yt.bottom;var Ht=Rt.alloc(),Dt=Rt.alloc(),Xt=Rt.alloc(),$t=Gi.alloc();$t.set(Ct),$t.bv(ut.transform),$t.Vj(),Dt.x=mt,Dt.y=kt,Dt.transform($t),Ht.x=ot,Ht.y=kt,Ht.transform($t),Ct=!1,Vc(ut,Ht,Dt,Xt)?Ct=!0:(Ht.x=mt,Ht.y=yt,Ht.transform($t),Vc(ut,Ht,Dt,Xt)?Ct=!0:(Dt.x=ot,Dt.y=yt,Dt.transform($t),Vc(ut,Ht,Dt,Xt)?Ct=!0:(Ht.x=ot,Ht.y=kt,Ht.transform($t),Vc(ut,Ht,Dt,Xt)&&(Ct=!0)))),Gi.free($t),Rt.free(Ht),Rt.free(Dt),Rt.free(Xt),ot=Ct}}else ot=ut.fh(ot,ft)}else ot=_s(ut,a,E,ft);ot&&(mt=ut,y!==null&&(mt=y(ut)),mt&&(x===null||x(mt))&&b.add(mt)),Gi.free(ft)}}}return z===void 0&&Gi.free(tt),ot||this.background!==null||this.areaBackground!==null}return z===void 0&&Gi.free(tt),!1},Cn.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?_l:this.curve},Cn.prototype.computeCorner=function(){if(this.curve===_l)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Cn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Cn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=ix;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===Pp||E===e0||E===_v?a=Math.max(a,b):E===Mp||E===Lp||E===Cp||E===Ep?a=Math.max(a,tt):(y=y.ga(po).ab(x.ga(po))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===_l&&(a*=1.333)}}return a},Cn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===_a&&x.bb()}},Cn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=nx;var y=this.Sf;if(y!==null){for(var x=Hn(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),_n(x)}}return a},Cn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Cn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Cn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===$m)return!1;b===t0&&(b=wp)}switch(b){case $m:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var ot=tt.x-b,rt=tt.y-z,at=Math.sqrt(ot*ot+rt*rt);if(!ve.$(at,0)){if(ve.$(ot,0))var ut=0>rt?-Math.PI/2:Math.PI/2;else ut=Math.atan(rt/Math.abs(ot)),0>ot&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;ot=E.x-tt;var mt=E.y-ft;for(rt=Math.sqrt(ot*ot+mt*mt),ve.$(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;a<x;a++)y=this.i(a),ot=y.x-b,rt=y.y-z,y=Math.sqrt(ot*ot+rt*rt),ve.$(y,0)||(ve.$(ot,0)?rt=0>rt?-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),ft+y*Math.sin(ot)));this.dd(x,E)}}return!0;case t0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,at=(tt-b)*(tt-b)+(ft-z)*(ft-z),ot=y.x,ut=y.y,rt=E.x,mt=E.y;var yt=1;if(rt-ot!==0){var Ct=(mt-ut)/(rt-ot);yt=Math.sqrt(1+1/(Ct*Ct))}else Ct=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var kt=y.x,Ht=y.y,Dt=.5;at!==0&&(Dt=((b-kt)*(b-tt)+(z-Ht)*(z-ft))/at);var Xt=b+Dt*(tt-b),$t=z+Dt*(ft-z);y=Math.sqrt((kt-Xt)*(kt-Xt)+(Ht-$t)*(Ht-$t)),Ht<Ct*(kt-Xt)+$t&&(y=-y),0<Ct&&(y=-y),kt=ot+Dt*(rt-ot),Dt=ut+Dt*(mt-ut),Ct!==0?(y=kt+y/yt,this.L(a,y,Dt-(y-kt)/Ct)):this.L(a,kt,Dt+y)}this.dd(x,E)}return!0;case wp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),ot=z.x,ut=z.y,ft=ot,at=ut,ve.B(b.y,z.y)?ve.B(z.x,tt.x)?ut=y.y:ve.B(z.y,tt.y)&&(ot=y.x):ve.B(b.x,z.x)&&(ve.B(z.y,tt.y)?ot=y.x:ve.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,ot,ut),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),ot=z.x,ut=z.y,rt=ot,mt=ut,ve.B(b.y,z.y)?ve.B(z.x,tt.x)?ut=E.y:ve.B(z.y,tt.y)&&(ot=E.x):ve.B(b.x,z.x)&&(ve.B(z.y,tt.y)?ot=E.x:ve.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,ot,ut),Yv(this))){this.L(a+1,ft,at),this.L(x-1,rt,mt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Cn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var ot=b.actualBounds.copy(),rt=z.actualBounds.copy();if(ot.w()&&rt.w()){ot.Bc(bp,bp),rt.Bc(bp,bp),ot.Ye(a),rt.Ye(x);var at=Rt.alloc(),ut=Rt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&rt.right>a.x||E===90&&x.y>a.y&&rt.right>a.x?(at.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=at.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.x=a.x<rt.left?this.computeMidOrthoPosition(a.x,a.y,rt.left,x.y,!1):a.x<rt.right&&(E===270&&a.y<rt.top||E===90&&a.y>rt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.right,ut.x=at.x,ut.y=x.y):E===0&&a.x<rt.left&&a.y>rt.top&&a.y<rt.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=at.y)):(at.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<ot.top||E===270&&x.y>ot.bottom)&&(E===180&&(rt.ca(a)||ot.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?at.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(E===180||E===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.bottom&&(x.x>=ot.left&&x.x<=a.x||a.x<=rt.right&&a.x>=x.x?(E===90||E===270)&&(at.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(at.x,x.y)):(at.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?ot.top:Math.min(ot.top,rt.top)):Math.max(x.y,E===0?ot.bottom:Math.max(ot.bottom,rt.bottom)),ut.x=x.x,ut.y=at.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&rt.left<a.x||E===90&&x.y>a.y&&rt.left<a.x?(at.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=at.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.x=a.x>rt.right?this.computeMidOrthoPosition(a.x,a.y,rt.right,x.y,!1):a.x>rt.left&&(E===270&&a.y<rt.top||E===90&&a.y>rt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.left,ut.x=at.x,ut.y=x.y):E===180&&a.x>rt.right&&a.y>rt.top&&a.y<rt.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=at.y)):(at.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<ot.top||E===270&&x.y>ot.bottom)&&(E===0&&(rt.ca(a)||ot.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?at.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(E===0||E===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.bottom&&(x.x<=ot.right&&x.x>=a.x||a.x>=rt.left&&a.x<=x.x?(E===90||E===270)&&(at.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(at.x,x.y)):(at.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?ot.top:Math.min(ot.top,rt.top)):Math.max(x.y,E===180?ot.bottom:Math.max(ot.bottom,rt.bottom)),ut.x=x.x,ut.y=at.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&rt.bottom>a.y||E===0&&x.x>a.x&&rt.bottom>a.y?(at.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=at.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(at.y=a.y<rt.top?this.computeMidOrthoPosition(a.x,a.y,x.x,rt.top,!0):a.y<rt.bottom&&(E===180&&a.x<rt.left||E===0&&a.x>rt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.bottom,ut.x=x.x,ut.y=at.y):E===90&&a.y<rt.top&&a.x>rt.left&&a.x<rt.right&&(at.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),at.y=a.y,ut.x=at.x)):(at.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<ot.left||E===180&&x.x>ot.right)&&(E===270&&(rt.ca(a)||ot.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?at.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(E===270||E===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.right&&(x.y>=ot.top&&x.y<=a.y||a.y<=rt.bottom&&a.y>=x.y?(E===0||E===180)&&(at.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,at.y)):(at.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,E===90?ot.right:Math.max(ot.right,rt.right)),ut.x=at.x,ut.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&rt.top<a.y||E===0&&x.x>a.x&&rt.top<a.y?(at.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=at.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(at.y=a.y>rt.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,rt.bottom,!0):a.y>rt.top&&(E===180&&a.x<rt.left||E===0&&a.x>rt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.top,ut.x=x.x,ut.y=at.y):E===270&&a.y>rt.bottom&&a.x>rt.left&&a.x<rt.right&&(at.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),at.y=a.y,ut.x=at.x)):(at.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<ot.left||E===180&&x.x>ot.right)&&(E===90&&(rt.ca(a)||ot.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?at.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(E===90||E===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.right&&(x.y<=ot.bottom&&x.y>=a.y||a.y>=rt.top&&a.y<=x.y?(E===0||E===180)&&(at.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,at.y)):(at.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,E===270?ot.right:Math.max(ot.right,rt.right)),ut.x=at.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var mt=this.diagram;if(mt===null||b===z||this.layer.isTemporary||!$f(mt)||ot.ca(ft)&&!z.Td(b)||rt.ca(a)&&!b.Td(z))y=!1;else{var yt=tg(mt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&yt.Yj(Math.min(a.x,at.x),Math.min(a.y,at.y),Math.abs(a.x-at.x),Math.abs(a.y-at.y))&&yt.Yj(Math.min(at.x,ut.x),Math.min(at.y,ut.y),Math.abs(at.x-ut.x),Math.abs(at.y-ut.y))&&yt.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{b=a,z=ft;var Ct=x=null;if(mt.isVirtualized){mt=yt.bounds.copy(),mt.Bc(-yt.Ho,-yt.Go);var kt=Rt.alloc();wg(yt,a.x,a.y)||(ve.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,a.x,a.y,at.x,at.y,kt)?(x=a=kt.copy(),y=kt.ab(at)):ve.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,at.x,at.y,ut.x,ut.y,kt)?(x=a=kt.copy(),y=kt.ab(ut)):ve.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,ut.x,ut.y,ft.x,ft.y,kt)&&(x=a=kt.copy(),y=kt.ab(ft))),wg(yt,ft.x,ft.y)||(ve.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,ft.x,ft.y,ut.x,ut.y,kt)?(Ct=ft=kt.copy(),E=ut.ab(kt)):ve.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,ut.x,ut.y,at.x,at.y,kt)?(Ct=ft=kt.copy(),E=at.ab(kt)):ve.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,at.x,at.y,a.x,a.y,kt)&&(Ct=ft=kt.copy(),E=a.ab(kt))),Rt.free(kt)}ot=ot.copy().ed(rt),ot.Bc(yt.Ho*yt.Os,yt.Go*yt.Os),rx(yt,a,y,ft,E,ot,!0),rt=Kh(yt,ft.x,ft.y),!yt.abort&&rt>=Pg&&(ox(yt),ot.Bc(yt.Ho*yt.Hx,yt.Go*yt.Ix),rx(yt,a,y,ft,E,ot,!1),rt=Kh(yt,ft.x,ft.y)),!yt.abort&&rt<Pg&&Kh(yt,ft.x,ft.y)!==Id?(Xv(this,yt,ft.x,ft.y,E,!0,tt),ot=this.i(2),4>this.pointsCount?(y===0||y===180?(ot.x=a.x,ot.y=ft.y):(ot.x=ft.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?ve.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)):ve.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)&&(ve.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)):ve.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,b.x,x.y):this.m(2,x.x,b.y)),Ct!==null&&(E===0||E===180?this.yf(z.x,Ct.y):this.yf(Ct.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(at.copy()),this.ne(ut.copy())),Rt.free(at),Rt.free(ut)}},Cn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Yv(a){if(a.diagram===null||!a.isAvoiding||!$f(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=tg(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Xv(a,y,x,E,b,z,tt){var ot=y.Ho,rt=y.Go,at=Kh(y,x,E),ut=x,ft=E;for(b===0?ut+=ot:b===90?ft+=rt:b===180?ut-=ot:ft-=rt,b!==tt&&at>Qc&&Kh(y,ut,ft)!==at-1&&(Kh(y,x-ot,E)===at-1?(b=180,ut=x-ot,ft=E):Kh(y,x+ot,E)===at-1?(b=0,ut=x+ot,ft=E):Kh(y,x,E-rt)===at-1?(b=270,ut=x,ft=E-rt):Kh(y,x,E+rt)===at-1&&(b=90,ut=x,ft=E+rt));at>Qc&&Kh(y,ut,ft)===at-1;)x=ut,E=ft,b===0?ut+=ot:b===90?ft+=rt:b===180?ut-=ot:ft-=rt,--at;z?at>Qc&&(b===180||b===0?x=Math.floor(x/ot)*ot+ot/2:(b===90||b===270)&&(E=Math.floor(E/rt)*rt+rt/2)):(x=Math.floor(x/ot)*ot+ot/2,E=Math.floor(E/rt)*rt+rt/2),at>Qc&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=rt):b===90?(z=180,tt-=ot):b===180?(z=270,ut-=rt):b===270&&(z=0,tt+=ot),Kh(y,tt,ut)===at-1?Xv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=rt):b===90?(z=0,tt+=ot):b===180?(z=90,ut+=rt):b===270&&(z=180,tt-=ot),Kh(y,tt,ut)===at-1&&Xv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}Cn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=lr(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var ot=lr(y,a,E.x,E.y,x.x,x.y);E=x,ot<b&&(z=tt,b=ot)}return z},Cn.prototype.qc=function(){this.lk=!1,this.v()},Cn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof Yi&&(b.ua=this.ua)}}},Cn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Xc(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===_l&&3<=y&&!ve.$(this.smoothness,0))if(y===3){var ot=this.i(1);E=Math.min(b.x,ot.x);var rt=Math.min(b.y,ot.y);ot=this.i(2),E=Math.min(E,ot.x),rt=Math.min(rt,ot.y)}else{if(this.isOrthogonal)for(rt=0;rt<y;rt++)ot=E[rt],z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),rt=this.i(E),z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,rt=z.y}else{for(rt=0;rt<y;rt++)ot=E[rt],z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,rt=z.y}if(E-=this.su.x,rt-=this.su.y,b.x-=E,b.y-=rt,y!==2||Xc(this)){if(a.type=En.o,ot=NS(a),this.computeShortLength(!0)!==0&&(b=Cf(this,b,!0,z)),vg(ot,b.x,b.y,!1),tt===_l&&3<=y&&!ve.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-rt,b=this.i(2).copy(),b.x-=E,b.y-=rt,this.computeShortLength(!1)!==0&&(b=Cf(this,b,!1,z)),Ad(ot,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Rt.allocAt(E,rt),x=Rt.alloc(),x.assign(this.i(1)),z=Rt.allocAt(E,rt),b=Rt.allocAt(E,rt),tt=this.i(0);for(var at,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){at=this.i(ft);var mt=tt,yt=at,Ct=this.i(Qv(this,at,ft,!1));if((!ve.$(mt.x,yt.x)||!ve.$(yt.x,Ct.x))&&(!ve.$(mt.y,yt.y)||!ve.$(yt.y,Ct.y))){var kt=ut;isNaN(kt)&&(kt=this.smoothness/3);var Ht=mt.x;mt=mt.y;var Dt=yt.x;yt=yt.y;var Xt=Ct.x;Ct=Ct.y;var $t=kt*_m(Ht,mt,Dt,yt);kt*=_m(Dt,yt,Xt,Ct),ve.$(mt,yt)&&ve.$(Dt,Xt)&&(Dt>Ht?Ct>yt?(z.x=Dt-$t,z.y=yt-$t,b.x=Dt+kt,b.y=yt+kt):(z.x=Dt-$t,z.y=yt+$t,b.x=Dt+kt,b.y=yt-kt):Ct>yt?(z.x=Dt+$t,z.y=yt-$t,b.x=Dt-kt,b.y=yt+kt):(z.x=Dt+$t,z.y=yt+$t,b.x=Dt-kt,b.y=yt-kt)),ve.$(Ht,Dt)&&ve.$(yt,Ct)&&(yt>mt?(Xt>Dt?(z.x=Dt-$t,z.y=yt-$t,b.x=Dt+kt):(z.x=Dt+$t,z.y=yt-$t,b.x=Dt-kt),b.y=yt+kt):(Xt>Dt?(z.x=Dt-$t,z.y=yt+$t,b.x=Dt+kt):(z.x=Dt+$t,z.y=yt+$t,b.x=Dt-kt),b.y=yt-kt)),(ve.$(Ht,Dt)&&ve.$(Dt,Xt)||ve.$(mt,yt)&&ve.$(yt,Ct))&&(Ht=.5*(Ht+Xt),mt=.5*(mt+Ct),z.x=Ht,z.y=mt,b.x=Ht,b.y=mt),(ft===1||ft===2&&ve.$(tt.x,this.i(0).x)&&ve.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+at.x),x.y=.5*(tt.y+at.y)),Ad(ot,x.x-E,x.y-rt,z.x-E,z.y-rt,at.x-E,at.y-rt),y.set(z),x.set(b),tt=at}}at=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=Cf(this,ut.copy(),!1,Qo)),at=.5*(at+ut.x),tt=.5*(tt+ut.y),Ad(ot,b.x-E,b.y-rt,at-E,tt-rt,ut.x-E,ut.y-rt),Rt.free(y),Rt.free(x),Rt.free(z),Rt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=Cf(this,tt.copy(),!1,Qo)),Ad(ot,z.x-E,z.y-rt,b.x-E,b.y-rt,tt.x-E,tt.y-rt);else{for(z=Rt.alloc(),z.assign(this.i(0)),b=Rt.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,at=0;ft<y;){if(ft=Qv(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=Cf(this,ut.copy(),!1,Qo)),Mf(this,ot,-E,-rt,z,ut,x);else if(at===0)for(ft=1;ft<y;)b.assign(z),ut=this.i(ft++),Mf(this,ot,-E,-rt,z,ut,x),z.assign(ut);break}if(at=Qv(this,ut,ft+1,ft<y-3),ft=-E,Ht=-rt,mt=ut,Dt=this.i(at),kt=x,ve.B(z.y,mt.y)&&ve.B(mt.x,Dt.x))if(Ct=Math.min(tt,Math.abs(mt.x-b.x)/2),Ct=$t=Math.min(Ct,Math.abs(Dt.y-mt.y)/2),ve.B(Ct,0))Mf(this,ot,ft,Ht,z,mt,kt),z.assign(mt);else{var ie=mt.x,fe=mt.y;yt=ie,Xt=fe,mt.x>z.x?ie=mt.x-Ct:ie=mt.x+Ct,Dt.y>mt.y?Xt=mt.y+$t:Xt=mt.y-$t,Dt=Rt.allocAt(ie,fe),Mf(this,ot,ft,Ht,z,Dt,kt),Rt.free(Dt),Gm(ot,mt.x+ft,mt.y+Ht,yt+ft,Xt+Ht),z.h(yt,Xt)}else ve.B(z.x,mt.x)&&ve.B(mt.y,Dt.y)?(Ct=Math.min(tt,Math.abs(mt.y-b.y)/2),Ct=$t=Math.min(Ct,Math.abs(Dt.x-mt.x)/2),ve.B($t,0)?(Mf(this,ot,ft,Ht,z,mt,kt),z.assign(mt)):(ie=mt.x,fe=mt.y,yt=ie,Xt=fe,mt.y>z.y?fe=mt.y-Ct:fe=mt.y+Ct,Dt.x>mt.x?yt=mt.x+$t:yt=mt.x-$t,Dt=Rt.allocAt(ie,fe),Mf(this,ot,ft,Ht,z,Dt,kt),Rt.free(Dt),Gm(ot,mt.x+ft,mt.y+Ht,yt+ft,Xt+Ht),z.h(yt,Xt))):(Mf(this,ot,ft,Ht,z,mt,kt),z.assign(mt));b.assign(ut),ft=at}Rt.free(z)}Wm=ot}else ot=this.i(1).copy(),ot.x-=E,ot.y-=rt,this.computeShortLength(!0)!==0&&(b=Cf(this,b,!0,z)),this.computeShortLength(!1)!==0&&(ot=Cf(this,ot,!1,z)),a.type=En.j,a.startX=b.x,a.startY=b.y,a.endX=ot.x,a.endY=ot.y;return this.lk=!0,a};function _m(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),ve.$(a,0)?y:ve.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Cf(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=_m(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=_m(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function Qv(a,y,x,E){for(var b=a.pointsCount,z=y;ve.$(y.x,z.x)&&ve.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!ve.$(y.x,z.x)&&!ve.$(y.y,z.y))return x-1;for(var tt=z;ve.$(y.x,z.x)&&ve.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||ve.$(y.y,z.y)&&ve.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}Cn.prototype.computeJumpLength=function(){return 10};function Mf(a,y,x,E,b,z,tt){if(!tt&&Xc(a)){tt=a.computeJumpLength();var ot=tt/2,rt=[],at=0;if(a.isVisible()&&(at=E1(a,b,z,rt)),0<at){if(ve.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<at;){var ft=Math.max(b.x,Math.min(rt[ut++]-ot,z.x-tt));y.lineTo(ft+x,z.y+E);for(var mt=ft+x,yt=Math.min(ft+tt,z.x);ut<at&&(ft=rt[ut],ft<yt+tt);)ut++,yt=Math.min(ft+ot,z.x);ft=z.y-tt+E,yt+=x;var Ct=z.y+E;a.curve===Fd?vg(y,yt,Ct,!1):Ad(y,mt,ft,yt,ft,yt,Ct)}else for(--at;0<=at;){for(ut=Math.min(b.x,Math.max(rt[at--]+ot,z.x+tt)),y.lineTo(ut+x,z.y+E),mt=ut+x,ft=Math.max(ut-tt,z.x);0<=at&&(ut=rt[at],ut>ft-tt);)at--,ft=Math.max(ut-ot,z.x);ut=z.y-tt+E,ft+=x,yt=z.y+E,a.curve===Fd?vg(y,ft,yt,!1):Ad(y,mt,ut,ft,ut,ft,yt)}else if(ve.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<at;){for(ft=Math.max(b.y,Math.min(rt[ut++]-ot,z.y-tt)),y.lineTo(z.x+x,ft+E),mt=ft+E,ft=Math.min(ft+tt,z.y);ut<at&&(yt=rt[ut],yt<ft+tt);)ut++,ft=Math.min(yt+ot,z.y);yt=z.x-tt+x,Ct=z.x+x,ft+=E,a.curve===Fd?vg(y,Ct,ft,!1):Ad(y,yt,mt,yt,ft,Ct,ft)}else for(--at;0<=at;){for(ut=Math.min(b.y,Math.max(rt[at--]+ot,z.y+tt)),y.lineTo(z.x+x,ut+E),mt=ut+E,ut=Math.max(ut-tt,z.y);0<=at&&(ft=rt[at],ft>ut-tt);)at--,ut=Math.max(ft-ot,z.y);ft=z.x-tt+x,yt=z.x+x,ut+=E,a.curve===Fd?vg(y,yt,ut,!1):Ad(y,ft,mt,ft,ut,yt,ut)}}}y.lineTo(z.x+x,z.y+E)}function E1(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,ot=0;ot<tt;ot++){var rt=z[ot];if(rt instanceof Cn){if(rt===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(rt.isVisible()&&Xc(rt)){var at=rt.routeBounds;at.w()&&a.routeBounds.Yc(at)&&!a.usesSamePort(rt)&&(at=rt.path,at!==null&&at.Ed()&&L1(y,x,E,rt))}}}}}return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length}function L1(a,y,x,E){for(var b=ve.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),ot=Rt.alloc(),rt=1;rt<z;rt++){var at=E.i(rt);if(rt<z-1){var ut=E.i(rt+1);if(tt.y===at.y&&at.y===ut.y){if(at.x>tt.x&&ut.x>=at.x||at.x<tt.x&&ut.x<=at.x)continue}else if(tt.x===at.x&&at.x===ut.x&&(at.y>tt.y&&ut.y>=at.y||at.y<tt.y&&ut.y<=at.y))continue}t:{ut=a.x;var ft=a.y,mt=y.x,yt=y.y,Ct=tt.x;tt=tt.y;var kt=at.x,Ht=at.y;if(ve.B(ut,mt)){if(!ve.B(ft,yt)&&ve.B(tt,Ht)&&Math.min(ft,yt)<tt&&Math.max(ft,yt)>tt&&Math.min(Ct,kt)<ut&&Math.max(Ct,kt)>ut&&!ve.B(Ct,kt)){ot.x=ut,ot.y=tt,ut=!0;break t}}else if(ve.B(ft,yt)&&ve.B(Ct,kt)&&Math.min(ut,mt)<Ct&&Math.max(ut,mt)>Ct&&Math.min(tt,Ht)<ft&&Math.max(tt,Ht)>ft&&!ve.B(tt,Ht)){ot.x=Ct,ot.y=ft,ut=!0;break t}ot.x=0,ot.y=0,ut=!1}ut&&(b?x.push(ot.x):x.push(ot.y)),tt=at}Rt.free(ot)}function Xc(a){return a=a.curve,a===xg||a===Fd}function qm(a,y){(y||Xc(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}Cn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,ot=0;ot<tt;ot++){var rt=b[ot];rt instanceof Cn&&(rt===this?z=!0:z&&tx(this,rt,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)ot=z[tt],ot instanceof Cn&&tx(this,ot,a)}}}}};function tx(a,y,x){if(y!==null&&y.lk&&y.fd&&Xc(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Cn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Cn.prototype.isVisible=function(){if(!ci.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Cn.prototype.Zb=function(a){if(ci.prototype.Zb.call(this,a),a&&qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Cn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?wp:this.qk};function Sp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,ot=tt.length,rt=0;rt<ot;rt++){var at=tt[rt];(at.ef===y&&at.ff===E&&at.uf===x&&at.vf===b||at.ef===x&&at.ff===b&&at.uf===y&&at.vf===E)&&(z===null?z=at:(a===null&&(a=[],a.push(z)),a.push(at)))}if(a!==null){for(z=WS(y,x,E,b),z===null&&(z=new i0(y,E,x,b),GS(y,z),GS(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function xp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(fi(y.links,a),y.Sl()))}Cn.prototype.ph=function(){return!0},Gt.Object.defineProperties(Cn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Vm(y,this,x),xp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&Um(a,this,b),Sp(this),this.C(1)),this.g("fromNode",y,a),yg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Fl(x),xp(this),this.ff=a;var E=this.fromPort;E!==null&&Fl(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),Sp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Vm(y,this,x),xp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&Um(a,this,b),Sp(this),this.C(1)),this.g("toNode",y,a),yg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Fl(x),xp(this),this.vf=a;var E=this.toPort;E!==null&&Fl(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),Sp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:nn},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&Fl(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&bn(a,">= 0",Cn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:nn},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&&Fl(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&&bn(a,">= 0",Cn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Ui:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&yp(this.fromNode),this.toNode!==null&&yp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Yi?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===_l&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),ve.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var ot=this.i(z-1),rt=this.i(z);ve.Dl(b.x,b.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),b=rt}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Rt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Xm(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);ve.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):ve.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new cn,E=0;E<a.length/2;E++)b=new Rt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!Ke(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new cn,E=0;E<a.length;E++)b=a[E],x.add(new Rt(b.x,b.y).freeze())}}else if(a instanceof cn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else oe("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Xm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&Cr(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Sg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Sg(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(),qm(this,y===Fd||y===xg||a===Fd||a===xg),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(),qm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Cn.prototype.invalidateOtherJumpOvers=Cn.prototype.Xo,Cn.prototype.findClosestSegment=Cn.prototype.ez,Cn.prototype.updateRoute=Cn.prototype.vg,Cn.prototype.invalidateRoute=Cn.prototype.bb,Cn.prototype.rollbackRoute=Cn.prototype.rv,Cn.prototype.commitRoute=Cn.prototype.zf,Cn.prototype.startRoute=Cn.prototype.uh,Cn.prototype.clearPoints=Cn.prototype.Fj,Cn.prototype.removePoint=Cn.prototype.pv,Cn.prototype.addPointAt=Cn.prototype.yf,Cn.prototype.addPoint=Cn.prototype.ne,Cn.prototype.insertPointAt=Cn.prototype.m,Cn.prototype.insertPoint=Cn.prototype.Kz,Cn.prototype.setPointAt=Cn.prototype.L,Cn.prototype.setPoint=Cn.prototype.dd,Cn.prototype.getPoint=Cn.prototype.i,Cn.prototype.getOtherPort=Cn.prototype.Cz,Cn.prototype.getOtherNode=Cn.prototype.To;var Ef=null,Lf=null,Jv=new Ue(Cn,"Normal",1),b1=new Ue(Cn,"Orthogonal",2),k1=new Ue(Cn,"AvoidsNodes",6),ex=new Ue(Cn,"AvoidsNodesStraight",7),_a=new Ue(Cn,"None",0),_l=new Ue(Cn,"Bezier",9),Fd=new Ue(Cn,"JumpGap",10),xg=new Ue(Cn,"JumpOver",11),wp=new Ue(Cn,"End",17),$m=new Ue(Cn,"Scale",18),t0=new Ue(Cn,"Stretch",19),Pp=new Ue(Cn,"OrientAlong",21),Cp=new Ue(Cn,"OrientPlus90",22),Mp=new Ue(Cn,"OrientMinus90",23),_v=new Ue(Cn,"OrientOpposite",24),e0=new Ue(Cn,"OrientUpright",25),Ep=new Ue(Cn,"OrientPlus90Upright",26),Lp=new Ue(Cn,"OrientMinus90Upright",27),n0=new Ue(Cn,"OrientUpright45",28),nx=16,ix=14,bp=8;Cn.className="Link",Cn.Normal=Jv,Cn.Orthogonal=b1,Cn.AvoidsNodes=k1,Cn.AvoidsNodesStraight=ex,Cn.None=_a,Cn.Bezier=_l,Cn.JumpGap=Fd,Cn.JumpOver=xg,Cn.End=wp,Cn.Scale=$m,Cn.Stretch=t0,Cn.OrientAlong=Pp,Cn.OrientPlus90=Cp,Cn.OrientMinus90=Mp,Cn.OrientOpposite=_v,Cn.OrientUpright=e0,Cn.OrientPlus90Upright=Ep,Cn.OrientMinus90Upright=Lp,Cn.OrientUpright45=n0,Cn.EndSegmentStep=8,Cn.CurvinessStart=nx,Cn.SpacingMin=ix,Cn.OrthoShortCut=bp;function i0(a,y,x,E){ho(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}i0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},i0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},i0.className="LinkBundle";function kp(a){ho(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}kp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function wg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Kh(a,y,x){return wg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}function ox(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=Qc&&(x[E]=qv)}kp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Id)return!1}return!0};function Zh(a,y,x,E,b,z,tt,ot,rt){if(!(y<z||y>tt||x<ot||x>rt)){var at=y|0,ut=x|0,ft=a.ac[at][ut];if(ft>=Qc&&ft<Pg)for(b?ut+=E:at+=E,ft+=1;z<=at&&at<=tt&&ot<=ut&&ut<=rt&&!(ft>=a.ac[at][ut]);)a.ac[at][ut]=ft,ft+=1,b?ut+=E:at+=E;if(at=b?ut:at,b)if(0<E)for(x+=E;x<at;x+=E)Zh(a,y,x,1,!b,z,tt,ot,rt),Zh(a,y,x,-1,!b,z,tt,ot,rt);else for(x+=E;x>at;x+=E)Zh(a,y,x,1,!b,z,tt,ot,rt),Zh(a,y,x,-1,!b,z,tt,ot,rt);else if(0<E)for(y+=E;y<at;y+=E)Zh(a,y,x,1,!b,z,tt,ot,rt),Zh(a,y,x,-1,!b,z,tt,ot,rt);else for(y+=E;y>at;y+=E)Zh(a,y,x,1,!b,z,tt,ot,rt),Zh(a,y,x,-1,!b,z,tt,ot,rt)}}function o0(a,y,x,E,b,z,tt,ot,rt){y|=0,x|=0;var at=Id,ut=Qc;for(a.ac[y][x]=ut;at===Id&&y>z&&y<tt&&x>ot&&x<rt;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,at=a.ac[y][x]}function r0(a,y,x,E,b,z,tt,ot,rt){y|=0,x|=0;var at=Id,ut=Pg;for(a.ac[y][x]=ut;at===Id&&y>z&&y<tt&&x>ot&&x<rt;)a.ac[y][x]=ut,b?x+=E:y+=E,at=a.ac[y][x]}function rx(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var ot=y.x,rt=y.y;if(wg(a,ot,rt)){ot-=a.Nd,ot/=a.rc,rt-=a.Od,rt/=a.sc;var at=E.x,ut=E.y;if(wg(a,at,ut))if(at-=a.Nd,at/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(ot-at)&&1>=Math.abs(rt-ut))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var mt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,mt-=a.Od,mt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),mt=Math.min(a.ei,Math.max(0,mt|0)),E=a.ac,ot|=0,rt|=0,at|=0,ut|=0;var yt=x===0||x===90?1:-1;if(x=x===90||x===270,E[ot][rt]===Id?(o0(a,ot,rt,yt,x,z,y,ft,mt),o0(a,ot,rt,1,!x,z,y,ft,mt),o0(a,ot,rt,-1,!x,z,y,ft,mt)):o0(a,ot,rt,yt,x,ot,rt,ot,rt),E[at][ut]===Id?(r0(a,at,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,mt),r0(a,at,ut,1,!(b===90||b===270),z,y,ft,mt),r0(a,at,ut,-1,!(b===90||b===270),z,y,ft,mt)):r0(a,at,ut,yt,x,at,ut,at,ut),x=Hn(),tt&&sx(a,at,ut,b,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=Qc,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],at=x[z+1];y>b?b++:y<b?b--:at>tt?tt++:at<tt&&tt--,E[b][tt]=a++,b!==y||tt!==at;);else Zh(a,ot,rt,1,!1,z,y,ft,mt),Zh(a,ot,rt,-1,!1,z,y,ft,mt),Zh(a,ot,rt,1,!0,z,y,ft,mt),Zh(a,ot,rt,-1,!0,z,y,ft,mt);_n(x)}}}}function sx(a,y,x,E,b,z,tt){for(var ot=a.ac,rt=y,at=x;;){if(rt===b&&at===z)return!0;var ut=rt,ft=at;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var mt=ot[ut][ft];if(mt===0||mt===$v)break;rt=ut,at=ft}for(;;){if(ut=E,ft=rt,mt=at,E===0?mt<z?(ut=90,mt++):mt>z&&(ut=270,mt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?mt<z?(ut=90,mt++):mt>z&&(ut=270,mt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=ot[ft][mt],ut!==E&&ft!==0&&ft!==$v){if(tt.push(rt),tt.push(at),sx(a,rt,at,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(ot[rt][at]=$v,E===0){if(rt===y)return!1;rt--}else if(E===90){if(at===x)return!1;at--}else if(E===180){if(rt===y)return!1;rt++}else{if(at===x)return!1;at++}}}Gt.Object.defineProperties(kp.prototype,{bounds:{get:function(){return new Ze(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var Id=0,Qc=1,Pg=999999,qv=Pg+1,$v=Pg+2;kp.className="PositionArray";function bf(){ho(this),this.port=this.node=null,this.pe=[],this.ap=!1}bf.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
|
|
|
`+E.toString())}return y};function A1(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}bf.prototype.Sl=function(){this.pe.length=0};function ax(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof Ii?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var ot=a.port.ga(Is,Rt.alloc()),rt=a.port.ga(Ca,Rt.alloc());for(b=Ze.allocAt(ot.x,ot.y,0,0),b.Ye(rt),Rt.free(ot),Rt.free(rt),ot=Rt.allocAt(b.x+b.width/2,b.y+b.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(E),ft=at.computeSpot(ut,a.port);if(ft.$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),ft=A1(b,ft,mt,at.isOrthogonal),ft===0?(ft=4,180<mt&&(mt-=360)):ft===90?(ft=8,270<mt&&(mt-=360)):ft===180?ft=2:(ft=1,90>mt&&(mt+=360)),yt=a.pe[z],yt===void 0?(yt=new ty(at,mt,ft),a.pe[z]=yt):(yt.link=at,yt.angle=mt,yt.Nc=ft),yt.hv.set(ut),z++}}}}for(Rt.free(ot),a.pe.sort(bf.prototype.j),rt=a.pe.length,E=-1,z=ot=0;z<rt;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,ot=0),tt.Uo=ot,ot++);for(E=-1,ot=0,z=rt-1;0<=z;z--)rt=a.pe[z],rt!==void 0&&(rt.Nc!==E&&(E=rt.Nc,ot=rt.Uo+1),rt.Gl=ot);if(z=a.pe,ft=a.port,E=a.node.portSpreading,ot=Rt.alloc(),rt=Rt.alloc(),tt=Rt.alloc(),at=Rt.alloc(),ft.ga(Is,ot),ft.ga(Pa,rt),ft.ga(Ca,tt),ft.ga(Ia,at),yt=mt=ut=ft=0,E===Kv)for(var Ct=0;Ct<z.length;Ct++){var kt=z[Ct];if(kt!==null){var Ht=kt.link.computeThickness();switch(kt.Nc){case 8:mt+=Ht;break;case 2:yt+=Ht;break;case 1:ft+=Ht;break;default:case 4:ut+=Ht}}}var Dt=Ct=0,Xt=1,$t=kt=0;for(Ht=0;Ht<z.length;Ht++){var ie=z[Ht];if(ie!==null){if(Ct!==ie.Nc){switch(Ct=ie.Nc,Ct){case 8:var fe=tt;Dt=at;break;case 2:fe=at,Dt=ot;break;case 1:fe=ot,Dt=rt;break;default:case 4:fe=rt,Dt=tt}switch(kt=Dt.x-fe.x,$t=Dt.y-fe.y,Ct){case 8:mt>Math.abs(kt)?(Xt=Math.abs(kt)/mt,mt=Math.abs(kt)):Xt=1;break;case 2:yt>Math.abs($t)?(Xt=Math.abs($t)/yt,yt=Math.abs($t)):Xt=1;break;case 1:ft>Math.abs(kt)?(Xt=Math.abs(kt)/ft,ft=Math.abs(kt)):Xt=1;break;default:case 4:ut>Math.abs($t)?(Xt=Math.abs($t)/ut,ut=Math.abs($t)):Xt=1}Dt=0}var Ae=ie.Zo;if(E===Kv){switch(ie=ie.link.computeThickness(),ie*=Xt,Ae.set(fe),Ct){case 8:Ae.x=fe.x+kt/2+mt/2-Dt-ie/2;break;case 2:Ae.y=fe.y+$t/2+yt/2-Dt-ie/2;break;case 1:Ae.x=fe.x+kt/2-ft/2+Dt+ie/2;break;default:case 4:Ae.y=fe.y+$t/2-ut/2+Dt+ie/2}Dt+=ie}else{var Bn=.5;E===Ym&&(Bn=(ie.Uo+1)/(ie.Gl+1)),Ae.x=fe.x+kt*Bn,Ae.y=fe.y+$t*Bn}}}for(Rt.free(ot),Rt.free(rt),Rt.free(tt),Rt.free(at),fe=a.pe,z=0;z<fe.length;z++)E=fe[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Ze.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}bf.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},bf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Vr,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},bf.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Rt,this.Gl=this.Uo=0,this.Zo=new Rt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function Br(a){ho(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Rt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Br.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},Br.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Br.prototype.qb=function(){},Br.prototype.toString=function(){var a=Vn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Br.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},Br.prototype.createNetwork=function(){return new Sr(this)},Br.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof ke?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ii?y.lg(a.memberParts):y.lg(a.iterator),y},Br.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},Br.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},Br.prototype.doLayout=function(a){var y=new sn;a instanceof ke?(sc(this,y,a.nodes,!0,this.rh,!0,!1,!0),sc(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ii?sc(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},Br.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var ot=a.value;Ap(ot);var rt=ot.measuredBounds,at=rt.width;rt=rt.height,ot.moveTo(E,b),ot instanceof Ii&&(ot.rh=!1),E+=Math.max(at,50)+20,tt=Math.max(tt,Math.max(rt,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},Br.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var ot=tt.value.node;if(!(ot===null||ot instanceof Cn)&&(Ap(ot),this.rh(ot))){var rt=ot.measuredBounds,at=rt.width;rt=rt.height,ot.moveTo(x,E),ot instanceof Ii&&(ot.rh=!1),x+=Math.max(at,50)+20,z=Math.max(z,Math.max(rt,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},Br.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ii&&a.rh)};function sc(a,y,x,E,b,z,tt,ot){for(x=x.iterator;x.next();){var rt=x.value;E&&!rt.isTopLevel||b!==null&&!b(rt)||!rt.canLayout()||(z&&rt instanceof On?rt.isLinkLabel||(rt instanceof Ii&&rt.layout===null?sc(a,y,rt.memberParts,!1,b,z,tt,ot):(Ap(rt),y.add(rt))):tt&&rt instanceof Cn?y.add(rt):!ot||!rt.Zc()||rt instanceof On||(Ap(rt),y.add(rt)))}}function Ap(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Br.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Ze),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Br.prototype.ex=function(a){var y=new sn;return a instanceof ke?(sc(this,y,a.nodes,!0,null,!0,!0,!0),sc(this,y,a.links,!0,null,!0,!0,!0),sc(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ii?sc(this,y,a.memberParts,!1,null,!0,!0,!0):sc(this,y,a.iterator,!1,null,!0,!0,!0),y},Br.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(Is),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Gt.Object.defineProperties(Br.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())}}}),Br.prototype.collectParts=Br.prototype.ex,Br.prototype.getLayoutBounds=Br.prototype.ni,Br.prototype.invalidateLayout=Br.prototype.C,Br.className="Layout";function Sr(a){ho(this),this.Sc=a,this.wf=new sn,this.ye=new sn,this.Es=new Xn,this.zs=new Xn}Sr.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new sn,this.ye=new sn,this.Es=new Xn,this.zs=new Xn},Sr.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1)}return y},Sr.prototype.createVertex=function(){return new Vs(this)},Sr.prototype.createEdge=function(){return new Il(this)},Sr.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof On)return!tt.isLinkLabel;if(tt instanceof Cn){var ot=tt.fromNode;return ot===null||ot.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof On&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof Ii&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof Cn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},Sr.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},Mt=Sr.prototype,Mt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Mt.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Mt.Iu=function(a){if(a!==null&&lx(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function lx(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Mt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Mt.ki=function(a){return a===null?null:this.Es.I(a)},Mt.Bo=function(a){if(a!==null){ey(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ey(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Mt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Mt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ny(this,a)}};function ny(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Mt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Mt.Lo=function(a){return a===null?null:this.zs.I(a)},Mt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Mt.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Mt.Ko=function(){for(var a=Hn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);_n(a)},Sr.prototype.deleteArtificialVertexes=function(){for(var a=Hn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Hn(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);_n(a),_n(y)};function N1(a){for(var y=Hn(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);_n(y)}Sr.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),N1(this),this.Ko()),a=new cn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){lx(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(ny(a,b),ey(y,b),iy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(ny(a,x),ey(y,x),iy(a,y,x.toVertex))}}Sr.prototype.dz=function(){for(var a=new sn,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Gt.Object.defineProperties(Sr.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),Sr.prototype.findAllParts=Sr.prototype.dz,Sr.prototype.splitIntoSubNetworks=Sr.prototype.Zx,Sr.prototype.deleteSelfEdges=Sr.prototype.Ko,Sr.prototype.reverseEdge=Sr.prototype.gm,Sr.prototype.linkVertexes=Sr.prototype.Zj,Sr.prototype.findEdge=Sr.prototype.Lo,Sr.prototype.deleteLink=Sr.prototype.Yy,Sr.prototype.deleteEdge=Sr.prototype.Mj,Sr.prototype.addLink=Sr.prototype.Dy,Sr.prototype.addEdge=Sr.prototype.Bo,Sr.prototype.findVertex=Sr.prototype.ki,Sr.prototype.deleteNode=Sr.prototype.Zy,Sr.prototype.deleteVertex=Sr.prototype.Iu,Sr.prototype.addNode=Sr.prototype.Bl,Sr.prototype.addVertex=Sr.prototype.dh,Sr.prototype.addParts=Sr.prototype.lg,Sr.className="LayoutNetwork";function Vs(a){ho(this),this.ob=a,this.j=new Ze(0,0,10,10).freeze(),this.o=new Rt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new cn,this.mg=new cn}Vs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new cn,this.mg=new cn},Vs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+zo(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},Vs.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Ke(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof Ii)){x=Ze.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(po);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Ze.free(x);return}Ze.free(x)}a.moveTo(y.x,y.y)}},Vs.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Vs.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Vs.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Vs.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Gt.Object.defineProperties(Vs.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Ze.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Ze.free(x),!(a instanceof Ii)&&(a=a.locationObject.ga(po),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new sn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new sn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new sn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new cn,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),Vs.prototype.deleteDestinationEdge=Vs.prototype.Jl,Vs.prototype.addDestinationEdge=Vs.prototype.zl,Vs.prototype.deleteSourceEdge=Vs.prototype.Kl,Vs.prototype.addSourceEdge=Vs.prototype.Cl,Vs.className="LayoutVertex",Vs.standardComparer=oy,Vs.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Il(a){ho(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Il.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Il.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+zo(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},Il.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Il.prototype.commit=function(){},Il.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Gt.Object.defineProperties(Il.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)}}}),Il.prototype.getOtherVertex=Il.prototype.Ax,Il.className="LayoutEdge";function ca(a){Br.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new kn(NaN,NaN).freeze(),this.tf=new kn(10,10).freeze(),this.Jb=Np,this.Rb=a0,this.nd=Tp,this.hd=ux,a&&Object.assign(this,a)}Le(ca,Br),ca.prototype.cloneProtected=function(a){Br.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},ca.prototype.qb=function(a){a.classType===ca?a===Tp||a===u0||a===ry||a===l0?this.sorting=a:a===a0||a===ih?this.arrangement=a:a===Np||a===s0?this.alignment=a:oe("Unknown enum value: "+a):Br.prototype.qb.call(this,a)},ca.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof Ii)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case l0:b.reverse();break;case Tp:b.sort(this.comparer);break;case u0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case s0:var ot=y,rt=x,at=Ze.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var mt=this.ni(b[ft],at);ut=Math.max(ut,mt.width)}if(ut=Math.max(ut+ot,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(mt=ft=0;mt<b.length;mt++){var yt=this.ni(b[mt],at);ft=Math.max(ft,yt.height)}ft=Math.max(ft+rt,1),mt=this.arrangement;for(var Ct=yt=this.arrangementOrigin.x,kt=this.arrangementOrigin.y,Ht=0,Dt=0,Xt=0;Xt<b.length;Xt++){var $t=b[Xt],ie=this.ni($t,at),fe=Math.ceil((ie.width+ot)/ut)*ut,Ae=Math.ceil((ie.height+rt)/ft)*ft;switch(mt){case ih:var Bn=Math.abs(Ct-ie.width);break;default:Bn=Ct+ie.width}switch((0<z&&Ht>z-1||0<tt&&0<Ht&&Bn-yt>tt)&&(E.push(new Ze(0,kt,tt+ot,Dt)),Ht=0,Ct=yt,kt+=Dt,Dt=0),Dt=Math.max(Dt,Ae),mt){case ih:ie=-ie.width;break;default:ie=0}switch($t.moveTo(Ct+ie,kt),mt){case ih:Ct-=fe;break;default:Ct+=fe}Ht++}E.push(new Ze(0,kt,tt+ot,Dt)),Ze.free(at);break;case Np:for(rt=tt,ut=z,ft=y,mt=x,tt=Ze.alloc(),yt=Math.max(this.cellSize.width,1),z=kt=at=0,ot=Rt.alloc(),Ct=0;Ct<b.length;Ct++)Dt=b[Ct],Ht=this.ni(Dt,tt),Dt=Nd(Dt,Dt.locationObject,Dt.locationSpot,ot),at=Math.max(at,Dt.x),kt=Math.max(kt,Ht.width-Dt.x),z=Math.max(z,Dt.y);switch(Ct=this.arrangement,Ct){case ih:at+=ft;break;default:kt+=ft}yt=isFinite(yt)?Math.max(yt+ft,1):Math.max(at+kt,1);var Kn=Dt=this.arrangementOrigin.x;for(Xt=this.arrangementOrigin.y,kt=0,rt>=at&&(rt-=at),at=$t=0,fe=Math.max(this.cellSize.height,1),ie=z=0,Ae=!0,Ht=Rt.alloc(),Bn=0;Bn<b.length;Bn++){var Gn=b[Bn],Pn=this.ni(Gn,tt),on=Nd(Gn,Gn.locationObject,Gn.locationSpot,ot);if(0<kt)switch(Ct){case ih:Kn=(Kn-Dt-(Pn.width-on.x))/yt,Kn=ve.$(Math.round(Kn),Kn)?Math.round(Kn):Math.floor(Kn),Kn=Kn*yt+Dt;break;default:Kn=(Kn-Dt+on.x)/yt,Kn=ve.$(Math.round(Kn),Kn)?Math.round(Kn):Math.ceil(Kn),Kn=Kn*yt+Dt}else switch(Ct){case ih:$t=Kn+on.x+Pn.width;break;default:$t=Kn-on.x}switch(Ct){case ih:var Bi=-(Kn+on.x)+$t;break;default:Bi=Kn+Pn.width-on.x-$t}if(0<ut&&kt>ut-1||0<rt&&0<kt&&Bi>rt){for(E.push(new Ze(0,Ae?Xt-z:Xt,rt+ft,ie+z+mt)),Kn=0;Kn<kt&&Bn!==kt;Kn++){Bi=b[Bn-kt+Kn];var Ei=Nd(Bi,Bi.locationObject,Bi.locationSpot,Ht);Bi.moveTo(Bi.position.x,Bi.position.y+z-Ei.y)}ie+=mt,Xt=Ae?Xt+ie:Xt+(ie+z),kt=ie=z=0,Kn=Dt,Ae=!1}switch(Kn===Dt&&(at=Ct===ih?Math.max(at,Pn.width-on.x):Math.min(at,-on.x)),z=Math.max(z,on.y),ie=Math.max(ie,Pn.height-on.y),isFinite(fe)&&(ie=Math.max(ie,Math.max(Pn.height,fe)-on.y)),Ae?Gn.moveTo(Kn-on.x,Xt-on.y):Gn.moveTo(Kn-on.x,Xt),Ct){case ih:Kn-=on.x+ft;break;default:Kn+=Pn.width-on.x+ft}kt++}if(E.push(new Ze(0,Xt,rt+ft,(Ae?ie:ie+z)+mt)),b.length!==kt)for(rt=0;rt<kt;rt++)ut=b[b.length-kt+rt],ft=Nd(ut,ut.locationObject,ut.locationSpot,ot),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if(Rt.free(ot),Rt.free(Ht),Ct===ih)for(b=0;b<E.length;b++)z=E[b],z.width+=at,z.x-=at;else for(b=0;b<E.length;b++)z=E[b],z.x>at&&(z.width+=z.x-at,z.x=at);Ze.free(tt)}for(ot=z=tt=b=0;ot<E.length;ot++)rt=E[ot],b=Math.min(b,rt.x),tt=Math.min(tt,rt.y),z=Math.max(z,rt.x+rt.width);this.arrangement===ih?this.commitLayers(E,new Rt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Rt(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ca.prototype.commitLayers=function(){};function ux(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Gt.Object.defineProperties(ca.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Np&&a!==s0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==a0&&a!==ih||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ry&&a!==l0&&a!==Tp&&a!==u0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var s0=new Ue(ca,"Position",0),Np=new Ue(ca,"Location",1),a0=new Ue(ca,"LeftToRight",2),ih=new Ue(ca,"RightToLeft",3),ry=new Ue(ca,"Forward",4),l0=new Ue(ca,"Reverse",5),Tp=new Ue(ca,"Ascending",6),u0=new Ue(ca,"Descending",7);ca.className="GridLayout",ca.standardComparer=ux,ca.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},ca.Position=s0,ca.Location=Np,ca.LeftToRight=a0,ca.RightToLeft=ih,ca.Forward=ry,ca.Reverse=l0,ca.Ascending=Tp,ca.Descending=u0;function er(){this.On=new sn,this.Dn=new sn,this.Pa=new sn,this.cf=new Xn,this.bf=new Xn,this.aj=new Xn,this.H=null,this.tp=!1}Mt=er.prototype,Mt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Mt.Xe=function(a){this.H=a},Mt.oi=function(a){if(a instanceof On){if(this.On.add(a),a instanceof Ii){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof Cn?this.Dn.add(a):a instanceof Fo||this.Pa.add(a);y=a.data,y===null||a instanceof Fo||(a instanceof Cn?this.bf.add(y,a):this.cf.add(y,a))},Mt.pc=function(a){if(a.Ej(),a instanceof On){if(this.On.remove(a),a instanceof Ii){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof Cn?this.Dn.remove(a):a instanceof Fo||this.Pa.remove(a);y=a.data,y===null||a instanceof Fo||(a instanceof Cn?this.bf.remove(y):this.cf.remove(y))},Mt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof Ii)&&oe('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Ii||oe('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Cn||oe('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Hn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Hn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Hn(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);_n(y),_n(x),_n(a)}},er.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},er.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hx(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&_f(this.diagram,!1)};function hx(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=dx(a,y,E);if(b!==null&&(Eu(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}er.prototype.insertLink=function(){return null},er.prototype.resolveReferencesForData=function(){},er.prototype.Ro=function(a){return this.H.model.Ro(a)};function dx(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gx||(gx=!0,Jn('No Group template found for category "'+x+'"'),Jn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fx||(fx=!0,Jn('No Node template found for category "'+x+'"'),Jn(" Using default node template")),y=a.ny))),y}er.prototype.getLinkCategoryForData=function(){return""},er.prototype.setLinkCategoryForData=function(){},er.prototype.setFromNodeForLink=function(){},er.prototype.setToNodeForLink=function(){},er.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(px||(px=!0,Jn('No Link template found for category "'+a+'"'),Jn(" Using default link template")),x=y.my)),x},er.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},er.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},er.prototype.ip=function(a){a=this.Lc(a),a!==null&&(_d(this.diagram,a,!1),this.unresolveReferencesForPart(a))},er.prototype.unresolveReferencesForPart=function(){},er.prototype.removeDataForLink=function(){},er.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},er.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof On?a:null)},er.prototype.findLinkForKey=function(){return null},Mt=er.prototype,Mt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Mt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof On?a:null)},Mt.Kc=function(a){return a===null?null:this.bf.I(a)},Mt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new sn;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ke(tt)&&sy(this,b,tt)){y.add(E);break}}}return y.iterator},Mt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new sn;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ke(tt)&&sy(this,b,tt)){y.add(E);break}}}return y.iterator};function sy(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Qe(z)){if(!Qe(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var ot=z[tt];if(ot!==void 0&&!cx(a,b[tt],ot))return!1}}else if(!cx(a,b,z))return!1}return!0}function cx(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(Ke(y)&&Ke(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}er.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===Or){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===gs){var tt=a.newValue;E==="nodeDataArray"&&Ke(tt)&&hx(this,tt),y.isModified=!0}else if(x===Ds){var ot=a.oldValue;E==="nodeDataArray"&&Ke(ot)&&this.ip(ot),y.isModified=!0}else x===sl&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Or){var rt=a.propertyName,at=a.object;at===y.model?(rt==="nodeKeyProperty"||rt==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(at,rt),y.isModified=!0}else if(x===gs||x===Ds){var ut=a.change===gs,ft=ut?a.newParam:a.oldParam,mt=ut?a.newValue:a.oldValue,yt=this.aj.I(a.object);if(Array.isArray(yt))for(a=0;a<yt.length;a++){var Ct=yt[a];if(ut)km(Ct,mt,ft,!0);else if(!(0>ft)){var kt=ft+cp(Ct);Ct.pc(kt,!0),xv(Ct,kt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},er.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)},er.prototype.rp=function(){for(var a=this.H.model,y=new sn,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){Mx(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&Cx(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},er.prototype.refreshDataBoundLinks=function(){},er.prototype.updateRelationshipsFromData=function(){},er.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=Hn()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);_n(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ay(a,y){var x=y.Hh;if(Qe(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function ly(a,y,x){Zc(y,function(tt){tt=tt.O.s;for(var ot=tt.length,rt=0;rt<ot;rt++)Jg(x,tt[rt])});var E=y.Hh;if(Qe(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}er.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Xn;if(Qe(a))for(var b=0;b<a.length;b++)h0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new sn;for(var z=new Xn,tt=E.iterator;tt.next();){var ot=tt.value;if(ot instanceof Cn)a||ot.fromNode!==null&&ot.toNode!==null||b.add(ot);else if(ot instanceof On&&ot.data!==null&&x.Tl()){var rt=ot;ot=tt.key;var at=ot.pg();at!==null&&(at=E.I(at),at!==null?(x.qe(rt.data,x.wa(at.data)),rt=y.Kc(rt.data),ot=ot.kh(),ot!==null&&rt!==null&&z.add(ot,rt)):x.qe(rt.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new Xn;E.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function h0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof ci))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof On){for(var tt=y.linksConnected;tt.next();){var ot=tt.value;if(ot.fromNode===y){var rt=E.I(ot);rt!==null&&(rt.fromNode=z)}ot.toNode===y&&(ot=E.I(ot),ot!==null&&(ot.toNode=z))}if(y instanceof Ii&&z instanceof Ii)for(y=y.memberParts;y.next();)tt=h0(a,y.value,x,E,b),tt instanceof Cn||tt===null||(tt.containingGroup=z)}else if(y instanceof Cn&&z instanceof Cn)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=h0(a,y.value,x,E,b),tt!==null&&tt instanceof On&&(tt.labeledLink=z);return z}er.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Cn||(E=b.copyNodeData(E),Ke(E)&&(b.xf(E),x=y.Lc(E)))}else Eu(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof Cn||(b=y.copyNodeData(E)),Ke(b)&&(x.data=b)));return x},Gt.Object.defineProperties(er.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),er.prototype.updateAllRelationshipsFromData=er.prototype.rp,er.prototype.findLinksByExample=er.prototype.ls,er.prototype.findNodesByExample=er.prototype.ms,er.prototype.findLinkForData=er.prototype.Kc,er.prototype.findNodeForData=er.prototype.ii,er.prototype.findPartForData=er.prototype.Lc,er.prototype.findNodeForKey=er.prototype.Vb,er.prototype.removeModeledPart=er.prototype.ip,er.prototype.removeModeledParts=er.prototype.Gs,er.prototype.rebuildParts=er.prototype.Wd;var fx=!1,gx=!1,px=!1;er.className="PartManager";function ea(a){er.apply(this,arguments)}Le(ea,er),ea.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mx(this,a.linkDataArray)},ea.prototype.addModeledParts=function(a){for(er.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)yg(a.value);_f(this.diagram,!1)};function mx(a,y){y.forEach(function(x){vx(a,x)}),_f(a.diagram,!1)}function vx(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){Eu(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=g0(x,y,!0);z!==""&&(b.fromPortId=z),z=ql(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof On&&(b.fromNode=z)),z=g0(x,y,!1),z!==""&&(b.toPortId=z),z=ql(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof On&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}ea.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yx(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yx(a,y){y.forEach(function(x){a.ip(x)})}ea.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ea.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ea.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ea.prototype.findPartForKey=function(a){var y=er.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ea.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ea.prototype.doModelChanged=function(a){var y=this;if(er.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===Or){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var ot=this.Kc(a.object);if(ot!==null){var rt=this.Vb(a.newValue);ot.toNode=rt}}else if(b==="linkFromPortId"){var at=this.Kc(a.object);if(at!==null){var ut=a.newValue;typeof ut=="string"&&(at.fromPortId=ut)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var mt=a.newValue;typeof mt=="string"&&(ft.toPortId=mt)}}else if(b==="nodeGroupKey"){var yt=this.Lc(a.object);if(yt!==null){var Ct=a.newValue;if(Ct!==void 0){var kt=this.Vb(Ct);kt instanceof Ii?yt.containingGroup=kt:yt.containingGroup=null}else yt.containingGroup=null}}else if(b==="linkLabelKeys"){var Ht=this.Kc(a.object);if(Ht!==null){var Dt=a.oldValue,Xt=a.newValue;Array.isArray(Dt)&&Dt.forEach(function(on){0<=Xt.indexOf(on)||(on=y.Vb(on),on!==null&&(on.labeledLink=null))}),Array.isArray(Xt)&&Xt.forEach(function(on){on=y.Vb(on),on!==null&&(on.labeledLink=Ht)})}}else if(b==="linkCategory"){var $t=this.Kc(a.object),ie=a.newValue;$t!==null&&typeof ie=="string"&&($t.category=ie)}else b==="linkDataArray"&&(yx(this,a.oldValue),mx(this,a.newValue));x.isModified=!0}else if(E===gs){var fe=a.newValue;if(b==="linkDataArray"&&typeof fe=="object"&&fe!==null)vx(this,fe);else if(b==="linkLabelKeys"&&lc(fe)){var Ae=this.Kc(a.object),Bn=this.Vb(fe);Ae!==null&&Bn!==null&&(Bn.labeledLink=Ae)}x.isModified=!0}else if(E===Ds){var Kn=a.oldValue;if(b==="linkDataArray"&&typeof Kn=="object"&&Kn!==null)this.ip(Kn);else if(b==="linkLabelKeys"&&lc(Kn)){var Gn=this.Vb(Kn);Gn!==null&&(Gn.labeledLink=null)}x.isModified=!0}}else if(E===Or){var Pn=a.propertyName;a.object!==x.model||Pn!=="linkFromKeyProperty"&&Pn!=="linkToKeyProperty"&&Pn!=="linkFromPortIdProperty"&&Pn!=="linkToPortIdProperty"&&Pn!=="linkLabelKeysProperty"&&Pn!=="nodeIsGroupProperty"&&Pn!=="nodeGroupKeyProperty"&&Pn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ea.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new sn,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){Nx(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&Ax(y,z,!1)})},ea.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof Cn){var b=ql(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=ql(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new sn().addAll(y);var tt=new sn;a.labelNodes.each(function(ot){ot.data!==null&&(ot=E.wa(ot.data),ot!==void 0&&tt.add(ot))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(ot){ot=x.Vb(ot),ot!==null&&ot.labeledLink===a&&(ot.labeledLink=null)}),b.each(function(ot){ot=x.Vb(ot),ot!==null&&ot.labeledLink!==a&&(ot.labeledLink=a)}))}}else!(a instanceof Fo)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ii)&&(a.containingGroup=y)}}},ea.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Bp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof Ii&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof On&&(ql(y,tt,!0)===x&&(z.link.fromNode=b),ql(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(ot){return function(rt){return rt===x?(b.labeledLink=ot.link,!0):!1}}(z)))),z={link:z.link}}rh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Ii&&(b.containingGroup=a))}},ea.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof On){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)oh(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&oh(y,x,E.data)),a instanceof Ii)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&oh(y,x,E)}}},ea.prototype.copyPartData=function(a,y){var x=er.prototype.copyPartData.call(this,a,y);if(a instanceof Cn)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},ea.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),ot="";if(a!==null&&(y===null&&(y=a),ot=y.portId,ot===null&&(ot="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof Cn){if(Eu(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=ot,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof On&&(Eu(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&Mg(z,E,z.wa(a.data),!0),Eg(z,E,ot,!0),x!==null&&Mg(z,E,z.wa(x.data),!1),Eg(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof On||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},ea.prototype.findLinkForKey=ea.prototype.findLinkForKey,ea.prototype.findPartForKey=ea.prototype.findPartForKey,ea.prototype.removeAllModeledParts=ea.prototype.removeAllModeledParts,ea.prototype.addModeledParts=ea.prototype.addModeledParts,ea.prototype.addAllModeledParts=ea.prototype.addAllModeledParts,ea.className="GraphLinksPartManager";function cu(){er.apply(this,arguments),this.Sg=null}Le(cu,er);function d0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!dn(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Eu(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}cu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},cu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},cu.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},cu.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},cu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},cu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},cu.prototype.doModelChanged=function(a){if(er.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===Or){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var ot=tt.kh();ot!==null?z===null?y.remove(ot):y.isTreePathToChildren?ot.fromNode=z:ot.toNode=z:d0(this,z,tt)}}else if(E==="parentLinkCategory"){var rt=this.ii(a.object),at=a.newValue;if(rt!==null&&typeof at=="string"){var ut=rt.kh();ut!==null&&(ut.category=at)}}y.isModified=!0}}else if(x===Or){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},cu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof On&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:d0(this,y,a):E!==null&&_d(x,E,!1)))}}},cu.prototype.updateDataBindings=function(a,y){er.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},cu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Bp(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof On&&y.mh(z)===x&&d0(this,b,this.ii(z))}rh(y,x)}a=y.mh(a),a!==void 0&&b instanceof On&&(a=this.Vb(a),d0(this,a,b))}},cu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof On){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(Ds,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&oh(y,x,b)}},cu.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},cu.prototype.findLinkForKey=cu.prototype.findLinkForKey,cu.className="TreePartManager";function ni(a,y){this.kl=new sn,this.il=new sn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,ho(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Xn,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new Xn,this.Lt=new cn,this.Wg=!1,this.o=null,this.undoManager=new Gr,a!==void 0&&(Qe(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ni.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},ni.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ni.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ni.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+wi(b)}}return y},ni.prototype.xA=function(a){a.change!==sl&&oe("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Xs?(xx(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ni.prototype.Qv=function(a,y){var x=this,E=!1,b=new sn,z=new sn,tt=new sn,ot=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===gs?b.add(ft.newValue):ft.change===Ds&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==Or||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(ot&&ot.contains(ft.object)?ot.get(ft.object).each(function(mt){x.lb(mt)&&z.add(mt)}):ft.object instanceof ni||x.ri()&&x.Jc(ft.object)||wx(x,ft.object).each(function(mt){z.add(mt)})):E=!0)});var rt=this.il;rt.clear(),b.each(function(ft){rt.add(x.wa(ft)),y||z.add(ft)});var at=this.kl;at.clear(),tt.each(function(ft){at.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var ut=null;return E&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<rt.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=rt.Fa():ut.insertedNodeKeys=rt.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<at.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=at.Fa():ut.removedNodeKeys=at.Fa()),at.clear(),rt.clear(),ut},ni.prototype.cloneDeep=function(a){return Cg(this,a,!0)};function Cg(a,y,x,E,b,z){function tt(ft,mt){ot?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,mt)):(ft=Fr++,E.set(ft,mt),b.set(ft,y))}if(!Ke(y))return y;z||(z=[]);var ot=Object.isExtensible(y);if(E||(E=new Xn),ot){var rt=E.get(y);if(rt)return rt}else for(b||(b=new Xn),rt=b.iterator;rt.next();){var at=rt.key;if(rt.value===y&&(at=E.get(at)))return at}if(Array.isArray(y)){rt=[],tt(y,rt);for(var ut=0;ut<y.length;ut++)rt.push(Cg(a,y[ut],!1,E,b,z))}else if(y instanceof Rt||y instanceof kn||y instanceof Ze||y instanceof hi||y instanceof ti)rt=y.copy(),tt(y,rt);else{if(y instanceof tr||y instanceof En||y instanceof Ue)return y;if(y instanceof cn)rt=new cn().addAll(Cg(a,y.Fa(),!1,E,b,z)),tt(y,rt);else if(y instanceof sn)rt=new sn().addAll(Cg(a,y.Fa(),!1,E,b,z)),tt(y,rt);else if(y instanceof Xn)rt=new Xn().addAll(Cg(a,y.Fa(),!1,E,b,z)),tt(y,rt);else if(y instanceof Date)rt=new Date(y.getTime()),tt(y,rt);else if(y instanceof RegExp)rt=new RegExp(y),tt(y,rt),rt.lastIndex=y.lastIndex;else if(typeof y.copy=="function")rt=y.copy(),tt(y,rt);else for(ut in rt={},tt(y,rt),y)ut!=="__gohashid"&&(rt[ut]=Cg(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),rt}Mt=ni.prototype,Mt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Mt.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Mt.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function Sx(a,y){y=y.modelData,Ke(y)&&(a.dm(y),a.modelData=y)}Mt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!Px(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+uy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+ac(this,this.nodeDataArray,!0)},Mt.kv=function(a){Sx(this,a),a=a.nodeDataArray,Qe(a)&&(this.dm(a),this.nodeDataArray=a)};function xx(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new sn,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new Xn,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Or?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===gs||z===Ds)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wx(a,y){for(var x=new sn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];c0(a,y,b,b,x)}return x}function c0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(c0(a,y,tt,E,b))return!0}else if(Ke(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(c0(a,y,tt,E,b))return!0}return!1}Mt.Pv=function(a,y){var x=this,E=!1,b=new sn,z=new sn,tt=new sn,ot=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===gs?b.add(ut.newValue):ut.change===Ds&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==Or||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof ni||x.ri()&&x.Jc(ut.object)||wx(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var rt=this.il;rt.clear(),b.each(function(ut){rt.add(x.wa(ut)),y||z.add(ut)});var at=this.kl;return at.clear(),tt.each(function(ut){at.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
|
|
|
"modelData": `+uy(this,this.modelData)),0<rt.count&&(a+=(y?this.Yv:this.Wv)+ac(this,rt.Fa(),!0)),0<z.count&&(a+=this.jy+ac(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Wv:this.Yv)+ac(this,at.Fa(),!0)),at.clear(),rt.clear(),a},Mt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&oe("applyIncrementalJson cannot change Model properties"),Sx(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Xn;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var ot=this.hc(tt);ot===null&&(ot=(ot=E.get(tt))?ot:this.copyNodeData({}),this.km(ot,tt),this.xf(ot))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var rt in b)rt==="__gohashid"||rt===this.nodeKeyProperty||this.Wj()&&rt===this.nodeIsGroupProperty||this.setDataProperty(z,rt,b[rt]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,rt=0;rt<x;rt++)y=this.hc(a[rt]),y!==null&&this.cm(y)},Mt.$x=function(a,y){a.change!==sl&&oe("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Xs?(y===void 0&&(y=Fp(this,this)),xx(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Mt.yA=function(a,y){return this.$x(a,y)},Mt.np=function(a){return a===void 0&&(a=Fp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Mt.toJSON=function(a){return this.np(a)},Mt.Zw=function(a){var y=null;if(typeof a=="string")try{y=qt.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:oe("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&oe("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Mt.Ky=function(a){return this.Zw(a)},ni.constructGraphLinksModel=function(){return new ni},Mt=ni.prototype,Mt.dm=function(a){if(Qe(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Ke(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:oe("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Ke(a)){for(y in a)if(x=a[y],Ke(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new cn,E=0;E<x.length/2;E++)b.add(new Rt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return T1(a)}return a},Mt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):Qe(a)?ac(this,a):Ke(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function ac(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new qn;b.add("["),x&&1<E&&b.add(`
|
|
|
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
|
|
|
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
|
|
|
`),b.add("]"),b.toString()}function Px(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function qa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof Rt)y={class:"go.Point",x:qa(x.x),y:qa(x.y)};else if(x instanceof kn)y={class:"go.Size",width:qa(x.width),height:qa(x.height)};else if(x instanceof Ze)y={class:"go.Rect",x:qa(x.x),y:qa(x.y),width:qa(x.width),height:qa(x.height)};else if(x instanceof hi)y={class:"go.Margin",top:qa(x.top),right:qa(x.right),bottom:qa(x.bottom),left:qa(x.left)};else if(x instanceof ti)x.sb()?y={class:"go.Spot",x:qa(x.x),y:qa(x.y),offsetX:qa(x.offsetX),offsetY:qa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof tr){if(y={class:"go.Brush",type:x.type.name},x.type===bd?y.color=x.color:(x.type===ld||x.type===hu)&&(y.start=x.start,y.end=x.end,x.type===hu&&(x.startRadius!==0&&(y.startRadius=qa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=qa(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof En?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=qa(x.startX)),x.startY!==0&&(y.startY=qa(x.startY)),x.endX!==0&&(y.endX=qa(x.endX)),x.endY!==0&&(y.endY=qa(x.endY)),x.spot1.D(Is)||(y.spot1=x.spot1),x.spot2.D(Ca)||(y.spot2=x.spot2),x.type===En.o&&(y.path=En.ia(x))):x instanceof Ue&&(y={class:"go.EnumValue",classType:Fp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=ws(y,b);if(!Px(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof cn){var tt="[";for(z=z.iterator;z.next();){var ot=z.value;1<tt.length&&(tt+=","),tt+=a.sm(ot.x),tt+=",",tt+=a.sm(ot.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function $a(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function T1(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new Rt($a(a.x),$a(a.y));else if(y==="Size")x=new kn($a(a.width),$a(a.height));else if(y==="Rect")x=new Ze($a(a.x),$a(a.y),$a(a.width),$a(a.height));else if(y==="Margin")x=new hi($a(a.top),$a(a.right),$a(a.bottom),$a(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Ah(a.enum):x=new ti($a(a.x),$a(a.y),$a(a.offsetX),$a(a.offsetY));else if(y==="Brush"){if(x=new tr,x.type=jn(tr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof ti&&(x.start=a.start),a.end instanceof ti&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=$a(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=$a(a.endRadius)),a=a.colorStops,Ke(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=En.parse(a.path):x=new En,x.type=jn(En,a.type),typeof a.startX=="number"&&(x.startX=$a(a.startX)),typeof a.startY=="number"&&(x.startY=$a(a.startY)),typeof a.endX=="number"&&(x.endX=$a(a.endX)),typeof a.endY=="number"&&(x.endY=$a(a.endY)),a.spot1 instanceof ti&&(x.spot1=a.spot1),a.spot2 instanceof ti&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=dy(E),typeof E=="function"&&(x=jn(E,a.name)));return x}Mt.Pe=function(a){return this.Lt.add(a),this},Mt.ik=function(a){this.Lt.remove(a)},Mt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Mt.cb=function(a,y,x,E,b,z,tt){Gs(this,"",a,y,x,E,b,z,tt)},Mt.g=function(a,y,x,E,b){Gs(this,"",Or,a,this,y,x,E,b)},Mt.Fs=function(a,y,x,E,b,z){Gs(this,"",Or,y,a,x,E,b,z)};function Gs(a,y,x,E,b,z,tt,ot,rt){ot===void 0&&(ot=null),rt===void 0&&(rt=null);var at=new Dr;at.model=a,at.change=x,at.modelChange=y,at.propertyName=E,at.object=b,at.oldValue=z,at.oldParam=ot,at.newValue=tt,at.newParam=rt,a.ds(at)}ni.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Or){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),kr(x,E,b)}else a.change===gs?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Ke(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&fi(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Wn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Qe(E)&&a.propertyName&&(E=ws(a.object,a.propertyName)),Qe(E)&&typeof x=="number"&&(a=a.newValue,y?fi(E,x):Wn(E,x,a))):oe("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Ds?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Ke(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Wn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&fi(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Qe(E)&&a.propertyName&&(E=ws(a.object,a.propertyName)),Qe(E)&&typeof x=="number"&&(a=a.oldValue,y?Wn(E,x,a):fi(E,x))):oe("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==sl&&oe("unknown ChangedEvent: "+a.toString())},ni.prototype.Ea=function(a){return this.undoManager.Ea(a)},ni.prototype.eb=function(a){return this.undoManager.eb(a)},ni.prototype.Kf=function(){return this.undoManager.Kf()},ni.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Mt=ni.prototype,Mt.La=function(a,y){y===void 0&&(y=""),Gs(this,"SourceChanged",sl,y,a,null,null)},Mt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ws(a,y),y!==void 0)){if(lc(y))return y;oe("Key value for node data "+a+" is not a number or a string: "+y)}}},Mt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=ws(a,x);E!==y&&this.hc(y)===null&&(kr(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Gs(this,"nodeKey",Or,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else kr(a,x,y)}};function lc(a){return typeof a=="number"||typeof a=="string"}Mt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Mt.hc=function(a){return a===null&&oe("Model.findNodeDataForKey:key must not be null"),a!==void 0&&lc(a)?this.kb.I(a):null},Mt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){kr(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;kr(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;kr(a,y,x)}}}}},Mt.xf=function(a){a!==null&&(Er(a),this.lb(a)||Cx(this,a,!0))};function Cx(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&oe("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Wn(a.Tc,E,y)),Gs(a,"nodeDataArray",gs,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Mt.Fy=function(a){if(Qe(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Mt.cm=function(a){a!==null&&Mx(this,a,!0)};function Mx(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;fi(a.Tc,E)}Gs(a,"nodeDataArray",Ds,"nodeDataArray",a,y,null,E,null),a.qp(y)}Mt.nA=function(a){if(Qe(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Mt.$z=function(a){if(a!==this.nodeDataArray&&Qe(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var ot=this.hc(tt);ot!==z&&(ot!==null?(this.Do(ot,z),this.lm(z,ot)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Mt.jp=function(a,y){y!==void 0&&(a=Bp(this,a),a instanceof sn&&this.Vf.add(y,a))},Mt.Lv=function(){},Mt.fm=function(){},Mt.em=function(){},Mt.qp=function(){};function oh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new sn,a.Vf.add(y,E)),E.add(x)}}function rh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof sn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Bp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof sn?a:null)}Mt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ni.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),Ke(a)&&ho(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=f0(a,y[x],a.copiesArrayObjects);E.push(b)}return ho(E),E}if(x&&Ke(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=ws(y,E),tt=Fp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof ni||z instanceof Gr||z instanceof Xs||z instanceof Dr||(z=f0(a,z,!1)),kr(x,E,z)}return ho(x),x}return y instanceof Rt||y instanceof kn||y instanceof Ze||y instanceof ti||y instanceof hi?y.copy():y}ni.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!Ex&&a instanceof ge&&(Ex=!0,Jn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Jn(" Is that really your intent?"));var E=ws(a,y);E!==x&&(kr(a,y,x),this.Fs(a,y,E,x))},Mt=ni.prototype,Mt.set=function(a,y,x){this.setDataProperty(a,y,x)},Mt.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Mt.Ay=function(a,y){this.ts(a,-1,y)},Mt.ts=function(a,y,x){0>y&&(y=a.length),Wn(a,y,x),Gs(this,"",gs,"",a,null,x,null,y)},Mt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&oe("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];fi(a,y),Gs(this,"",Ds,"",a,x,null,y,null)},Mt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ws(a,y),y===void 0))return"";if(typeof y=="string")return y;oe("getCategoryForNodeData found a non-string category for "+a+": "+y)},Mt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=ws(a,x);E===void 0&&(E=""),E!==y&&(kr(a,x,y),Gs(this,"nodeCategory",Or,x,a,E,y))}else kr(a,x,y)}},Mt.lm=function(a,y){this.jm(y,this.Ro(a))},Mt.Tl=function(){return!1},Mt.Wj=function(){return!1},Mt.ri=function(){return!1},Mt.xs=function(){return!1},Mt.Xj=function(){return!1};function hy(){return new ni}function Fp(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 Fp(a,y.constructor);return typeof y}function dy(a){return Ku[a]?Ku[a]:qt.go!==void 0&&qt.go[a]?qt.go[a]:null}function ws(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function kr(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}Gt.Object.defineProperties(ni.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&oe("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&oe("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];Ke(b)||oe("Model.nodeDataArray must only contain Objects, not: "+b),Er(b)}for(this.Tc=a,E=new cn,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(Gs(this,"nodeDataArray",Or,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),ni.prototype.setCategoryForNodeData=ni.prototype.jm,ni.prototype.getCategoryForNodeData=ni.prototype.Ro,ni.prototype.removeArrayItem=ni.prototype.ov,ni.prototype.insertArrayItem=ni.prototype.ts,ni.prototype.addArrayItem=ni.prototype.Ay,ni.prototype.assignAllDataProperties=ni.prototype.Do,ni.prototype.set=ni.prototype.set,ni.prototype.clearUnresolvedReferences=ni.prototype.Qy,ni.prototype.mergeNodeDataArray=ni.prototype.$z,ni.prototype.removeNodeDataCollection=ni.prototype.nA,ni.prototype.removeNodeData=ni.prototype.cm,ni.prototype.addNodeDataCollection=ni.prototype.Fy,ni.prototype.addNodeData=ni.prototype.xf,ni.prototype.makeNodeDataKeyUnique=ni.prototype.$u,ni.prototype.findNodeDataForKey=ni.prototype.hc,ni.prototype.containsNodeData=ni.prototype.lb,ni.prototype.setKeyForNodeData=ni.prototype.km,ni.prototype.getKeyForNodeData=ni.prototype.wa,ni.prototype.updateTargetBindings=ni.prototype.La,ni.prototype.commit=ni.prototype.commit,ni.prototype.rollbackTransaction=ni.prototype.Kf,ni.prototype.commitTransaction=ni.prototype.eb,ni.prototype.startTransaction=ni.prototype.Ea,ni.prototype.raiseDataChanged=ni.prototype.Fs,ni.prototype.raiseChanged=ni.prototype.g,ni.prototype.raiseChangedEvent=ni.prototype.cb,ni.prototype.removeChangedListener=ni.prototype.ik,ni.prototype.addChangedListener=ni.prototype.Pe,ni.prototype.writeJsonValue=ni.prototype.sm,ni.prototype.replaceJsonObjects=ni.prototype.dm,ni.prototype.applyIncrementalJSON=ni.prototype.Ky,ni.prototype.applyIncrementalJson=ni.prototype.Zw,ni.prototype.toJSON=ni.prototype.toJSON,ni.prototype.toJson=ni.prototype.np,ni.prototype.toIncrementalJSON=ni.prototype.yA,ni.prototype.toIncrementalJson=ni.prototype.$x,ni.prototype.toIncrementalData=ni.prototype.xA,ni.prototype.clear=ni.prototype.clear;var Ex=!1,Ku={};ni.className="Model",ni.fromJSON=ni.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=qt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:oe("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=dy(E)):(b=dy(E),b===null&&(b=qt[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof ni?y=a:oe("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ni.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ni.safePropertyValue=ws,ni.safePropertySet=kr,Ku.Brush=tr,Ku.ChangedEvent=Dr,Ku.Geometry=En,Ku.Margin=hi,Ku.Panel=Sn,Ku.Point=Rt,Ku.Rect=Ze,Ku.Size=kn,Ku.Spot=ti,Ku.Transaction=Xs,Ku.UndoManager=Gr;function Ls(a,y,x,E){ho(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=bx,this.wk=null):(this.el=Ip,this.wk=E),this.st=new sn}Ls.prototype.copy=function(){var a=new Ls;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Mt=Ls.prototype,Mt.qb=function(a){a.classType===Ls&&(this.mode=a)},Mt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.Kx=function(a){return a===void 0&&(a=null),this.mode=Ip,this.backConverter=a,this},Mt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Mt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function Lx(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Mt.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")Jn("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=ws(y,E)),z!==void 0)if(b===null)x!==""&&kr(a,x,z);else try{if(x!==""){var tt=b(z,a);kr(a,x,tt)}else b(z,a)}catch(ot){}}}},Mt.sp=function(a,y,x,E){if(this.el===Ip){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=ws(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var ot=E!==null?E.diagram:null,rt=ot!==null?ot.model:null;if(z===null){if(x!=="")rt!==null?rt.setDataProperty(y,x,tt):kr(y,x,tt);else if(rt!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var at=E.itemIndex,ut=E.panel.itemArray;rt.ov(ut,at),rt.ts(ut,at,tt)}}else try{if(x!==""){var ft=z(tt,y,rt);rt!==null?rt.setDataProperty(y,x,ft):kr(y,x,ft)}else{var mt=z(tt,y,rt);if(mt!==void 0&&rt!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var yt=E.itemIndex,Ct=E.panel.itemArray;rt.ov(Ct,yt),rt.ts(Ct,yt,mt)}}}catch(kt){}}finally{this.st.remove(a)}}}},Gt.Object.defineProperties(Ls.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&qe(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&qe(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&qe(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&qe(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&qe(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&qe(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&qe(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&qe(this),this.el=a}}}),Ls.prototype.updateSource=Ls.prototype.sp,Ls.prototype.updateTarget=Ls.prototype.Mv,Ls.prototype.ofModel=Ls.prototype.dA,Ls.prototype.ofObject=Ls.prototype.cp,Ls.prototype.makeTwoWay=Ls.prototype.Kx;var B1="Binding",bx=new Ue(Ls,"OneWay",1),Ip=new Ue(Ls,"TwoWay",2);Ls.className="Binding",Ls.parseEnum=function(a,y){return function(x){return x=jn(a,x),x===null?y:x}},Ls.toString=wi,Ls.OneWay=bx,Ls.TwoWay=Ip;function Po(a,y,x){ni.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new sn,this.wb=new Xn,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(Qe(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Le(Po,ni),Po.constructGraphLinksModel=ni.constructGraphLinksModel,Po.prototype.cloneProtected=function(a){ni.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Mt=Po.prototype,Mt.clear=function(){ni.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Mt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+wi(b)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+ql(this,b,!0)+"-->"+ql(this,b,!1)}return y},Mt.Qv=function(a,y){this.linkKeyProperty===""&&oe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ni.prototype.Qv.call(this,a,y),E=this,b=new sn,z=new sn,tt=new sn,ot=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===gs?b.add(ut.newValue):ut.change===Ds&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof ni||E.lb(ut.object)||kx(E,ut.object).each(function(ft){z.add(ft)})))});var rt=this.il;rt.clear(),b.each(function(ut){rt.add(E.Ac(ut)),y||z.add(ut)});var at=this.kl;return at.clear(),tt.each(function(ut){at.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<rt.count&&(x===null&&(x={}),y?x.removedLinkKeys=rt.Fa():x.insertedLinkKeys=rt.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<at.count&&(x===null&&(x={}),y?x.insertedLinkKeys=at.Fa():x.removedLinkKeys=at.Fa()),at.clear(),rt.clear(),x},Mt.rm=function(){var a=ni.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Mt.gp=function(a){ni.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Mt.Rv=function(){var a=ni.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+ac(this,this.linkDataArray,!0);return a+y},Mt.kv=function(a){ni.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function kx(a,y){for(var x=new sn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];c0(a,y,b,b,x)}return x}Mt.Pv=function(a,y){this.linkKeyProperty===""&&oe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ni.prototype.Pv.call(this,a,y),E=this,b=new sn,z=new sn,tt=new sn,ot=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===gs?b.add(ut.newValue):ut.change===Ds&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof ni||E.lb(ut.object)||kx(E,ut.object).each(function(ft){z.add(ft)})))});var rt=this.il;rt.clear(),b.each(function(ut){rt.add(E.Ac(ut)),y||z.add(ut)});var at=this.kl;return at.clear(),tt.each(function(ut){at.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<rt.count&&(a+=(y?this.Xv:this.Vv)+ac(this,rt.Fa(),!0)),0<z.count&&(a+=this.iy+ac(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Vv:this.Xv)+ac(this,at.Fa(),!0)),at.clear(),rt.clear(),a},Mt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&oe("applyIncrementalJson cannot change Model properties"),ni.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);Tx(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Po.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Or){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),kr(x,E,b);return}}else if(a.change===gs){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Ke(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Ds){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Ke(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}ni.prototype.changeState.call(this,a,y)}},Mt=Po.prototype,Mt.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),kr(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Mt.yx=function(a){return ql(this,a,!0)},Mt.wv=function(a,y){Mg(this,a,y,!0)},Mt.Bx=function(a){return ql(this,a,!1)},Mt.Bv=function(a,y){Mg(this,a,y,!1)};function ql(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ws(y,a),a!==void 0))){if(lc(a))return a;oe((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Mg(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=ws(y,b);z!==x&&(rh(a,z,y),kr(y,b,x),a.hc(x)===null&&oh(a,x,y),Gs(a,E?"linkFromKey":"linkToKey",Or,b,y,z,x),typeof b=="string"&&a.La(y,b))}else kr(y,b,x)}}Mt.zx=function(a){return g0(this,a,!0)},Mt.xv=function(a,y){Eg(this,a,y,!0)},Mt.Cx=function(a){return g0(this,a,!1)},Mt.Cv=function(a,y){Eg(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ws(y,a),y===void 0?"":y)}function Eg(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=ws(y,b);z===void 0&&(z=""),z!==x&&(kr(y,b,x),Gs(a,E?"linkFromPortId":"linkToPortId",Or,b,y,z,x),typeof b=="string"&&a.La(y,b))}else kr(y,b,x)}}Mt.Ef=function(a){if(a===null)return p0;var y=this.je;return y===""?p0:(a=ws(a,y),a===void 0?p0:a)},Mt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=ws(a,x);if(E===void 0&&(E=p0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)rh(this,E[z],a);for(kr(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&oh(this,tt,a)}Gs(this,"linkLabelKeys",Or,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else kr(a,x,y)}},Mt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ws(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&oh(this,y,a),Gs(this,"linkLabelKeys",gs,x,a,null,y,null,b)))}else oe(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Mt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ws(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(rh(this,y,a),Gs(this,"linkLabelKeys",Ds,x,a,y,null,b,null)))}else E!==void 0&&oe(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Mt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ws(a,y),y!==void 0)){if(lc(y))return y;oe("Key value for link data "+a+" is not a number or a string: "+y)}}},Mt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=ws(a,x);E!==y&&this.jh(y)===null&&(kr(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Gs(this,"linkKey",Or,x,a,E,y),typeof x=="string"&&this.La(a,x))}else kr(a,x,y)}},Mt.jh=function(a){return a===null&&oe("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&lc(a)?this.wb.I(a):null},Mt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){kr(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;kr(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;kr(a,y,x)}}}}},Mt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Mt.fi=function(a){a!==null&&(Er(a),this.Jc(a)||Ax(this,a,!0))};function Ax(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&oe("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),Gs(a,"linkDataArray",gs,"linkDataArray",a,null,y,null,E),cy(a,y)}Mt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Mt.bm=function(a){a!==null&&Nx(this,a,!0)};function Nx(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(Gs(a,"linkDataArray",Ds,"linkDataArray",a,y,null,E,null),x=ql(a,y,!0),rh(a,x,y),x=ql(a,y,!1),rh(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],rh(a,x,y)}Mt.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Mt.Zz=function(a){if(this.linkKeyProperty===""&&oe("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Qe(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var ot=this.jh(tt);ot!==z&&(ot!==null?(this.Do(ot,z),Tx(this,z,ot)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function cy(a,y){var x=ql(a,y,!0);x=a.Vl(x),a.hc(x)===null&&oh(a,x,y),x=ql(a,y,!1),x=a.Vl(x),a.hc(x)===null&&oh(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&oh(a,x,y)}Mt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),Ke(a)&&(ho(a),this.lf!==""&&kr(a,this.lf,void 0),this.mf!==""&&kr(a,this.mf,void 0),this.je!==""&&kr(a,this.je,[])),a},Mt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ws(a,y)},Mt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ws(a,y),y!==void 0)){if(lc(y))return y;oe("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Mt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=ws(a,x);E!==y&&(rh(this,E,a),kr(a,x,y),this.hc(y)===null&&oh(this,y,a),Gs(this,"nodeGroupKey",Or,x,a,E,y),typeof x=="string"&&this.La(a,x))}else kr(a,x,y)}},Po.prototype.copyNodeData=function(a){return a===null?null:(a=ni.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ws(a,this.Je)===void 0||kr(a,this.Je,void 0),a)},Po.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){Mg(this,a,x,!0);return}if(y===this.linkToKeyProperty){Mg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Eg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Eg(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=ws(a,y);E!==x&&(kr(a,y,x),this.Fs(a,y,E,x))},Mt=Po.prototype,Mt.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&ws(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Mt.jp=function(a,y){ni.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if(ql(this,E,!0)===b){var tt=this.lf;kr(E,tt,z),Gs(this,"linkFromKey",Or,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(ql(this,E,!1)===b&&(tt=this.mf,kr(E,tt,z),Gs(this,"linkToKey",Or,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var ot=tt.length,rt=this.je,at=0;at<ot;at++)tt[at]===b&&(tt[at]=z,Gs(this,"linkLabelKeys",gs,rt,E,b,z,at,at))}},Mt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;kr(a,E,x),Gs(this,"nodeGroupKey",Or,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Mt.Lv=function(){ni.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)cy(this,a[x])},Mt.fm=function(a){ni.prototype.fm.call(this,a),a=this.wa(a);var y=Bp(this,a);if(y!==null){var x=Hn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Gs(this,"nodeGroupKey",Or,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(ql(this,E,!0)===a&&(b=this.lf,Gs(this,"linkFromKey",Or,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),ql(this,E,!1)===a&&(b=this.mf,Gs(this,"linkToKey",Or,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,ot=0;ot<z;ot++)b[ot]===a&&(Gs(this,"linkLabelKeys",gs,tt,E,a,a,ot,ot),x.push(E))}for(y=0;y<x.length;y++)rh(this,a,x[y]);_n(x)}},Mt.em=function(a){ni.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&oh(this,y,a)},Mt.qp=function(a){ni.prototype.qp.call(this,a);var y=this.lh(a);rh(this,y,a)},Mt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ws(a,y),y===void 0))return"";if(typeof y=="string")return y;oe("getCategoryForLinkData found a non-string category for "+a+": "+y)},Po.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Po.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=ws(a,x);E===void 0&&(E=""),E!==y&&(kr(a,x,y),Gs(this,"linkCategory",Or,x,a,E,y),typeof x=="string"&&this.La(a,x))}else kr(a,x,y)}},Po.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Mt=Po.prototype,Mt.lm=function(a,y){ni.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function Tx(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Mt.Wj=function(){return!0},Mt.ri=function(){return!0},Mt.xs=function(){return!0},Mt.Xj=function(){return!0},Gt.Object.defineProperties(Po.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];Ke(b)||oe("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Er(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new cn,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new sn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Gs(this,"linkDataArray",Or,"linkDataArray",this,y,a),y=0;y<x;y++)cy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),Po.prototype.setCategoryForLinkData=Po.prototype.lp,Po.prototype.getCategoryForLinkData=Po.prototype.ps,Po.prototype.assignAllDataProperties=Po.prototype.Do,Po.prototype.setGroupKeyForNodeData=Po.prototype.mp,Po.prototype.getGroupKeyForNodeData=Po.prototype.lh,Po.prototype.isGroupForNodeData=Po.prototype.Yu,Po.prototype.copyLinkData=Po.prototype.Jo,Po.prototype.mergeLinkDataArray=Po.prototype.Zz,Po.prototype.removeLinkDataCollection=Po.prototype.lA,Po.prototype.removeLinkData=Po.prototype.bm,Po.prototype.addLinkDataCollection=Po.prototype.Ey,Po.prototype.addLinkData=Po.prototype.fi,Po.prototype.containsLinkData=Po.prototype.Jc,Po.prototype.makeLinkDataKeyUnique=Po.prototype.Bs,Po.prototype.findLinkDataForKey=Po.prototype.jh,Po.prototype.setKeyForLinkData=Po.prototype.Ks,Po.prototype.getKeyForLinkData=Po.prototype.Ac,Po.prototype.removeLabelKeyForLinkData=Po.prototype.Qx,Po.prototype.addLabelKeyForLinkData=Po.prototype.Bu,Po.prototype.setLabelKeysForLinkData=Po.prototype.Ls,Po.prototype.getLabelKeysForLinkData=Po.prototype.Ef,Po.prototype.setToPortIdForLinkData=Po.prototype.Cv,Po.prototype.getToPortIdForLinkData=Po.prototype.Cx,Po.prototype.setFromPortIdForLinkData=Po.prototype.xv,Po.prototype.getFromPortIdForLinkData=Po.prototype.zx,Po.prototype.setToKeyForLinkData=Po.prototype.Bv,Po.prototype.getToKeyForLinkData=Po.prototype.Bx,Po.prototype.setFromKeyForLinkData=Po.prototype.wv,Po.prototype.getFromKeyForLinkData=Po.prototype.yx,Po.prototype.clear=Po.prototype.clear;var p0=Object.freeze([]);Po.className="GraphLinksModel",Ku.GraphLinksModel=Po,ni.constructGraphLinksModel=ni.constructGraphLinksModel=function(){return new Po},ni.initDiagramModel=hy=function(){return new Po};function tl(a,y){ni.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Qe(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Le(tl,ni),tl.constructGraphLinksModel=ni.constructGraphLinksModel,tl.prototype.cloneProtected=function(a){ni.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Mt=tl.prototype,Mt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+wi(b)}}return y},Mt.rm=function(){var a=ni.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Mt.gp=function(a){ni.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Mt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&oe("applyIncrementalJson cannot change Model properties"),ni.prototype.fp.call(this,a)},Mt.Vl=function(a){return a},Mt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ws(a,y),y!==void 0)){if(lc(y))return y;oe("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Mt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=ws(a,x);E!==y&&(rh(this,E,a),kr(a,x,y),this.hc(y)===null&&oh(this,y,a),Gs(this,"nodeParentKey",Or,x,a,E,y),typeof x=="string"&&this.La(a,x))}else kr(a,x,y)}},Mt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ws(a,y),y===void 0)?"":typeof y=="string"?y:(oe("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},tl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},tl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=ws(a,x);E===void 0&&(E=""),E!==y&&(kr(a,x,y),Gs(this,"parentLinkCategory",Or,x,a,E,y),typeof x=="string"&&this.La(a,x))}else kr(a,x,y)}},tl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},tl.prototype.copyNodeData=function(a){return a===null?null:(a=ni.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ws(a,this.Ke)===void 0||kr(a,this.Ke,void 0),a)},tl.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=ws(a,y);E!==x&&(kr(a,y,x),this.Fs(a,y,E,x))},Mt=tl.prototype,Mt.jp=function(a,y){ni.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Mt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;kr(a,E,x),Gs(this,"nodeParentKey",Or,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Mt.fm=function(a){ni.prototype.fm.call(this,a),a=this.wa(a);var y=Bp(this,a);if(y!==null){var x=Hn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Gs(this,"nodeParentKey",Or,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)rh(this,a,x[y]);_n(x)}},Mt.em=function(a){ni.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&oh(this,y,a)},Mt.qp=function(a){ni.prototype.qp.call(this,a);var y=this.mh(a);rh(this,y,a)},Mt.lm=function(a,y){ni.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Mt.Tl=function(){return!0},Mt.xs=function(){return!0},Gt.Object.defineProperties(tl.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),tl.prototype.setParentLinkCategoryForNodeData=tl.prototype.Ms,tl.prototype.getParentLinkCategoryForNodeData=tl.prototype.ss,tl.prototype.setParentKeyForNodeData=tl.prototype.qe,tl.prototype.getParentKeyForNodeData=tl.prototype.mh,tl.className="TreeModel",Ku.TreeModel=tl;function Yr(a){Br.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Zu,this.Ti=0,this.Zv=new Rt,this.Jp=this.me=0,this.Xr=new jp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Zu,this.K=el,this.nd=bg,this.hd=oy,this.tf=6,this.Nn=P0,a&&Object.assign(this,a)}Le(Yr,Br),Yr.prototype.cloneProtected=function(a){Br.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},Yr.prototype.qb=function(a){a.classType===Yr?a===x0||a===w0||a===y0||a===S0||a===bg?this.sorting=a:a===Jc||a===Lg||a===el||a===hc?this.direction=a:a===Dd||a===uc||a===Zu||a===Uu?this.arrangement=a:(a===kf||a===P0)&&(this.nodeDiameterFormula=a):Br.prototype.qb.call(this,a)},Yr.prototype.createNetwork=function(){return new kg(this)},Yr.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new cn;y.addAll(a.iterator),a=new cn;var x=new cn,E=this.sort(y),b,z,tt=this.Jp,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 ft=this.startAngle;isFinite(ft)||(ft=0);var mt=this.sweepAngle;if((!isFinite(mt)||360<mt||1>mt)&&(mt=360),y=this.spacing,isFinite(y)||(y=NaN),ot===Uu&&rt===kf?ot=Zu:ot===Uu&&rt!==kf&&(ot=this.arrangement),(this.direction===Jc||this.direction===Lg)&&this.sorting!==bg){for(rt=0;!(rt>=E.length)&&(a.add(E.M(rt)),!(rt+1>=E.length));rt+=2)x.add(E.M(rt+1));this.direction===Jc?(this.arrangement===Uu&&a.reverse(),E=new cn,E.addAll(a),E.addAll(x)):(this.arrangement===Uu&&x.reverse(),E=new cn,E.addAll(x),E.addAll(a))}rt=E.length;for(var yt=z=b=0;yt<E.length;yt++){var Ct=ft+mt*z*(this.direction===el?1:-1)/rt,kt=E.M(yt).diameter;isNaN(kt)&&(kt=dc(E.M(yt),Ct)),360>mt&&(yt===0||yt===E.length-1)&&(kt/=2),b+=kt,z++}if(isNaN(at)||ot===Uu){if(isNaN(y)&&(y=6),ot!==Zu&&ot!==Uu){for(z=-1/0,tt=0;tt<rt;tt++)yt=E.M(tt),b=E.M(tt===rt-1?0:tt+1),isNaN(yt.diameter)&&dc(yt,0),isNaN(b.diameter)&&dc(b,0),z=Math.max(z,(yt.diameter+b.diameter)/2);tt=z+y,ot===Dd?at=(z+y)/(2*Math.PI/rt):at=m0(this,tt*(360<=mt?rt:rt-1),ut,ft*Math.PI/180,mt*Math.PI/180)}else at=m0(this,b+(360<=mt?rt:rt-1)*(ot!==Uu?y:1.6*y),ut,ft*Math.PI/180,mt*Math.PI/180);z=at*ut}else if(z=at*ut,yt=fy(this,at,z,ft*Math.PI/180,mt*Math.PI/180),isNaN(y))(ot===Zu||ot===Uu)&&(y=(yt-b)/(360<=mt?rt:rt-1));else if(ot===Zu||ot===Uu)yt=(yt-b)/(360<=mt?rt:rt-1),yt<y?(at=m0(this,b+y*(360<=mt?rt:rt-1),ut,ft*Math.PI/180,mt*Math.PI/180),z=at*ut):y=yt;else{for(tt=-1/0,b=0;b<rt;b++)Ct=E.M(b),kt=E.M(b===rt-1?0:b+1),isNaN(Ct.diameter)&&dc(Ct,0),isNaN(kt.diameter)&&dc(kt,0),tt=Math.max(tt,(Ct.diameter+kt.diameter)/2);tt+=y,b=m0(this,tt*(360<=mt?rt:rt-1),ut,ft*Math.PI/180,mt*Math.PI/180),b>at?(at=b,z=at*ut):tt=yt/(360<=mt?rt:rt-1)}if(this.kw=ot,this.lc=at,this.Zm=ut,this.lw=ft,this.Wp=mt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,ot=this.lc,at=this.lw,ut=this.Wp,ft=this.Ti,mt=this.me,rt=this.Jp,this.direction!==Jc&&this.direction!==Lg||E!==Uu)if(this.direction===Jc||this.direction===Lg){switch(tt=0,E){case uc:tt=180*v0(this,ot,mt,at,rt)/Math.PI;break;case Zu:rt=y=0,tt=a.first(),tt!==null&&(y=dc(tt,Math.PI/2)),tt=x.first(),tt!==null&&(rt=dc(tt,Math.PI/2)),tt=180*v0(this,ot,mt,at,ft+(y+rt)/2)/Math.PI;break;case Dd:tt=ut/y.length}if(this.direction===Jc){switch(E){case uc:Rp(this,a,at,hc);break;case Zu:Op(this,a,at,hc);break;case Dd:Dp(this,a,ut/2,at,hc)}switch(E){case uc:Rp(this,x,at+tt,el);break;case Zu:Op(this,x,at+tt,el);break;case Dd:Dp(this,x,ut/2,at+tt,el)}}else{switch(E){case uc:Rp(this,x,at,hc);break;case Zu:Op(this,x,at,hc);break;case Dd:Dp(this,x,ut/2,at,hc)}switch(E){case uc:Rp(this,a,at+tt,el);break;case Zu:Op(this,a,at+tt,el);break;case Dd:Dp(this,a,ut/2,at+tt,el)}}}else switch(E){case uc:Rp(this,y,at,this.direction);break;case Zu:Op(this,y,at,this.direction);break;case Dd:Dp(this,y,ut,at,this.direction);break;case Uu:Bx(this,y,ut,at,this.direction)}else Bx(this,y,ut,at-ut/2,el)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Dp(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var at=E+(b===el?rt*x/(360<=z?ot:ot-1):-(rt*x)/ot),ut=y.M(rt),ft=tt*Math.tan(at)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(at),ut.centerY=ft*Math.sin(at),ut.actualAngle=180*at/Math.PI}}function Op(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var at=y.M(rt),ut=y.M(rt===ot-1?0:rt+1),ft=z*Math.sin(x);at.centerX=b*Math.cos(x),at.centerY=ft,at.actualAngle=180*x/Math.PI,isNaN(at.diameter)&&dc(at,0),isNaN(ut.diameter)&&dc(ut,0),at=v0(a,b,z,E===el?x:-x,(at.diameter+ut.diameter)/2+tt),x+=E===el?at:-at}}function Rp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var at=y.M(rt);at.centerX=b*Math.cos(x),at.centerY=z*Math.sin(x),at.actualAngle=180*x/Math.PI,at=v0(a,b,z,E===el?x:-x,tt),x+=E===el?at:-at}}function Bx(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new jp,360>x){for(z=E+(b===el?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,Ix(a,y,x,E,b)}else Fx(a,y,x,E,b);a.Xr.commit(y)}function Fx(a,y,x,E,b){var z=a.lc,tt=a.Ti,ot=a.Zm,rt=z*Math.cos(E*Math.PI/180),at=a.me*Math.sin(E*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=Rt.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=rt,ut[ft].centerY=at,!(ft>=ut.length-1));ft++)Dx(a,rt,at,ut,ft,b,z)||Ox(a,rt,at,ut,ft,b,z),rt=z.x,at=z.y;if(Rt.free(z),a.mj++,!(23<a.mj)){rt=ut[0].centerX,at=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var mt=Math.abs(rt-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),yt=Math.abs(at-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(yt)?Math.abs(rt-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<yt?yt:1>Math.abs(mt)?0:mt,rt=Math.abs(z)>Math.abs(ft)?0<z!=at>ft:0<ft!=rt<z,(rt=b===el?rt:!rt)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*ot,Fx(a,y,x,E,b))}}}function Ix(a,y,x,E,b){for(var z=a.lc,tt=a.me,ot=a.Zm,rt=z*Math.cos(E*Math.PI/180),at=tt*Math.sin(E*Math.PI/180),ut=Rt.alloc(),ft=y.Fa(),mt=0;mt<ft.length&&(ft[mt].centerX=rt,ft[mt].centerY=at,!(mt>=ft.length-1));mt++)Dx(a,rt,at,ft,mt,b,ut)||Ox(a,rt,at,ft,mt,b,ut),rt=ut.x,at=ut.y;if(Rt.free(ut),a.mj++,!(23<a.mj)){if(rt=Math.atan2(at,rt),rt=b===el?a.gt-rt:rt-a.gt,rt=Math.abs(rt)<Math.abs(rt-2*Math.PI)?rt:rt-2*Math.PI,z=rt*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],rt=0;rt<ft.length;rt++)tt.mk[rt]=ft[rt].bounds.x,tt.tm[rt]=ft[rt].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*ot,Ix(a,y,x,E,b))}}function Dx(a,y,x,E,b,z,tt){var ot=a.lc,rt=a.me,at=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===el)){if(z=y+a,z>ot){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)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=at,!1):(tt.x=z,tt.y=at,!0)}function Ox(a,y,x,E,b,z,tt){var ot=a.lc,rt=a.me,at=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===el)){if(z=x-a,z<-rt){if(z=x+a,z>rt){tt.x=at,tt.y=z;return}E=!0}}else if(z=x+a,z>rt){if(z=x-a,z<-rt){tt.x=at,tt.y=z;return}E=!0}at=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>y!==E&&(at=-at),tt.x=at,tt.y=z}Yr.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Yr.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 Rt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,ot=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),rt=0,at=0;at<=z;at++){E!==void 0&&b!==void 0?rt=E+at*b/z:rt=at*Math.PI/(2*z);var ut=Math.sin(rt);tt+=Math.sqrt(1-a*a*ut*ut)*ot}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function m0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function v0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var ot=0;;ot++){var rt=Math.sin(E+ot*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*rt*rt)*a,tt>=b)return ot*a}}Yr.prototype.sort=function(a){switch(this.sorting){case y0:break;case S0:a.reverse();break;case x0:a.sort(this.comparer);break;case w0:a.sort(this.comparer),a.reverse();break;case bg:return this.ak(F1(a));default:oe("Invalid sorting type.")}return a};function F1(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new cn;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var ot=a.M(tt).edgesCount;ot>b&&(b=ot,z=tt)}else for(tt=0;tt<a.length;tt++)ot=y[tt],ot>b&&(b=ot,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}Yr.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],ot=[];E=[],b=new cn;for(var rt=0,at=0;at<y.length;at++){var ut=y[at].length;if(ut===1)E.push(at);else if(ut===0)b.add(a.M(at));else{if(rt===0)x.push(at);else{for(var ft=ut=1/0,mt=-1,yt=[],Ct=0;Ct<x.length;Ct++)0>y[x[Ct]].indexOf(x[Ct===x.length-1?0:Ct+1])&&yt.push(Ct===x.length-1?0:Ct+1);if(yt.length===0)for(Ct=0;Ct<x.length;Ct++)yt.push(Ct);for(Ct=0;Ct<yt.length;Ct++){for(var kt=yt[Ct],Ht=y[at],Dt=0,Xt=0;Xt<tt.length;Xt++){var $t=z[tt[Xt]],ie=z[ot[Xt]];if($t<ie){var fe=$t;$t=ie}else fe=ie;if(fe<kt&&kt<=$t)for(ie=0;ie<Ht.length;ie++){var Ae=Ht[ie];0>x.indexOf(Ae)||fe<z[Ae]&&z[Ae]<$t||fe===z[Ae]||$t===z[Ae]||Dt++}else for(ie=0;ie<Ht.length;ie++)Ae=Ht[ie],0>x.indexOf(Ae)||fe<z[Ae]&&z[Ae]<$t&&fe!==z[Ae]&&$t!==z[Ae]&&Dt++}for(Ht=Dt,Xt=Dt=0;Xt<y[at].length;Xt++)fe=x.indexOf(y[at][Xt]),0<=fe&&(fe=Math.abs(kt-(fe>=kt?fe+1:fe)),Dt+=fe<x.length+1-fe?fe:x.length+1-fe);for(Xt=0;Xt<tt.length;Xt++)fe=z[tt[Xt]],$t=z[ot[Xt]],fe>=kt&&fe++,$t>=kt&&$t++,fe>$t&&(ie=$t,$t=fe,fe=ie),$t-fe<(x.length+2)/2==(fe<kt&&kt<=$t)&&Dt++;(Ht<ut||Ht===ut&&Dt<ft)&&(ut=Ht,ft=Dt,mt=kt)}for(x.splice(mt,0,at),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[at].length;ut++)ft=y[at][ut],0<=x.indexOf(ft)&&(tt.push(at),ot.push(ft))}rt++}}for(tt=x.length;;){for(z=!0,ot=0;ot<E.length;ot++)if(rt=E[ot],at=y[rt][0],ut=x.indexOf(at),0<=ut){for(mt=ft=0;mt<y[at].length;mt++)yt=x.indexOf(y[at][mt]),0>yt||yt===ut||(Ct=yt>ut?yt-ut:ut-yt,ft+=yt<ut!=Ct>tt-Ct?1:-1);x.splice(0>ft?ut:ut+1,0,rt),E.splice(ot,1),ot--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Gt.Object.defineProperties(Yr.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Uu&&a!==Zu&&a!==uc&&a!==Dd||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==el&&a!==hc&&a!==Jc&&a!==Lg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==y0&&a!==S0&&a!==x0&&!w0&&a!==bg||(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!==P0&&a!==kf||(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 Zu=new Ue(Yr,"ConstantSpacing",0),uc=new Ue(Yr,"ConstantDistance",1),Dd=new Ue(Yr,"ConstantAngle",2),Uu=new Ue(Yr,"Packed",3),el=new Ue(Yr,"Clockwise",4),hc=new Ue(Yr,"Counterclockwise",5),Jc=new Ue(Yr,"BidirectionalLeft",6),Lg=new Ue(Yr,"BidirectionalRight",7),y0=new Ue(Yr,"Forwards",8),S0=new Ue(Yr,"Reverse",9),x0=new Ue(Yr,"Ascending",10),w0=new Ue(Yr,"Descending",11),bg=new Ue(Yr,"Optimized",12),P0=new Ue(Yr,"Pythagorean",13),kf=new Ue(Yr,"Circular",14);Yr.className="CircularLayout",Yr.ConstantSpacing=Zu,Yr.ConstantDistance=uc,Yr.ConstantAngle=Dd,Yr.Packed=Uu,Yr.Clockwise=el,Yr.Counterclockwise=hc,Yr.BidirectionalLeft=Jc,Yr.BidirectionalRight=Lg,Yr.Forwards=y0,Yr.Reverse=S0,Yr.Ascending=x0,Yr.Descending=w0,Yr.Optimized=bg,Yr.Pythagorean=P0,Yr.Circular=kf;function jp(){this.Pl=-1/0,this.tm=this.mk=null}jp.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},jp.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},jp.className="VertexArrangement";function kg(a){Sr.call(this,a)}Le(kg,Sr),kg.prototype.createVertex=function(){return new zp(this)},kg.prototype.createEdge=function(){return new C0(this)},kg.className="CircularNetwork";function zp(a){Vs.call(this,a),this.u=this.Si=NaN}Le(zp,Vs);function dc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Uu)if(x.nodeDiameterFormula===kf)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===kf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Gt.Object.defineProperties(zp.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),zp.className="CircularVertex";function C0(a){Il.call(this,a)}Le(C0,Il),C0.className="CircularEdge";function wa(a){Br.call(this),this.ah=null,this.An=0,this.$d=new kn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Le(wa,Br),wa.prototype.cloneProtected=function(a){Br.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},wa.prototype.createNetwork=function(){return new Af(this)},wa.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}Rx(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var ot=tt.count,rt=!0;z=b=0;for(var at=Hn(),ut=0;ut<ot+y.vertexes.count+2;ut++)at[ut]=null;ot=0,tt.reset();for(var ft=Ze.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),rt)rt=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,at[0]=new Rt(ft.x+ft.width+E.width,ft.y),at[1]=new Rt(ft.x,ft.y+ft.height+E.height),ot=2;else{var mt=jx(at,ot,b,z,ft.width,ft.height,E),yt=at[mt],Ct=new Rt(yt.x+ft.width+E.width,yt.y),kt=new Rt(yt.x,yt.y+ft.height+E.height);for(mt+1<ot&&at.splice(mt+1,0,null),at[mt]=Ct,at[mt+1]=kt,ot++,mt=yt.x-ft.x,yt=yt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)Ct=ut.value,Ct.centerX+=mt,Ct.centerY+=yt}for(Ze.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,mt=tt.bounds,2>ot?(b=mt.x+mt.width/2,z=mt.y+mt.height/2,at[0]=new Rt(mt.x+mt.width+E.width,mt.y),at[1]=new Rt(mt.x,mt.y+mt.height+E.height),ot=2):(rt=jx(at,ot,b,z,mt.width,mt.height,E),ft=at[rt],yt=new Rt(ft.x+mt.width+E.width,ft.y),mt=new Rt(ft.x,ft.y+mt.height+E.height),rt+1<ot&&at.splice(rt+1,0,null),at[rt]=yt,at[rt+1]=mt,ot++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(_n(at),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}Hx(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},wa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},wa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function Rx(a,y,x){if(I1(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=D1(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,Rx(a,y+1,x),Hx(a,z),O1(a,b),y=b.vertexes.Fa(),y.sort(function(tt,ot){return tt===null||ot===null||tt===ot?0:ot.Vd-tt.Vd}),x=0;x<y.length;x++)R1(a,y[x]);a.Zf=E}}function I1(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function D1(a,y){for(var x=a.network,E=new Af(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new Gx;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new cn),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var ot=z.value;b=ot.fromVertex,tt=ot.toVertex,b.network===E&&tt.network===E?E.Bo(ot):b.network===E?(ot=b.Hj,ot===null&&(ot=new cn,b.Hj=ot),ot.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(ot=tt.Hj,ot===null&&(ot=new cn,tt.Hj=ot),ot.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,ve.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var rt=b.Hj;if(rt!==null&&0<rt.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var at=ot=0,ut=rt.count-tt;ut<rt.count;ut++){var ft=rt.M(ut),mt=null;for(z=ft.edges.iterator;z.next();){var yt=z.value;if(yt.Ax(ft)===b){mt=yt;break}}mt!==null&&(at+=mt.length,ot+=ft.width*ft.height)}z=b.centerX,rt=b.centerY,ut=b.width,ft=b.height,mt=b.focus,yt=ut*ft,1>yt&&(yt=1),ot=ve.sqrt((ot+yt+at*at*4/(tt*tt))/yt),tt=(ot-1)*ut/2,ot=(ot-1)*ft/2,b.bounds=new Ze(z-mt.x-tt,rt-mt.y-ot,ut+2*tt,ft+2*ot),b.focus=new Rt(mt.x+tt,mt.y+ot)}}return a.network=E,x}function O1(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new Ze(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Rt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function R1(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=ve.sqrt(z*z+tt*tt)/2;for(var ot=!1,rt=tt=0,at=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.value;1>=ft.Vd?rt++:(ot=!0,at++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(rt!==0){for(0<at&&(tt/=at),at=y=0,y=ot?2*Math.PI/(rt+1):2*Math.PI/rt,rt%2===0&&(at=y/2),1<x.count&&x.sort(function(yt,Ct){return yt===null||Ct===null||yt===Ct?0:Ct.width*Ct.height-yt.width*yt.height}),ot=rt%2===0?0:1,x=x.iterator;x.next();)if(rt=x.value,!(1<rt.Vd||a.isFixed(rt))){for(ut=null,ft=rt.edges.iterator;ft.next();){ut=ft.value;break}ft=rt.width;var mt=rt.height;ft=ve.sqrt(ft*ft+mt*mt)/2,ut=z+ut.length+ft,ft=tt+(y*(ot/2>>1)+at)*(ot%2===0?1:-1),rt.centerX=E+ut*Math.cos(ft),rt.centerY=b+ut*Math.sin(ft),ot++}}}}function jx(a,y,x,E,b,z,tt){var ot=9e19,rt=-1,at=0;t:for(;at<y;at++){var ut=a[at],ft=ut.x-x,mt=ut.y-E;if(ft=ft*ft+mt*mt,ft<ot){for(mt=at-1;0<=mt;mt--)if(a[mt].y>ut.y&&a[mt].x-ut.x<b+tt.width)continue t;for(mt=at+1;mt<y;mt++)if(a[mt].x>ut.x&&a[mt].y-ut.y<z+tt.height)continue t;rt=at,ot=ft}}return rt}wa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},wa.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function zx(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var ot=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,ve.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,ve.sqrt(E*E+a*a)):tt-(E+b):E>tt+ot?a>y+z?(x=E-tt-ot,a=a-y-z,ve.sqrt(x*x+a*a)):a+x<y?(E=E-tt-ot,a=a+x-y,ve.sqrt(E*E+a*a)):E-(tt+ot):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Hx(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,j1(a)););a.ah=null}function j1(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var ot=y[tt];ot.forceX=0,ot.forceY=0;var rt=ot.centerX;ot=ot.centerY,E=Math.min(E,rt),b=Math.max(b,rt),x=Math.min(x,ot),z=Math.max(z,ot)}(b=b-E>z-x)?y.sort(function(kt,Ht){return kt===null||Ht===null||kt===Ht?0:kt.centerX-Ht.centerX}):y.sort(function(kt,Ht){return kt===null||Ht===null||kt===Ht?0:kt.centerY-Ht.centerY}),x=a.Zf;var at=E=ot=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,ot=tt.focus,rt=E.x+ot.x;var ut=E.y+ot.y;E=tt.charge*a.electricalFieldX(rt,ut),at=tt.charge*a.electricalFieldY(rt,ut),E+=tt.mass*a.gravitationalFieldX(rt,ut),at+=tt.mass*a.gravitationalFieldY(rt,ut),tt.forceX+=E,tt.forceY+=at;for(var ft=z+1;ft<y.length;ft++){var mt=y[ft];if(mt!==tt){E=mt.bounds,ot=mt.focus,at=E.x+ot.x;var yt=E.y+ot.y;if(rt-at>x||at-rt>x){if(b)break}else if(ut-yt>x||yt-ut>x){if(!b)break}else{var Ct=zx(tt,mt);1>Ct?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new M0),Ct=E.random(),ot=E.random(),rt>at?(E=Math.abs(mt.bounds.right-tt.bounds.x),E=(1+E)*Ct):rt<at?(E=Math.abs(mt.bounds.x-tt.bounds.right),E=-(1+E)*Ct):(E=Math.max(mt.width,tt.width),E=(1+E)*Ct-E/2),ut>yt?(at=Math.abs(mt.bounds.bottom-tt.bounds.y),at=(1+at)*ot):rt<at?(at=Math.abs(mt.bounds.y-tt.bounds.bottom),at=-(1+at)*ot):(at=Math.max(mt.height,tt.height),at=(1+at)*ot-at/2)):(ot=-(tt.charge*mt.charge)/(Ct*Ct),E=(at-rt)/Ct*ot,at=(yt-ut)/Ct*ot),tt.forceX+=E,tt.forceY+=at,mt.forceX-=E,mt.forceY-=at}}}}for(b=a.network.edges.iterator;b.next();)ot=b.value,x=ot.fromVertex,z=ot.toVertex,tt=x.bounds,rt=x.focus,E=tt.x+rt.x,tt=tt.y+rt.y,ut=z.bounds,ft=z.focus,rt=ut.x+ft.x,ut=ut.y+ft.y,ft=zx(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new M0),ot=ft.random(),ft=ft.random(),E=(E>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))*ft):(ot=ot.stiffness*(ft-ot.length),E=(rt-E)/ft*ot,at=(ut-tt)/ft*ot),x.forceX+=E,x.forceY+=at,z.forceX-=E,z.forceY-=at;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}wa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},wa.prototype.moveFixedVertex=function(){},wa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},wa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=nn,y.toSpot=nn)}},wa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ze.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ze.free(x)}x=Ze.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Ze.free(x)},wa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},wa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},wa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},wa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},wa.prototype.electricalFieldX=function(){return 0},wa.prototype.electricalFieldY=function(){return 0},wa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},wa.prototype.gravitationalFieldX=function(){return 0},wa.prototype.gravitationalFieldY=function(){return 0},wa.prototype.isFixed=function(a){return a.isFixed},Gt.Object.defineProperties(wa.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&oe('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),wa.className="ForceDirectedLayout";function Gx(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}Gx.className="ForceDirectedSubnet";function Af(a){Sr.call(this,a)}Le(Af,Sr),Af.prototype.createVertex=function(){return new Hp(this)},Af.prototype.createEdge=function(){return new Gp(this)},Af.className="ForceDirectedNetwork";function Hp(a){Vs.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}Le(Hp,Vs),Gt.Object.defineProperties(Hp.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),Hp.className="ForceDirectedVertex";function Gp(a){Il.call(this,a),this.j=this.o=NaN}Le(Gp,Il),Gt.Object.defineProperties(Gp.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Gp.className="ForceDirectedEdge";function M0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}M0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},M0.className="RandomNumberGenerator";function nr(a){Br.call(this),this.kc=this.ie=25,this.K=0,this.Dk=A0,this.Zk=N0,this.Qk=T0,this.bj=4,this.rk=B0,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new Rt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Le(nr,Br),nr.prototype.cloneProtected=function(a){Br.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},nr.prototype.qb=function(a){a.classType===nr?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:oe("Unknown enum value: "+a):Br.prototype.qb.call(this,a)},nr.prototype.createNetwork=function(){return new Ng(this)},nr.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Kp&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Kp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,ot=0,rt=0,at=0;if(E.link!==null){if(ot=E.link,ot===null)continue;var ut=b.node;if(tt=z.node,ut===null||tt===null)continue;var ft=ot.fromNode;rt=ot.toNode;for(var mt=ot.fromPort;mt!==null&&!mt.Ed();)mt=mt.panel;for(ot=ot.toPort;ot!==null&&!ot.Ed();)ot=ot.panel;if(E.rev){at=ft;var yt=mt;ft=rt,mt=ot,rt=at,ot=yt}var Ct=b.focus;at=z.focus;var kt=E.rev?z.bounds:b.bounds;yt=Rt.alloc(),ut!==ft?kt.w()&&ft.isVisible()?ft.actualBounds.w()?(Nd(ft,mt,po,yt),yt.x+=ft.actualBounds.x-kt.x,yt.y+=ft.actualBounds.y-kt.y):(Nd(ft,mt,po,yt),yt.w()||yt.assign(Ct)):yt.assign(Ct):kt.w()?(Nd(ft,mt,po,yt),yt.w()||yt.assign(Ct)):yt.assign(Ct),ft=E.rev?b.bounds:z.bounds,ut=Rt.alloc(),tt!==rt?ft.w()&&rt.isVisible()?rt.actualBounds.w()?(Nd(rt,ot,po,ut),ut.x+=rt.actualBounds.x-ft.x,ut.y+=rt.actualBounds.y-ft.y):(Nd(rt,ot,po,ut),ut.w()||ut.assign(at)):ut.assign(at):ft.w()?(Nd(rt,ot,po,ut),ut.w()||ut.assign(at)):ut.assign(at),this.K===90||this.K===270?(tt=Math.round((yt.x-Ct.x)/this.kc),rt=yt.x,ot=Math.round((ut.x-at.x)/this.kc),at=ut.x):(tt=Math.round((yt.y-Ct.y)/this.kc),rt=yt.y,ot=Math.round((ut.y-at.y)/this.kc),at=ut.y),Rt.free(yt),Rt.free(ut),E.portFromColOffset=tt,E.portFromPos=rt,E.portToColOffset=ot,E.portToPos=at}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(yt=b.layer,ut=z.layer,ft=0,kt=E.link,kt!==null){var Ht=kt.fromPort,Dt=kt.toPort;if(Ht!==null&&Dt!==null){var Xt=kt.fromNode;if(mt=kt.toNode,Xt!==null&&mt!==null){var $t=k0(this,!0),ie=k0(this,!1),fe=this.setsPortSpots?$t:kt.computeSpot(!0,Ht);Ct=this.setsPortSpots?ie:kt.computeSpot(!1,Dt);var Ae=kt.isOrthogonal;fe.$c()&&fe.Hf(ie)&&Ct.$c()&&Ct.Hf($t)?ft=0:($t=kt.getLinkPoint(Xt,Ht,fe,!0,Ae,mt,Dt,Rt.alloc()),ie=kt.getLinkDirection(Xt,Ht,$t,fe,!0,Ae,mt,Dt),Rt.free($t),fe.ys()||ie!==Jx(this,E,!0)?this.setsPortSpots&&Xt!==null&&Xt.ports.count===1&&E.rev&&(ft+=1):ft+=1,fe=kt.getLinkPoint(mt,Dt,Ct,!1,Ae,Xt,Ht,Rt.alloc()),kt=kt.getLinkDirection(mt,Dt,fe,Ct,!1,Ae,Xt,Ht),Rt.free(fe),Ct.ys()||kt!==Jx(this,E,!1)?this.setsPortSpots&&mt!==null&&mt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(mt=ft,ft=mt===1||mt===3,(mt=mt===2||mt===3)&&(Ct=a.createVertex(),Ct.node=null,Ct.Dj=1,Ct.layer=yt,Ct.near=b,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=rt,b.portToPos=0,b=Ct),kt=1,ft&&kt--,yt-ut>kt&&0<yt){for(E.valid=!1,Ct=a.createVertex(),Ct.node=null,Ct.Dj=2,Ct.layer=yt-1,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=mt?0:tt,b.portToColOffset=0,b.portFromPos=mt?0:rt,b.portToPos=0,b=Ct,yt--;yt-ut>kt&&0<yt;)Ct=a.createVertex(),Ct.node=null,Ct.Dj=3,Ct.layer=yt-1,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Ct,yt--;b=a.Zj(Ct,z,E.link),b.valid=!ft,ft&&(Ct.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=ot,b.portFromPos=0,b.portToPos=at}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=cc(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),fc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},nr.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}nr.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},nr.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function fl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function fu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function Wx(a,y,x){var E=cc(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var ot=0,rt=E[tt],at=rt.near;if(at!==null&&at.layer===rt.layer)if(rt=at.index,rt>tt)for(var ut=tt+1;ut<rt;ut++){var ft=E[ut];ft.near===at&&ft.Dj===at.Dj||ot++}else for(ut=tt-1;ut>rt;ut--)ft=E[ut],ft.near===at&&ft.Dj===at.Dj||ot++;var mt;if(0<=x)for(rt=E[tt].sourceEdgesArrayAccess,at=0;at<rt.length;at++){var yt=rt[at];if(yt.valid&&yt.fromVertex.layer!==y)for(ft=yt.fromVertex.index,ut=yt.portToPos,yt=yt.portFromPos,mt=at+1;mt<rt.length;mt++){var Ct=rt[mt];if(Ct.valid&&Ct.fromVertex.layer!==y){var kt=Ct.fromVertex.index,Ht=Ct.portToPos;Ct=Ct.portFromPos,ut<Ht&&(ft>kt||ft===kt&&yt>Ct)&&ot++,Ht<ut&&(kt>ft||kt===ft&&Ct>yt)&&ot++}}}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,at=0;at<rt.length;at++)if(yt=rt[at],yt.valid&&yt.toVertex.layer!==y)for(ft=yt.toVertex.index,ut=yt.portToPos,yt=yt.portFromPos,mt=at+1;mt<rt.length;mt++)Ct=rt[mt],Ct.valid&&Ct.toVertex.layer!==y&&(kt=Ct.toVertex.index,Ht=Ct.portToPos,Ct=Ct.portFromPos,yt<Ct&&(ft>kt||ft===kt&&ut>Ht)&&ot++,Ct<yt&&(kt>ft||kt===ft&&Ht>ut)&&ot++)}for(z[tt*b+tt]=ot,rt=tt+1;rt<b;rt++){var Dt=0,Xt=0;if(0<=x){ot=E[tt].sourceEdgesArrayAccess;var $t=E[rt].sourceEdgesArrayAccess;for(at=0;at<ot.length;at++)if(yt=ot[at],yt.valid&&yt.fromVertex.layer!==y)for(ft=yt.fromVertex.index,yt=yt.portFromPos,mt=0;mt<$t.length;mt++)Ct=$t[mt],Ct.valid&&Ct.fromVertex.layer!==y&&(kt=Ct.fromVertex.index,Ct=Ct.portFromPos,(ft<kt||ft===kt&&yt<Ct)&&Xt++,(kt<ft||kt===ft&&Ct<yt)&&Dt++)}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,$t=E[rt].destinationEdgesArrayAccess,at=0;at<ot.length;at++)if(yt=ot[at],yt.valid&&yt.toVertex.layer!==y)for(ft=yt.toVertex.index,ut=yt.portToPos,mt=0;mt<$t.length;mt++)Ct=$t[mt],Ct.valid&&Ct.toVertex.layer!==y&&(kt=Ct.toVertex.index,Ht=Ct.portToPos,(ft<kt||ft===kt&&ut<Ht)&&Xt++,(kt<ft||kt===ft&&Ht<ut)&&Dt++)}z[tt*b+rt]=Dt,z[rt*b+tt]=Xt}}return fc(a,y,E),z}nr.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=Wx(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function E0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=cc(E,b),tt=E.tc[b],ot=0,rt=0;rt<tt;rt++){var at=z[rt].destinationEdgesArrayAccess;if(at!==null)for(var ut=0;ut<at.length;ut++){var ft=at[ut];if(ft.valid&&ft.toVertex.layer!==b){var mt=ft.fromVertex.column+ft.portFromColOffset,yt=ft.toVertex.column+ft.portToColOffset;ot+=(Math.abs(mt-yt)+1)*gy(ft)}}}fc(E,b,z),y+=ot}return y}nr.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function py(a,y,x){for(var E=cc(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var ot=E[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var at=null;0<=x&&(at=ot.destinationEdgesArrayAccess);var ut=0,ft=0,mt=ot.near;if(mt!==null&&mt.layer===ot.layer&&(ut+=mt.column-1,ft++),rt!==null)for(mt=0;mt<rt.length;mt++){ot=rt[mt];var yt=ot.fromVertex;ot.valid&&!ot.rev&&yt.layer!==y&&(ut+=yt.column,ft++)}if(at!==null)for(rt=0;rt<at.length;rt++)ot=at[rt],mt=ot.toVertex,ot.valid&&!ot.rev&&mt.layer!==y&&(ut+=mt.column,ft++);z[tt]=ft===0?-1:ut/ft}return fc(a,y,E),z}function Kx(a,y,x){for(var E=cc(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var ot=E[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var at=null;0<=x&&(at=ot.destinationEdgesArrayAccess);var ut=0,ft=[],mt=ot.near;if(mt!==null&&mt.layer===ot.layer&&(ft[ut]=mt.column-1,ut++),ot=void 0,rt!==null)for(mt=0;mt<rt.length;mt++){ot=rt[mt];var yt=ot.fromVertex;ot.valid&&!ot.rev&&yt.layer!==y&&(ft[ut]=yt.column+ot.portFromColOffset,ut++)}if(at!==null)for(rt=0;rt<at.length;rt++)ot=at[rt],mt=ot.toVertex,ot.valid&&!ot.rev&&mt.layer!==y&&(ft[ut]=mt.column+ot.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(Ct,kt){return Ct-kt}),at=ut>>1,z[tt]=ut&1?ft[at]:ft[at-1]+ft[at]>>1)}return fc(a,y,E),z}function Wp(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)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&&Wp(a,rt,x,E,b,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&&Wp(a,rt,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)my(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}nr.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,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;z1(a)!==null;){for(b=Zx(a);b!==null;)E[x]=b,x--,b.valid=!1,b=Zx(a);for(b=Ux(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Ux(a);b=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++;(b===null||z<rt-at)&&(b=ot,z=rt-at)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case A0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&vy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Kp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function z1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function Zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function Ux(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function vy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,vy(a,b))}y.finish=a.Kn,a.Kn++}nr.prototype.assignLayers=function(){switch(this.Zk){case xy:Vx(this);break;case wy:for(var a,y=this.network.vertexes.iterator;y.next();)a=Xx(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case N0:for(Vx(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Qx(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function Vx(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Yx(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Yx(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,Yx(a,z)+b)}y.layer=x}else x=y.layer;return x}function Xx(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,Xx(a,z)+b)}y.layer=x}else x=y.layer;return x}function Qx(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Qx(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],ot=tt.fromVertex,rt=tt.toVertex;tt=a.linkMinLength(tt),ot.layer-rt.layer>tt&&Wp(a,ot,0,-1,!0,!1)}for(Wp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,ot=0,rt=null,tt=a.network.vertexes.iterator;tt.next();){var at=tt.value;if(at.component===1){var ut=0,ft=!1,mt=at.sourceEdgesArrayAccess;b=mt.length;for(var yt=0;yt<b;yt++){var Ct=mt[yt],kt=Ct.fromVertex;ut+=1,kt.component!==1&&(z+=1,kt=kt.layer-at.layer,Ct=a.linkMinLength(Ct),E=Math.min(E,kt-Ct))}for(mt=at.destinationEdgesArrayAccess,b=mt.length,yt=0;yt<b;yt++)Ct=mt[yt].toVertex,--ut,Ct.component!==1?--z:ft=!0;(rt===null||ut<ot)&&!ft&&(rt=at,ot=ut)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else rt.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Wp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,ot=null,rt=a.network.vertexes.iterator;rt.next();)if(tt=rt.value,tt.component===1){for(at=0,ut=!1,mt=tt.sourceEdgesArrayAccess,ft=mt.length,yt=0;yt<ft;yt++)Ct=mt[yt].fromVertex,at+=1,Ct.component!==1?E+=1:ut=!0;for(mt=tt.destinationEdgesArrayAccess,ft=mt.length,yt=0;yt<ft;yt++)Ct=mt[yt],kt=Ct.toVertex,--at,kt.component!==1&&(--E,kt=tt.layer-kt.layer,Ct=a.linkMinLength(Ct),b=Math.min(b,kt-Ct));(ot===null||at>z)&&!ut&&(ot=tt,z=at)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else ot.component=0}}}function Jx(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}nr.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case T0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&_x(this,x);break;case Py:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qx(this,x)}};function _x(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&_x(a,E))}function qx(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&qx(a,E))}nr.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=fl(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)L0(this,E,1),Lu(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=fl(this)),E=this.Ia;0<=E;E--)L0(this,E,-1),Lu(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=fl(this))}for(fu(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)L0(this,E,0),Lu(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=fl(this)),E=this.Ia;0<=E;E--)L0(this,E,0),Lu(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=fl(this))}fu(this,y);var z,tt,ot;switch(this.rk){case My:break;case Ey:for(ot=a+1;(E=this.countCrossings())<ot;)for(ot=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Lu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Lu(this,E,1)||z;for(b=this.countCrossings(),b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Lu(this,E,1)||z;for(b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Lu(this,E,-1)||z;for(b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Lu(this,E,0)||z;for(b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Lu(this,E,0)||z;b>=a?fu(this,y):(a=b,y=fl(this))}break;default:case B0:for(x=this.Ia,tt=0,ot=a+1;(E=this.countCrossings())<ot;){for(ot=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Lu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Lu(this,E,1)||z;for(b=this.countCrossings(),b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Lu(this,E,1)||z;for(b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Lu(this,E,-1)||z;for(b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Lu(this,E,0)||z;for(b>=a?fu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Lu(this,E,0)||z;b>=a?fu(this,y):(a=b,y=fl(this))}}fu(this,y)};function L0(a,y,x){var E=cc(a,y),b=a.tc[y],z=Kx(a,y,x),tt=py(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var ot=!0,rt;ot;)for(ot=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(ot=!0,rt=z[x],z[x]=z[x+1],z[x+1]=rt,rt=tt[x],tt[x]=tt[x+1],tt[x+1]=rt,rt=E[x],E[x]=E[x+1],E[x+1]=rt);for(x=z=0;x<b;x++)rt=E[x],rt.index=x,z+=a.nodeMinColumnSpace(rt,!0),rt.column=z,z+=1,z+=a.nodeMinColumnSpace(rt,!1);fc(a,y,E)}function Lu(a,y,x){var E=cc(a,y),b=a.tc[y];x=Wx(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var ot=[];for(z=0;z<b;z++)ot[z]=-1;for(var rt=!1,at=!0;at;)for(at=!1,z=0;z<b-1;z++){var ut=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],mt=0,yt=0,Ct=E[z].column,kt=E[z+1].column,Ht=a.nodeMinColumnSpace(E[z],!0),Dt=a.nodeMinColumnSpace(E[z],!1),Xt=a.nodeMinColumnSpace(E[z+1],!0),$t=a.nodeMinColumnSpace(E[z+1],!1);Ht=Ct-Ht+Xt,Dt=kt-Dt+$t;var ie=E[z].sourceEdges.iterator;for(ie.reset();ie.next();)if(Xt=ie.value,$t=Xt.fromVertex,Xt.valid&&$t.layer===y){for(Xt=0;E[Xt]!==$t;)Xt++;Xt<z&&(mt+=2*(z-Xt),yt+=2*(z+1-Xt)),Xt===z+1&&(mt+=1),Xt>z+1&&(mt+=4*(Xt-z),yt+=4*(Xt-(z+1)))}for(ie=E[z].destinationEdges.iterator,ie.reset();ie.next();)if(Xt=ie.value,$t=Xt.toVertex,Xt.valid&&$t.layer===y){for(Xt=0;E[Xt]!==$t;)Xt++;Xt===z+1&&(yt+=1)}for(ie=E[z+1].sourceEdges.iterator,ie.reset();ie.next();)if(Xt=ie.value,$t=Xt.fromVertex,Xt.valid&&$t.layer===y){for(Xt=0;E[Xt]!==$t;)Xt++;Xt<z&&(mt+=2*(z+1-Xt),yt+=2*(z-Xt)),Xt===z&&(yt+=1),Xt>z+1&&(mt+=4*(Xt-(z+1)),yt+=4*(Xt-z))}for(ie=E[z+1].destinationEdges.iterator,ie.reset();ie.next();)if(Xt=ie.value,$t=Xt.toVertex,Xt.valid&&$t.layer===y){for(Xt=0;E[Xt]!==$t;)Xt++;Xt===z&&(mt+=1)}Xt=$t=0,ie=tt[E[z].index];var fe=ot[E[z].index],Ae=tt[E[z+1].index],Bn=ot[E[z+1].index];ie!==-1&&($t+=Math.abs(ie-Ct),Xt+=Math.abs(ie-Dt)),fe!==-1&&($t+=Math.abs(fe-Ct),Xt+=Math.abs(fe-Dt)),Ae!==-1&&($t+=Math.abs(Ae-kt),Xt+=Math.abs(Ae-Ht)),Bn!==-1&&($t+=Math.abs(Bn-kt),Xt+=Math.abs(Bn-Ht)),(yt<mt-.5||yt===mt&&ft<ut-.5||yt===mt&&ft===ut&&Xt<$t-.5)&&(at=rt=!0,E[z].column=Dt,E[z+1].column=Ht,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return fc(a,y,E),rt}nr.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Y1)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Ag(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ag(this,y,-1)||x;x=Ag(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&&($x(this,-1),$x(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ag(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ag(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ag(this,y,0)||x}}else K1(this)};function Ag(a,y,x){for(var E=!1;H1(a,y,x);)E=!0;return E}function H1(a,y,x){var E,b=cc(a,y),z=a.tc[y],tt=py(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var ot=py(a,y,1);if(0>x)for(E=0;E<z;E++)ot[E]=-1;for(var rt=!1,at=!0;at;)for(at=!1,E=0;E<z;E++){var ut=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),mt=a.nodeMinColumnSpace(b[E],!1),yt=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?yt=ut-1:yt=ut,ft=E+1>=z||b[E+1].column-ut-1>mt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Ct=mt=0,kt=0;if(0>=x)for(var Ht=b[E].sourceEdges.iterator;Ht.next();){var Dt=Ht.value,Xt=Dt.fromVertex;if(Dt.valid&&Xt.layer!==y){var $t=gy(Dt),ie=Dt.portFromColOffset;Dt=Dt.portToColOffset,Xt=Xt.column,mt+=(Math.abs(ut+Dt-(Xt+ie))+1)*$t,Ct+=(Math.abs(yt+Dt-(Xt+ie))+1)*$t,kt+=(Math.abs(ft+Dt-(Xt+ie))+1)*$t}}if(0<=x)for(Ht=b[E].destinationEdges.iterator;Ht.next();)Dt=Ht.value,Xt=Dt.toVertex,Dt.valid&&Xt.layer!==y&&($t=gy(Dt),ie=Dt.portFromColOffset,Dt=Dt.portToColOffset,Xt=Xt.column,mt+=(Math.abs(ut+ie-(Xt+Dt))+1)*$t,Ct+=(Math.abs(yt+ie-(Xt+Dt))+1)*$t,kt+=(Math.abs(ft+ie-(Xt+Dt))+1)*$t);Dt=ie=$t=0,Ht=tt[b[E].index],Xt=ot[b[E].index],Ht!==-1&&($t+=Math.abs(Ht-ut),ie+=Math.abs(Ht-yt),Dt+=Math.abs(Ht-ft)),Xt!==-1&&($t+=Math.abs(Xt-ut),ie+=Math.abs(Xt-yt),Dt+=Math.abs(Xt-ft)),Ct<mt||Ct===mt&&ie<$t?(at=rt=!0,b[E].column=yt):(kt<mt||kt===mt&&Dt<$t)&&(at=rt=!0,b[E].column=ft)}return fc(a,y,b),a.normalize(),rt}function yy(a,y,x){var E=cc(a,y),b=a.tc[y],z=Kx(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var ot=E[x].column,rt=a.nodeMinColumnSpace(E[x],!0),at=a.nodeMinColumnSpace(E[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=ot;else if(x===0){var ft=E[x+1].column;ft-ot===at+a.nodeMinColumnSpace(E[x+1],!0)?ut=ot-1:ut=ot}else x===b-1?(ft=E[x-1].column,ut=ot-ft===rt+a.nodeMinColumnSpace(E[x-1],!1)?ot+1:ot):(ft=E[x-1].column,rt=ft+a.nodeMinColumnSpace(E[x-1],!1)+rt+1,ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,ut=(rt+at)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,ut=Math.min(tt[x],at)):x===b-1?(ft=E[x-1].column,rt=ft+a.nodeMinColumnSpace(E[x-1],!1)+rt+1,ut=Math.max(tt[x],rt)):(ft=E[x-1].column,rt=ft+a.nodeMinColumnSpace(E[x-1],!1)+rt+1,ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,rt<tt[x]&&tt[x]<at?ut=tt[x]:rt>=tt[x]?ut=rt:at<=tt[x]&&(ut=at));ut!==ot&&(z=!0,E[x].column=ut)}fc(a,y,E),a.normalize()}function G1(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function W1(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var ot=E.column-a.nodeMinColumnSpace(E,!0),rt=E.column+a.nodeMinColumnSpace(E,!1);ot<=y&&rt>=y&&(b[E.layer]=!0),ot<=x&&rt>=x&&(z[E.layer]=!0)}for(ot=!0,x=!1,E=0;E<=a.Ia;E++)ot=ot&&!(b[E]&&z[E]);if(ot)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function $x(a,y){for(var x=0;x<=a.Ra;x++)for(;G1(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;W1(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=fl(a),z=E0(a);for(E=z+1;z<E;){E=z,t1(a,x,1);var tt=E0(a);tt>z?fu(a,b):tt<z&&(z=tt,b=fl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=fl(a),z=E0(a),E=z+1;z<E;)E=z,t1(a,x,-1),tt=E0(a),tt>z?fu(a,b):tt<z&&(z=tt,b=fl(a));a.normalize()}function t1(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(my(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,ot=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),rt=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));ot<=rt;ot++)b[tt*(a.Ra+1)+ot]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(rt=tt[tt.length-1],tt.pop(),b[rt])for(b[rt]=!1,z=0;z<a.le;z++)y[rt*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function K1(a){for(var y=Hn(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new sn,Z1(y,x);var z=null,tt=null,ot=null,rt=null,at=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,mt=(a.ve&8)!==0;for(at&&(a.verticalAlignment(y,x,!0),z=b0(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),ot=b0(a,y,!1,!1)),E=ir(y),b=E.next();!b.done;b=E.next())b.value.reverse();mt&&(a.verticalAlignment(y,x,!1),rt=b0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=b0(a,y,!0,!0)),_n(y),a.u(z,tt,ot,rt),a.network.vertexes.each(function(yt){var Ct=Hn();at&&Ct.push(z.get(yt)),ut&&Ct.push(tt.get(yt)),ft&&Ct.push(ot.get(yt)),mt&&Ct.push(rt.get(yt)),Ct.sort(function(Ht,Dt){return Ht-Dt});var kt=Ct.length;kt=(Ct[Math.floor((kt-1)/2)]+Ct[Math.ceil((kt-1)/2)])/2,_n(Ct),yt.zc=kt})}function Z1(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],ot=a[E+1],rt=0;z<ot.length;rt++){var at=ot[rt];t:{if(at.node===null){var ut=Ly(at);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(rt===ot.length-1||ft){for(ut=tt.length-1,ft&&(ut=Ly(at)[0].index);z<=rt;){if(at=ot[z],!at.bo){ft=[];for(var mt=ir(at.sourceEdgesArrayAccess),yt=mt.next();!yt.done;yt=mt.next())yt=yt.value,yt.valid&&ft.push(yt);at.bo=ft}for(at=ir(at.bo),ft=at.next();!ft.done;ft=at.next())ft=ft.value,mt=ft.fromVertex.index,(mt<b||mt>ut)&&y.add(ft);z++}b=ut}}}nr.prototype.verticalAlignment=function(a,y,x){U1(a),a=ir(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=ir(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Ly(z):X1(z),ot=tt.length;if(0<ot){tt.sort(function(ft,mt){return ft.vi-mt.vi});var rt=(ot-1)/2;for(ot=Math.floor(rt),rt=Math.ceil(rt);ot<=rt;ot++)if(z.align===z){var at=tt[ot],ut=void 0;ut=x?F0(at,z):F0(z,at),!y.contains(ut)&&b<at.vi&&(at.align=z,z.root=at.root,z.align=at.root,b=at.vi)}}}}};function U1(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function b0(a,y,x,E){for(var b=a.K===90||a.K===270,z=ir(y),tt=z.next();!tt.done;tt=z.next()){var ot=ir(tt.value);for(tt=ot.next();!tt.done;tt=ot.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=ir(y),ot=z.next();!ot.done;ot=z.next()){ot=ir(ot.value);for(var rt=ot.next();!rt.done;rt=ot.next())if(rt=rt.value,rt.root===rt){for(var at=0,ut=rt;ut.align!==rt;){var ft=ut.align,mt=tt?ut.width:ut.height,yt=tt?ft.width:ft.height;if(x){var Ct=F0(ut,ft),kt=Ct.portFromPos,Ht=Ct.portToPos;Ct.link!==null&&(ut.node&&ut.node!==Ct.link.fromNode&&(kt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Ct.link.toNode&&(Ht=tt?ft.focusX:ft.focusY))}else Ct=F0(ft,ut),kt=Ct.portToPos,Ht=Ct.portFromPos,Ct.link!==null&&(ut.node&&ut.node!==Ct.link.toNode&&(kt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Ct.link.fromNode&&(Ht=tt?ft.focusX:ft.focusY));mt=E?ut.qg+(mt-kt)-(yt-Ht):ut.qg+kt-Ht,ft.qg=mt,at=Math.min(at,mt),ut=ut.align}ut=rt;do ut.qg=ut.qg-at,ut=ut.align;while(ut!==rt)}}for(x=ir(y),tt=x.next();!tt.done;tt=x.next())for(z=ir(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&e1(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,ot=0;do{for(z=y[tt][ot];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(ot=n1(z,y),ot.sd.shift=Math.min(ot.sd.shift,z.sd.shift+z.zc+z.qg-(ot.zc+ot.qg+(b?ot.width:ot.height)+a.columnSpacing)));ot=z.vi+1}while(tt<y.length&&ot<y[tt].length&&z.sd===y[tt][ot].sd)}for(a=new Xn,y=ir(y),tt=y.next();!tt.done;tt=y.next())for(x=ir(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function e1(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=n1(E,x),z=b.root;e1(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function n1(a,y){var x=a.Tz;return a=a.vi,1>a&&oe("Could not determine previous vertex in layer"),y[x][a-1]}nr.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Hn(),b=Hn(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var ot=V1(this,y[tt],E,b,tt);ot<z&&(x=tt,z=ot)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(rt){return function(at){at.value+=rt.delta}}(z)));_n(E),_n(b)};function V1(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(ot){var rt=ot.key;ot=ot.value,rt=a.K===90||a.K===270?rt.width:rt.height,ot<z&&(z=ot),ot+rt>tt&&(tt=ot+rt)}),x[b]=z,E[b]=tt,tt-z}nr.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=k0(this,!0),y=k0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function k0(a,y){return a.K===270?y?ao:Lr:a.K===90?y?Lr:ao:a.K===180?y?dr:wr:y?wr:dr}nr.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,ot=-1/0;a.next();){var rt=a.value,at=rt.layer,ut=rt.column|0;E?(tt=y.x+this.kc*ut,at=this.Kd[at]):(tt=this.Kd[at],at=y.y+this.kc*ut),rt.centerX=tt,rt.centerY=at,x&&isFinite(rt.zc)&&(E?rt.node?rt.x=y.x+rt.zc:rt.centerX=y.x+rt.zc:rt.node?rt.y=y.y+rt.zc:rt.centerY=y.y+rt.zc),z=Math.min(rt.x,z),b=Math.min(rt.y,b),E?(tt=z,ot=Math.max(ot,rt.bounds.right)):(tt=b,ot=Math.max(ot,rt.bounds.bottom))}for(this.xw=ot-tt,z=y.x-z,y=y.y-b,this.Rf=new Rt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},nr.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new Ze(0,0,x,Math.abs(this.Ta[0]))):y.push(new Ze(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Ze(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Ze(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Ze(0,0,Math.abs(this.Ta[0]),x)):y.push(new Ze(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Ze(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Ze(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},nr.prototype.commitLayers=function(){},nr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,ot=E.toPort;if(b!==null){var rt=b.findVisibleNode();rt!==null&&rt!==b&&(b=rt,tt=rt.port)}z!==null&&(rt=z.findVisibleNode(),rt!==null&&rt!==z&&(z=rt,ot=rt.port));var at=y.computeSpot(!0,tt);rt=y.computeSpot(!1,ot);var ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===_l&&y.pointsCount===4&&(ut.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,at,!0,!1,z,ot),ot=y.getLinkPoint(z,ot,rt,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),ot.w()||ot.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ot.x)/3,(2*x.y+ot.y)/3),y.yf((x.x+2*ot.x)/3,(x.y+2*ot.y)/3),y.yf(ot.x,ot.y)):(x=E=!1,tt!==null&&at===Vr&&(E=!0),ot!==null&&rt===Vr&&(x=!0),(E||x)&&(rt=null,E&&(rt=y.getLinkPointFromPoint(b,tt,tt.ga(po),y.i(3),!0),rt.w()||rt.set(b.actualBounds.center),y.L(0,rt.x,rt.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,ot,ot.ga(po),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),rt&&(z=y.i(2),y.L(1,(2*rt.x+z.x)/3,(2*rt.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ut.layer===ft.layer)y.zf();else{var mt=!1,yt=!1,Ct=this.ie,kt=y.firstPickIndex+1;if(y.isOrthogonal){yt=!0;var Ht=y.pointsCount;4<Ht&&y.points.removeRange(2,Ht-3)}else if(y.curve===_l)mt=!0,Ht=y.pointsCount,4<Ht&&y.points.removeRange(2,Ht-3),Ht===4&&(kt=2);else{Ht=y.pointsCount;var Dt=at===Vr,Xt=rt===Vr;2<Ht&&Dt&&Xt?y.points.removeRange(1,Ht-2):3<Ht&&Dt&&!Xt?y.points.removeRange(1,Ht-3):3<Ht&&!Dt&&Xt?y.points.removeRange(2,Ht-2):4<Ht&&!Dt&&!Xt&&y.points.removeRange(2,Ht-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var $t=Ht=null;for(Dt=ft.sourceEdges.iterator;Dt.next()&&(Xt=Dt.value,Xt.link!==x.link||(Ht=Xt.fromVertex,$t=Xt.toVertex,Ht.node!==null)););if(Ht===null)break;if(Ht!==ut){Dt=y.i(kt-1).x,Xt=y.i(kt-1).y;var ie=Ht.centerX,fe=Ht.centerY;if(yt)this.K===180||this.K===0?kt===y.firstPickIndex+1?(y.m(kt++,Dt,Xt),y.m(kt++,Dt,fe)):($t!==null?$t.centerY:Xt)!==fe&&($t=this.Ta[Ht.layer-1]+this.Rf.x,y.m(kt++,$t,Xt),y.m(kt++,$t,fe)):kt===y.firstPickIndex+1?(y.m(kt++,Dt,Xt),y.m(kt++,ie,Xt)):($t!==null?$t.centerX:Dt)!==ie&&($t=this.Ta[Ht.layer-1]+this.Rf.y,y.m(kt++,Dt,$t),y.m(kt++,ie,$t));else if(kt===y.firstPickIndex+1){$t=Math.max(10,this.he[ft.layer]);var Ae=Math.max(10,this.Ld[ft.layer]);if(mt)this.K===180?ie<=ft.bounds.x?(ft=ft.bounds.x,y.m(kt++,ft-$t,fe),y.m(kt++,ft,fe),y.m(kt++,ft+Ae,fe)):(y.m(kt++,ie-$t,fe),y.m(kt++,ie,fe),y.m(kt++,ie+Ae,fe)):this.K===90?fe>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(kt++,ie,ft+Ae),y.m(kt++,ie,ft),y.m(kt++,ie,ft-$t)):(y.m(kt++,ie,fe+Ae),y.m(kt++,ie,fe),y.m(kt++,ie,fe-$t)):this.K===270?fe<=ft.bounds.y?(ft=ft.bounds.y,y.m(kt++,ie,ft-$t),y.m(kt++,ie,ft),y.m(kt++,ie,ft+Ae)):(y.m(kt++,ie,fe-$t),y.m(kt++,ie,fe),y.m(kt++,ie,fe+Ae)):this.K===0&&(ie>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(kt++,ft+Ae,fe),y.m(kt++,ft,fe),y.m(kt++,ft-$t,fe)):(y.m(kt++,ie+Ae,fe),y.m(kt++,ie,fe),y.m(kt++,ie-$t,fe)));else{y.m(kt++,Dt,Xt);var Bn=0;this.K===180||this.K===0?((this.K===180?ie>=ft.bounds.right:ie<=ft.bounds.x)&&(Bn=(this.K===0?-$t:Ae)/2),y.m(kt++,Dt+Bn,fe)):((this.K===270?fe>=ft.bounds.bottom:fe<=ft.bounds.y)&&(Bn=(this.K===90?-$t:Ae)/2),y.m(kt++,ie,Xt+Bn)),y.m(kt++,ie,fe)}}else $t=Math.max(10,this.he[Ht.layer]),Ae=Math.max(10,this.Ld[Ht.layer]),mt?this.K===180?(y.m(kt++,ie-$t-Ct,fe),y.m(kt++,Math.min(ie-$t+Ct/2,ie),fe),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,Math.max(ie+Ae-Ct/2,ie),fe),y.m(kt++,ie+Ae+Ct,fe)):this.K===90?(y.m(kt++,ie,fe+Ae+Ct),y.m(kt++,ie,Math.max(fe+Ae-Ct/2,fe)),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,ie,Math.min(fe-$t+Ct/2,fe)),y.m(kt++,ie,fe-$t-Ct)):this.K===270?(y.m(kt++,ie,fe-$t-Ct),y.m(kt++,ie,Math.min(fe-$t+Ct/2,fe)),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,ie,Math.max(fe+Ae-Ct/2,fe)),y.m(kt++,ie,fe+Ae+Ct)):(y.m(kt++,ie+Ae+Ct,fe),y.m(kt++,Math.max(ie+Ae-Ct/2,ie),fe),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,Math.min(ie-$t+Ct/2,ie),fe),y.m(kt++,ie-$t-Ct,fe)):y.m(kt++,ie,fe)}ft=Ht}(ot===null||at!==Vr||yt)&&(Dt=y.i(kt-1).x,Xt=y.i(kt-1).y,ie=y.i(kt).x,fe=y.i(kt).y,yt?(Ct=this.Ld[ut.layer],this.K===180||this.K===0?(yt=Xt,yt>=ut.bounds.y&&yt<=ut.bounds.bottom&&(this.K===180?ie>=ut.bounds.x:ie<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Ct:Ct),yt<ut.bounds.y+ut.bounds.height/2?yt=ut.bounds.y-this.kc/2:yt=ut.bounds.bottom+this.kc/2,y.m(kt++,ft,Xt),y.m(kt++,ft,yt)),y.m(kt++,ie,yt)):(yt=Dt,yt>=ut.bounds.x&&yt<=ut.bounds.right&&(this.K===270?fe>=ut.bounds.y:fe<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Ct:Ct),yt<ut.bounds.x+ut.bounds.width/2?yt=ut.bounds.x-this.kc/2:yt=ut.bounds.right+this.kc/2,y.m(kt++,Dt,ft),y.m(kt++,yt,ft)),y.m(kt++,yt,fe)),y.m(kt++,ie,fe)):mt?($t=Math.max(10,this.he[ut.layer]),Ae=Math.max(10,this.Ld[ut.layer]),this.K===180&&ie>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(kt-2,ft,Xt),y.L(kt-1,ft+Ae,Xt)):this.K===90&&fe<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(kt-2,Dt,ft),y.L(kt-1,Dt,ft-$t)):this.K===270&&fe>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(kt-2,Dt,ft),y.L(kt-1,Dt,ft+Ae)):this.K===0&&ie<=ut.bounds.right&&(ft=ut.bounds.x,y.L(kt-2,ft,Xt),y.L(kt-1,ft-$t,Xt))):($t=Math.max(10,this.he[ut.layer]),Ae=Math.max(10,this.Ld[ut.layer]),yt=0,this.K===180||this.K===0?((this.K===180?ie<=ut.bounds.x:ie>=ut.bounds.right)&&(yt=(this.K===0?Ae:-$t)/2),y.m(kt++,ie+yt,Xt)):((this.K===270?fe<=ut.bounds.y:fe>=ut.bounds.bottom)&&(yt=(this.K===90?Ae:-$t)/2),y.m(kt++,Dt,fe+yt)),y.m(kt++,ie,fe)))}else{for(;ut!==null&&ut!==ft;){for($t=Ht=null,ut=ut.destinationEdges.iterator;ut.next()&&(Dt=ut.value,Dt.link!==x.link||(Ht=Dt.toVertex,$t=Dt.fromVertex,$t.node!==null&&($t=null),Ht.node!==null)););if(Ht===null)break;Ht!==ft&&(Dt=y.i(kt-1).x,Xt=y.i(kt-1).y,ie=Ht.centerX,fe=Ht.centerY,yt?this.K===180||this.K===0?($t!==null?$t.centerY:Xt)!==fe&&($t=this.Ta[Ht.layer]+this.Rf.x,kt===y.firstPickIndex+1&&($t=this.K===0?Math.max($t,Dt):Math.min($t,Dt)),y.m(kt++,$t,Xt),y.m(kt++,$t,fe)):($t!==null?$t.centerX:Dt)!==ie&&($t=this.Ta[Ht.layer]+this.Rf.y,kt===y.firstPickIndex+1&&($t=this.K===90?Math.max($t,Xt):Math.min($t,Xt)),y.m(kt++,Dt,$t),y.m(kt++,ie,$t)):($t=Math.max(10,this.he[Ht.layer]),Ae=Math.max(10,this.Ld[Ht.layer]),mt?this.K===180?(y.m(kt++,ie+Ae+Ct,fe),y.m(kt++,Math.max(ie+Ae-Ct/2,ie),fe),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,Math.min(ie-$t+Ct/2,ie),fe),y.m(kt++,ie-$t-Ct,fe)):this.K===90?(y.m(kt++,ie,fe-$t-Ct),y.m(kt++,ie,Math.min(fe-$t+Ct/2,fe)),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,ie,Math.max(fe+Ae-Ct/2,fe)),y.m(kt++,ie,fe+Ae+Ct)):this.K===270?(y.m(kt++,ie,fe+Ae+Ct),y.m(kt++,ie,Math.max(fe+Ae-Ct/2,fe)),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,ie,Math.min(fe-$t+Ct/2,fe)),y.m(kt++,ie,fe-$t-Ct)):(y.m(kt++,ie-$t-Ct,fe),y.m(kt++,Math.min(ie-$t+Ct/2,ie),fe),y.m(kt++,ie,fe),y.m(kt++,ie,fe),y.m(kt++,Math.max(ie+Ae-Ct/2,ie),fe),y.m(kt++,ie+Ae+Ct,fe)):this.K===180?(y.m(kt++,ie+Ae,fe),y.m(kt++,ie-$t,fe)):this.K===90?(y.m(kt++,ie,fe-$t),y.m(kt++,ie,fe+Ae)):this.K===270?(y.m(kt++,ie,fe+Ae),y.m(kt++,ie,fe-$t)):(y.m(kt++,ie-$t,fe),y.m(kt++,ie+Ae,fe)))),ut=Ht}yt&&(Dt=y.i(kt-1).x,Xt=y.i(kt-1).y,ie=y.i(kt).x,fe=y.i(kt).y,this.K===180||this.K===0?Xt!==fe&&($t=this.K===0?Math.min(Math.max((ie+Dt)/2,this.Ta[ft.layer]+this.Rf.x),ie):Math.max(Math.min((ie+Dt)/2,this.Ta[ft.layer]+this.Rf.x),ie),y.m(kt++,$t,Xt),y.m(kt++,$t,fe)):Dt!==ie&&($t=this.K===90?Math.min(Math.max((fe+Xt)/2,this.Ta[ft.layer]+this.Rf.y),fe):Math.max(Math.min((fe+Xt)/2,this.Ta[ft.layer]+this.Rf.y),fe),y.m(kt++,Dt,$t),y.m(kt++,ie,$t)))}E!==null&&mt&&4<=y.pointsCount&&(tt!==null&&(tt=at===Vr?y.getLinkPointFromPoint(b,tt,tt.ga(po),y.i(3),!0):y.i(0),at===Vr&&(at=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+at.x)/2,at.y),y.L(2,E.x,(at.y+E.y)/2)):(y.L(1,at.x,(tt.y+at.y)/2),y.L(2,(at.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),ot!==null&&(b=rt===Vr?y.getLinkPointFromPoint(z,ot,ot.ga(po),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),rt===Vr&&(ot=y.i(y.pointsCount-3),rt=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.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,(b.y+ot.y)/2),y.L(y.pointsCount-3,(ot.x+rt.x)/2,rt.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},nr.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new cn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var ot=new gc;ot.layer=Math.floor(z.y/2);var rt=E.i(0),at=E.i(E.pointsCount-1);if(ot.first=rt.x*rt.x+rt.y,ot.jc=at.x*at.x+at.y,ot.rd=Math.min(z.x,tt.x),ot.Ic=Math.max(z.x,tt.x),ot.index=b,ot.link=E,b+2<E.pointsCount){rt=E.i(b-1),at=E.i(b+2);var ut=0;rt.y<z.y?ut=at.y<z.y?3:z.x<tt.x?2:1:rt.y>z.y&&(ut=at.y>z.y?0:tt.x<z.x?2:1),ot.j=ut}x.push(ot)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,ot=x[z].jc,rt=z;rt<b;rt++)at=x[rt],at.jc!==ot&&(ut++,ot=at.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(ot=x[z].first,rt=z;rt<b;rt++)at=x[rt],at.first!==ot&&(ft++,ot=at.first);for(rt=!0,at=ft,ut<ft?(rt=!1,at=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,ft=z;ft<b;ft++){var mt=x[ft];(rt?mt.first:mt.jc)!==ot&&(ut++,ot=rt?mt.first:mt.jc);var yt=mt.link;z=yt.i(mt.index),tt=yt.i(mt.index+1);var Ct=this.linkSpacing*(ut-(at-1)/2);y++,yt.uh(),yt.L(mt.index,z.x,z.y+Ct),yt.L(mt.index+1,tt.x,tt.y+Ct),yt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(ot=new gc,ot.layer=Math.floor(z.x/2),rt=E.i(0),at=E.i(E.pointsCount-1),ot.first=rt.x+rt.y*rt.y,ot.jc=at.x+at.y*at.y,ot.rd=Math.min(z.y,tt.y),ot.Ic=Math.max(z.y,tt.y),ot.index=b,ot.link=E,b+2<E.pointsCount&&(rt=E.i(b-1),at=E.i(b+2),ut=0,rt.x<z.x?ut=at.x<z.x?3:z.y<tt.y?2:1:rt.x>z.x&&(ut=at.x>z.x?0:tt.y<z.y?2:1),ot.j=ut),x.push(ot));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,ot=x[z].jc,rt=z;rt<b;rt++)at=x[rt],at.jc!==ot&&(ut++,ot=at.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,ot=x[z].first,rt=z;rt<b;rt++)at=x[rt],at.first!==ot&&(ft++,ot=at.first);for(rt=!0,at=ft,ut<ft?(rt=!1,at=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,ft=z;ft<b;ft++)mt=x[ft],(rt?mt.first:mt.jc)!==ot&&(ut++,ot=rt?mt.first:mt.jc),yt=mt.link,z=yt.i(mt.index),tt=yt.i(mt.index+1),Ct=this.linkSpacing*(ut-(at-1)/2),y++,yt.uh(),yt.L(mt.index,z.x+Ct,z.y),yt.L(mt.index+1,tt.x+Ct,tt.y),yt.zf()}z=b}a=E}}}},Mt=nr.prototype,Mt.Vx=function(a,y){return a instanceof gc&&y instanceof gc&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Mt.Ux=function(a,y){return a instanceof gc&&y instanceof gc&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Mt.Js=function(a,y){return a instanceof gc&&y instanceof gc&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Mt.B=function(a,y){return a-=y,-1<a&&1>a},Mt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&oe("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function cc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function fc(a,y,x){a.He[a.tc[y]]=x}Gt.Object.defineProperties(nr.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):oe("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==A0&&a!==Kp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==N0&&a!==xy&&a!==wy||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==T0&&a!==Py&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==My&&a!==B0&&a!==Ey||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var A0=new Ue(nr,"CycleDepthFirst",0),Sy=new Ue(nr,"CycleGreedy",1),Kp=new Ue(nr,"CycleFromLayers",2),N0=new Ue(nr,"LayerOptimalLinkLength",0),xy=new Ue(nr,"LayerLongestPathSink",1),wy=new Ue(nr,"LayerLongestPathSource",2),T0=new Ue(nr,"InitDepthFirstOut",0),Py=new Ue(nr,"InitDepthFirstIn",1),Cy=new Ue(nr,"InitNaive",2),My=new Ue(nr,"AggressiveNone",0),B0=new Ue(nr,"AggressiveLess",1),Ey=new Ue(nr,"AggressiveMore",2),Y1=8;nr.className="LayeredDigraphLayout",nr.CycleDepthFirst=A0,nr.CycleGreedy=Sy,nr.CycleFromLayers=Kp,nr.LayerOptimalLinkLength=N0,nr.LayerLongestPathSink=xy,nr.LayerLongestPathSource=wy,nr.InitDepthFirstOut=T0,nr.InitDepthFirstIn=Py,nr.InitNaive=Cy,nr.AggressiveNone=My,nr.AggressiveLess=B0,nr.AggressiveMore=Ey,nr.PackNone=0,nr.PackExpand=1,nr.PackStraighten=2,nr.PackMedian=4,nr.PackAll=15,nr.AlignNone=0,nr.AlignUpperLeft=1,nr.AlignUpperRight=2,nr.AlignLowerLeft=4,nr.AlignLowerRight=8,nr.AlignAll=15;function gc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}gc.className="SegInfo";function Ng(a){Sr.call(this,a)}Le(Ng,Sr),Ng.prototype.createVertex=function(){return new gu(this)},Ng.prototype.createEdge=function(){return new Zp(this)},Ng.className="LayeredDigraphNetwork";function gu(a){Vs.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}Le(gu,Vs);function i1(a,y){return a.index-y.index}function F0(a,y){if(!a.$n){for(var x=[],E=ir(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=ir(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;oe("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=ir(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(i1),a.co=y}return a.co}function X1(a){if(!a.ao){for(var y=[],x=ir(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(i1),a.ao=y}return a.ao}gu.prototype.Cl=function(a){Vs.prototype.Cl.call(this,a),this.bo=this.co=null},gu.prototype.Kl=function(a){Vs.prototype.Kl.call(this,a),this.bo=this.co=null},gu.prototype.zl=function(a){Vs.prototype.zl.call(this,a),this.$n=this.ao=null},gu.prototype.Jl=function(a){Vs.prototype.Jl.call(this,a),this.$n=this.ao=null},Gt.Object.defineProperties(gu.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)}}}),gu.prototype.deleteDestinationEdge=gu.prototype.Jl,gu.prototype.addDestinationEdge=gu.prototype.zl,gu.prototype.deleteSourceEdge=gu.prototype.Kl,gu.prototype.addSourceEdge=gu.prototype.Cl,gu.className="LayeredDigraphVertex";function Zp(a){Il.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Le(Zp,Il),Gt.Object.defineProperties(Zp.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)}}}),Zp.className="LayeredDigraphEdge";function oo(a){Br.call(this),this.Ub=new sn,this.Wn=R0,this.ud=Uh,this.vo=z0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new kn(10,10).freeze();var y=new Ff(this);this.W=new bu(y),this.Y=new bu(y),this.ru=[],a&&Object.assign(this,a)}Le(oo,Br),oo.prototype.cloneProtected=function(a){Br.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)},oo.prototype.qb=function(a){a.classType===oo?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:oe("Unknown enum value: "+a):Br.prototype.qb.call(this,a)},oo.prototype.createNetwork=function(){return new Ff(this)},oo.prototype.makeNetwork=function(a){function y(E){if(E instanceof On)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Cn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof ke?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Ii?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},oo.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==G0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof ke&&(y=a),this.path===R0&&y!==null?this.ud=y.isTreePathToChildren?Uh:Tf:this.ud=this.path===R0?Uh:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new sn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof On?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof bu&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,by(this,y));for(y=this.network.vertexes,a=null;a=Q1(y),0<a.count;)y=o1(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,by(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof bu&&s1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof bu&&a1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof bu&&l1(this,y);if(this.Cu(),this.layerStyle===W0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===jy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof bu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new sn,this.isValidLayout=!0};function Q1(a){var y=new sn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}oo.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Uh:x.sourceEdges.count===0&&this.Ub.add(x);break;case Tf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:oe("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=o1(this,a),a!==null&&this.Ub.add(a))};function o1(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case Uh:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Tf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:oe("Unhandled path value "+a.ud.toString())}}return E}function by(a,y){if(y!==null){switch(a.ud){case Uh:if(0<y.destinationEdges.count){for(var x=new cn,E=y.destinationVertexes;E.next();){var b=E.value;r1(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Tf:if(0<y.sourceEdges.count){for(x=new cn,E=y.sourceVertexes;E.next();)b=E.value,r1(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:oe("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)by(a,x[y])}}function r1(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}oo.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function s1(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Xh&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,ot=0;ot<tt;ot++){var rt=z[ot];s1(a,rt),x+=rt.descendantCount+1,E=Math.max(E,rt.maxChildrenCount),b=Math.max(b,rt.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function J1(a,y){switch(a.vo){default:case z0:return y.parent!==null?y.parent:a.W;case Dy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Iy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Fy:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}oo.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(J1(this,a)),a.parent!==null&&a.parent.alignment===Xh){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function a1(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)a1(a,y[E])}}oo.prototype.assignTreeVertexValues=function(){};function l1(a,y){if(y!==null){y.alignment!==Xh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)l1(a,y[E])}}oo.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Tg:break;case Vp:a.children.reverse();break;case Yp:a.children.sort(a.comparer);break;case Xp:a.children.sort(a.comparer),a.children.reverse();break;default:oe("Unhandled sorting value "+a.sorting.toString())}},oo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},oo.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=pc(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,ot=0,rt=a.commentSpacing;if(a.node!==null)for(var at=a.node.Mu();at.next();){var ut=at.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(ot)):(z+=ut.width+Math.abs(ot),tt=Math.max(tt,ut.height)),ot=rt)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Ze.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Ze.free(b))};function pc(a){return a===Od||a===Xh||a===Rd||a===dd}function Up(a){return a===Od||a===Xh}function ky(a){var y=a.parent;if(y!==null){var x=y.alignment;if(pc(x)){if(Up(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Rd)return!0}}return!1}oo.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=pc(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,ot=ky(a),rt=0,at=a.comments,ut=at.length,ft=Rt.alloc(),mt=0;mt<ut;mt++){var yt=at[mt],Ct=yt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&ot)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-Ct.width,a.bounds.y+rt),yt.move(ft),yt=yt.Sd();yt.next();){var kt=yt.value;kt.fromSpot=dr,kt.toSpot=wr}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+rt),yt.move(ft),yt=yt.Sd();yt.next();)kt=yt.value,kt.fromSpot=wr,kt.toSpot=dr;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+rt),yt.move(ft),yt=yt.Sd();yt.next();)kt=yt.value,kt.fromSpot=wr,kt.toSpot=dr;else for(ft.h(a.bounds.x+a.commentMargin-Ct.width,a.bounds.y+rt),yt.move(ft),yt=yt.Sd();yt.next();)kt=yt.value,kt.fromSpot=dr,kt.toSpot=wr;rt=0<=a.commentSpacing?rt+(Ct.height+a.commentSpacing):rt+(a.commentSpacing-Ct.height)}else{if(135<b&&!z||!x&&ot)if(0<=a.commentMargin)for(ft.h(a.bounds.x+rt,a.bounds.y-a.commentMargin-Ct.height),yt.move(ft),yt=yt.Sd();yt.next();)kt=yt.value,kt.fromSpot=ao,kt.toSpot=Lr;else for(ft.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y-a.commentMargin),yt.move(ft),yt=yt.Sd();yt.next();)kt=yt.value,kt.fromSpot=Lr,kt.toSpot=ao;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y+a.commentMargin),yt.move(ft),yt=yt.Sd();yt.next();)kt=yt.value,kt.fromSpot=Lr,kt.toSpot=ao;else for(ft.h(a.bounds.x+rt,a.bounds.y+a.commentMargin-Ct.height),yt.move(ft),yt=yt.Sd();yt.next();)kt=yt.value,kt.fromSpot=ao,kt.toSpot=Lr;rt=0<=a.commentSpacing?rt+(Ct.width+a.commentSpacing):rt+(a.commentSpacing-Ct.width)}}if(Rt.free(ft),y=rt-a.commentSpacing-(E?y.height:y.width),this.ud===Uh)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},oo.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case j0:u1(this,a);break;case Qp:if(a.alignment===Xh)u1(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=pc(x)),E=ky(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=Vu(a);y=b===90||b===270;var z=0,tt=a.children,ot=tt.length;for(x=0;x<ot;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var rt=a.alignment;E=rt===Vh;var at=rt===Yh,ut=pc(rt),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var mt=a.nodeSpacing,yt=this.computeNodeIndent(a),Ct=a.rowSpacing,kt=0;(E||at||a.hm||a.im&&a.maxGenerationCount===1)&&(kt=Math.max(0,a.rowIndent)),E=a.width;var Ht=a.height,Dt=0,Xt=0,$t=0,ie=null,fe=null,Ae=0,Bn=0,Kn=0,Gn=0,Pn=0,on=0,Bi=0,Ei=0;if(ut&&!Up(rt)&&135<b&&tt.reverse(),Up(rt))if(1<ot)for(var Go=0;Go<ot;Go++)Go%2===0&&Go!==ot-1&&(Ei=Math.max(Ei,y?tt[Go].Da.width:tt[Go].Da.height));else ot===1&&(Ei=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(rt){case Od:Xt=135>b?h1(this,a,tt,Ei,Dt,Xt):d1(this,a,tt,Ei,Dt,Xt),Ei=Xt.x,Dt=Xt.width,Xt=Xt.height;break;case Rd:for(ie=0;ie<ot;ie++)fe=tt[ie],ft=fe.Da,$t=on===0?0:Ct,y?(fe.S.h(z-ft.width,Gn+$t),Dt=Math.max(Dt,ft.width),Xt=Math.max(Xt,Gn+$t+ft.height),Gn+=$t+ft.height):(fe.S.h(Kn+$t,z-ft.height),Dt=Math.max(Dt,Kn+$t+ft.width),Xt=Math.max(Xt,ft.height),Kn+=$t+ft.width),on++;break;case dd:for(ie=0;ie<ot;ie++)fe=tt[ie],z=fe.Da,ft=on===0?0:Ct,y?(fe.S.h(mt/2+a.focus.x,Gn+ft),Dt=Math.max(Dt,z.width),Xt=Math.max(Xt,Gn+ft+z.height),Gn+=ft+z.height):(fe.S.h(Kn+ft,mt/2+a.focus.y),Dt=Math.max(Dt,Kn+ft+z.width),Xt=Math.max(Xt,z.height),Kn+=ft+z.width),on++}ie=Cl(this,2),fe=Cl(this,2),y?(ie[0].h(0,0),ie[1].h(0,Xt),fe[0].h(Dt,0)):(ie[0].h(0,0),ie[1].h(Dt,0),fe[0].h(0,Xt)),fe[1].h(Dt,Xt)}else for(Go=0;Go<ot;Go++){var gr=tt[Go],qs=gr.Da;if(y){0<ft&&0<on&&Kn+mt+qs.width>ft&&(Kn<z&&_c(a,rt,z-Kn,0,Bi,Go-1),Pn++,on=0,Bi=Go,$t=Xt,Kn=0,Gn=135<b?-Xt-Ct:Xt+Ct),D0(this,gr,0,Gn);var na=0;if(on===0)ie=gr.Yo,fe=gr.kp,Ae=qs.width,Bn=qs.height,(ie===null||fe===null||b!==Vu(gr))&&(ie=Cl(this,2),fe=Cl(this,2),ie[0].h(0,0),ie[1].h(0,Bn),fe[0].h(Ae,0),fe[1].h(Ae,Bn));else{var Ha=Hn();Bn=c1(this,a,gr,ie,fe,Ae,Bn,Ha),na=Bn.x,ie=Ha[0],fe=Ha[1],Ae=Bn.width,Bn=Bn.height,_n(Ha),Kn<qs.width&&0>na&&(Nf(a,-na,0,Bi,Go-1),O0(ie,-na,0),O0(fe,-na,0),na=0)}gr.S.h(na,Gn),Dt=Math.max(Dt,Ae),Xt=Math.max(Xt,$t+(Pn===0?0:Ct)+qs.height),Kn=Ae}else 0<ft&&0<on&&Gn+mt+qs.height>ft&&(Gn<z&&_c(a,rt,0,z-Gn,Bi,Go-1),Pn++,on=0,Bi=Go,$t=Dt,Gn=0,Kn=135<b?-Dt-Ct:Dt+Ct),D0(this,gr,Kn,0),na=0,on===0?(ie=gr.Yo,fe=gr.kp,Ae=qs.width,Bn=qs.height,(ie===null||fe===null||b!==Vu(gr))&&(ie=Cl(this,2),fe=Cl(this,2),ie[0].h(0,0),ie[1].h(Ae,0),fe[0].h(0,Bn),fe[1].h(Ae,Bn))):(Ha=Hn(),Bn=c1(this,a,gr,ie,fe,Ae,Bn,Ha),na=Bn.x,ie=Ha[0],fe=Ha[1],Ae=Bn.width,Bn=Bn.height,_n(Ha),Gn<qs.height&&0>na&&(Nf(a,0,-na,Bi,Go-1),O0(ie,0,-na),O0(fe,0,-na),na=0)),gr.S.h(Kn,na),Xt=Math.max(Xt,Bn),Dt=Math.max(Dt,$t+(Pn===0?0:Ct)+qs.width),Gn=Bn;on++}switch(0<Pn&&(y?(Xt+=Math.max(0,x),Kn<Dt&&_c(a,rt,Dt-Kn,0,Bi,ot-1),0<kt&&(at||Nf(a,kt,0,0,ot-1),Dt+=kt)):(Dt+=Math.max(0,x),Gn<Xt&&_c(a,rt,0,Xt-Gn,Bi,ot-1),0<kt&&(at||Nf(a,0,kt,0,ot-1),Xt+=kt))),kt=at=0,rt){case Bg:y?at+=Dt/2-a.focus.x-yt/2:kt+=Xt/2-a.focus.y-yt/2;break;case Bf:0<Pn?y?at+=Dt/2-a.focus.x-yt/2:kt+=Xt/2-a.focus.y-yt/2:y?(Ei=tt[0].S.x+tt[0].la.x,at+=Ei+(tt[ot-1].S.x+tt[ot-1].la.x+2*tt[ot-1].focus.x-Ei)/2-a.focus.x-yt/2):(Ei=tt[0].S.y+tt[0].la.y,kt+=Ei+(tt[ot-1].S.y+tt[ot-1].la.y+2*tt[ot-1].focus.y-Ei)/2-a.focus.y-yt/2);break;case Vh:y?(at-=yt,Dt+=yt):(kt-=yt,Xt+=yt);break;case Yh:y?(at+=Dt-a.width+yt,Dt+=yt):(kt+=Xt-a.height+yt,Xt+=yt);break;case Od:y?1<ot?at+=Ei+mt/2-a.focus.x:at+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<ot?kt+=Ei+mt/2-a.focus.y:kt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Rd:y?at+=Dt+mt/2-a.focus.x:kt+=Xt+mt/2-a.focus.y;break;case dd:break;default:Xt=this.customAlignment(a,at,kt,Dt,Xt),at=Xt[0],kt=Xt[1],Dt=Xt[2],Xt=Xt[3]}for(yt=0;yt<ot;yt++)Ei=tt[yt],y?Ei.S.h(Ei.S.x+Ei.la.x-at,Ei.S.y+(135<b?(ut?-Xt:-Ei.Da.height)+Ei.la.y-x:Ht+x+Ei.la.y)):Ei.S.h(Ei.S.x+(135<b?(ut?-Dt:-Ei.Da.width)+Ei.la.x-x:E+x+Ei.la.x),Ei.S.y+Ei.la.y-kt);if(ot=tt=0,ut?y?(Dt=Ay(a,Dt,at),0>at&&(at=0),135<b&&(kt+=Xt+x),Xt+=Ht+x,rt===dd&&(tt+=mt/2+a.focus.x),ot+=Ht+x):(135<b&&(at+=Dt+x),Dt+=E+x,Xt=Ny(a,Xt,kt),0>kt&&(kt=0),rt===dd&&(ot+=mt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Dt&&(Dt=Ty(rt,E-Dt,0),tt=Dt.x,ot=Dt.y,Dt=E,at=0):Dt=Ay(a,Dt,at),0>at&&(tt-=at,at=0),135<b&&(kt+=Xt+x),Xt=Math.max(Math.max(Xt,Ht),Xt+Ht+x),ot+=Ht+x):(135<b&&(at+=Dt+x),Dt=Math.max(Math.max(Dt,E),Dt+E+x),a.comments===null?Ht>Xt&&(Xt=Ty(rt,0,Ht-Xt),tt=Xt.x,ot=Xt.y,Xt=Ht,kt=0):Xt=Ny(a,Xt,kt),0>kt&&(ot-=kt,kt=0),tt+=E+x),0<Pn)b=Cl(this,4),Pn=Cl(this,4),y?(b[2].h(0,Ht+x),b[3].h(b[2].x,Xt),Pn[2].h(Dt,b[2].y),Pn[3].h(Pn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Dt,b[2].y),Pn[2].h(b[2].x,Xt),Pn[3].h(b[3].x,Pn[2].y));else{for(b=Cl(this,ie.length+2),Pn=Cl(this,fe.length+2),rt=0;rt<ie.length;rt++)ut=ie[rt],b[rt+2].h(ut.x+tt,ut.y+ot);for(rt=0;rt<fe.length;rt++)ut=fe[rt],Pn[rt+2].h(ut.x+tt,ut.y+ot)}y?(b[0].h(at,0),b[1].h(b[0].x,Ht),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),Pn[0].h(at+E,0),Pn[1].h(Pn[0].x,Ht),Pn[2].y<Pn[1].y&&(Pn[2].x<Pn[0].x?Pn[2].assign(Pn[1]):Pn[1].assign(Pn[2])),Pn[3].y<Pn[2].y&&(Pn[3].x<Pn[0].x?Pn[3].assign(Pn[2]):Pn[2].assign(Pn[3])),b[2].y-=x/2,Pn[2].y-=x/2):(b[0].h(0,kt),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),Pn[0].h(0,kt+Ht),Pn[1].h(E,Pn[0].y),Pn[2].x<Pn[1].x&&(Pn[2].y<Pn[0].y?Pn[2].assign(Pn[1]):Pn[1].assign(Pn[2])),Pn[3].x<Pn[2].x&&(Pn[3].y<Pn[0].y?Pn[3].assign(Pn[2]):Pn[2].assign(Pn[3])),b[2].x-=x/2,Pn[2].x-=x/2),sh(this,ie),sh(this,fe),a.Yo=b,a.kp=Pn,a.la.h(at,kt),a.Da.h(Dt,Xt)}break;default:oe("Unhandled compaction value "+a.compaction.toString())}}};function u1(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=pc(x));var b=ky(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=Vu(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,ot=0;ot<tt;ot++){var rt=b[ot];z=Math.max(z,x?rt.Da.width:rt.Da.height)}var at=y.alignment,ut=at===Vh,ft=at===Yh;ot=pc(at);var mt=Math.max(0,y.breadthLimit);rt=a.computeLayerSpacing(y);var yt=y.nodeSpacing,Ct=a.computeNodeIndent(y),kt=ut||ft?0:Ct/2,Ht=y.rowSpacing,Dt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Dt=Math.max(0,y.rowIndent)),ut=y.width;var Xt=y.height,$t=0,ie=0,fe=0,Ae=0,Bn=0,Kn=0,Gn=0,Pn=0,on=0,Bi=0;if(ot&&!Up(at)&&135<E&&b.reverse(),Up(at))if(1<tt)for(var Ei=0;Ei<tt;Ei++){var Go=b[Ei],gr=Go.Da;Ei%2===0&&Ei!==tt-1?on=Math.max(on,(x?gr.width:gr.height)+a.computeBusNodeSpacing(Go)-yt):Ei%2!==0&&(Bi=Math.max(Bi,(x?gr.width:gr.height)+a.computeBusNodeSpacing(Go)-yt))}else tt===1&&(on=x?b[0].Da.width:b[0].Da.height);if(ot)switch(at){case Od:case Xh:ie=135>E?h1(a,y,b,on,$t,ie):d1(a,y,b,on,$t,ie),on=ie.x,$t=ie.width,ie=ie.height;break;case Rd:for(mt=0;mt<tt;mt++)kt=b[mt],fe=kt.Da,Bi=Gn===0?0:Ht,x?(kt.S.h(z-fe.width,Bn+Bi),$t=Math.max($t,fe.width),ie=Math.max(ie,Bn+Bi+fe.height),Bn+=Bi+fe.height):(kt.S.h(Ae+Bi,z-fe.height),$t=Math.max($t,Ae+Bi+fe.width),ie=Math.max(ie,fe.height),Ae+=Bi+fe.width),Gn++;break;case dd:for(z=0;z<tt;z++)mt=b[z],kt=mt.Da,fe=Gn===0?0:Ht,x?(mt.S.h(yt/2+y.focus.x,Bn+fe),$t=Math.max($t,kt.width),ie=Math.max(ie,Bn+fe+kt.height),Bn+=fe+kt.height):(mt.S.h(Ae+fe,yt/2+y.focus.y),$t=Math.max($t,Ae+fe+kt.width),ie=Math.max(ie,kt.height),Ae+=fe+kt.width),Gn++}else for(Bi=0;Bi<tt;Bi++)Ei=b[Bi],Go=Ei.Da,x?(0<mt&&0<Gn&&Ae+yt+Go.width>mt&&(Ae<z&&_c(y,at,z-Ae,0,Pn,Bi-1),Kn++,Gn=0,Pn=Bi,fe=ie,Ae=0,Bn=135<E?-ie-Ht:ie+Ht),gr=Gn===0?kt:yt,D0(a,Ei,0,Bn),Ei.S.h(Ae+gr,Bn),$t=Math.max($t,Ae+gr+Go.width),ie=Math.max(ie,fe+(Kn===0?0:Ht)+Go.height),Ae+=gr+Go.width):(0<mt&&0<Gn&&Bn+yt+Go.height>mt&&(Bn<z&&_c(y,at,0,z-Bn,Pn,Bi-1),Kn++,Gn=0,Pn=Bi,fe=$t,Bn=0,Ae=135<E?-$t-Ht:$t+Ht),gr=Gn===0?kt:yt,D0(a,Ei,Ae,0),Ei.S.h(Ae,Bn+gr),ie=Math.max(ie,Bn+gr+Go.height),$t=Math.max($t,fe+(Kn===0?0:Ht)+Go.width),Bn+=gr+Go.height),Gn++;switch(0<Kn&&(x?(ie+=Math.max(0,rt),Ae<$t&&_c(y,at,$t-Ae,0,Pn,tt-1),0<Dt&&(ft||Nf(y,Dt,0,0,tt-1),$t+=Dt)):($t+=Math.max(0,rt),Bn<ie&&_c(y,at,0,ie-Bn,Pn,tt-1),0<Dt&&(ft||Nf(y,0,Dt,0,tt-1),ie+=Dt))),Dt=ft=0,at){case Bg:x?ft+=$t/2-y.focus.x-Ct/2:Dt+=ie/2-y.focus.y-Ct/2;break;case Bf:0<Kn?x?ft+=$t/2-y.focus.x-Ct/2:Dt+=ie/2-y.focus.y-Ct/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Ct/2):(a=b[0].S.y+b[0].la.y,Dt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Ct/2);break;case Vh:x?(ft-=Ct,$t+=Ct):(Dt-=Ct,ie+=Ct);break;case Yh:x?(ft+=$t-y.width+Ct,$t+=Ct):(Dt+=ie-y.height+Ct,ie+=Ct);break;case Od:case Xh:x?1<tt?ft+=on+yt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Dt+=on+yt/2-y.focus.y:Dt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Rd:x?ft+=$t+yt/2-y.focus.x:Dt+=ie+yt/2-y.focus.y;break;case dd:break;default:a=a.customAlignment(y,ft,Dt,$t,ie),ft=a[0],Dt=a[1],$t=a[2],ie=a[3]}for(a=0;a<tt;a++)Ct=b[a],x?Ct.S.h(Ct.S.x+Ct.la.x-ft,Ct.S.y+(135<E?(ot?-ie:-Ct.Da.height)+Ct.la.y-rt:Xt+rt+Ct.la.y)):Ct.S.h(Ct.S.x+(135<E?(ot?-$t:-Ct.Da.width)+Ct.la.x-rt:ut+rt+Ct.la.x),Ct.S.y+Ct.la.y-Dt);x?($t=Ay(y,$t,ft),0>ft&&(ft=0),135<E&&(Dt+=ie+rt),ie=Math.max(Math.max(ie,Xt),ie+Xt+rt)):(135<E&&(ft+=$t+rt),$t=Math.max(Math.max($t,ut),$t+ut+rt),ie=Ny(y,ie,Dt),0>Dt&&(Dt=0)),y.la.h(ft,Dt),y.Da.h($t,ie)}}oo.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function h1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ze(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Ze(E,0,b,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,at=Vu(y)===90,ut=0,ft=0,mt=0,yt=0;yt<tt;yt++)if(!(yt%2!==0||1<tt&&yt===tt-1)){var Ct=x[yt],kt=Ct.Da,Ht=ut===0?0:rt;if(at){var Dt=a.computeBusNodeSpacing(Ct)-ot;Ct.S.h(E-(kt.width+Dt),mt+Ht),b=Math.max(b,kt.width+Dt),z=Math.max(z,mt+Ht+kt.height),mt+=Ht+kt.height}else Dt=a.computeBusNodeSpacing(Ct)-ot,Ct.S.h(ft+Ht,E-(kt.height+Dt)),z=Math.max(z,kt.height+Dt),b=Math.max(b,ft+Ht+kt.width),ft+=Ht+kt.width;ut++}for(ut=0,Ct=ft,yt=mt,at?(ft=E+ot,mt=0):(ft=0,mt=E+ot),kt=0;kt<tt;kt++)if(kt%2!==0){Ht=x[kt],Dt=Ht.Da;var Xt=ut===0?0:rt;if(at){var $t=a.computeBusNodeSpacing(Ht)-ot;Ht.S.h(ft+$t,mt+Xt),b=Math.max(b,ft+Dt.width+$t),z=Math.max(z,mt+Xt+Dt.height),mt+=Xt+Dt.height}else $t=a.computeBusNodeSpacing(Ht)-ot,Ht.S.h(ft+Xt,mt+$t),b=Math.max(b,ft+Xt+Dt.width),z=Math.max(z,mt+Dt.height+$t),ft+=Xt+Dt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,at?Math.max(Math.abs(yt),Math.abs(mt)):Math.max(Math.abs(Ct),Math.abs(ft))),at?(x.S.h(E+ot/2-x.focus.x-x.la.x,z+a),at=E+ot/2-x.focus.x-x.la.x,b=Math.max(b,at+tt.width),0>at&&(b-=at),z=Math.max(z,Math.max(yt,mt)+a+tt.height),0>x.S.x&&(E=I0(y,x.S.x,!1,E,ot))):(x.S.h(b+a,E+ot/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Ct,ft)+a+tt.width),mt=E+ot/2-x.focus.y-x.la.y,z=Math.max(z,mt+tt.height),0>mt&&(z-=mt),0>x.S.y&&(E=I0(y,x.S.y,!0,E,ot)))),new Ze(E,0,b,z)}function d1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ze(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Ze(E,0,b,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,at=Vu(y)===270,ut=0,ft=0,mt=0,yt=0;yt<tt;yt++)if(!(yt%2!==0||1<tt&&yt===tt-1)){var Ct=x[yt],kt=Ct.Da,Ht=ut===0?0:rt;if(at){var Dt=a.computeBusNodeSpacing(Ct)-ot;mt-=Ht+kt.height,Ct.S.h(E-(kt.width+Dt),mt),b=Math.max(b,kt.width+Dt),z=Math.max(z,Math.abs(mt))}else Dt=a.computeBusNodeSpacing(Ct)-ot,ft-=Ht+kt.width,Ct.S.h(ft,E-(kt.height+Dt)),z=Math.max(z,kt.height+Dt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,Ct=ft,yt=mt,at?(ft=E+ot,mt=0):(ft=0,mt=E+ot),kt=0;kt<tt;kt++)if(kt%2!==0){Ht=x[kt],Dt=Ht.Da;var Xt=ut===0?0:rt;if(at){var $t=a.computeBusNodeSpacing(Ht)-ot;mt-=Xt+Dt.height,Ht.S.h(ft+$t,mt),b=Math.max(b,ft+Dt.width+$t),z=Math.max(z,Math.abs(mt))}else $t=a.computeBusNodeSpacing(Ht)-ot,ft-=Xt+Dt.width,Ht.S.h(ft,mt+$t),z=Math.max(z,mt+Dt.height+$t),b=Math.max(b,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(rt=x[tt-1],ut=rt.Da,a=a.computeBusLastRowSpacing(rt,at?Math.max(Math.abs(yt),Math.abs(mt)):Math.max(Math.abs(Ct),Math.abs(ft))),at?(rt.S.h(E+ot/2-rt.focus.x-rt.la.x,-z-ut.height-a),ft=E+ot/2-rt.focus.x-rt.la.x,b=Math.max(b,ft+ut.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(yt,mt))+a+ut.height),0>rt.S.x&&(E=I0(y,rt.S.x,!1,E,ot))):(rt.S.h(-b-ut.width-a,E+ot/2-rt.focus.y-rt.la.y),b=Math.max(b,Math.abs(Math.min(Ct,ft))+a+ut.width),mt=E+ot/2-rt.focus.y-rt.la.y,z=Math.max(z,mt+ut.height),0>mt&&(z-=mt),0>rt.S.y&&(E=I0(y,rt.S.y,!0,E,ot)))),y=0;y<tt;y++)ot=x[y],at?ot.S.h(ot.S.x,ot.S.y+z):ot.S.h(ot.S.x+b,ot.S.y);return new Ze(E,0,b,z)}oo.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},oo.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function I0(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function Ay(a,y,x){switch(a.alignment){case Bf:case Bg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Vh:return a.width>y?a.width:y;case Yh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Od:case Xh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Rd:return a.width-a.focus.x+a.nodeSpacing/2+y;case dd:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case Bf:case Bg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Vh:return a.height>y?a.height:y;case Yh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Od:case Xh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Rd:return a.height-a.focus.y+a.nodeSpacing/2+y;case dd:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ty(a,y,x){switch(a){case Bg:y/=2,x/=2;break;case Bf:y/=2,x/=2;break;case Vh:x=y=0;break;case Yh:break;default:oe("Unhandled alignment value "+a.toString())}return new Rt(y,x)}function _c(a,y,x,E,b,z){y=Ty(y,x,E),Nf(a,y.x,y.y,b,z)}function Nf(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function D0(a,y,x,E){var b=y.parent;switch(a.ud){case Uh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Tf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:oe("Unhandled path value "+a.ud.toString())}}function O0(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function c1(a,y,x,E,b,z,tt,ot){var rt=Vu(y),at=rt===90||rt===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var mt=tt,yt=x.Yo,Ct=x.kp;tt=x.Da;var kt=at?Math.max(mt,tt.height):Math.max(E,tt.width);if((yt===null||rt!==Vu(x))&&(yt=Cl(a,2),Ct=Cl(a,2),at?(yt[0].h(0,0),yt[1].h(0,tt.height),Ct[0].h(tt.width,0),Ct[1].h(Ct[0].x,yt[1].y)):(yt[0].h(0,0),yt[1].h(tt.width,0),Ct[0].h(0,tt.height),Ct[1].h(yt[1].x,Ct[0].y))),at){if(mt=9999999,!(ft===null||2>ft.length||yt===null||2>yt.length))for(b=x=0;x<ft.length&&b<yt.length;){z=ft[x];var Ht=yt[b];rt=Ht.x,at=Ht.y,rt+=E;var Dt=z;x+1<ft.length&&(Dt=ft[x+1]);var Xt=Ht;Ht=Xt.x,Xt=Xt.y,b+1<yt.length&&(Xt=yt[b+1],Ht=Xt.x,Xt=Xt.y,Ht+=E);var $t=mt;z.y===at?$t=rt-z.x:z.y>at&&z.y<Xt?$t=rt+(z.y-at)/(Xt-at)*(Ht-rt)-z.x:at>z.y&&at<Dt.y&&($t=rt-(z.x+(at-z.y)/(Dt.y-z.y)*(Dt.x-z.x))),$t<mt&&(mt=$t),Dt.y<=z.y?x++:Xt<=at?b++:(Dt.y<=Xt&&x++,Xt<=Dt.y&&b++)}if(mt=E-mt,mt+=ut,x=yt,b=mt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Cl(a,y.length+x.length),E=z=rt=0;z<x.length&&x[z].y<y[0].y;)at=x[z++],ut[E++].h(at.x+b,at.y);for(;rt<y.length;)at=y[rt++],ut[E++].h(at.x,at.y);for(rt=y[y.length-1].y;z<x.length&&x[z].y<=rt;)z++;for(;z<x.length&&x[z].y>rt;)at=x[z++],ut[E++].h(at.x+b,at.y);for(x=Cl(a,E),rt=0;rt<E;rt++)x[rt].assign(ut[rt]);sh(a,ut),E=x}if(z=Ct,rt=mt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Cl(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].y<z[0].y;)Dt=ft[x++],ut[b++].h(Dt.x,Dt.y);for(;at<z.length;)Dt=z[at++],ut[b++].h(Dt.x+rt,Dt.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)rt=ft[x++],ut[b++].h(rt.x,rt.y);for(z=Cl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);sh(a,ut),b=z}return z=Math.max(0,mt)+tt.width,tt=kt,sh(a,y),sh(a,yt),sh(a,ft),sh(a,Ct),ot[0]=E,ot[1]=b,new Ze(mt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||yt===null||2>yt.length))for(b=x=0;x<ft.length&&b<yt.length;)z=ft[x],Ht=yt[b],rt=Ht.x,at=Ht.y,at+=mt,Dt=z,x+1<ft.length&&(Dt=ft[x+1]),Xt=Ht,Ht=Xt.x,Xt=Xt.y,b+1<yt.length&&(Xt=yt[b+1],Ht=Xt.x,Xt=Xt.y,Xt+=mt),$t=E,z.x===rt?$t=at-z.y:z.x>rt&&z.x<Ht?$t=at+(z.x-rt)/(Ht-rt)*(Xt-at)-z.y:rt>z.x&&rt<Dt.x&&($t=at-(z.y+(rt-z.x)/(Dt.x-z.x)*(Dt.y-z.y))),$t<E&&(E=$t),Dt.x<=z.x?x++:Ht<=rt?b++:(Dt.x<=Ht&&x++,Ht<=Dt.x&&b++);if(mt-=E,mt+=ut,x=yt,b=mt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Cl(a,y.length+x.length),E=z=rt=0;z<x.length&&x[z].x<y[0].x;)at=x[z++],ut[E++].h(at.x,at.y+b);for(;rt<y.length;)at=y[rt++],ut[E++].h(at.x,at.y);for(rt=y[y.length-1].x;z<x.length&&x[z].x<=rt;)z++;for(;z<x.length&&x[z].x>rt;)at=x[z++],ut[E++].h(at.x,at.y+b);for(x=Cl(a,E),rt=0;rt<E;rt++)x[rt].assign(ut[rt]);sh(a,ut),E=x}if(z=Ct,rt=mt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Cl(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].x<z[0].x;)Dt=ft[x++],ut[b++].h(Dt.x,Dt.y);for(;at<z.length;)Dt=z[at++],ut[b++].h(Dt.x,Dt.y+rt);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)rt=ft[x++],ut[b++].h(rt.x,rt.y);for(z=Cl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);sh(a,ut),b=z}return z=kt,tt=Math.max(0,mt)+tt.height,sh(a,y),sh(a,yt),sh(a,ft),sh(a,Ct),ot[0]=E,ot[1]=b,new Ze(mt,0,z,tt)}function Cl(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new Rt;return a}function sh(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}oo.prototype.arrangeTrees=function(){if(this.Rb===G0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof bu){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),By(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof bu&&a.push(x);switch(this.sorting){case Tg:break;case Vp:a.reverse();break;case Yp:a.sort(this.comparer);break;case Xp:a.sort(this.comparer),a.reverse();break;default:oe("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(By(this,b,y+b.la.x,x+b.la.y),this.Rb){case H0:x+=b.Da.height+this.$d.height;break;case Oy:y+=b.Da.width+this.$d.width;break;default:oe("Unhandled arrangement value "+this.Rb.toString())}}}};function By(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];By(a,tt,x+tt.S.x,E+tt.S.y)}}}oo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},oo.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},oo.prototype.Gu=function(){if(this.layerStyle===W0){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new Rt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Rt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var ot=a[tt]+y[tt];this.angle===270?(z-=ot,b.push(new Ze(0,z,x,ot))):this.angle===90?(b.push(new Ze(0,z,x,ot)),z+=ot):this.angle===180?(z-=ot,b.push(new Ze(z,0,ot,x))):(b.push(new Ze(z,0,ot,x)),z+=ot)}this.commitLayers(b,E)}},oo.prototype.commitLayers=function(){},oo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},oo.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof bu&&f1(this,y)}};function f1(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)f1(a,y[E])}}oo.prototype.setPortSpots=function(a){var y=a.alignment;if(pc(y)){var x=this.ud===Uh,E=Vu(a);switch(E){case 0:var b=wr;break;case 90:b=Lr;break;case 180:b=dr;break;default:b=ao}var z=a.children,tt=z.length;switch(y){case Od:case Xh:for(y=0;y<tt;y++){var ot=z[y];if(ot=(x?ot.sourceEdges:ot.destinationEdges).first(),ot!==null&&(ot=ot.link,ot!==null)){var rt=E===90||E===270?dr:ao;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:rt=dr;break;case 90:rt=ao;break;case 180:rt=wr;break;default:rt=Lr}else y%2===0&&(rt=E===90||E===270?wr:Lr);x?(a.setsPortSpot&&(ot.fromSpot=b),a.setsChildPortSpot&&(ot.toSpot=rt)):(a.setsPortSpot&&(ot.fromSpot=rt),a.setsChildPortSpot&&(ot.toSpot=b))}}break;case Rd:for(E=E===90||E===270?wr:Lr,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case dd:for(E=E===90||E===270?dr:ao,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=Vu(a),this.ud===Uh){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=wr;break;case 90:E.fromSpot=Lr;break;case 180:E.fromSpot=dr;break;default:E.fromSpot=ao}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=dr;break;case 90:E.toSpot=ao;break;case 180:E.toSpot=wr;break;default:E.toSpot=Lr}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=wr;break;case 90:E.toSpot=Lr;break;case 180:E.toSpot=dr;break;default:E.toSpot=ao}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=dr;break;case 90:E.fromSpot=ao;break;case 180:E.fromSpot=wr;break;default:E.fromSpot=Lr}else E.fromSpot=a.childPortSpot}};function Vu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}oo.prototype.computeLayerSpacing=function(a){var y=Vu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},oo.prototype.computeNodeIndent=function(a){var y=Vu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Gt.Object.defineProperties(oo.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==z0&&a!==Iy&&a!==Fy&&a!==Dy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==jy&&a!==W0||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==H0&&a!==Oy&&a!==G0||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Tg&&a!==Vp&&a!==Yp&&!Xp||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):oe("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==j0&&a!==Qp||(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!==Tg&&a!==Vp&&a!==Yp&&!Xp||(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!==j0&&a!==Qp||(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 R0=new Ue(oo,"PathDefault",-1),Uh=new Ue(oo,"PathDestination",0),Tf=new Ue(oo,"PathSource",1),Tg=new Ue(oo,"SortingForwards",10),Vp=new Ue(oo,"SortingReverse",11),Yp=new Ue(oo,"SortingAscending",12),Xp=new Ue(oo,"SortingDescending",13),Bg=new Ue(oo,"AlignmentCenterSubtrees",20),Bf=new Ue(oo,"AlignmentCenterChildren",21),Vh=new Ue(oo,"AlignmentStart",22),Yh=new Ue(oo,"AlignmentEnd",23),Od=new Ue(oo,"AlignmentBus",24),Xh=new Ue(oo,"AlignmentBusBranching",25),Rd=new Ue(oo,"AlignmentTopLeftBus",26),dd=new Ue(oo,"AlignmentBottomRightBus",27),j0=new Ue(oo,"CompactionNone",30),Qp=new Ue(oo,"CompactionBlock",31),z0=new Ue(oo,"StyleLayered",40),Fy=new Ue(oo,"StyleLastParents",41),Iy=new Ue(oo,"StyleAlternating",42),Dy=new Ue(oo,"StyleRootOnly",43),H0=new Ue(oo,"ArrangementVertical",50),Oy=new Ue(oo,"ArrangementHorizontal",51),G0=new Ue(oo,"ArrangementFixedRoots",52),Ry=new Ue(oo,"LayerIndividual",60),jy=new Ue(oo,"LayerSiblings",61),W0=new Ue(oo,"LayerUniform",62);oo.className="TreeLayout",oo.PathDefault=R0,oo.PathDestination=Uh,oo.PathSource=Tf,oo.SortingForwards=Tg,oo.SortingReverse=Vp,oo.SortingAscending=Yp,oo.SortingDescending=Xp,oo.AlignmentCenterSubtrees=Bg,oo.AlignmentCenterChildren=Bf,oo.AlignmentStart=Vh,oo.AlignmentEnd=Yh,oo.AlignmentBus=Od,oo.AlignmentBusBranching=Xh,oo.AlignmentTopLeftBus=Rd,oo.AlignmentBottomRightBus=dd,oo.CompactionNone=j0,oo.CompactionBlock=Qp,oo.StyleLayered=z0,oo.StyleLastParents=Fy,oo.StyleAlternating=Iy,oo.StyleRootOnly=Dy,oo.ArrangementVertical=H0,oo.ArrangementHorizontal=Oy,oo.ArrangementFixedRoots=G0,oo.LayerIndividual=Ry,oo.LayerSiblings=jy,oo.LayerUniform=W0;function Ff(a){Sr.call(this,a)}Le(Ff,Sr),Ff.prototype.createVertex=function(){return new bu(this)},Ff.prototype.createEdge=function(){return new Fg(this)},Ff.className="TreeNetwork";function bu(a){Vs.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 Rt(0,0),this.Da=new kn(0,0),this.la=new Rt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Tg,this.hd=oy,this.Kb=0,this.Jb=Bf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Qp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=nn,this.wr=!0,this.Dp=nn}Le(bu,Vs),bu.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)},Gt.Object.defineProperties(bu.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),bu.className="TreeVertex";function Fg(a){Il.call(this,a),this.$t=new Rt(0,0)}Le(Fg,Il),Fg.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case Uh:x=this.fromVertex,E=this.toVertex;break;case Tf:x=this.toVertex,E=this.fromVertex;break;default:oe("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=Vu(x),tt=y.computeLayerSpacing(x),ot=x.rowSpacing;a.vg();var rt=a.curve===_l,at=a.isOrthogonal,ut;if(a.uh(),at||rt){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),mt=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),mt=a.i(a.pointsCount-1)}var yt=a.i(a.pointsCount-1);z===0?(x.alignment===Yh?(z=E.bottom+b.y,b.y===0&&ft.y>yt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Vh?(z=E.top+b.y,b.y===0&&ft.y<yt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,rt?(a.m(ut,ft.x,z),ut++,a.m(ut,E.right+tt,z),ut++,a.m(ut,E.right+tt+(b.x-ot)/3,z),ut++,a.m(ut,E.right+tt+2*(b.x-ot)/3,z),ut++,a.m(ut,E.right+tt+(b.x-ot),z),ut++,a.m(ut,mt.x,z)):(at&&(a.m(ut,E.right+tt/2,ft.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(at?ot/2:ot),z),ut++,at&&a.m(ut,a.i(ut-1).x,mt.y))):z===90?(x.alignment===Yh?(z=E.right+b.x,b.x===0&&ft.x>yt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Vh?(z=E.left+b.x,b.x===0&&ft.x<yt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,rt?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.bottom+tt),ut++,a.m(ut,z,E.bottom+tt+(b.y-ot)/3),ut++,a.m(ut,z,E.bottom+tt+2*(b.y-ot)/3),ut++,a.m(ut,z,E.bottom+tt+(b.y-ot)),ut++,a.m(ut,z,mt.y)):(at&&(a.m(ut,ft.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(at?ot/2:ot)),ut++,at&&a.m(ut,mt.x,a.i(ut-1).y))):z===180?(x.alignment===Yh?(z=E.bottom+b.y,b.y===0&&ft.y>yt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Vh?(z=E.top+b.y,b.y===0&&ft.y<yt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,rt?(a.m(ut,ft.x,z),ut++,a.m(ut,E.left-tt,z),ut++,a.m(ut,E.left-tt+(b.x+ot)/3,z),ut++,a.m(ut,E.left-tt+2*(b.x+ot)/3,z),ut++,a.m(ut,E.left-tt+(b.x+ot),z),ut++,a.m(ut,mt.x,z)):(at&&(a.m(ut,E.left-tt/2,ft.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(at?ot/2:ot),z),ut++,at&&a.m(ut,a.i(ut-1).x,mt.y))):z===270?(x.alignment===Yh?(z=E.right+b.x,b.x===0&&ft.x>yt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Vh?(z=E.left+b.x,b.x===0&&ft.x<yt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,rt?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.top-tt),ut++,a.m(ut,z,E.top-tt+(b.y+ot)/3),ut++,a.m(ut,z,E.top-tt+2*(b.y+ot)/3),ut++,a.m(ut,z,E.top-tt+(b.y+ot)),ut++,a.m(ut,z,mt.y)):(at&&(a.m(ut,ft.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(at?ot/2:ot)),ut++,at&&a.m(ut,mt.x,a.i(ut-1).y))):oe("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=Vu(x),y!==Vu(b)&&(tt=E.computeLayerSpacing(x),ot=x.bounds,x=b.bounds,y===0&&x.left-ot.right<tt+1||y===90&&x.top-ot.bottom<tt+1||y===180&&ot.left-x.right<tt+1||y===270&&ot.top-x.bottom<tt+1||(a.vg(),x=a.curve===_l,b=a.isOrthogonal,E=pc(this.fromVertex.alignment),a.uh(),y===0?(y=ot.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=ot.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=ot.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=ot.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Gt.Object.defineProperties(Fg.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),Fg.className="TreeEdge",Ar.prototype.initializeStandardTools=function(){this.gb("Action",new Zi,this.mouseDownTools),this.gb("Relinking",new ei,this.mouseDownTools),this.gb("LinkReshaping",new ai,this.mouseDownTools),this.gb("Rotating",new fo,this.mouseDownTools),this.gb("Resizing",new Oi,this.mouseDownTools),this.gb("Linking",new Rn,this.mouseMoveTools),this.gb("Dragging",new Wr,this.mouseMoveTools),this.gb("DragSelecting",new Wi,this.mouseMoveTools),this.gb("Panning",new xi,this.mouseMoveTools),this.gb("ContextMenu",new Wo,this.mouseUpTools),this.gb("TextEditing",new Ao,this.mouseUpTools),this.gb("ClickCreating",new io,this.mouseUpTools),this.gb("ClickSelecting",new or,this.mouseUpTools)},Ph("Horizontal",new vm),Ph("Spot",new Sm),Ph("Table",new wm),Ph("Viewbox",new Mm),Ph("TableRow",new Pm),Ph("TableColumn",new Cm),Ph("Graduated",new dp),Ph("Grid",new hp),ng.add("GraphLinksModel",ea),ng.add("TreeModel",cu);var K0=qt.go,zy={get licenseKey(){return ke.licenseKey},set licenseKey(a){ke.licenseKey=a},get version(){return ke.version},Group:Ii,EnumValue:Ue,List:cn,Set:sn,Map:Xn,Point:Rt,Size:kn,Rect:Ze,Margin:hi,Spot:ti,Geometry:En,PathFigure:Ks,PathSegment:To,InputEvent:Ma,DiagramEvent:$h,ChangedEvent:Dr,Model:ni,GraphLinksModel:Po,TreeModel:tl,Binding:Ls,Transaction:Xs,UndoManager:Gr,CommandHandler:zt,Tool:ko,DraggingTool:Wr,DraggingInfo:rd,DraggingOptions:st,LinkingBaseTool:Fe,LinkingTool:Rn,RelinkingTool:ei,LinkReshapingTool:ai,ResizingTool:Oi,RotatingTool:fo,ClickSelectingTool:or,ActionTool:Zi,ClickCreatingTool:io,HTMLInfo:to,ContextMenuTool:Wo,DragSelectingTool:Wi,PanningTool:xi,TextEditingTool:Ao,ToolManager:Ar,Animation:$r,AnimationManager:Jr,AnimationTrigger:Tl,Layer:Rr,Diagram:ke,Palette:ct,Overview:pt,Brush:tr,GraphObject:ge,Panel:Sn,RowColumnDefinition:Hs,Shape:Yi,TextBlock:yr,Picture:dl,Part:ci,Adornment:Fo,Node:On,Link:Cn,Placeholder:Ja,Layout:Br,LayoutNetwork:Sr,LayoutVertex:Vs,LayoutEdge:Il,GridLayout:ca,PanelLayout:Us,CircularLayout:Yr,CircularNetwork:kg,CircularVertex:zp,CircularEdge:C0,ForceDirectedLayout:wa,ForceDirectedNetwork:Af,ForceDirectedVertex:Hp,ForceDirectedEdge:Gp,LayeredDigraphLayout:nr,LayeredDigraphNetwork:Ng,LayeredDigraphVertex:gu,LayeredDigraphEdge:Zp,TreeLayout:oo,TreeNetwork:Ff,TreeVertex:bu,TreeEdge:Fg};typeof K0=="object"&&K0.version&&Jn("WARNING: a `go` object on the root object is already defined. "+("Debug"in K0?"debug ":"")+"version: "+K0.version+", replaced with version: "+zy.version),ke.prototype.go=zy,qt.go=zy,typeof gn.exports=="object"&&(gn.exports=typeof bt.g!="undefined"?bt.g.go:self.go)}();var wt=typeof bt.g!="undefined"?bt.g.go:self.go;const te=typeof bt.g!="undefined"?bt.g.go:self.go,de=te.Group,Re=te.EnumValue,ne=te.List,ae=te.Set,Tt=te.Map,be=te.Point,ye=te.Size,Jt=te.Rect,Be=te.Margin,pe=te.Spot,je=te.Geometry,Nt=te.PathFigure,et=te.PathSegment,nt=te.InputEvent,ht=te.DiagramEvent,lt=te.ChangedEvent,gt=te.Model,vt=te.GraphLinksModel,Pt=te.TreeModel,At=te.Binding,Bt=te.Transaction,jt=te.UndoManager,_t=te.CommandHandler,se=te.Tool,Vt=te.DraggingTool,he=te.DraggingInfo,Zt=te.LinkingBaseTool,Oe=te.LinkingTool,me=te.RelinkingTool,Ve=te.LinkReshapingTool,Xe=te.ResizingTool,Je=te.RotatingTool,wn=te.ClickSelectingTool,Mn=te.ActionTool,we=te.ClickCreatingTool,Yt=te.HTMLInfo,_e=te.ContextMenuTool,Zn=te.DragSelectingTool,Dn=te.PanningTool,Ne=te.TextEditingTool,pn=te.ToolManager,Tn=te.Animation,Yn=te.AnimationManager,mn=te.AnimationTrigger,ui=te.Layer,Ce=te.Diagram,$n=te.Palette,Pi=te.Overview,Ot=te.Brush,Lt=te.GraphObject,St=te.Panel,It=te.RowColumnDefinition,Kt=te.Shape,xt=te.TextBlock,Me=te.TextBlockMetrics,De=te.Picture,le=te.Part,ee=te.Adornment,Se=te.Node,xe=te.Link,ue=te.Placeholder,Te=te.Layout,vn=te.LayoutNetwork,fn=te.LayoutVertex,en=te.LayoutEdge,xn=te.GridLayout,ln=te.PanelLayout,tn=te.CircularLayout,ii=te.CircularNetwork,ri=te.CircularVertex,Un=te.CircularEdge,si=te.ForceDirectedLayout,mi=te.ForceDirectedNetwork,Hi=te.ForceDirectedVertex,Xi=te.ForceDirectedEdge,Lo=te.LayeredDigraphLayout,Oo=te.LayeredDigraphNetwork,No=te.LayeredDigraphVertex,Io=te.LayeredDigraphEdge,_o=te.TreeLayout,qo=te.TreeNetwork,Ni=te.TreeVertex,$o=te.TreeEdge,Ro=te.version},2859:function(gn,Ln,bt){"use strict";bt.d(Ln,{hP:function(){return Pi}});var wt=function(Ot,Lt){return(wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,It){St.__proto__=It}||function(St,It){for(var Kt in It)Object.prototype.hasOwnProperty.call(It,Kt)&&(St[Kt]=It[Kt])})(Ot,Lt)};function te(Ot,Lt){function St(){this.constructor=Ot}wt(Ot,Lt),Ot.prototype=Lt===null?Object.create(Lt):(St.prototype=Lt.prototype,new St)}function de(Ot,Lt,St,It){return new(St||(St=Promise))(function(Kt,xt){function Me(ee){try{le(It.next(ee))}catch(Se){xt(Se)}}function De(ee){try{le(It.throw(ee))}catch(Se){xt(Se)}}function le(ee){var Se;ee.done?Kt(ee.value):(Se=ee.value,Se instanceof St?Se:new St(function(xe){xe(Se)})).then(Me,De)}le((It=It.apply(Ot,Lt||[])).next())})}function Re(Ot,Lt){var St,It,Kt,xt,Me={label:0,sent:function(){if(1&Kt[0])throw Kt[1];return Kt[1]},trys:[],ops:[]};return xt={next:De(0),throw:De(1),return:De(2)},typeof Symbol=="function"&&(xt[Symbol.iterator]=function(){return this}),xt;function De(le){return function(ee){return function(Se){if(St)throw new TypeError("Generator is already executing.");for(;Me;)try{if(St=1,It&&(Kt=2&Se[0]?It.return:Se[0]?It.throw||((Kt=It.return)&&Kt.call(It),0):It.next)&&!(Kt=Kt.call(It,Se[1])).done)return Kt;switch(It=0,Kt&&(Se=[2&Se[0],Kt.value]),Se[0]){case 0:case 1:Kt=Se;break;case 4:return Me.label++,{value:Se[1],done:!1};case 5:Me.label++,It=Se[1],Se=[0];continue;case 7:Se=Me.ops.pop(),Me.trys.pop();continue;default:if(Kt=Me.trys,!((Kt=Kt.length>0&&Kt[Kt.length-1])||Se[0]!==6&&Se[0]!==2)){Me=0;continue}if(Se[0]===3&&(!Kt||Se[1]>Kt[0]&&Se[1]<Kt[3])){Me.label=Se[1];break}if(Se[0]===6&&Me.label<Kt[1]){Me.label=Kt[1],Kt=Se;break}if(Kt&&Me.label<Kt[2]){Me.label=Kt[2],Me.ops.push(Se);break}Kt[2]&&Me.ops.pop(),Me.trys.pop();continue}Se=Lt.call(Ot,Me)}catch(xe){Se=[6,xe],It=0}finally{St=Kt=0}if(5&Se[0])throw Se[1];return{value:Se[0]?Se[1]:void 0,done:!0}}([le,ee])}}}function ne(){for(var Ot=0,Lt=0,St=arguments.length;Lt<St;Lt++)Ot+=arguments[Lt].length;var It=Array(Ot),Kt=0;for(Lt=0;Lt<St;Lt++)for(var xt=arguments[Lt],Me=0,De=xt.length;Me<De;Me++,Kt++)It[Kt]=xt[Me];return It}var ae=function(){function Ot(){}return Ot.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ot.setAttributes=function(Lt,St){for(var It=0,Kt=St;It<Kt.length;It++){var xt=Kt[It],Me=xt[0],De=xt[1];Lt.setAttribute(Me,De)}},Ot.createRect=function(Lt,St,It){var Kt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Kt.setAttribute("width",Lt.toString()),Kt.setAttribute("height",St.toString()),It&&Ot.setAttributes(Kt,It),Kt},Ot.createLine=function(Lt,St,It,Kt,xt){var Me=document.createElementNS("http://www.w3.org/2000/svg","line");return Me.setAttribute("x1",Lt.toString()),Me.setAttribute("y1",St.toString()),Me.setAttribute("x2",It.toString()),Me.setAttribute("y2",Kt.toString()),xt&&Ot.setAttributes(Me,xt),Me},Ot.createPolygon=function(Lt,St){var It=document.createElementNS("http://www.w3.org/2000/svg","polygon");return It.setAttribute("points",Lt),St&&Ot.setAttributes(It,St),It},Ot.createCircle=function(Lt,St){var It=document.createElementNS("http://www.w3.org/2000/svg","circle");return It.setAttribute("cx",(Lt/2).toString()),It.setAttribute("cy",(Lt/2).toString()),It.setAttribute("r",Lt.toString()),St&&Ot.setAttributes(It,St),It},Ot.createEllipse=function(Lt,St,It){var Kt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Kt.setAttribute("cx",(Lt/2).toString()),Kt.setAttribute("cy",(St/2).toString()),Kt.setAttribute("rx",(Lt/2).toString()),Kt.setAttribute("ry",(St/2).toString()),It&&Ot.setAttributes(Kt,It),Kt},Ot.createGroup=function(Lt){var St=document.createElementNS("http://www.w3.org/2000/svg","g");return Lt&&Ot.setAttributes(St,Lt),St},Ot.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ot.createMarker=function(Lt,St,It,Kt,xt,Me,De){var le=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ot.setAttributes(le,[["id",Lt],["orient",St],["markerWidth",It.toString()],["markerHeight",Kt.toString()],["refX",xt.toString()],["refY",Me.toString()]]),le.appendChild(De),le},Ot.createText=function(Lt){var St=document.createElementNS("http://www.w3.org/2000/svg","text");return St.setAttribute("x","0"),St.setAttribute("y","0"),Lt&&Ot.setAttributes(St,Lt),St},Ot.createTSpan=function(Lt,St){var It=document.createElementNS("http://www.w3.org/2000/svg","tspan");return It.textContent=Lt,St&&Ot.setAttributes(It,St),It},Ot.createImage=function(Lt){var St=document.createElementNS("http://www.w3.org/2000/svg","image");return Lt&&Ot.setAttributes(St,Lt),St},Ot.createPoint=function(Lt,St){var It=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return It.x=Lt,It.y=St,It},Ot.createPath=function(Lt,St){var It=document.createElementNS("http://www.w3.org/2000/svg","path");return It.setAttribute("d",Lt),St&&Ot.setAttributes(It,St),It},Ot}(),Tt=function(){function Ot(){}return Ot.addKey=function(Lt){Ot.key=Lt},Object.defineProperty(Ot,"isLicensed",{get:function(){return!!Ot.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ot.key)},enumerable:!1,configurable:!0}),Ot}(),be=function(){function Ot(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ot.prototype.rasterize=function(Lt,St,It){var Kt=this;return new Promise(function(xt){var Me=It!==void 0?It:document.createElement("canvas");Lt===null&&(Kt.markersOnly=!0,Kt.naturalSize=!1);var De=document.createElementNS("http://www.w3.org/2000/svg","svg");De.setAttribute("xmlns","http://www.w3.org/2000/svg"),De.setAttribute("width",St.width.baseVal.valueAsString),De.setAttribute("height",St.height.baseVal.valueAsString),De.setAttribute("viewBox","0 0 "+St.viewBox.baseVal.width.toString()+" "+St.viewBox.baseVal.height.toString()),De.innerHTML=St.innerHTML,Kt.naturalSize===!0?(De.width.baseVal.value=Lt.naturalWidth,De.height.baseVal.value=Lt.naturalHeight):Kt.width!==void 0&&Kt.height!==void 0&&(De.width.baseVal.value=Kt.width,De.height.baseVal.value=Kt.height),Me.width=De.width.baseVal.value,Me.height=De.height.baseVal.value;var le=De.outerHTML,ee=Me.getContext("2d");Kt.markersOnly!==!0&&ee.drawImage(Lt,0,0,Me.width,Me.height);var Se=window.URL,xe=new Image(Me.width,Me.height);xe.setAttribute("crossOrigin","anonymous");var ue=new Blob([le],{type:"image/svg+xml"}),Te=Se.createObjectURL(ue);xe.onload=function(){ee.drawImage(xe,0,0),Se.revokeObjectURL(Te);var vn=Me.toDataURL(Kt.imageType,Kt.imageQuality);xt(vn)},xe.src=Te})},Ot}(),ye=function(){},Jt=function(){function Ot(Lt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Lt+"_"}return Object.defineProperty(Ot.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ot.prototype.addClass=function(Lt){return this.styleSheet===void 0&&this.addStyleSheet(),Lt.name=""+this.classNamePrefix+Lt.localName,this.classes.push(Lt),this.styleSheet.sheet.insertRule("."+Lt.name+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length),Lt},Ot.prototype.addRule=function(Lt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Lt),this.styleSheet.sheet.insertRule(Lt.selector+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length)},Ot.prototype.addStyleSheet=function(){var Lt;this.styleSheet=document.createElement("style"),((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt:document.head).appendChild(this.styleSheet),this.addRule(new Be("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Be("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Be("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new pe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new pe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Ot.prototype.removeStyleSheet=function(){var Lt;this.styleSheet&&(((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ot}(),Be=function(Ot,Lt){this.selector=Ot,this.style=Lt},pe=function(Ot,Lt){this.localName=Ot,this.style=Lt},je=function(){function Ot(Lt,St,It,Kt,xt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Lt,this.displayMode=St,this.markerItems=It,this.uiStyleSettings=Kt,this.styles=xt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ot.prototype.show=function(Lt){var St=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var It=document.createElement("div");It.className=this.toolbarBlockStyleClass.name,It.style.whiteSpace="nowrap",this.uiContainer.appendChild(It),this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(It,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(xt){var Me=document.createElement("div");Me.className=""+St.toolbarButtonStyleClass.name,Me.setAttribute("data-type-name",xt.typeName),Me.innerHTML=xt.icon,Me.addEventListener("click",function(){St.markerToolbarButtonClicked(Me,xt)}),St.buttons.push(Me),St.markerButtons.push(Me)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Kt=document.createElement("div");Kt.className=this.toolbarBlockStyleClass.name,Kt.style.whiteSpace="nowrap",Kt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Kt),this.addActionButton(Kt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Kt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ot.prototype.addButtonClickListener=function(Lt){this.buttonClickListeners.push(Lt)},Ot.prototype.removeButtonClickListener=function(Lt){this.buttonClickListeners.indexOf(Lt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Lt),1)},Ot.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ot.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 St=0;St<this.markerButtons.length;St++)St<Lt||St===Lt&&this.markerButtons.length-1===Lt?this.markerButtonBlock.appendChild(this.markerButtons[St]):(St===Lt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[St]))}},Ot.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Ot.prototype.resetButtonStyles=function(){var Lt=this;this.buttons.forEach(function(St){St.className=St.className.replace(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name,"").trim(),St.className=St.className.replace(Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Lt.toolbarActiveButtonStyleColorsClass.name,"").trim(),St.className+=" "+(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name)})},Ot.prototype.addActionButton=function(Lt,St,It){var Kt=this,xt=document.createElement("div");switch(xt.className=""+this.toolbarButtonStyleClass.name,xt.innerHTML=St,xt.setAttribute("data-action",It),xt.addEventListener("click",function(){Kt.actionToolbarButtonClicked(xt,It)}),It){case"select":xt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":xt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":xt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":xt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":xt.style.fill=this.uiStyleSettings.closeButtonColor}Lt.appendChild(xt),this.buttons.push(xt)},Ot.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new pe("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new pe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new pe("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new pe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Lt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
|
padding: `+Lt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Be("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Be("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Ot.prototype.markerToolbarButtonClicked=function(Lt,St){this.setActiveButton(Lt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(It){return It("marker",St)}),this.markerButtonOverflowBlock.style.display="none"},Ot.prototype.actionToolbarButtonClicked=function(Lt,St){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(It){return It("action",St)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ot.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)},Ot.prototype.setActiveMarkerButton=function(Lt){var St=this.markerButtons.find(function(It){return It.getAttribute("data-type-name")===Lt});St&&this.setActiveButton(St)},Ot.prototype.setCurrentMarker=function(Lt){var St=this;this.currentMarker=Lt,this.buttons.filter(function(It){return/delete|notes/.test(It.getAttribute("data-action"))}).forEach(function(It){St.currentMarker===void 0?(It.style.fillOpacity="0.4",It.style.pointerEvents="none"):(It.style.fillOpacity="1",It.style.pointerEvents="all")})},Ot}(),Nt=function(){function Ot(Lt,St,It,Kt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Lt,this.displayMode=St,this.uiStyleSettings=It,this.styles=Kt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ot.prototype.addStyles=function(){var Lt;this.toolboxStyleClass=this.styles.addClass(new pe("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 pe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var St=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new pe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new pe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new pe("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 pe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Lt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Lt!==void 0?Lt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new pe("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*St)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*St)+`px;
|
|
|
padding: `+St+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Be("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Be("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Ot.prototype.show=function(Lt){var St;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((St=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&St!==void 0?St:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ot.prototype.setPanelButtons=function(Lt){var St,It,Kt=this;this.panels=Lt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((St=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&St!==void 0?St:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((It=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&It!==void 0?It:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(xt){var Me;xt.uiStyleSettings=Kt.uiStyleSettings;var De=document.createElement("div");De.className=Kt.toolboxButtonStyleClass.name+" "+((Me=Kt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Me!==void 0?Me:Kt.toolboxButtonStyleColorsClass.name),De.innerHTML=xt.icon,De.title=xt.title,De.addEventListener("click",function(){Kt.panelButtonClick(xt)}),Kt.panelButtons.push(De),Kt.buttonRow.appendChild(De)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ot.prototype.panelButtonClick=function(Lt){var St=this,It=-1;if(Lt!==this.activePanel){It=this.panels.indexOf(Lt),this.panelRow.innerHTML="";var Kt=Lt.getUi();Kt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Kt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Lt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){St.displayMode==="inline"?St.panelRow.style.display="none":St.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(xt,Me){var De,le;xt.className=St.toolboxButtonStyleClass.name+" "+(Me===It?""+((De=St.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&De!==void 0?De:St.toolboxActiveButtonStyleColorsClass.name):""+((le=St.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&le!==void 0?le:St.toolboxButtonStyleColorsClass.name))})},Ot}(),et=function(Ot,Lt){this.title=Ot,this.icon=Lt},nt=function(Ot){function Lt(St,It,Kt,xt){var Me=Ot.call(this,St,xt||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Me.colors=[],Me.addTransparent=!1,Me.colorBoxes=[],Me.colors=It,Me.currentColor=Kt,Me.setCurrentColor=Me.setCurrentColor.bind(Me),Me.getColorBox=Me.getColorBox.bind(Me),Me}return te(Lt,Ot),Lt.prototype.getUi=function(){var St=this,It=document.createElement("div");return It.style.overflow="hidden",It.style.whiteSpace="nowrap",this.colors.forEach(function(Kt){var xt=St.getColorBox(Kt);It.appendChild(xt),St.colorBoxes.push(xt)}),It},Lt.prototype.getColorBox=function(St){var It=this,Kt=this.uiStyleSettings.toolbarHeight/4,xt=this.uiStyleSettings.toolbarHeight-Kt,Me=document.createElement("div");Me.style.display="inline-block",Me.style.boxSizing="content-box",Me.style.width=xt-2+"px",Me.style.height=xt-2+"px",Me.style.padding="1px",Me.style.marginRight="2px",Me.style.marginBottom="2px",Me.style.borderWidth="2px",Me.style.borderStyle="solid",Me.style.borderRadius=(xt+2)/2+"px",Me.style.borderColor=St===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Me.addEventListener("click",function(){It.setCurrentColor(St,Me)});var De=document.createElement("div");return De.style.display="inline-block",De.style.width=xt-2+"px",De.style.height=xt-2+"px",De.style.backgroundColor=St,De.style.borderRadius=xt/2+"px",St==="transparent"&&(De.style.fill=this.uiStyleSettings.toolboxAccentColor,De.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Me.appendChild(De),Me},Lt.prototype.setCurrentColor=function(St,It){var Kt=this;this.currentColor=St,this.colorBoxes.forEach(function(xt){xt.style.borderColor=xt===It?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(St)},Lt}(et),ht=function(){function Ot(Lt,St,It){this._state="new",this._isSelected=!1,this._container=Lt,this._overlayContainer=St,this.globalSettings=It,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ot.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ot.prototype.ownsTarget=function(Lt){return!1},Object.defineProperty(Ot.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ot.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ot.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ot.prototype.pointerDown=function(Lt,St){},Ot.prototype.dblClick=function(Lt,St){},Ot.prototype.manipulate=function(Lt){},Ot.prototype.pointerUp=function(Lt){this.stateChanged()},Ot.prototype.dispose=function(){},Ot.prototype.addMarkerVisualToContainer=function(Lt){this.container.childNodes.length>0?this.container.insertBefore(Lt,this.container.childNodes[0]):this.container.appendChild(Lt)},Ot.prototype.getState=function(){return{typeName:Ot.typeName,state:this.state,notes:this.notes}},Ot.prototype.restoreState=function(Lt){this._state=Lt.state,this.notes=Lt.notes},Ot.prototype.scale=function(Lt,St){},Ot.prototype.colorChanged=function(Lt){this.onColorChanged&&this.onColorChanged(Lt),this.stateChanged()},Ot.prototype.fillColorChanged=function(Lt){this.onFillColorChanged&&this.onFillColorChanged(Lt),this.stateChanged()},Ot.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)}},Ot.typeName="MarkerBase",Ot}(),lt=function(){function Ot(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ot.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},Ot}(),gt=function(){function Ot(){this.GRIP_SIZE=10,this.visual=ae.createGroup(),this.visual.appendChild(ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ot.prototype.ownsTarget=function(Lt){return Lt===this.visual||Lt===this.visual.childNodes[0]||Lt===this.visual.childNodes[1]},Ot}(),vt=function(){function Ot(){}return Ot.toITransformMatrix=function(Lt){return{a:Lt.a,b:Lt.b,c:Lt.c,d:Lt.d,e:Lt.e,f:Lt.f}},Ot.toSVGMatrix=function(Lt,St){return Lt.a=St.a,Lt.b=St.b,Lt.c=St.c,Lt.d=St.d,Lt.e=St.e,Lt.f=St.f,Lt},Ot}(),Pt=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.left=0,xt.top=0,xt.width=0,xt.height=0,xt.defaultSize={x:50,y:20},xt.offsetX=0,xt.offsetY=0,xt.rotationAngle=0,xt.CB_DISTANCE=10,xt._suppressMarkerCreateEvent=!1,xt.container.transform.baseVal.appendItem(ae.createTransform()),xt.setupControlBox(),xt}return te(Lt,Ot),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(St){this._visual=St;var It=ae.createTransform();this._visual.transform.baseVal.appendItem(It)},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(St){return!!Ot.prototype.ownsTarget.call(this,St)||!!(this.controlGrips.findGripByVisual(St)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(St))},Lt.prototype.pointerDown=function(St,It){Ot.prototype.pointerDown.call(this,St,It),this.state==="new"&&(this.left=St.x,this.top=St.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Kt=this.unrotatePoint(St);if(this.manipulationStartX=Kt.x,this.manipulationStartY=Kt.y,this.offsetX=Kt.x-this.left,this.offsetY=Kt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(It),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(It)){this.activeGrip=this.rotatorGrip;var xt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=xt.x-this.width/2,this.top=xt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Me=this.container.transform.baseVal.getItem(0);Me.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Me,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Lt.prototype.pointerUp=function(St){var It=this.state;Ot.prototype.pointerUp.call(this,St),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(St),this._state="select",It==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Lt.prototype.moveVisual=function(St){this.visual.style.transform="translate("+St.x+"px, "+St.y+"px)"},Lt.prototype.manipulate=function(St){var It=this.unrotatePoint(St);this.state==="creating"?this.resize(St):this.state==="move"?(this.left=this.manipulationStartLeft+(It.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(It.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(It):this.state==="rotate"&&this.rotate(St)},Lt.prototype.resize=function(St){var It=this.manipulationStartLeft,Kt=this.manipulationStartWidth,xt=this.manipulationStartTop,Me=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:It=this.manipulationStartLeft+St.x-this.manipulationStartX,Kt=this.manipulationStartWidth+this.manipulationStartLeft-It;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Kt=this.manipulationStartWidth+St.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:xt=this.manipulationStartTop+St.y-this.manipulationStartY,Me=this.manipulationStartHeight+this.manipulationStartTop-xt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Me=this.manipulationStartHeight+St.y-this.manipulationStartY}Kt>=0?(this.left=It,this.width=Kt):(this.left=It+Kt,this.width=-Kt),Me>=0?(this.top=xt,this.height=Me):(this.top=xt+Me,this.height=-Me),this.setSize()},Lt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Lt.prototype.rotate=function(St){if(Math.abs(St.x-this.centerX)>.1){var It=Math.sign(St.x-this.centerX);this.rotationAngle=180*Math.atan((St.y-this.centerY)/(St.x-this.centerX))/Math.PI+90*It,this.applyRotation()}},Lt.prototype.applyRotation=function(){var St=this.container.transform.baseVal.getItem(0);St.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(St,0)},Lt.prototype.rotatePoint=function(St){if(this.rotationAngle===0)return St;var It=this.container.getCTM(),Kt=ae.createPoint(St.x,St.y);return{x:(Kt=Kt.matrixTransform(It)).x,y:Kt.y}},Lt.prototype.unrotatePoint=function(St){if(this.rotationAngle===0)return St;var It=this.container.getCTM();It=It.inverse();var Kt=ae.createPoint(St.x,St.y);return{x:(Kt=Kt.matrixTransform(It)).x,y:Kt.y}},Lt.prototype.select=function(){Ot.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ot.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=ae.createGroup();var St=ae.createTransform();St.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(St),this.container.appendChild(this.controlBox),this.controlRect=ae.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=ae.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 St=this.controlBox.transform.baseVal.getItem(0);St.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(St,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 St=new gt;return St.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(St.visual),St},Lt.prototype.positionGrips=function(){var St=this.controlGrips.topLeft.GRIP_SIZE,It=-St/2,Kt=It,xt=(this.width+this.CB_DISTANCE)/2-St/2,Me=(this.height+this.CB_DISTANCE)/2-St/2,De=this.height+this.CB_DISTANCE-St/2,le=this.width+this.CB_DISTANCE-St/2;this.positionGrip(this.controlGrips.topLeft.visual,It,Kt),this.positionGrip(this.controlGrips.topCenter.visual,xt,Kt),this.positionGrip(this.controlGrips.topRight.visual,le,Kt),this.positionGrip(this.controlGrips.centerLeft.visual,It,Me),this.positionGrip(this.controlGrips.centerRight.visual,le,Me),this.positionGrip(this.controlGrips.bottomLeft.visual,It,De),this.positionGrip(this.controlGrips.bottomCenter.visual,xt,De),this.positionGrip(this.controlGrips.bottomRight.visual,le,De),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,xt,Kt-3*this.CB_DISTANCE)},Lt.prototype.positionGrip=function(St,It,Kt){var xt=St.transform.baseVal.getItem(0);xt.setTranslate(It,Kt),St.transform.baseVal.replaceItem(xt,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)},Ot.prototype.getState.call(this))},Lt.prototype.restoreState=function(St){Ot.prototype.restoreState.call(this,St);var It=St;this.left=It.left,this.top=It.top,this.width=It.width,this.height=It.height,this.rotationAngle=It.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,It.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,It.containerTransformMatrix))},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It);var Kt=this.rotatePoint({x:this.left,y:this.top}),xt=this.unrotatePoint({x:Kt.x*St,y:Kt.y*It});this.left=xt.x,this.top=xt.y,this.width=this.width*St,this.height=this.height*It,this.adjustControlBox()},Lt}(ht),At=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.fillColor="transparent",xt.strokeColor="transparent",xt.strokeWidth=0,xt.strokeDasharray="",xt.opacity=1,xt.setStrokeColor=xt.setStrokeColor.bind(xt),xt.setFillColor=xt.setFillColor.bind(xt),xt.setStrokeWidth=xt.setStrokeWidth.bind(xt),xt.setStrokeDasharray=xt.setStrokeDasharray.bind(xt),xt.createVisual=xt.createVisual.bind(xt),xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.visual)},Lt.prototype.createVisual=function(){this.visual=ae.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(St,It){Ot.prototype.pointerDown.call(this,St,It),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Lt.prototype.manipulate=function(St){Ot.prototype.manipulate.call(this,St)},Lt.prototype.resize=function(St){Ot.prototype.resize.call(this,St),this.setSize()},Lt.prototype.setSize=function(){Ot.prototype.setSize.call(this),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(St){Ot.prototype.pointerUp.call(this,St),this.setSize()},Lt.prototype.setStrokeColor=function(St){this.strokeColor=St,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(St),this.stateChanged()},Lt.prototype.setFillColor=function(St){this.fillColor=St,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Lt.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.visual&&ae.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},Ot.prototype.getState.call(this))},Lt.prototype.restoreState=function(St){var It=St;this.fillColor=It.fillColor,this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.opacity=It.opacity,this.createVisual(),Ot.prototype.restoreState.call(this,St),this.setSize()},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It),this.setSize()},Lt.title="Rectangle marker",Lt}(Pt),Bt=function(Ot){function Lt(St,It,Kt,xt){var Me=Ot.call(this,St,xt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Me.widths=[],Me.widthBoxes=[],Me.widths=It,Me.currentWidth=Kt,Me.setCurrentWidth=Me.setCurrentWidth.bind(Me),Me}return te(Lt,Ot),Lt.prototype.getUi=function(){var St=this,It=document.createElement("div");return It.style.display="flex",It.style.overflow="hidden",It.style.flexGrow="2",this.widths.forEach(function(Kt){var xt=document.createElement("div");xt.style.display="flex",xt.style.flexGrow="2",xt.style.alignItems="center",xt.style.justifyContent="space-between",xt.style.padding="5px",xt.style.borderWidth="2px",xt.style.borderStyle="solid",xt.style.borderColor=Kt===St.currentWidth?St.uiStyleSettings.toolboxAccentColor:"transparent",xt.addEventListener("click",function(){St.setCurrentWidth(Kt,xt)}),It.appendChild(xt);var Me=document.createElement("div");Me.innerText=Kt.toString(),Me.style.marginRight="5px",xt.appendChild(Me);var De=document.createElement("div");De.style.minHeight="20px",De.style.flexGrow="2",De.style.display="flex",De.style.alignItems="center";var le=document.createElement("hr");le.style.minWidth="20px",le.style.border="0px",le.style.borderTop=Kt+"px solid "+St.uiStyleSettings.toolboxColor,le.style.flexGrow="2",De.appendChild(le),xt.appendChild(De),St.widthBoxes.push(xt)}),It},Lt.prototype.setCurrentWidth=function(St,It){var Kt=this;this.currentWidth=St,this.widthBoxes.forEach(function(xt){xt.style.borderColor=xt===It?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Lt}(et),jt=function(Ot){function Lt(St,It,Kt,xt){var Me=Ot.call(this,St,xt||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Me.styles=[],Me.styleBoxes=[],Me.styles=It,Me.currentStyle=Kt,Me.setCurrentStyle=Me.setCurrentStyle.bind(Me),Me}return te(Lt,Ot),Lt.prototype.getUi=function(){var St=this,It=document.createElement("div");return It.style.display="flex",It.style.overflow="hidden",It.style.flexGrow="2",this.styles.forEach(function(Kt){var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.justifyContent="space-between",xt.style.padding="5px",xt.style.borderWidth="2px",xt.style.borderStyle="solid",xt.style.overflow="hidden",xt.style.maxWidth=100/St.styles.length-5+"%",xt.style.borderColor=Kt===St.currentStyle?St.uiStyleSettings.toolboxAccentColor:"transparent",xt.addEventListener("click",function(){St.setCurrentStyle(Kt,xt)}),It.appendChild(xt);var Me=document.createElement("div");Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.overflow="hidden";var De=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+St.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Kt!==""?'stroke-dasharray="'+Kt+'"':"")+` />
|
|
|
</svg>`;Me.innerHTML=De,xt.appendChild(Me),St.styleBoxes.push(xt)}),It},Lt.prototype.setCurrentStyle=function(St,It){var Kt=this;this.currentStyle=St,this.styleBoxes.forEach(function(xt){xt.style.borderColor=xt===It?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Lt}(et),_t=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.strokeColor=Kt.defaultColor,xt.strokeWidth=Kt.defaultStrokeWidth,xt.strokeDasharray=Kt.defaultStrokeDasharray,xt.strokePanel=new nt("Line color",Kt.defaultColorSet,Kt.defaultColor),xt.strokePanel.onColorChanged=xt.setStrokeColor,xt.strokeWidthPanel=new Bt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),xt.strokeWidthPanel.onWidthChanged=xt.setStrokeWidth,xt.strokeStylePanel=new jt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),xt.strokeStylePanel.onStyleChanged=xt.setStrokeDasharray,xt}return te(Lt,Ot),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var St=Ot.prototype.getState.call(this);return St.typeName=Lt.typeName,St},Lt.typeName="FrameMarker",Lt.title="Frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Lt}(At),se=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"},Vt=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.x1=0,xt.y1=0,xt.x2=0,xt.y2=0,xt.defaultLength=50,xt.manipulationStartX=0,xt.manipulationStartY=0,xt.manipulationStartX1=0,xt.manipulationStartY1=0,xt.manipulationStartX2=0,xt.manipulationStartY2=0,xt.setupControlBox(),xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!!Ot.prototype.ownsTarget.call(this,St)||!(!this.grip1.ownsTarget(St)&&!this.grip2.ownsTarget(St))},Lt.prototype.pointerDown=function(St,It){Ot.prototype.pointerDown.call(this,St,It),this.manipulationStartX=St.x,this.manipulationStartY=St.y,this.state==="new"&&(this.x1=St.x,this.y1=St.y,this.x2=St.x,this.y2=St.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(It)?this.activeGrip=this.grip1:this.grip2.ownsTarget(It)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Lt.prototype.pointerUp=function(St){var It=this.state;Ot.prototype.pointerUp.call(this,St),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(St),this._state="select",It==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Lt.prototype.adjustVisual=function(){},Lt.prototype.manipulate=function(St){this.state==="creating"?this.resize(St):this.state==="move"?(this.x1=this.manipulationStartX1+St.x-this.manipulationStartX,this.y1=this.manipulationStartY1+St.y-this.manipulationStartY,this.x2=this.manipulationStartX2+St.x-this.manipulationStartX,this.y2=this.manipulationStartY2+St.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(St)},Lt.prototype.resize=function(St){switch(this.activeGrip){case this.grip1:this.x1=St.x,this.y1=St.y;break;case this.grip2:case void 0:this.x2=St.x,this.y2=St.y}this.adjustVisual(),this.adjustControlBox()},Lt.prototype.select=function(){Ot.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ot.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=ae.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 St=new gt;return St.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(St.visual),St},Lt.prototype.positionGrips=function(){var St=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-St/2,this.y1-St/2),this.positionGrip(this.grip2.visual,this.x2-St/2,this.y2-St/2)},Lt.prototype.positionGrip=function(St,It,Kt){var xt=St.transform.baseVal.getItem(0);xt.setTranslate(It,Kt),St.transform.baseVal.replaceItem(xt,0)},Lt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ot.prototype.getState.call(this))},Lt.prototype.restoreState=function(St){Ot.prototype.restoreState.call(this,St);var It=St;this.x1=It.x1,this.y1=It.y1,this.x2=It.x2,this.y2=It.y2},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It),this.x1=this.x1*St,this.y1=this.y1*It,this.x2=this.x2*St,this.y2=this.y2*It,this.adjustVisual(),this.adjustControlBox()},Lt}(ht),he=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.strokeColor="transparent",xt.strokeWidth=0,xt.strokeDasharray="",xt.setStrokeColor=xt.setStrokeColor.bind(xt),xt.setStrokeWidth=xt.setStrokeWidth.bind(xt),xt.setStrokeDasharray=xt.setStrokeDasharray.bind(xt),xt.strokeColor=Kt.defaultColor,xt.strokeWidth=Kt.defaultStrokeWidth,xt.strokeDasharray=Kt.defaultStrokeDasharray,xt.strokePanel=new nt("Line color",Kt.defaultColorSet,Kt.defaultColor),xt.strokePanel.onColorChanged=xt.setStrokeColor,xt.strokeWidthPanel=new Bt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),xt.strokeWidthPanel.onWidthChanged=xt.setStrokeWidth,xt.strokeStylePanel=new jt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),xt.strokeStylePanel.onStyleChanged=xt.setStrokeDasharray,xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.selectorLine&&St!==this.visibleLine)},Lt.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.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(St,It){Ot.prototype.pointerDown.call(this,St,It),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()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setStrokeColor=function(St){this.strokeColor=St,this.adjustVisual(),this.colorChanged(St)},Lt.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,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 St=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ot.prototype.getState.call(this));return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){Ot.prototype.restoreState.call(this,St);var It=St;this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.createVisual(),this.adjustVisual()},Lt.typeName="LineMarker",Lt.title="Line marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Lt}(Vt),Zt=function(Ot){function Lt(St,It,Kt,xt){var Me=Ot.call(this,St,xt||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Me.fonts=[],Me.fontBoxes=[],Me.fonts=It,Me.currentFont=Kt,Me.setCurrentFont=Me.setCurrentFont.bind(Me),Me}return te(Lt,Ot),Lt.prototype.getUi=function(){var St=this,It=document.createElement("div");return It.style.overflow="hidden",It.style.flexGrow="2",this.fonts.forEach(function(Kt){var xt=document.createElement("div");xt.style.display="inline-block",xt.style.alignItems="center",xt.style.justifyContent="space-between",xt.style.padding="5px",xt.style.borderWidth="2px",xt.style.borderStyle="solid",xt.style.overflow="hidden",xt.style.maxWidth=100/St.fonts.length-5+"%",xt.style.borderColor=Kt===St.currentFont?St.uiStyleSettings.toolboxAccentColor:"transparent",xt.addEventListener("click",function(){St.setCurrentFont(Kt,xt)}),It.appendChild(xt);var Me=document.createElement("div");Me.style.display="flex",Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.fontFamily=Kt,Me.style.overflow="hidden";var De=document.createElement("div");De.style.whiteSpace="nowrap",De.style.overflow="hidden",De.style.textOverflow="ellipsis",De.innerHTML="The quick brown fox jumps over the lazy dog",Me.appendChild(De),xt.appendChild(Me),St.fontBoxes.push(xt)}),It},Lt.prototype.setCurrentFont=function(St,It){var Kt=this;this.currentFont=St,this.fontBoxes.forEach(function(xt){xt.style.borderColor=xt===It?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Lt}(et),Oe=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.color="transparent",xt.padding=5,xt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",xt.text=xt.DEFAULT_TEXT,xt.isMoved=!1,xt.color=Kt.defaultColor,xt.fontFamily=Kt.defaultFontFamily,xt.defaultSize={x:100,y:30},xt.setColor=xt.setColor.bind(xt),xt.setFont=xt.setFont.bind(xt),xt.renderText=xt.renderText.bind(xt),xt.sizeText=xt.sizeText.bind(xt),xt.textEditDivClicked=xt.textEditDivClicked.bind(xt),xt.showTextEditor=xt.showTextEditor.bind(xt),xt.setSize=xt.setSize.bind(xt),xt.positionTextEditor=xt.positionTextEditor.bind(xt),xt.colorPanel=new nt("Color",Kt.defaultColorSet,Kt.defaultColor),xt.colorPanel.onColorChanged=xt.setColor,xt.fontFamilyPanel=new Zt("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),xt.fontFamilyPanel.onFontChanged=xt.setFont,xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){if(Ot.prototype.ownsTarget.call(this,St)||St===this.visual||St===this.textElement||St===this.bgRectangle)return!0;var It=!1;return this.textElement.childNodes.forEach(function(Kt){Kt===St&&(It=!0)}),It},Lt.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Lt.prototype.pointerDown=function(St,It){Ot.prototype.pointerDown.call(this,St,It),this.isMoved=!1,this.pointerDownPoint=St,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Lt.prototype.renderText=function(){var St=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(It){St.textElement.appendChild(ae.createTSpan(It.trim()===""?" ":It.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Lt.prototype.getTextScale=function(){var St=this.textElement.getBBox(),It=1;if(St.width>0&&St.height>0){var Kt=(1*this.width-this.width*this.padding*2/100)/St.width,xt=(1*this.height-this.height*this.padding*2/100)/St.height;It=Math.min(Kt,xt)}return It},Lt.prototype.getTextPosition=function(St){var It=this.textElement.getBBox(),Kt=0,xt=0;return It.width>0&&It.height>0&&(Kt=(this.width-It.width*St)/2,xt=this.height/2-It.height*St/2),{x:Kt,y:xt}},Lt.prototype.sizeText=function(){var St=this.textElement.getBBox(),It=this.getTextScale(),Kt=this.getTextPosition(It);Kt.y-=St.y*It,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Kt.x+"px, "+Kt.y+"px) scale("+It+", "+It+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Kt.x,Kt.y),this.textElement.transform.baseVal.getItem(1).setScale(It,It))},Lt.prototype.manipulate=function(St){Ot.prototype.manipulate.call(this,St),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(St.x-this.pointerDownPoint.x)>5||Math.abs(St.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(St){Ot.prototype.resize.call(this,St),this.isMoved=!0,this.setSize(),this.sizeText()},Lt.prototype.setSize=function(){Ot.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Lt.prototype.pointerUp=function(St){var It=this.state;It==="creating"&&(this._suppressMarkerCreateEvent=!0),Ot.prototype.pointerUp.call(this,St),this.setSize(),(It==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.showTextEditor=function(){var St=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(It){It.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var It=Number.parseFloat(St.textEditor.style.fontSize);St.textEditor.clientWidth>=Number.parseInt(St.textEditor.style.maxWidth)&&It>.9;)It-=.1,St.textEditor.style.fontSize=Math.max(It,.9)+"em"}),this.textEditor.addEventListener("keyup",function(It){It.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(It){if(It.clipboardData){var Kt=It.clipboardData.getData("text"),xt=window.getSelection();if(!xt.rangeCount)return!1;xt.deleteFromDocument(),xt.getRangeAt(0).insertNode(document.createTextNode(Kt)),It.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){St.textEditDivClicked(St.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 St=this.getTextScale(),It=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Kt=this.textElement.getBBox(),xt={x:Kt.width*St,y:Kt.height*St};It.x-=xt.x/2,It.y-=xt.y/2,this.textEditor.style.top=It.y+"px",this.textEditor.style.left=It.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-It.x+"px",this.textEditor.style.fontSize=Math.max(16*St,12)+"px",this.textElement.style.display="none"}},Lt.prototype.textEditDivClicked=function(St){this.text=St.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Lt.prototype.select=function(){Ot.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Lt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ot.prototype.deselect.call(this)},Lt.prototype.dblClick=function(St,It){Ot.prototype.dblClick.call(this,St,It),this.showTextEditor()},Lt.prototype.setColor=function(St){this.textElement&&ae.setAttributes(this.textElement,[["fill",St]]),this.color=St,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(St)},Lt.prototype.setFont=function(St){this.textElement&&ae.setAttributes(this.textElement,[["font-family",St]]),this.fontFamily=St,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 St=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ot.prototype.getState.call(this));return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){var It=St;this.color=It.color,this.fontFamily=It.fontFamily,this.padding=It.padding,this.text=It.text,this.createVisual(),Ot.prototype.restoreState.call(this,St),this.setSize()},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It),this.setSize(),this.sizeText(),this.positionTextEditor()},Lt.typeName="TextMarker",Lt.title="Text marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',Lt}(Pt),me=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.color="transparent",xt.lineWidth=3,xt.drawing=!1,xt.pixelRatio=1,xt.color=Kt.defaultColor,xt.lineWidth=Kt.defaultStrokeWidth,xt.pixelRatio=Kt.freehandPixelRatio,xt.setColor=xt.setColor.bind(xt),xt.addCanvas=xt.addCanvas.bind(xt),xt.finishCreation=xt.finishCreation.bind(xt),xt.setLineWidth=xt.setLineWidth.bind(xt),xt.colorPanel=new nt("Color",Kt.defaultColorSet,Kt.defaultColor),xt.colorPanel.onColorChanged=xt.setColor,xt.lineWidthPanel=new Bt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),xt.lineWidthPanel.onWidthChanged=xt.setLineWidth,xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.drawingImage)},Lt.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var St=ae.createTransform();this.visual.transform.baseVal.appendItem(St),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(St,It){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(St.x,St.y),this.drawing=!0):Ot.prototype.pointerDown.call(this,St,It)},Lt.prototype.manipulate=function(St){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(St.x,St.y),this.canvasContext.stroke()):Ot.prototype.manipulate.call(this,St)},Lt.prototype.resize=function(St){Ot.prototype.resize.call(this,St),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(St){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ot.prototype.pointerUp.call(this,St)},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(),Ot.prototype.select.call(this)},Lt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ot.prototype.deselect.call(this)},Lt.prototype.finishCreation=function(){for(var St=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),It=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Kt=It[0],xt=It[1],Me=It[2],De=It[3],le=!1,ee=0;ee<this.canvasElement.height;ee++)for(var Se=0;Se<this.canvasElement.width;Se++)St.data[ee*this.canvasElement.width*4+4*Se+3]>0&&(le=!0,ee<xt&&(xt=ee),Se<Kt&&(Kt=Se),ee>De&&(De=ee),Se>Me&&(Me=Se));if(le){this.left=Kt/this.pixelRatio,this.top=xt/this.pixelRatio,this.width=(Me-Kt)/this.pixelRatio,this.height=(De-xt)/this.pixelRatio;var xe=document.createElement("canvas");xe.width=Me-Kt,xe.height=De-xt,xe.getContext("2d").putImageData(this.canvasContext.getImageData(Kt,xt,Me-Kt,De-xt),0,0),this.drawingImgUrl=xe.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Lt.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Lt.prototype.setColor=function(St){this.color=St,this.colorChanged(St)},Lt.prototype.setLineWidth=function(St){this.lineWidth=St},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 St=Object.assign({drawingImgUrl:this.drawingImgUrl},Ot.prototype.getState.call(this));return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){this.createVisual(),Ot.prototype.restoreState.call(this,St),this.drawingImgUrl=St.drawingImgUrl,this.setDrawingImage()},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It),this.setDrawingImage()},Lt.typeName="FreehandMarker",Lt.title="Freehand marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',Lt}(Pt),Ve=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,Kt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return xt.typeBoxes=[],xt.currentType=It,xt.setCurrentType=xt.setCurrentType.bind(xt),xt}return te(Lt,Ot),Lt.prototype.getUi=function(){var St=this,It=document.createElement("div");It.style.display="flex",It.style.overflow="hidden",It.style.flexGrow="2";for(var Kt=function(De){var le="both";switch(De){case 0:le="both";break;case 1:le="start";break;case 2:le="end";break;case 3:le="none"}var ee=document.createElement("div");if(ee.style.display="flex",ee.style.flexGrow="2",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.borderColor=le===xt.currentType?xt.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){St.setCurrentType(le,ee)}),It.appendChild(ee),le==="both"||le==="start"){var Se=document.createElement("div");Se.style.display="flex",Se.style.alignItems="center",Se.style.minHeight="20px",Se.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(xt.uiStyleSettings!==void 0?xt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Se.style.marginLeft="5px",ee.appendChild(Se)}var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.minHeight="20px",xe.style.flexGrow="2";var ue=document.createElement("hr");if(ue.style.minWidth="20px",ue.style.border="0px",ue.style.borderTop="3px solid "+(xt.uiStyleSettings!==void 0?xt.uiStyleSettings.toolboxColor:"#eeeeee"),ue.style.flexGrow="2",xe.appendChild(ue),ee.appendChild(xe),le==="both"||le==="end"){var Te=document.createElement("div");Te.style.display="flex",Te.style.alignItems="center",Te.style.minHeight="20px",Te.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(xt.uiStyleSettings!==void 0?xt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Te.style.marginRight="5px",ee.appendChild(Te)}xt.typeBoxes.push(ee)},xt=this,Me=0;Me<4;Me++)Kt(Me);return It},Lt.prototype.setCurrentType=function(St,It){var Kt=this;this.currentType=St,this.typeBoxes.forEach(function(xt){xt.style.borderColor=xt===It?Kt.uiStyleSettings!==void 0?Kt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Lt}(et),Xe=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.arrowType="end",xt.arrowBaseHeight=10,xt.arrowBaseWidth=10,xt.getArrowPoints=xt.getArrowPoints.bind(xt),xt.setArrowType=xt.setArrowType.bind(xt),xt.arrowTypePanel=new Ve("Arrow type","end"),xt.arrowTypePanel.onArrowTypeChanged=xt.setArrowType,xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.arrow1&&St!==this.arrow2)},Lt.prototype.getArrowPoints=function(St,It){var Kt=this.arrowBaseWidth+2*this.strokeWidth,xt=this.arrowBaseHeight+2*this.strokeWidth;return St-Kt/2+","+(It+xt/2)+" "+St+","+(It-xt/2)+" "+(St+Kt/2)+","+(It+xt/2)},Lt.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},Lt.prototype.pointerDown=function(St,It){Ot.prototype.pointerDown.call(this,St,It),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Ot.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",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var St=0;Math.abs(this.x1-this.x2)>.1&&(St=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var It=this.arrow1.transform.baseVal.getItem(0);It.setRotate(St,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(It,0);var Kt=this.arrow2.transform.baseVal.getItem(0);Kt.setRotate(St+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Kt,0)}},Lt.prototype.setArrowType=function(St){this.arrowType=St,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 St=Object.assign({arrowType:this.arrowType},Ot.prototype.getState.call(this));return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){Ot.prototype.restoreState.call(this,St);var It=St;this.arrowType=It.arrowType,this.createTips(),this.adjustVisual()},Lt.typeName="ArrowMarker",Lt.title="Arrow marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Lt}(he),Je=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.fillColor=Kt.defaultFillColor,xt.strokeWidth=0,xt.fillPanel=new nt("Color",Kt.defaultColorSet,Kt.defaultFillColor),xt.fillPanel.onColorChanged=xt.setFillColor,xt}return te(Lt,Ot),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var St=Ot.prototype.getState.call(this);return St.typeName=Lt.typeName,St},Lt.typeName="CoverMarker",Lt.title="Cover marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Lt}(At),wn=function(Ot){function Lt(St,It,Kt,xt){var Me=Ot.call(this,St,xt||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Me.opacities=[],Me.opacityBoxes=[],Me.opacities=It,Me.currentOpacity=Kt,Me.setCurrentOpacity=Me.setCurrentOpacity.bind(Me),Me}return te(Lt,Ot),Lt.prototype.getUi=function(){var St=this,It=document.createElement("div");return It.style.display="flex",It.style.overflow="hidden",It.style.flexGrow="2",It.style.justifyContent="space-between",this.opacities.forEach(function(Kt){var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.justifyContent="center",xt.style.padding="5px",xt.style.borderWidth="2px",xt.style.borderStyle="solid",xt.style.borderColor=Kt===St.currentOpacity?St.uiStyleSettings.toolboxAccentColor:"transparent",xt.addEventListener("click",function(){St.setCurrentOpacity(Kt,xt)}),It.appendChild(xt);var Me=document.createElement("div");Me.innerText=100*Kt+"%",xt.appendChild(Me),St.opacityBoxes.push(xt)}),It},Lt.prototype.setCurrentOpacity=function(St,It){var Kt=this;this.currentOpacity=St,this.opacityBoxes.forEach(function(xt){xt.style.borderColor=xt===It?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Lt}(et),Mn=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.setOpacity=xt.setOpacity.bind(xt),xt.fillColor=Kt.defaultHighlightColor,xt.strokeWidth=0,xt.opacity=Kt.defaultHighlightOpacity,xt.fillPanel=new nt("Color",Kt.defaultColorSet,xt.fillColor),xt.fillPanel.onColorChanged=xt.setFillColor,xt.opacityPanel=new wn("Opacity",Kt.defaultOpacitySteps,xt.opacity),xt.opacityPanel.onOpacityChanged=xt.setOpacity,xt}return te(Lt,Ot),Lt.prototype.setOpacity=function(St){this.opacity=St,this.visual&&ae.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 St=Ot.prototype.getState.call(this);return St.typeName=Lt.typeName,St},Lt.typeName="HighlightMarker",Lt.title="Highlight marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',Lt}(Je),we='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Yt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',_e=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.bgColor="transparent",xt.tipPosition={x:0,y:0},xt.tipBase1Position={x:0,y:0},xt.tipBase2Position={x:0,y:0},xt.tipMoving=!1,xt.color=Kt.defaultStrokeColor,xt.bgColor=Kt.defaultFillColor,xt.fontFamily=Kt.defaultFontFamily,xt.defaultSize={x:100,y:30},xt.setBgColor=xt.setBgColor.bind(xt),xt.getTipPoints=xt.getTipPoints.bind(xt),xt.positionTip=xt.positionTip.bind(xt),xt.setTipPoints=xt.setTipPoints.bind(xt),xt.colorPanel=new nt("Text color",Kt.defaultColorSet,xt.color,we),xt.colorPanel.onColorChanged=xt.setColor,xt.bgColorPanel=new nt("Fill color",Kt.defaultColorSet,xt.bgColor,Yt),xt.bgColorPanel.onColorChanged=xt.setBgColor,xt.fontFamilyPanel=new Zt("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),xt.fontFamilyPanel.onFontChanged=xt.setFont,xt.tipGrip=new gt,xt.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),xt.controlBox.appendChild(xt.tipGrip.visual),xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return Ot.prototype.ownsTarget.call(this,St)||this.tipGrip.ownsTarget(St)||this.tip===St},Lt.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Lt.prototype.pointerDown=function(St,It){this.state==="new"&&Ot.prototype.pointerDown.call(this,St,It),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(It)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ot.prototype.pointerDown.call(this,St,It)},Lt.prototype.pointerUp=function(St){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ot.prototype.pointerUp.call(this,St);else{var It=this.state==="creating";Ot.prototype.pointerUp.call(this,St),this.setTipPoints(It),this.positionTip()}},Lt.prototype.manipulate=function(St){if(this.tipMoving){var It=this.unrotatePoint(St);this.tipPosition={x:It.x-this.manipulationStartLeft,y:It.y-this.manipulationStartTop},this.positionTip()}else Ot.prototype.manipulate.call(this,St)},Lt.prototype.setBgColor=function(St){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",St]]),ae.setAttributes(this.tip,[["fill",St]])),this.bgColor=St,this.fillColorChanged(St)},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(St){St===void 0&&(St=!1);var It=Math.min(this.height/2,15),Kt=this.height/5;St&&(this.tipPosition={x:It+Kt/2,y:this.height+20});var xt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?xt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Kt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:It,y:0},this.tipBase2Position={x:It+Kt,y:0}):(this.tipBase1Position={x:0,y:It},this.tipBase2Position={x:0,y:It+Kt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?xt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Kt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-It-Kt,y:0},this.tipBase2Position={x:this.width-It,y:0}):(this.tipBase1Position={x:this.width,y:It},this.tipBase2Position={x:this.width,y:It+Kt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?xt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Kt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-It-Kt,y:this.height},this.tipBase2Position={x:this.width-It,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-It-Kt},this.tipBase2Position={x:this.width,y:this.height-It}):xt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Kt=this.width/5,It=Math.min(this.width/2,15),this.tipBase1Position={x:It,y:this.height},this.tipBase2Position={x:It+Kt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-It},this.tipBase2Position={x:0,y:this.height-It-Kt})},Lt.prototype.resize=function(St){Ot.prototype.resize.call(this,St),this.positionTip()},Lt.prototype.positionTip=function(){ae.setAttributes(this.tip,[["points",this.getTipPoints()]]);var St=this.tipGrip.visual.transform.baseVal.getItem(0);St.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(St,0)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.select=function(){this.positionTip(),Ot.prototype.select.call(this)},Lt.prototype.getState=function(){var St=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ot.prototype.getState.call(this));return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){var It=St;this.bgColor=It.bgColor,this.tipPosition=It.tipPosition,Ot.prototype.restoreState.call(this,St),this.createTip(),this.setTipPoints()},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It),this.tipPosition={x:this.tipPosition.x*St,y:this.tipPosition.y*It},this.positionTip()},Lt.typeName="CalloutMarker",Lt.title="Callout marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',Lt}(Oe),Zn=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.fillColor="transparent",xt.strokeColor="transparent",xt.strokeWidth=0,xt.strokeDasharray="",xt.opacity=1,xt.strokeColor=Kt.defaultColor,xt.strokeWidth=Kt.defaultStrokeWidth,xt.strokeDasharray=Kt.defaultStrokeDasharray,xt.fillColor=Kt.defaultFillColor,xt.setStrokeColor=xt.setStrokeColor.bind(xt),xt.setFillColor=xt.setFillColor.bind(xt),xt.setStrokeWidth=xt.setStrokeWidth.bind(xt),xt.setStrokeDasharray=xt.setStrokeDasharray.bind(xt),xt.setOpacity=xt.setOpacity.bind(xt),xt.createVisual=xt.createVisual.bind(xt),xt.strokePanel=new nt("Line color",ne(Kt.defaultColorSet,["transparent"]),Kt.defaultColor),xt.strokePanel.onColorChanged=xt.setStrokeColor,xt.fillPanel=new nt("Fill color",ne(Kt.defaultColorSet,["transparent"]),xt.fillColor,Yt),xt.fillPanel.onColorChanged=xt.setFillColor,xt.strokeWidthPanel=new Bt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),xt.strokeWidthPanel.onWidthChanged=xt.setStrokeWidth,xt.strokeStylePanel=new jt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),xt.strokeStylePanel.onStyleChanged=xt.setStrokeDasharray,xt.opacityPanel=new wn("Opacity",Kt.defaultOpacitySteps,xt.opacity),xt.opacityPanel.onOpacityChanged=xt.setOpacity,xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.visual)},Lt.prototype.createVisual=function(){this.visual=ae.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(St,It){Ot.prototype.pointerDown.call(this,St,It),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Lt.prototype.manipulate=function(St){Ot.prototype.manipulate.call(this,St)},Lt.prototype.resize=function(St){Ot.prototype.resize.call(this,St),this.setSize()},Lt.prototype.setSize=function(){Ot.prototype.setSize.call(this),ae.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Lt.prototype.pointerUp=function(St){Ot.prototype.pointerUp.call(this,St),this.setSize()},Lt.prototype.setStrokeColor=function(St){this.strokeColor=St,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(St),this.stateChanged()},Lt.prototype.setFillColor=function(St){this.fillColor=St,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(St),this.stateChanged()},Lt.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.setOpacity=function(St){this.opacity=St,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var St=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ot.prototype.getState.call(this));return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){var It=St;this.fillColor=It.fillColor,this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.opacity=It.opacity,this.createVisual(),Ot.prototype.restoreState.call(this,St),this.setSize()},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It),this.setSize()},Lt.typeName="EllipseMarker",Lt.title="Ellipse marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Lt}(Pt),Dn=function(Ot){function Lt(St,It,Kt){return Ot.call(this,St,It,Kt)||this}return te(Lt,Ot),Object.defineProperty(Lt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.tip1&&St!==this.tip2)},Lt.prototype.createTips=function(){this.tip1=ae.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ae.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.tip2)},Lt.prototype.pointerDown=function(St,It){Ot.prototype.pointerDown.call(this,St,It),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Ot.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ae.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var St=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),It=this.tip1.transform.baseVal.getItem(0);It.setRotate(St,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(It,0);var Kt=this.tip2.transform.baseVal.getItem(0);Kt.setRotate(St+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Kt,0)}},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var St=Ot.prototype.getState.call(this);return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){Ot.prototype.restoreState.call(this,St),this.createTips(),this.adjustVisual()},Lt.typeName="MeasurementMarker",Lt.title="Measurement marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',Lt}(he),Ne=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.strokePanel.colors=Kt.defaultColorSet,xt.fillColor="transparent",xt}return te(Lt,Ot),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var St=Ot.prototype.getState.call(this);return St.typeName=Lt.typeName,St},Lt.typeName="EllipseFrameMarker",Lt.title="Ellipse frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Lt}(Zn),pn=function(){function Ot(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ot.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ot.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))},Ot.prototype.replaceLastUndoStep=function(Lt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Lt)},Ot.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ot.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}},Ot.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ot}(),Tn=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.strokeColor="transparent",xt.strokeWidth=0,xt.strokeDasharray="",xt.curveX=0,xt.curveY=0,xt.manipulationStartCurveX=0,xt.manipulationStartCurveY=0,xt.setStrokeColor=xt.setStrokeColor.bind(xt),xt.setStrokeWidth=xt.setStrokeWidth.bind(xt),xt.setStrokeDasharray=xt.setStrokeDasharray.bind(xt),xt.positionGrips=xt.positionGrips.bind(xt),xt.addControlGrips=xt.addControlGrips.bind(xt),xt.adjustVisual=xt.adjustVisual.bind(xt),xt.setupControlBox=xt.setupControlBox.bind(xt),xt.resize=xt.resize.bind(xt),xt.strokeColor=Kt.defaultColor,xt.strokeWidth=Kt.defaultStrokeWidth,xt.strokeDasharray=Kt.defaultStrokeDasharray,xt.strokePanel=new nt("Line color",Kt.defaultColorSet,Kt.defaultColor),xt.strokePanel.onColorChanged=xt.setStrokeColor,xt.strokeWidthPanel=new Bt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),xt.strokeWidthPanel.onWidthChanged=xt.setStrokeWidth,xt.strokeStylePanel=new jt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),xt.strokeStylePanel.onStyleChanged=xt.setStrokeDasharray,xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.selectorCurve&&St!==this.visibleCurve&&!this.curveGrip.ownsTarget(St))},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=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.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(St,It){Ot.prototype.pointerDown.call(this,St,It),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=St.x,this.curveY=St.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(It)&&(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()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setupControlBox=function(){Ot.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.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,Ot.prototype.addControlGrips.call(this)},Lt.prototype.positionGrips=function(){Ot.prototype.positionGrips.call(this);var St=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-St/2,this.curveY-St/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(St){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+St.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+St.y-this.manipulationStartY),Ot.prototype.manipulate.call(this,St)},Lt.prototype.resize=function(St){this.activeGrip===this.curveGrip&&(this.curveX=St.x,this.curveY=St.y),Ot.prototype.resize.call(this,St),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(St){this.strokeColor=St,this.adjustVisual(),this.colorChanged(St)},Lt.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.adjustVisual()},Lt.prototype.scale=function(St,It){this.curveX=this.curveX*St,this.curveY=this.curveY*It,Ot.prototype.scale.call(this,St,It)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var St=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ot.prototype.getState.call(this));return St.typeName=Lt.typeName,St},Lt.prototype.restoreState=function(St){Ot.prototype.restoreState.call(this,St);var It=St;this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.curveX=It.curveX,this.curveY=It.curveY,this.createVisual(),this.adjustVisual()},Lt.typeName="CurveMarker",Lt.title="Curve marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',Lt}(Vt),Yn=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,It,Kt)||this;return xt.fillColor="transparent",xt.strokeColor="transparent",xt.strokeWidth=0,xt.strokeDasharray="",xt.textColor="transparent",xt.fontSize="1rem",xt.isMoved=!1,xt.captionText="Caption",xt.PADDING=5,xt.captionBoxWidth=0,xt.captionBoxHeight=0,xt.strokeColor=Kt.defaultColor,xt.strokeWidth=Kt.defaultStrokeWidth,xt.strokeDasharray=Kt.defaultStrokeDasharray,xt.fillColor=Kt.defaultFillColor,xt.textColor=Kt.defaultStrokeColor,xt.fontFamily=Kt.defaultFontFamily,xt.fontSize=Kt.defaultCaptionFontSize,xt.captionText=Kt.defaultCaptionText,xt.setStrokeColor=xt.setStrokeColor.bind(xt),xt.setFillColor=xt.setFillColor.bind(xt),xt.setStrokeWidth=xt.setStrokeWidth.bind(xt),xt.setStrokeDasharray=xt.setStrokeDasharray.bind(xt),xt.createVisual=xt.createVisual.bind(xt),xt.sizeCaption=xt.sizeCaption.bind(xt),xt.setCaptionText=xt.setCaptionText.bind(xt),xt.showTextEditor=xt.showTextEditor.bind(xt),xt.positionTextEditor=xt.positionTextEditor.bind(xt),xt.finishTextEditing=xt.finishTextEditing.bind(xt),xt.setFont=xt.setFont.bind(xt),xt.setTextColor=xt.setTextColor.bind(xt),xt.strokePanel=new nt("Line color",ne(Kt.defaultColorSet,["transparent"]),xt.strokeColor),xt.strokePanel.onColorChanged=xt.setStrokeColor,xt.fillPanel=new nt("Fill color",ne(Kt.defaultColorSet,["transparent"]),xt.fillColor,Yt),xt.fillPanel.onColorChanged=xt.setFillColor,xt.strokeWidthPanel=new Bt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),xt.strokeWidthPanel.onWidthChanged=xt.setStrokeWidth,xt.strokeStylePanel=new jt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),xt.strokeStylePanel.onStyleChanged=xt.setStrokeDasharray,xt.fontFamilyPanel=new Zt("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),xt.fontFamilyPanel.onFontChanged=xt.setFont,xt.textColorPanel=new nt("Text color",Kt.defaultColorSet,xt.textColor,we),xt.textColorPanel.onColorChanged=xt.setTextColor,xt}return te(Lt,Ot),Lt.prototype.ownsTarget=function(St){return!(!Ot.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.frame&&St!==this.captionBg&&St!==this.captionElement)},Lt.prototype.createVisual=function(){this.visual=ae.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ae.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ae.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=ae.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(St){this.captionText=St,this.captionElement.textContent=this.captionText,this.sizeCaption()},Lt.prototype.pointerDown=function(St,It){Ot.prototype.pointerDown.call(this,St,It),this.isMoved=!1,this.pointerDownPoint=St,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Lt.prototype.manipulate=function(St){Ot.prototype.manipulate.call(this,St),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(St.x-this.pointerDownPoint.x)>5||Math.abs(St.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(St){Ot.prototype.resize.call(this,St),this.setSize()},Lt.prototype.sizeCaption=function(){var St=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=St.width+2*this.PADDING,this.captionBoxHeight=St.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ae.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')"]]),ae.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 St=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(It){It.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(It){It.key==="Enter"&&St.finishTextEditing(St.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(It){It.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){St.finishTextEditing(St.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){St.finishTextEditing(St.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(St){this.setCaptionText(St.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Lt.prototype.setFont=function(St){this.captionElement&&ae.setAttributes(this.captionElement,[["font-family",St]]),this.fontFamily=St,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Lt.prototype.setTextColor=function(St){this.captionElement&&ae.setAttributes(this.captionElement,[["fill",St]]),this.textColor=St,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Lt.prototype.setSize=function(){Ot.prototype.setSize.call(this),ae.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Lt.prototype.pointerUp=function(St){Ot.prototype.pointerUp.call(this,St),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.dblClick=function(St,It){Ot.prototype.dblClick.call(this,St,It),this.showTextEditor()},Lt.prototype.setStrokeColor=function(St){this.strokeColor=St,this.frame&&ae.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(St),this.stateChanged()},Lt.prototype.setFillColor=function(St){this.fillColor=St,this.captionBg&&ae.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(St),this.stateChanged()},Lt.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.frame&&ae.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.frame&&ae.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 St=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},Ot.prototype.getState.call(this));return St.typeName=this.typeName,St},Lt.prototype.restoreState=function(St){var It=St;this.fillColor=It.fillColor,this.strokeColor=It.strokeColor,this.strokeWidth=It.strokeWidth,this.strokeDasharray=It.strokeDasharray,this.textColor=It.textColor,this.fontFamily=It.fontFamily,this.captionText=It.captionText,this.fontSize=It.fontSize,this.createVisual(),Ot.prototype.restoreState.call(this,St),this.setSize()},Lt.prototype.scale=function(St,It){Ot.prototype.scale.call(this,St,It),this.setSize()},Lt.typeName="CaptionFrameMarker",Lt.title="Caption frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',Lt}(Pt),mn=function(){function Ot(Lt,St){St===void 0&&(St=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Lt,this.cancelable=St}return Object.defineProperty(Ot.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ot.prototype.preventDefault=function(){this._defaultPrevented=!0},Ot}(),ui=function(Ot){function Lt(St,It,Kt){var xt=Ot.call(this,St,!1)||this;return xt.dataUrl=It,xt.state=Kt,xt}return te(Lt,Ot),Lt}(mn),Ce=function(Ot){function Lt(St,It,Kt){Kt===void 0&&(Kt=!1);var xt=Ot.call(this,St,Kt)||this;return xt.marker=It,xt}return te(Lt,Ot),Lt}(mn),$n=function(){function Ot(){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 Ot.prototype.addEventListener=function(Lt,St){this[Lt].push(St)},Ot.prototype.removeEventListener=function(Lt,St){var It=this[Lt].indexOf(St);It>-1&&this[Lt].splice(It,1)},Ot}(),Pi=function(){function Ot(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 se,this._isOpen=!1,this.undoRedoManager=new pn,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 $n,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ot.instanceCounter++,this.styles=new Jt(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(Ot.prototype,"ALL_MARKER_TYPES",{get:function(){return[_t,me,Xe,Oe,Ne,Zn,Mn,_e,Dn,Je,he,Tn,Yn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[_t,me,Xe,Oe,Zn,Mn,_e]},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"BASIC_MARKER_TYPES",{get:function(){return[_t,me,Xe,Oe,Mn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Lt){var St=this;this._availableMarkerTypes.splice(0),Lt.forEach(function(It){if(typeof It=="string"){var Kt=St.ALL_MARKER_TYPES.find(function(xt){return xt.typeName===It});Kt!==void 0&&St._availableMarkerTypes.push(Kt)}else St._availableMarkerTypes.push(It)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ot.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(Ot.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ot.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Tt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ot.prototype.show=function(){var Lt=this;this.styles.styleSheetRoot===void 0&&ye.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ye.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(St){return St(new mn(Lt))})},Ot.prototype.render=function(){return de(this,void 0,void 0,function(){var Lt;return Re(this,function(St){switch(St.label){case 0:return this.setCurrentMarker(),(Lt=new be).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 St.sent(),[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,St.sent()]}})})},Ot.prototype.close=function(Lt){var St=this;if(Lt===void 0&&(Lt=!1),this.isOpen){var It=!1;Lt||this.eventListeners.beforeclose.forEach(function(Kt){var xt=new mn(St,!0);Kt(xt),xt.defaultPrevented&&(It=!0)}),It||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Kt){return Kt(new mn(St))}),this.detachEvents(),this._isOpen=!1)}},Ot.prototype.addMarkersToToolbar=function(){for(var Lt,St=[],It=0;It<arguments.length;It++)St[It]=arguments[It];(Lt=this._availableMarkerTypes).push.apply(Lt,St)},Ot.prototype.addRenderEventListener=function(Lt){this.addEventListener("render",function(St){Lt(St.dataUrl,St.state)})},Ot.prototype.removeRenderEventListener=function(Lt){},Ot.prototype.addCloseEventListener=function(Lt){this.addEventListener("close",function(){Lt()})},Ot.prototype.removeCloseEventListener=function(Lt){},Ot.prototype.setupResizeObserver=function(){var Lt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Lt.resize(Lt.target.clientWidth,Lt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Lt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ot.prototype.onPopupTargetResize=function(){var Lt=1*this.target.clientWidth/this.target.clientHeight,St=this.editorCanvas.clientWidth/Lt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Lt:this.editorCanvas.clientWidth,It=St<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Lt;this.resize(St,It)},Ot.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ot.prototype.resize=function(Lt,St){this._isResizing=!0;var It=Lt/this.imageWidth,Kt=St/this.imageHeight;this.imageWidth=Math.round(Lt),this.imageHeight=Math.round(St),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(It,Kt),this._isResizing=!1},Ot.prototype.scaleMarkers=function(Lt,St){var It,Kt=this;this._currentMarker&&this._currentMarker instanceof Oe?this._currentMarker.scale(Lt,St):(It=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(xt){xt!==Kt._currentMarker&&xt.scale(Lt,St)}),It!==void 0&&this.setCurrentMarker(It)},Ot.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Ot.prototype.setTopLeft=function(){var Lt=this.editingTarget.getBoundingClientRect(),St=this.editorCanvas.getBoundingClientRect();this.left=Lt.left-St.left,this.top=Lt.top-St.top},Ot.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Ot.prototype.addDefs=function(){for(var Lt,St=[],It=0;It<arguments.length;It++)St[It]=arguments[It];this.defs=ae.createDefs(),this.addDefsToImage(),(Lt=this.defs).append.apply(Lt,St)},Ot.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ot.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Ot.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ot.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ot.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Ot.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ot.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Ot.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Lt=document.createElement("a");Lt.href="https://markerjs.com/",Lt.target="_blank",Lt.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',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()},Ot.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")},Ot.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"},Ot.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ot.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 je(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Nt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ot.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ot.prototype.removeMarker=function(Lt){this.markerImage.removeChild(Lt.container),this.markers.indexOf(Lt)>-1&&this.markers.splice(this.markers.indexOf(Lt),1),Lt.dispose()},Ot.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())},Ot.prototype.toolbarButtonClicked=function(Lt,St){if(Lt==="marker"&&St!==void 0)this.createNewMarker(St);else if(Lt==="action")switch(St){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()}},Ot.prototype.deleteSelectedMarker=function(){var Lt=this;if(this._currentMarker!==void 0){var St=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Kt){var xt=new Ce(Lt,Lt._currentMarker,!0);Kt(xt),xt.defaultPrevented&&(St=!0)}),!St){var It=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Kt){return Kt(new Ce(Lt,It))})}}},Ot.prototype.clear=function(){var Lt=this,St=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Me){var De=new Ce(Lt,void 0,!0);Me(De),De.defaultPrevented&&(St=!0)}),!St)){this.setCurrentMarker();for(var It=function(Me){var De=Kt.markers[Me];Kt.setCurrentMarker(Kt.markers[Me]),Kt._currentMarker.dispose(),Kt.markerImage.removeChild(Kt._currentMarker.container),Kt.markers.splice(Kt.markers.indexOf(Kt._currentMarker),1),Kt.eventListeners.markerdelete.forEach(function(le){return le(new Ce(Lt,De))})},Kt=this,xt=this.markers.length-1;xt>=0;xt--)It(xt);this.addUndoStep()}},Object.defineProperty(Ot.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ot.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))},Ot.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)},Ot.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ot.prototype.addUndoStep=function(){var Lt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var St=this.getState(),It=this.undoRedoManager.getLastUndoStep();if(!It||It.width===St.width&&It.height===St.height){var Kt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(St),Kt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(xt){return xt(new mn(Lt))})}else this.undoRedoManager.replaceLastUndoStep(St),this.eventListeners.statechange.forEach(function(xt){return xt(new mn(Lt))})}},Ot.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ot.prototype.undoStep=function(){var Lt=this,St=this.undoRedoManager.undo();St!==void 0&&(this.restoreState(St),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(It){return It(new mn(Lt))}))},Ot.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ot.prototype.redoStep=function(){var Lt=this,St=this.undoRedoManager.redo();St!==void 0&&(this.restoreState(St),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(It){return It(new mn(Lt))}))},Ot.prototype.stepZoom=function(){var Lt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Lt<this.zoomSteps.length-1?this.zoomSteps[Lt+1]:this.zoomSteps[0]},Ot.prototype.panTo=function(Lt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Lt.x,top:this.prevPanPoint.y-Lt.y}),this.prevPanPoint=Lt},Ot.prototype.startRenderAndClose=function(){return de(this,void 0,void 0,function(){var Lt,St,It=this;return Re(this,function(Kt){switch(Kt.label){case 0:return[4,this.render()];case 1:return Lt=Kt.sent(),St=this.getState(),this.eventListeners.render.forEach(function(xt){return xt(new ui(It,Lt,St))}),this.close(!0),[2]}})})},Ot.prototype.getState=function(Lt){Lt===!0&&this.setCurrentMarker();var St={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(It){return St.markers.push(It.getState())}),St},Ot.prototype.restoreState=function(Lt){var St=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Lt.markers.forEach(function(It){var Kt=St._availableMarkerTypes.find(function(Me){return Me.typeName===It.typeName});if(Kt!==void 0){var xt=St.addNewMarker(Kt);xt.restoreState(It),St.markers.push(xt)}}),Lt.width&&Lt.height&&(Lt.width!==this.imageWidth||Lt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Lt.width,this.imageHeight/Lt.height),this.eventListeners.restorestate.forEach(function(It){return It(new mn(St))})},Ot.prototype.addNewMarker=function(Lt){var St=ae.createGroup();return this.markerImage.appendChild(St),new Lt(St,this.overlayContainer,this.settings)},Ot.prototype.createNewMarker=function(Lt){var St,It=this;(St=typeof Lt=="string"?this._availableMarkerTypes.find(function(Kt){return Kt.typeName===Lt}):Lt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(St),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(St.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Kt){return Kt(new Ce(It,It._currentMarker))}))},Ot.prototype.markerCreated=function(Lt){var St=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Lt),this.setCurrentMarker(Lt),Lt instanceof me&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(me):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(It){return It(new Ce(St,St._currentMarker))})},Ot.prototype.colorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Lt,this.settings.defaultStrokeColor=Lt)},Ot.prototype.fillColorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Lt)},Ot.prototype.markerStateChanged=function(Lt){var St=this;this.eventListeners.markerchange.forEach(function(It){return It(new Ce(St,Lt))})},Ot.prototype.setCurrentMarker=function(Lt){var St=this;this._currentMarker!==Lt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(It){return It(new Ce(St,St._currentMarker))})),this._currentMarker=Lt,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(It){return It(new Ce(St,St._currentMarker))}))},Ot.prototype.onPointerDown=function(Lt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Lt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var St=this.markers.find(function(It){return It.ownsTarget(Lt.target)});St!==void 0?(this.setCurrentMarker(St),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Lt.clientX,y:Lt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY))},Ot.prototype.onDblClick=function(Lt){if(this._isFocused||this.focus(),this.mode==="select"){var St=this.markers.find(function(It){return It.ownsTarget(Lt.target)});St!==void 0&&St!==this._currentMarker&&this.setCurrentMarker(St),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target):this.setCurrentMarker()}},Ot.prototype.onPointerMove=function(Lt){this.touchPoints!==1&&Lt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Lt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)):this.zoomLevel>1&&this.panTo({x:Lt.clientX,y:Lt.clientY}))},Ot.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()},Ot.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ot.prototype.onKeyUp=function(Lt){this._currentMarker===void 0||this.notesArea!==void 0||Lt.key!=="Delete"&&Lt.key!=="Backspace"||this.deleteSelectedMarker()},Ot.prototype.clientToLocalCoordinates=function(Lt,St){var It=this.markerImage.getBoundingClientRect();return{x:(Lt-It.left)/this.zoomLevel,y:(St-It.top)/this.zoomLevel}},Ot.prototype.onWindowResize=function(){this.positionUI()},Ot.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()},Ot.prototype.addLicenseKey=function(Lt){Tt.addKey(Lt)},Ot.prototype.addEventListener=function(Lt,St){this.eventListeners.addEventListener(Lt,St)},Ot.prototype.removeEventListener=function(Lt,St){this.eventListeners.removeEventListener(Lt,St)},Ot.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(Ot.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ot.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(St){return St(new mn(Lt))}))},Ot.prototype.blur=function(){var Lt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(St){return St(new mn(Lt))}))},Ot.instanceCounter=0,Ot}()},17115:function(gn,Ln,bt){"use strict";bt.d(Ln,{ZP:function(){return Tt}});var wt=bt(52487),te=bt(59301),de=bt(47273),Re=0,ne=(0,de.Z)();function ae(){var be;return ne?(be=Re,Re+=1):be="TEST_OR_SSR",be}function Tt(be){var ye=te.useState(),Jt=(0,wt.Z)(ye,2),Be=Jt[0],pe=Jt[1];return te.useEffect(function(){pe("rc_select_".concat(ae()))},[]),be||Be}},77861:function(gn,Ln,bt){"use strict";bt.d(Ln,{Ac:function(){return Te},Xo:function(){return Xi},Wx:function(){return Oo},ZP:function(){return Ye},lk:function(){return Pt}});var wt=bt(72308),te=bt(80702),de=bt(49618),Re=bt(77321),ne=bt(52487),ae=bt(74416),Tt=bt(62853),be=bt(18929),ye=bt(48736),Jt=bt(59301),Be=bt(92310),pe=bt.n(Be),je=bt(34280),Nt=bt(49658),et=bt(10228),nt=bt(8654),ht=function(qt){var He=qt.className,un=qt.customizeIcon,An=qt.customizeIconProps,Fn=qt.onMouseDown,oe=qt.onClick,qe=qt.children,bn;return typeof un=="function"?bn=un(An):bn=un,Jt.createElement("span",{className:He,onMouseDown:function(Ke){Ke.preventDefault(),Fn&&Fn(Ke)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:oe,"aria-hidden":!0},bn!==void 0?bn:Jt.createElement("span",{className:pe()(He.split(/\s+/).map(function(Jn){return"".concat(Jn,"-icon")}))},qe))},lt=ht;function gt(ce,qt,He,un,An){var Fn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,oe=arguments.length>6?arguments[6]:void 0,qe=arguments.length>7?arguments[7]:void 0,bn=Jt.useMemo(function(){if((0,Tt.Z)(un)==="object")return un.clearIcon;if(An)return An},[un,An]),Jn=Jt.useMemo(function(){return!!(!Fn&&un&&(He.length||oe)&&!(qe==="combobox"&&oe===""))},[un,Fn,He.length,oe,qe]);return{allowClear:Jn,clearIcon:Jt.createElement(lt,{className:"".concat(ce,"-clear"),onMouseDown:qt,customizeIcon:bn},"\xD7")}}var vt=Jt.createContext(null);function Pt(){return Jt.useContext(vt)}function At(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,qt=Jt.useState(!1),He=(0,ne.Z)(qt,2),un=He[0],An=He[1],Fn=Jt.useRef(null),oe=function(){window.clearTimeout(Fn.current)};Jt.useEffect(function(){return oe},[]);var qe=function(Jn,Ke){oe(),Fn.current=window.setTimeout(function(){An(Jn),Ke&&Ke()},ce)};return[un,qe,oe]}function Bt(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,qt=Jt.useRef(null),He=Jt.useRef(null);Jt.useEffect(function(){return function(){window.clearTimeout(He.current)}},[]);function un(An){(An||qt.current===null)&&(qt.current=An),window.clearTimeout(He.current),He.current=window.setTimeout(function(){qt.current=null},ce)}return[function(){return qt.current},un]}function jt(ce,qt,He,un){var An=Jt.useRef(null);An.current={open:qt,triggerOpen:He,customizedTrigger:un},Jt.useEffect(function(){function Fn(oe){var qe;if(!((qe=An.current)!==null&&qe!==void 0&&qe.customizedTrigger)){var bn=oe.target;bn.shadowRoot&&oe.composed&&(bn=oe.composedPath()[0]||bn),An.current.open&&ce().filter(function(Jn){return Jn}).every(function(Jn){return!Jn.contains(bn)&&Jn!==bn})&&An.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Fn),function(){return window.removeEventListener("mousedown",Fn)}},[])}var _t=bt(26112),se=bt(11780),Vt=function(qt,He){var un,An,Fn=qt.prefixCls,oe=qt.id,qe=qt.inputElement,bn=qt.disabled,Jn=qt.tabIndex,Ke=qt.autoFocus,Qe=qt.autoComplete,zn=qt.editable,Wn=qt.activeDescendantId,fi=qt.value,Hn=qt.maxLength,_n=qt.onKeyDown,Vn=qt.onMouseDown,wi=qt.onChange,Qi=qt.onPaste,qi=qt.onCompositionStart,$e=qt.onCompositionEnd,lo=qt.open,Co=qt.attrs,jo=qe||Jt.createElement("input",null),Ue=jo,jn=Ue.ref,qn=Ue.props,Mi=qn.onKeyDown,vi=qn.onChange,pi=qn.onMouseDown,Ui=qn.onCompositionStart,ki=qn.onCompositionEnd,zi=qn.style;return(0,ye.Kp)(!("maxLength"in jo.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),jo=Jt.cloneElement(jo,(0,Re.Z)((0,Re.Z)((0,Re.Z)({type:"search"},qn),{},{id:oe,ref:(0,nt.sQ)(He,jn),disabled:bn,tabIndex:Jn,autoComplete:Qe||"off",autoFocus:Ke,className:pe()("".concat(Fn,"-selection-search-input"),(un=jo)===null||un===void 0||(An=un.props)===null||An===void 0?void 0:An.className),role:"combobox","aria-label":"Search","aria-expanded":lo||!1,"aria-haspopup":"listbox","aria-owns":"".concat(oe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(oe,"_list"),"aria-activedescendant":lo?Wn:void 0},Co),{},{value:zn?fi:"",maxLength:Hn,readOnly:!zn,unselectable:zn?null:"on",style:(0,Re.Z)((0,Re.Z)({},zi),{},{opacity:zn?null:0}),onKeyDown:function(cn){_n(cn),Mi&&Mi(cn)},onMouseDown:function(cn){Vn(cn),pi&&pi(cn)},onChange:function(cn){wi(cn),vi&&vi(cn)},onCompositionStart:function(cn){qi(cn),Ui&&Ui(cn)},onCompositionEnd:function(cn){$e(cn),ki&&ki(cn)},onPaste:Qi})),jo},he=Jt.forwardRef(Vt);he.displayName="Input";var Zt=he;function Oe(ce){return Array.isArray(ce)?ce:ce!==void 0?[ce]:[]}var me=typeof window!="undefined"&&window.document&&window.document.documentElement,Ve=me;function Xe(ce){return ce!=null}function Je(ce){return!ce&&ce!==0}function wn(ce){return["string","number"].includes((0,Tt.Z)(ce))}function Mn(ce){var qt=void 0;return ce&&(wn(ce.title)?qt=ce.title.toString():wn(ce.label)&&(qt=ce.label.toString())),qt}function we(ce,qt){Ve?Jt.useLayoutEffect(ce,qt):Jt.useEffect(ce,qt)}function Yt(ce){var qt;return(qt=ce.key)!==null&&qt!==void 0?qt:ce.value}var _e=function(qt){qt.preventDefault(),qt.stopPropagation()},Zn=function(qt){var He=qt.id,un=qt.prefixCls,An=qt.values,Fn=qt.open,oe=qt.searchValue,qe=qt.autoClearSearchValue,bn=qt.inputRef,Jn=qt.placeholder,Ke=qt.disabled,Qe=qt.mode,zn=qt.showSearch,Wn=qt.autoFocus,fi=qt.autoComplete,Hn=qt.activeDescendantId,_n=qt.tabIndex,Vn=qt.removeIcon,wi=qt.maxTagCount,Qi=qt.maxTagTextLength,qi=qt.maxTagPlaceholder,$e=qi===void 0?function(Qo){return"+ ".concat(Qo.length," ...")}:qi,lo=qt.tagRender,Co=qt.onToggleOpen,jo=qt.onRemove,Ue=qt.onInputChange,jn=qt.onInputPaste,qn=qt.onInputKeyDown,Mi=qt.onInputMouseDown,vi=qt.onInputCompositionStart,pi=qt.onInputCompositionEnd,Ui=Jt.useRef(null),ki=(0,Jt.useState)(0),zi=(0,ne.Z)(ki,2),uo=zi[0],cn=zi[1],Xo=(0,Jt.useState)(!1),sn=(0,ne.Z)(Xo,2),ho=sn[0],Er=sn[1],zo="".concat(un,"-selection"),Fr=Fn||Qe==="multiple"&&qe===!1||Qe==="tags"?oe:"",mr=Qe==="tags"||Qe==="multiple"&&qe===!1||zn&&(Fn||ho);we(function(){cn(Ui.current.scrollWidth)},[Fr]);function Di(Qo,xr,es,cs,us){return Jt.createElement("span",{className:pe()("".concat(zo,"-item"),(0,de.Z)({},"".concat(zo,"-item-disabled"),es)),title:Mn(Qo)},Jt.createElement("span",{className:"".concat(zo,"-item-content")},xr),cs&&Jt.createElement(lt,{className:"".concat(zo,"-item-remove"),onMouseDown:_e,onClick:us,customizeIcon:Vn},"\xD7"))}function Li(Qo,xr,es,cs,us){var no=function(Ko){_e(Ko),Co(!Fn)};return Jt.createElement("span",{onMouseDown:no},lo({label:xr,value:Qo,disabled:es,closable:cs,onClose:us}))}function yo(Qo){var xr=Qo.disabled,es=Qo.label,cs=Qo.value,us=!Ke&&!xr,no=es;if(typeof Qi=="number"&&(typeof es=="string"||typeof es=="number")){var $i=String(no);$i.length>Qi&&(no="".concat($i.slice(0,Qi),"..."))}var Ko=function(lr){lr&&lr.stopPropagation(),jo(Qo)};return typeof lo=="function"?Li(cs,no,xr,us,Ko):Di(Qo,no,xr,us,Ko)}function bo(Qo){var xr=typeof $e=="function"?$e(Qo):$e;return Di({title:xr},xr,!1)}var Xn=Jt.createElement("div",{className:"".concat(zo,"-search"),style:{width:uo},onFocus:function(){Er(!0)},onBlur:function(){Er(!1)}},Jt.createElement(Zt,{ref:bn,open:Fn,prefixCls:un,id:He,inputElement:null,disabled:Ke,autoFocus:Wn,autoComplete:fi,editable:mr,activeDescendantId:Hn,value:Fr,onKeyDown:qn,onMouseDown:Mi,onChange:Ue,onPaste:jn,onCompositionStart:vi,onCompositionEnd:pi,tabIndex:_n,attrs:(0,_t.Z)(qt,!0)}),Jt.createElement("span",{ref:Ui,className:"".concat(zo,"-search-mirror"),"aria-hidden":!0},Fr,"\xA0")),Rt=Jt.createElement(se.Z,{prefixCls:"".concat(zo,"-overflow"),data:An,renderItem:yo,renderRest:bo,suffix:Xn,itemKey:Yt,maxCount:wi});return Jt.createElement(Jt.Fragment,null,Rt,!An.length&&!Fr&&Jt.createElement("span",{className:"".concat(zo,"-placeholder")},Jn))},Dn=Zn,Ne=function(qt){var He=qt.inputElement,un=qt.prefixCls,An=qt.id,Fn=qt.inputRef,oe=qt.disabled,qe=qt.autoFocus,bn=qt.autoComplete,Jn=qt.activeDescendantId,Ke=qt.mode,Qe=qt.open,zn=qt.values,Wn=qt.placeholder,fi=qt.tabIndex,Hn=qt.showSearch,_n=qt.searchValue,Vn=qt.activeValue,wi=qt.maxLength,Qi=qt.onInputKeyDown,qi=qt.onInputMouseDown,$e=qt.onInputChange,lo=qt.onInputPaste,Co=qt.onInputCompositionStart,jo=qt.onInputCompositionEnd,Ue=qt.title,jn=Jt.useState(!1),qn=(0,ne.Z)(jn,2),Mi=qn[0],vi=qn[1],pi=Ke==="combobox",Ui=pi||Hn,ki=zn[0],zi=_n||"";pi&&Vn&&!Mi&&(zi=Vn),Jt.useEffect(function(){pi&&vi(!1)},[pi,Vn]);var uo=Ke!=="combobox"&&!Qe&&!Hn?!1:!!zi,cn=Ue===void 0?Mn(ki):Ue,Xo=function(){if(ki)return null;var ho=uo?{visibility:"hidden"}:void 0;return Jt.createElement("span",{className:"".concat(un,"-selection-placeholder"),style:ho},Wn)};return Jt.createElement(Jt.Fragment,null,Jt.createElement("span",{className:"".concat(un,"-selection-search")},Jt.createElement(Zt,{ref:Fn,prefixCls:un,id:An,open:Qe,inputElement:He,disabled:oe,autoFocus:qe,autoComplete:bn,editable:Ui,activeDescendantId:Jn,value:zi,onKeyDown:Qi,onMouseDown:qi,onChange:function(ho){vi(!0),$e(ho)},onPaste:lo,onCompositionStart:Co,onCompositionEnd:jo,tabIndex:fi,attrs:(0,_t.Z)(qt,!0),maxLength:pi?wi:void 0})),!pi&&ki?Jt.createElement("span",{className:"".concat(un,"-selection-item"),title:cn,style:uo?{visibility:"hidden"}:void 0},ki.label):null,Xo())},pn=Ne;function Tn(ce){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(ce)}var Yn=function(qt,He){var un=(0,Jt.useRef)(null),An=(0,Jt.useRef)(!1),Fn=qt.prefixCls,oe=qt.open,qe=qt.mode,bn=qt.showSearch,Jn=qt.tokenWithEnter,Ke=qt.autoClearSearchValue,Qe=qt.onSearch,zn=qt.onSearchSubmit,Wn=qt.onToggleOpen,fi=qt.onInputKeyDown,Hn=qt.domRef;Jt.useImperativeHandle(He,function(){return{focus:function(){un.current.focus()},blur:function(){un.current.blur()}}});var _n=Bt(0),Vn=(0,ne.Z)(_n,2),wi=Vn[0],Qi=Vn[1],qi=function(zi){var uo=zi.which;(uo===et.Z.UP||uo===et.Z.DOWN)&&zi.preventDefault(),fi&&fi(zi),uo===et.Z.ENTER&&qe==="tags"&&!An.current&&!oe&&(zn==null||zn(zi.target.value)),Tn(uo)&&Wn(!0)},$e=function(){Qi(!0)},lo=(0,Jt.useRef)(null),Co=function(zi){Qe(zi,!0,An.current)!==!1&&Wn(!0)},jo=function(){An.current=!0},Ue=function(zi){An.current=!1,qe!=="combobox"&&Co(zi.target.value)},jn=function(zi){var uo=zi.target.value;if(Jn&&lo.current&&/[\r\n]/.test(lo.current)){var cn=lo.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");uo=uo.replace(cn,lo.current)}lo.current=null,Co(uo)},qn=function(zi){var uo=zi.clipboardData,cn=uo.getData("text");lo.current=cn},Mi=function(zi){var uo=zi.target;if(uo!==un.current){var cn=document.body.style.msTouchAction!==void 0;cn?setTimeout(function(){un.current.focus()}):un.current.focus()}},vi=function(zi){var uo=wi();zi.target!==un.current&&!uo&&qe!=="combobox"&&zi.preventDefault(),(qe!=="combobox"&&(!bn||!uo)||!oe)&&(oe&&Ke!==!1&&Qe("",!0,!1),Wn())},pi={inputRef:un,onInputKeyDown:qi,onInputMouseDown:$e,onInputChange:jn,onInputPaste:qn,onInputCompositionStart:jo,onInputCompositionEnd:Ue},Ui=qe==="multiple"||qe==="tags"?Jt.createElement(Dn,(0,wt.Z)({},qt,pi)):Jt.createElement(pn,(0,wt.Z)({},qt,pi));return Jt.createElement("div",{ref:Hn,className:"".concat(Fn,"-selector"),onClick:Mi,onMouseDown:vi},Ui)},mn=Jt.forwardRef(Yn);mn.displayName="Selector";var ui=mn,Ce=bt(35593),$n=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Pi=function(qt){var He=qt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:He,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:He,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:He,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:He,adjustY:1},htmlRegion:"scroll"}}},Ot=function(qt,He){var un=qt.prefixCls,An=qt.disabled,Fn=qt.visible,oe=qt.children,qe=qt.popupElement,bn=qt.animation,Jn=qt.transitionName,Ke=qt.dropdownStyle,Qe=qt.dropdownClassName,zn=qt.direction,Wn=zn===void 0?"ltr":zn,fi=qt.placement,Hn=qt.builtinPlacements,_n=qt.dropdownMatchSelectWidth,Vn=qt.dropdownRender,wi=qt.dropdownAlign,Qi=qt.getPopupContainer,qi=qt.empty,$e=qt.getTriggerDOMNode,lo=qt.onPopupVisibleChange,Co=qt.onPopupMouseEnter,jo=(0,ae.Z)(qt,$n),Ue="".concat(un,"-dropdown"),jn=qe;Vn&&(jn=Vn(qe));var qn=Jt.useMemo(function(){return Hn||Pi(_n)},[Hn,_n]),Mi=bn?"".concat(Ue,"-").concat(bn):Jn,vi=typeof _n=="number",pi=Jt.useMemo(function(){return vi?null:_n===!1?"minWidth":"width"},[_n,vi]),Ui=Ke;vi&&(Ui=(0,Re.Z)((0,Re.Z)({},Ui),{},{width:_n}));var ki=Jt.useRef(null);return Jt.useImperativeHandle(He,function(){return{getPopupElement:function(){return ki.current}}}),Jt.createElement(Ce.Z,(0,wt.Z)({},jo,{showAction:lo?["click"]:[],hideAction:lo?["click"]:[],popupPlacement:fi||(Wn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:qn,prefixCls:Ue,popupTransitionName:Mi,popup:Jt.createElement("div",{ref:ki,onMouseEnter:Co},jn),stretch:pi,popupAlign:wi,popupVisible:Fn,getPopupContainer:Qi,popupClassName:pe()(Qe,(0,de.Z)({},"".concat(Ue,"-empty"),qi)),popupStyle:Ui,getTriggerDOMNode:$e,onPopupVisibleChange:lo}),oe)},Lt=Jt.forwardRef(Ot);Lt.displayName="SelectTrigger";var St=Lt,It=bt(68413);function Kt(ce,qt){var He=ce.key,un;return"value"in ce&&(un=ce.value),He!=null?He:un!==void 0?un:"rc-index-key-".concat(qt)}function xt(ce,qt){var He=ce||{},un=He.label,An=He.value,Fn=He.options,oe=He.groupLabel,qe=un||(qt?"children":"label");return{label:qe,value:An||"value",options:Fn||"options",groupLabel:oe||qe}}function Me(ce){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},He=qt.fieldNames,un=qt.childrenAsData,An=[],Fn=xt(He,!1),oe=Fn.label,qe=Fn.value,bn=Fn.options,Jn=Fn.groupLabel;function Ke(Qe,zn){Qe.forEach(function(Wn){if(zn||!(bn in Wn)){var fi=Wn[qe];An.push({key:Kt(Wn,An.length),groupOption:zn,data:Wn,label:Wn[oe],value:fi})}else{var Hn=Wn[Jn];Hn===void 0&&un&&(Hn=Wn.label),An.push({key:Kt(Wn,An.length),group:!0,data:Wn,label:Hn}),Ke(Wn[bn],!0)}})}return Ke(ce,!1),An}function De(ce){var qt=(0,Re.Z)({},ce);return"props"in qt||Object.defineProperty(qt,"props",{get:function(){return(0,ye.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),qt}}),qt}function le(ce,qt){if(!qt||!qt.length)return null;var He=!1;function un(Fn,oe){var qe=(0,It.Z)(oe),bn=qe[0],Jn=qe.slice(1);if(!bn)return[Fn];var Ke=Fn.split(bn);return He=He||Ke.length>1,Ke.reduce(function(Qe,zn){return[].concat((0,te.Z)(Qe),(0,te.Z)(un(zn,Jn)))},[]).filter(function(Qe){return Qe})}var An=un(ce,qt);return He?An:null}var ee=["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"],Se=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function xe(ce){return ce==="tags"||ce==="multiple"}var ue=Jt.forwardRef(function(ce,qt){var He,un,An=ce.id,Fn=ce.prefixCls,oe=ce.className,qe=ce.showSearch,bn=ce.tagRender,Jn=ce.direction,Ke=ce.omitDomProps,Qe=ce.displayValues,zn=ce.onDisplayValuesChange,Wn=ce.emptyOptions,fi=ce.notFoundContent,Hn=fi===void 0?"Not Found":fi,_n=ce.onClear,Vn=ce.mode,wi=ce.disabled,Qi=ce.loading,qi=ce.getInputElement,$e=ce.getRawInputElement,lo=ce.open,Co=ce.defaultOpen,jo=ce.onDropdownVisibleChange,Ue=ce.activeValue,jn=ce.onActiveValueChange,qn=ce.activeDescendantId,Mi=ce.searchValue,vi=ce.autoClearSearchValue,pi=ce.onSearch,Ui=ce.onSearchSplit,ki=ce.tokenSeparators,zi=ce.allowClear,uo=ce.suffixIcon,cn=ce.clearIcon,Xo=ce.OptionList,sn=ce.animation,ho=ce.transitionName,Er=ce.dropdownStyle,zo=ce.dropdownClassName,Fr=ce.dropdownMatchSelectWidth,mr=ce.dropdownRender,Di=ce.dropdownAlign,Li=ce.placement,yo=ce.builtinPlacements,bo=ce.getPopupContainer,Xn=ce.showAction,Rt=Xn===void 0?[]:Xn,Qo=ce.onFocus,xr=ce.onBlur,es=ce.onKeyUp,cs=ce.onKeyDown,us=ce.onMouseDown,no=(0,ae.Z)(ce,ee),$i=xe(Vn),Ko=(qe!==void 0?qe:$i)||Vn==="combobox",ro=(0,Re.Z)({},no);Se.forEach(function(nn){delete ro[nn]}),Ke==null||Ke.forEach(function(nn){delete ro[nn]});var lr=Jt.useState(!1),ms=(0,ne.Z)(lr,2),Ji=ms[0],Ti=ms[1];Jt.useEffect(function(){Ti((0,Nt.Z)())},[]);var kn=Jt.useRef(null),Ki=Jt.useRef(null),Jo=Jt.useRef(null),jr=Jt.useRef(null),Ir=Jt.useRef(null),Ur=At(),hs=(0,ne.Z)(Ur,3),ns=hs[0],sa=hs[1],Ys=hs[2];Jt.useImperativeHandle(qt,function(){var nn,Si;return{focus:(nn=jr.current)===null||nn===void 0?void 0:nn.focus,blur:(Si=jr.current)===null||Si===void 0?void 0:Si.blur,scrollTo:function(So){var Ho;return(Ho=Ir.current)===null||Ho===void 0?void 0:Ho.scrollTo(So)}}});var ga=Jt.useMemo(function(){var nn;if(Vn!=="combobox")return Mi;var Si=(nn=Qe[0])===null||nn===void 0?void 0:nn.value;return typeof Si=="string"||typeof Si=="number"?String(Si):""},[Mi,Vn,Qe]),Ze=Vn==="combobox"&&typeof qi=="function"&&qi()||null,vs=typeof $e=="function"&&$e(),mu=(0,nt.x1)(Ki,vs==null||(He=vs.props)===null||He===void 0?void 0:He.ref),Ka=Jt.useState(!1),gl=(0,ne.Z)(Ka,2),Xr=gl[0],pl=gl[1];(0,je.Z)(function(){pl(!0)},[]);var Tu=(0,be.Z)(!1,{defaultValue:Co,value:lo}),Hr=(0,ne.Z)(Tu,2),As=Hr[0],kl=Hr[1],so=Xr?As:!1,hr=!Hn&&Wn;(wi||hr&&so&&Vn==="combobox")&&(so=!1);var Zo=hr?!1:so,hi=Jt.useCallback(function(nn){var Si=nn!==void 0?nn:!so;wi||(kl(Si),so!==Si&&(jo==null||jo(Si)))},[wi,so,kl,jo]),Ns=Jt.useMemo(function(){return(ki||[]).some(function(nn){return[`
|
|
|
`,`\r
|
|
|
`].includes(nn)})},[ki]),is=function(Si,mo,So){var Ho=!0,ao=Si;jn==null||jn(null);var dr=So?null:le(Si,ki);return Vn!=="combobox"&&dr&&(ao="",Ui==null||Ui(dr),hi(!1),Ho=!1),pi&&ga!==ao&&pi(ao,{source:mo?"typing":"effect"}),Ho},Js=function(Si){!Si||!Si.trim()||pi(Si,{source:"submit"})};Jt.useEffect(function(){!so&&!$i&&Vn!=="combobox"&&is("",!1,!1)},[so]),Jt.useEffect(function(){As&&wi&&kl(!1),wi&&sa(!1)},[wi]);var ol=Bt(),ml=(0,ne.Z)(ol,2),ti=ml[0],Vr=ml[1],Is=function(Si){var mo=ti(),So=Si.which;if(So===et.Z.ENTER&&(Vn!=="combobox"&&Si.preventDefault(),so||hi(!0)),Vr(!!ga),So===et.Z.BACKSPACE&&!mo&&$i&&!ga&&Qe.length){for(var Ho=(0,te.Z)(Qe),ao=null,dr=Ho.length-1;dr>=0;dr-=1){var wr=Ho[dr];if(!wr.disabled){Ho.splice(dr,1),ao=wr;break}}ao&&zn(Ho,{type:"remove",values:[ao]})}for(var Lr=arguments.length,Ts=new Array(Lr>1?Lr-1:0),Ws=1;Ws<Lr;Ws++)Ts[Ws-1]=arguments[Ws];if(so&&Ir.current){var fs;(fs=Ir.current).onKeyDown.apply(fs,[Si].concat(Ts))}cs==null||cs.apply(void 0,[Si].concat(Ts))},ba=function(Si){for(var mo=arguments.length,So=new Array(mo>1?mo-1:0),Ho=1;Ho<mo;Ho++)So[Ho-1]=arguments[Ho];if(so&&Ir.current){var ao;(ao=Ir.current).onKeyUp.apply(ao,[Si].concat(So))}es==null||es.apply(void 0,[Si].concat(So))},Pa=function(Si){var mo=Qe.filter(function(So){return So!==Si});zn(mo,{type:"remove",values:[Si]})},vl=Jt.useRef(!1),po=function(){sa(!0),wi||(Qo&&!vl.current&&Qo.apply(void 0,arguments),Rt.includes("focus")&&hi(!0)),vl.current=!0},Bu=function(){sa(!1,function(){vl.current=!1,hi(!1)}),!wi&&(ga&&(Vn==="tags"?pi(ga,{source:"submit"}):Vn==="multiple"&&pi("",{source:"blur"})),xr&&xr.apply(void 0,arguments))},Ia=[];Jt.useEffect(function(){return function(){Ia.forEach(function(nn){return clearTimeout(nn)}),Ia.splice(0,Ia.length)}},[]);var Da=function(Si){var mo,So=Si.target,Ho=(mo=Jo.current)===null||mo===void 0?void 0:mo.getPopupElement();if(Ho&&Ho.contains(So)){var ao=setTimeout(function(){var Ts=Ia.indexOf(ao);if(Ts!==-1&&Ia.splice(Ts,1),Ys(),!Ji&&!Ho.contains(document.activeElement)){var Ws;(Ws=jr.current)===null||Ws===void 0||Ws.focus()}});Ia.push(ao)}for(var dr=arguments.length,wr=new Array(dr>1?dr-1:0),Lr=1;Lr<dr;Lr++)wr[Lr-1]=arguments[Lr];us==null||us.apply(void 0,[Si].concat(wr))},Ca=Jt.useState({}),zl=(0,ne.Z)(Ca,2),vu=zl[1];function pa(){vu({})}var Oa;vs&&(Oa=function(Si){hi(Si)}),jt(function(){var nn;return[kn.current,(nn=Jo.current)===null||nn===void 0?void 0:nn.getPopupElement()]},Zo,hi,!!vs);var Fu=Jt.useMemo(function(){return(0,Re.Z)((0,Re.Z)({},ce),{},{notFoundContent:Hn,open:so,triggerOpen:Zo,id:An,showSearch:Ko,multiple:$i,toggleOpen:hi})},[ce,Hn,Zo,so,An,Ko,$i,hi]),kh=!!uo||Qi,ch;kh&&(ch=Jt.createElement(lt,{className:pe()("".concat(Fn,"-arrow"),(0,de.Z)({},"".concat(Fn,"-arrow-loading"),Qi)),customizeIcon:uo,customizeIconProps:{loading:Qi,searchValue:ga,open:so,focused:ns,showSearch:Ko}}));var qh=function(){var Si;_n==null||_n(),(Si=jr.current)===null||Si===void 0||Si.focus(),zn([],{type:"clear",values:Qe}),is("",!1,!1)},fh=gt(Fn,qh,Qe,zi,cn,wi,ga,Vn),yu=fh.allowClear,tu=fh.clearIcon,Za=Jt.createElement(Xo,{ref:Ir}),gh=pe()(Fn,oe,(un={},(0,de.Z)(un,"".concat(Fn,"-focused"),ns),(0,de.Z)(un,"".concat(Fn,"-multiple"),$i),(0,de.Z)(un,"".concat(Fn,"-single"),!$i),(0,de.Z)(un,"".concat(Fn,"-allow-clear"),zi),(0,de.Z)(un,"".concat(Fn,"-show-arrow"),kh),(0,de.Z)(un,"".concat(Fn,"-disabled"),wi),(0,de.Z)(un,"".concat(Fn,"-loading"),Qi),(0,de.Z)(un,"".concat(Fn,"-open"),so),(0,de.Z)(un,"".concat(Fn,"-customize-input"),Ze),(0,de.Z)(un,"".concat(Fn,"-show-search"),Ko),un)),ph=Jt.createElement(St,{ref:Jo,disabled:wi,prefixCls:Fn,visible:Zo,popupElement:Za,animation:sn,transitionName:ho,dropdownStyle:Er,dropdownClassName:zo,direction:Jn,dropdownMatchSelectWidth:Fr,dropdownRender:mr,dropdownAlign:Di,placement:Li,builtinPlacements:yo,getPopupContainer:bo,empty:Wn,getTriggerDOMNode:function(){return Ki.current},onPopupVisibleChange:Oa,onPopupMouseEnter:pa},vs?Jt.cloneElement(vs,{ref:mu}):Jt.createElement(ui,(0,wt.Z)({},ce,{domRef:Ki,prefixCls:Fn,inputElement:Ze,ref:jr,id:An,showSearch:Ko,autoClearSearchValue:vi,mode:Vn,activeDescendantId:qn,tagRender:bn,values:Qe,open:so,onToggleOpen:hi,activeValue:Ue,searchValue:ga,onSearch:is,onSearchSubmit:Js,onRemove:Pa,tokenWithEnter:Ns}))),Iu;return vs?Iu=ph:Iu=Jt.createElement("div",(0,wt.Z)({className:gh},ro,{ref:kn,onMouseDown:Da,onKeyDown:Is,onKeyUp:ba,onFocus:po,onBlur:Bu}),ns&&!so&&Jt.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Qe.map(function(nn){var Si=nn.label,mo=nn.value;return["number","string"].includes((0,Tt.Z)(Si))?Si:mo}).join(", "))),ph,ch,yu&&tu),Jt.createElement(vt.Provider,{value:Fu},Iu)}),Te=ue,vn=function(ce,qt){var He=Jt.useRef({values:new Map,options:new Map}),un=Jt.useMemo(function(){var Fn=He.current,oe=Fn.values,qe=Fn.options,bn=ce.map(function(Qe){if(Qe.label===void 0){var zn;return(0,Re.Z)((0,Re.Z)({},Qe),{},{label:(zn=oe.get(Qe.value))===null||zn===void 0?void 0:zn.label})}return Qe}),Jn=new Map,Ke=new Map;return bn.forEach(function(Qe){Jn.set(Qe.value,Qe),Ke.set(Qe.value,qt.get(Qe.value)||qe.get(Qe.value))}),He.current.values=Jn,He.current.options=Ke,bn},[ce,qt]),An=Jt.useCallback(function(Fn){return qt.get(Fn)||He.current.options.get(Fn)},[qt]);return[un,An]};function fn(ce,qt){return Oe(ce).join("").toUpperCase().includes(qt)}var en=function(ce,qt,He,un,An){return Jt.useMemo(function(){if(!He||un===!1)return ce;var Fn=qt.options,oe=qt.label,qe=qt.value,bn=[],Jn=typeof un=="function",Ke=He.toUpperCase(),Qe=Jn?un:function(Wn,fi){return An?fn(fi[An],Ke):fi[Fn]?fn(fi[oe!=="children"?oe:"label"],Ke):fn(fi[qe],Ke)},zn=Jn?function(Wn){return De(Wn)}:function(Wn){return Wn};return ce.forEach(function(Wn){if(Wn[Fn]){var fi=Qe(He,zn(Wn));if(fi)bn.push(Wn);else{var Hn=Wn[Fn].filter(function(_n){return Qe(He,zn(_n))});Hn.length&&bn.push((0,Re.Z)((0,Re.Z)({},Wn),{},(0,de.Z)({},Fn,Hn)))}return}Qe(He,zn(Wn))&&bn.push(Wn)}),bn},[ce,un,An,He,qt])},xn=bt(17115),ln=bt(11592),tn=["children","value"],ii=["children"];function ri(ce){var qt=ce,He=qt.key,un=qt.props,An=un.children,Fn=un.value,oe=(0,ae.Z)(un,tn);return(0,Re.Z)({key:He,value:Fn!==void 0?Fn:He,children:An},oe)}function Un(ce){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ln.Z)(ce).map(function(He,un){if(!Jt.isValidElement(He)||!He.type)return null;var An=He,Fn=An.type.isSelectOptGroup,oe=An.key,qe=An.props,bn=qe.children,Jn=(0,ae.Z)(qe,ii);return qt||!Fn?ri(He):(0,Re.Z)((0,Re.Z)({key:"__RC_SELECT_GRP__".concat(oe===null?un:oe,"__"),label:oe},Jn),{},{options:Un(bn)})}).filter(function(He){return He})}function si(ce,qt,He,un,An){return Jt.useMemo(function(){var Fn=ce,oe=!ce;oe&&(Fn=Un(qt));var qe=new Map,bn=new Map,Jn=function(zn,Wn,fi){fi&&typeof fi=="string"&&zn.set(Wn[fi],Wn)};function Ke(Qe){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wn=0;Wn<Qe.length;Wn+=1){var fi=Qe[Wn];!fi[He.options]||zn?(qe.set(fi[He.value],fi),Jn(bn,fi,He.label),Jn(bn,fi,un),Jn(bn,fi,An)):Ke(fi[He.options],!0)}}return Ke(Fn),{options:Fn,valueOptions:qe,labelOptions:bn}},[ce,qt,He,un,An])}function mi(ce){var qt=Jt.useRef();qt.current=ce;var He=Jt.useCallback(function(){return qt.current.apply(qt,arguments)},[]);return He}var Hi=function(){return null};Hi.isSelectOptGroup=!0;var Xi=Hi,Lo=function(){return null};Lo.isSelectOption=!0;var Oo=Lo,No=bt(80547),Io=bt(2738),_o=bt(45680),qo=Jt.createContext(null),Ni=qo;function $o(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Ro=["disabled","title","children","style","className"];function Mt(ce){return typeof ce=="string"||typeof ce=="number"}var cr=function(qt,He){var un=Pt(),An=un.prefixCls,Fn=un.id,oe=un.open,qe=un.multiple,bn=un.mode,Jn=un.searchValue,Ke=un.toggleOpen,Qe=un.notFoundContent,zn=un.onPopupScroll,Wn=Jt.useContext(Ni),fi=Wn.flattenOptions,Hn=Wn.onActiveValue,_n=Wn.defaultActiveFirstOption,Vn=Wn.onSelect,wi=Wn.menuItemSelectedIcon,Qi=Wn.rawValues,qi=Wn.fieldNames,$e=Wn.virtual,lo=Wn.direction,Co=Wn.listHeight,jo=Wn.listItemHeight,Ue="".concat(An,"-item"),jn=(0,No.Z)(function(){return fi},[oe,fi],function(Di,Li){return Li[0]&&Di[1]!==Li[1]}),qn=Jt.useRef(null),Mi=function(Li){Li.preventDefault()},vi=function(Li){qn.current&&qn.current.scrollTo(typeof Li=="number"?{index:Li}:Li)},pi=function(Li){for(var yo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,bo=jn.length,Xn=0;Xn<bo;Xn+=1){var Rt=(Li+Xn*yo+bo)%bo,Qo=jn[Rt],xr=Qo.group,es=Qo.data;if(!xr&&!es.disabled)return Rt}return-1},Ui=Jt.useState(function(){return pi(0)}),ki=(0,ne.Z)(Ui,2),zi=ki[0],uo=ki[1],cn=function(Li){var yo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;uo(Li);var bo={source:yo?"keyboard":"mouse"},Xn=jn[Li];if(!Xn){Hn(null,-1,bo);return}Hn(Xn.value,Li,bo)};(0,Jt.useEffect)(function(){cn(_n!==!1?pi(0):-1)},[jn.length,Jn]);var Xo=Jt.useCallback(function(Di){return Qi.has(Di)&&bn!=="combobox"},[bn,(0,te.Z)(Qi).toString(),Qi.size]);(0,Jt.useEffect)(function(){var Di=setTimeout(function(){if(!qe&&oe&&Qi.size===1){var yo=Array.from(Qi)[0],bo=jn.findIndex(function(Xn){var Rt=Xn.data;return Rt.value===yo});bo!==-1&&(cn(bo),vi(bo))}});if(oe){var Li;(Li=qn.current)===null||Li===void 0||Li.scrollTo(void 0)}return function(){return clearTimeout(Di)}},[oe,Jn,fi.length]);var sn=function(Li){Li!==void 0&&Vn(Li,{selected:!Qi.has(Li)}),qe||Ke(!1)};if(Jt.useImperativeHandle(He,function(){return{onKeyDown:function(Li){var yo=Li.which,bo=Li.ctrlKey;switch(yo){case et.Z.N:case et.Z.P:case et.Z.UP:case et.Z.DOWN:{var Xn=0;if(yo===et.Z.UP?Xn=-1:yo===et.Z.DOWN?Xn=1:$o()&&bo&&(yo===et.Z.N?Xn=1:yo===et.Z.P&&(Xn=-1)),Xn!==0){var Rt=pi(zi+Xn,Xn);vi(Rt),cn(Rt,!0)}break}case et.Z.ENTER:{var Qo=jn[zi];Qo&&!Qo.data.disabled?sn(Qo.value):sn(void 0),oe&&Li.preventDefault();break}case et.Z.ESC:Ke(!1),oe&&Li.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Li){vi(Li)}}}),jn.length===0)return Jt.createElement("div",{role:"listbox",id:"".concat(Fn,"_list"),className:"".concat(Ue,"-empty"),onMouseDown:Mi},Qe);var ho=Object.keys(qi).map(function(Di){return qi[Di]}),Er=function(Li){return Li.label};function zo(Di,Li){var yo=Di.group;return{role:yo?"presentation":"option",id:"".concat(Fn,"_list_").concat(Li)}}var Fr=function(Li){var yo=jn[Li];if(!yo)return null;var bo=yo.data||{},Xn=bo.value,Rt=yo.group,Qo=(0,_t.Z)(bo,!0),xr=Er(yo);return yo?Jt.createElement("div",(0,wt.Z)({"aria-label":typeof xr=="string"&&!Rt?xr:null},Qo,{key:Li},zo(yo,Li),{"aria-selected":Xo(Xn)}),Xn):null},mr={role:"listbox",id:"".concat(Fn,"_list")};return Jt.createElement(Jt.Fragment,null,$e&&Jt.createElement("div",(0,wt.Z)({},mr,{style:{height:0,width:0,overflow:"hidden"}}),Fr(zi-1),Fr(zi),Fr(zi+1)),Jt.createElement(_o.Z,{itemKey:"key",ref:qn,data:jn,height:Co,itemHeight:jo,fullHeight:!1,onMouseDown:Mi,onScroll:zn,virtual:$e,direction:lo,innerProps:$e?null:mr},function(Di,Li){var yo,bo=Di.group,Xn=Di.groupOption,Rt=Di.data,Qo=Di.label,xr=Di.value,es=Rt.key;if(bo){var cs,us=(cs=Rt.title)!==null&&cs!==void 0?cs:Mt(Qo)?Qo.toString():void 0;return Jt.createElement("div",{className:pe()(Ue,"".concat(Ue,"-group")),title:us},Qo!==void 0?Qo:es)}var no=Rt.disabled,$i=Rt.title,Ko=Rt.children,ro=Rt.style,lr=Rt.className,ms=(0,ae.Z)(Rt,Ro),Ji=(0,Io.Z)(ms,ho),Ti=Xo(xr),kn="".concat(Ue,"-option"),Ki=pe()(Ue,kn,lr,(yo={},(0,de.Z)(yo,"".concat(kn,"-grouped"),Xn),(0,de.Z)(yo,"".concat(kn,"-active"),zi===Li&&!no),(0,de.Z)(yo,"".concat(kn,"-disabled"),no),(0,de.Z)(yo,"".concat(kn,"-selected"),Ti),yo)),Jo=Er(Di),jr=!wi||typeof wi=="function"||Ti,Ir=typeof Jo=="number"?Jo:Jo||xr,Ur=Mt(Ir)?Ir.toString():void 0;return $i!==void 0&&(Ur=$i),Jt.createElement("div",(0,wt.Z)({},(0,_t.Z)(Ji),$e?{}:zo(Di,Li),{"aria-selected":Ti,className:Ki,title:Ur,onMouseMove:function(){zi===Li||no||cn(Li)},onClick:function(){no||sn(xr)},style:ro}),Jt.createElement("div",{className:"".concat(kn,"-content")},Ir),Jt.isValidElement(wi)||Ti,jr&&Jt.createElement(lt,{className:"".concat(Ue,"-option-state"),customizeIcon:wi,customizeIconProps:{isSelected:Ti}},Ti?"\u2713":null))}))},ir=Jt.forwardRef(cr);ir.displayName="OptionList";var pr=ir;function ts(ce){var qt=ce.mode,He=ce.options,un=ce.children,An=ce.backfill,Fn=ce.allowClear,oe=ce.placeholder,qe=ce.getInputElement,bn=ce.showSearch,Jn=ce.onSearch,Ke=ce.defaultOpen,Qe=ce.autoFocus,zn=ce.labelInValue,Wn=ce.value,fi=ce.inputValue,Hn=ce.optionLabelProp,_n=isMultiple(qt),Vn=bn!==void 0?bn:_n||qt==="combobox",wi=He||convertChildrenToData(un);if(warning(qt!=="tags"||wi.every(function(lo){return!lo.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),qt==="tags"||qt==="combobox"){var Qi=wi.some(function(lo){return lo.options?lo.options.some(function(Co){return typeof("value"in Co?Co.value:Co.key)=="number"}):typeof("value"in lo?lo.value:lo.key)=="number"});warning(!Qi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(qt!=="combobox"||!Hn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(qt==="combobox"||!An,"`backfill` only works with `combobox` mode."),warning(qt==="combobox"||!qe,"`getInputElement` only work with `combobox` mode."),noteOnce(qt!=="combobox"||!qe||!Fn||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Jn&&!Vn&&qt!=="combobox"&&qt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ke||Qe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Wn!=null){var qi=toArray(Wn);warning(!zn||qi.every(function(lo){return _typeof(lo)==="object"&&("key"in lo||"value"in lo)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!_n||Array.isArray(Wn),"`value` should be array when `mode` is `multiple` or `tags`")}if(un){var $e=null;toNodeArray(un).some(function(lo){if(!React.isValidElement(lo)||!lo.type)return!1;var Co=lo,jo=Co.type;if(jo.isSelectOption)return!1;if(jo.isSelectOptGroup){var Ue=toNodeArray(lo.props.children).every(function(jn){return!React.isValidElement(jn)||!lo.type||jn.type.isSelectOption?!0:($e=jn.type,!1)});return!Ue}return $e=jo,!0}),$e&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat($e.displayName||$e.name||$e,"`.")),warning(fi===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function rs(ce,qt){if(ce){var He=function un(An){for(var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,oe=0;oe<An.length;oe++){var qe=An[oe];if(qe[qt==null?void 0:qt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Fn&&Array.isArray(qe[qt==null?void 0:qt.options])&&un(qe[qt==null?void 0:qt.options],!0))break}};He(ce)}}var ls=null,Ci=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],oi=["inputValue"];function Ie(ce){return!ce||(0,Tt.Z)(ce)!=="object"}var Le=Jt.forwardRef(function(ce,qt){var He=ce.id,un=ce.mode,An=ce.prefixCls,Fn=An===void 0?"rc-select":An,oe=ce.backfill,qe=ce.fieldNames,bn=ce.inputValue,Jn=ce.searchValue,Ke=ce.onSearch,Qe=ce.autoClearSearchValue,zn=Qe===void 0?!0:Qe,Wn=ce.onSelect,fi=ce.onDeselect,Hn=ce.dropdownMatchSelectWidth,_n=Hn===void 0?!0:Hn,Vn=ce.filterOption,wi=ce.filterSort,Qi=ce.optionFilterProp,qi=ce.optionLabelProp,$e=ce.options,lo=ce.children,Co=ce.defaultActiveFirstOption,jo=ce.menuItemSelectedIcon,Ue=ce.virtual,jn=ce.direction,qn=ce.listHeight,Mi=qn===void 0?200:qn,vi=ce.listItemHeight,pi=vi===void 0?20:vi,Ui=ce.value,ki=ce.defaultValue,zi=ce.labelInValue,uo=ce.onChange,cn=(0,ae.Z)(ce,Ci),Xo=(0,xn.ZP)(He),sn=xe(un),ho=!!(!$e&&lo),Er=Jt.useMemo(function(){return Vn===void 0&&un==="combobox"?!1:Vn},[Vn,un]),zo=Jt.useMemo(function(){return xt(qe,ho)},[JSON.stringify(qe),ho]),Fr=(0,be.Z)("",{value:Jn!==void 0?Jn:bn,postState:function(hr){return hr||""}}),mr=(0,ne.Z)(Fr,2),Di=mr[0],Li=mr[1],yo=si($e,lo,zo,Qi,qi),bo=yo.valueOptions,Xn=yo.labelOptions,Rt=yo.options,Qo=Jt.useCallback(function(so){var hr=Oe(so);return hr.map(function(Zo){var hi,Ns,is,Js,ol;if(Ie(Zo))hi=Zo;else{var ml;is=Zo.key,Ns=Zo.label,hi=(ml=Zo.value)!==null&&ml!==void 0?ml:is}var ti=bo.get(hi);if(ti){var Vr;if(Ns===void 0&&(Ns=ti==null?void 0:ti[qi||zo.label]),is===void 0&&(is=(Vr=ti==null?void 0:ti.key)!==null&&Vr!==void 0?Vr:hi),Js=ti==null?void 0:ti.disabled,ol=ti==null?void 0:ti.title,0)var Is}return{label:Ns,value:hi,key:is,disabled:Js,title:ol}})},[zo,qi,bo]),xr=(0,be.Z)(ki,{value:Ui}),es=(0,ne.Z)(xr,2),cs=es[0],us=es[1],no=Jt.useMemo(function(){var so,hr=Qo(cs);return un==="combobox"&&Je((so=hr[0])===null||so===void 0?void 0:so.value)?[]:hr},[cs,Qo,un]),$i=vn(no,bo),Ko=(0,ne.Z)($i,2),ro=Ko[0],lr=Ko[1],ms=Jt.useMemo(function(){if(!un&&ro.length===1){var so=ro[0];if(so.value===null&&(so.label===null||so.label===void 0))return[]}return ro.map(function(hr){var Zo;return(0,Re.Z)((0,Re.Z)({},hr),{},{label:(Zo=hr.label)!==null&&Zo!==void 0?Zo:hr.value})})},[un,ro]),Ji=Jt.useMemo(function(){return new Set(ro.map(function(so){return so.value}))},[ro]);Jt.useEffect(function(){if(un==="combobox"){var so,hr=(so=ro[0])===null||so===void 0?void 0:so.value;Li(Xe(hr)?String(hr):"")}},[ro]);var Ti=mi(function(so,hr){var Zo,hi=hr!=null?hr:so;return Zo={},(0,de.Z)(Zo,zo.value,so),(0,de.Z)(Zo,zo.label,hi),Zo}),kn=Jt.useMemo(function(){if(un!=="tags")return Rt;var so=(0,te.Z)(Rt),hr=function(hi){return bo.has(hi)};return(0,te.Z)(ro).sort(function(Zo,hi){return Zo.value<hi.value?-1:1}).forEach(function(Zo){var hi=Zo.value;hr(hi)||so.push(Ti(hi,Zo.label))}),so},[Ti,Rt,bo,ro,un]),Ki=en(kn,zo,Di,Er,Qi),Jo=Jt.useMemo(function(){return un!=="tags"||!Di||Ki.some(function(so){return so[Qi||"value"]===Di})||Ki.some(function(so){return so[zo.value]===Di})?Ki:[Ti(Di)].concat((0,te.Z)(Ki))},[Ti,Qi,un,Ki,Di,zo]),jr=Jt.useMemo(function(){return wi?(0,te.Z)(Jo).sort(function(so,hr){return wi(so,hr)}):Jo},[Jo,wi]),Ir=Jt.useMemo(function(){return Me(jr,{fieldNames:zo,childrenAsData:ho})},[jr,zo,ho]),Ur=function(hr){var Zo=Qo(hr);if(us(Zo),uo&&(Zo.length!==ro.length||Zo.some(function(is,Js){var ol;return((ol=ro[Js])===null||ol===void 0?void 0:ol.value)!==(is==null?void 0:is.value)}))){var hi=zi?Zo:Zo.map(function(is){return is.value}),Ns=Zo.map(function(is){return De(lr(is.value))});uo(sn?hi:hi[0],sn?Ns:Ns[0])}},hs=Jt.useState(null),ns=(0,ne.Z)(hs,2),sa=ns[0],Ys=ns[1],ga=Jt.useState(0),Ze=(0,ne.Z)(ga,2),vs=Ze[0],mu=Ze[1],Ka=Co!==void 0?Co:un!=="combobox",gl=Jt.useCallback(function(so,hr){var Zo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},hi=Zo.source,Ns=hi===void 0?"keyboard":hi;mu(hr),oe&&un==="combobox"&&so!==null&&Ns==="keyboard"&&Ys(String(so))},[oe,un]),Xr=function(hr,Zo,hi){var Ns=function(){var vl,po=lr(hr);return[zi?{label:po==null?void 0:po[zo.label],value:hr,key:(vl=po==null?void 0:po.key)!==null&&vl!==void 0?vl:hr}:hr,De(po)]};if(Zo&&Wn){var is=Ns(),Js=(0,ne.Z)(is,2),ol=Js[0],ml=Js[1];Wn(ol,ml)}else if(!Zo&&fi&&hi!=="clear"){var ti=Ns(),Vr=(0,ne.Z)(ti,2),Is=Vr[0],ba=Vr[1];fi(Is,ba)}},pl=mi(function(so,hr){var Zo,hi=sn?hr.selected:!0;hi?Zo=sn?[].concat((0,te.Z)(ro),[so]):[so]:Zo=ro.filter(function(Ns){return Ns.value!==so}),Ur(Zo),Xr(so,hi),un==="combobox"?Ys(""):(!xe||zn)&&(Li(""),Ys(""))}),Tu=function(hr,Zo){Ur(hr);var hi=Zo.type,Ns=Zo.values;(hi==="remove"||hi==="clear")&&Ns.forEach(function(is){Xr(is.value,!1,hi)})},Hr=function(hr,Zo){if(Li(hr),Ys(null),Zo.source==="submit"){var hi=(hr||"").trim();if(hi){var Ns=Array.from(new Set([].concat((0,te.Z)(Ji),[hi])));Ur(Ns),Xr(hi,!0),Li("")}return}Zo.source!=="blur"&&(un==="combobox"&&Ur(hr),Ke==null||Ke(hr))},As=function(hr){var Zo=hr;un!=="tags"&&(Zo=hr.map(function(Ns){var is=Xn.get(Ns);return is==null?void 0:is.value}).filter(function(Ns){return Ns!==void 0}));var hi=Array.from(new Set([].concat((0,te.Z)(Ji),(0,te.Z)(Zo))));Ur(hi),hi.forEach(function(Ns){Xr(Ns,!0)})},kl=Jt.useMemo(function(){var so=Ue!==!1&&_n!==!1;return(0,Re.Z)((0,Re.Z)({},yo),{},{flattenOptions:Ir,onActiveValue:gl,defaultActiveFirstOption:Ka,onSelect:pl,menuItemSelectedIcon:jo,rawValues:Ji,fieldNames:zo,virtual:so,direction:jn,listHeight:Mi,listItemHeight:pi,childrenAsData:ho})},[yo,Ir,gl,Ka,pl,jo,Ji,zo,Ue,_n,Mi,pi,ho]);return Jt.createElement(Ni.Provider,{value:kl},Jt.createElement(Te,(0,wt.Z)({},cn,{id:Xo,prefixCls:Fn,ref:qt,omitDomProps:oi,mode:un,displayValues:ms,onDisplayValuesChange:Tu,direction:jn,searchValue:Di,onSearch:Hr,autoClearSearchValue:zn,onSearchSplit:As,dropdownMatchSelectWidth:_n,OptionList:pr,emptyOptions:!Ir.length,activeValue:sa,activeDescendantId:"".concat(Xo,"_list_").concat(vs)})))}),Gt=Le;Gt.Option=Oo,Gt.OptGroup=Xi;var We=Gt,Ye=We},39417:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return _t}});var wt=bt(72308),te=bt(49618),de=bt(74416),Re=bt(77321),ne=bt(96949),ae=bt(55090),Tt=bt(80237),be=bt(77205),ye=bt(38793),Jt=bt(92310),Be=bt.n(Jt),pe=bt(26112),je=bt(59301),Nt=bt(39378),et=function(Vt){for(var he=Vt.prefixCls,Zt=Vt.level,Oe=Vt.isStart,me=Vt.isEnd,Ve="".concat(he,"-indent-unit"),Xe=[],Je=0;Je<Zt;Je+=1){var wn;Xe.push(je.createElement("span",{key:Je,className:Be()(Ve,(wn={},(0,te.Z)(wn,"".concat(Ve,"-start"),Oe[Je]),(0,te.Z)(wn,"".concat(Ve,"-end"),me[Je]),wn))}))}return je.createElement("span",{"aria-hidden":"true",className:"".concat(he,"-indent")},Xe)},nt=je.memo(et),ht=bt(67841),lt=bt(71430),gt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],vt="open",Pt="close",At="---",Bt=function(se){(0,be.Z)(he,se);var Vt=(0,ye.Z)(he);function he(){var Zt;(0,ne.Z)(this,he);for(var Oe=arguments.length,me=new Array(Oe),Ve=0;Ve<Oe;Ve++)me[Ve]=arguments[Ve];return Zt=Vt.call.apply(Vt,[this].concat(me)),Zt.state={dragNodeHighlight:!1},Zt.selectHandle=void 0,Zt.cacheIndent=void 0,Zt.onSelectorClick=function(Xe){var Je=Zt.props.context.onNodeClick;Je(Xe,(0,lt.F)(Zt.props)),Zt.isSelectable()?Zt.onSelect(Xe):Zt.onCheck(Xe)},Zt.onSelectorDoubleClick=function(Xe){var Je=Zt.props.context.onNodeDoubleClick;Je(Xe,(0,lt.F)(Zt.props))},Zt.onSelect=function(Xe){if(!Zt.isDisabled()){var Je=Zt.props.context.onNodeSelect;Je(Xe,(0,lt.F)(Zt.props))}},Zt.onCheck=function(Xe){if(!Zt.isDisabled()){var Je=Zt.props,wn=Je.disableCheckbox,Mn=Je.checked,we=Zt.props.context.onNodeCheck;if(!(!Zt.isCheckable()||wn)){var Yt=!Mn;we(Xe,(0,lt.F)(Zt.props),Yt)}}},Zt.onMouseEnter=function(Xe){var Je=Zt.props.context.onNodeMouseEnter;Je(Xe,(0,lt.F)(Zt.props))},Zt.onMouseLeave=function(Xe){var Je=Zt.props.context.onNodeMouseLeave;Je(Xe,(0,lt.F)(Zt.props))},Zt.onContextMenu=function(Xe){var Je=Zt.props.context.onNodeContextMenu;Je(Xe,(0,lt.F)(Zt.props))},Zt.onDragStart=function(Xe){var Je=Zt.props.context.onNodeDragStart;Xe.stopPropagation(),Zt.setState({dragNodeHighlight:!0}),Je(Xe,(0,Tt.Z)(Zt));try{Xe.dataTransfer.setData("text/plain","")}catch(wn){}},Zt.onDragEnter=function(Xe){var Je=Zt.props.context.onNodeDragEnter;Xe.preventDefault(),Xe.stopPropagation(),Je(Xe,(0,Tt.Z)(Zt))},Zt.onDragOver=function(Xe){var Je=Zt.props.context.onNodeDragOver;Xe.preventDefault(),Xe.stopPropagation(),Je(Xe,(0,Tt.Z)(Zt))},Zt.onDragLeave=function(Xe){var Je=Zt.props.context.onNodeDragLeave;Xe.stopPropagation(),Je(Xe,(0,Tt.Z)(Zt))},Zt.onDragEnd=function(Xe){var Je=Zt.props.context.onNodeDragEnd;Xe.stopPropagation(),Zt.setState({dragNodeHighlight:!1}),Je(Xe,(0,Tt.Z)(Zt))},Zt.onDrop=function(Xe){var Je=Zt.props.context.onNodeDrop;Xe.preventDefault(),Xe.stopPropagation(),Zt.setState({dragNodeHighlight:!1}),Je(Xe,(0,Tt.Z)(Zt))},Zt.onExpand=function(Xe){var Je=Zt.props,wn=Je.loading,Mn=Je.context.onNodeExpand;wn||Mn(Xe,(0,lt.F)(Zt.props))},Zt.setSelectHandle=function(Xe){Zt.selectHandle=Xe},Zt.getNodeState=function(){var Xe=Zt.props.expanded;return Zt.isLeaf()?null:Xe?vt:Pt},Zt.hasChildren=function(){var Xe=Zt.props.eventKey,Je=Zt.props.context.keyEntities,wn=(0,ht.Z)(Je,Xe)||{},Mn=wn.children;return!!(Mn||[]).length},Zt.isLeaf=function(){var Xe=Zt.props,Je=Xe.isLeaf,wn=Xe.loaded,Mn=Zt.props.context.loadData,we=Zt.hasChildren();return Je===!1?!1:Je||!Mn&&!we||Mn&&wn&&!we},Zt.isDisabled=function(){var Xe=Zt.props.disabled,Je=Zt.props.context.disabled;return!!(Je||Xe)},Zt.isCheckable=function(){var Xe=Zt.props.checkable,Je=Zt.props.context.checkable;return!Je||Xe===!1?!1:Je},Zt.syncLoadData=function(Xe){var Je=Xe.expanded,wn=Xe.loading,Mn=Xe.loaded,we=Zt.props.context,Yt=we.loadData,_e=we.onNodeLoad;wn||Yt&&Je&&!Zt.isLeaf()&&!Zt.hasChildren()&&!Mn&&_e((0,lt.F)(Zt.props))},Zt.isDraggable=function(){var Xe=Zt.props,Je=Xe.data,wn=Xe.context.draggable;return!!(wn&&(!wn.nodeDraggable||wn.nodeDraggable(Je)))},Zt.renderDragHandler=function(){var Xe=Zt.props.context,Je=Xe.draggable,wn=Xe.prefixCls;return Je!=null&&Je.icon?je.createElement("span",{className:"".concat(wn,"-draggable-icon")},Je.icon):null},Zt.renderSwitcherIconDom=function(Xe){var Je=Zt.props.switcherIcon,wn=Zt.props.context.switcherIcon,Mn=Je||wn;return typeof Mn=="function"?Mn((0,Re.Z)((0,Re.Z)({},Zt.props),{},{isLeaf:Xe})):Mn},Zt.renderSwitcher=function(){var Xe=Zt.props.expanded,Je=Zt.props.context.prefixCls;if(Zt.isLeaf()){var wn=Zt.renderSwitcherIconDom(!0);return wn!==!1?je.createElement("span",{className:Be()("".concat(Je,"-switcher"),"".concat(Je,"-switcher-noop"))},wn):null}var Mn=Be()("".concat(Je,"-switcher"),"".concat(Je,"-switcher_").concat(Xe?vt:Pt)),we=Zt.renderSwitcherIconDom(!1);return we!==!1?je.createElement("span",{onClick:Zt.onExpand,className:Mn},we):null},Zt.renderCheckbox=function(){var Xe=Zt.props,Je=Xe.checked,wn=Xe.halfChecked,Mn=Xe.disableCheckbox,we=Zt.props.context.prefixCls,Yt=Zt.isDisabled(),_e=Zt.isCheckable();if(!_e)return null;var Zn=typeof _e!="boolean"?_e:null;return je.createElement("span",{className:Be()("".concat(we,"-checkbox"),Je&&"".concat(we,"-checkbox-checked"),!Je&&wn&&"".concat(we,"-checkbox-indeterminate"),(Yt||Mn)&&"".concat(we,"-checkbox-disabled")),onClick:Zt.onCheck},Zn)},Zt.renderIcon=function(){var Xe=Zt.props.loading,Je=Zt.props.context.prefixCls;return je.createElement("span",{className:Be()("".concat(Je,"-iconEle"),"".concat(Je,"-icon__").concat(Zt.getNodeState()||"docu"),Xe&&"".concat(Je,"-icon_loading"))})},Zt.renderSelector=function(){var Xe=Zt.state.dragNodeHighlight,Je=Zt.props,wn=Je.title,Mn=wn===void 0?At:wn,we=Je.selected,Yt=Je.icon,_e=Je.loading,Zn=Je.data,Dn=Zt.props.context,Ne=Dn.prefixCls,pn=Dn.showIcon,Tn=Dn.icon,Yn=Dn.loadData,mn=Dn.titleRender,ui=Zt.isDisabled(),Ce="".concat(Ne,"-node-content-wrapper"),$n;if(pn){var Pi=Yt||Tn;$n=Pi?je.createElement("span",{className:Be()("".concat(Ne,"-iconEle"),"".concat(Ne,"-icon__customize"))},typeof Pi=="function"?Pi(Zt.props):Pi):Zt.renderIcon()}else Yn&&_e&&($n=Zt.renderIcon());var Ot;typeof Mn=="function"?Ot=Mn(Zn):mn?Ot=mn(Zn):Ot=Mn;var Lt=je.createElement("span",{className:"".concat(Ne,"-title")},Ot);return je.createElement("span",{ref:Zt.setSelectHandle,title:typeof Mn=="string"?Mn:"",className:Be()("".concat(Ce),"".concat(Ce,"-").concat(Zt.getNodeState()||"normal"),!ui&&(we||Xe)&&"".concat(Ne,"-node-selected")),onMouseEnter:Zt.onMouseEnter,onMouseLeave:Zt.onMouseLeave,onContextMenu:Zt.onContextMenu,onClick:Zt.onSelectorClick,onDoubleClick:Zt.onSelectorDoubleClick},$n,Lt,Zt.renderDropIndicator())},Zt.renderDropIndicator=function(){var Xe=Zt.props,Je=Xe.disabled,wn=Xe.eventKey,Mn=Zt.props.context,we=Mn.draggable,Yt=Mn.dropLevelOffset,_e=Mn.dropPosition,Zn=Mn.prefixCls,Dn=Mn.indent,Ne=Mn.dropIndicatorRender,pn=Mn.dragOverNodeKey,Tn=Mn.direction,Yn=!!we,mn=!Je&&Yn&&pn===wn,ui=Dn!=null?Dn:Zt.cacheIndent;return Zt.cacheIndent=Dn,mn?Ne({dropPosition:_e,dropLevelOffset:Yt,indent:ui,prefixCls:Zn,direction:Tn}):null},Zt}return(0,ae.Z)(he,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Oe=this.props.selectable,me=this.props.context.selectable;return typeof Oe=="boolean"?Oe:me}},{key:"render",value:function(){var Oe,me=this.props,Ve=me.eventKey,Xe=me.className,Je=me.style,wn=me.dragOver,Mn=me.dragOverGapTop,we=me.dragOverGapBottom,Yt=me.isLeaf,_e=me.isStart,Zn=me.isEnd,Dn=me.expanded,Ne=me.selected,pn=me.checked,Tn=me.halfChecked,Yn=me.loading,mn=me.domRef,ui=me.active,Ce=me.data,$n=me.onMouseMove,Pi=me.selectable,Ot=(0,de.Z)(me,gt),Lt=this.props.context,St=Lt.prefixCls,It=Lt.filterTreeNode,Kt=Lt.keyEntities,xt=Lt.dropContainerKey,Me=Lt.dropTargetKey,De=Lt.draggingNodeKey,le=this.isDisabled(),ee=(0,pe.Z)(Ot,{aria:!0,data:!0}),Se=(0,ht.Z)(Kt,Ve)||{},xe=Se.level,ue=Zn[Zn.length-1],Te=this.isDraggable(),vn=!le&&Te,fn=De===Ve,en=Pi!==void 0?{"aria-selected":!!Pi}:void 0;return je.createElement("div",(0,wt.Z)({ref:mn,className:Be()(Xe,"".concat(St,"-treenode"),(Oe={},(0,te.Z)(Oe,"".concat(St,"-treenode-disabled"),le),(0,te.Z)(Oe,"".concat(St,"-treenode-switcher-").concat(Dn?"open":"close"),!Yt),(0,te.Z)(Oe,"".concat(St,"-treenode-checkbox-checked"),pn),(0,te.Z)(Oe,"".concat(St,"-treenode-checkbox-indeterminate"),Tn),(0,te.Z)(Oe,"".concat(St,"-treenode-selected"),Ne),(0,te.Z)(Oe,"".concat(St,"-treenode-loading"),Yn),(0,te.Z)(Oe,"".concat(St,"-treenode-active"),ui),(0,te.Z)(Oe,"".concat(St,"-treenode-leaf-last"),ue),(0,te.Z)(Oe,"".concat(St,"-treenode-draggable"),Te),(0,te.Z)(Oe,"dragging",fn),(0,te.Z)(Oe,"drop-target",Me===Ve),(0,te.Z)(Oe,"drop-container",xt===Ve),(0,te.Z)(Oe,"drag-over",!le&&wn),(0,te.Z)(Oe,"drag-over-gap-top",!le&&Mn),(0,te.Z)(Oe,"drag-over-gap-bottom",!le&&we),(0,te.Z)(Oe,"filter-node",It&&It((0,lt.F)(this.props))),Oe)),style:Je,draggable:vn,"aria-grabbed":fn,onDragStart:vn?this.onDragStart:void 0,onDragEnter:Te?this.onDragEnter:void 0,onDragOver:Te?this.onDragOver:void 0,onDragLeave:Te?this.onDragLeave:void 0,onDrop:Te?this.onDrop:void 0,onDragEnd:Te?this.onDragEnd:void 0,onMouseMove:$n},en,ee),je.createElement(nt,{prefixCls:St,level:xe,isStart:_e,isEnd:Zn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),he}(je.Component),jt=function(Vt){return je.createElement(Nt.k.Consumer,null,function(he){return je.createElement(Bt,(0,wt.Z)({},Vt,{context:he}))})};jt.displayName="TreeNode",jt.isTreeNode=1;var _t=jt},39378:function(gn,Ln,bt){"use strict";bt.d(Ln,{k:function(){return te}});var wt=bt(59301),te=wt.createContext(null)},54844:function(gn,Ln,bt){"use strict";bt.d(Ln,{O:function(){return _t.Z},Z:function(){return Lt}});var wt=bt(72308),te=bt(49618),de=bt(62853),Re=bt(77321),ne=bt(80702),ae=bt(96949),Tt=bt(55090),be=bt(80237),ye=bt(77205),Jt=bt(38793),Be=bt(92310),pe=bt.n(Be),je=bt(10228),Nt=bt(26112),et=bt(48736),nt=bt(59301),ht=bt(39378);function lt(St){var It=St.dropPosition,Kt=St.dropLevelOffset,xt=St.indent,Me={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(It){case-1:Me.top=0,Me.left=-Kt*xt;break;case 1:Me.bottom=0,Me.left=-Kt*xt;break;case 0:Me.bottom=0,Me.left=xt;break}return nt.createElement("div",{style:Me})}function gt(St){if(St==null)throw new TypeError("Cannot destructure "+St)}var vt=bt(52487),Pt=bt(74416),At=bt(34280),Bt=bt(45680),jt=bt(77900),_t=bt(39417);function se(St,It){var Kt=nt.useState(!1),xt=(0,vt.Z)(Kt,2),Me=xt[0],De=xt[1];nt.useLayoutEffect(function(){if(Me)return St(),function(){It()}},[Me]),nt.useLayoutEffect(function(){return De(!0),function(){De(!1)}},[])}var Vt=bt(71430),he=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Zt=function(It,Kt){var xt=It.className,Me=It.style,De=It.motion,le=It.motionNodes,ee=It.motionType,Se=It.onMotionStart,xe=It.onMotionEnd,ue=It.active,Te=It.treeNodeRequiredProps,vn=(0,Pt.Z)(It,he),fn=nt.useState(!0),en=(0,vt.Z)(fn,2),xn=en[0],ln=en[1],tn=nt.useContext(ht.k),ii=tn.prefixCls,ri=le&&ee!=="hide";(0,At.Z)(function(){le&&ri!==xn&&ln(ri)},[le]);var Un=function(){le&&Se()},si=nt.useRef(!1),mi=function(){le&&!si.current&&(si.current=!0,xe())};se(Un,mi);var Hi=function(Lo){ri===Lo&&mi()};return le?nt.createElement(jt.default,(0,wt.Z)({ref:Kt,visible:xn},De,{motionAppear:ee==="show",onVisibleChanged:Hi}),function(Xi,Lo){var Oo=Xi.className,No=Xi.style;return nt.createElement("div",{ref:Lo,className:pe()("".concat(ii,"-treenode-motion"),Oo),style:No},le.map(function(Io){var _o=(0,wt.Z)({},(gt(Io.data),Io.data)),qo=Io.title,Ni=Io.key,$o=Io.isStart,Ro=Io.isEnd;delete _o.children;var Mt=(0,Vt.H8)(Ni,Te);return nt.createElement(_t.Z,(0,wt.Z)({},_o,Mt,{title:qo,active:ue,data:Io.data,key:Ni,isStart:$o,isEnd:Ro}))}))}):nt.createElement(_t.Z,(0,wt.Z)({domRef:Kt,className:xt,style:Me},vn,{active:ue}))};Zt.displayName="MotionTreeNode";var Oe=nt.forwardRef(Zt),me=Oe;function Ve(){var St=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Kt=St.length,xt=It.length;if(Math.abs(Kt-xt)!==1)return{add:!1,key:null};function Me(De,le){var ee=new Map;De.forEach(function(xe){ee.set(xe,!0)});var Se=le.filter(function(xe){return!ee.has(xe)});return Se.length===1?Se[0]:null}return Kt<xt?{add:!0,key:Me(St,It)}:{add:!1,key:Me(It,St)}}function Xe(St,It,Kt){var xt=St.findIndex(function(ee){return ee.key===Kt}),Me=St[xt+1],De=It.findIndex(function(ee){return ee.key===Kt});if(Me){var le=It.findIndex(function(ee){return ee.key===Me.key});return It.slice(De+1,le)}return It.slice(De+1)}var Je=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],wn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Mn=function(){},we="RC_TREE_MOTION_".concat(Math.random()),Yt={key:we},_e={key:we,level:0,index:0,pos:"0",node:Yt,nodes:[Yt]},Zn={parent:null,children:[],pos:_e.pos,data:Yt,title:null,key:we,isStart:[],isEnd:[]};function Dn(St,It,Kt,xt){return It===!1||!Kt?St:St.slice(0,Math.ceil(Kt/xt)+1)}function Ne(St){var It=St.key,Kt=St.pos;return(0,Vt.km)(It,Kt)}function pn(St){for(var It=String(St.data.key),Kt=St;Kt.parent;)Kt=Kt.parent,It="".concat(Kt.data.key," > ").concat(It);return It}var Tn=nt.forwardRef(function(St,It){var Kt=St.prefixCls,xt=St.data,Me=St.selectable,De=St.checkable,le=St.expandedKeys,ee=St.selectedKeys,Se=St.checkedKeys,xe=St.loadedKeys,ue=St.loadingKeys,Te=St.halfCheckedKeys,vn=St.keyEntities,fn=St.disabled,en=St.dragging,xn=St.dragOverNodeKey,ln=St.dropPosition,tn=St.motion,ii=St.height,ri=St.itemHeight,Un=St.virtual,si=St.focusable,mi=St.activeItem,Hi=St.focused,Xi=St.tabIndex,Lo=St.onKeyDown,Oo=St.onFocus,No=St.onBlur,Io=St.onActiveChange,_o=St.onListChangeStart,qo=St.onListChangeEnd,Ni=(0,Pt.Z)(St,Je),$o=nt.useRef(null),Ro=nt.useRef(null);nt.useImperativeHandle(It,function(){return{scrollTo:function(Qe){$o.current.scrollTo(Qe)},getIndentWidth:function(){return Ro.current.offsetWidth}}});var Mt=nt.useState(le),cr=(0,vt.Z)(Mt,2),ir=cr[0],pr=cr[1],ts=nt.useState(xt),rs=(0,vt.Z)(ts,2),ls=rs[0],Ci=rs[1],oi=nt.useState(xt),Ie=(0,vt.Z)(oi,2),Le=Ie[0],Gt=Ie[1],We=nt.useState([]),Ye=(0,vt.Z)(We,2),ce=Ye[0],qt=Ye[1],He=nt.useState(null),un=(0,vt.Z)(He,2),An=un[0],Fn=un[1],oe=nt.useRef(xt);oe.current=xt;function qe(){var Ke=oe.current;Ci(Ke),Gt(Ke),qt([]),Fn(null),qo()}(0,At.Z)(function(){pr(le);var Ke=Ve(ir,le);if(Ke.key!==null)if(Ke.add){var Qe=ls.findIndex(function(Vn){var wi=Vn.key;return wi===Ke.key}),zn=Dn(Xe(ls,xt,Ke.key),Un,ii,ri),Wn=ls.slice();Wn.splice(Qe+1,0,Zn),Gt(Wn),qt(zn),Fn("show")}else{var fi=xt.findIndex(function(Vn){var wi=Vn.key;return wi===Ke.key}),Hn=Dn(Xe(xt,ls,Ke.key),Un,ii,ri),_n=xt.slice();_n.splice(fi+1,0,Zn),Gt(_n),qt(Hn),Fn("hide")}else ls!==xt&&(Ci(xt),Gt(xt))},[le,xt]),nt.useEffect(function(){en||qe()},[en]);var bn=tn?Le:xt,Jn={expandedKeys:le,selectedKeys:ee,loadedKeys:xe,loadingKeys:ue,checkedKeys:Se,halfCheckedKeys:Te,dragOverNodeKey:xn,dropPosition:ln,keyEntities:vn};return nt.createElement(nt.Fragment,null,Hi&&mi&&nt.createElement("span",{style:wn,"aria-live":"assertive"},pn(mi)),nt.createElement("div",null,nt.createElement("input",{style:wn,disabled:si===!1||fn,tabIndex:si!==!1?Xi:null,onKeyDown:Lo,onFocus:Oo,onBlur:No,value:"",onChange:Mn,"aria-label":"for screen reader"})),nt.createElement("div",{className:"".concat(Kt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},nt.createElement("div",{className:"".concat(Kt,"-indent")},nt.createElement("div",{ref:Ro,className:"".concat(Kt,"-indent-unit")}))),nt.createElement(Bt.Z,(0,wt.Z)({},Ni,{data:bn,itemKey:Ne,height:ii,fullHeight:!1,virtual:Un,itemHeight:ri,prefixCls:"".concat(Kt,"-list"),ref:$o,onVisibleChange:function(Qe,zn){var Wn=new Set(Qe),fi=zn.filter(function(Hn){return!Wn.has(Hn)});fi.some(function(Hn){return Ne(Hn)===we})&&qe()}}),function(Ke){var Qe=Ke.pos,zn=(0,wt.Z)({},(gt(Ke.data),Ke.data)),Wn=Ke.title,fi=Ke.key,Hn=Ke.isStart,_n=Ke.isEnd,Vn=(0,Vt.km)(fi,Qe);delete zn.key,delete zn.children;var wi=(0,Vt.H8)(Vn,Jn);return nt.createElement(me,(0,wt.Z)({},zn,wi,{title:Wn,active:!!mi&&fi===mi.key,pos:Qe,data:Ke.data,isStart:Hn,isEnd:_n,motion:tn,motionNodes:fi===we?ce:null,motionType:An,onMotionStart:_o,onMotionEnd:qe,treeNodeRequiredProps:Jn,onMouseMove:function(){Io(null)}}))}))});Tn.displayName="NodeList";var Yn=Tn,mn=bt(35654),ui=bt(90782),Ce=bt(67841),$n=10,Pi=function(St){(0,ye.Z)(Kt,St);var It=(0,Jt.Z)(Kt);function Kt(){var xt;(0,ae.Z)(this,Kt);for(var Me=arguments.length,De=new Array(Me),le=0;le<Me;le++)De[le]=arguments[le];return xt=It.call.apply(It,[this].concat(De)),xt.destroyed=!1,xt.delayedDragEnterLogic=void 0,xt.loadingRetryTimes={},xt.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Vt.w$)()},xt.dragStartMousePosition=null,xt.dragNode=void 0,xt.currentMouseOverDroppableNodeKey=null,xt.listRef=nt.createRef(),xt.onNodeDragStart=function(ee,Se){var xe=xt.state,ue=xe.expandedKeys,Te=xe.keyEntities,vn=xt.props.onDragStart,fn=Se.props.eventKey;xt.dragNode=Se,xt.dragStartMousePosition={x:ee.clientX,y:ee.clientY};var en=(0,mn._5)(ue,fn);xt.setState({draggingNodeKey:fn,dragChildrenKeys:(0,mn.wA)(fn,Te),indent:xt.listRef.current.getIndentWidth()}),xt.setExpandedKeys(en),window.addEventListener("dragend",xt.onWindowDragEnd),vn==null||vn({event:ee,node:(0,Vt.F)(Se.props)})},xt.onNodeDragEnter=function(ee,Se){var xe=xt.state,ue=xe.expandedKeys,Te=xe.keyEntities,vn=xe.dragChildrenKeys,fn=xe.flattenNodes,en=xe.indent,xn=xt.props,ln=xn.onDragEnter,tn=xn.onExpand,ii=xn.allowDrop,ri=xn.direction,Un=Se.props,si=Un.pos,mi=Un.eventKey,Hi=(0,be.Z)(xt),Xi=Hi.dragNode;if(xt.currentMouseOverDroppableNodeKey!==mi&&(xt.currentMouseOverDroppableNodeKey=mi),!Xi){xt.resetDragState();return}var Lo=(0,mn.OM)(ee,Xi,Se,en,xt.dragStartMousePosition,ii,fn,Te,ue,ri),Oo=Lo.dropPosition,No=Lo.dropLevelOffset,Io=Lo.dropTargetKey,_o=Lo.dropContainerKey,qo=Lo.dropTargetPos,Ni=Lo.dropAllowed,$o=Lo.dragOverNodeKey;if(vn.indexOf(Io)!==-1||!Ni){xt.resetDragState();return}if(xt.delayedDragEnterLogic||(xt.delayedDragEnterLogic={}),Object.keys(xt.delayedDragEnterLogic).forEach(function(Ro){clearTimeout(xt.delayedDragEnterLogic[Ro])}),Xi.props.eventKey!==Se.props.eventKey&&(ee.persist(),xt.delayedDragEnterLogic[si]=window.setTimeout(function(){if(xt.state.draggingNodeKey!==null){var Ro=(0,ne.Z)(ue),Mt=(0,Ce.Z)(Te,Se.props.eventKey);Mt&&(Mt.children||[]).length&&(Ro=(0,mn.L0)(ue,Se.props.eventKey)),"expandedKeys"in xt.props||xt.setExpandedKeys(Ro),tn==null||tn(Ro,{node:(0,Vt.F)(Se.props),expanded:!0,nativeEvent:ee.nativeEvent})}},800)),Xi.props.eventKey===Io&&No===0){xt.resetDragState();return}xt.setState({dragOverNodeKey:$o,dropPosition:Oo,dropLevelOffset:No,dropTargetKey:Io,dropContainerKey:_o,dropTargetPos:qo,dropAllowed:Ni}),ln==null||ln({event:ee,node:(0,Vt.F)(Se.props),expandedKeys:ue})},xt.onNodeDragOver=function(ee,Se){var xe=xt.state,ue=xe.dragChildrenKeys,Te=xe.flattenNodes,vn=xe.keyEntities,fn=xe.expandedKeys,en=xe.indent,xn=xt.props,ln=xn.onDragOver,tn=xn.allowDrop,ii=xn.direction,ri=(0,be.Z)(xt),Un=ri.dragNode;if(Un){var si=(0,mn.OM)(ee,Un,Se,en,xt.dragStartMousePosition,tn,Te,vn,fn,ii),mi=si.dropPosition,Hi=si.dropLevelOffset,Xi=si.dropTargetKey,Lo=si.dropContainerKey,Oo=si.dropAllowed,No=si.dropTargetPos,Io=si.dragOverNodeKey;ue.indexOf(Xi)!==-1||!Oo||(Un.props.eventKey===Xi&&Hi===0?xt.state.dropPosition===null&&xt.state.dropLevelOffset===null&&xt.state.dropTargetKey===null&&xt.state.dropContainerKey===null&&xt.state.dropTargetPos===null&&xt.state.dropAllowed===!1&&xt.state.dragOverNodeKey===null||xt.resetDragState():mi===xt.state.dropPosition&&Hi===xt.state.dropLevelOffset&&Xi===xt.state.dropTargetKey&&Lo===xt.state.dropContainerKey&&No===xt.state.dropTargetPos&&Oo===xt.state.dropAllowed&&Io===xt.state.dragOverNodeKey||xt.setState({dropPosition:mi,dropLevelOffset:Hi,dropTargetKey:Xi,dropContainerKey:Lo,dropTargetPos:No,dropAllowed:Oo,dragOverNodeKey:Io}),ln==null||ln({event:ee,node:(0,Vt.F)(Se.props)}))}},xt.onNodeDragLeave=function(ee,Se){xt.currentMouseOverDroppableNodeKey===Se.props.eventKey&&!ee.currentTarget.contains(ee.relatedTarget)&&(xt.resetDragState(),xt.currentMouseOverDroppableNodeKey=null);var xe=xt.props.onDragLeave;xe==null||xe({event:ee,node:(0,Vt.F)(Se.props)})},xt.onWindowDragEnd=function(ee){xt.onNodeDragEnd(ee,null,!0),window.removeEventListener("dragend",xt.onWindowDragEnd)},xt.onNodeDragEnd=function(ee,Se){var xe=xt.props.onDragEnd;xt.setState({dragOverNodeKey:null}),xt.cleanDragState(),xe==null||xe({event:ee,node:(0,Vt.F)(Se.props)}),xt.dragNode=null,window.removeEventListener("dragend",xt.onWindowDragEnd)},xt.onNodeDrop=function(ee,Se){var xe,ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Te=xt.state,vn=Te.dragChildrenKeys,fn=Te.dropPosition,en=Te.dropTargetKey,xn=Te.dropTargetPos,ln=Te.dropAllowed;if(ln){var tn=xt.props.onDrop;if(xt.setState({dragOverNodeKey:null}),xt.cleanDragState(),en!==null){var ii=(0,Re.Z)((0,Re.Z)({},(0,Vt.H8)(en,xt.getTreeNodeRequiredProps())),{},{active:((xe=xt.getActiveItem())===null||xe===void 0?void 0:xe.key)===en,data:(0,Ce.Z)(xt.state.keyEntities,en).node}),ri=vn.indexOf(en)!==-1;(0,et.ZP)(!ri,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Un=(0,mn.yx)(xn),si={event:ee,node:(0,Vt.F)(ii),dragNode:xt.dragNode?(0,Vt.F)(xt.dragNode.props):null,dragNodesKeys:[xt.dragNode.props.eventKey].concat(vn),dropToGap:fn!==0,dropPosition:fn+Number(Un[Un.length-1])};ue||tn==null||tn(si),xt.dragNode=null}}},xt.cleanDragState=function(){var ee=xt.state.draggingNodeKey;ee!==null&&xt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),xt.dragStartMousePosition=null,xt.currentMouseOverDroppableNodeKey=null},xt.triggerExpandActionExpand=function(ee,Se){var xe=xt.state,ue=xe.expandedKeys,Te=xe.flattenNodes,vn=Se.expanded,fn=Se.key,en=Se.isLeaf;if(!(en||ee.shiftKey||ee.metaKey||ee.ctrlKey)){var xn=Te.filter(function(tn){return tn.key===fn})[0],ln=(0,Vt.F)((0,Re.Z)((0,Re.Z)({},(0,Vt.H8)(fn,xt.getTreeNodeRequiredProps())),{},{data:xn.data}));xt.setExpandedKeys(vn?(0,mn._5)(ue,fn):(0,mn.L0)(ue,fn)),xt.onNodeExpand(ee,ln)}},xt.onNodeClick=function(ee,Se){var xe=xt.props,ue=xe.onClick,Te=xe.expandAction;Te==="click"&&xt.triggerExpandActionExpand(ee,Se),ue==null||ue(ee,Se)},xt.onNodeDoubleClick=function(ee,Se){var xe=xt.props,ue=xe.onDoubleClick,Te=xe.expandAction;Te==="doubleClick"&&xt.triggerExpandActionExpand(ee,Se),ue==null||ue(ee,Se)},xt.onNodeSelect=function(ee,Se){var xe=xt.state.selectedKeys,ue=xt.state,Te=ue.keyEntities,vn=ue.fieldNames,fn=xt.props,en=fn.onSelect,xn=fn.multiple,ln=Se.selected,tn=Se[vn.key],ii=!ln;ii?xn?xe=(0,mn.L0)(xe,tn):xe=[tn]:xe=(0,mn._5)(xe,tn);var ri=xe.map(function(Un){var si=(0,Ce.Z)(Te,Un);return si?si.node:null}).filter(function(Un){return Un});xt.setUncontrolledState({selectedKeys:xe}),en==null||en(xe,{event:"select",selected:ii,node:Se,selectedNodes:ri,nativeEvent:ee.nativeEvent})},xt.onNodeCheck=function(ee,Se,xe){var ue=xt.state,Te=ue.keyEntities,vn=ue.checkedKeys,fn=ue.halfCheckedKeys,en=xt.props,xn=en.checkStrictly,ln=en.onCheck,tn=Se.key,ii,ri={event:"check",node:Se,checked:xe,nativeEvent:ee.nativeEvent};if(xn){var Un=xe?(0,mn.L0)(vn,tn):(0,mn._5)(vn,tn),si=(0,mn._5)(fn,tn);ii={checked:Un,halfChecked:si},ri.checkedNodes=Un.map(function(No){return(0,Ce.Z)(Te,No)}).filter(function(No){return No}).map(function(No){return No.node}),xt.setUncontrolledState({checkedKeys:Un})}else{var mi=(0,ui.S)([].concat((0,ne.Z)(vn),[tn]),!0,Te),Hi=mi.checkedKeys,Xi=mi.halfCheckedKeys;if(!xe){var Lo=new Set(Hi);Lo.delete(tn);var Oo=(0,ui.S)(Array.from(Lo),{checked:!1,halfCheckedKeys:Xi},Te);Hi=Oo.checkedKeys,Xi=Oo.halfCheckedKeys}ii=Hi,ri.checkedNodes=[],ri.checkedNodesPositions=[],ri.halfCheckedKeys=Xi,Hi.forEach(function(No){var Io=(0,Ce.Z)(Te,No);if(Io){var _o=Io.node,qo=Io.pos;ri.checkedNodes.push(_o),ri.checkedNodesPositions.push({node:_o,pos:qo})}}),xt.setUncontrolledState({checkedKeys:Hi},!1,{halfCheckedKeys:Xi})}ln==null||ln(ii,ri)},xt.onNodeLoad=function(ee){var Se=ee.key,xe=new Promise(function(ue,Te){xt.setState(function(vn){var fn=vn.loadedKeys,en=fn===void 0?[]:fn,xn=vn.loadingKeys,ln=xn===void 0?[]:xn,tn=xt.props,ii=tn.loadData,ri=tn.onLoad;if(!ii||en.indexOf(Se)!==-1||ln.indexOf(Se)!==-1)return null;var Un=ii(ee);return Un.then(function(){var si=xt.state.loadedKeys,mi=(0,mn.L0)(si,Se);ri==null||ri(mi,{event:"load",node:ee}),xt.setUncontrolledState({loadedKeys:mi}),xt.setState(function(Hi){return{loadingKeys:(0,mn._5)(Hi.loadingKeys,Se)}}),ue()}).catch(function(si){if(xt.setState(function(Hi){return{loadingKeys:(0,mn._5)(Hi.loadingKeys,Se)}}),xt.loadingRetryTimes[Se]=(xt.loadingRetryTimes[Se]||0)+1,xt.loadingRetryTimes[Se]>=$n){var mi=xt.state.loadedKeys;(0,et.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),xt.setUncontrolledState({loadedKeys:(0,mn.L0)(mi,Se)}),ue()}Te(si)}),{loadingKeys:(0,mn.L0)(ln,Se)}})});return xe.catch(function(){}),xe},xt.onNodeMouseEnter=function(ee,Se){var xe=xt.props.onMouseEnter;xe==null||xe({event:ee,node:Se})},xt.onNodeMouseLeave=function(ee,Se){var xe=xt.props.onMouseLeave;xe==null||xe({event:ee,node:Se})},xt.onNodeContextMenu=function(ee,Se){var xe=xt.props.onRightClick;xe&&(ee.preventDefault(),xe({event:ee,node:Se}))},xt.onFocus=function(){var ee=xt.props.onFocus;xt.setState({focused:!0});for(var Se=arguments.length,xe=new Array(Se),ue=0;ue<Se;ue++)xe[ue]=arguments[ue];ee==null||ee.apply(void 0,xe)},xt.onBlur=function(){var ee=xt.props.onBlur;xt.setState({focused:!1}),xt.onActiveChange(null);for(var Se=arguments.length,xe=new Array(Se),ue=0;ue<Se;ue++)xe[ue]=arguments[ue];ee==null||ee.apply(void 0,xe)},xt.getTreeNodeRequiredProps=function(){var ee=xt.state,Se=ee.expandedKeys,xe=ee.selectedKeys,ue=ee.loadedKeys,Te=ee.loadingKeys,vn=ee.checkedKeys,fn=ee.halfCheckedKeys,en=ee.dragOverNodeKey,xn=ee.dropPosition,ln=ee.keyEntities;return{expandedKeys:Se||[],selectedKeys:xe||[],loadedKeys:ue||[],loadingKeys:Te||[],checkedKeys:vn||[],halfCheckedKeys:fn||[],dragOverNodeKey:en,dropPosition:xn,keyEntities:ln}},xt.setExpandedKeys=function(ee){var Se=xt.state,xe=Se.treeData,ue=Se.fieldNames,Te=(0,Vt.oH)(xe,ee,ue);xt.setUncontrolledState({expandedKeys:ee,flattenNodes:Te},!0)},xt.onNodeExpand=function(ee,Se){var xe=xt.state.expandedKeys,ue=xt.state,Te=ue.listChanging,vn=ue.fieldNames,fn=xt.props,en=fn.onExpand,xn=fn.loadData,ln=Se.expanded,tn=Se[vn.key];if(!Te){var ii=xe.indexOf(tn),ri=!ln;if((0,et.ZP)(ln&&ii!==-1||!ln&&ii===-1,"Expand state not sync with index check"),ri?xe=(0,mn.L0)(xe,tn):xe=(0,mn._5)(xe,tn),xt.setExpandedKeys(xe),en==null||en(xe,{node:Se,expanded:ri,nativeEvent:ee.nativeEvent}),ri&&xn){var Un=xt.onNodeLoad(Se);Un&&Un.then(function(){var si=(0,Vt.oH)(xt.state.treeData,xe,vn);xt.setUncontrolledState({flattenNodes:si})}).catch(function(){var si=xt.state.expandedKeys,mi=(0,mn._5)(si,tn);xt.setExpandedKeys(mi)})}}},xt.onListChangeStart=function(){xt.setUncontrolledState({listChanging:!0})},xt.onListChangeEnd=function(){setTimeout(function(){xt.setUncontrolledState({listChanging:!1})})},xt.onActiveChange=function(ee){var Se=xt.state.activeKey,xe=xt.props.onActiveChange;Se!==ee&&(xt.setState({activeKey:ee}),ee!==null&&xt.scrollTo({key:ee}),xe==null||xe(ee))},xt.getActiveItem=function(){var ee=xt.state,Se=ee.activeKey,xe=ee.flattenNodes;return Se===null?null:xe.find(function(ue){var Te=ue.key;return Te===Se})||null},xt.offsetActiveKey=function(ee){var Se=xt.state,xe=Se.flattenNodes,ue=Se.activeKey,Te=xe.findIndex(function(en){var xn=en.key;return xn===ue});Te===-1&&ee<0&&(Te=xe.length),Te=(Te+ee+xe.length)%xe.length;var vn=xe[Te];if(vn){var fn=vn.key;xt.onActiveChange(fn)}else xt.onActiveChange(null)},xt.onKeyDown=function(ee){var Se=xt.state,xe=Se.activeKey,ue=Se.expandedKeys,Te=Se.checkedKeys,vn=Se.fieldNames,fn=xt.props,en=fn.onKeyDown,xn=fn.checkable,ln=fn.selectable;switch(ee.which){case je.Z.UP:{xt.offsetActiveKey(-1),ee.preventDefault();break}case je.Z.DOWN:{xt.offsetActiveKey(1),ee.preventDefault();break}}var tn=xt.getActiveItem();if(tn&&tn.data){var ii=xt.getTreeNodeRequiredProps(),ri=tn.data.isLeaf===!1||!!(tn.data[vn.children]||[]).length,Un=(0,Vt.F)((0,Re.Z)((0,Re.Z)({},(0,Vt.H8)(xe,ii)),{},{data:tn.data,active:!0}));switch(ee.which){case je.Z.LEFT:{ri&&ue.includes(xe)?xt.onNodeExpand({},Un):tn.parent&&xt.onActiveChange(tn.parent.key),ee.preventDefault();break}case je.Z.RIGHT:{ri&&!ue.includes(xe)?xt.onNodeExpand({},Un):tn.children&&tn.children.length&&xt.onActiveChange(tn.children[0].key),ee.preventDefault();break}case je.Z.ENTER:case je.Z.SPACE:{xn&&!Un.disabled&&Un.checkable!==!1&&!Un.disableCheckbox?xt.onNodeCheck({},Un,!Te.includes(xe)):!xn&&ln&&!Un.disabled&&Un.selectable!==!1&&xt.onNodeSelect({},Un);break}}}en==null||en(ee)},xt.setUncontrolledState=function(ee){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!xt.destroyed){var ue=!1,Te=!0,vn={};Object.keys(ee).forEach(function(fn){if(fn in xt.props){Te=!1;return}ue=!0,vn[fn]=ee[fn]}),ue&&(!Se||Te)&&xt.setState((0,Re.Z)((0,Re.Z)({},vn),xe))}},xt.scrollTo=function(ee){xt.listRef.current.scrollTo(ee)},xt}return(0,Tt.Z)(Kt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Me=this.props.activeKey;Me!==void 0&&Me!==this.state.activeKey&&(this.setState({activeKey:Me}),Me!==null&&this.scrollTo({key:Me}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Me,De=this.state,le=De.focused,ee=De.flattenNodes,Se=De.keyEntities,xe=De.draggingNodeKey,ue=De.activeKey,Te=De.dropLevelOffset,vn=De.dropContainerKey,fn=De.dropTargetKey,en=De.dropPosition,xn=De.dragOverNodeKey,ln=De.indent,tn=this.props,ii=tn.prefixCls,ri=tn.className,Un=tn.style,si=tn.showLine,mi=tn.focusable,Hi=tn.tabIndex,Xi=Hi===void 0?0:Hi,Lo=tn.selectable,Oo=tn.showIcon,No=tn.icon,Io=tn.switcherIcon,_o=tn.draggable,qo=tn.checkable,Ni=tn.checkStrictly,$o=tn.disabled,Ro=tn.motion,Mt=tn.loadData,cr=tn.filterTreeNode,ir=tn.height,pr=tn.itemHeight,ts=tn.virtual,rs=tn.titleRender,ls=tn.dropIndicatorRender,Ci=tn.onContextMenu,oi=tn.onScroll,Ie=tn.direction,Le=tn.rootClassName,Gt=tn.rootStyle,We=(0,Nt.Z)(this.props,{aria:!0,data:!0}),Ye;return _o&&((0,de.Z)(_o)==="object"?Ye=_o:typeof _o=="function"?Ye={nodeDraggable:_o}:Ye={}),nt.createElement(ht.k.Provider,{value:{prefixCls:ii,selectable:Lo,showIcon:Oo,icon:No,switcherIcon:Io,draggable:Ye,draggingNodeKey:xe,checkable:qo,checkStrictly:Ni,disabled:$o,keyEntities:Se,dropLevelOffset:Te,dropContainerKey:vn,dropTargetKey:fn,dropPosition:en,dragOverNodeKey:xn,indent:ln,direction:Ie,dropIndicatorRender:ls,loadData:Mt,filterTreeNode:cr,titleRender:rs,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},nt.createElement("div",{role:"tree",className:pe()(ii,ri,Le,(Me={},(0,te.Z)(Me,"".concat(ii,"-show-line"),si),(0,te.Z)(Me,"".concat(ii,"-focused"),le),(0,te.Z)(Me,"".concat(ii,"-active-focused"),ue!==null),Me)),style:Gt},nt.createElement(Yn,(0,wt.Z)({ref:this.listRef,prefixCls:ii,style:Un,data:ee,disabled:$o,selectable:Lo,checkable:!!qo,motion:Ro,dragging:xe!==null,height:ir,itemHeight:pr,virtual:ts,focusable:mi,focused:le,tabIndex:Xi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ci,onScroll:oi},this.getTreeNodeRequiredProps(),We))))}}],[{key:"getDerivedStateFromProps",value:function(Me,De){var le=De.prevProps,ee={prevProps:Me};function Se(mi){return!le&&mi in Me||le&&le[mi]!==Me[mi]}var xe,ue=De.fieldNames;if(Se("fieldNames")&&(ue=(0,Vt.w$)(Me.fieldNames),ee.fieldNames=ue),Se("treeData")?xe=Me.treeData:Se("children")&&((0,et.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),xe=(0,Vt.zn)(Me.children)),xe){ee.treeData=xe;var Te=(0,Vt.I8)(xe,{fieldNames:ue});ee.keyEntities=(0,Re.Z)((0,te.Z)({},we,_e),Te.keyEntities)}var vn=ee.keyEntities||De.keyEntities;if(Se("expandedKeys")||le&&Se("autoExpandParent"))ee.expandedKeys=Me.autoExpandParent||!le&&Me.defaultExpandParent?(0,mn.r7)(Me.expandedKeys,vn):Me.expandedKeys;else if(!le&&Me.defaultExpandAll){var fn=(0,Re.Z)({},vn);delete fn[we],ee.expandedKeys=Object.keys(fn).map(function(mi){return fn[mi].key})}else!le&&Me.defaultExpandedKeys&&(ee.expandedKeys=Me.autoExpandParent||Me.defaultExpandParent?(0,mn.r7)(Me.defaultExpandedKeys,vn):Me.defaultExpandedKeys);if(ee.expandedKeys||delete ee.expandedKeys,xe||ee.expandedKeys){var en=(0,Vt.oH)(xe||De.treeData,ee.expandedKeys||De.expandedKeys,ue);ee.flattenNodes=en}if(Me.selectable&&(Se("selectedKeys")?ee.selectedKeys=(0,mn.BT)(Me.selectedKeys,Me):!le&&Me.defaultSelectedKeys&&(ee.selectedKeys=(0,mn.BT)(Me.defaultSelectedKeys,Me))),Me.checkable){var xn;if(Se("checkedKeys")?xn=(0,mn.E6)(Me.checkedKeys)||{}:!le&&Me.defaultCheckedKeys?xn=(0,mn.E6)(Me.defaultCheckedKeys)||{}:xe&&(xn=(0,mn.E6)(Me.checkedKeys)||{checkedKeys:De.checkedKeys,halfCheckedKeys:De.halfCheckedKeys}),xn){var ln=xn,tn=ln.checkedKeys,ii=tn===void 0?[]:tn,ri=ln.halfCheckedKeys,Un=ri===void 0?[]:ri;if(!Me.checkStrictly){var si=(0,ui.S)(ii,!0,vn);ii=si.checkedKeys,Un=si.halfCheckedKeys}ee.checkedKeys=ii,ee.halfCheckedKeys=Un}}return Se("loadedKeys")&&(ee.loadedKeys=Me.loadedKeys),ee}}]),Kt}(nt.Component);Pi.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:lt,allowDrop:function(){return!0},expandAction:!1},Pi.TreeNode=_t.Z;var Ot=Pi,Lt=Ot},35654:function(gn,Ln,bt){"use strict";bt.d(Ln,{BT:function(){return nt},E6:function(){return gt},L0:function(){return Jt},OM:function(){return et},_5:function(){return ye},r7:function(){return vt},wA:function(){return pe},yx:function(){return Be}});var wt=bt(80702),te=bt(62853),de=bt(48736),Re=bt(59301),ne=bt(39417),ae=bt(67841),Tt=bt(71430),be=null;function ye(Pt,At){if(!Pt)return[];var Bt=Pt.slice(),jt=Bt.indexOf(At);return jt>=0&&Bt.splice(jt,1),Bt}function Jt(Pt,At){var Bt=(Pt||[]).slice();return Bt.indexOf(At)===-1&&Bt.push(At),Bt}function Be(Pt){return Pt.split("-")}function pe(Pt,At){var Bt=[],jt=(0,ae.Z)(At,Pt);function _t(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];se.forEach(function(Vt){var he=Vt.key,Zt=Vt.children;Bt.push(he),_t(Zt)})}return _t(jt.children),Bt}function je(Pt){if(Pt.parent){var At=Be(Pt.pos);return Number(At[At.length-1])===Pt.parent.children.length-1}return!1}function Nt(Pt){var At=Be(Pt.pos);return Number(At[At.length-1])===0}function et(Pt,At,Bt,jt,_t,se,Vt,he,Zt,Oe){var me,Ve=Pt.clientX,Xe=Pt.clientY,Je=Pt.target.getBoundingClientRect(),wn=Je.top,Mn=Je.height,we=(Oe==="rtl"?-1:1)*(((_t==null?void 0:_t.x)||0)-Ve),Yt=(we-12)/jt,_e=(0,ae.Z)(he,Bt.props.eventKey);if(Xe<wn+Mn/2){var Zn=Vt.findIndex(function(Lt){return Lt.key===_e.key}),Dn=Zn<=0?0:Zn-1,Ne=Vt[Dn].key;_e=(0,ae.Z)(he,Ne)}var pn=_e.key,Tn=_e,Yn=_e.key,mn=0,ui=0;if(!Zt.includes(pn))for(var Ce=0;Ce<Yt&&je(_e);Ce+=1)_e=_e.parent,ui+=1;var $n=At.props.data,Pi=_e.node,Ot=!0;return Nt(_e)&&_e.level===0&&Xe<wn+Mn/2&&se({dragNode:$n,dropNode:Pi,dropPosition:-1})&&_e.key===Bt.props.eventKey?mn=-1:(Tn.children||[]).length&&Zt.includes(Yn)?se({dragNode:$n,dropNode:Pi,dropPosition:0})?mn=0:Ot=!1:ui===0?Yt>-1.5?se({dragNode:$n,dropNode:Pi,dropPosition:1})?mn=1:Ot=!1:se({dragNode:$n,dropNode:Pi,dropPosition:0})?mn=0:se({dragNode:$n,dropNode:Pi,dropPosition:1})?mn=1:Ot=!1:se({dragNode:$n,dropNode:Pi,dropPosition:1})?mn=1:Ot=!1,{dropPosition:mn,dropLevelOffset:ui,dropTargetKey:_e.key,dropTargetPos:_e.pos,dragOverNodeKey:Yn,dropContainerKey:mn===0?null:((me=_e.parent)===null||me===void 0?void 0:me.key)||null,dropAllowed:Ot}}function nt(Pt,At){if(Pt){var Bt=At.multiple;return Bt?Pt.slice():Pt.length?[Pt[0]]:Pt}}var ht=function(At){return At};function lt(Pt,At){if(!Pt)return[];var Bt=At||{},jt=Bt.processProps,_t=jt===void 0?ht:jt,se=Array.isArray(Pt)?Pt:[Pt];return se.map(function(Vt){var he=Vt.children,Zt=_objectWithoutProperties(Vt,be),Oe=lt(he,At);return React.createElement(TreeNode,_extends({key:Zt.key},_t(Zt)),Oe)})}function gt(Pt){if(!Pt)return null;var At;if(Array.isArray(Pt))At={checkedKeys:Pt,halfCheckedKeys:void 0};else if((0,te.Z)(Pt)==="object")At={checkedKeys:Pt.checked||void 0,halfCheckedKeys:Pt.halfChecked||void 0};else return(0,de.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return At}function vt(Pt,At){var Bt=new Set;function jt(_t){if(!Bt.has(_t)){var se=(0,ae.Z)(At,_t);if(se){Bt.add(_t);var Vt=se.parent,he=se.node;he.disabled||Vt&&jt(Vt.key)}}}return(Pt||[]).forEach(function(_t){jt(_t)}),(0,wt.Z)(Bt)}},90782:function(gn,Ln,bt){"use strict";bt.d(Ln,{S:function(){return Tt}});var wt=bt(48736),te=bt(67841);function de(be,ye){var Jt=new Set;return be.forEach(function(Be){ye.has(Be)||Jt.add(Be)}),Jt}function Re(be){var ye=be||{},Jt=ye.disabled,Be=ye.disableCheckbox,pe=ye.checkable;return!!(Jt||Be)||pe===!1}function ne(be,ye,Jt,Be){for(var pe=new Set(be),je=new Set,Nt=0;Nt<=Jt;Nt+=1){var et=ye.get(Nt)||new Set;et.forEach(function(gt){var vt=gt.key,Pt=gt.node,At=gt.children,Bt=At===void 0?[]:At;pe.has(vt)&&!Be(Pt)&&Bt.filter(function(jt){return!Be(jt.node)}).forEach(function(jt){pe.add(jt.key)})})}for(var nt=new Set,ht=Jt;ht>=0;ht-=1){var lt=ye.get(ht)||new Set;lt.forEach(function(gt){var vt=gt.parent,Pt=gt.node;if(!(Be(Pt)||!gt.parent||nt.has(gt.parent.key))){if(Be(gt.parent.node)){nt.add(vt.key);return}var At=!0,Bt=!1;(vt.children||[]).filter(function(jt){return!Be(jt.node)}).forEach(function(jt){var _t=jt.key,se=pe.has(_t);At&&!se&&(At=!1),!Bt&&(se||je.has(_t))&&(Bt=!0)}),At&&pe.add(vt.key),Bt&&je.add(vt.key),nt.add(vt.key)}})}return{checkedKeys:Array.from(pe),halfCheckedKeys:Array.from(de(je,pe))}}function ae(be,ye,Jt,Be,pe){for(var je=new Set(be),Nt=new Set(ye),et=0;et<=Be;et+=1){var nt=Jt.get(et)||new Set;nt.forEach(function(vt){var Pt=vt.key,At=vt.node,Bt=vt.children,jt=Bt===void 0?[]:Bt;!je.has(Pt)&&!Nt.has(Pt)&&!pe(At)&&jt.filter(function(_t){return!pe(_t.node)}).forEach(function(_t){je.delete(_t.key)})})}Nt=new Set;for(var ht=new Set,lt=Be;lt>=0;lt-=1){var gt=Jt.get(lt)||new Set;gt.forEach(function(vt){var Pt=vt.parent,At=vt.node;if(!(pe(At)||!vt.parent||ht.has(vt.parent.key))){if(pe(vt.parent.node)){ht.add(Pt.key);return}var Bt=!0,jt=!1;(Pt.children||[]).filter(function(_t){return!pe(_t.node)}).forEach(function(_t){var se=_t.key,Vt=je.has(se);Bt&&!Vt&&(Bt=!1),!jt&&(Vt||Nt.has(se))&&(jt=!0)}),Bt||je.delete(Pt.key),jt&&Nt.add(Pt.key),ht.add(Pt.key)}})}return{checkedKeys:Array.from(je),halfCheckedKeys:Array.from(de(Nt,je))}}function Tt(be,ye,Jt,Be){var pe=[],je;Be?je=Be:je=Re;var Nt=new Set(be.filter(function(lt){var gt=!!(0,te.Z)(Jt,lt);return gt||pe.push(lt),gt})),et=new Map,nt=0;Object.keys(Jt).forEach(function(lt){var gt=Jt[lt],vt=gt.level,Pt=et.get(vt);Pt||(Pt=new Set,et.set(vt,Pt)),Pt.add(gt),nt=Math.max(nt,vt)}),(0,wt.ZP)(!pe.length,"Tree missing follow keys: ".concat(pe.slice(0,100).map(function(lt){return"'".concat(lt,"'")}).join(", ")));var ht;return ye===!0?ht=ne(Nt,et,nt,je):ht=ae(Nt,ye.halfCheckedKeys,et,nt,je),ht}},67841:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return wt}});function wt(te,de){return te[de]}},71430:function(gn,Ln,bt){"use strict";bt.d(Ln,{F:function(){return vt},H8:function(){return gt},I8:function(){return lt},km:function(){return pe},oH:function(){return nt},w$:function(){return je},zn:function(){return et}});var wt=bt(62853),te=bt(80702),de=bt(77321),Re=bt(74416),ne=bt(11592),ae=bt(2738),Tt=bt(48736),be=bt(67841),ye=["children"];function Jt(Pt,At){return"".concat(Pt,"-").concat(At)}function Be(Pt){return Pt&&Pt.type&&Pt.type.isTreeNode}function pe(Pt,At){return Pt!=null?Pt:At}function je(Pt){var At=Pt||{},Bt=At.title,jt=At._title,_t=At.key,se=At.children,Vt=Bt||"title";return{title:Vt,_title:jt||[Vt],key:_t||"key",children:se||"children"}}function Nt(Pt,At){var Bt=new Map;function jt(_t){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(_t||[]).forEach(function(Vt){var he=Vt[At.key],Zt=Vt[At.children];warning(he!=null,"Tree node must have a certain key: [".concat(se).concat(he,"]"));var Oe=String(he);warning(!Bt.has(Oe)||he===null||he===void 0,"Same 'key' exist in the Tree: ".concat(Oe)),Bt.set(Oe,!0),jt(Zt,"".concat(se).concat(Oe," > "))})}jt(Pt)}function et(Pt){function At(Bt){var jt=(0,ne.Z)(Bt);return jt.map(function(_t){if(!Be(_t))return(0,Tt.ZP)(!_t,"Tree/TreeNode can only accept TreeNode as children."),null;var se=_t.key,Vt=_t.props,he=Vt.children,Zt=(0,Re.Z)(Vt,ye),Oe=(0,de.Z)({key:se},Zt),me=At(he);return me.length&&(Oe.children=me),Oe}).filter(function(_t){return _t})}return At(Pt)}function nt(Pt,At,Bt){var jt=je(Bt),_t=jt._title,se=jt.key,Vt=jt.children,he=new Set(At===!0?[]:At),Zt=[];function Oe(me){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return me.map(function(Xe,Je){for(var wn=Jt(Ve?Ve.pos:"0",Je),Mn=pe(Xe[se],wn),we,Yt=0;Yt<_t.length;Yt+=1){var _e=_t[Yt];if(Xe[_e]!==void 0){we=Xe[_e];break}}var Zn=(0,de.Z)((0,de.Z)({},(0,ae.Z)(Xe,[].concat((0,te.Z)(_t),[se,Vt]))),{},{title:we,key:Mn,parent:Ve,pos:wn,children:null,data:Xe,isStart:[].concat((0,te.Z)(Ve?Ve.isStart:[]),[Je===0]),isEnd:[].concat((0,te.Z)(Ve?Ve.isEnd:[]),[Je===me.length-1])});return Zt.push(Zn),At===!0||he.has(Mn)?Zn.children=Oe(Xe[Vt]||[],Zn):Zn.children=[],Zn})}return Oe(Pt),Zt}function ht(Pt,At,Bt){var jt={};(0,wt.Z)(Bt)==="object"?jt=Bt:jt={externalGetKey:Bt},jt=jt||{};var _t=jt,se=_t.childrenPropName,Vt=_t.externalGetKey,he=_t.fieldNames,Zt=je(he),Oe=Zt.key,me=Zt.children,Ve=se||me,Xe;Vt?typeof Vt=="string"?Xe=function(Mn){return Mn[Vt]}:typeof Vt=="function"&&(Xe=function(Mn){return Vt(Mn)}):Xe=function(Mn,we){return pe(Mn[Oe],we)};function Je(wn,Mn,we,Yt){var _e=wn?wn[Ve]:Pt,Zn=wn?Jt(we.pos,Mn):"0",Dn=wn?[].concat((0,te.Z)(Yt),[wn]):[];if(wn){var Ne=Xe(wn,Zn),pn={node:wn,index:Mn,pos:Zn,key:Ne,parentPos:we.node?we.pos:null,level:we.level+1,nodes:Dn};At(pn)}_e&&_e.forEach(function(Tn,Yn){Je(Tn,Yn,{node:wn,pos:Zn,level:we?we.level+1:-1},Dn)})}Je(null)}function lt(Pt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=At.initWrapper,jt=At.processEntity,_t=At.onProcessFinished,se=At.externalGetKey,Vt=At.childrenPropName,he=At.fieldNames,Zt=arguments.length>2?arguments[2]:void 0,Oe=se||Zt,me={},Ve={},Xe={posEntities:me,keyEntities:Ve};return Bt&&(Xe=Bt(Xe)||Xe),ht(Pt,function(Je){var wn=Je.node,Mn=Je.index,we=Je.pos,Yt=Je.key,_e=Je.parentPos,Zn=Je.level,Dn=Je.nodes,Ne={node:wn,nodes:Dn,index:Mn,key:Yt,pos:we,level:Zn},pn=pe(Yt,we);me[we]=Ne,Ve[pn]=Ne,Ne.parent=me[_e],Ne.parent&&(Ne.parent.children=Ne.parent.children||[],Ne.parent.children.push(Ne)),jt&&jt(Ne,Xe)},{externalGetKey:Oe,childrenPropName:Vt,fieldNames:he}),_t&&_t(Xe),Xe}function gt(Pt,At){var Bt=At.expandedKeys,jt=At.selectedKeys,_t=At.loadedKeys,se=At.loadingKeys,Vt=At.checkedKeys,he=At.halfCheckedKeys,Zt=At.dragOverNodeKey,Oe=At.dropPosition,me=At.keyEntities,Ve=(0,be.Z)(me,Pt),Xe={eventKey:Pt,expanded:Bt.indexOf(Pt)!==-1,selected:jt.indexOf(Pt)!==-1,loaded:_t.indexOf(Pt)!==-1,loading:se.indexOf(Pt)!==-1,checked:Vt.indexOf(Pt)!==-1,halfChecked:he.indexOf(Pt)!==-1,pos:String(Ve?Ve.pos:""),dragOver:Zt===Pt&&Oe===0,dragOverGapTop:Zt===Pt&&Oe===-1,dragOverGapBottom:Zt===Pt&&Oe===1};return Xe}function vt(Pt){var At=Pt.data,Bt=Pt.expanded,jt=Pt.selected,_t=Pt.checked,se=Pt.loaded,Vt=Pt.loading,he=Pt.halfChecked,Zt=Pt.dragOver,Oe=Pt.dragOverGapTop,me=Pt.dragOverGapBottom,Ve=Pt.pos,Xe=Pt.active,Je=Pt.eventKey,wn=(0,de.Z)((0,de.Z)({},At),{},{expanded:Bt,selected:jt,checked:_t,loaded:se,loading:Vt,halfChecked:he,dragOver:Zt,dragOverGapTop:Oe,dragOverGapBottom:me,pos:Ve,active:Xe,key:Je});return"props"in wn||Object.defineProperty(wn,"props",{get:function(){return(0,Tt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Pt}}),wn}},24514:function(gn,Ln,bt){"use strict";bt.d(Ln,{G:function(){return Re}});var wt=bt(47273),te=function(ae){if((0,wt.Z)()&&window.document.documentElement){var Tt=Array.isArray(ae)?ae:[ae],be=window.document.documentElement;return Tt.some(function(ye){return ye in be.style})}return!1},de=function(ae,Tt){if(!te(ae))return!1;var be=document.createElement("div"),ye=be.style[ae];return be.style[ae]=Tt,be.style[ae]!==ye};function Re(ne,ae){return!Array.isArray(ne)&&ae!==void 0?de(ne,ae):te(ne)}},45680:function(gn,Ln,bt){"use strict";bt.d(Ln,{Z:function(){return Pi}});var wt=bt(72308),te=bt(62853),de=bt(77321),Re=bt(49618),ne=bt(52487),ae=bt(74416),Tt=bt(92310),be=bt.n(Tt),ye=bt(29301),Jt=bt(70425),Be=bt(34280),pe=bt(59301),je=bt(4676),Nt=pe.forwardRef(function(Ot,Lt){var St=Ot.height,It=Ot.offsetY,Kt=Ot.offsetX,xt=Ot.children,Me=Ot.prefixCls,De=Ot.onInnerResize,le=Ot.innerProps,ee=Ot.rtl,Se=Ot.extra,xe={},ue={display:"flex",flexDirection:"column"};return It!==void 0&&(xe={height:St,position:"relative",overflow:"hidden"},ue=(0,de.Z)((0,de.Z)({},ue),{},(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)({transform:"translateY(".concat(It,"px)")},ee?"marginRight":"marginLeft",-Kt),"position","absolute"),"left",0),"right",0),"top",0))),pe.createElement("div",{style:xe},pe.createElement(ye.Z,{onResize:function(vn){var fn=vn.offsetHeight;fn&&De&&De()}},pe.createElement("div",(0,wt.Z)({style:ue,className:be()((0,Re.Z)({},"".concat(Me,"-holder-inner"),Me)),ref:Lt},le),xt,Se)))});Nt.displayName="Filler";var et=Nt;function nt(Ot){var Lt=Ot.children,St=Ot.setRef,It=pe.useCallback(function(Kt){St(Kt)},[]);return pe.cloneElement(Lt,{ref:It})}function ht(Ot,Lt,St,It,Kt,xt,Me,De){var le=De.getKey;return Ot.slice(Lt,St+1).map(function(ee,Se){var xe=Lt+Se,ue=Me(ee,xe,{style:{width:It},offsetX:Kt}),Te=le(ee);return pe.createElement(nt,{key:Te,setRef:function(fn){return xt(ee,fn)}},ue)})}function lt(Ot,Lt,St,It){var Kt=St-Ot,xt=Lt-St,Me=Math.min(Kt,xt)*2;if(It<=Me){var De=Math.floor(It/2);return It%2?St+De+1:St-De}return Kt>xt?St-(It-xt):St+(It-Kt)}function gt(Ot,Lt,St){var It=Ot.length,Kt=Lt.length,xt,Me;if(It===0&&Kt===0)return null;It<Kt?(xt=Ot,Me=Lt):(xt=Lt,Me=Ot);var De={__EMPTY_ITEM__:!0};function le(vn){return vn!==void 0?St(vn):De}for(var ee=null,Se=Math.abs(It-Kt)!==1,xe=0;xe<Me.length;xe+=1){var ue=le(xt[xe]),Te=le(Me[xe]);if(ue!==Te){ee=xe,Se=Se||ue!==le(Me[xe+1]);break}}return ee===null?null:{index:ee,multiple:Se}}function vt(Ot,Lt,St){var It=pe.useState(Ot),Kt=(0,ne.Z)(It,2),xt=Kt[0],Me=Kt[1],De=pe.useState(null),le=(0,ne.Z)(De,2),ee=le[0],Se=le[1];return pe.useEffect(function(){var xe=gt(xt||[],Ot||[],Lt);(xe==null?void 0:xe.index)!==void 0&&(St==null||St(xe.index),Se(Ot[xe.index])),Me(Ot)},[Ot]),[ee]}var Pt=bt(16089),At=(typeof navigator=="undefined"?"undefined":(0,te.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Bt=At,jt=function(Ot,Lt,St,It){var Kt=(0,pe.useRef)(!1),xt=(0,pe.useRef)(null);function Me(){clearTimeout(xt.current),Kt.current=!0,xt.current=setTimeout(function(){Kt.current=!1},50)}var De=(0,pe.useRef)({top:Ot,bottom:Lt,left:St,right:It});return De.current.top=Ot,De.current.bottom=Lt,De.current.left=St,De.current.right=It,function(le,ee){var Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,xe=le?ee<0&&De.current.left||ee>0&&De.current.right:ee<0&&De.current.top||ee>0&&De.current.bottom;return Se&&xe?(clearTimeout(xt.current),Kt.current=!1):(!xe||Kt.current)&&Me(),!Kt.current&&xe}};function _t(Ot,Lt,St,It,Kt,xt,Me){var De=(0,pe.useRef)(0),le=(0,pe.useRef)(null),ee=(0,pe.useRef)(null),Se=(0,pe.useRef)(!1),xe=jt(Lt,St,It,Kt);function ue(ln,tn){if(Pt.Z.cancel(le.current),!xe(!1,tn)){var ii=ln;if(!ii._virtualHandled)ii._virtualHandled=!0;else return;De.current+=tn,ee.current=tn,Bt||ii.preventDefault(),le.current=(0,Pt.Z)(function(){var ri=Se.current?10:1;Me(De.current*ri,!1),De.current=0})}}function Te(ln,tn){Me(tn,!0),Bt||ln.preventDefault()}var vn=(0,pe.useRef)(null),fn=(0,pe.useRef)(null);function en(ln){if(Ot){Pt.Z.cancel(fn.current),fn.current=(0,Pt.Z)(function(){vn.current=null},2);var tn=ln.deltaX,ii=ln.deltaY,ri=ln.shiftKey,Un=tn,si=ii;(vn.current==="sx"||!vn.current&&ri&&ii&&!tn)&&(Un=ii,si=0,vn.current="sx");var mi=Math.abs(Un),Hi=Math.abs(si);vn.current===null&&(vn.current=xt&&mi>Hi?"x":"y"),vn.current==="y"?ue(ln,si):Te(ln,Un)}}function xn(ln){Ot&&(Se.current=ln.detail===ee.current)}return[en,xn]}function se(Ot,Lt,St,It){var Kt=pe.useMemo(function(){return[new Map,[]]},[Ot,St.id,It]),xt=(0,ne.Z)(Kt,2),Me=xt[0],De=xt[1],le=function(Se){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Se,ue=Me.get(Se),Te=Me.get(xe);if(ue===void 0||Te===void 0)for(var vn=Ot.length,fn=De.length;fn<vn;fn+=1){var en,xn=Ot[fn],ln=Lt(xn);Me.set(ln,fn);var tn=(en=St.get(ln))!==null&&en!==void 0?en:It;if(De[fn]=(De[fn-1]||0)+tn,ln===Se&&(ue=fn),ln===xe&&(Te=fn),ue!==void 0&&Te!==void 0)break}return{top:De[ue-1]||0,bottom:De[Te]}};return le}var Vt=bt(96949),he=bt(55090),Zt=function(){function Ot(){(0,Vt.Z)(this,Ot),(0,Re.Z)(this,"maps",void 0),(0,Re.Z)(this,"id",0),(0,Re.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,he.Z)(Ot,[{key:"set",value:function(St,It){this.maps[St]=It,this.id+=1,this.diffKeys.add(St)}},{key:"get",value:function(St){return this.maps[St]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ot}(),Oe=Zt;function me(Ot){var Lt=parseFloat(Ot);return isNaN(Lt)?0:Lt}function Ve(Ot,Lt,St){var It=pe.useState(0),Kt=(0,ne.Z)(It,2),xt=Kt[0],Me=Kt[1],De=(0,pe.useRef)(new Map),le=(0,pe.useRef)(new Oe),ee=(0,pe.useRef)(0);function Se(){ee.current+=1}function xe(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Se();var vn=function(){var xn=!1;De.current.forEach(function(ln,tn){if(ln&&ln.offsetParent){var ii=ln.offsetHeight,ri=getComputedStyle(ln),Un=ri.marginTop,si=ri.marginBottom,mi=me(Un),Hi=me(si),Xi=ii+mi+Hi;le.current.get(tn)!==Xi&&(le.current.set(tn,Xi),xn=!0)}}),xn&&Me(function(ln){return ln+1})};if(Te)vn();else{ee.current+=1;var fn=ee.current;Promise.resolve().then(function(){fn===ee.current&&vn()})}}function ue(Te,vn){var fn=Ot(Te),en=De.current.get(fn);vn?(De.current.set(fn,vn),xe()):De.current.delete(fn),!en!=!vn&&(vn?Lt==null||Lt(Te):St==null||St(Te))}return(0,pe.useEffect)(function(){return Se},[]),[ue,xe,le.current,xt]}var Xe=14/15;function Je(Ot,Lt,St){var It=(0,pe.useRef)(!1),Kt=(0,pe.useRef)(0),xt=(0,pe.useRef)(0),Me=(0,pe.useRef)(null),De=(0,pe.useRef)(null),le,ee=function(Te){if(It.current){var vn=Math.ceil(Te.touches[0].pageX),fn=Math.ceil(Te.touches[0].pageY),en=Kt.current-vn,xn=xt.current-fn,ln=Math.abs(en)>Math.abs(xn);ln?Kt.current=vn:xt.current=fn;var tn=St(ln,ln?en:xn,!1,Te);tn&&Te.preventDefault(),clearInterval(De.current),tn&&(De.current=setInterval(function(){ln?en*=Xe:xn*=Xe;var ii=Math.floor(ln?en:xn);(!St(ln,ii,!0)||Math.abs(ii)<=.1)&&clearInterval(De.current)},16))}},Se=function(){It.current=!1,le()},xe=function(Te){le(),Te.touches.length===1&&!It.current&&(It.current=!0,Kt.current=Math.ceil(Te.touches[0].pageX),xt.current=Math.ceil(Te.touches[0].pageY),Me.current=Te.target,Me.current.addEventListener("touchmove",ee,{passive:!1}),Me.current.addEventListener("touchend",Se,{passive:!0}))};le=function(){Me.current&&(Me.current.removeEventListener("touchmove",ee),Me.current.removeEventListener("touchend",Se))},(0,Be.Z)(function(){return Ot&&Lt.current.addEventListener("touchstart",xe,{passive:!0}),function(){var ue;(ue=Lt.current)===null||ue===void 0||ue.removeEventListener("touchstart",xe),le(),clearInterval(De.current)}},[Ot])}function wn(Ot){return Math.floor(Math.pow(Ot,.5))}function Mn(Ot,Lt){var St="touches"in Ot?Ot.touches[0]:Ot;return St[Lt?"pageX":"pageY"]-window[Lt?"scrollX":"scrollY"]}function we(Ot,Lt,St){pe.useEffect(function(){var It=Lt.current;if(Ot&&It){var Kt=!1,xt,Me,De=function(){Pt.Z.cancel(xt)},le=function ue(){De(),xt=(0,Pt.Z)(function(){St(Me),ue()})},ee=function(Te){if(!(Te.target.draggable||Te.button!==0)){var vn=Te;vn._virtualHandled||(vn._virtualHandled=!0,Kt=!0)}},Se=function(){Kt=!1,De()},xe=function(Te){if(Kt){var vn=Mn(Te,!1),fn=It.getBoundingClientRect(),en=fn.top,xn=fn.bottom;if(vn<=en){var ln=en-vn;Me=-wn(ln),le()}else if(vn>=xn){var tn=vn-xn;Me=wn(tn),le()}else De()}};return It.addEventListener("mousedown",ee),It.ownerDocument.addEventListener("mouseup",Se),It.ownerDocument.addEventListener("mousemove",xe),function(){It.removeEventListener("mousedown",ee),It.ownerDocument.removeEventListener("mouseup",Se),It.ownerDocument.removeEventListener("mousemove",xe),De()}}},[Ot])}var Yt=10;function _e(Ot,Lt,St,It,Kt,xt,Me,De){var le=pe.useRef(),ee=pe.useState(null),Se=(0,ne.Z)(ee,2),xe=Se[0],ue=Se[1];return(0,Be.Z)(function(){if(xe&&xe.times<Yt){if(!Ot.current){ue(function(Ro){return(0,de.Z)({},Ro)});return}xt();var Te=xe.targetAlign,vn=xe.originAlign,fn=xe.index,en=xe.offset,xn=Ot.current.clientHeight,ln=!1,tn=Te,ii=null;if(xn){for(var ri=Te||vn,Un=0,si=0,mi=0,Hi=Math.min(Lt.length-1,fn),Xi=0;Xi<=Hi;Xi+=1){var Lo=Kt(Lt[Xi]);si=Un;var Oo=St.get(Lo);mi=si+(Oo===void 0?It:Oo),Un=mi}for(var No=ri==="top"?en:xn-en,Io=Hi;Io>=0;Io-=1){var _o=Kt(Lt[Io]),qo=St.get(_o);if(qo===void 0){ln=!0;break}if(No-=qo,No<=0)break}switch(ri){case"top":ii=si-en;break;case"bottom":ii=mi-xn+en;break;default:{var Ni=Ot.current.scrollTop,$o=Ni+xn;si<Ni?tn="top":mi>$o&&(tn="bottom")}}ii!==null&&Me(ii),ii!==xe.lastTop&&(ln=!0)}ln&&ue((0,de.Z)((0,de.Z)({},xe),{},{times:xe.times+1,targetAlign:tn,lastTop:ii}))}},[xe,Ot.current]),function(Te){if(Te==null){De();return}if(Pt.Z.cancel(le.current),typeof Te=="number")Me(Te);else if(Te&&(0,te.Z)(Te)==="object"){var vn,fn=Te.align;"index"in Te?vn=Te.index:vn=Lt.findIndex(function(ln){return Kt(ln)===Te.key});var en=Te.offset,xn=en===void 0?0:en;ue({times:0,index:vn,offset:xn,originAlign:fn})}}}var Zn=pe.forwardRef(function(Ot,Lt){var St=Ot.prefixCls,It=Ot.rtl,Kt=Ot.scrollOffset,xt=Ot.scrollRange,Me=Ot.onStartMove,De=Ot.onStopMove,le=Ot.onScroll,ee=Ot.horizontal,Se=Ot.spinSize,xe=Ot.containerSize,ue=Ot.style,Te=Ot.thumbStyle,vn=Ot.showScrollBar,fn=pe.useState(!1),en=(0,ne.Z)(fn,2),xn=en[0],ln=en[1],tn=pe.useState(null),ii=(0,ne.Z)(tn,2),ri=ii[0],Un=ii[1],si=pe.useState(null),mi=(0,ne.Z)(si,2),Hi=mi[0],Xi=mi[1],Lo=!It,Oo=pe.useRef(),No=pe.useRef(),Io=pe.useState(vn),_o=(0,ne.Z)(Io,2),qo=_o[0],Ni=_o[1],$o=pe.useRef(),Ro=function(){vn===!0||vn===!1||(clearTimeout($o.current),Ni(!0),$o.current=setTimeout(function(){Ni(!1)},3e3))},Mt=xt-xe||0,cr=xe-Se||0,ir=pe.useMemo(function(){if(Kt===0||Mt===0)return 0;var Gt=Kt/Mt;return Gt*cr},[Kt,Mt,cr]),pr=function(We){We.stopPropagation(),We.preventDefault()},ts=pe.useRef({top:ir,dragging:xn,pageY:ri,startTop:Hi});ts.current={top:ir,dragging:xn,pageY:ri,startTop:Hi};var rs=function(We){ln(!0),Un(Mn(We,ee)),Xi(ts.current.top),Me(),We.stopPropagation(),We.preventDefault()};pe.useEffect(function(){var Gt=function(qt){qt.preventDefault()},We=Oo.current,Ye=No.current;return We.addEventListener("touchstart",Gt,{passive:!1}),Ye.addEventListener("touchstart",rs,{passive:!1}),function(){We.removeEventListener("touchstart",Gt),Ye.removeEventListener("touchstart",rs)}},[]);var ls=pe.useRef();ls.current=Mt;var Ci=pe.useRef();Ci.current=cr,pe.useEffect(function(){if(xn){var Gt,We=function(qt){var He=ts.current,un=He.dragging,An=He.pageY,Fn=He.startTop;Pt.Z.cancel(Gt);var oe=Oo.current.getBoundingClientRect(),qe=xe/(ee?oe.width:oe.height);if(un){var bn=(Mn(qt,ee)-An)*qe,Jn=Fn;!Lo&&ee?Jn-=bn:Jn+=bn;var Ke=ls.current,Qe=Ci.current,zn=Qe?Jn/Qe:0,Wn=Math.ceil(zn*Ke);Wn=Math.max(Wn,0),Wn=Math.min(Wn,Ke),Gt=(0,Pt.Z)(function(){le(Wn,ee)})}},Ye=function(){ln(!1),De()};return window.addEventListener("mousemove",We,{passive:!0}),window.addEventListener("touchmove",We,{passive:!0}),window.addEventListener("mouseup",Ye,{passive:!0}),window.addEventListener("touchend",Ye,{passive:!0}),function(){window.removeEventListener("mousemove",We),window.removeEventListener("touchmove",We),window.removeEventListener("mouseup",Ye),window.removeEventListener("touchend",Ye),Pt.Z.cancel(Gt)}}},[xn]),pe.useEffect(function(){return Ro(),function(){clearTimeout($o.current)}},[Kt]),pe.useImperativeHandle(Lt,function(){return{delayHidden:Ro}});var oi="".concat(St,"-scrollbar"),Ie={position:"absolute",visibility:qo?null:"hidden"},Le={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ee?(Ie.height=8,Ie.left=0,Ie.right=0,Ie.bottom=0,Le.height="100%",Le.width=Se,Lo?Le.left=ir:Le.right=ir):(Ie.width=8,Ie.top=0,Ie.bottom=0,Lo?Ie.right=0:Ie.left=0,Le.width="100%",Le.height=Se,Le.top=ir),pe.createElement("div",{ref:Oo,className:be()(oi,(0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(oi,"-horizontal"),ee),"".concat(oi,"-vertical"),!ee),"".concat(oi,"-visible"),qo)),style:(0,de.Z)((0,de.Z)({},Ie),ue),onMouseDown:pr,onMouseMove:Ro},pe.createElement("div",{ref:No,className:be()("".concat(oi,"-thumb"),(0,Re.Z)({},"".concat(oi,"-thumb-moving"),xn)),style:(0,de.Z)((0,de.Z)({},Le),Te),onMouseDown:rs}))}),Dn=Zn,Ne=20;function pn(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,St=Ot/Lt*Ot;return isNaN(St)&&(St=0),St=Math.max(St,Ne),Math.floor(St)}var Tn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Yn=[],mn={overflowY:"auto",overflowAnchor:"none"};function ui(Ot,Lt){var St=Ot.prefixCls,It=St===void 0?"rc-virtual-list":St,Kt=Ot.className,xt=Ot.height,Me=Ot.itemHeight,De=Ot.fullHeight,le=De===void 0?!0:De,ee=Ot.style,Se=Ot.data,xe=Ot.children,ue=Ot.itemKey,Te=Ot.virtual,vn=Ot.direction,fn=Ot.scrollWidth,en=Ot.component,xn=en===void 0?"div":en,ln=Ot.onScroll,tn=Ot.onVirtualScroll,ii=Ot.onVisibleChange,ri=Ot.innerProps,Un=Ot.extraRender,si=Ot.styles,mi=Ot.showScrollBar,Hi=mi===void 0?"optional":mi,Xi=(0,ae.Z)(Ot,Tn),Lo=pe.useCallback(function(no){return typeof ue=="function"?ue(no):no==null?void 0:no[ue]},[ue]),Oo=Ve(Lo,null,null),No=(0,ne.Z)(Oo,4),Io=No[0],_o=No[1],qo=No[2],Ni=No[3],$o=!!(Te!==!1&&xt&&Me),Ro=pe.useMemo(function(){return Object.values(qo.maps).reduce(function(no,$i){return no+$i},0)},[qo.id,qo.maps]),Mt=$o&&Se&&(Math.max(Me*Se.length,Ro)>xt||!!fn),cr=vn==="rtl",ir=be()(It,(0,Re.Z)({},"".concat(It,"-rtl"),cr),Kt),pr=Se||Yn,ts=(0,pe.useRef)(),rs=(0,pe.useRef)(),ls=(0,pe.useRef)(),Ci=(0,pe.useState)(0),oi=(0,ne.Z)(Ci,2),Ie=oi[0],Le=oi[1],Gt=(0,pe.useState)(0),We=(0,ne.Z)(Gt,2),Ye=We[0],ce=We[1],qt=(0,pe.useState)(!1),He=(0,ne.Z)(qt,2),un=He[0],An=He[1],Fn=function(){An(!0)},oe=function(){An(!1)},qe={getKey:Lo};function bn(no){Le(function($i){var Ko;typeof no=="function"?Ko=no($i):Ko=no;var ro=pi(Ko);return ts.current.scrollTop=ro,ro})}var Jn=(0,pe.useRef)({start:0,end:pr.length}),Ke=(0,pe.useRef)(),Qe=vt(pr,Lo),zn=(0,ne.Z)(Qe,1),Wn=zn[0];Ke.current=Wn;var fi=pe.useMemo(function(){if(!$o)return{scrollHeight:void 0,start:0,end:pr.length-1,offset:void 0};if(!Mt){var no;return{scrollHeight:((no=rs.current)===null||no===void 0?void 0:no.offsetHeight)||0,start:0,end:pr.length-1,offset:void 0}}for(var $i=0,Ko,ro,lr,ms=pr.length,Ji=0;Ji<ms;Ji+=1){var Ti=pr[Ji],kn=Lo(Ti),Ki=qo.get(kn),Jo=$i+(Ki===void 0?Me:Ki);Jo>=Ie&&Ko===void 0&&(Ko=Ji,ro=$i),Jo>Ie+xt&&lr===void 0&&(lr=Ji),$i=Jo}return Ko===void 0&&(Ko=0,ro=0,lr=Math.ceil(xt/Me)),lr===void 0&&(lr=pr.length-1),lr=Math.min(lr+1,pr.length-1),{scrollHeight:$i,start:Ko,end:lr,offset:ro}},[Mt,$o,Ie,pr,Ni,xt]),Hn=fi.scrollHeight,_n=fi.start,Vn=fi.end,wi=fi.offset;Jn.current.start=_n,Jn.current.end=Vn,pe.useLayoutEffect(function(){var no=qo.getRecord();if(no.size===1){var $i=Array.from(no)[0],Ko=pr[_n];if(Ko){var ro=Lo(Ko);if(ro===$i){var lr=qo.get($i),ms=lr-Me;bn(function(Ji){return Ji+ms})}}}qo.resetRecord()},[Hn]);var Qi=pe.useState({width:0,height:xt}),qi=(0,ne.Z)(Qi,2),$e=qi[0],lo=qi[1],Co=function($i){lo({width:$i.offsetWidth,height:$i.offsetHeight})},jo=(0,pe.useRef)(),Ue=(0,pe.useRef)(),jn=pe.useMemo(function(){return pn($e.width,fn)},[$e.width,fn]),qn=pe.useMemo(function(){return pn($e.height,Hn)},[$e.height,Hn]),Mi=Hn-xt,vi=(0,pe.useRef)(Mi);vi.current=Mi;function pi(no){var $i=no;return Number.isNaN(vi.current)||($i=Math.min($i,vi.current)),$i=Math.max($i,0),$i}var Ui=Ie<=0,ki=Ie>=Mi,zi=Ye<=0,uo=Ye>=fn,cn=jt(Ui,ki,zi,uo),Xo=function(){return{x:cr?-Ye:Ye,y:Ie}},sn=(0,pe.useRef)(Xo()),ho=(0,Jt.useEvent)(function(no){if(tn){var $i=(0,de.Z)((0,de.Z)({},Xo()),no);(sn.current.x!==$i.x||sn.current.y!==$i.y)&&(tn($i),sn.current=$i)}});function Er(no,$i){var Ko=no;$i?((0,je.flushSync)(function(){ce(Ko)}),ho()):bn(Ko)}function zo(no){var $i=no.currentTarget.scrollTop;$i!==Ie&&bn($i),ln==null||ln(no),ho()}var Fr=function($i){var Ko=$i,ro=fn?fn-$e.width:0;return Ko=Math.max(Ko,0),Ko=Math.min(Ko,ro),Ko},mr=(0,Jt.useEvent)(function(no,$i){$i?((0,je.flushSync)(function(){ce(function(Ko){var ro=Ko+(cr?-no:no);return Fr(ro)})}),ho()):bn(function(Ko){var ro=Ko+no;return ro})}),Di=_t($o,Ui,ki,zi,uo,!!fn,mr),Li=(0,ne.Z)(Di,2),yo=Li[0],bo=Li[1];Je($o,ts,function(no,$i,Ko,ro){var lr=ro;return cn(no,$i,Ko)?!1:!lr||!lr._virtualHandled?(lr&&(lr._virtualHandled=!0),yo({preventDefault:function(){},deltaX:no?$i:0,deltaY:no?0:$i}),!0):!1}),we(Mt,ts,function(no){bn(function($i){return $i+no})}),(0,Be.Z)(function(){function no(Ko){var ro=Ui&&Ko.detail<0,lr=ki&&Ko.detail>0;$o&&!ro&&!lr&&Ko.preventDefault()}var $i=ts.current;return $i.addEventListener("wheel",yo,{passive:!1}),$i.addEventListener("DOMMouseScroll",bo,{passive:!0}),$i.addEventListener("MozMousePixelScroll",no,{passive:!1}),function(){$i.removeEventListener("wheel",yo),$i.removeEventListener("DOMMouseScroll",bo),$i.removeEventListener("MozMousePixelScroll",no)}},[$o,Ui,ki]),(0,Be.Z)(function(){if(fn){var no=Fr(Ye);ce(no),ho({x:no})}},[$e.width,fn]);var Xn=function(){var $i,Ko;($i=jo.current)===null||$i===void 0||$i.delayHidden(),(Ko=Ue.current)===null||Ko===void 0||Ko.delayHidden()},Rt=_e(ts,pr,qo,Me,Lo,function(){return _o(!0)},bn,Xn);pe.useImperativeHandle(Lt,function(){return{nativeElement:ls.current,getScrollInfo:Xo,scrollTo:function($i){function Ko(ro){return ro&&(0,te.Z)(ro)==="object"&&("left"in ro||"top"in ro)}Ko($i)?($i.left!==void 0&&ce(Fr($i.left)),Rt($i.top)):Rt($i)}}}),(0,Be.Z)(function(){if(ii){var no=pr.slice(_n,Vn+1);ii(no,pr)}},[_n,Vn,pr]);var Qo=se(pr,Lo,qo,Me),xr=Un==null?void 0:Un({start:_n,end:Vn,virtual:Mt,offsetX:Ye,offsetY:wi,rtl:cr,getSize:Qo}),es=ht(pr,_n,Vn,fn,Ye,Io,xe,qe),cs=null;xt&&(cs=(0,de.Z)((0,Re.Z)({},le?"height":"maxHeight",xt),mn),$o&&(cs.overflowY="hidden",fn&&(cs.overflowX="hidden"),un&&(cs.pointerEvents="none")));var us={};return cr&&(us.dir="rtl"),pe.createElement("div",(0,wt.Z)({ref:ls,style:(0,de.Z)((0,de.Z)({},ee),{},{position:"relative"}),className:ir},us,Xi),pe.createElement(ye.Z,{onResize:Co},pe.createElement(xn,{className:"".concat(It,"-holder"),style:cs,ref:ts,onScroll:zo,onMouseEnter:Xn},pe.createElement(et,{prefixCls:It,height:Hn,offsetX:Ye,offsetY:wi,scrollWidth:fn,onInnerResize:_o,ref:rs,innerProps:ri,rtl:cr,extra:xr},es))),Mt&&Hn>xt&&pe.createElement(Dn,{ref:jo,prefixCls:It,scrollOffset:Ie,scrollRange:Hn,rtl:cr,onScroll:Er,onStartMove:Fn,onStopMove:oe,spinSize:qn,containerSize:$e.height,style:si==null?void 0:si.verticalScrollBar,thumbStyle:si==null?void 0:si.verticalScrollBarThumb,showScrollBar:Hi}),Mt&&fn>$e.width&&pe.createElement(Dn,{ref:Ue,prefixCls:It,scrollOffset:Ye,scrollRange:fn,rtl:cr,onScroll:Er,onStartMove:Fn,onStopMove:oe,spinSize:jn,containerSize:$e.width,horizontal:!0,style:si==null?void 0:si.horizontalScrollBar,thumbStyle:si==null?void 0:si.horizontalScrollBarThumb,showScrollBar:Hi}))}var Ce=pe.forwardRef(ui);Ce.displayName="List";var $n=Ce,Pi=$n},90034:function(gn,Ln,bt){var wt={"./doc.png":63604,"./docx.png":30045,"./jpg.png":13740,"./md.png":58881,"./pdf.png":28982,"./png.png":2487,"./txt.png":3164,"./xls.png":88745,"./xlsx.png":49321};function te(Re){var ne=de(Re);return bt(ne)}function de(Re){if(!bt.o(wt,Re)){var ne=new Error("Cannot find module '"+Re+"'");throw ne.code="MODULE_NOT_FOUND",ne}return wt[Re]}te.keys=function(){return Object.keys(wt)},te.resolve=de,gn.exports=te,te.id=90034},93314:function(gn){"use strict";gn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5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ITJgIEQGDITIgIEQGTAQIgMGQmTAQIgMGAiRAQMhMmAgRAYMhMiAgRAZMBAiAwZCZMBAiAwYCFG0l195bcdnBgfGxRKrgfzjYG74uqs3MRCyJvWBbO7f+FhXZ+dGPSSK1alTpyemTrxxV6oDWbt2zX0bLu0bFqKYvX785IHT75y5P9WBFCUzdt2VH5W2tjb+E6YUm4XFxakjk8fWtok3kvZA9q/s6nxm8xUbPq2fIorFkcmp5xcWlz6pgaT7PQgC0aH0XbL+mb4P9DASqtvkMd1anT47pENxJhDo7l55oH/DpUM6JKrJq0ePPXN2YfH8H7ROBfKujEz1faB3Uh/nf5NEJsVice7N/Py/p9/K94snG/VT57kXyPvm2tvbX1uxonOuo63d02OiCywsLHQsFoprCoVCVg9DdbR7AzffNDChQyusBvLsC7nsUiGT0yGRFUODWatz2OqTw4GDE1wdyApPvKPDgwP9YpH9QJ7LjUkmc5sOiWLm7R0aHBgVi6wH8vfncyNeMbNPh0Sxsv0GHawHAgcO5sb1pYaEKDb2Vw9IJJCDB3P950QmMpLp0UOiuuh7jxd7VsrwwMBAXg+tSiQQwBmtxYKMMxKqB+LobJdRm6d2yyUWCORyud75s7JbX3anHhJVydu7bqV8L4mVoyTRQEqwmiwtyai+elb43oQi6GoxpxN0QofjXSJ7BgcHJiVh/wemziNQhWOwlgAAAABJRU5ErkJggg=="},88745:function(gn){"use strict";gn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAFQlJREFUeF7tnXtwFUW+x3+T9/tBCALyBiEkEhJehiAm4RGiF+5a7i6lgCV3191bKMvq6kVx1V1dWW8ZdfXuZYF7d2t1FZeXpYJlQUBAUcI7qIRnAIXEEE7CCQl5J2du9eEezOOcTPec6TndM7+uSuWP6f49vr/+nJkz09NHgQA0h6N2AgTDFFAhQ1XVaQootwcgDMu5PHH2W4iOjKgICQ05HgzK0XFpI5+xXJImJ6SY7A8cjmt/AkVdCgAhZvu2u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=null&&ye.nodeType===1,te=(ye,Jt)=>(!Jt||ye!=="hidden")&&ye!=="visible"&&ye!=="clip",de=(ye,Jt)=>{if(ye.clientHeight<ye.scrollHeight||ye.clientWidth<ye.scrollWidth){const Be=getComputedStyle(ye,null);return te(Be.overflowY,Jt)||te(Be.overflowX,Jt)||(pe=>{const je=(Nt=>{if(!Nt.ownerDocument||!Nt.ownerDocument.defaultView)return null;try{return Nt.ownerDocument.defaultView.frameElement}catch(et){return null}})(pe);return!!je&&(je.clientHeight<pe.scrollHeight||je.clientWidth<pe.scrollWidth)})(ye)}return!1},Re=(ye,Jt,Be,pe,je,Nt,et,nt)=>Nt<ye&&et>Jt||Nt>ye&&et<Jt?0:Nt<=ye&&nt<=Be||et>=Jt&&nt>=Be?Nt-ye-pe:et>Jt&&nt<Be||Nt<ye&&nt>Be?et-Jt+je:0,ne=ye=>{const Jt=ye.parentElement;return Jt==null?ye.getRootNode().host||null:Jt},ae=(ye,Jt)=>{var Be,pe,je,Nt;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ht,boundary:lt,skipOverflowHiddenElements:gt}=Jt,vt=typeof lt=="function"?lt:Dn=>Dn!==lt;if(!wt(ye))throw new TypeError("Invalid target");const Pt=document.scrollingElement||document.documentElement,At=[];let Bt=ye;for(;wt(Bt)&&vt(Bt);){if(Bt=ne(Bt),Bt===Pt){At.push(Bt);break}Bt!=null&&Bt===document.body&&de(Bt)&&!de(document.documentElement)||Bt!=null&&de(Bt,gt)&&At.push(Bt)}const jt=(pe=(Be=window.visualViewport)==null?void 0:Be.width)!=null?pe:innerWidth,_t=(Nt=(je=window.visualViewport)==null?void 0:je.height)!=null?Nt:innerHeight,{scrollX:se,scrollY:Vt}=window,{height:he,width:Zt,top:Oe,right:me,bottom:Ve,left:Xe}=ye.getBoundingClientRect(),{top:Je,right:wn,bottom:Mn,left:we}=(Dn=>{const Ne=window.getComputedStyle(Dn);return{top:parseFloat(Ne.scrollMarginTop)||0,right:parseFloat(Ne.scrollMarginRight)||0,bottom:parseFloat(Ne.scrollMarginBottom)||0,left:parseFloat(Ne.scrollMarginLeft)||0}})(ye);let Yt=nt==="start"||nt==="nearest"?Oe-Je:nt==="end"?Ve+Mn:Oe+he/2-Je+Mn,_e=ht==="center"?Xe+Zt/2-we+wn:ht==="end"?me+wn:Xe-we;const Zn=[];for(let Dn=0;Dn<At.length;Dn++){const Ne=At[Dn],{height:pn,width:Tn,top:Yn,right:mn,bottom:ui,left:Ce}=Ne.getBoundingClientRect();if(et==="if-needed"&&Oe>=0&&Xe>=0&&Ve<=_t&&me<=jt&&(Ne===Pt&&!de(Ne)||Oe>=Yn&&Ve<=ui&&Xe>=Ce&&me<=mn))return Zn;const $n=getComputedStyle(Ne),Pi=parseInt($n.borderLeftWidth,10),Ot=parseInt($n.borderTopWidth,10),Lt=parseInt($n.borderRightWidth,10),St=parseInt($n.borderBottomWidth,10);let It=0,Kt=0;const xt="offsetWidth"in Ne?Ne.offsetWidth-Ne.clientWidth-Pi-Lt:0,Me="offsetHeight"in Ne?Ne.offsetHeight-Ne.clientHeight-Ot-St:0,De="offsetWidth"in Ne?Ne.offsetWidth===0?0:Tn/Ne.offsetWidth:0,le="offsetHeight"in Ne?Ne.offsetHeight===0?0:pn/Ne.offsetHeight:0;if(Pt===Ne)It=nt==="start"?Yt:nt==="end"?Yt-_t:nt==="nearest"?Re(Vt,Vt+_t,_t,Ot,St,Vt+Yt,Vt+Yt+he,he):Yt-_t/2,Kt=ht==="start"?_e:ht==="center"?_e-jt/2:ht==="end"?_e-jt:Re(se,se+jt,jt,Pi,Lt,se+_e,se+_e+Zt,Zt),It=Math.max(0,It+Vt),Kt=Math.max(0,Kt+se);else{It=nt==="start"?Yt-Yn-Ot:nt==="end"?Yt-ui+St+Me:nt==="nearest"?Re(Yn,ui,pn,Ot,St+Me,Yt,Yt+he,he):Yt-(Yn+pn/2)+Me/2,Kt=ht==="start"?_e-Ce-Pi:ht==="center"?_e-(Ce+Tn/2)+xt/2:ht==="end"?_e-mn+Lt+xt:Re(Ce,mn,Tn,Pi,Lt+xt,_e,_e+Zt,Zt);const{scrollLeft:ee,scrollTop:Se}=Ne;It=le===0?0:Math.max(0,Math.min(Se+It/le,Ne.scrollHeight-pn/le+Me)),Kt=De===0?0:Math.max(0,Math.min(ee+Kt/De,Ne.scrollWidth-Tn/De+xt)),Yt+=Se-It,_e+=ee-Kt}Zn.push({el:Ne,top:It,left:Kt})}return Zn},Tt=ye=>ye===!1?{block:"end",inline:"nearest"}:(Jt=>Jt===Object(Jt)&&Object.keys(Jt).length!==0)(ye)?ye:{block:"start",inline:"nearest"};function be(ye,Jt){if(!ye.isConnected||!(je=>{let Nt=je;for(;Nt&&Nt.parentNode;){if(Nt.parentNode===document)return!0;Nt=Nt.parentNode instanceof ShadowRoot?Nt.parentNode.host:Nt.parentNode}return!1})(ye))return;const Be=(je=>{const Nt=window.getComputedStyle(je);return{top:parseFloat(Nt.scrollMarginTop)||0,right:parseFloat(Nt.scrollMarginRight)||0,bottom:parseFloat(Nt.scrollMarginBottom)||0,left:parseFloat(Nt.scrollMarginLeft)||0}})(ye);if((je=>typeof je=="object"&&typeof je.behavior=="function")(Jt))return Jt.behavior(ae(ye,Jt));const pe=typeof Jt=="boolean"||Jt==null?void 0:Jt.behavior;for(const{el:je,top:Nt,left:et}of ae(ye,Tt(Jt))){const nt=Nt-Be.top+Be.bottom,ht=et-Be.left+Be.right;je.scroll({top:nt,left:ht,behavior:pe})}}}}]);
|