|
|
(self.webpackChunk=self.webpackChunk||[]).push([[1275],{89489:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},59477:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},49198:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},52671:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},8657:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},56082:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},15075:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},43531:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},61485:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},32050:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(Xt,fe){return ee.createElement(te.Z,(0,wt.Z)({},Xt,{ref:fe,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt},37036:function(){"use strict"},88010:function(dn,Mn){"use strict";Mn.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 dn(Bt,et,nt,ht){nt===void 0&&(nt=0),ht===void 0&&(ht=1/0),this._name=Bt,this._defaultValue=et,this._minimum=nt,this._maximum=ht}Object.defineProperty(dn.prototype,"name",{get:function(){return this._name},set:function(Bt){if(typeof Bt!="string"||Bt==="")throw new Error("Shape name must be a valid string.");this._name=Bt}}),Object.defineProperty(dn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Bt){if(typeof Bt!="number"||isNaN(Bt))throw new Error("The default value must be a real number, not: "+Bt);this._defaultValue=Bt}}),Object.defineProperty(dn.prototype,"minimum",{get:function(){return this._minimum},set:function(Bt){if(typeof Bt!="number"||isNaN(Bt))throw new Error("Minimum must be a real number, not: "+Bt);this._minimum=Bt}}),Object.defineProperty(dn.prototype,"maximum",{get:function(){return this._maximum},set:function(Bt){if(typeof Bt!="number"||isNaN(Bt))throw new Error("Maximum must be a real number, not: "+Bt);this._maximum=Bt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Bt,et){var nt=go.Shape._FigureParameters[Bt];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Bt,et,nt){if(!(nt instanceof dn))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[Bt];ht||(ht=[],go.Shape._FigureParameters[Bt]=ht),ht[et]=nt};var Mn=[];function bt(Bt,et){var nt=Mn.pop();return nt===void 0?new go.Point(Bt,et):(nt.x=Bt,nt.y=et,nt)}function wt(){var Bt=Mn.pop();return Bt===void 0?new go.Point:Bt}function ee(Bt){Mn.push(Bt)}function he(Bt,et,nt,ht,lt,gt,yt,Pt,Tt){Tt||(Tt=new go.Point);var It=Bt-nt,zt=lt-yt,_t=NaN,se=NaN;if(It===0)if(zt===0)Bt===nt&&(_t=Bt,se=et);else{var Jt=(gt-Pt)/zt,le=gt-Jt*lt;_t=Bt,se=Jt*_t+le}else if(zt===0){var Zt=(et-ht)/It,Fe=et-Zt*Bt;_t=lt,se=Zt*_t+Fe}else{var Zt=(et-ht)/It,Jt=(gt-Pt)/zt,Fe=et-Zt*Bt,le=gt-Jt*lt;_t=(le-Fe)/(Zt-Jt),se=Zt*_t+Fe}return Tt.x=_t,Tt.y=se,Tt}function Ie(Bt,et,nt,ht,lt,gt,yt,Pt,Tt,It,zt,_t,se,Jt){var le=1-Tt,Zt=Tt,Fe=Bt*le+nt*Zt,me=et*le+ht*Zt,Ve=nt*le+lt*Zt,Qe=ht*le+gt*Zt,qe=lt*le+yt*Zt,vn=gt*le+Pt*Zt,xn=Fe*le+Ve*Zt,Se=me*le+Qe*Zt,Vt=Ve*le+qe*Zt,Xe=Qe*le+vn*Zt,Xn=xn*le+Vt*Zt,Bn=Se*le+Xe*Zt;It.x=Fe,It.y=me,zt.x=xn,zt.y=Se,_t.x=Xn,_t.y=Bn,se.x=Vt,se.y=Xe,Jt.x=qe,Jt.y=vn}var te=new go.Spot(.156,.156),Pe=new go.Spot(.844,.844),Nt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new dn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var lt=ht*Nt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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=te,lt.spot2=Pe,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Bt,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(Bt,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(Bt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Nt*et,0,et,(1-Nt)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Bt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,Nt*nt,(1-Nt)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Bt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,Nt*nt,Nt*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Bt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-Nt)*et,0,0,(1-Nt)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Bt,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(Bt,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(Bt,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(Bt,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 dn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Bt,et,nt){var ht=Bt?Bt.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 dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Bt,et,nt){var ht=Bt?Bt.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 dn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Bt,et,nt){var ht=Bt?Bt.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 dn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Bt,et,nt){var ht=Bt?Bt.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 dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Bt,et,nt){var ht=Bt?Bt.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 Le=[];function ve(){var Bt=Le.pop();return Bt===void 0?[]:Bt}function Xt(Bt){Bt.length=0,Le.push(Bt)}function fe(Bt){for(var et=ve(),nt=.5,ht=.5,lt=Math.PI*1.5,gt=0,yt=0;yt<Bt;yt++)gt=2*Math.PI/Bt*yt+lt,et[yt]=new go.Point(ht+nt*Math.cos(gt),ht+nt*Math.sin(gt));return et.push(et[0]),et}function xe(Bt){var et=je(Bt),nt=ve();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 Xt(et),nt}function je(Bt){for(var et=fe(Bt),nt=ve(),ht=Math.floor(et.length/2),lt=et.length-1,gt=Bt%2===0?2:1,yt=0;yt<lt;yt++){var Pt=et[yt],Tt=et[yt+1],It=et[(ht+yt-1)%lt],zt=et[(ht+yt+gt)%lt];nt[yt*2]=Pt,nt[yt*2+1]=he(Pt.x,Pt.y,It.x,It.y,Tt.x,Tt.y,zt.x,zt.y,new go.Point)}return nt[nt.length]=nt[0],Xt(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Bt,et,nt){var ht=fe(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<5;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(Bt,et,nt){var ht=fe(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<6;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(Bt,et,nt){var ht=fe(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<7;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(Bt,et,nt){var ht=fe(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<8;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(Bt,et,nt){var ht=fe(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<9;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(Bt,et,nt){var ht=fe(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(Bt,et,nt){var ht=fe(12),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(Bt,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 yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(Bt,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 yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Bt,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 yt=1;yt<14;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(Bt,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 yt=1;yt<16;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(Bt,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 yt=1;yt<18;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(Bt,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 yt=1;yt<20;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[yt].x*et,ht[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),Xt(ht),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Bt,et,nt){var ht=xe(5),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*et,ht[yt+2].y*nt,ht[yt].x*et,ht[yt].y*nt,ht[yt+1].x*et,ht[yt+1].y*nt));return gt.segments.last().close(),Xt(ht),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Bt,et,nt){var ht=xe(6),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*et,ht[yt+2].y*nt,ht[yt].x*et,ht[yt].y*nt,ht[yt+1].x*et,ht[yt+1].y*nt));return gt.segments.last().close(),Xt(ht),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Bt,et,nt){var ht=xe(7),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*et,ht[yt+2].y*nt,ht[yt].x*et,ht[yt].y*nt,ht[yt+1].x*et,ht[yt+1].y*nt));return gt.segments.last().close(),Xt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Bt,et,nt){var ht=xe(8),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*et,ht[yt+2].y*nt,ht[yt].x*et,ht[yt].y*nt,ht[yt+1].x*et,ht[yt+1].y*nt));return gt.segments.last().close(),Xt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Bt,et,nt){var ht=xe(9),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*et,ht[yt+2].y*nt,ht[yt].x*et,ht[yt].y*nt,ht[yt+1].x*et,ht[yt+1].y*nt));return gt.segments.last().close(),Xt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Bt,et,nt){var ht=xe(10),lt=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ht.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[yt+2].x*et,ht[yt+2].y*nt,ht[yt].x*et,ht[yt].y*nt,ht[yt+1].x*et,ht[yt+1].y*nt));return gt.segments.last().close(),Xt(ht),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new dn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new dn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN,lt=Bt?Bt.parameter2:NaN;isNaN(ht)&&(ht=8),isNaN(lt)&&(lt=8);var gt=new go.Geometry,yt=new go.PathFigure(0,0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht<et/2&<<nt/2&&(yt.add(new go.PathSegment(go.PathSegment.Move,ht,lt)),yt.add(new go.PathSegment(go.PathSegment.Line,ht,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ht,nt-lt)),yt.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 dn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=8);var lt=et/2,gt=new go.Geometry,yt=new go.PathFigure(et,et/2,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var Pt=Math.max(lt-ht,0);return Pt>0&&(yt.add(new go.PathSegment(go.PathSegment.Move,et/2+Pt,et/2)),yt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,Pt,Pt).close())),gt.spot1=te,gt.spot2=Pe,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Bt,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(Bt,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 dn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new dn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN,lt=Bt?Bt.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(lt)&&(lt=315);var gt=ht%360;gt<0&&(gt+=360);var yt=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,yt,Pt,Pt,Pt,Pt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Bt,et,nt){var ht=Nt/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 dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var lt=Math.min(ht,et)/2,gt=et/2,yt=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,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+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,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=Math.min(ht,et)/2,gt=et/2,yt=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,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+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,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Bt,et,nt){var ht=Bt?Bt.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,yt=nt/2,Pt=Math.atan2(nt,et),Tt=ht-Math.min(Math.cos(Pt)*ht/2,gt),It=ht-Math.min(Math.sin(Pt)*ht/2,yt),lt=new go.Geometry,zt=new go.PathFigure(Tt,0,!0);return lt.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),zt.add(new go.PathSegment(go.PathSegment.Line,et-Tt,0)),zt.add(new go.PathSegment(go.PathSegment.Line,et,It)),zt.add(new go.PathSegment(go.PathSegment.Line,.8*et,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,et,nt-It)),zt.add(new go.PathSegment(go.PathSegment.Line,et-Tt,nt)),zt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),zt.add(new go.PathSegment(go.PathSegment.Line,Tt,nt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,nt-It)),zt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,It).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Bt,et,nt){var ht=Bt?Bt.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 dn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Bt,et,nt){var ht=Bt?Bt.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 dn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Bt,et,nt){var ht=Bt?Bt.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(Bt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,Nt*et,0,et,(.5-Nt/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+Nt/2)*nt,Nt*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Bt,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(Bt,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(Bt,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(Bt,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,yt=.3,Pt=0,Tt=gt*Nt;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Pt)*nt,(.5-gt+yt)*et,(.5+Tt+Pt)*nt,(.5-Tt+yt)*et,(.5+gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Pt)*nt,(.5+Tt+yt)*et,(.5+gt+Pt)*nt,(.5+gt+yt)*et,(.5+Tt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Pt)*nt,(1-.5+gt+yt)*et,(.5-Tt+Pt)*nt,(.5+Tt+yt)*et,(.5-gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Tt+yt)*et,(.5-gt+Pt)*nt,(.5-gt+yt+.05)*et,(.5-Tt+Pt-.02)*nt)),gt=.2,yt=0,Pt=-.3,Tt=gt*Nt,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Pt)*nt,(.5+Tt+yt)*et,(.5+gt+Pt)*nt,(.5+gt+yt)*et,(.5+Tt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Pt)*nt,(1-.5+gt+yt)*et,(.5-Tt+Pt)*nt,(.5+Tt+yt)*et,(.5-gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Pt)*nt,(.5-Tt+yt)*et,(.5-gt+Pt)*nt,(.5-gt+yt)*et,(.5-Tt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Tt+yt)*et,(.5+gt+Pt)*nt,(.5-gt+yt)*et,(.5+Tt+Pt)*nt,(.5-Tt+yt)*et,(.5+gt+Pt)*nt)),gt=.2,yt=-.3,Pt=0,Tt=gt*Nt,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Pt)*nt,(1-.5+gt+yt-.05)*et,(.5-Tt+Pt-.02)*nt,(.5+Tt+yt)*et,(.5-gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Pt)*nt,(.5-Tt+yt)*et,(.5-gt+Pt)*nt,(.5-gt+yt)*et,(.5-Tt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Pt)*nt,(.5-gt+yt)*et,(.5+Tt+Pt)*nt,(.5-Tt+yt)*et,(.5+gt+Pt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Tt+yt)*et,(.5+gt+Pt)*nt,(.5+gt+yt)*et,(.5+Tt+Pt)*nt).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Bt,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,yt=.5,Pt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(yt+gt)*et,Pt*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*yt,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((yt+gt)*et,Pt*nt,!0),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*yt,nt*Pt,gt*et,gt*et).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=.5,yt=.5,Pt=.5,Tt=new go.PathFigure(yt*et,(Pt-gt)*nt);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-lt)*et,(Pt+gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-gt)*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt)),gt=.4,lt=Nt*.4;var It=wt(),zt=wt(),_t=wt(),se=wt();Ie(yt,Pt-gt,yt+lt,Pt-gt,yt+gt,Pt-lt,yt+gt,Pt,.42,It,zt,_t,se,se);var Jt=wt(),le=wt(),Zt=wt();Ie(yt,Pt-gt,yt+lt,Pt-gt,yt+gt,Pt-lt,yt+gt,Pt,.58,se,se,Zt,Jt,le);var Fe=wt(),me=wt(),Ve=wt();Ie(yt,Pt+gt,yt-lt,Pt+gt,yt-gt,Pt+lt,yt-gt,Pt,.42,Fe,me,Ve,se,se);var Qe=wt(),qe=wt(),vn=wt();return Ie(yt,Pt+gt,yt-lt,Pt+gt,yt-gt,Pt+lt,yt-gt,Pt,.58,se,se,vn,Qe,qe),Tt.add(new go.PathSegment(go.PathSegment.Move,vn.x*et,vn.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,Qe.x*et,Qe.y*nt,qe.x*et,qe.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,_t.x*et,_t.y*nt,It.x*et,It.y*nt,zt.x*et,zt.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,vn.x*et,vn.y*nt).close()),Tt.add(new go.PathSegment(go.PathSegment.Move,Ve.x*et,Ve.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,Zt.x*et,Zt.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,Jt.x*et,Jt.y*nt,le.x*et,le.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,Ve.x*et,Ve.y*nt,Fe.x*et,Fe.y*nt,me.x*et,me.y*nt).close()),ee(It),ee(zt),ee(_t),ee(se),ee(Jt),ee(le),ee(Zt),ee(Fe),ee(me),ee(Ve),ee(Qe),ee(qe),ee(vn),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Bt,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 dn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Bt,et,nt){var ht=Bt?Bt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.4,gt=.4,yt=.5,Pt=.5,Tt=wt(),It=wt(),zt=wt(),_t=wt(),se=new go.PathFigure((yt-gt)*et,Pt*nt,!1);ht.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt)),Ie(yt,Pt-gt,yt+lt,Pt-gt,yt+gt,Pt-lt,yt+gt,Pt,.44,zt,_t,It,Tt,Tt),se.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,zt.x*et,zt.y*nt,_t.x*et,_t.y*nt));var Jt=bt(It.x,It.y);Ie(yt,Pt-gt,yt+lt,Pt-gt,yt+gt,Pt-lt,yt+gt,Pt,.56,Tt,Tt,It,zt,_t);var le=bt(It.x,It.y);se.add(new go.PathSegment(go.PathSegment.Line,(Jt.x*.1+.95*.9)*et,Jt.y*.1*nt)),se.add(new go.PathSegment(go.PathSegment.Line,.85*et,Jt.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,(le.x*.1+.9)*et,.15*nt)),se.add(new go.PathSegment(go.PathSegment.Line,(le.x*.1+.9)*et,(le.y*.1+.05*.9)*nt)),se.add(new go.PathSegment(go.PathSegment.Line,le.x*et,le.y*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,zt.x*et,zt.y*nt,_t.x*et,_t.y*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,(yt-lt)*et,(Pt+gt)*nt,(yt-gt)*et,(Pt+lt)*nt)),gt=.35,lt=Nt*.35;var Zt=new go.PathFigure(yt*et,(Pt-gt)*nt,!1);ht.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-lt)*et,(Pt+gt)*nt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-gt)*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt));var Fe=new go.PathFigure((yt-gt)*et,Pt*nt,!1);return ht.add(Fe),ee(Tt),ee(It),ee(zt),ee(_t),ee(Jt),ee(le),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(Bt,et,nt){var ht=new go.Geometry,lt=.375,gt=0,yt=-.125,Pt=lt*Nt,Tt=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Pt+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Pt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Pt+yt)*nt,(.5+Pt+gt)*et,(.5-lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Pt+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Pt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Pt+yt)*nt,(.5-Pt+gt)*et,(.5+lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),lt=.325,gt=0,yt=-.125,Pt=lt*Nt;var Tt=new go.PathFigure((1-.5+lt+gt)*et,(.5+yt)*nt,!1);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Pt+yt)*nt,(.5+Pt+gt)*et,(.5+lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Pt+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Pt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Pt+yt)*nt,(.5-Pt+gt)*et,(.5-lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Pt+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Pt+yt)*nt));var Tt=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);return ht.add(Tt),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(Bt,et,nt){var ht=Bt?Bt.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(Bt,et,nt){var ht=Bt?Bt.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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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 dn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new dn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=Bt?Bt.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ht)*et,yt=(.5-lt/2)*nt,Pt=(.5+lt/2)*nt,Tt=new go.Geometry,It=new go.PathFigure(0,yt,!0);Tt.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,Pt)),It.add(new go.PathSegment(go.PathSegment.Line,0,Pt).close()),Tt.spot1=new go.Spot(0,yt/nt);var zt=he(0,Pt/nt,1,Pt/nt,gt/et,1,1,.5,wt());return Tt.spot2=new go.Spot(zt.x,zt.y),ee(zt),Tt}),go.Shape.setFigureParameter("Arrow2",0,new dn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new dn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=30),ht>et&&(ht=et);var lt=Bt?Bt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,nt/2);var gt=et-ht,yt=(nt-lt)/2,Pt=yt+lt,Tt=new go.Geometry,It=new go.PathFigure(0,yt,!0);Tt.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,Pt)),It.add(new go.PathSegment(go.PathSegment.Line,0,Pt).close()),Tt.spot1=new go.Spot(0,yt/nt);var zt=he(0,Pt/nt,1,Pt/nt,gt/et,1,1,.5,wt());return Tt.spot2=new go.Spot(zt.x,zt.y),ee(zt),Tt}),go.Shape.defineFigureGenerator("Chevron",function(Bt,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(Bt,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 dn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,yt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);yt.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 Tt=he(0,.5,.3,0,0,lt/nt,.1,lt/nt,wt());return yt.spot1=new go.Spot(Tt.x,Tt.y),Tt=he(.7,1,1,.5,0,gt/nt,1,gt/nt,Tt),yt.spot2=new go.Spot(Tt.x,Tt.y),ee(Tt),yt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new dn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new dn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Bt?Bt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ht)/2,yt=gt+ht,Pt=(nt-lt)/2,Tt=Pt+lt;(ht>nt||lt>nt)&&(lt>ht?(ht=ht*nt/lt,gt=(nt-ht)/2,yt=gt+ht,Pt=0,Tt=nt):(gt=0,yt=nt,Pt=0,Tt=nt));var It=new go.Geometry,zt=new go.PathFigure(et,.5*nt,!0);It.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Tt)),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,.3*et,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Tt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),zt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Pt)),zt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Pt).close());var _t=he(0,.5,.3,Pt/nt,0,gt/nt,1,gt/nt,wt());return It.spot1=new go.Spot(_t.x,_t.y),_t=he(.7,Tt/nt,1,.5,0,yt/nt,1,yt/nt,_t),It.spot2=new go.Spot(_t.x,_t.y),ee(_t),It}),go.Shape.setFigureParameter("IBeamArrow",0,new dn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,yt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);yt.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()),yt.spot1=new go.Spot(0,lt/nt);var Tt=he(.7,1,1,.5,0,gt/nt,1,gt/nt,wt());return yt.spot2=new go.Spot(Tt.x,Tt.y),ee(Tt),yt}),go.Shape.setFigureParameter("IBeamArrow2",0,new dn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new dn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Bt?Bt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ht)/2,yt=gt+ht,Pt=(nt-lt)/2,Tt=Pt+lt;(ht>nt||lt>nt)&&(lt>ht?(ht=ht*nt/lt,gt=(nt-ht)/2,yt=gt+ht,Pt=0,Tt=nt):(gt=0,yt=nt,Pt=0,Tt=nt));var It=new go.Geometry,zt=new go.PathFigure(et,.5*nt,!0);It.add(zt),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Tt)),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),zt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Tt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,Tt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,Pt)),zt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Pt)),zt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),zt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Pt).close()),It.spot1=new go.Spot(0,gt/nt);var _t=he(.7,Tt/nt,1,.5,0,yt/nt,1,yt/nt,wt());return It.spot2=new go.Spot(_t.x,_t.y),ee(_t),It}),go.Shape.setFigureParameter("Pointer",0,new dn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Bt,et,nt){var ht=Bt?Bt.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 yt=he(.2,.65,1,.65,0,1,1,.5,wt());return lt.spot2=new go.Spot(yt.x,yt.y),ee(yt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new dn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Bt,et,nt){var ht=Bt?Bt.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 yt=he(0,.65,1,.65,0,1,1,.5,wt());return lt.spot2=new go.Spot(yt.x,yt.y),ee(yt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new dn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=.4);var lt=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,yt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);yt.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()),yt.spot1=new go.Spot(.2,.3);var Tt=he(.7,1,1,.5,0,gt/nt,1,gt/nt,wt());return yt.spot2=new go.Spot(Tt.x,Tt.y),ee(Tt),yt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new dn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=50);var lt=(nt-ht)/2,gt=lt+ht;ht>nt&&(lt=0,gt=nt);var yt=new go.Geometry,Pt=new go.PathFigure(et,.5*nt,!0);yt.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()),yt.spot1=new go.Spot(.2,lt/nt);var Tt=he(.7,1,1,.5,0,gt/nt,1,gt/nt,wt());return yt.spot2=new go.Spot(Tt.x,Tt.y),ee(Tt),yt}),go.Shape.setFigureParameter("SquareArrow",0,new dn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Bt,et,nt){var ht=Bt?Bt.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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=Nt*.1,yt=new go.PathFigure(0,.9*nt,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.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(Bt,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(Bt,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(Bt,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(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Nt*.5,yt=new go.PathFigure(0,ht,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Nt*ht,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ht,(.5+gt)*et,0,1*et,Nt*ht)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-Nt*ht,(.5+gt)*et,1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,1*nt,0,nt-Nt*ht)),yt.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-Nt*ht,(.5+gt)*et,2*ht)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*et,2*ht,0,2*ht-Nt*ht)),lt.spot1=new go.Spot(0,0,0,2*ht),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Nt*.5,yt=new go.PathFigure(0,nt-ht,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Nt*ht,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,(.5+gt)*et,0,et,Nt*ht)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-Nt*ht,(.5+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,nt,0,nt-Nt*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-Nt*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-Nt*ht)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ht),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Nt*.5,yt=new go.PathFigure(ht,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Nt*ht,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Nt*ht,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Nt*ht,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Nt*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+Nt*ht,0,2*ht,(.5-gt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ht,nt,2*ht,(.5+gt)*nt,ht+Nt*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(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Nt*.5,yt=new go.PathFigure(et-ht,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Nt*ht,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Nt*ht,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Nt*ht,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Nt*ht,0)),yt.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-Nt*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-Nt*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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=.2,gt=.1,yt=Nt*lt,Pt=Nt*gt,Tt=.5,It=.1,zt=new go.PathFigure(Tt*et,(It+gt)*nt,!0);ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-lt)*et,It*nt,(Tt-yt)*et,(It+gt)*nt,(Tt-lt)*et,(It+Pt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-gt)*nt,(Tt-lt)*et,(It-Pt)*nt,(Tt-yt)*et,(It-gt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+lt)*et,It*nt,(Tt+yt)*et,(It-gt)*nt,(Tt+lt)*et,(It-Pt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It+gt)*nt,(Tt+lt)*et,(It+Pt)*nt,(Tt+yt)*et,(It+gt)*nt));var _t=.05,se=Nt*_t;Tt=.05,It=.25;var Jt=new go.PathFigure(.5*et,.2*nt,!0);return ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Tt=.95,It=.25,Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+_t)*et,It*nt,(Tt+se)*et,(It-_t)*nt,(Tt+_t)*et,(It-se)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),_t=.025,se=Nt*_t,Tt=.825,It=.35,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-_t)*nt,(Tt+_t)*et,(It-se)*nt,(Tt+se)*et,(It-_t)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-_t)*et,It*nt,(Tt-se)*et,(It-_t)*nt,(Tt-_t)*et,(It-se)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),_t=.05,se=Nt*_t,Tt=.5,It=.7,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-_t)*nt,(Tt+_t)*et,(It-se)*nt,(Tt+se)*et,(It-_t)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-_t)*et,It*nt,(Tt-se)*et,(It-_t)*nt,(Tt-_t)*et,(It-se)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),_t=.025,se=Nt*_t,Tt=.175,It=.35,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-_t)*nt,(Tt+_t)*et,(It-se)*nt,(Tt+se)*et,(It-_t)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-_t)*et,It*nt,(Tt-se)*et,(It-_t)*nt,(Tt-_t)*et,(It-se)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),_t=.05,se=Nt*_t,Tt=.05,It=.25,Jt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-_t)*nt,(Tt-_t)*et,(It-se)*nt,(Tt-se)*et,(It-_t)*nt)),Jt.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 dn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Bt,et,nt){var ht=Bt?Bt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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 yt=new go.PathFigure(0,lt*nt,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ht}),go.Shape.defineFigureGenerator("Database",function(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=Nt*.1,yt=new go.PathFigure(et,.1*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-lt)*et,0)),yt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=Nt*.1,yt=new go.PathFigure(et,.1*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-lt)*et,0)),yt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=Nt*.2,yt=new go.PathFigure(0,.2*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-gt)*nt,(.2-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+gt)*et,0,et,(.2-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+gt)*nt,(.8+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-gt)*et,nt,0,(.8+gt)*nt)),yt.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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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 yt=new go.PathFigure(0,lt*nt,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ht}),go.Shape.defineFigureGenerator("Document",function(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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 yt=new go.PathFigure(lt*et,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Bt,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(Bt,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(Bt,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 yt=new go.PathFigure(et,.5*nt,!1);return ht.add(yt),yt.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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.parameter1:NaN,gt=Bt?Bt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var yt=new go.PathFigure(0,0,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.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(Bt,et,nt){var ht=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,yt=Nt*.5,Pt=.5,Tt=new go.PathFigure(et,Pt*nt,!0);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*et,nt,et,(Pt+yt)*nt,(Pt+yt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,Pt*nt,(Pt-yt)*et,nt,0,(Pt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*et,0,0,(Pt-yt)*nt,(Pt-yt)*et,0)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,et,Pt*nt,(Pt+yt)*et,0,et,(Pt-yt)*nt));var It=new go.PathFigure((gt+lt)*et,(gt+lt)*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),It.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*et,gt*nt)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=.5,yt=new go.PathFigure(.5*et,nt,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*et,.9*nt,et,(gt+lt)*nt,(gt+lt)*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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(Bt,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(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,yt=new go.PathFigure(0,0,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=.5,yt=new go.PathFigure(et,gt*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.parameter1:NaN,gt=Bt?Bt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.parameter1:NaN,gt=Bt?Bt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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 yt=new go.PathFigure((1-lt)*et,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,lt*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ht}),go.Shape.defineFigureGenerator("Process",function(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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 yt=new go.PathFigure(lt*et,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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 yt=new go.PathFigure(lt*et,0,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,0)),yt.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Bt?Bt.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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=.5,yt=new go.PathFigure(et,gt*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.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 Tt=new go.PathFigure(.8*et,.75*nt,!1);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ht}),go.Shape.defineFigureGenerator("Ground",function(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.1,gt=.1,yt=.9,Pt=.5,Tt=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Tt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var It=new go.PathFigure((yt+gt)*et,Pt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,(yt-lt)*et,(Pt+gt)*nt,(yt-gt)*et,(Pt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,(yt+lt)*et,(Pt-gt)*nt,(yt+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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=Nt*.4,yt=Nt*.1,Pt=.1,Tt=.9,It=.5,zt=new go.PathFigure(.8*et,.5*nt,!0);ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+lt)*et,nt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),zt.add(new go.PathSegment(go.PathSegment.Line,0,0)),zt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),zt.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((Tt+Pt)*et,It*nt,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It+Pt)*nt,(Tt+Pt)*et,(It+yt)*nt,(Tt+yt)*et,(It+Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Pt)*et,It*nt,(Tt-yt)*et,(It+Pt)*nt,(Tt-Pt)*et,(It+yt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-Pt)*nt,(Tt-Pt)*et,(It-yt)*nt,(Tt-yt)*et,(It-Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Pt)*et,It*nt,(Tt+yt)*et,(It-Pt)*nt,(Tt+Pt)*et,(It-yt)*nt)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=Nt*lt,yt=0,Pt=.5,Tt=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Pt-lt)*nt,.7*et,(Pt-gt)*nt)),lt=.1,gt=Nt*.1,yt=.9,Pt=.5;var It=new go.PathFigure((yt-lt)*et,Pt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Pt*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Pt*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-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(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=Nt*lt,yt=0,Pt=.5,Tt=new go.PathFigure(0,0,!0);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt+gt)*et,(Pt-lt)*nt,.8*et,(Pt-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(Pt+gt)*nt,(yt+gt+gt)*et,(Pt+lt)*nt)),Tt.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(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=Nt*lt,yt=.2,Pt=.5,Tt=new go.PathFigure(.1*et,0,!1);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.8*et,.5*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Pt-lt)*nt,.7*et,(Pt-gt)*nt)),lt=.1,gt=Nt*.1,yt=.9,Pt=.5;var zt=new go.PathFigure((yt-lt)*et,Pt*nt,!0);return ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Pt*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Pt*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-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(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=Nt*lt,yt=.2,Pt=.5,Tt=new go.PathFigure(.1*et,0,!1);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.2*et,0,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt)*et,(Pt-lt)*nt,.9*et,(Pt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),It.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(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.1,gt=.1,yt=.1,Pt=.5,Tt=new go.PathFigure((yt-lt*.5)*et,nt,!1);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.3,Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.5,Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.7,Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.9,Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt*.5)*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.5,gt=.5,yt=.5,Pt=.5,Tt=new go.PathFigure((yt-gt)*et,Pt*nt,!1);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,(yt+lt)*et,(Pt-gt)*nt,(yt+gt)*et,(Pt-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,(yt-lt)*et,(Pt+gt)*nt,(yt-gt)*et,(Pt+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Move,(yt-gt+.1)*et,Pt*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt-.1)*et,Pt*nt,yt*et,(Pt-gt)*nt,yt*et,(Pt+gt)*nt)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=et,gt=nt;et=et*.38,nt=nt*.6;var yt=Nt*.8,Pt=.8,Tt=0,It=.5,zt=(lt-et)/2,_t=(gt-nt)/2,se=new go.PathFigure(Tt*et+zt,(It+Pt)*nt+_t,!0);ht.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Pt)*et+zt,It*nt+_t,(Tt-yt)*et+zt,(It+Pt)*nt+_t,(Tt-Pt)*et+zt,(It+yt)*nt+_t)),se.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It-Pt)*nt+_t,(Tt-Pt)*et+zt,(It-yt)*nt+_t,(Tt-yt)*et+zt,(It-Pt)*nt+_t)),se.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Pt+yt*.5)*et+zt,It*nt+_t,Tt*et+zt,(It-Pt)*nt+_t,(Tt-Pt+yt*.5)*et+zt,(It-yt)*nt+_t)),se.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It+Pt)*nt+_t,(Tt-Pt+yt*.5)*et+zt,(It+yt)*nt+_t,Tt*et+zt,(It+Pt)*nt+_t).close()),yt=Nt*.4,Pt=.4,Tt=.2,It=.5;var Jt=new go.PathFigure(Tt*et+zt,(It+Pt)*nt+_t,!0);ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Pt)*et+zt,It*nt+_t,(Tt-yt)*et+zt,(It+Pt)*nt+_t,(Tt-Pt)*et+zt,(It+yt)*nt+_t)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It-Pt)*nt+_t,(Tt-Pt)*et+zt,(It-yt)*nt+_t,(Tt-yt)*et+zt,(It-Pt)*nt+_t)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Pt+yt*.5)*et+zt,It*nt+_t,Tt*et+zt,(It-Pt)*nt+_t,(Tt-Pt+yt*.5)*et+zt,(It-yt)*nt+_t)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It+Pt)*nt+_t,(Tt-Pt+yt*.5)*et+zt,(It+yt)*nt+_t,Tt*et+zt,(It+Pt)*nt+_t).close()),yt=Nt*.2,Pt=.2,Tt=.5,It=.5;var le=new go.PathFigure((Tt-Pt)*et+zt,It*nt+_t,!0);ht.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It-Pt)*nt+_t,(Tt-Pt)*et+zt,(It-yt)*nt+_t,(Tt-yt)*et+zt,(It-Pt)*nt+_t)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Pt)*et+zt,It*nt+_t,(Tt+yt)*et+zt,(It-Pt)*nt+_t,(Tt+Pt)*et+zt,(It-yt)*nt+_t)),le.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It+Pt)*nt+_t,(Tt+Pt)*et+zt,(It+yt)*nt+_t,(Tt+yt)*et+zt,(It+Pt)*nt+_t)),le.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Pt)*et+zt,It*nt+_t,(Tt-yt)*et+zt,(It+Pt)*nt+_t,(Tt-Pt)*et+zt,(It+yt)*nt+_t)),yt=Nt*.4,Pt=.4,Tt=.8,It=.5;var Zt=new go.PathFigure(Tt*et+zt,(It-Pt)*nt+_t,!0);ht.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Pt)*et+zt,It*nt+_t,(Tt+yt)*et+zt,(It-Pt)*nt+_t,(Tt+Pt)*et+zt,(It-yt)*nt+_t)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It+Pt)*nt+_t,(Tt+Pt)*et+zt,(It+yt)*nt+_t,(Tt+yt)*et+zt,(It+Pt)*nt+_t)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Pt-yt*.5)*et+zt,It*nt+_t,Tt*et+zt,(It+Pt)*nt+_t,(Tt+Pt-yt*.5)*et+zt,(It+yt)*nt+_t)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It-Pt)*nt+_t,(Tt+Pt-yt*.5)*et+zt,(It-yt)*nt+_t,Tt*et+zt,(It-Pt)*nt+_t).close()),yt=Nt*.8,Pt=.8,Tt=1,It=.5;var Fe=new go.PathFigure(Tt*et+zt,(It-Pt)*nt+_t,!0);return ht.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Pt)*et+zt,It*nt+_t,(Tt+yt)*et+zt,(It-Pt)*nt+_t,(Tt+Pt)*et+zt,(It-yt)*nt+_t)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It+Pt)*nt+_t,(Tt+Pt)*et+zt,(It+yt)*nt+_t,(Tt+yt)*et+zt,(It+Pt)*nt+_t)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Pt-yt*.5)*et+zt,It*nt+_t,Tt*et+zt,(It+Pt)*nt+_t,(Tt+Pt-yt*.5)*et+zt,(It+yt)*nt+_t)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+zt,(It-Pt)*nt+_t,(Tt+Pt-yt*.5)*et+zt,(It-yt)*nt+_t,Tt*et+zt,(It-Pt)*nt+_t).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Bt,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(Bt,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 yt=new go.PathFigure(.6*et,nt,!0,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),yt.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(Bt,et,nt){var ht=new go.Geometry,lt=Nt*.4,gt=.4,yt=.5,Pt=.5,Tt=wt(),It=wt(),zt=wt(),_t=wt();Ie(yt,Pt-gt,yt+lt,Pt-gt,yt+gt,Pt-lt,yt+gt,Pt,.5,Tt,Tt,It,zt,_t);var se=bt(It.x,It.y),Jt=new go.PathFigure(It.x*et,It.y*nt,!0);ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,zt.x*et,zt.y*nt,_t.x*et,_t.y*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,(yt-lt)*et,(Pt+gt)*nt,(yt-gt)*et,(Pt+lt)*nt)),Ie(yt-gt,Pt,yt-gt,Pt-lt,yt-lt,Pt-gt,yt,Pt-gt,.5,zt,_t,It,Tt,Tt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,zt.x*et,zt.y*nt,_t.x*et,_t.y*nt)),lt=Nt*.3,gt=.3,Ie(yt-gt,Pt,yt-gt,Pt-lt,yt-lt,Pt-gt,yt,Pt-gt,.5,zt,_t,It,Tt,Tt),Jt.add(new go.PathSegment(go.PathSegment.Line,It.x*et,It.y*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Pt*nt,_t.x*et,_t.y*nt,zt.x*et,zt.y*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+gt)*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-lt)*et,(Pt+gt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Pt*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),Ie(yt,Pt-gt,yt+lt,Pt-gt,yt+gt,Pt-lt,yt+gt,Pt,.5,Tt,Tt,It,zt,_t),Jt.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,_t.x*et,_t.y*nt,zt.x*et,zt.y*nt).close());var Jt=new go.PathFigure(.45*et,0,!0);return ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),ee(Tt),ee(It),ee(zt),ee(_t),ee(se),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Bt,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(yt,Pt,Tt){yt.add(new go.PathSegment(go.PathSegment.Move,(.3+Pt)*et,(.8+Tt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.5+Pt)*et,(.5+Tt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.1+Pt)*et,(.5+Tt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.3+Pt)*et,(.8+Tt)*nt).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Bt,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(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=0,yt=0,Pt=lt*Nt,Tt=.4*Math.SQRT2/2+.5,It=.5-.5*Math.SQRT2/2,zt=1,_t=.5,se=.5,Jt=0,le=new go.PathFigure(Tt*et,(1-It)*nt,!1);return ht.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,zt*et,_t*nt,zt*et,.7*nt,zt*et,_t*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(se+gt)*et,(Jt+gt)*nt,(.5+lt+gt)*et,(.5-Pt+gt)*nt,(.5+Pt+gt)*et,(.5-lt+gt)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Pt+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Pt+yt)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-lt+gt)*et,(.5+Pt+yt)*nt,(.5-Pt+gt)*et,.9*nt)),le.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),le.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),le.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Bt,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(Bt,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(Bt,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 yt=new go.PathFigure(0,.5*nt,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Bt,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(Bt,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(Bt,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(Bt,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 yt=.5-.285,Pt=.5,Tt=yt,It=Math.PI/4,zt=4*(1-Math.cos(It))/(3*Math.sin(It)),_t=zt*.5,se=yt,Jt=yt,le=zt*se,Zt=zt*Jt;gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-se)*et,Tt*nt,(Pt-(le+se)/2)*et,(Tt+(Jt+Zt)/2)*nt,(Pt-se)*et,(Tt+Zt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*et,(Tt-Jt)*nt,(Pt-se)*et,(Tt-Zt)*nt,(Pt-le)*et,(Tt-Jt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+se)*et,Tt*nt,(Pt+le)*et,(Tt-Jt)*nt,(Pt+se)*et,(Tt-Zt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(Pt+se)*et,(Tt+Zt)*nt,(Pt+(le+se)/2)*et,(Tt+(Jt+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 Fe=new go.PathFigure(.2*et,nt,!1);ht.add(Fe),Fe.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(Bt,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(Bt,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(Bt,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 yt=new go.PathFigure(.1*et,nt,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(Bt,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(Bt,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 yt=new go.PathFigure(.675*et,.575*nt,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=Nt*.5,yt=new go.PathFigure(et,lt*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,nt,et,(lt+gt)*nt,(lt+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*nt,(lt-gt)*et,nt,0,(lt+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,0,0,(lt-gt)*nt,(lt-gt)*et,0)),yt.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(Bt,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(Bt,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 yt=new go.PathFigure(0,.5*nt,!1);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Bt,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 yt=new go.PathFigure(0,.6*nt,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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 yt=.1,Pt=Nt*.1,Tt=.2,It=.9,zt=new go.PathFigure((Tt-yt)*et,It*nt,!0);ht.add(zt),zt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-yt)*nt,(Tt-yt)*et,(It-Pt)*nt,(Tt-Pt)*et,(It-yt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+yt)*et,It*nt,(Tt+Pt)*et,(It-yt)*nt,(Tt+yt)*et,(It-Pt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It+yt)*nt,(Tt+yt)*et,(It+Pt)*nt,(Tt+Pt)*et,(It+yt)*nt)),zt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-yt)*et,It*nt,(Tt-Pt)*et,(It+yt)*nt,(Tt-yt)*et,(It+Pt)*nt).close()),yt=.1,Pt=Nt*.1,Tt=.8,It=.9;var _t=new go.PathFigure((Tt-yt)*et,It*nt,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It-yt)*nt,(Tt-yt)*et,(It-Pt)*nt,(Tt-Pt)*et,(It-yt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+yt)*et,It*nt,(Tt+Pt)*et,(It-yt)*nt,(Tt+yt)*et,(It-Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(It+yt)*nt,(Tt+yt)*et,(It+Pt)*nt,(Tt+Pt)*et,(It+yt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-yt)*et,It*nt,(Tt-Pt)*et,(It+yt)*nt,(Tt-yt)*et,(It+Pt)*nt).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Bt,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(Bt,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 yt=new go.PathFigure(.5*et,.8*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),yt.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 Tt=.1,It=Nt*.1,zt=.1,_t=.9,se=new go.PathFigure((zt-Tt)*et,_t*nt,!0);ht.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,zt*et,(_t-Tt)*nt,(zt-Tt)*et,(_t-It)*nt,(zt-It)*et,(_t-Tt)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(zt+Tt)*et,_t*nt,(zt+It)*et,(_t-Tt)*nt,(zt+Tt)*et,(_t-It)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,zt*et,(_t+Tt)*nt,(zt+Tt)*et,(_t+It)*nt,(zt+It)*et,(_t+Tt)*nt)),se.add(new go.PathSegment(go.PathSegment.Bezier,(zt-Tt)*et,_t*nt,(zt-It)*et,(_t+Tt)*nt,(zt-Tt)*et,(_t+It)*nt)),Tt=.1,It=Nt*.1,zt=.4,_t=.9;var Jt=new go.PathFigure((zt-Tt)*et,_t*nt,!0);return ht.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,zt*et,(_t-Tt)*nt,(zt-Tt)*et,(_t-It)*nt,(zt-It)*et,(_t-Tt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(zt+Tt)*et,_t*nt,(zt+It)*et,(_t-Tt)*nt,(zt+Tt)*et,(_t-It)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,zt*et,(_t+Tt)*nt,(zt+Tt)*et,(_t+It)*nt,(zt+It)*et,(_t+Tt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(zt-Tt)*et,_t*nt,(zt-It)*et,(_t+Tt)*nt,(zt-Tt)*et,(_t+It)*nt)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Bt,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 yt=new go.PathFigure(.55*et,.4*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var zt=.05,_t=Nt*.05,se=.175,Jt=.95,Pt=new go.PathFigure((se-zt)*et,Jt*nt,!0);ht.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt-zt)*nt,(se-zt)*et,(Jt-_t)*nt,(se-_t)*et,(Jt-zt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(se+zt)*et,Jt*nt,(se+_t)*et,(Jt-zt)*nt,(se+zt)*et,(Jt-_t)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt+zt)*nt,(se+zt)*et,(Jt+_t)*nt,(se+_t)*et,(Jt+zt)*nt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(se-zt)*et,Jt*nt,(se-_t)*et,(Jt+zt)*nt,(se-zt)*et,(Jt+_t)*nt));var zt=.05,_t=Nt*.05,se=.375,Jt=.95,Tt=new go.PathFigure((se-zt)*et,Jt*nt,!0);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt-zt)*nt,(se-zt)*et,(Jt-_t)*nt,(se-_t)*et,(Jt-zt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(se+zt)*et,Jt*nt,(se+_t)*et,(Jt-zt)*nt,(se+zt)*et,(Jt-_t)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt+zt)*nt,(se+zt)*et,(Jt+_t)*nt,(se+_t)*et,(Jt+zt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(se-zt)*et,Jt*nt,(se-_t)*et,(Jt+zt)*nt,(se-zt)*et,(Jt+_t)*nt));var zt=.05,_t=Nt*.05,se=.625,Jt=.95,It=new go.PathFigure((se-zt)*et,Jt*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt-zt)*nt,(se-zt)*et,(Jt-_t)*nt,(se-_t)*et,(Jt-zt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(se+zt)*et,Jt*nt,(se+_t)*et,(Jt-zt)*nt,(se+zt)*et,(Jt-_t)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt+zt)*nt,(se+zt)*et,(Jt+_t)*nt,(se+_t)*et,(Jt+zt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(se-zt)*et,Jt*nt,(se-_t)*et,(Jt+zt)*nt,(se-zt)*et,(Jt+_t)*nt));var zt=.05,_t=Nt*.05,se=.825,Jt=.95,le=new go.PathFigure((se-zt)*et,Jt*nt,!0);ht.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt-zt)*nt,(se-zt)*et,(Jt-_t)*nt,(se-_t)*et,(Jt-zt)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(se+zt)*et,Jt*nt,(se+_t)*et,(Jt-zt)*nt,(se+zt)*et,(Jt-_t)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*et,(Jt+zt)*nt,(se+zt)*et,(Jt+_t)*nt,(se+_t)*et,(Jt+zt)*nt)),le.add(new go.PathSegment(go.PathSegment.Bezier,(se-zt)*et,Jt*nt,(se-_t)*et,(Jt+zt)*nt,(se-zt)*et,(Jt+_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(Bt,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 yt=new go.PathFigure(.15*et,nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var Pt=.05,Tt=Nt*.05,It=.35,zt=.775,_t=new go.PathFigure((It-Pt)*et,zt*nt,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(zt-Pt)*nt,(It-Pt)*et,(zt-Tt)*nt,(It-Tt)*et,(zt-Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(It+Pt)*et,zt*nt,(It+Tt)*et,(zt-Pt)*nt,(It+Pt)*et,(zt-Tt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(zt+Pt)*nt,(It+Pt)*et,(zt+Tt)*nt,(It+Tt)*et,(zt+Pt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(It-Pt)*et,zt*nt,(It-Tt)*et,(zt+Pt)*nt,(It-Pt)*et,(zt+Tt)*nt).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=.3,gt=Nt*.3,yt=.5,Pt=.7,Tt=new go.PathFigure((yt-lt)*et,Pt*nt,!0);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Pt*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Pt*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-lt)*et,(Pt+gt)*nt));var It=new go.PathFigure(0,.7*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Bt,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(Bt,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(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=Nt*.5,yt=.5,Pt=.5,Tt=new go.PathFigure((yt-lt)*et,Pt*nt,!0);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Pt*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Pt*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-lt)*et,(Pt+gt)*nt));var It=new go.PathFigure(.15*et,.5*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Flag",function(Bt,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(Bt,et,nt){var ht=new go.Geometry,lt=.5,gt=Nt*.5,yt=.5,Pt=.5,Tt=new go.PathFigure((yt-lt)*et,Pt*nt,!1);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Pt*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Pt*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-lt)*et,(Pt+gt)*nt).close()),lt=.05,gt=Nt*.05,yt=.5,Pt=.8;var It=new go.PathFigure((yt-lt)*et,Pt*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt-lt)*nt,(yt-lt)*et,(Pt-gt)*nt,(yt-gt)*et,(Pt-lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Pt*nt,(yt+gt)*et,(Pt-lt)*nt,(yt+lt)*et,(Pt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Pt+lt)*nt,(yt+lt)*et,(Pt+gt)*nt,(yt+gt)*et,(Pt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Pt*nt,(yt-gt)*et,(Pt+lt)*nt,(yt-lt)*et,(Pt+gt)*nt).close()),It.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),It.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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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(Bt,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 yt=new go.PathFigure(.402*et,.85*nt,!1);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),yt.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 Tt=new go.PathFigure(.5*et,.1*nt,!1);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Bt,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(Bt,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 yt=new go.PathFigure(et*.408,nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),yt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),yt.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 Tt=new go.PathFigure(et*.816,nt,!0);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Tt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Tt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Bt,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 yt=new go.PathFigure(et*.055,.13*nt,!0);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),yt.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 Tt=new go.PathFigure(et*1,0,!0);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Bt,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(Bt,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(Bt,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 yt=new go.PathFigure(et*.11,nt*.1,!1);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),yt.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 Tt=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Bt,et,nt){var ht=new go.Geometry,lt=8,gt=lt*Nt,yt=new go.PathFigure(lt,0,!1);ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-gt,et-gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),yt.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 Tt=new go.PathFigure(et*.83,nt*1,!1);ht.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var It=new go.PathFigure(et*.78,nt*.05,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),It.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Bt,et,nt){var ht=Bt?Bt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var lt=ht*Nt,gt=nt*.8,yt=new go.Geometry,Pt=new go.PathFigure(ht,0,!0);return yt.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?(yt.spot1=new go.Spot(0,0,lt,lt),yt.spot2=new go.Spot(1,.8,-lt,-lt)):(yt.spot1=go.Spot.TopLeft,yt.spot2=new go.Spot(1,.8)),yt}),go.Shape.defineFigureGenerator("Repeat",function(Bt,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(Bt,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(Bt,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 yt=new go.PathFigure(et*.28,nt*.37,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Bt,et,nt){var ht=new go.Geometry,lt=15,gt=lt*Nt,yt=new go.PathFigure(et*.62,nt*.475,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-gt,et-gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),yt.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(Bt,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 yt=new go.PathFigure(et*.4,nt*0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(Bt,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(Bt,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 yt=new go.PathFigure(et*.5,nt*0,!0);return ht.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Bt,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(Bt,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(Bt,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 dn={},Mn="5.0",bt={},wt=null,ee=!1,he=!1,Ie=null,te=!1,Pe=null,Nt=null,Le=0;Le<arguments.length;Le++){var ve=arguments[Le];if(ve!==null)switch(typeof ve){case"number":Mn=ve.toFixed(1);break;case"string":ve.match(new RegExp("^[0-9]\\.[0-9]+$"))?Mn=ve:Ie=ve;break;case"object":typeof ve.is3D!="undefined"?wt=ve:bt=ve;break;case"boolean":ee=ve,he=!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&&!he&&(ee=!0)),Ie!==null&&bt.id===void 0&&(bt.id=Ie);var Xt="",fe="",xe=!1,je=null,Bt=null,et=null,nt=!1,ht=null,lt=null,gt=null,yt=null,Pt=null;bt.height!==void 0&&(bt.height=Math.round(bt.height)),bt.width!==void 0&&(bt.width=Math.round(bt.width));var Tt=function(Ae){return parseFloat(Ae)>4?parseFloat(Ae):5};dn.setHTML5Codebase=function(Ae,hn){Nt=Ae,Xe(Ae,hn)},dn.setJavaCodebase=dn.setJavaCodebaseVersion=dn.isCompiledInstalled=dn.setPreCompiledScriptPath=dn.setPreCompiledResourcePath=function(){},dn.setHTML5CodebaseVersion=function(Ae,hn){var bn=parseFloat(Ae);if(bn!==NaN&&bn<5){console.log("The GeoGebra HTML5 codebase version "+bn+" is deprecated. Using version latest instead.");return}Pe=Ae,Vt(Ae,hn)},dn.getHTML5CodebaseVersion=function(){return Bt},dn.getParameters=function(){return bt},dn.setFontsCSSURL=function(Ae){yt=Ae},dn.setGiacJSURL=function(Ae){},dn.setJNLPFile=function(Ae){Xt=Ae},dn.setJNLPBaseDir=function(Ae){},dn.inject=function(){function Ae(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var hn="auto",bn=bt.id,Jn,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)$/)?hn=Ce:bn=arguments[ui]):typeof Ce=="boolean"?mn=Ce:Ce instanceof HTMLElement&&(Jn=Ce)}ni();function ni(){if(!te){setTimeout(ni,200);return}hn=xn(hn);var Pi=Jn||document.getElementById(bn);if(!Pi){console.log("possibly bug on ajax loading? ");return}if(dn.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)&&hn==="html5"&&(delete bt.width,delete bt.height),je=hn,hn==="screenshot")me(Pi,bt);else{var gn=!1;bt.hasOwnProperty("playButton")&&bt.playButton||bt.hasOwnProperty("clickToLoad")&&bt.clickToLoad?gn=!0:bt.hasOwnProperty("playButtonAutoDecide")&&bt.playButtonAutoDecide&&(gn=(!It()||Ae())&&zt()),gn?(je="screenshot",Qe(Pi,bt,mn,hn)):Fe(Pi,bt,mn)}}};function It(){try{return window.self!==window.top}catch(Ae){return!0}}function zt(){return bt.hasOwnProperty("screenshotGenerator")&&bt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}dn.getViews=function(){return wt},dn.isJavaInstalled=function(){return!1};var _t=function(Ae){var hn=function(ui){var Ce=JSON.parse(ui),ni=function(Tn){return Tn.type=="G"||Tn.type=="E"},Pi=Ce.elements?Ce.elements.filter(ni)[0]:Ce;if(!Pi||!Pi.url){bn();return}bt.fileName=Pi.url,se(Pi.settings||{}),wt.is3D=!0;var gn="https://www.geogebra.org/images/";dn.setPreviewImage(ht||Pi.previewUrl,gn+"GeoGebra_loading.png",gn+"applet_play.png"),Ae()},bn=function(){bt.onError&&bt.onError(),Xn("Error: Fetching material (id "+bt.material_id+") failed.",bt)},Jn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",mn="/materials/"+bt.material_id+"?scope=basic";Jt("https://"+Jn+"/api/proxy.php?path="+encodeURIComponent(mn),hn,bn)};function se(Ae){var hn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(bn){Ae[bn]=!!Ae[bn]}),hn.forEach(function(bn){bt[bn]===void 0&&Ae[bn]!==void 0&&(bt[bn]=Ae[bn])}),bt.showToolBarHelp===void 0&&(bt.showToolBarHelp=bt.showToolBar)}function Jt(Ae,hn,bn){var Jn=new XMLHttpRequest;Jn.open("GET",Ae),Jn.onload=function(){hn(Jn.responseText)},Jn.onerror=bn,Jn.send()}dn.isHTML5Installed=function(){return!0},dn.getLoadedAppletType=function(){return je},dn.setPreviewImage=function(Ae,hn,bn){ht=Ae,lt=hn,gt=bn},dn.removeExistingApplet=function(Ae,hn){var bn;typeof Ae=="string"&&(Ae=document.getElementById(Ae)),je=null;var Jn=null;for(bn=0;bn<Ae.childNodes.length;bn++){var mn=Ae.childNodes[bn],ui=mn.className;ui==="applet_screenshot"?hn?(mn.style.display="block",je="screenshot"):mn.style.display="none":ui!=="applet_scaler prerender"&&(Ae.removeChild(mn),Jn=ui&&ui.indexOf("appletParameters")!=-1?mn.id:null,bn--)}var Ce=bt.id!==void 0?bt.id:Jn,ni=window[Ce];ni&&typeof ni.getBase64=="function"&&(ni.remove(),window[Ce]=null)},dn.refreshHitPoints=function(){if(Tt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ae=dn.getAppletObject();return Ae&&typeof Ae.recalculateEnvironments=="function"?(Ae.recalculateEnvironments(),!0):!1},dn.startAnimation=function(){var Ae=dn.getAppletObject();return Ae&&typeof Ae.startAnimation=="function"?(Ae.startAnimation(),!0):!1},dn.stopAnimation=function(){var Ae=dn.getAppletObject();return Ae&&typeof Ae.stopAnimation=="function"?(Ae.stopAnimation(),!0):!1},dn.getAppletObject=function(){var Ae=bt.id!==void 0?bt.id:"ggbApplet";return window[Ae]},dn.resize=function(){};var le=function(Ae,hn,bn){var Jn=document.createElement("param");Jn.setAttribute("name",hn),Jn.setAttribute("value",bn),Ae.appendChild(Jn)},Zt=function(Ae){return Ae&&Ae!=="false"},Fe=function(Ae,hn,bn){Tt(Bt)<=4.2&&(bn=!0);var Jn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Bt||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Jn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var mn=document.createElement("div");mn.classList.add("appletParameters","notranslate");var ui=hn.width,Ce=hn.height;if(hn.disableAutoScale=hn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():hn.disableAutoScale,hn.width!==void 0)if(Tt(Bt)<=4.4)Zt(hn.showToolBar)&&(hn.height-=7),Zt(hn.showAlgebraInput)&&(hn.height-=37),hn.width<605&&Zt(hn.showToolBar)&&(hn.width=605,ui=605);else{var ni=100;(Zt(hn.showToolBar)||Zt(hn.showMenuBar))&&(hn.hasOwnProperty("customToolBar")&&(hn.customToolbar=hn.customToolBar),ni=Zt(hn.showMenuBar)?245:155),ui<ni&&(hn.width=ni,ui=ni)}mn.style.border="none",mn.style.display="inline-block";for(var Pi in hn)hn.hasOwnProperty(Pi)&&Pi!=="appletOnLoad"&&mn.setAttribute("data-param-"+Pi,hn[Pi]);yt&&mn.setAttribute("data-param-fontscssurl",yt),dn.resize=function(){GGBAppletUtils.responsiveResize(Ae,hn)},window.addEventListener("resize",function(mt){dn.resize()});var gn=typeof hn.appletOnLoad=="function"?hn.appletOnLoad:function(){};if(!bn&&hn.width!==void 0){hn.hasOwnProperty("showSplash")||mn.setAttribute("data-param-showSplash","false");var Tn=Ae.querySelector(".applet_scaler.prerender"),pn=Tn!==null;if(pn)var Un=Tn.querySelector(".ggb_preview");else{var Un=vn(ui,Ce,hn.borderColor,!1);Tn=document.createElement("div"),Tn.className="applet_scaler",Tn.style.position="relative",Tn.style.display="block",Tn.style.width=ui+"px",Tn.style.height=Ce+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Tn,"66%"),Tt(Bt)>=5?(hn.appletOnLoad=function(mt){var At=Ae.querySelector(".ggb_preview");At&&At.parentNode.removeChild(At),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Tn),window.GGBT_wsf_view&&$(window).trigger("resize"),gn(mt)},pn||Tn.appendChild(Un)):mn.appendChild(Un),Tn.appendChild(mn),pn||Ae.appendChild(Tn),setTimeout(function(){dn.resize()},1)}else{var On=document.createElement("div");On.className="applet_scaler",On.style.position="relative",On.style.display="block",On.appendChild(mn),Ae.appendChild(On),hn.appletOnLoad=function(mt){dn.resize(),gn(mt)}}function we(mt,At){At&&typeof At.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mt,At.appletOnLoad):renderGGBElement(mt),Xn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",At)}function In(mt,At){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mt,params:At}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Rt){we(Rt.article,Rt.params)}),html5AppletsToProcess=null)},Tt(Bt)<5&&(mt.className+=" geogebraweb")):we(mt,At)}if(Jn){scriptLoadStarted=!0;for(var rn=0;rn<mn.childNodes.length;rn++){var ge=mn.childNodes[rn].tagName;ge==="TABLE"&&(mn.removeChild(mn.childNodes[rn]),rn--)}if(ggbHTML5LoadedScript!==null){var oe=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');oe!=null&&oe.parentNode.removeChild(oe)}var Ft=document.createElement("script"),St=function(){In(mn,hn)};Ft.src=fe+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Bt,ggbHTML5LoadedScript=Ft.src,Xn("GeoGebra HTML5 codebase loaded: '"+fe+"'.",hn),!Nt&&(!Pe||Pe=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),St()):fe.requirejs?__webpack_require__.e(4184).then(function(){var mt=[__webpack_require__(74620)];St.apply(null,mt)}.bind(this)).catch(__webpack_require__.oe):(Ft.onload=St,Ae.appendChild(Ft))}else In(mn,hn);hn.height=Ce,hn.width=ui},me=function(Ae,hn,bn){var Jn=vn(hn.width,hn.height,hn.borderColor,bn),mn=document.createElement("div");mn.style.position="relative",mn.style.display="block",mn.style.width=hn.width+"px",mn.style.height=hn.height+"px",mn.className="applet_screenshot applet_scaler"+(bn?" applet_screenshot_play":""),mn.appendChild(Jn);var ui=GGBAppletUtils.getScale(hn,Ae,bn);bn?(Ae.appendChild(qe()),window.GGBT_wsf_view||(Ae.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(mn,"66%"),Ae.appendChild(mn),ui!==1&&!isNaN(ui)&&(GGBAppletUtils.scaleElement(mn,ui),mn.style.width=hn.width+"px",mn.style.height=hn.height+"px",mn.parentNode.style.width=hn.width*ui+"px",mn.parentNode.style.height=hn.height*ui+"px"),dn.resize=function(){Ve(Ae,Jn,mn,bn)},window.addEventListener("resize",function(Ce){dn.resize()}),dn.resize()};function Ve(Ae,hn,bn,Jn){if(Ae.contains(hn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ae.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ae)}var mn=GGBAppletUtils.getScale(bt,Ae,Jn);bn.parentNode!==null&&(!isNaN(mn)&&mn!==1?(GGBAppletUtils.scaleElement(bn,mn),bn.parentNode.style.width=bt.width*mn+"px",bn.parentNode.style.height=bt.height*mn+"px"):(GGBAppletUtils.scaleElement(bn,1),bn.parentNode.style.width=bt.width+"px",bn.parentNode.style.height=bt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ae),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}dn.onExitFullscreen=function(Ae,hn){hn.appendChild(Ae)};var Qe=function(Ae,hn,bn,Jn){me(Ae,hn,!0);for(var mn=function(){var ni=[];for(Ce=0;Ce<Ae.childNodes.length;Ce++)ni.push(Ae.childNodes[Ce]);if(window.GGBT_wsf_view){var Pi=window.GGBT_wsf_view.renderFullScreen(Ae,hn.id),gn=document.getElementById("fullscreencontainer"),Tn=jQuery(Ae).find(".fullscreencontent");Tn.length>0?(Pi.remove(),Tn.attr("id","fullscreencontent").show(),jQuery(gn).append(Tn),window.dispatchEvent(new Event("resize"))):Fe(Pi,hn,!1),window.GGBT_wsf_view.launchFullScreen(gn)}else je=Jn,Fe(Ae,hn,!1);if(!window.GGBT_wsf_view)for(Ce=0;Ce<ni.length;Ce++)Ae.removeChild(ni[Ce])},ui=Ae.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(Ae),zt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},qe=function(){var Ae=document.createElement("div");if(Ae.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var hn='.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");}',bn=document.createElement("style");bn.styleSheet?bn.styleSheet.cssText=hn:bn.appendChild(document.createTextNode(hn)),document.getElementsByTagName("head")[0].appendChild(bn)}return Ae},vn=function(Ae,hn,bn,Jn){var mn=document.createElement("div");mn.className="ggb_preview",mn.style.position="absolute",mn.style.zIndex="90",mn.style.width=Ae-2+"px",mn.style.height=hn-2+"px",mn.style.top="0px",mn.style.left="0px",mn.style.overflow="hidden",mn.style.backgroundColor="white";var ui="lightgrey";bn!==void 0&&(bn==="none"?ui="transparent":ui=bn),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 ni,Pi,gn;if(!Jn){ni=document.createElement("img"),ni.style.position="absolute",ni.style.zIndex="1001",ni.style.opacity=1,Ce.style.opacity=.3,Pi=360,Pi>Ae/4*3&&(Pi=Ae/4*3),gn=Pi/5.8,ni.setAttribute("src",lt),ni.setAttribute("width",Pi),ni.setAttribute("height",gn);var Tn=(Ae-Pi)/2,pn=(hn-gn)/2;ni.style.left=Tn+"px",ni.style.top=pn+"px",mn.appendChild(ni)}}return mn.appendChild(Ce),mn},xn=function(Ae){return Ae=Ae.toLowerCase(),Ae==="html5"||Ae==="screenshot"?Ae:"html5"},Se=["web","webSimple","web3d","tablet","tablet3d","phone"],Vt=function(Ae,hn){if(Bt=Ae,hn){Xe(Bt,!0);return}var bn=!ee;if(bn){var Jn=Tt(Bt);!isNaN(Jn)&&Jn<4.4&&(bn=!1)}var mn,ui;window.location.protocol.substr(0,4)==="http"?mn=window.location.protocol:mn="http:";var Ce=Bt.indexOf("//");Ce>0?ui=Bt:Ce===0?ui=mn+Bt:ui="https://www.geogebra.org/apps/5.2.814.0/";for(var ni in Se)if(Bt.slice(Se[ni].length*-1)===Se[ni]||Bt.slice((Se[ni].length+1)*-1)===Se[ni]+"/"){Xe(ui,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&bn&&!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/",Xe(ui,!1)},Xe=function(Ae,hn){if(Ae.requirejs){fe=Ae;return}Ae.slice(-1)!=="/"&&(Ae+="/"),fe=Ae,hn===null&&(hn=Ae.indexOf("http")===-1),xe=hn,et="web.nocache.js",nt=!1;var bn=fe.split("/");bn.length>1&&(!hn&&bn[bn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):Se.indexOf(bn[bn.length-2])>=0&&(et=bn[bn.length-2]+".nocache.js")),bn=Ae.split("/"),Bt=bn[bn.length-3],Bt.substr(0,4)==="test"?Bt=Bt.substr(4,1)+"."+Bt.substr(5,1):(Bt.substr(0,3)==="war"||Bt.substr(0,4)==="beta")&&(Bt="5.0");var Jn=parseFloat(Bt);Jn!==NaN&&Jn<5&&Ae.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Jn+" is deprecated. Using version latest instead."),Vt("5.0",hn))},Xn=function(Ae,hn){window.console&&window.console.log&&(!hn||typeof hn.showLogging=="undefined"||hn.showLogging&&hn.showLogging!=="false")&&console.log(Ae)};bt.material_id!==void 0?_t(Bn):Bn();function Bn(){var Ae=Mn;Pe!==null?Ae=Pe:parseFloat(Ae)<5&&(Ae="5.0"),Vt(Ae,!1),Nt!==null&&Xe(Nt,xe),te=!0}return dn},GGBAppletUtils=function(){"use strict";function dn(){return window.GGBT_wsf_edit!==void 0}function Mn(te,Pe){Pe!=1?(te.style.transformOrigin="0% 0% 0px",te.style.webkitTransformOrigin="0% 0% 0px",te.style.transform="scale("+Pe+","+Pe+")",te.style.webkitTransform="scale("+Pe+","+Pe+")",te.style.maxWidth="initial",te.querySelector(".ggb_preview")!==null&&(te.querySelector(".ggb_preview").style.maxWidth="initial"),te.querySelectorAll(".ggb_preview img")[0]!==void 0&&(te.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),te.querySelectorAll(".ggb_preview img")[1]!==void 0&&(te.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(te.style.transform="none",te.style.webkitTransform="none")}function bt(te,Pe,Nt,Le,ve,Xt){var fe=null;if(Xt!=null&&Xt!="")for(var xe=te.parentNode;xe!=null;)if((" "+xe.className+" ").indexOf(" "+Xt+" ")>-1){fe=xe;break}else xe=xe.parentNode;var je=0,Bt=0,et=0,nt=0,ht=0,lt=0,gt=0;if(fe)je=fe.offsetWidth,Bt=Math.max(Le?fe.offsetWidth:0,fe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(je=Math.min(window.innerWidth,document.documentElement.clientWidth),Bt=Math.min(window.innerHeight,document.documentElement.clientHeight),et=je):(je=window.innerWidth,Bt=window.innerHeight,et=window.innerWidth),te){var yt=te.getBoundingClientRect();yt.left>0&&yt.left<=je&&(ve===void 0||!ve)&&(document.dir==="rtl"?(ht=je-yt.width-yt.left,lt=et<=480?10:30):(lt=yt.left,ht=et<=480?10:30),nt=lt+ht)}if(te&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Pt=te.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return te&&((Nt===void 0||!Nt)&&Pe>0&&Pe+nt<je?je=Pe:je-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Nt===void 0||!Nt)&&(Bt-=gt)),{width:je,height:Bt}}function wt(te,Pe,Nt,Le,ve){if(te.isScreenshoGenerator)return 1;var Xt=Le!==void 0&&Le,fe=te.noScaleMargin!=null&&te.noScaleMargin,xe=function(Pt){return Pt&&Pt!=="false"},je=xe(te.autoHeight),Bt=bt(Pe,te.width,Nt,je,Xt&&window.GGBT_wsf_view||fe,ve),et=parseInt(Bt.width),nt=te.width,ht=te.height;if(nt===void 0){var lt=Pe.querySelector(".appletParameters");lt&&(nt=lt.offsetWidth,ht=lt.offsetHeight)}var gt=et/nt,yt=Xt?1:Bt.height/ht;return Nt!==void 0&&!Nt&&(gt=Math.min(1,gt),yt=Math.min(1,yt)),Math.min(gt,yt)}function ee(te,Pe,Nt){var Le=1,ve,Xt=!1;if(te.hasOwnProperty("allowUpscale")&&(Xt=te.allowUpscale),te.hasOwnProperty("scale")&&(Le=parseFloat(te.scale),(isNaN(Le)||Le===null||Le===0)&&(Le=1),Le>1&&(Xt=!0)),Pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Xt=!0),!(te.hasOwnProperty("disableAutoScale")&&te.disableAutoScale))ve=wt(te,Pe,Xt,Nt,te.scaleContainerClass);else return Le;return Xt&&(!te.hasOwnProperty("scale")||Le===1)?ve:Math.min(Le,ve)}function he(te){var Pe=Math.min(window.innerWidth,document.documentElement.clientWidth),Nt=Math.min(window.innerHeight,document.documentElement.clientHeight),Le=te.getBoundingClientRect(),ve=(Pe-Le.width)/2,Xt=(Nt-Le.height)/2;Xt<0&&(Xt=0),te.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ve<40?te.style.left="40px":te.style.left=ve+"px",te.style.top=Xt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Xt<40?te.style.top="40px":te.style.top=Xt+"px",te.style.left=ve+"px")}function Ie(te,Pe){var Nt=te.querySelector(".appletParameters");if(Nt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Pe.id!==Nt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(te)}if(Nt.parentElement&&/fullscreen/.test(Nt.parentElement.className))return;var Le=ee(Pe,te);dn()&&Nt.setAttribute("data-param-scale",Le);for(var ve=null,Xt=0;Xt<te.childNodes.length;Xt++)if(te.childNodes[Xt].className!==void 0&&te.childNodes[Xt].className.match(/^applet_scaler/)){ve=te.childNodes[Xt];break}if(ve!==null&&ve.querySelector(".noscale")!==null)return;var fe=Pe.id!==void 0?Pe.id:"ggbApplet",xe=window[fe];(xe==null||!xe.recalculateEnvironments)&&ve!==null&&!ve.className.match(/fullscreen/)&&(ve.parentNode.style.transform="",!isNaN(Le)&&Le!==1?(ve.parentNode.style.width=Pe.width*Le+"px",ve.parentNode.style.height=Pe.height*Le+"px",Mn(ve,Le)):(Mn(ve,1),ve.parentNode.style.width=Pe.width+"px",ve.parentNode.style.height=Pe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&he(te),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Nt).parents(".content-added-content"))}}return{responsiveResize:Ie,isFlexibleWorksheetEditor:dn,positionCenter:he,getScale:ee,scaleElement:Mn}}();__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 dn=n.location.search;return dn.indexOf(J)!=-1||dn.indexOf(K)!=-1}function q(dn,Mn){}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(dn){var Mn=s[L].bindings;s[L].bindings=function(){for(var bt=Mn?Mn():{},wt=dn[webModule.__softPermutationId],ee=O;ee<wt.length;ee++){var he=wt[ee];bt[he[O]]=he[P]}return bt}};var t;function u(){return v(),t}function v(){if(!t){var dn=o.createElement(Q);if(dn.id=L,dn.style.cssText=R+S,dn.tabIndex=-1,o.body.appendChild(dn),t=dn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Mn=document.compatMode==U?V:W;t.write(Mn+X),t.close()}}}function w(dn){function Mn(wt){function ee(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var he=ee();if(he){wt();return}function Ie(){if(!he){if(!ee())return;he=!0,wt(),o.removeEventListener&&o.removeEventListener(Z,Ie,!1),te&&clearInterval(te)}}o.addEventListener&&o.addEventListener(Z,Ie,!1);var te=setInterval(function(){Ie()},$)}function bt(wt){var ee=u(),he=ee.body,Ie=ee.createElement(_);Ie.language=ab,Ie.crossOrigin=W,Ie.src=wt,webModule.__errFn&&(Ie.onerror=function(){webModule.__errFn(L,new Error(bb+wt))}),he.appendChild(Ie)}Mn(function(){bt(dn)})}webModule.__startLoadingFragment=function(dn){return C(dn)},webModule.__installRunAsyncCode=function(dn){var Mn=u(),bt=Mn.body,wt=Mn.createElement(_);wt.language=ab,wt.text=dn,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(dn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(dn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(dn){var Mn=c[dn];return Mn==null?null:Mn},r=d,webModule.__errFn=e}function B(){function dn(te){var Pe=te.lastIndexOf(rb);Pe==-1&&(Pe=te.length);var Nt=te.indexOf(sb);Nt==-1&&(Nt=te.length);var Le=te.lastIndexOf(tb,Math.min(Nt,Pe));return Le>=O?te.substring(O,Le+P):W}function Mn(te){if(!te.match(/^\w+:\/\//)){var Pe=o.createElement(ub);Pe.src=te+vb,te=dn(Pe.src)}return te}function bt(){var te=__gwt_getMetaProperty(wb);return te!=null?te:W}function wt(){for(var te=o.getElementsByTagName(_),Pe=O;Pe<te.length;++Pe)if(te[Pe].src.indexOf(xb)!=-1)return dn(te[Pe].src);return W}function ee(){var te=o.getElementsByTagName(yb);return te.length>O?te[te.length-P].href:W}function he(){var te=o.location;return te.href==te.protocol+zb+te.host+te.pathname+te.search+te.hash}var Ie=bt();return Ie==W&&(Ie=wt()),Ie==W&&(Ie=ee()),Ie==W&&he()&&(Ie=dn(o.location.href)),Ie=Mn(Ie),Ie}function C(dn){return dn.match(/^\//)||dn.match(/^[a-zA-Z]+:\/\//)?dn:webModule.__moduleBase+dn}function D(){var dn=[],Mn=O,bt=[],wt=[];function ee(te){var Pe=wt[te](),Nt=bt[te];if(Pe in Nt)return Pe;var Le=[];for(var ve in Nt)Le[Nt[ve]]=ve;throw r&&r(te,Le,Pe),null}if(__gwt_isKnownPropertyValue=function(te,Pe){return Pe in bt[te]},webModule.__getPropMap=function(){var te={};for(var Pe in bt)bt.hasOwnProperty(Pe)&&(te[Pe]=ee(Pe));return te},webModule.__computePropValue=ee,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var he;try{he=Cb;var Ie=he.indexOf(Db);Ie!=-1&&(Mn=parseInt(he.substring(Ie+P),$),he=he.substring(O,Ie))}catch(te){}return webModule.__softPermutationId=Mn,C(he+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(dn,Mn,bt){"use strict";bt.d(Mn,{Ax:function(){return Ie},Ds:function(){return te},KI:function(){return Nt},SI:function(){return he},f1:function(){return ee}});var wt=bt(3294);function ee(Le){let ve=!0;if(Le.length>0){for(let Xt=0;Xt<Le.length;Xt++)if(Le[Xt].compile_success==0||!Le[Xt].compile_success){ve=!1;break}}else ve=!1;return ve}function he(Le,ve=""){let Xt=[];for(let fe=0;fe<Le.length;fe++){let xe=Le[fe],je=ve?`${ve}/${xe.name}`:`${xe.name}`;Xt.push({title:xe.name,type:xe.type,isLeaf:xe.type!=="tree",key:je})}return Xt}function Ie(Le,ve,Xt){for(let fe=0;fe<Le.length;fe++){let xe=Le[fe];if(xe.key===ve){xe.children=Xt;break}xe.children&&Ie(xe.children,ve,Xt)}return Le}function te(Le,ve,Xt){let fe;return function(){let xe=this,je=arguments,Bt=function(){fe=null,Xt||Le.apply(xe,je)},et=Xt&&!fe;clearTimeout(fe),fe=setTimeout(Bt,ve),et&&Le.apply(xe,je)}}const Pe=!0,Nt=wt.Z.API_SERVER},6021:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Bt}});var wt=bt(3113),ee=bt(59301),he=Object.defineProperty,Ie=Object.defineProperties,te=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,ve=(et,nt,ht)=>nt in et?he(et,nt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):et[nt]=ht,Xt=(et,nt)=>{for(var ht in nt||(nt={}))Nt.call(nt,ht)&&ve(et,ht,nt[ht]);if(Pe)for(var ht of Pe(nt))Le.call(nt,ht)&&ve(et,ht,nt[ht]);return et},fe=(et,nt)=>Ie(et,te(nt)),xe=(et,nt)=>{var ht={};for(var lt in et)Nt.call(et,lt)&&nt.indexOf(lt)<0&&(ht[lt]=et[lt]);if(et!=null&&Pe)for(var lt of Pe(et))nt.indexOf(lt)<0&&Le.call(et,lt)&&(ht[lt]=et[lt]);return ht},je=(et,nt,ht)=>new Promise((lt,gt)=>{var yt=It=>{try{Tt(ht.next(It))}catch(zt){gt(zt)}},Pt=It=>{try{Tt(ht.throw(It))}catch(zt){gt(zt)}},Tt=It=>It.done?lt(It.value):Promise.resolve(It.value).then(yt,Pt);Tt((ht=ht.apply(et,nt)).next())});const Bt=et=>{var nt=et,{children:ht}=nt,lt=xe(nt,["children"]);const[gt,yt]=(0,ee.useState)(!1);return ee.createElement(wt.ZP,fe(Xt({},lt),{loading:gt,onClick:Pt=>je(void 0,null,function*(){try{yt(!0),yield lt.onClick(Pt),yt(!1)}catch(Tt){console.error(Tt),yt(!1)}})}),ht)}},24544:function(dn,Mn,bt){"use strict";var wt=bt(86204),ee=bt.n(wt),he=Object.defineProperty,Ie=(Le,ve,Xt)=>ve in Le?he(Le,ve,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):Le[ve]=Xt,te=(Le,ve,Xt)=>Ie(Le,typeof ve!="symbol"?ve+"":ve,Xt),Pe=(Le,ve,Xt)=>new Promise((fe,xe)=>{var je=nt=>{try{et(Xt.next(nt))}catch(ht){xe(ht)}},Bt=nt=>{try{et(Xt.throw(nt))}catch(ht){xe(ht)}},et=nt=>nt.done?fe(nt.value):Promise.resolve(nt.value).then(je,Bt);et((Xt=Xt.apply(Le,ve)).next())});class Nt extends wt.EventEmitter{constructor(ve,Xt){super(),te(this,"url"),te(this,"body"),te(this,"fullContent",""),te(this,"controller",null),te(this,"buffer",""),this.url=ve,this.body=Xt}startStream(){return Pe(this,null,function*(){this.controller=new AbortController;const{signal:ve}=this.controller;try{const Xt=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:ve});if(!Xt.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${Xt.status}`);const fe=Xt.headers.get("content-type");if(!fe)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(fe.includes("application/json")){const Bt=yield Xt.json();this.emit("error",Bt);return}if(!fe.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const xe=Xt.body.getReader(),je=new TextDecoder("utf-8");for(;;){const{done:Bt,value:et}=yield xe.read();if(Bt)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 yt=JSON.parse(gt);yt.data&&this.handleData(yt.data)}catch(yt){this.buffer=lt+`
|
|
|
`+this.buffer,console.error("\u89E3\u6790 JSON \u5931\u8D25:",yt)}}}this.emit("done",this.fullContent)}catch(Xt){Xt.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",Xt.message)}})}handleData(ve){ve.content&&(this.fullContent+=ve.content,this.emit("data",{chunk:ve,full:this.fullContent}))}cancelRequest(){var ve;(ve=this.controller)==null||ve.abort()}}Mn.Z=Nt},83251:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return je}});var wt=bt(59301),ee=bt(43428),he=bt(95237),Ie=bt(43604),te={smartWrp:"smartWrp___NjRcB"},Pe=bt(23954),Nt=bt(85057),Le=bt(6021),ve=bt(59301),Xt=(Bt,et,nt)=>new Promise((ht,lt)=>{var gt=Tt=>{try{Pt(nt.next(Tt))}catch(It){lt(It)}},yt=Tt=>{try{Pt(nt.throw(Tt))}catch(It){lt(It)}},Pt=Tt=>Tt.done?ht(Tt.value):Promise.resolve(Tt.value).then(gt,yt);Pt((nt=nt.apply(Bt,et)).next())});const fe=`<!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 xe({open:Bt=!0,onChange:et,defaultValue:nt,placement:ht,width:lt,height:gt,extra:yt,onDynamic:Pt,showExtra:Tt=!0}){const It=(0,wt.useRef)(null),zt=(0,wt.useRef)(null),[_t,se]=(0,wt.useState)(nt||""),[Jt,le]=(0,wt.useState)(nt||""),[Zt,Fe]=(0,wt.useState)(!!Bt),[me,Ve]=(0,wt.useState)(1),Qe={selectOnLineNumbers:!0};(0,wt.useEffect)(()=>{Bt&&(se(nt),le(nt),Fe(!0))},[Bt,nt]),(0,wt.useEffect)(()=>{_t!==""&&(clearTimeout(zt.current),zt.current=setTimeout(()=>{const vn=document.createElement("iframe");if(vn.style.width="100%",vn.style.height="100%",vn.style.border="0",It.current){It.current.innerHTML="",It.current.appendChild(vn);const xn=vn.contentDocument||vn.contentWindow.document;xn.open(),xn.write(_t),xn.close()}},1e3))},[Bt,_t]);const qe=vn=>{se(vn),et==null||et(vn,Jt)};return ve.createElement(ee.Z,{title:"\u667A\u80FD\u52A8\u6548",placement:"right",open:Zt,width:Tt?700:"100%",height:gt||"100vh",rootClassName:te.smartWrp,destroyOnClose:!0,onClose:()=>Fe(!1),extra:Tt&&ve.createElement("div",null,ve.createElement(Nt.tp,{dataSource:[{name:"\u9884\u89C8",id:1},{name:"\u4EE3\u7801",id:2}],value:me,onChange:vn=>Ve(vn)}),ve.createElement(Le.Z,{type:"primary",className:"ml20",onClick:()=>Xt(this,null,function*(){yield Pt(_t,()=>{Fe(!1)})})},"\u4FDD\u5B58\u81F3\u8BFE\u4EF6"))},ve.createElement(he.Z,{className:"h100"},ve.createElement(Ie.Z,{flex:"1",style:{background:"#f6f7fb",borderRight:"#e8eaf1 1px solid",display:me===1?"block":"none"}},ve.createElement("div",{className:"h100",ref:It})),ve.createElement(Ie.Z,{flex:"1",style:{display:me===2?"block":"none"}},ve.createElement(Pe.ZP,{height:"90vh",value:nt,language:"html",theme:"vs",showMiniMap:!1,options:Qe,onChange:qe}))))}var je=xe},43276:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return se}});var wt=bt(59301),ee=bt(96536),he=bt(77596),Ie=bt(93772),te=bt(14179),Pe=bt(56102),Nt={answer:"answer___UngkO",imgWrap:"imgWrap___ORTRf",codeCopy:"codeCopy___re8vm",runCode:"runCode___MYs9m"},Le=bt(8591),ve=bt(11611),Xt=bt(35328),fe=bt(30084),xe=bt(10787),je=bt(50304),Bt=bt(83251),et=Object.defineProperty,nt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Pt=(Jt,le,Zt)=>le in Jt?et(Jt,le,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Jt[le]=Zt,Tt=(Jt,le)=>{for(var Zt in le||(le={}))gt.call(le,Zt)&&Pt(Jt,Zt,le[Zt]);if(lt)for(var Zt of lt(le))yt.call(le,Zt)&&Pt(Jt,Zt,le[Zt]);return Jt},It=(Jt,le)=>nt(Jt,ht(le)),zt=(Jt,le)=>{var Zt={};for(var Fe in Jt)gt.call(Jt,Fe)&&le.indexOf(Fe)<0&&(Zt[Fe]=Jt[Fe]);if(Jt!=null&<)for(var Fe of lt(Jt))le.indexOf(Fe)<0&&yt.call(Jt,Fe)&&(Zt[Fe]=Jt[Fe]);return Zt},se=({onFinish:Jt,value:le,streamingStatus:Zt,cancelIndex:Fe,loadImage:me,onDynamic:Ve})=>{const[Qe,qe]=(0,wt.useState)(""),[vn,xn]=(0,wt.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[Se,Vt]=(0,wt.useState)(0),[Xe,Xn]=(0,wt.useState)(!1),Bn=bn=>bn.replace(/`(\$\$.*?\$\$)`/g,"$1").replace(/\$\$([\s\S]*?)\$\$/g,(Jn,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,"`$&`"),Ae=()=>{Xn(!0),Jt==null||Jt()};(0,wt.useEffect)(()=>{const bn=me?`\u8FD9\u662F\u6839\u636E\u60A8\u7684\u63CF\u8FF0\u751F\u6210\u7684\u56FE\u7247\uFF1A
|
|
|
|
|
|
${le}`:le,Jn=Bn(bn);if(!Xe)if(me||!Zt||Fe>0){qe(Jn),Vt(Jn.length),(!Zt||Fe>0)&&!me&&Ae();return}else if((Jn==null?void 0:Jn.length)<4)qe(Jn),Vt(Jn.length);else if(Se<Jn.length){const mn=Jn.length-Se,ui=setInterval(()=>{qe(Jn.slice(0,Se+2)),Vt(Ce=>Ce+2)},mn>10?Math.max(500/(mn/2),20):50);return()=>clearInterval(ui)}else Zt||Ae()},[le,Zt,Fe,me,Se]);const hn=(0,wt.useMemo)(()=>wt.createElement("section",{className:`${Nt.answer} fadeIn animated edu_md`},wt.createElement(ee.UG,{remarkPlugins:[fe.Z,xe.Z],rehypePlugins:[Xt.Z,Ie.Z],components:{code(bn){var Jn=bn,{node:mn,inline:ui,className:Ce,children:ni}=Jn,Pi=zt(Jn,["node","inline","className","children"]);const gn=/language-(\w+)/.exec(Ce||""),Tn=String(ni).trim();return ui||!gn?wt.createElement("code",Tt({className:Ce},Pi),ni):wt.createElement("code",{className:Nt.codeCopy,"data-text":`\`\`\`${gn?gn[1]:""}
|
|
|
${ni}
|
|
|
\`\`\``},wt.createElement(Pe.CopyToClipboard,{text:Tn,onCopy:()=>Le.ZP.success({content:"\u590D\u5236\u6210\u529F",key:"copy"})},wt.createElement("button",null,"\u590D\u5236")),gn[1]==="html"&&Xe&&wt.createElement("button",{className:Nt.runCode,onClick:()=>{xn(Tt({},It(Tt({},vn),{open:++vn.open,defaultValue:Tn,language:gn[1]})))}},"\u8FD0\u884CHTML"),wt.createElement(he.Z,Tt({wrapLongLines:!0,style:te.Z,language:gn[1],PreTag:"div",showLineNumbers:!0,lineNumberStyle:{minWidth:"40px"}},Pi),Tn))},img({node:bn}){var Jn;const mn=(Jn=bn.properties)==null?void 0:Jn.src;return wt.createElement(ve.Z,{src:mn,width:320,"data-text":mn,onLoad:()=>me&&setTimeout(()=>Ae(),500)})}}},Xe?Qe:`${Qe}__`)),[Qe]);return wt.createElement(wt.Fragment,null,wt.createElement(Bt.Z,{defaultValue:vn.defaultValue,open:vn.open,language:vn.language,height:vn.height,onChange:(bn,Jn)=>{qe(Qe.replaceAll(Jn,bn))},onDynamic:Ve}),hn)}},19909:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return ae}});var wt=bt(59301),ee=bt(43428),he=bt(8591),Ie=bt(54580),te=bt(43418),Pe=bt(6848),Nt=bt(92832),Le=bt(3113),ve=bt(71418),Xt=bt(64165),fe=bt(14478),xe=bt(38854),je=bt(92310),Bt=bt.n(je),et=bt(43276),nt={reasoning:"reasoning___S0mKl",btn:"btn____CIJG",content:"content___CIAh9"},ht=bt(59301),lt=(De,Oe,Be)=>new Promise((yn,Gn)=>{var Kn=Ti=>{try{gi(Be.next(Ti))}catch(Xi){Gn(Xi)}},Vn=Ti=>{try{gi(Be.throw(Ti))}catch(Xi){Gn(Xi)}},gi=Ti=>Ti.done?yn(Ti.value):Promise.resolve(Ti.value).then(Kn,Vn);gi((Be=Be.apply(De,Oe)).next())}),yt=({value:De="",streamingStatus:Oe,onFinish:Be,cancelIndex:yn,time:Gn,loading:Kn,loadAll:Vn})=>{const[gi,Ti]=(0,wt.useState)(""),[Xi,Mo]=(0,wt.useState)(!0),Io=(0,wt.useRef)(De),Oo=(0,wt.useRef)(Oe),co=(0,wt.useRef)(0),Do=(0,wt.useRef)(null),[Qo,Ai]=(0,wt.useState)(!1),$o=70;(0,wt.useEffect)(()=>{Oo.current=Oe},[Oe]),(0,wt.useEffect)(()=>{Io.current=De},[De]),(0,wt.useEffect)(()=>{if(!Oe){Ti(Io.current);return}return Ai(!0),Do.current=setInterval(jo,$o),()=>{clearInterval(Do.current)}},[]),(0,wt.useEffect)(()=>{Qo&&(Ti(Io.current),clearInterval(Do.current),Ai(!1),Be())},[yn]);const jo=()=>lt(void 0,null,function*(){const Mt=Io.current[co.current];Mt!==void 0?(Ti(cr=>cr+Mt),co.current++,clearInterval(Do.current),Do.current=setInterval(jo,280/(Io.current.length-co.current))):Oo.current===!1&&(Ti(Io.current),clearInterval(Do.current),Ai(!1),Be())});return ht.createElement("div",{className:`${nt.reasoning} fadeIn animated`},ht.createElement("div",{className:nt.btn,onClick:()=>Mo(!Xi)},ht.createElement("i",{className:"iconfont icon-shendusikao"}),Gn?ht.createElement("span",null,"\u5DF2\u6DF1\u5EA6\u601D\u8003\uFF08\u7528\u65F6 ",Gn," \u79D2\uFF09"):ht.createElement("span",null,"\u601D\u8003\u4E2D..."),Xi?ht.createElement("b",{className:"iconfont icon-shouqi6"}):ht.createElement("b",{className:"iconfont icon-zhankai6"})),Kn&&ht.createElement(ve.Z,{spinning:!0,className:"mt20"}),Xi&&!Kn&&ht.createElement("div",{className:nt.content},gi,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"},Tt=bt(81327),It=Object.defineProperty,zt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,Jt=(De,Oe,Be)=>Oe in De?It(De,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Be}):De[Oe]=Be,le=(De,Oe)=>{for(var Be in Oe||(Oe={}))_t.call(Oe,Be)&&Jt(De,Be,Oe[Be]);if(zt)for(var Be of zt(Oe))se.call(Oe,Be)&&Jt(De,Be,Oe[Be]);return De};const Zt=De=>React.createElement("svg",le({className:"logo1_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:200,height:200},De),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 Fe="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTEwMTkuNDA3IDYyMC44IDg5MS44MzQgMzk3Ljc4MSA5NDYuNDkgMjkzLjEyYTI5LjA5OSAyOS4wOTkgMCAwIDAgNi40LTM2LjM5NWwtNzAuMTg3LTEyNi41OTJhMzAuMDggMzAuMDggMCAwIDAtMjQuNTc2LTEzLjY1M0g1OTcuNTE5TDUzOS4xOTQgMTQuNTA3YTI3LjM1IDI3LjM1IDAgMCAwLTIwLjkwNy0xNC41NUgzODAuNjQ0YTI5LjE0MSAyOS4xNDEgMCAwIDAtMjQuNjE4IDE0LjU1djUuNTQ2TDIyNS44MDYgMjQzLjAzSDEwMC45MjNhMjkuMTg0IDI5LjE4NCAwIDAgMC0yNS41MTUgMTMuNjU0TDMuNDI4IDM4NC4wODVhMzIuNzY4IDMyLjc2OCAwIDAgMCAwIDI5LjE4NEwxMzIuODM2IDYzOC4wOCA3NC41MTEgNzQwLjA1M2EzMi43NjggMzIuNzY4IDAgMCAwIDAgMjkuMDU2bDY2LjUxNyAxMTYuNTY2YTI5LjkwNyAyOS45MDcgMCAwIDAgMjUuNTE1IDE0LjUwNkg0MjcuMTVsNjIuODQ4IDEwOS4yMjdBMzAuMDggMzAuMDggMCAwIDAgNTEyLjc4MyAxMDI0SDY2MC40MWEyOS4xNDEgMjkuMTQxIDAgMCAwIDI0LjU3Ni0xNC41NWwxMjguNDY5LTIyNC44NTNoMTE0Ljc3M2EzMS45MTUgMzEuOTE1IDAgMCAwIDI0LjY2Mi0xNS40NDVsNjYuNDc0LTExNy40MTlhMjguMTYgMjguMTYgMCAwIDAgMC0zMC45NzZsLjA0My4wNDN6bS0xNjEuMjggMTQuNTkyTDc5MS42MSA1MTIuNDY5IDUxOC4yODcgOTkzLjk2M2wtNzQuNzUyLTEyMi44OGgtMjczLjI4bDY1LjYyMS0xMTkuMjExaDEzOS4zOTJMMTAxLjg2IDI3Mi4yMTNoMTQzLjA2MkwzODAuNjg3IDMwLjA4bDY4LjM1MiAxMTkuMjUzLTcwLjE4NyAxMjIuODhIOTI1LjU0bC02OS4yMDUgMTIxLjk0MiAxMzcuNiAyNDEuMTk0SDg1OC4xN3oiIGZpbGw9IiM2MDVCRUMiLz48cGF0aCBkPSJtNDk5Ljk4MyA2OTkuMzA3IDE3NC4zNzktMjc0LjczMUgzMjQuNzA4eiIgZmlsbD0iIzYwNUJFQyIvPjwvc3ZnPg==",me=Object.defineProperty,Ve=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,vn=(De,Oe,Be)=>Oe in De?me(De,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Be}):De[Oe]=Be,xn=(De,Oe)=>{for(var Be in Oe||(Oe={}))Qe.call(Oe,Be)&&vn(De,Be,Oe[Be]);if(Ve)for(var Be of Ve(Oe))qe.call(Oe,Be)&&vn(De,Be,Oe[Be]);return De};const Se=De=>React.createElement("svg",xn({className:"logo2_svg__icon",viewBox:"0 0 1417 1024",xmlns:"http://www.w3.org/2000/svg",width:276.758,height:200},De),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 Vt="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDE0MTcgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjc2Ljc1OCIgaGVpZ2h0PSIyMDAiPjxwYXRoIGQ9Ik0xMzY0LjQ0IDExOC43MDVjLTE0LjE3OC02LjY5NS0yMC4zMjIgNi4wNjUtMjguNTkzIDEyLjUyNS0yLjkxNCAyLjA0OC01LjI3NyA0LjcyNi03LjY0IDcuMjQ2LTIwLjcxNyAyMS4yNjgtNDQuODk5IDM1LjIxLTc2LjY0MyAzMy41NTZhMTUyLjU3NiAxNTIuNTc2IDAgMCAwLTEyMC42NzQgNDUuMzcxYy03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NDQtMi45MTQtMTEuMTA2LTEwLjI0LTYuMzAxLTE5LjE0YTYwLjE4IDYwLjE4IDAgMCAxIDEwLjcxMi0xMS4yNjVjMTkuODUtMTAuNzkgNDIuNjkzLTcuMjQ2IDYzLjg4Mi43ODggMTkuNjkzIDcuNzk4IDM0LjUwMSAyMS44OTggNTUuOTI2IDQxLjkwNSAyMS43NCAyNC4xODMgMjUuNjggMzAuOCAzOC4xMjUgNDguOTE2IDkuODQ2IDE0LjE3OSAxOC43NDcgMjguNzUgMjQuODkgNDUuNDUgMy43MDMgMTAuMzk3LTEuMTAyIDE4LjkwNS0xMy45NDEgMjQuMTAzeiIgZmlsbD0iIzRENkJGRSIvPjwvc3ZnPg==",Xe=bt(59301),Bn=({value:De,onChange:Oe})=>{const[Be,yn]=(0,wt.useState)(!1),Gn=[{name:"\u901A\u4E49\u5343\u95EE",key:"qwen-max",img:Fe},{name:"DeepSeek R1-671B",key:"deepseek-r1",img:Vt}],Kn=Gn.find(Vn=>Vn.key===De);return Xe.createElement("div",{className:Pt.select},Xe.createElement(Tt.Z,{size:10},Xe.createElement("span",{className:"c-grey-333 font16"},"\u6A21\u578B"),Xe.createElement("div",{className:Pt.box,onMouseLeave:()=>yn(!1)},Xe.createElement("div",{className:Pt.text,onClick:()=>yn(!0)},Xe.createElement("img",{src:Kn.img,width:20}),Xe.createElement("span",null,Kn.name),Xe.createElement("b",{className:"iconfont icon-zhankai6"})),Be&&Xe.createElement("div",{className:Pt.itemWrap},Xe.createElement("aside",null,Gn.map(Vn=>Xe.createElement("div",{key:Vn.key,className:`${Pt.item} ${Vn.key===De?Pt.active:""}`,onClick:gi=>{gi.stopPropagation(),Oe(Vn.key),yn(!1)}},Xe.createElement("img",{src:Vn.img,width:20}),Xe.createElement("span",null,Vn.name))))))))},Ae={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"},hn=bt(99064),bn=bt(955),Jn={draggableImage:"draggableImage___vcTso",img:"img___xAyno",close:"close___WUtfj"},ui=({src:De,onClick:Oe,topPercentage:Be=.62,draggableExtraNode:yn})=>{const Gn=(0,wt.useRef)(null),Kn=(0,wt.useRef)(!1),Vn=(0,wt.useRef)(!1),[gi,Ti]=(0,wt.useState)(window.innerHeight*Be),[Xi,Mo]=(0,wt.useState)(!1),Io=10;return(0,wt.useEffect)(()=>{if(Gn.current){let Oo=function($o){var jo;Kn.current=!0,Ai=$o.pageY,Qo=$o.pageY-(((jo=Gn.current)==null?void 0:jo.getBoundingClientRect().top)||0),(0,bn.kk)("none"),document.onselectstart=function(){return!1}},co=function(){Kn.current&&!Vn.current&&Oe&&Oe(),Kn.current=!1,Vn.current=!1,(0,bn.kk)("auto"),document.onselectstart=null},Do=function($o){var jo;if(Kn.current){const cr=$o.pageY-Qo,ir=window.innerHeight-(((jo=Gn.current)==null?void 0:jo.offsetHeight)||0)-50,pr=50;if(!Vn.current&&Math.abs(Ai-$o.pageY)>Io&&(Vn.current=!0),Vn.current){let ts=Math.max(pr,Math.min(cr,ir));Ti(ts)}}},Qo=0,Ai=0;return Gn.current.addEventListener("mousedown",Oo),document.addEventListener("mousemove",Do),document.addEventListener("mouseup",co),()=>{var $o,jo;(jo=($o=Gn==null?void 0:Gn.current)==null?void 0:$o.removeEventListener)==null||jo.call($o,"mousedown",Oo),document.removeEventListener("mousemove",Do),document.removeEventListener("mouseup",co)}}},[Oe]),(0,wt.useEffect)(()=>{const Oo=()=>{Ti(window.innerHeight*Be)};return window.addEventListener("resize",Oo),()=>{window.removeEventListener("resize",Oo)}},[Be]),wt.createElement("div",{className:Jn.draggableImage,style:{top:`${gi}px`,display:Xi?"none":"block",cursor:Kn.current?"grabbing":"grab"},ref:Gn},yn,wt.createElement("img",{className:Jn.img,src:De,width:60,draggable:"false"}),wt.createElement("i",{className:`iconfont icon-tupianguanbi ${Jn.close}`,onMouseUp:Oo=>{Oo.stopPropagation(),Mo(!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+Veyd8dG99x8CyLIOESuC4qlPcJ6BH48l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khFWT3bZM7y1azt3ki/gjJC0RysYIa059LeGaeqJJ94Ii6H9Kv8NNcovk+uKXvqF8un/N/+CcBu5N24Yb8H9pfF6XOW1M+bUtNYP6yoIGRccPphjBrZT7dBcosjtC2PsnRBnNUNDdiik5I+BeREQnpsMZm2VQt7vcR+PRoJPC1mtc2/mZv///ojj90punz2WfN/nntvQHFezmRXpPcdP3bIqIL8whGWF6xc+04oL7kqQ2Pfpu5omAZThNY6GWuV4waWOp6xcGg0UDPtuWn/lj/j+X+Lbso4jJUfOwAAAABJRU5ErkJggg==",gn=bt(3294),Tn=bt(56102),pn=bt(24544),Un=bt(58617),On=bt(32050),we=Object.defineProperty,In=Object.defineProperties,rn=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,St=(De,Oe,Be)=>Oe in De?we(De,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Be}):De[Oe]=Be,mt=(De,Oe)=>{for(var Be in Oe||(Oe={}))oe.call(Oe,Be)&&St(De,Be,Oe[Be]);if(ge)for(var Be of ge(Oe))Ft.call(Oe,Be)&&St(De,Be,Oe[Be]);return De},At=(De,Oe)=>In(De,rn(Oe)),Rt=(De,Oe,Be)=>new Promise((yn,Gn)=>{var Kn=Ti=>{try{gi(Be.next(Ti))}catch(Xi){Gn(Xi)}},Vn=Ti=>{try{gi(Be.throw(Ti))}catch(Xi){Gn(Xi)}},gi=Ti=>Ti.done?yn(Ti.value):Promise.resolve(Ti.value).then(Kn,Vn);gi((Be=Be.apply(De,Oe)).next())}),ae=({title:De="\u5934\u6B4CAI",placeholder:Oe,hideUpload:Be,hideInputBox:yn,aiIcon:Gn=Ce,userIcon:Kn=ni,dragIcon:Vn=Pi,children:gi,fetchUrl:Ti,fetchData:Xi={},extraAnswerAction:Mo,showDefaultTips:Io=!0,onOpen:Oo,onClose:co,loadingOption:Do,showPreference:Qo=!1,initMessage:Ai,customRequest:$o,visible:jo,width:Mt=1200,isCheckRestrictNumber:cr=!1,headNode:ir,headFunctionNode:pr,showRedraw:ts,showEdit:rs,promptPropName:ls="prompt",topPercentage:Ci,showSwitchingModel:si=!1,showImageGenerator:Te=!1,showLookHistory:Ee=!1,fetchListObject:Wt,customPreference:Ge,customDataNode:Ue,showAddSession:ue,historyId:qt,draggableExtraNode:ze,drawerExtraNode:sn,menuExtraFunctionNode:Ln,showSceneAwareness:Nn=!1,ReactComponent:ie=ee.Z,topFunctionNode:Je,footerContainerStyle:Cn,chatContainerStyle:$n={},showCodePreview:We=!1,showSource:Ye=!0,onSendMessage:zn,onDynamic:Zn=()=>{}})=>{var fi,Hn;const[ti,Qn]=(0,wt.useState)(!1),[wi,Qi]=(0,wt.useState)("qwen-max"),[qi,_e]=(0,wt.useState)([]),[lo,Eo]=(0,wt.useState)([]),[zo,Ze]=(0,wt.useState)(!1),[jn,ei]=(0,wt.useState)(!1),[Mi,vi]=(0,wt.useState)(!1),[mi,Ui]=(0,wt.useState)([]),[ki,Hi]=(0,wt.useState)(""),[uo,un]=(0,wt.useState)(0),[Jo,nn]=(0,wt.useState)(void 0),[ho,Er]=(0,wt.useState)(!1),[Ho,Fr]=(0,wt.useState)(null),[mr,Oi]=(0,wt.useState)(""),Li=(0,wt.useRef)(),So=(0,wt.useRef)(null),ko=(0,wt.useRef)(null),[_n,jt]=(0,wt.useState)(!1),[_o,xr]=(0,wt.useState)(!1),[es,cs]=(0,wt.useState)(!1),[us,no]=(0,wt.useState)(!1),[$i,Zo]=(0,wt.useState)(!1),[ro,lr]=(0,wt.useState)(0),ms=(0,wt.useRef)(null),Ji=(0,wt.useRef)(!1),Bi=(0,wt.useRef)(null),[En,Ki]=(0,wt.useState)(void 0),[qo,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,Ke]=(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:Nu,onGetList:Hr,onListClick:As,onListDelete:kl,onListDealData:so}=Wt||{},hr=50,Uo=10,hi={maxCount:hr,showUploadList:!1,withCredentials:!0,openFileDialogOnClick:!1,fileList:qi,multiple:!0,accept:".doc,.docx,.md,.txt,.pdf,.xlsx,.xls",beforeUpload:$e=>Rt(void 0,null,function*(){var Si,vo,xo,Go;const ao=(Go=(xo=(vo=(Si=$e==null?void 0:$e.name)==null?void 0:Si.split("."))==null?void 0:vo.slice(-1))==null?void 0:xo[0])==null?void 0:Go.toLowerCase(),wr=["doc","docx","md","pdf","txt","xlsx","xls"].includes(ao);return $e.size==0?(he.ZP.warning("\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Ie.default.LIST_IGNORE):wr?$e.size/1024/1024>100?(he.ZP.warning("\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u9650\u5236100MB\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Ie.default.LIST_IGNORE):!0:(he.ZP.warning("\u76EE\u524D\u652F\u6301txt\u3001md\u3001doc\u3001docx\u3001pdf\u3001xlsx\u3001xls\u6587\u4EF6"),Ie.default.LIST_IGNORE)}),onChange:({fileList:$e})=>{_e($e)},action:`${(fi=gn.Z)==null?void 0:fi.API_SERVER}/api/intelligent_imports/upload_file.json`},Ns={maxCount:Uo,showUploadList:!1,withCredentials:!0,openFileDialogOnClick:!1,fileList:lo,multiple:!0,accept:".jpg,.png,",beforeUpload:$e=>{var Si,vo,xo,Go;const ao=(Go=(xo=(vo=(Si=$e==null?void 0:$e.name)==null?void 0:Si.split("."))==null?void 0:vo.slice(-1))==null?void 0:xo[0])==null?void 0:Go.toLowerCase(),wr=["jpg","png"].includes(ao);return $e.size==0?(he.ZP.warning("\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Ie.default.LIST_IGNORE):wr?$e.size/1024/1024>10?(he.ZP.warning("\u4E0A\u4F20\u7684\u56FE\u7247\u5927\u5C0F\u9650\u523610MB\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Ie.default.LIST_IGNORE):!0:(he.ZP.warning("\u76EE\u524D\u652F\u6301jpg\u3001png"),Ie.default.LIST_IGNORE)},onChange:({fileList:$e})=>{Eo($e)},action:`${(Hn=gn.Z)==null?void 0:Hn.API_SERVER}/api/ai/generals/update_file.json`};(0,wt.useEffect)(()=>{if(!mi.length||!Li.current)return;const $e=mi[mi.length-1];$e!=null&&$e.loading&&(Li.current.scrollTop=Li.current.scrollHeight)},[mi.length]),(0,wt.useEffect)(()=>{if(!Li.current||!ms.current)return;const $e=new IntersectionObserver(([Si])=>{jr(Si.isIntersecting)},{root:Li.current,rootMargin:"70px",threshold:0});return $e.observe(ms.current),()=>{ms.current&&$e.unobserve(ms.current)}},[Li.current,ms.current]),(0,wt.useEffect)(()=>{if(!_n)return;const $e=Li.current,Si=Bi.current;Ji.current=!1;let vo=$e.scrollTop;const xo=()=>{const{scrollTop:ao,scrollHeight:dr,clientHeight:wr}=$e;ao>vo?ao+wr>=dr-50&&($e.scrollTop=$e.scrollHeight,Ji.current=!1):ao<vo&&(Ji.current=!0),vo=ao};$e.addEventListener("scroll",xo);const Go=new ResizeObserver(()=>{Ji.current||($e.scrollTop=$e.scrollHeight)});return Go.observe(Si),()=>{var ao;Go.unobserve(Si),(ao=$e==null?void 0:$e.removeEventListener)==null||ao.call($e,"scroll",xo)}},[_n]),(0,wt.useEffect)(()=>{!_n&&vs.current.length&&(Ui([...mi,...vs.current]),vs.current=[])},[_n]),(0,wt.useEffect)(()=>{if(!Li.current)return;const $e=new ResizeObserver(()=>{var Si;Li.current&&Ur((Si=Li.current)==null?void 0:Si.offsetWidth)});return $e.observe(Li.current),()=>{Li.current&&$e.unobserve(Li.current)}},[Li.current]),(0,wt.useEffect)(()=>{typeof jo=="boolean"&&Qn(jo)},[jo]),(0,wt.useEffect)(()=>{var $e;if(So.current&&Ho!==null){So.current.focus();const Si=($e=So.current.resizableTextArea)==null?void 0:$e.textArea;Si&&(Si.selectionStart=Si.selectionEnd=Si.value.length)}},[Ho]),(0,wt.useEffect)(()=>{pl<5&&Er(!1)},[pl]),(0,wt.useEffect)(()=>{ti&&Ai&&(Ui(is(Ai)),Ze(!0),Pa(Ai,{history:[]})),ti&&(Vr(),qt?Bu(qt):ue&&!En&&pa()),ti||Js()},[ti]);const is=($e="",Si=[],vo=[])=>{const xo=Date.now();return[{text:$e,key:xo,sender:"user",fileList:Si,imageList:vo,show:!0},{loading:!0,key:xo,sender:"AI",show:!0,model:wi,imageGenerator:us,thinkingEnabled:_o,codePreview:es}]},Js=()=>{Oi(""),Fr(null),_e([]),Eo([]),Hi("")},ol=()=>{if(Oo){Oo({chatData:mi,setChatData:Ui,setLoading:Ze,getData:Pa,renderChatItems:is,handleAdd:pa,identifier:En});return}Qn(!0)},ml=()=>{if(Ys(!0),co){co();return}Qn(!1)},ii=()=>{Er(!ho)},Vr=()=>Rt(void 0,null,function*(){if(!cr)return;const $e=yield(0,hn.ZP)("/api/intelligent_imports/check_number.json",{method:"get"});($e==null?void 0:$e.status)===0&&($e==null?void 0:$e.total_number)!==-1&&(un(($e==null?void 0:$e.total_number)-($e==null?void 0:$e.remaining_number)),nn($e==null?void 0:$e.total_number))}),Is=()=>{te.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",Jo,"\u6B21\uFF0C\u8BF7\u660E\u5929\u518D\u8BD5\u3002"))})},ba=$e=>$e.reduce((vo,xo)=>{if(xo.sender==="user"){const Go=$e.find(ao=>ao.key===xo.key&&ao.sender==="AI");Go&&(Go!=null&&Go.text)&&!(Go!=null&&Go.error)&&vo.push({question:xo.text,answer:Go.text})}return vo},[]),Pa=(...$e)=>Rt(void 0,[...$e],function*(Si="",vo={},xo=mi){if($o&&(yield $o({mes:Si,setChatData:Ui,fileList:qi,body:vo,checkNum:Vr,setLoading:Ze,bodyChatData:xo,setTyping:jt,setImageGenerator:no,renderChatItems:is})),!$o){const Go=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=vo.history||ba(xo),wr=mt(mt({identifier:En,response_mode:"streaming",model:wi,scene_awareness:$i,thinking_enabled:_o,image_generator:us,code_preview:es,file_ids:Go,image_list:ao,history:dr,[ls]:Si},Xi),vo),Lr=Object.fromEntries(Object.entries(wr).filter(([Ts,Ws])=>Ws!==void 0));ko.current=new pn.Z(gn.Z.API_SERVER+Ti,Lr),yield new Promise((Ts,Ws)=>{let fs=null,kh=null;ko.current.on("data",Ah=>{jt(!0);const{chunk:{content:eu,type:Gi,created:Iu,msg:pe}}=Ah,Pn=pe==="error";Gi==="thinking"&&(fs=fs||Iu,Ui(Xu=>[...Xu].map((Du,Hl)=>Hl===Xu.length-1?At(mt({},Du),{reasoning:(Du.reasoning||"")+eu,loading:!1,hideAnswer:!0,error:Pn}):Du))),Gi==="text"&&(kh=kh||Iu,Ui(Xu=>[...Xu].map((Du,Hl)=>Hl===Xu.length-1?At(mt({},Du),{text:(Du.text||"")+eu,loading:!1,startTime:fs,endTime:kh,error:Pn}):Du)))}),ko.current.on("done",()=>{Ts()}),ko.current.on("error",()=>{const Ah="\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!";Ui(eu=>[...eu].map((Gi,Iu)=>Iu===eu.length-1?At(mt({},Gi),{text:Ah,loading:!1,error:!0}):Gi)),Ts()}),ko.current.on("cancelled",()=>{Ts()}),ko.current.startStream()})}Vr(),Ze(!1)}),vl=$e=>{Hi($e.target.value)},mo=($e,Si)=>{if(Js(),Ze(!0),$e==="edit"){vs.current=mi.slice(Si+2);const vo=mi.splice(Si),{fileList:xo,imageList:Go}=(vo==null?void 0:vo[0])||{},ao=xo.map(Lr=>{var Ts;return(Ts=Lr.response)==null?void 0:Ts.file_id}),dr=Go.map(Lr=>{var Ts;return(Ts=Lr.response)==null?void 0:Ts.data}),wr={history:ba(mi),file_ids:ao,image_list:dr,edit:!0};Ui([...mi,...is(mr,xo,Go)]),Pa(mr,wr,mi)}if($e==="redraw"){vs.current=mi.slice(Si+1);const vo=mi.splice(Si-1),{text:xo,fileList:Go,imageList:ao}=(vo==null?void 0:vo[0])||{},dr=Go.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(mi),file_ids:dr,image_list:wr,edit:!0};Ui([...mi,...is(xo,Go,ao)]),Pa(xo,Lr,mi)}},Tu=()=>{if(ki.trim()!==""){Js(),Ze(!0);const $e=qi.filter(vo=>vo.status==="done"),Si=lo.filter(vo=>vo.status==="done");Ui([...mi,...is(ki,$e,Si)]),Pa(ki)}},Ia=$e=>{if($e.shiftKey){if($e.key==="Enter")return}else if($e.key==="Enter"){if($e.preventDefault(),tu||gl.current)return;Tu()}},Da=($e,Si)=>{let vo=!1;rs===!0?vo=!0:rs==="last"&&(vo=mi.reduce((dr,wr,Lr)=>wr.sender==="user"?Lr:dr,-1)===Si);const xo=Si===Ho,Go=[...($e==null?void 0:$e.fileList)||[],...($e==null?void 0:$e.imageList)||[]];return wt.createElement("div",{className:Ae.li,style:mt({width:Xr},$n)},wt.createElement("div",{className:Ae.avatarIcon},wt.createElement("img",{className:Ae.img,src:Kn})),wt.createElement("div",{className:Ae.content},!!(Go!=null&&Go.length)&&wt.createElement("div",{className:Ae.fileWrap},Go==null?void 0:Go.map((ao,dr)=>{var wr,Lr;return wt.createElement("div",{key:dr,className:Ae.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(Pe.Z,{title:ao==null?void 0:ao.name},wt.createElement("div",{className:Ae.fileName},ao==null?void 0:ao.name)),wt.createElement("div",{className:"c-grey-999 font12"},(0,bn.RD)(ao==null?void 0:ao.size))))})),wt.createElement("div",{className:Ae.borderBox},xo?wt.createElement(Nt.default.TextArea,{value:mr,ref:So,autoSize:!0,placeholder:"\u8BF7\u8F93\u5165",bordered:!1,onChange:ao=>Oi(ao.target.value)}):wt.createElement("div",{className:Ae.text},$e==null?void 0:$e.text)),xo?wt.createElement("div",{className:Ae.action},wt.createElement(Le.ZP,{onClick:()=>{Oi(""),Fr(null)},size:"small"},"\u53D6\u6D88"),wt.createElement(Le.ZP,{disabled:!mr.trim(),onClick:()=>mo("edit",Si),type:"primary",size:"small"},"\u786E\u8BA4")):wt.createElement("div",{className:Ae.action},wt.createElement(Tn.CopyToClipboard,{text:($e==null?void 0:$e.text)||"",onCopy:()=>he.ZP.success("\u590D\u5236\u6210\u529F")},wt.createElement(Pe.Z,{title:"\u590D\u5236"},wt.createElement("i",{className:"iconfont icon-fuzhi8 font13"}))),vo&&!zo&&wt.createElement(Pe.Z,{title:"\u7F16\u8F91"},wt.createElement("i",{onClick:()=>{Fr(Si),Oi(($e==null?void 0:$e.text)||"")},className:"iconfont icon-bianji10 font14"})))))},Ca=($e,Si)=>{let vo=!1;ts===!0?vo=!0:ts==="last"&&(vo=mi.reduce((ao,dr,wr)=>dr.sender==="AI"?wr:ao,-1)===Si);let xo="";return $e!=null&&$e.source?xo=$e==null?void 0:$e.source:($e==null?void 0:$e.model)==="deepseek-r1"?xo="\u7531deepseek\u751F\u6210":($e==null?void 0:$e.model)==="qwen-max"&&(xo="\u7531\u901A\u4E49\u5343\u95EE\u751F\u6210"),wt.createElement("div",{className:Ae.li,style:mt({width:Xr},$n)},wt.createElement("div",{className:Ae.avatarIcon},wt.createElement("img",{className:Ae.img,src:Gn})),wt.createElement("div",{className:Ae.content},wt.createElement("div",{className:Ae.borderBox},$e.loading&&wt.createElement(wt.Fragment,null,$e!=null&&$e.imageGenerator?wt.createElement("div",{className:Ae.loadingPic},"\u6B63\u5728\u751F\u6210\u4E2D",wt.createElement("div",{className:"ai-loading"})):!($e!=null&&$e.thinkingEnabled)&&wt.createElement("div",null,wt.createElement("div",{className:Ae.loading},wt.createElement("div",{className:Ae.dot}),wt.createElement("div",{className:Ae.dot}),wt.createElement("div",{className:Ae.dot})),wt.createElement("div",{style:{marginTop:10,color:"#9096A3"}},(Do==null?void 0:Do.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"))),($e==null?void 0:$e.thinkingEnabled)&&wt.createElement(yt,{time:$e==null?void 0:$e.time,cancelIndex:ro,loading:$e.loading,streamingStatus:!($e!=null&&$e.text),onFinish:()=>{lr(0),Ui(Go=>[...Go].map((ao,dr)=>dr===Go.length-1?At(mt({},ao),{hideAnswer:!1,time:ao.startTime?ao.endTime-ao.startTime:null}):ao))},value:$e==null?void 0:$e.reasoning}),!!($e!=null&&$e.text)&&!$e.hideAnswer&&wt.createElement(et.Z,{onDynamic:Zn,cancelIndex:ro,streamingStatus:zo,loadImage:!!($e!=null&&$e.imageGenerator),onFinish:()=>Rt(void 0,null,function*(){lr(0),setTimeout(()=>jt(!1),0)}),value:$e==null?void 0:$e.text})),Ye&&!!($e!=null&&$e.text)&&xo&&wt.createElement("div",{className:Ae.source},xo),wt.createElement("div",{className:Ae.action},Mo==null?void 0:Mo($e,Si,{onMenuClick:Bu}),wt.createElement(Tn.CopyToClipboard,{text:String(($e==null?void 0:$e.text)||""),onCopy:()=>he.ZP.success({content:"\u590D\u5236\u6210\u529F",key:"copy"})},wt.createElement(Pe.Z,{title:"\u590D\u5236"},wt.createElement("i",{className:"iconfot icon-fuzhi8 font13"}))),Qo&&!zo&&wt.createElement(wt.Fragment,null,wt.createElement(Pe.Z,{title:"\u559C\u6B22"},wt.createElement("i",{style:$e!=null&&$e.like?{color:"#FA8D30"}:{},onClick:()=>zl("like",!($e!=null&&$e.like),Si),className:"iconfot icon-yijiejue font15"})),wt.createElement(Pe.Z,{title:"\u4E0D\u559C\u6B22"},wt.createElement("i",{style:$e!=null&&$e.dislike?{color:"#e86d7c"}:{},onClick:()=>zl("dislike",!($e!=null&&$e.dislike),Si),className:"iconfot icon-weijiejuezhengchang font15"}))),vo&&!zo&&wt.createElement(Pe.Z,{title:"\u91CD\u65B0\u751F\u6210"},wt.createElement("i",{onClick:()=>mo("redraw",Si),className:"iconfot icon-gengxin-genghuan-tihuan"})))))},zl=($e,Si,vo)=>Rt(void 0,null,function*(){if(Ge){const xo=mi.slice(0,vo+1),ao=ba(xo).length;yield Ge({type:$e,value:Si,index:vo,identifier:En,objectIndex:ao})}Ui(xo=>(xo[vo][$e]=Si,Si&&(xo[vo][$e==="like"?"dislike":"like"]=!1),[...xo]))}),vu=()=>{var $e,Si;lr(1),(Si=($e=ko.current)==null?void 0:$e.cancelRequest)==null||Si.call($e),Ze(!1),jt(!1)},pa=()=>Rt(void 0,null,function*(){var $e,Si,vo;(Si=($e=ko.current)==null?void 0:$e.cancelRequest)==null||Si.call($e),Js(),Ui([]),Ze(!0);const xo=yield Nu();(xo==null?void 0:xo.status)===0&&Ki((vo=xo==null?void 0:xo.data)==null?void 0:vo.identifier),Ze(!1),jt(!1)}),Oa=()=>Rt(void 0,null,function*(){var $e;vi(!0);const Si=yield Hr();(Si==null?void 0:Si.status)===0&&Ke((($e=Si==null?void 0:Si.data)==null?void 0:$e.list)||[]),vi(!1)}),Bu=(...$e)=>Rt(void 0,[...$e],function*(Si=En){var vo,xo,Go,ao;(xo=(vo=ko.current)==null?void 0:vo.cancelRequest)==null||xo.call(vo),Js(),ei(!0);const dr=yield As(Si);if(dr.status===0){const wr=so(((Go=dr==null?void 0:dr.data)==null?void 0:Go.messages)||[]);Ui(wr),ei(!1),Ki((ao=dr==null?void 0:dr.data)==null?void 0:ao.identifier);return}Ui([]),ei(!1)}),bh=($e,Si)=>Rt(void 0,null,function*(){(yield kl($e)).status===0&&(he.ZP.success("\u5220\u9664\u6210\u529F"),Si===En&&pa(),Oa())}),dh=()=>wt.createElement("div",{className:Ae.menuWarp},wt.createElement("h4",null,"\u5386\u53F2\u5BF9\u8BDD"),wt.createElement(ve.Z,{spinning:Mi},!ga.length&&wt.createElement(Xt.Z,{style:{width:250,paddingBottom:30},image:Xt.Z.PRESENTED_IMAGE_SIMPLE}),!!ga.length&&wt.createElement("div",{className:Ae.menu},ga.map(function($e,Si){return wt.createElement("aside",{className:Bt()(En===$e.identifier&&Ae.active),key:$e.id,onClick:()=>Bu($e.id)},wt.createElement("div",{className:Ae.menuText},wt.createElement(Pe.Z,{title:$e==null?void 0:$e.question},wt.createElement("span",null,$e==null?void 0:$e.question)),Ln&&Ln($e)),wt.createElement("div",{className:Ae.menuDel,onClick:vo=>vo.stopPropagation()},wt.createElement(fe.Z,{title:"\u63D0\u793A",description:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u672C\u6761\u5BF9\u8BDD\u5417\uFF1F",onConfirm:()=>bh($e.id,$e.identifier),okText:"\u786E\u8BA4",zIndex:1100,cancelText:"\u53D6\u6D88"},wt.createElement("i",{className:"iconfont icon-shanchu14 delete-hover font14"}))))})))),qh=$e=>{if($e==="file"){if(lo.length){te.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:()=>{Eo([]),mu.current.upload.uploader.fileInput.click()}});return}mu.current.upload.uploader.fileInput.click()}if($e==="image"){if(qi.length){te.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()}},ch=[{key:"file",disabled:qi.length>=hr,label:wt.createElement(Pe.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>=Uo,label:wt.createElement(Pe.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($e=>$e.status==="uploading")||zo||_n,Za=uo>=Jo,fh=Be||qi.length>=hr||lo.length>=Uo,gh=us||_o||$i||es||!!yu.length,Fu={chatData:mi,stream:ko,isDisabledNum:Za,checkNumModal:Is,checkNum:Vr,onClose:ml,setChatData:Ui,setLoading:Ze,getData:Pa,clearStatus:Js,typing:_n,setImageGenerator:no,renderChatItems:is,setSceneAwareness:Zo,setIdentifier:Ki,setCodePreview:cs,setTyping:jt};return wt.createElement(wt.Fragment,null,gi?wt.createElement("div",{onClick:ol},gi):gi!==null&&wt.createElement(ui,{draggableExtraNode:ze,src:Vn,onClick:ol,topPercentage:Ci}),wt.createElement(ie,{open:ti,width:hs?"100%":Mt,afterOpenChange:$e=>{$e&&Ys(!1)},push:!1,contentWrapperStyle:sa?{}:{transition:"none"},extra:wt.createElement("div",{className:Ae.head},sn,si&&wt.createElement(Bn,{value:wi,onChange:$e=>{xr(!1),no(!1),Qi($e),Eo([]),_e([])}}),Ee&&wt.createElement(wt.Fragment,null,wt.createElement(xe.Z,{dropdownRender:dh,onOpenChange:$e=>{$e&&Oa()},placement:"bottomLeft",arrow:!0},wt.createElement("div",{className:Ae.headBtn},wt.createElement("i",{className:"icon-lishiduihua1 font14 mr10"}),"\u5386\u53F2\u5BF9\u8BDD"))),ue&&wt.createElement(wt.Fragment,null,wt.createElement("div",{className:Ae.headBtn,onClick:pa},wt.createElement("i",{className:"icon-xinjianduihua font14 mr10"}),"\u65B0\u5EFA\u5BF9\u8BDD")),wt.createElement(Pe.Z,{title:hs?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},wt.createElement("div",{className:Ae.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"},De),onClose:ml,bodyStyle:{paddingRight:4}},wt.createElement("div",{className:Bt()(Ae.wrap,ti&&"body-overflow-hidden")},wt.createElement("div",{ref:Li,className:Ae.chatContainer},Je==null?void 0:Je(Fu),Io&&wt.createElement("div",{className:`${Ae.li} mb20`,style:mt({width:Xr},$n)},wt.createElement("div",{className:Ae.avatarIcon},wt.createElement("img",{className:Ae.img,src:Gn})),wt.createElement("div",{className:Ae.content},wt.createElement("div",{className:Ae.borderBox},ir,pr==null?void 0:pr(Fu)))),wt.createElement("div",{ref:Bi},wt.createElement(ve.Z,{spinning:jn,className:"mt20"},mi==null?void 0:mi.map(($e,Si)=>wt.createElement(wt.Fragment,{key:$e.key+Si},$e.show&&wt.createElement(wt.Fragment,null,$e.sender==="user"&&Da($e,Si),$e.sender==="AI"&&Ca($e,Si),Ue&&!["AI","user"].includes($e.sender)&&Ue($e,Si,{width:Xr})))))),!qo&&wt.createElement("div",{className:Ae.backBottom,onClick:()=>{Li.current.scrollTop=Li.current.scrollHeight}},wt.createElement("i",{className:"iconfont icon-huidaodibu"})),wt.createElement("div",{ref:ms})),!yn&&wt.createElement("div",{style:Cn,className:Bt()(Ae.footerContainer,ho&&Ae.full,gh&&Ae.footerContainerSelected)},wt.createElement("div",{className:Ae.btnWrp},We&&wt.createElement(Pe.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:Bt()(Ae.btn,es&&Ae.btnActive)},wt.createElement("i",{className:"iconfont icon-daimamoshi1 mr10 font12"}),"\u4EE3\u7801\u6A21\u5F0F")),Nn&&wt.createElement(Pe.Z,{title:"\u667A\u80FD\u611F\u77E5\u5F53\u524D\u60C5\u5883\uFF0C\u63D0\u4F9B\u9488\u5BF9\u6027\u89E3\u7B54"},wt.createElement("div",{onClick:()=>Zo(!$i),className:Bt()(Ae.btn,$i&&Ae.btnActive)},wt.createElement("i",{className:"iconfont icon-changjingganzhi mr10 font12"}),"\u573A\u666F\u611F\u77E5")),wi==="deepseek-r1"&&wt.createElement(Pe.Z,{title:"\u8C03\u7528\u65B0\u6A21\u578B DeepSeek-R1\uFF0C\u89E3\u51B3\u63A8\u7406\u95EE\u9898"},wt.createElement("div",{onClick:()=>xr(!_o),className:Bt()(Ae.btn,_o&&Ae.btnActive)},wt.createElement("i",{className:"iconfont icon-shendusikao mr10 font12"}),"\u6DF1\u5EA6\u601D\u8003\uFF08R1\uFF09")),Te&&wi==="qwen-max"&&wt.createElement("div",{onClick:()=>no(!us),className:Bt()(Ae.btn,us&&Ae.btnActive)},wt.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10 font12"}),"\u56FE\u50CF\u751F\u6210"),yu.map($e=>wt.createElement("div",{key:$e.uid},($e==null?void 0:$e.status)==="uploading"&&wt.createElement(ve.Z,{indicator:wt.createElement(Un.Z,{rev:"",spin:!0}),className:"mr10",size:"small",spinning:!0}),wt.createElement("span",{title:$e==null?void 0:$e.name,className:"mr10"},(0,bn.Pq)($e.name,20)),wt.createElement("i",{onClick:()=>{_e(Si=>Si.filter(vo=>vo.uid!==$e.uid)),Eo(Si=>Si.filter(vo=>vo.uid!==$e.uid))},className:"iconfont current icon-shanchu15 delete-hover c-red-ee4 font12"})))),wt.createElement(Pe.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",Jo,"\u6B21\uFF0C\u8BF7\u660E\u5929\u518D\u8BD5\u3002"))},wt.createElement("div",{className:Bt()(Ae.inputContainer,pl>4&&Ae.lineFour,Za&&Ae.disabledInput)},wt.createElement(Ie.default,mt({ref:mu},hi)),wt.createElement(Ie.default,mt({ref:Ka},Ns)),wt.createElement(xe.Z,{className:`${fh&&"hide"}`,menu:{items:ch,onClick:$e=>qh($e.key)},placement:"top"},wt.createElement(Le.ZP,{className:Ae.uploadBtn,icon:wt.createElement(On.Z,{rev:"",style:{fontSize:18,color:"#FFF"}})})),wt.createElement(Nt.default.TextArea,{rows:pl>4?4:pl,placeholder:Oe||"\u5728\u8FD9\u91CC\u8F93\u5165\u4F60\u95EE\u9898\u5427,Shift+Enter\u6362\u884C\uFF5E",value:ki,bordered:!1,style:fh?{paddingLeft:0,marginLeft:0}:{},onChange:vl,onPressEnter:Ia,onFocus:()=>zn==null?void 0:zn(),onCompositionStart:()=>{gl.current=!0},onCompositionEnd:()=>{gl.current=!1}}),_n?wt.createElement(Pe.Z,{title:"\u505C\u6B62\u751F\u6210"},wt.createElement("div",{className:`iconfont icon-tingzhihuida ${Ae.cancelBtn}`,onClick:vu})):wt.createElement(Le.ZP,{className:(ki==null?void 0:ki.trim())===""?Ae.sendBtnDisabled:Ae.sendBtn,icon:wt.createElement("i",{className:"iconfont icon-fasong2 c-white"}),disabled:tu,onClick:Tu}),pl>4&&wt.createElement("span",{className:Ae.fullIcon,onClick:ii},ho&&wt.createElement("span",{className:"iconfont icon-shousuo"}),!ho&&wt.createElement("span",{className:"iconfont icon-zhankai"}))))))))}},9165:function(dn,Mn,bt){"use strict";bt.d(Mn,{t:function(){return xe}});var wt=bt(59301),ee=bt(3113),he={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},Ie=bt(92310),te=bt.n(Ie),Pe=Object.defineProperty,Nt=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Xt=(je,Bt,et)=>Bt in je?Pe(je,Bt,{enumerable:!0,configurable:!0,writable:!0,value:et}):je[Bt]=et,fe=(je,Bt)=>{for(var et in Bt||(Bt={}))Le.call(Bt,et)&&Xt(je,et,Bt[et]);if(Nt)for(var et of Nt(Bt))ve.call(Bt,et)&&Xt(je,et,Bt[et]);return je};const xe=({cancelText:je="\u53D6\u6D88",okText:Bt="\u786E\u5B9A",loading:et=!1,hasOkBtn:nt=!0,hasCancelBtn:ht=!0,okButtonProps:lt={},onCancel:gt=()=>{},onOk:yt=()=>{},className:Pt=""})=>wt.createElement("div",{className:te()(he.buttonFixed,Pt)},wt.createElement("div",{className:he.buttonWrap},ht&&wt.createElement(ee.ZP,{size:"middle",className:`${he.button} mr20`,onClick:gt},je),nt&&wt.createElement(ee.ZP,fe({size:"middle",type:"primary",className:`${he.button} mr20`,loading:et,onClick:yt},lt),Bt)))},16406:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return oe}});var wt=bt(59301),ee={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},he=bt(92310),Ie=bt.n(he),te=bt(71418);var Pe=function(Ft,St){return(Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,At){mt.__proto__=At}||function(mt,At){for(var Rt in At)Object.prototype.hasOwnProperty.call(At,Rt)&&(mt[Rt]=At[Rt])})(Ft,St)};function Nt(Ft,St){function mt(){this.constructor=Ft}Pe(Ft,St),Ft.prototype=St===null?Object.create(St):(mt.prototype=St.prototype,new mt)}function Le(Ft,St,mt,At){return new(mt||(mt=Promise))(function(Rt,Lt){function ae(Be){try{Oe(At.next(Be))}catch(yn){Lt(yn)}}function De(Be){try{Oe(At.throw(Be))}catch(yn){Lt(yn)}}function Oe(Be){var yn;Be.done?Rt(Be.value):(yn=Be.value,yn instanceof mt?yn:new mt(function(Gn){Gn(yn)})).then(ae,De)}Oe((At=At.apply(Ft,St||[])).next())})}function ve(Ft,St){var mt,At,Rt,Lt,ae={label:0,sent:function(){if(1&Rt[0])throw Rt[1];return Rt[1]},trys:[],ops:[]};return Lt={next:De(0),throw:De(1),return:De(2)},typeof Symbol=="function"&&(Lt[Symbol.iterator]=function(){return this}),Lt;function De(Oe){return function(Be){return function(yn){if(mt)throw new TypeError("Generator is already executing.");for(;ae;)try{if(mt=1,At&&(Rt=2&yn[0]?At.return:yn[0]?At.throw||((Rt=At.return)&&Rt.call(At),0):At.next)&&!(Rt=Rt.call(At,yn[1])).done)return Rt;switch(At=0,Rt&&(yn=[2&yn[0],Rt.value]),yn[0]){case 0:case 1:Rt=yn;break;case 4:return ae.label++,{value:yn[1],done:!1};case 5:ae.label++,At=yn[1],yn=[0];continue;case 7:yn=ae.ops.pop(),ae.trys.pop();continue;default:if(Rt=ae.trys,!((Rt=Rt.length>0&&Rt[Rt.length-1])||yn[0]!==6&&yn[0]!==2)){ae=0;continue}if(yn[0]===3&&(!Rt||yn[1]>Rt[0]&&yn[1]<Rt[3])){ae.label=yn[1];break}if(yn[0]===6&&ae.label<Rt[1]){ae.label=Rt[1],Rt=yn;break}if(Rt&&ae.label<Rt[2]){ae.label=Rt[2],ae.ops.push(yn);break}Rt[2]&&ae.ops.pop(),ae.trys.pop();continue}yn=St.call(Ft,ae)}catch(Gn){yn=[6,Gn],At=0}finally{mt=Rt=0}if(5&yn[0])throw yn[1];return{value:yn[0]?yn[1]:void 0,done:!0}}([Oe,Be])}}}function Xt(){for(var Ft=0,St=0,mt=arguments.length;St<mt;St++)Ft+=arguments[St].length;var At=Array(Ft),Rt=0;for(St=0;St<mt;St++)for(var Lt=arguments[St],ae=0,De=Lt.length;ae<De;ae++,Rt++)At[Rt]=Lt[ae];return At}var fe=function(){function Ft(){}return Ft.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ft.setAttributes=function(St,mt){for(var At=0,Rt=mt;At<Rt.length;At++){var Lt=Rt[At],ae=Lt[0],De=Lt[1];St.setAttribute(ae,De)}},Ft.createRect=function(St,mt,At){var Rt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Rt.setAttribute("width",St.toString()),Rt.setAttribute("height",mt.toString()),At&&Ft.setAttributes(Rt,At),Rt},Ft.createLine=function(St,mt,At,Rt,Lt){var ae=document.createElementNS("http://www.w3.org/2000/svg","line");return ae.setAttribute("x1",St.toString()),ae.setAttribute("y1",mt.toString()),ae.setAttribute("x2",At.toString()),ae.setAttribute("y2",Rt.toString()),Lt&&Ft.setAttributes(ae,Lt),ae},Ft.createPolygon=function(St,mt){var At=document.createElementNS("http://www.w3.org/2000/svg","polygon");return At.setAttribute("points",St),mt&&Ft.setAttributes(At,mt),At},Ft.createCircle=function(St,mt){var At=document.createElementNS("http://www.w3.org/2000/svg","circle");return At.setAttribute("cx",(St/2).toString()),At.setAttribute("cy",(St/2).toString()),At.setAttribute("r",St.toString()),mt&&Ft.setAttributes(At,mt),At},Ft.createEllipse=function(St,mt,At){var Rt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Rt.setAttribute("cx",(St/2).toString()),Rt.setAttribute("cy",(mt/2).toString()),Rt.setAttribute("rx",(St/2).toString()),Rt.setAttribute("ry",(mt/2).toString()),At&&Ft.setAttributes(Rt,At),Rt},Ft.createGroup=function(St){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return St&&Ft.setAttributes(mt,St),mt},Ft.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ft.createMarker=function(St,mt,At,Rt,Lt,ae,De){var Oe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ft.setAttributes(Oe,[["id",St],["orient",mt],["markerWidth",At.toString()],["markerHeight",Rt.toString()],["refX",Lt.toString()],["refY",ae.toString()]]),Oe.appendChild(De),Oe},Ft.createText=function(St){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),St&&Ft.setAttributes(mt,St),mt},Ft.createTSpan=function(St,mt){var At=document.createElementNS("http://www.w3.org/2000/svg","tspan");return At.textContent=St,mt&&Ft.setAttributes(At,mt),At},Ft.createImage=function(St){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return St&&Ft.setAttributes(mt,St),mt},Ft.createPoint=function(St,mt){var At=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return At.x=St,At.y=mt,At},Ft.createPath=function(St,mt){var At=document.createElementNS("http://www.w3.org/2000/svg","path");return At.setAttribute("d",St),mt&&Ft.setAttributes(At,mt),At},Ft}(),xe=function(){function Ft(){}return Ft.addKey=function(St){Ft.key=St},Object.defineProperty(Ft,"isLicensed",{get:function(){return!!Ft.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ft.key)},enumerable:!1,configurable:!0}),Ft}(),je=function(){function Ft(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ft.prototype.rasterize=function(St,mt,At){var Rt=this;return new Promise(function(Lt){var ae=At!==void 0?At:document.createElement("canvas");St===null&&(Rt.markersOnly=!0,Rt.naturalSize=!1);var De=document.createElementNS("http://www.w3.org/2000/svg","svg");De.setAttribute("xmlns","http://www.w3.org/2000/svg"),De.setAttribute("width",mt.width.baseVal.valueAsString),De.setAttribute("height",mt.height.baseVal.valueAsString),De.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),De.innerHTML=mt.innerHTML,Rt.naturalSize===!0?(De.width.baseVal.value=St.naturalWidth,De.height.baseVal.value=St.naturalHeight):Rt.width!==void 0&&Rt.height!==void 0&&(De.width.baseVal.value=Rt.width,De.height.baseVal.value=Rt.height),ae.width=De.width.baseVal.value,ae.height=De.height.baseVal.value;var Oe=De.outerHTML,Be=ae.getContext("2d");Rt.markersOnly!==!0&&Be.drawImage(St,0,0,ae.width,ae.height);var yn=window.URL,Gn=new Image(ae.width,ae.height);Gn.setAttribute("crossOrigin","anonymous");var Kn=new Blob([Oe],{type:"image/svg+xml"}),Vn=yn.createObjectURL(Kn);Gn.onload=function(){Be.drawImage(Gn,0,0),yn.revokeObjectURL(Vn);var gi=ae.toDataURL(Rt.imageType,Rt.imageQuality);Lt(gi)},Gn.src=Vn})},Ft}(),Bt=function(){},et=function(){function Ft(St){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+St+"_"}return Object.defineProperty(Ft.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.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(Ft.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ft.prototype.addClass=function(St){return this.styleSheet===void 0&&this.addStyleSheet(),St.name=""+this.classNamePrefix+St.localName,this.classes.push(St),this.styleSheet.sheet.insertRule("."+St.name+" {"+St.style+"}",this.styleSheet.sheet.cssRules.length),St},Ft.prototype.addRule=function(St){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(St),this.styleSheet.sheet.insertRule(St.selector+" {"+St.style+"}",this.styleSheet.sheet.cssRules.length)},Ft.prototype.addStyleSheet=function(){var St;this.styleSheet=document.createElement("style"),((St=this.styleSheetRoot)!==null&&St!==void 0?St:document.head).appendChild(this.styleSheet),this.addRule(new nt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ht("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ht("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Ft.prototype.removeStyleSheet=function(){var St;this.styleSheet&&(((St=this.styleSheetRoot)!==null&&St!==void 0?St:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ft}(),nt=function(Ft,St){this.selector=Ft,this.style=St},ht=function(Ft,St){this.localName=Ft,this.style=St},lt=function(){function Ft(St,mt,At,Rt,Lt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=St,this.displayMode=mt,this.markerItems=At,this.uiStyleSettings=Rt,this.styles=Lt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ft.prototype.show=function(St){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=St,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var At=document.createElement("div");At.className=this.toolbarBlockStyleClass.name,At.style.whiteSpace="nowrap",this.uiContainer.appendChild(At),this.addActionButton(At,'<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(At,'<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(At,'<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(At,'<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(At,'<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(At,'<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(At,'<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(At,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Lt){var ae=document.createElement("div");ae.className=""+mt.toolbarButtonStyleClass.name,ae.setAttribute("data-type-name",Lt.typeName),ae.innerHTML=Lt.icon,ae.addEventListener("click",function(){mt.markerToolbarButtonClicked(ae,Lt)}),mt.buttons.push(ae),mt.markerButtons.push(ae)}),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 Rt=document.createElement("div");Rt.className=this.toolbarBlockStyleClass.name,Rt.style.whiteSpace="nowrap",Rt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Rt),this.addActionButton(Rt,'<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(Rt,'<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()},Ft.prototype.addButtonClickListener=function(St){this.buttonClickListeners.push(St)},Ft.prototype.removeButtonClickListener=function(St){this.buttonClickListeners.indexOf(St)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(St),1)},Ft.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ft.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var St=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var mt=0;mt<this.markerButtons.length;mt++)mt<St||mt===St&&this.markerButtons.length-1===St?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===St&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},Ft.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")},Ft.prototype.resetButtonStyles=function(){var St=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(St.uiStyleSettings.toolbarButtonStyleColorsClassName?St.uiStyleSettings.toolbarButtonStyleColorsClassName:St.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(St.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?St.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:St.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(St.uiStyleSettings.toolbarButtonStyleColorsClassName?St.uiStyleSettings.toolbarButtonStyleColorsClassName:St.toolbarButtonStyleColorsClass.name)})},Ft.prototype.addActionButton=function(St,mt,At){var Rt=this,Lt=document.createElement("div");switch(Lt.className=""+this.toolbarButtonStyleClass.name,Lt.innerHTML=mt,Lt.setAttribute("data-action",At),Lt.addEventListener("click",function(){Rt.actionToolbarButtonClicked(Lt,At)}),At){case"select":Lt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Lt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Lt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Lt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Lt.style.fill=this.uiStyleSettings.closeButtonColor}St.appendChild(Lt),this.buttons.push(Lt)},Ft.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ht("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 ht("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ht("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ht("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 ht("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var St=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ht("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Ft.prototype.markerToolbarButtonClicked=function(St,mt){this.setActiveButton(St),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(At){return At("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},Ft.prototype.actionToolbarButtonClicked=function(St,mt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(At){return At("action",mt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ft.prototype.setActiveButton=function(St){this.resetButtonStyles(),St.className=St.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),St.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ft.prototype.setActiveMarkerButton=function(St){var mt=this.markerButtons.find(function(At){return At.getAttribute("data-type-name")===St});mt&&this.setActiveButton(mt)},Ft.prototype.setCurrentMarker=function(St){var mt=this;this.currentMarker=St,this.buttons.filter(function(At){return/delete|notes/.test(At.getAttribute("data-action"))}).forEach(function(At){mt.currentMarker===void 0?(At.style.fillOpacity="0.4",At.style.pointerEvents="none"):(At.style.fillOpacity="1",At.style.pointerEvents="all")})},Ft}(),gt=function(){function Ft(St,mt,At,Rt){this.panels=[],this.panelButtons=[],this.markerjsContainer=St,this.displayMode=mt,this.uiStyleSettings=At,this.styles=Rt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ft.prototype.addStyles=function(){var St;this.toolboxStyleClass=this.styles.addClass(new ht("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 ht("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var mt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ht("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ht("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ht("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 ht("toolbox-panel-row_colors",`
|
|
|
background-color: `+((St=this.uiStyleSettings.toolboxBackgroundColor)!==null&&St!==void 0?St:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ht("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
|
|
|
padding: `+mt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ht("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new nt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new nt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Ft.prototype.show=function(St){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=St,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ft.prototype.setPanelButtons=function(St){var mt,At,Rt=this;this.panels=St,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((At=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&At!==void 0?At:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Lt){var ae;Lt.uiStyleSettings=Rt.uiStyleSettings;var De=document.createElement("div");De.className=Rt.toolboxButtonStyleClass.name+" "+((ae=Rt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ae!==void 0?ae:Rt.toolboxButtonStyleColorsClass.name),De.innerHTML=Lt.icon,De.title=Lt.title,De.addEventListener("click",function(){Rt.panelButtonClick(Lt)}),Rt.panelButtons.push(De),Rt.buttonRow.appendChild(De)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ft.prototype.panelButtonClick=function(St){var mt=this,At=-1;if(St!==this.activePanel){At=this.panels.indexOf(St),this.panelRow.innerHTML="";var Rt=St.getUi();Rt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Rt),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=St}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){mt.displayMode==="inline"?mt.panelRow.style.display="none":mt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Lt,ae){var De,Oe;Lt.className=mt.toolboxButtonStyleClass.name+" "+(ae===At?""+((De=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&De!==void 0?De:mt.toolboxActiveButtonStyleColorsClass.name):""+((Oe=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Oe!==void 0?Oe:mt.toolboxButtonStyleColorsClass.name))})},Ft}(),yt=function(Ft,St){this.title=Ft,this.icon=St},Pt=function(Ft){function St(mt,At,Rt,Lt){var ae=Ft.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ae.colors=[],ae.addTransparent=!1,ae.colorBoxes=[],ae.colors=At,ae.currentColor=Rt,ae.setCurrentColor=ae.setCurrentColor.bind(ae),ae.getColorBox=ae.getColorBox.bind(ae),ae}return Nt(St,Ft),St.prototype.getUi=function(){var mt=this,At=document.createElement("div");return At.style.overflow="hidden",At.style.whiteSpace="nowrap",this.colors.forEach(function(Rt){var Lt=mt.getColorBox(Rt);At.appendChild(Lt),mt.colorBoxes.push(Lt)}),At},St.prototype.getColorBox=function(mt){var At=this,Rt=this.uiStyleSettings.toolbarHeight/4,Lt=this.uiStyleSettings.toolbarHeight-Rt,ae=document.createElement("div");ae.style.display="inline-block",ae.style.boxSizing="content-box",ae.style.width=Lt-2+"px",ae.style.height=Lt-2+"px",ae.style.padding="1px",ae.style.marginRight="2px",ae.style.marginBottom="2px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderRadius=(Lt+2)/2+"px",ae.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){At.setCurrentColor(mt,ae)});var De=document.createElement("div");return De.style.display="inline-block",De.style.width=Lt-2+"px",De.style.height=Lt-2+"px",De.style.backgroundColor=mt,De.style.borderRadius=Lt/2+"px",mt==="transparent"&&(De.style.fill=this.uiStyleSettings.toolboxAccentColor,De.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),ae.appendChild(De),ae},St.prototype.setCurrentColor=function(mt,At){var Rt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===At?Rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},St}(yt),Tt=function(){function Ft(St,mt,At){this._state="new",this._isSelected=!1,this._container=St,this._overlayContainer=mt,this.globalSettings=At,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ft.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ft.prototype.ownsTarget=function(St){return!1},Object.defineProperty(Ft.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ft.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ft.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ft.prototype.pointerDown=function(St,mt){},Ft.prototype.dblClick=function(St,mt){},Ft.prototype.manipulate=function(St){},Ft.prototype.pointerUp=function(St){this.stateChanged()},Ft.prototype.dispose=function(){},Ft.prototype.addMarkerVisualToContainer=function(St){this.container.childNodes.length>0?this.container.insertBefore(St,this.container.childNodes[0]):this.container.appendChild(St)},Ft.prototype.getState=function(){return{typeName:Ft.typeName,state:this.state,notes:this.notes}},Ft.prototype.restoreState=function(St){this._state=St.state,this.notes=St.notes},Ft.prototype.scale=function(St,mt){},Ft.prototype.colorChanged=function(St){this.onColorChanged&&this.onColorChanged(St),this.stateChanged()},Ft.prototype.fillColorChanged=function(St){this.onFillColorChanged&&this.onFillColorChanged(St),this.stateChanged()},Ft.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var St=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),St.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(St)&&this.onStateChanged(this)}},Ft.typeName="MarkerBase",Ft}(),It=function(){function Ft(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ft.prototype.findGripByVisual=function(St){return this.topLeft.ownsTarget(St)?this.topLeft:this.topCenter.ownsTarget(St)?this.topCenter:this.topRight.ownsTarget(St)?this.topRight:this.centerLeft.ownsTarget(St)?this.centerLeft:this.centerRight.ownsTarget(St)?this.centerRight:this.bottomLeft.ownsTarget(St)?this.bottomLeft:this.bottomCenter.ownsTarget(St)?this.bottomCenter:this.bottomRight.ownsTarget(St)?this.bottomRight:void 0},Ft}(),zt=function(){function Ft(){this.GRIP_SIZE=10,this.visual=fe.createGroup(),this.visual.appendChild(fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(fe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ft.prototype.ownsTarget=function(St){return St===this.visual||St===this.visual.childNodes[0]||St===this.visual.childNodes[1]},Ft}(),_t=function(){function Ft(){}return Ft.toITransformMatrix=function(St){return{a:St.a,b:St.b,c:St.c,d:St.d,e:St.e,f:St.f}},Ft.toSVGMatrix=function(St,mt){return St.a=mt.a,St.b=mt.b,St.c=mt.c,St.d=mt.d,St.e=mt.e,St.f=mt.f,St},Ft}(),se=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.left=0,Lt.top=0,Lt.width=0,Lt.height=0,Lt.defaultSize={x:50,y:20},Lt.offsetX=0,Lt.offsetY=0,Lt.rotationAngle=0,Lt.CB_DISTANCE=10,Lt._suppressMarkerCreateEvent=!1,Lt.container.transform.baseVal.appendItem(fe.createTransform()),Lt.setupControlBox(),Lt}return Nt(St,Ft),Object.defineProperty(St.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var At=fe.createTransform();this._visual.transform.baseVal.appendItem(At)},enumerable:!1,configurable:!0}),St.prototype.ownsTarget=function(mt){return!!Ft.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.state==="new"&&(this.left=mt.x,this.top=mt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Rt=this.unrotatePoint(mt);if(this.manipulationStartX=Rt.x,this.manipulationStartY=Rt.y,this.offsetX=Rt.x-this.left,this.offsetY=Rt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(At),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(At)){this.activeGrip=this.rotatorGrip;var Lt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Lt.x-this.width/2,this.top=Lt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ae=this.container.transform.baseVal.getItem(0);ae.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ae,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},St.prototype.pointerUp=function(mt){var At=this.state;Ft.prototype.pointerUp.call(this,mt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(mt),this._state="select",At==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},St.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},St.prototype.manipulate=function(mt){var At=this.unrotatePoint(mt);this.state==="creating"?this.resize(mt):this.state==="move"?(this.left=this.manipulationStartLeft+(At.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(At.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(At):this.state==="rotate"&&this.rotate(mt)},St.prototype.resize=function(mt){var At=this.manipulationStartLeft,Rt=this.manipulationStartWidth,Lt=this.manipulationStartTop,ae=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:At=this.manipulationStartLeft+mt.x-this.manipulationStartX,Rt=this.manipulationStartWidth+this.manipulationStartLeft-At;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Rt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Lt=this.manipulationStartTop+mt.y-this.manipulationStartY,ae=this.manipulationStartHeight+this.manipulationStartTop-Lt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ae=this.manipulationStartHeight+mt.y-this.manipulationStartY}Rt>=0?(this.left=At,this.width=Rt):(this.left=At+Rt,this.width=-Rt),ae>=0?(this.top=Lt,this.height=ae):(this.top=Lt+ae,this.height=-ae),this.setSize()},St.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},St.prototype.rotate=function(mt){if(Math.abs(mt.x-this.centerX)>.1){var At=Math.sign(mt.x-this.centerX);this.rotationAngle=180*Math.atan((mt.y-this.centerY)/(mt.x-this.centerX))/Math.PI+90*At,this.applyRotation()}},St.prototype.applyRotation=function(){var mt=this.container.transform.baseVal.getItem(0);mt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(mt,0)},St.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var At=this.container.getCTM(),Rt=fe.createPoint(mt.x,mt.y);return{x:(Rt=Rt.matrixTransform(At)).x,y:Rt.y}},St.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var At=this.container.getCTM();At=At.inverse();var Rt=fe.createPoint(mt.x,mt.y);return{x:(Rt=Rt.matrixTransform(At)).x,y:Rt.y}},St.prototype.select=function(){Ft.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){Ft.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var mt=fe.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=fe.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=fe.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new It,this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){var mt=this.controlBox.transform.baseVal.getItem(0);mt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(mt,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},St.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()},St.prototype.createGrip=function(){var mt=new zt;return mt.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,At=-mt/2,Rt=At,Lt=(this.width+this.CB_DISTANCE)/2-mt/2,ae=(this.height+this.CB_DISTANCE)/2-mt/2,De=this.height+this.CB_DISTANCE-mt/2,Oe=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,At,Rt),this.positionGrip(this.controlGrips.topCenter.visual,Lt,Rt),this.positionGrip(this.controlGrips.topRight.visual,Oe,Rt),this.positionGrip(this.controlGrips.centerLeft.visual,At,ae),this.positionGrip(this.controlGrips.centerRight.visual,Oe,ae),this.positionGrip(this.controlGrips.bottomLeft.visual,At,De),this.positionGrip(this.controlGrips.bottomCenter.visual,Lt,De),this.positionGrip(this.controlGrips.bottomRight.visual,Oe,De),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Lt,Rt-3*this.CB_DISTANCE)},St.prototype.positionGrip=function(mt,At,Rt){var Lt=mt.transform.baseVal.getItem(0);Lt.setTranslate(At,Rt),mt.transform.baseVal.replaceItem(Lt,0)},St.prototype.hideControlBox=function(){this.controlBox.style.display="none"},St.prototype.showControlBox=function(){this.controlBox.style.display=""},St.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:_t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:_t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ft.prototype.getState.call(this))},St.prototype.restoreState=function(mt){Ft.prototype.restoreState.call(this,mt);var At=mt;this.left=At.left,this.top=At.top,this.width=At.width,this.height=At.height,this.rotationAngle=At.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(_t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,At.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(_t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,At.containerTransformMatrix))},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At);var Rt=this.rotatePoint({x:this.left,y:this.top}),Lt=this.unrotatePoint({x:Rt.x*mt,y:Rt.y*At});this.left=Lt.x,this.top=Lt.y,this.width=this.width*mt,this.height=this.height*At,this.adjustControlBox()},St}(Tt),Jt=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.fillColor="transparent",Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.opacity=1,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setFillColor=Lt.setFillColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.createVisual=Lt.createVisual.bind(Lt),Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},St.prototype.createVisual=function(){this.visual=fe.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){Ft.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){Ft.prototype.resize.call(this,mt),this.setSize()},St.prototype.setSize=function(){Ft.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){Ft.prototype.pointerUp.call(this,mt),this.setSize()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},St.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ft.prototype.getState.call(this))},St.prototype.restoreState=function(mt){var At=mt;this.fillColor=At.fillColor,this.strokeColor=At.strokeColor,this.strokeWidth=At.strokeWidth,this.strokeDasharray=At.strokeDasharray,this.opacity=At.opacity,this.createVisual(),Ft.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At),this.setSize()},St.title="Rectangle marker",St}(se),le=function(Ft){function St(mt,At,Rt,Lt){var ae=Ft.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ae.widths=[],ae.widthBoxes=[],ae.widths=At,ae.currentWidth=Rt,ae.setCurrentWidth=ae.setCurrentWidth.bind(ae),ae}return Nt(St,Ft),St.prototype.getUi=function(){var mt=this,At=document.createElement("div");return At.style.display="flex",At.style.overflow="hidden",At.style.flexGrow="2",this.widths.forEach(function(Rt){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.flexGrow="2",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.borderColor=Rt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentWidth(Rt,Lt)}),At.appendChild(Lt);var ae=document.createElement("div");ae.innerText=Rt.toString(),ae.style.marginRight="5px",Lt.appendChild(ae);var De=document.createElement("div");De.style.minHeight="20px",De.style.flexGrow="2",De.style.display="flex",De.style.alignItems="center";var Oe=document.createElement("hr");Oe.style.minWidth="20px",Oe.style.border="0px",Oe.style.borderTop=Rt+"px solid "+mt.uiStyleSettings.toolboxColor,Oe.style.flexGrow="2",De.appendChild(Oe),Lt.appendChild(De),mt.widthBoxes.push(Lt)}),At},St.prototype.setCurrentWidth=function(mt,At){var Rt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===At?Rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},St}(yt),Zt=function(Ft){function St(mt,At,Rt,Lt){var ae=Ft.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ae.styles=[],ae.styleBoxes=[],ae.styles=At,ae.currentStyle=Rt,ae.setCurrentStyle=ae.setCurrentStyle.bind(ae),ae}return Nt(St,Ft),St.prototype.getUi=function(){var mt=this,At=document.createElement("div");return At.style.display="flex",At.style.overflow="hidden",At.style.flexGrow="2",this.styles.forEach(function(Rt){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.overflow="hidden",Lt.style.maxWidth=100/mt.styles.length-5+"%",Lt.style.borderColor=Rt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentStyle(Rt,Lt)}),At.appendChild(Lt);var ae=document.createElement("div");ae.style.minHeight="20px",ae.style.flexGrow="2",ae.style.overflow="hidden";var De=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+mt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Rt!==""?'stroke-dasharray="'+Rt+'"':"")+` />
|
|
|
</svg>`;ae.innerHTML=De,Lt.appendChild(ae),mt.styleBoxes.push(Lt)}),At},St.prototype.setCurrentStyle=function(mt,At){var Rt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===At?Rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},St}(yt),Fe=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.strokeColor=Rt.defaultColor,Lt.strokeWidth=Rt.defaultStrokeWidth,Lt.strokeDasharray=Rt.defaultStrokeDasharray,Lt.strokePanel=new Pt("Line color",Rt.defaultColorSet,Rt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.strokeWidthPanel=new le("Line width",Rt.defaultStrokeWidths,Rt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Zt("Line style",Rt.defaultStrokeDasharrays,Rt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt}return Nt(St,Ft),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Ft.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="FrameMarker",St.title="Frame marker",St.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',St}(Jt),me=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"},Ve=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.x1=0,Lt.y1=0,Lt.x2=0,Lt.y2=0,Lt.defaultLength=50,Lt.manipulationStartX=0,Lt.manipulationStartY=0,Lt.manipulationStartX1=0,Lt.manipulationStartY1=0,Lt.manipulationStartX2=0,Lt.manipulationStartY2=0,Lt.setupControlBox(),Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!!Ft.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.manipulationStartX=mt.x,this.manipulationStartY=mt.y,this.state==="new"&&(this.x1=mt.x,this.y1=mt.y,this.x2=mt.x,this.y2=mt.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(At)?this.activeGrip=this.grip1:this.grip2.ownsTarget(At)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},St.prototype.pointerUp=function(mt){var At=this.state;Ft.prototype.pointerUp.call(this,mt),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(mt),this._state="select",At==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},St.prototype.adjustVisual=function(){},St.prototype.manipulate=function(mt){this.state==="creating"?this.resize(mt):this.state==="move"?(this.x1=this.manipulationStartX1+mt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+mt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+mt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+mt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(mt)},St.prototype.resize=function(mt){switch(this.activeGrip){case this.grip1:this.x1=mt.x,this.y1=mt.y;break;case this.grip2:case void 0:this.x2=mt.x,this.y2=mt.y}this.adjustVisual(),this.adjustControlBox()},St.prototype.select=function(){Ft.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){Ft.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){this.positionGrips()},St.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},St.prototype.createGrip=function(){var mt=new zt;return mt.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-mt/2,this.y1-mt/2),this.positionGrip(this.grip2.visual,this.x2-mt/2,this.y2-mt/2)},St.prototype.positionGrip=function(mt,At,Rt){var Lt=mt.transform.baseVal.getItem(0);Lt.setTranslate(At,Rt),mt.transform.baseVal.replaceItem(Lt,0)},St.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ft.prototype.getState.call(this))},St.prototype.restoreState=function(mt){Ft.prototype.restoreState.call(this,mt);var At=mt;this.x1=At.x1,this.y1=At.y1,this.x2=At.x2,this.y2=At.y2},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At),this.x1=this.x1*mt,this.y1=this.y1*At,this.x2=this.x2*mt,this.y2=this.y2*At,this.adjustVisual(),this.adjustControlBox()},St}(Tt),Qe=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.strokeColor=Rt.defaultColor,Lt.strokeWidth=Rt.defaultStrokeWidth,Lt.strokeDasharray=Rt.defaultStrokeDasharray,Lt.strokePanel=new Pt("Line color",Rt.defaultColorSet,Rt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.strokeWidthPanel=new le("Line width",Rt.defaultStrokeWidths,Rt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Zt("Line style",Rt.defaultStrokeDasharrays,Rt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},St.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorLine=fe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=fe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},St.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),fe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ft.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Ft.prototype.restoreState.call(this,mt);var At=mt;this.strokeColor=At.strokeColor,this.strokeWidth=At.strokeWidth,this.strokeDasharray=At.strokeDasharray,this.createVisual(),this.adjustVisual()},St.typeName="LineMarker",St.title="Line marker",St.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',St}(Ve),qe=function(Ft){function St(mt,At,Rt,Lt){var ae=Ft.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ae.fonts=[],ae.fontBoxes=[],ae.fonts=At,ae.currentFont=Rt,ae.setCurrentFont=ae.setCurrentFont.bind(ae),ae}return Nt(St,Ft),St.prototype.getUi=function(){var mt=this,At=document.createElement("div");return At.style.overflow="hidden",At.style.flexGrow="2",this.fonts.forEach(function(Rt){var Lt=document.createElement("div");Lt.style.display="inline-block",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.overflow="hidden",Lt.style.maxWidth=100/mt.fonts.length-5+"%",Lt.style.borderColor=Rt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentFont(Rt,Lt)}),At.appendChild(Lt);var ae=document.createElement("div");ae.style.display="flex",ae.style.minHeight="20px",ae.style.flexGrow="2",ae.style.fontFamily=Rt,ae.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",ae.appendChild(De),Lt.appendChild(ae),mt.fontBoxes.push(Lt)}),At},St.prototype.setCurrentFont=function(mt,At){var Rt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===At?Rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},St}(yt),vn=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.color="transparent",Lt.padding=5,Lt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Lt.text=Lt.DEFAULT_TEXT,Lt.isMoved=!1,Lt.color=Rt.defaultColor,Lt.fontFamily=Rt.defaultFontFamily,Lt.defaultSize={x:100,y:30},Lt.setColor=Lt.setColor.bind(Lt),Lt.setFont=Lt.setFont.bind(Lt),Lt.renderText=Lt.renderText.bind(Lt),Lt.sizeText=Lt.sizeText.bind(Lt),Lt.textEditDivClicked=Lt.textEditDivClicked.bind(Lt),Lt.showTextEditor=Lt.showTextEditor.bind(Lt),Lt.setSize=Lt.setSize.bind(Lt),Lt.positionTextEditor=Lt.positionTextEditor.bind(Lt),Lt.colorPanel=new Pt("Color",Rt.defaultColorSet,Rt.defaultColor),Lt.colorPanel.onColorChanged=Lt.setColor,Lt.fontFamilyPanel=new qe("Font",Rt.defaultFontFamilies,Rt.defaultFontFamily),Lt.fontFamilyPanel.onFontChanged=Lt.setFont,Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){if(Ft.prototype.ownsTarget.call(this,mt)||mt===this.visual||mt===this.textElement||mt===this.bgRectangle)return!0;var At=!1;return this.textElement.childNodes.forEach(function(Rt){Rt===mt&&(At=!0)}),At},St.prototype.createVisual=function(){this.visual=fe.createGroup(),this.bgRectangle=fe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=fe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.renderText=function(){var mt=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(At){mt.textElement.appendChild(fe.createTSpan(At.trim()===""?" ":At.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},St.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),At=1;if(mt.width>0&&mt.height>0){var Rt=(1*this.width-this.width*this.padding*2/100)/mt.width,Lt=(1*this.height-this.height*this.padding*2/100)/mt.height;At=Math.min(Rt,Lt)}return At},St.prototype.getTextPosition=function(mt){var At=this.textElement.getBBox(),Rt=0,Lt=0;return At.width>0&&At.height>0&&(Rt=(this.width-At.width*mt)/2,Lt=this.height/2-At.height*mt/2),{x:Rt,y:Lt}},St.prototype.sizeText=function(){var mt=this.textElement.getBBox(),At=this.getTextScale(),Rt=this.getTextPosition(At);Rt.y-=mt.y*At,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Rt.x+"px, "+Rt.y+"px) scale("+At+", "+At+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Rt.x,Rt.y),this.textElement.transform.baseVal.getItem(1).setScale(At,At))},St.prototype.manipulate=function(mt){Ft.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){Ft.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},St.prototype.setSize=function(){Ft.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},St.prototype.pointerUp=function(mt){var At=this.state;At==="creating"&&(this._suppressMarkerCreateEvent=!0),Ft.prototype.pointerUp.call(this,mt),this.setSize(),(At==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.showTextEditor=function(){var mt=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(At){At.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var At=Number.parseFloat(mt.textEditor.style.fontSize);mt.textEditor.clientWidth>=Number.parseInt(mt.textEditor.style.maxWidth)&&At>.9;)At-=.1,mt.textEditor.style.fontSize=Math.max(At,.9)+"em"}),this.textEditor.addEventListener("keyup",function(At){At.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(At){if(At.clipboardData){var Rt=At.clipboardData.getData("text"),Lt=window.getSelection();if(!Lt.rangeCount)return!1;Lt.deleteFromDocument(),Lt.getRangeAt(0).insertNode(document.createTextNode(Rt)),At.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){mt.textEditDivClicked(mt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},St.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var mt=this.getTextScale(),At=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Rt=this.textElement.getBBox(),Lt={x:Rt.width*mt,y:Rt.height*mt};At.x-=Lt.x/2,At.y-=Lt.y/2,this.textEditor.style.top=At.y+"px",this.textEditor.style.left=At.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-At.x+"px",this.textEditor.style.fontSize=Math.max(16*mt,12)+"px",this.textElement.style.display="none"}},St.prototype.textEditDivClicked=function(mt){this.text=mt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},St.prototype.select=function(){Ft.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},St.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ft.prototype.deselect.call(this)},St.prototype.dblClick=function(mt,At){Ft.prototype.dblClick.call(this,mt,At),this.showTextEditor()},St.prototype.setColor=function(mt){this.textElement&&fe.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},St.prototype.setFont=function(mt){this.textElement&&fe.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},St.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},St.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ft.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var At=mt;this.color=At.color,this.fontFamily=At.fontFamily,this.padding=At.padding,this.text=At.text,this.createVisual(),Ft.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At),this.setSize(),this.sizeText(),this.positionTextEditor()},St.typeName="TextMarker",St.title="Text marker",St.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>',St}(se),xn=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.color="transparent",Lt.lineWidth=3,Lt.drawing=!1,Lt.pixelRatio=1,Lt.color=Rt.defaultColor,Lt.lineWidth=Rt.defaultStrokeWidth,Lt.pixelRatio=Rt.freehandPixelRatio,Lt.setColor=Lt.setColor.bind(Lt),Lt.addCanvas=Lt.addCanvas.bind(Lt),Lt.finishCreation=Lt.finishCreation.bind(Lt),Lt.setLineWidth=Lt.setLineWidth.bind(Lt),Lt.colorPanel=new Pt("Color",Rt.defaultColorSet,Rt.defaultColor),Lt.colorPanel.onColorChanged=Lt.setColor,Lt.lineWidthPanel=new le("Line width",Rt.defaultStrokeWidths,Rt.defaultStrokeWidth),Lt.lineWidthPanel.onWidthChanged=Lt.setLineWidth,Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},St.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var mt=fe.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,At){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(mt.x,mt.y),this.drawing=!0):Ft.prototype.pointerDown.call(this,mt,At)},St.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):Ft.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){Ft.prototype.resize.call(this,mt),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ft.prototype.pointerUp.call(this,mt)},St.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)},St.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ft.prototype.select.call(this)},St.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ft.prototype.deselect.call(this)},St.prototype.finishCreation=function(){for(var mt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),At=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Rt=At[0],Lt=At[1],ae=At[2],De=At[3],Oe=!1,Be=0;Be<this.canvasElement.height;Be++)for(var yn=0;yn<this.canvasElement.width;yn++)mt.data[Be*this.canvasElement.width*4+4*yn+3]>0&&(Oe=!0,Be<Lt&&(Lt=Be),yn<Rt&&(Rt=yn),Be>De&&(De=Be),yn>ae&&(ae=yn));if(Oe){this.left=Rt/this.pixelRatio,this.top=Lt/this.pixelRatio,this.width=(ae-Rt)/this.pixelRatio,this.height=(De-Lt)/this.pixelRatio;var Gn=document.createElement("canvas");Gn.width=ae-Rt,Gn.height=De-Lt,Gn.getContext("2d").putImageData(this.canvasContext.getImageData(Rt,Lt,ae-Rt,De-Lt),0,0),this.drawingImgUrl=Gn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},St.prototype.setDrawingImage=function(){fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},St.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},St.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},Ft.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){this.createVisual(),Ft.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At),this.setDrawingImage()},St.typeName="FreehandMarker",St.title="Freehand marker",St.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>',St}(se),Se=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,Rt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Lt.typeBoxes=[],Lt.currentType=At,Lt.setCurrentType=Lt.setCurrentType.bind(Lt),Lt}return Nt(St,Ft),St.prototype.getUi=function(){var mt=this,At=document.createElement("div");At.style.display="flex",At.style.overflow="hidden",At.style.flexGrow="2";for(var Rt=function(De){var Oe="both";switch(De){case 0:Oe="both";break;case 1:Oe="start";break;case 2:Oe="end";break;case 3:Oe="none"}var Be=document.createElement("div");if(Be.style.display="flex",Be.style.flexGrow="2",Be.style.alignItems="center",Be.style.justifyContent="space-between",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.borderColor=Oe===Lt.currentType?Lt.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){mt.setCurrentType(Oe,Be)}),At.appendChild(Be),Oe==="both"||Oe==="start"){var yn=document.createElement("div");yn.style.display="flex",yn.style.alignItems="center",yn.style.minHeight="20px",yn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,yn.style.marginLeft="5px",Be.appendChild(yn)}var Gn=document.createElement("div");Gn.style.display="flex",Gn.style.alignItems="center",Gn.style.minHeight="20px",Gn.style.flexGrow="2";var Kn=document.createElement("hr");if(Kn.style.minWidth="20px",Kn.style.border="0px",Kn.style.borderTop="3px solid "+(Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxColor:"#eeeeee"),Kn.style.flexGrow="2",Gn.appendChild(Kn),Be.appendChild(Gn),Oe==="both"||Oe==="end"){var Vn=document.createElement("div");Vn.style.display="flex",Vn.style.alignItems="center",Vn.style.minHeight="20px",Vn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Vn.style.marginRight="5px",Be.appendChild(Vn)}Lt.typeBoxes.push(Be)},Lt=this,ae=0;ae<4;ae++)Rt(ae);return At},St.prototype.setCurrentType=function(mt,At){var Rt=this;this.currentType=mt,this.typeBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===At?Rt.uiStyleSettings!==void 0?Rt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},St}(yt),Vt=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.arrowType="end",Lt.arrowBaseHeight=10,Lt.arrowBaseWidth=10,Lt.getArrowPoints=Lt.getArrowPoints.bind(Lt),Lt.setArrowType=Lt.setArrowType.bind(Lt),Lt.arrowTypePanel=new Se("Arrow type","end"),Lt.arrowTypePanel.onArrowTypeChanged=Lt.setArrowType,Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},St.prototype.getArrowPoints=function(mt,At){var Rt=this.arrowBaseWidth+2*this.strokeWidth,Lt=this.arrowBaseHeight+2*this.strokeWidth;return mt-Rt/2+","+(At+Lt/2)+" "+mt+","+(At-Lt/2)+" "+(mt+Rt/2)+","+(At+Lt/2)},St.prototype.createTips=function(){this.arrow1=fe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=fe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow2)},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.state==="creating"&&this.createTips()},St.prototype.adjustVisual=function(){if(Ft.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",fe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),fe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var mt=0;Math.abs(this.x1-this.x2)>.1&&(mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var At=this.arrow1.transform.baseVal.getItem(0);At.setRotate(mt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(At,0);var Rt=this.arrow2.transform.baseVal.getItem(0);Rt.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Rt,0)}},St.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},Ft.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Ft.prototype.restoreState.call(this,mt);var At=mt;this.arrowType=At.arrowType,this.createTips(),this.adjustVisual()},St.typeName="ArrowMarker",St.title="Arrow marker",St.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',St}(Qe),Xe=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.fillColor=Rt.defaultFillColor,Lt.strokeWidth=0,Lt.fillPanel=new Pt("Color",Rt.defaultColorSet,Rt.defaultFillColor),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt}return Nt(St,Ft),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Ft.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="CoverMarker",St.title="Cover marker",St.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',St}(Jt),Xn=function(Ft){function St(mt,At,Rt,Lt){var ae=Ft.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ae.opacities=[],ae.opacityBoxes=[],ae.opacities=At,ae.currentOpacity=Rt,ae.setCurrentOpacity=ae.setCurrentOpacity.bind(ae),ae}return Nt(St,Ft),St.prototype.getUi=function(){var mt=this,At=document.createElement("div");return At.style.display="flex",At.style.overflow="hidden",At.style.flexGrow="2",At.style.justifyContent="space-between",this.opacities.forEach(function(Rt){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.justifyContent="center",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.borderColor=Rt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentOpacity(Rt,Lt)}),At.appendChild(Lt);var ae=document.createElement("div");ae.innerText=100*Rt+"%",Lt.appendChild(ae),mt.opacityBoxes.push(Lt)}),At},St.prototype.setCurrentOpacity=function(mt,At){var Rt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===At?Rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},St}(yt),Bn=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.setOpacity=Lt.setOpacity.bind(Lt),Lt.fillColor=Rt.defaultHighlightColor,Lt.strokeWidth=0,Lt.opacity=Rt.defaultHighlightOpacity,Lt.fillPanel=new Pt("Color",Rt.defaultColorSet,Lt.fillColor),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt.opacityPanel=new Xn("Opacity",Rt.defaultOpacitySteps,Lt.opacity),Lt.opacityPanel.onOpacityChanged=Lt.setOpacity,Lt}return Nt(St,Ft),St.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Ft.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="HighlightMarker",St.title="Highlight marker",St.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>',St}(Xe),Ae='<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>',hn='<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>',bn=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.bgColor="transparent",Lt.tipPosition={x:0,y:0},Lt.tipBase1Position={x:0,y:0},Lt.tipBase2Position={x:0,y:0},Lt.tipMoving=!1,Lt.color=Rt.defaultStrokeColor,Lt.bgColor=Rt.defaultFillColor,Lt.fontFamily=Rt.defaultFontFamily,Lt.defaultSize={x:100,y:30},Lt.setBgColor=Lt.setBgColor.bind(Lt),Lt.getTipPoints=Lt.getTipPoints.bind(Lt),Lt.positionTip=Lt.positionTip.bind(Lt),Lt.setTipPoints=Lt.setTipPoints.bind(Lt),Lt.colorPanel=new Pt("Text color",Rt.defaultColorSet,Lt.color,Ae),Lt.colorPanel.onColorChanged=Lt.setColor,Lt.bgColorPanel=new Pt("Fill color",Rt.defaultColorSet,Lt.bgColor,hn),Lt.bgColorPanel.onColorChanged=Lt.setBgColor,Lt.fontFamilyPanel=new qe("Font",Rt.defaultFontFamilies,Rt.defaultFontFamily),Lt.fontFamilyPanel.onFontChanged=Lt.setFont,Lt.tipGrip=new zt,Lt.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),Lt.controlBox.appendChild(Lt.tipGrip.visual),Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return Ft.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},St.prototype.createTip=function(){fe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=fe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},St.prototype.pointerDown=function(mt,At){this.state==="new"&&Ft.prototype.pointerDown.call(this,mt,At),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(At)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ft.prototype.pointerDown.call(this,mt,At)},St.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ft.prototype.pointerUp.call(this,mt);else{var At=this.state==="creating";Ft.prototype.pointerUp.call(this,mt),this.setTipPoints(At),this.positionTip()}},St.prototype.manipulate=function(mt){if(this.tipMoving){var At=this.unrotatePoint(mt);this.tipPosition={x:At.x-this.manipulationStartLeft,y:At.y-this.manipulationStartTop},this.positionTip()}else Ft.prototype.manipulate.call(this,mt)},St.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",mt]]),fe.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},St.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},St.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var At=Math.min(this.height/2,15),Rt=this.height/5;mt&&(this.tipPosition={x:At+Rt/2,y:this.height+20});var Lt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Lt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Rt=this.width/5,At=Math.min(this.width/2,15),this.tipBase1Position={x:At,y:0},this.tipBase2Position={x:At+Rt,y:0}):(this.tipBase1Position={x:0,y:At},this.tipBase2Position={x:0,y:At+Rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Lt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Rt=this.width/5,At=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-At-Rt,y:0},this.tipBase2Position={x:this.width-At,y:0}):(this.tipBase1Position={x:this.width,y:At},this.tipBase2Position={x:this.width,y:At+Rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Lt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Rt=this.width/5,At=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-At-Rt,y:this.height},this.tipBase2Position={x:this.width-At,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-At-Rt},this.tipBase2Position={x:this.width,y:this.height-At}):Lt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Rt=this.width/5,At=Math.min(this.width/2,15),this.tipBase1Position={x:At,y:this.height},this.tipBase2Position={x:At+Rt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-At},this.tipBase2Position={x:0,y:this.height-At-Rt})},St.prototype.resize=function(mt){Ft.prototype.resize.call(this,mt),this.positionTip()},St.prototype.positionTip=function(){fe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var mt=this.tipGrip.visual.transform.baseVal.getItem(0);mt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(mt,0)},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),St.prototype.select=function(){this.positionTip(),Ft.prototype.select.call(this)},St.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ft.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var At=mt;this.bgColor=At.bgColor,this.tipPosition=At.tipPosition,Ft.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*At},this.positionTip()},St.typeName="CalloutMarker",St.title="Callout marker",St.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>',St}(vn),Jn=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.fillColor="transparent",Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.opacity=1,Lt.strokeColor=Rt.defaultColor,Lt.strokeWidth=Rt.defaultStrokeWidth,Lt.strokeDasharray=Rt.defaultStrokeDasharray,Lt.fillColor=Rt.defaultFillColor,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setFillColor=Lt.setFillColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.setOpacity=Lt.setOpacity.bind(Lt),Lt.createVisual=Lt.createVisual.bind(Lt),Lt.strokePanel=new Pt("Line color",Xt(Rt.defaultColorSet,["transparent"]),Rt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.fillPanel=new Pt("Fill color",Xt(Rt.defaultColorSet,["transparent"]),Lt.fillColor,hn),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt.strokeWidthPanel=new le("Line width",Rt.defaultStrokeWidths,Rt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Zt("Line style",Rt.defaultStrokeDasharrays,Rt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt.opacityPanel=new Xn("Opacity",Rt.defaultOpacitySteps,Lt.opacity),Lt.opacityPanel.onOpacityChanged=Lt.setOpacity,Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},St.prototype.createVisual=function(){this.visual=fe.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){Ft.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){Ft.prototype.resize.call(this,mt),this.setSize()},St.prototype.setSize=function(){Ft.prototype.setSize.call(this),fe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},St.prototype.pointerUp=function(mt){Ft.prototype.pointerUp.call(this,mt),this.setSize()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},St.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ft.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var At=mt;this.fillColor=At.fillColor,this.strokeColor=At.strokeColor,this.strokeWidth=At.strokeWidth,this.strokeDasharray=At.strokeDasharray,this.opacity=At.opacity,this.createVisual(),Ft.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At),this.setSize()},St.typeName="EllipseMarker",St.title="Ellipse marker",St.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>',St}(se),mn=function(Ft){function St(mt,At,Rt){return Ft.call(this,mt,At,Rt)||this}return Nt(St,Ft),Object.defineProperty(St.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},St.prototype.createTips=function(){this.tip1=fe.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=fe.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.tip2)},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.state==="creating"&&this.createTips()},St.prototype.adjustVisual=function(){if(Ft.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(fe.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),At=this.tip1.transform.baseVal.getItem(0);At.setRotate(mt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(At,0);var Rt=this.tip2.transform.baseVal.getItem(0);Rt.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Rt,0)}},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Ft.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Ft.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},St.typeName="MeasurementMarker",St.title="Measurement marker",St.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>',St}(Qe),ui=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.strokePanel.colors=Rt.defaultColorSet,Lt.fillColor="transparent",Lt}return Nt(St,Ft),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Ft.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="EllipseFrameMarker",St.title="Ellipse frame marker",St.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>',St}(Jn),Ce=function(){function Ft(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ft.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ft.prototype.addUndoStep=function(St){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(St)||(this.undoStack.push(St),JSON.stringify(this.lastRedoStep)!==JSON.stringify(St)&&this.redoStack.splice(0,this.redoStack.length))},Ft.prototype.replaceLastUndoStep=function(St){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=St)},Ft.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ft.prototype.undo=function(){if(this.undoStack.length>1){var St=this.undoStack.pop();return St!==void 0&&this.redoStack.push(St),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ft.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ft}(),ni=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.curveX=0,Lt.curveY=0,Lt.manipulationStartCurveX=0,Lt.manipulationStartCurveY=0,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.positionGrips=Lt.positionGrips.bind(Lt),Lt.addControlGrips=Lt.addControlGrips.bind(Lt),Lt.adjustVisual=Lt.adjustVisual.bind(Lt),Lt.setupControlBox=Lt.setupControlBox.bind(Lt),Lt.resize=Lt.resize.bind(Lt),Lt.strokeColor=Rt.defaultColor,Lt.strokeWidth=Rt.defaultStrokeWidth,Lt.strokeDasharray=Rt.defaultStrokeDasharray,Lt.strokePanel=new Pt("Line color",Rt.defaultColorSet,Rt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.strokeWidthPanel=new le("Line width",Rt.defaultStrokeWidths,Rt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Zt("Line style",Rt.defaultStrokeDasharrays,Rt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},St.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},St.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorCurve=fe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=fe.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=mt.x,this.curveY=mt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(At)&&(this.activeGrip=this.curveGrip,this._state="resize")},St.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),fe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setupControlBox=function(){Ft.prototype.setupControlBox.call(this),this.curveControlLine1=fe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=fe.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},St.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ft.prototype.addControlGrips.call(this)},St.prototype.positionGrips=function(){Ft.prototype.positionGrips.call(this);var mt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-mt/2,this.curveY-mt/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},St.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),Ft.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),Ft.prototype.resize.call(this,mt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},St.prototype.scale=function(mt,At){this.curveX=this.curveX*mt,this.curveY=this.curveY*At,Ft.prototype.scale.call(this,mt,At)},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ft.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Ft.prototype.restoreState.call(this,mt);var At=mt;this.strokeColor=At.strokeColor,this.strokeWidth=At.strokeWidth,this.strokeDasharray=At.strokeDasharray,this.curveX=At.curveX,this.curveY=At.curveY,this.createVisual(),this.adjustVisual()},St.typeName="CurveMarker",St.title="Curve marker",St.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>',St}(Ve),Pi=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,At,Rt)||this;return Lt.fillColor="transparent",Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.textColor="transparent",Lt.fontSize="1rem",Lt.isMoved=!1,Lt.captionText="Caption",Lt.PADDING=5,Lt.captionBoxWidth=0,Lt.captionBoxHeight=0,Lt.strokeColor=Rt.defaultColor,Lt.strokeWidth=Rt.defaultStrokeWidth,Lt.strokeDasharray=Rt.defaultStrokeDasharray,Lt.fillColor=Rt.defaultFillColor,Lt.textColor=Rt.defaultStrokeColor,Lt.fontFamily=Rt.defaultFontFamily,Lt.fontSize=Rt.defaultCaptionFontSize,Lt.captionText=Rt.defaultCaptionText,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setFillColor=Lt.setFillColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.createVisual=Lt.createVisual.bind(Lt),Lt.sizeCaption=Lt.sizeCaption.bind(Lt),Lt.setCaptionText=Lt.setCaptionText.bind(Lt),Lt.showTextEditor=Lt.showTextEditor.bind(Lt),Lt.positionTextEditor=Lt.positionTextEditor.bind(Lt),Lt.finishTextEditing=Lt.finishTextEditing.bind(Lt),Lt.setFont=Lt.setFont.bind(Lt),Lt.setTextColor=Lt.setTextColor.bind(Lt),Lt.strokePanel=new Pt("Line color",Xt(Rt.defaultColorSet,["transparent"]),Lt.strokeColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.fillPanel=new Pt("Fill color",Xt(Rt.defaultColorSet,["transparent"]),Lt.fillColor,hn),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt.strokeWidthPanel=new le("Line width",Rt.defaultStrokeWidths,Rt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Zt("Line style",Rt.defaultStrokeDasharrays,Rt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt.fontFamilyPanel=new qe("Font",Rt.defaultFontFamilies,Rt.defaultFontFamily),Lt.fontFamilyPanel.onFontChanged=Lt.setFont,Lt.textColorPanel=new Pt("Text color",Rt.defaultColorSet,Lt.textColor,Ae),Lt.textColorPanel.onColorChanged=Lt.setTextColor,Lt}return Nt(St,Ft),St.prototype.ownsTarget=function(mt){return!(!Ft.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},St.prototype.createVisual=function(){this.visual=fe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=fe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=fe.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=fe.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},St.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},St.prototype.pointerDown=function(mt,At){Ft.prototype.pointerDown.call(this,mt,At),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){Ft.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){Ft.prototype.resize.call(this,mt),this.setSize()},St.prototype.sizeCaption=function(){var mt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=mt.width+2*this.PADDING,this.captionBoxHeight=mt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),fe.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),fe.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},St.prototype.showTextEditor=function(){var mt=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(At){At.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(At){At.key==="Enter"&&mt.finishTextEditing(mt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(At){At.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},St.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"))},St.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},St.prototype.setFont=function(mt){this.captionElement&&fe.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},St.prototype.setTextColor=function(mt){this.captionElement&&fe.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},St.prototype.setSize=function(){Ft.prototype.setSize.call(this),fe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},St.prototype.pointerUp=function(mt){Ft.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.dblClick=function(mt,At){Ft.prototype.dblClick.call(this,mt,At),this.showTextEditor()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&fe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&fe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&fe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&fe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Ft.prototype.getState.call(this));return mt.typeName=this.typeName,mt},St.prototype.restoreState=function(mt){var At=mt;this.fillColor=At.fillColor,this.strokeColor=At.strokeColor,this.strokeWidth=At.strokeWidth,this.strokeDasharray=At.strokeDasharray,this.textColor=At.textColor,this.fontFamily=At.fontFamily,this.captionText=At.captionText,this.fontSize=At.fontSize,this.createVisual(),Ft.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,At){Ft.prototype.scale.call(this,mt,At),this.setSize()},St.typeName="CaptionFrameMarker",St.title="Caption frame marker",St.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>',St}(se),gn=function(){function Ft(St,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=St,this.cancelable=mt}return Object.defineProperty(Ft.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ft.prototype.preventDefault=function(){this._defaultPrevented=!0},Ft}(),Tn=function(Ft){function St(mt,At,Rt){var Lt=Ft.call(this,mt,!1)||this;return Lt.dataUrl=At,Lt.state=Rt,Lt}return Nt(St,Ft),St}(gn),pn=function(Ft){function St(mt,At,Rt){Rt===void 0&&(Rt=!1);var Lt=Ft.call(this,mt,Rt)||this;return Lt.marker=At,Lt}return Nt(St,Ft),St}(gn),Un=function(){function Ft(){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 Ft.prototype.addEventListener=function(St,mt){this[St].push(mt)},Ft.prototype.removeEventListener=function(St,mt){var At=this[St].indexOf(mt);At>-1&&this[St].splice(At,1)},Ft}(),On=function(){function Ft(St){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new me,this._isOpen=!1,this.undoRedoManager=new Ce,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 Un,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ft.instanceCounter++,this.styles=new et(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=St,this.targetRoot=document.body,this.width=St.clientWidth,this.height=St.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(Ft.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,xn,Vt,vn,ui,Jn,Bn,bn,mn,Xe,Qe,ni,Pi]},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,xn,Vt,vn,Jn,Bn,bn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,xn,Vt,vn,Bn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(St){var mt=this;this._availableMarkerTypes.splice(0),St.forEach(function(At){if(typeof At=="string"){var Rt=mt.ALL_MARKER_TYPES.find(function(Lt){return Lt.typeName===At});Rt!==void 0&&mt._availableMarkerTypes.push(Rt)}else mt._availableMarkerTypes.push(At)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(St){this._zoomLevel=St,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(Ft.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ft.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),xe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ft.prototype.show=function(){var St=this;this.styles.styleSheetRoot===void 0&&Bt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Bt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new gn(St))})},Ft.prototype.render=function(){return Le(this,void 0,void 0,function(){var St;return ve(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(St=new je).naturalSize=this.renderAtNaturalSize,St.imageType=this.renderImageType,St.imageQuality=this.renderImageQuality,St.markersOnly=this.renderMarkersOnly,St.width=this.renderWidth,St.height=this.renderHeight,[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},Ft.prototype.close=function(St){var mt=this;if(St===void 0&&(St=!1),this.isOpen){var At=!1;St||this.eventListeners.beforeclose.forEach(function(Rt){var Lt=new gn(mt,!0);Rt(Lt),Lt.defaultPrevented&&(At=!0)}),At||(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(Rt){return Rt(new gn(mt))}),this.detachEvents(),this._isOpen=!1)}},Ft.prototype.addMarkersToToolbar=function(){for(var St,mt=[],At=0;At<arguments.length;At++)mt[At]=arguments[At];(St=this._availableMarkerTypes).push.apply(St,mt)},Ft.prototype.addRenderEventListener=function(St){this.addEventListener("render",function(mt){St(mt.dataUrl,mt.state)})},Ft.prototype.removeRenderEventListener=function(St){},Ft.prototype.addCloseEventListener=function(St){this.addEventListener("close",function(){St()})},Ft.prototype.removeCloseEventListener=function(St){},Ft.prototype.setupResizeObserver=function(){var St=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){St.resize(St.target.clientWidth,St.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return St.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ft.prototype.onPopupTargetResize=function(){var St=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/St>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*St:this.editorCanvas.clientWidth,At=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/St;this.resize(mt,At)},Ft.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ft.prototype.resize=function(St,mt){this._isResizing=!0;var At=St/this.imageWidth,Rt=mt/this.imageHeight;this.imageWidth=Math.round(St),this.imageHeight=Math.round(mt),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(At,Rt),this._isResizing=!1},Ft.prototype.scaleMarkers=function(St,mt){var At,Rt=this;this._currentMarker&&this._currentMarker instanceof vn?this._currentMarker.scale(St,mt):(At=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Lt){Lt!==Rt._currentMarker&&Lt.scale(St,mt)}),At!==void 0&&this.setCurrentMarker(At)},Ft.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"},Ft.prototype.setTopLeft=function(){var St=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=St.left-mt.left,this.top=St.top-mt.top},Ft.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)},Ft.prototype.addDefs=function(){for(var St,mt=[],At=0;At<arguments.length;At++)mt[At]=arguments[At];this.defs=fe.createDefs(),this.addDefsToImage(),(St=this.defs).append.apply(St,mt)},Ft.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ft.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)},Ft.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ft.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ft.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)},Ft.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ft.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)},Ft.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 St=document.createElement("a");St.href="https://markerjs.com/",St.target="_blank",St.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>',St.title="Powered by marker.js",St.style.display="grid",St.style.alignItems="center",St.style.justifyItems="center",St.style.padding="3px",St.style.width="20px",St.style.height="20px",this.logoUI.appendChild(St),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ft.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")},Ft.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"},Ft.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ft.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 St=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=St+"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 lt(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 gt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ft.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ft.prototype.removeMarker=function(St){this.markerImage.removeChild(St.container),this.markers.indexOf(St)>-1&&this.markers.splice(this.markers.indexOf(St),1),St.dispose()},Ft.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())},Ft.prototype.toolbarButtonClicked=function(St,mt){if(St==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(St==="action")switch(mt){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Ft.prototype.deleteSelectedMarker=function(){var St=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Rt){var Lt=new pn(St,St._currentMarker,!0);Rt(Lt),Lt.defaultPrevented&&(mt=!0)}),!mt){var At=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(Rt){return Rt(new pn(St,At))})}}},Ft.prototype.clear=function(){var St=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ae){var De=new pn(St,void 0,!0);ae(De),De.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var At=function(ae){var De=Rt.markers[ae];Rt.setCurrentMarker(Rt.markers[ae]),Rt._currentMarker.dispose(),Rt.markerImage.removeChild(Rt._currentMarker.container),Rt.markers.splice(Rt.markers.indexOf(Rt._currentMarker),1),Rt.eventListeners.markerdelete.forEach(function(Oe){return Oe(new pn(St,De))})},Rt=this,Lt=this.markers.length-1;Lt>=0;Lt--)At(Lt);this.addUndoStep()}},Object.defineProperty(Ft.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ft.prototype.showNotesEditor=function(){var St;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=(St=this._currentMarker.notes)!==null&&St!==void 0?St:"",this.overlayContainer.appendChild(this.notesArea))},Ft.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)},Ft.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ft.prototype.addUndoStep=function(){var St=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var mt=this.getState(),At=this.undoRedoManager.getLastUndoStep();if(!At||At.width===mt.width&&At.height===mt.height){var Rt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),Rt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Lt){return Lt(new gn(St))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Lt){return Lt(new gn(St))})}},Ft.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ft.prototype.undoStep=function(){var St=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(At){return At(new gn(St))}))},Ft.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ft.prototype.redoStep=function(){var St=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(At){return At(new gn(St))}))},Ft.prototype.stepZoom=function(){var St=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=St<this.zoomSteps.length-1?this.zoomSteps[St+1]:this.zoomSteps[0]},Ft.prototype.panTo=function(St){this.contentDiv.scrollBy({left:this.prevPanPoint.x-St.x,top:this.prevPanPoint.y-St.y}),this.prevPanPoint=St},Ft.prototype.startRenderAndClose=function(){return Le(this,void 0,void 0,function(){var St,mt,At=this;return ve(this,function(Rt){switch(Rt.label){case 0:return[4,this.render()];case 1:return St=Rt.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Lt){return Lt(new Tn(At,St,mt))}),this.close(!0),[2]}})})},Ft.prototype.getState=function(St){St===!0&&this.setCurrentMarker();var mt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(At){return mt.markers.push(At.getState())}),mt},Ft.prototype.restoreState=function(St){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);St.markers.forEach(function(At){var Rt=mt._availableMarkerTypes.find(function(ae){return ae.typeName===At.typeName});if(Rt!==void 0){var Lt=mt.addNewMarker(Rt);Lt.restoreState(At),mt.markers.push(Lt)}}),St.width&&St.height&&(St.width!==this.imageWidth||St.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/St.width,this.imageHeight/St.height),this.eventListeners.restorestate.forEach(function(At){return At(new gn(mt))})},Ft.prototype.addNewMarker=function(St){var mt=fe.createGroup();return this.markerImage.appendChild(mt),new St(mt,this.overlayContainer,this.settings)},Ft.prototype.createNewMarker=function(St){var mt,At=this;(mt=typeof St=="string"?this._availableMarkerTypes.find(function(Rt){return Rt.typeName===St}):St)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(mt),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(mt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Rt){return Rt(new pn(At,At._currentMarker))}))},Ft.prototype.markerCreated=function(St){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(St),this.setCurrentMarker(St),St instanceof xn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(xn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(At){return At(new pn(mt,mt._currentMarker))})},Ft.prototype.colorChanged=function(St){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=St,this.settings.defaultStrokeColor=St)},Ft.prototype.fillColorChanged=function(St){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=St)},Ft.prototype.markerStateChanged=function(St){var mt=this;this.eventListeners.markerchange.forEach(function(At){return At(new pn(mt,St))})},Ft.prototype.setCurrentMarker=function(St){var mt=this;this._currentMarker!==St&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(At){return At(new pn(mt,mt._currentMarker))})),this._currentMarker=St,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(At){return At(new pn(mt,mt._currentMarker))}))},Ft.prototype.onPointerDown=function(St){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||St.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var mt=this.markers.find(function(At){return At.ownsTarget(St.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(St.clientX,St.clientY),St.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:St.clientX,y:St.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(St.clientX,St.clientY))},Ft.prototype.onDblClick=function(St){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(At){return At.ownsTarget(St.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(St.clientX,St.clientY),St.target):this.setCurrentMarker()}},Ft.prototype.onPointerMove=function(St){this.touchPoints!==1&&St.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||St.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(St.clientX,St.clientY)):this.zoomLevel>1&&this.panTo({x:St.clientX,y:St.clientY}))},Ft.prototype.onPointerUp=function(St){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(St.clientX,St.clientY)),this.isDragging=!1,this.addUndoStep()},Ft.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ft.prototype.onKeyUp=function(St){this._currentMarker===void 0||this.notesArea!==void 0||St.key!=="Delete"&&St.key!=="Backspace"||this.deleteSelectedMarker()},Ft.prototype.clientToLocalCoordinates=function(St,mt){var At=this.markerImage.getBoundingClientRect();return{x:(St-At.left)/this.zoomLevel,y:(mt-At.top)/this.zoomLevel}},Ft.prototype.onWindowResize=function(){this.positionUI()},Ft.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var St=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=St+"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()},Ft.prototype.addLicenseKey=function(St){xe.addKey(St)},Ft.prototype.addEventListener=function(St,mt){this.eventListeners.addEventListener(St,mt)},Ft.prototype.removeEventListener=function(St,mt){this.eventListeners.removeEventListener(St,mt)},Ft.prototype.renderState=function(St){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(St),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ft.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ft.prototype.focus=function(){var St=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(mt){return mt(new gn(St))}))},Ft.prototype.blur=function(){var St=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new gn(St))}))},Ft.instanceCounter=0,Ft}(),we=bt(99064),In=bt(955),rn=(Ft,St,mt)=>new Promise((At,Rt)=>{var Lt=Oe=>{try{De(mt.next(Oe))}catch(Be){Rt(Be)}},ae=Oe=>{try{De(mt.throw(Oe))}catch(Be){Rt(Be)}},De=Oe=>Oe.done?At(Oe.value):Promise.resolve(Oe.value).then(Lt,ae);De((mt=mt.apply(Ft,St)).next())}),oe=({data:Ft,className:St,fullWidth:mt,style:At={},onClose:Rt,onOk:Lt,showFullTools:ae,noAssociationId:De})=>{const Oe=(0,wt.useRef)(null),Be=(0,wt.useRef)(null),yn=(0,wt.useRef)(null),Gn=(0,wt.useRef)(null),[Kn,Vn]=(0,wt.useState)(!1),[gi,Ti]=(0,wt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,wt.useEffect)(()=>(yn.current||(yn.current=document.createElement("style"),document.head.appendChild(yn.current)),Ft!=null&&Ft.visible?(document.body.setAttribute("data-custom","y-hidden"),yn.current.innerHTML=" html { overflow-y: hidden; }",Ft!=null&&Ft.src&&Xi()):(document.body.removeAttribute("data-custom"),yn.current&&(document.head.removeChild(yn.current),yn.current=null)),()=>{document.body.removeAttribute("data-custom"),yn.current&&(document.head.removeChild(yn.current),yn.current=null)}),[Ft==null?void 0:Ft.visible]);const Xi=()=>rn(void 0,null,function*(){Vn(!0),Ti("\u6B63\u5728\u52A0\u8F7D\u4E2D");const co=yield(0,In.ZJ)(Ft==null?void 0:Ft.src);Oe.current.src="",Oe.current.src=co,Oe.current.onload=function(){Oo()},Vn(!1),Ti("")}),Mo=co=>rn(void 0,null,function*(){Vn(!0),Ti("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Do=yield(0,we.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Ft.title,file:co.dataUrl}});Do!=null&&Do.id&&!De?(yield(0,we.ZP)(`/api/attachments/${Ft.id}/add_subitem.json`,{method:"post",body:{subitem_id:Do==null?void 0:Do.id,settings:JSON.stringify(co.state)}})).status===0&&Lt():Do!=null&&Do.id&&Lt(Do),Vn(!1),Ti("")}),Io=()=>{const co=document.querySelector('a[href="https://markerjs.com/"]');co&&co.parentNode&&(co.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(Qo=>{const Ai=document.querySelector(Qo.name);Ai&&Ai.setAttribute("title",Qo.title)})},Oo=()=>{Be.current=new On(Oe.current),Be.current.targetRoot=Gn.current,Be.current.addEventListener("render",Mo),Be.current.addEventListener("beforeclose",Rt),ae&&(Be.current.availableMarkerTypes=Be.current.ALL_MARKER_TYPES,Be.current.uiStyleSettings.redoButtonVisible=!0,Be.current.uiStyleSettings.notesButtonVisible=!0,Be.current.uiStyleSettings.zoomButtonVisible=!0,Be.current.uiStyleSettings.zoomOutButtonVisible=!0,Be.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Be.current.uiStyleSettings,Be.current.show(),Ft!=null&&Ft.snapshotData&&Be.current.restoreState(Ft.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Io()},300)};return wt.createElement(wt.Fragment,null,(Ft==null?void 0:Ft.visible)&&wt.createElement(te.Z,{spinning:Kn,tip:gi,style:{position:"absolute",width:"100vw"}},wt.createElement("div",{ref:Gn,className:Ie()(ee.imageDimensions,St,mt?ee.fullWidth:""),style:At},wt.createElement("img",{className:ee.img,ref:Oe}))))}},41588:function(dn,Mn,bt){"use strict";var wt=bt(59301),ee=bt(95237),he=bt(43604),Ie=bt(99313),te=bt(3113),Pe=bt(85149),Nt=bt(88010),Le=bt(48136),ve=bt(59301);const Xt=(0,wt.forwardRef)(({callback:fe,showSaveButton:xe,value:je=""},Bt)=>{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:ve.createElement(ee.Z,{className:Nt.Z.lists,gutter:[10,10]},nt.map((Pt,Tt)=>ve.createElement(he.Z,{flex:"110px",className:Nt.Z.item},ve.createElement("div",null,ve.createElement(Pe.Z,{value:`$$${Pt.value}$$`}),Pt.name),ve.createElement("div",{className:Nt.Z.children},Pt.children.map((It,zt)=>ve.createElement("div",{key:zt},ve.createElement("h1",null,It.name),ve.createElement(ee.Z,{gutter:[10,10]},It.data.map((_t,se)=>ve.createElement(he.Z,{key:se,onClick:()=>lt(_t),className:Nt.Z.diamond},ve.createElement(Pe.Z,{value:"`$$"+_t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ve.createElement(ee.Z,{className:Nt.Z.lists,gutter:[10,10]},ht.map((Pt,Tt)=>ve.createElement(he.Z,{flex:"110px",className:Nt.Z.item},ve.createElement("div",null,ve.createElement(Pe.Z,{value:"`$$"+Pt.value+"$$`"}),Pt.name),ve.createElement("div",{className:Nt.Z.children},Pt.children.map((It,zt)=>ve.createElement("div",{key:zt},It.name&&ve.createElement("h1",null,It.name),ve.createElement(ee.Z,{gutter:[10,10]},It.data.map((_t,se)=>ve.createElement(he.Z,{key:se,onClick:()=>lt(_t),className:Nt.Z.diamond},ve.createElement(Pe.Z,{value:"`$$"+_t.value+"$$`"}))))))))))}],yt=()=>{var Pt=document.createElement("div");Pt.innerHTML=et.current.getValue();var Tt=Pt.innerText;return fe&&fe(Tt),Tt};return(0,wt.useImperativeHandle)(Bt,()=>({getData:yt})),ve.createElement("div",{className:Nt.Z.mathWrap},ve.createElement(Ie.default,{defaultActiveKey:"1",items:gt}),ve.createElement("math-field",{locale:"zh_cn",className:Nt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},je||""),xe&&ve.createElement("div",{className:Nt.Z.button},ve.createElement(te.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Mn.Z=Xt},8797:function(dn,Mn,bt){"use strict";var wt=bt(59301),ee=bt(93314),he=bt(3113),Ie=Object.defineProperty,te=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Xt=(Bt,et,nt)=>et in Bt?Ie(Bt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Bt[et]=nt,fe=(Bt,et)=>{for(var nt in et||(et={}))Le.call(et,nt)&&Xt(Bt,nt,et[nt]);if(Nt)for(var nt of Nt(et))ve.call(et,nt)&&Xt(Bt,nt,et[nt]);return Bt},xe=(Bt,et)=>te(Bt,Pe(et));const je=({img:Bt,buttonProps:et={},styles:nt={},customText:ht,ButtonText:lt,ButtonClick:gt,Buttonclass:yt,ButtonTwo:Pt,imgStyles:Tt,loading:It=!1,className:zt=""})=>wt.createElement("section",{className:`tc animated fadeIn ${zt}`,style:fe({color:"#999",margin:"100px auto",visibility:It?"hidden":"visible"},nt)},wt.createElement("img",{src:Bt||ee,style:xe(fe({},Tt),{pointerEvents:"none",userSelect:"none"})}),wt.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&wt.createElement(he.ZP,fe({className:yt,onClick:gt},et),lt),Pt&&Pt);Mn.Z=je},23210:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return yt}});var wt=bt(59301),ee={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},he=bt(3113),Ie=bt(70557),te=bt(23954),Pe=bt(6848),Nt=bt(955),Le=bt(94941),ve=bt(8797),Xt=bt(3294),fe=bt(19381),xe=bt(59301),je=Object.defineProperty,Bt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(Pt,Tt,It)=>Tt in Pt?je(Pt,Tt,{enumerable:!0,configurable:!0,writable:!0,value:It}):Pt[Tt]=It,lt=(Pt,Tt)=>{for(var It in Tt||(Tt={}))et.call(Tt,It)&&ht(Pt,It,Tt[It]);if(Bt)for(var It of Bt(Tt))nt.call(Tt,It)&&ht(Pt,It,Tt[It]);return Pt},gt=(Pt,Tt,It)=>new Promise((zt,_t)=>{var se=Zt=>{try{le(It.next(Zt))}catch(Fe){_t(Fe)}},Jt=Zt=>{try{le(It.throw(Zt))}catch(Fe){_t(Fe)}},le=Zt=>Zt.done?zt(Zt.value):Promise.resolve(Zt.value).then(se,Jt);le((It=It.apply(Pt,Tt)).next())}),yt=({editOffice:Pt="view",data:Tt,theme:It,type:zt,filename:_t,monacoEditor:se,className:Jt,style:le,close:Zt,onClose:Fe,hasMask:me,disabledDownload:Ve,onImgDimensions:Qe,showNodata:qe,recordInfo:vn})=>{const[xn,Se]=(0,wt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Vt,Xe]=(0,wt.useState)(""),[Xn,Bn]=(0,wt.useState)(),Ae=window.ENV==="build"?"/react/build":"",hn=location.host.startsWith("localhost")?Xt.Z.PROXY_SERVER:Xt.Z.API_SERVER,Jn=10*(1024*1024),mn=(0,wt.useRef)();Tt!=null&&Tt.startsWith("/api")&&zt!=="txt"&&(Tt=Xt.Z.API_SERVER+Tt);const ui=gn=>gn.substring(gn.lastIndexOf("/")+1).split(".").pop();_t&&se&&(se.filename=_t),(0,wt.useEffect)(()=>{var gn,Tn;const pn=(Tn=(gn=document.cookie)==null?void 0:gn.replace(/\s/g,""))==null?void 0:Tn.split(";");pn==null||pn.map(Un=>{let On=Un.split("=");On[0]==="_educoder_session"&&Xe(On[1])})},[]),(0,wt.useEffect)(()=>{zt==="office"&&(Tt.indexOf("bigfilescdn.")>-1||Tt.indexOf("bigfiles1")>-1?Bn({url:Tt,fileType:ui(Tt),model:Tt.indexOf("model=edit")?"edit":"view"}):Ce())},[zt,Tt]);const Ce=()=>gt(void 0,null,function*(){console.log("data:",Tt);let gn=Tt;Tt.startsWith("http")||(gn=location.origin+gn);let Tn=new URL(gn).pathname.split("/").pop();const pn=yield(0,Le.gJ)({attachment_id:Tn});pn.url=hn+pn.url,Bn(pn)}),ni=()=>{if(Tt.startsWith("http")||Tt.startsWith("blob:")){Pi();return}(0,Nt.Sv)(_t||"educoder",Tt,_t)},Pi=()=>{vn&&(0,fe.fc)({id:vn==null?void 0:vn.id,watch_type:1,course_id:vn==null?void 0:vn.course_id}),(0,Nt.Nd)(_t||"educoder",decodeURIComponent(Tt))};return xe.createElement("div",{style:lt({},le||{}),className:`${me&&ee.bgBlack} ${zt?ee.wrp:"hide"}`},Zt&&xe.createElement("div",{className:ee.close,ref:mn},!!Qe&&xe.createElement(Pe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>mn.current},xe.createElement("span",{onClick:()=>{Fe(),Qe()}},xe.createElement("i",{className:"icon-yulanpizhu"}))),!Ve&&xe.createElement(Pe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>mn.current},xe.createElement("span",{onClick:Pi},xe.createElement("i",{className:"icon-quxiaozhiding"}))),xe.createElement(Pe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>mn.current},xe.createElement("span",{className:"",onClick:Fe},xe.createElement("i",{className:"icon-guanbi1"})))),xe.createElement("div",{className:`${ee[Jt]} ${Jt} ${ee.monaco} ${zt==="txt"?"show":"hide"}`},zt==="txt"&&xe.createElement(xe.Fragment,null,xe.createElement(te.ZP,lt({},se)))),zt==="audio"&&xe.createElement("audio",{src:`${(Tt==null?void 0:Tt.indexOf("http://"))>-1||(Tt==null?void 0:Tt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Tt}`,autoPlay:!0}),zt==="video"&&xe.createElement(xe.Fragment,null,(Tt==null?void 0:Tt.indexOf("http"))>-1?xe.createElement("video",{controls:!0,src:`${Tt}`,autoPlay:!0}):xe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Tt}`,autoPlay:!0})),zt==="office"&&Xn&&xe.createElement("iframe",{src:`${Ae}/office.html?key=${Xn.key}&url=${btoa(Xn.url)}&callbackUrl=${hn+(Xn.callbackUrl||"")}&fileType=${Xn.fileType}&title=${Xn.title||""}&model=${Pt}&officeServer=${Xt.Z.ONLYOFFICE}&disabledDownload=${!!Ve}`}),zt==="html"&&xe.createElement("iframe",{src:Tt+"&disposition=inline"}),zt==="pdf"&&xe.createElement("iframe",{src:`${Ae}/js/pdfview/index.html?filename=${_t||"educoder.pdf"}&url=${encodeURIComponent(Tt)}&disabledDownload=${!!Ve}`}),zt==="image"&&xe.createElement("img",{src:`${(Tt==null?void 0:Tt.indexOf("http://"))>-1||(Tt==null?void 0:Tt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Tt}`}),(zt==="other"||zt==="download")&&xe.createElement(xe.Fragment,null,qe?xe.createElement(ve.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:xe.createElement(he.ZP,{icon:xe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ni,disabled:Ve},"\u4E0B\u8F7D")}):xe.createElement(he.ZP,{type:"primary",size:"middle",onClick:ni,disabled:Ve},xe.createElement(Ie.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(dn,Mn,bt){"use strict";bt.d(Mn,{z:function(){return zt},Z:function(){return _t}});var wt=bt(59301),ee=bt(50304),he=bt(24768),Ie=bt(64018),te=bt(65157),Pe=bt(3294),Nt=bt(955),Le=bt(15342),ve=bt(1012),Xt=bt(23210),fe=bt(59301),je=({html:se})=>{const Jt=(0,wt.useRef)(null),le=(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 Fe=Jt.current.attachShadow({mode:"open"});le.current=document.createElement("div"),le.current.className="markdown-body",le.current.innerHTML=se,Fe.appendChild(le.current);const me=document.createElement("style");return me.textContent=Zt,Fe.appendChild(me),()=>{Fe.innerHTML=""}},[]),(0,wt.useEffect)(()=>{le.current&&(le.current.innerHTML=se)},[se]),fe.createElement("div",{ref:Jt})},Bt=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,lt=(se,Jt,le)=>Jt in se?Bt(se,Jt,{enumerable:!0,configurable:!0,writable:!0,value:le}):se[Jt]=le,gt=(se,Jt)=>{for(var le in Jt||(Jt={}))nt.call(Jt,le)&<(se,le,Jt[le]);if(et)for(var le of et(Jt))ht.call(Jt,le)&<(se,le,Jt[le]);return se};const yt="@\u2581\u2581@",Pt="@\u2581@",Tt=/<pre[^>]*>/g;function It(se){let Jt=document.createElement("div");return Jt.innerHTML=se,Jt.childNodes.length===0?"":Jt.childNodes[0].nodeValue}const zt=(se,Jt)=>{se=se||"";const le=/(?: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,Fe=/\(\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 Jt?se.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(le,(Ve,Qe,qe,vn,xn,Se,Vt)=>{const Xe=Qe||vn||Se,Xn=qe||xn||Vt||"?";return Pe.Z.API_SERVER+"/api/attachments/"+Xe+Xn+"&t="+(0,Nt.Jn)(Xe,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(se=se.replace(me,(Ve,Qe,qe,vn,xn,Se,Vt)=>{const Xe=Qe||vn||Se,Xn=qe||xn||Vt||"?";return Pe.Z.API_SERVER+"/attachments/download/"+Xe+Xn+"&t="+(0,Nt.Jn)(Xe,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(le,(Ve,Qe,qe,vn,xn,Se,Vt)=>{const Xe=Qe||vn||Se,Xn=qe||xn||Vt||"?";return Pe.Z.API_SERVER+"/api/attachments/"+Xe+Xn+"&t="+(0,Nt.Jn)(Xe,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(Zt,(Ve,Qe,qe,vn,xn)=>{const Se=Qe||vn,Vt=qe||xn||"";return'"'+Pe.Z.API_SERVER+"/api/attachments/"+Se+Vt+Se+Vt+"&t="+(0,Nt.Jn)(Se,Date.now())}).replace(Fe,(Ve,Qe,qe,vn,xn)=>{const Se=Qe||vn,Vt=qe||xn||"";return"("+Pe.Z.API_SERVER+"/files/uploads/"+Se+Vt+Se+Vt+"&t="+(0,Nt.Jn)(Se,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:Jt,showTextOnly:le,showLines:Zt,style:Fe={},stylesPrev:me={},highlightKeywords:Ve,showProgramFill:Qe,isProgramFill:qe,disabledFill:vn=!1,programFillValue:xn,onFillChange:Se=Xn=>{},onFillBlur:Vt=()=>{},onFillFocus:Xe=()=>{}})=>{let Xn=String(se);const[Bn,Ae]=(0,wt.useState)(""),[hn,bn]=(0,wt.useState)("office"),[Jn,mn]=(0,wt.useState)([]),ui=(0,wt.useRef)("a"+(0,ve.Z)()),Ce={},ni=(Ft,St,mt)=>{const At=document.createElement(Ft===Pt?"input":"textarea");At.style.width="100%",At.style.height=Ft===Pt?"40px":"151px",At.rows=5,At.spellcheck=!1,At.name="edu-program-fill",At.placeholder="\u8BF7\u8F93\u5165",At.dataset.id=St;const Rt=Object.keys(Ce).length;return Ce[Rt]=At,`<span class="edu-program-fill-wrap ${Ft===Pt?"":"show"}" style="width:${Ft===Pt?"400px":"100%"}" title=${mt||""}><span>${At.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Pi(Ft){return Ft=Ft.replace(/!\[.*?\]\(.*?\)/g,""),Ft=Ft.replace(/\[.*?\]\(.*?\)/g,""),Ft=Ft.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ft=Ft.replace(/<embed.*?>/g,""),Ft=Ft.replace(/<img.*?>/g,""),Ft=Ft.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ft=Ft.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ft=Ft.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ft=Ft.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ft}const gn=Ft=>Ft.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(St,mt){let At=mt.replace(/(\n|\r)/g,"").split("}"),Rt=[];return At.map(Lt=>{Lt!=""&&Rt.push(`.${ui.current} ${Lt}`)}),`<style>${Rt.join("}")}</style>`}),Tn=(0,wt.useMemo)(()=>{try{const At=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Rt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Lt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,ae=/\(\/attachments\/download\//g;Xn=Xn.replace(ae,"("+Pe.Z.API_SERVER+"/attachments/download/").replace(At,"("+Pe.Z.API_SERVER+"/api/attachments/").replace(Rt,'"'+Pe.Z.API_SERVER+"/api/attachments/").replace(Lt,'"'+Pe.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(At){}if(Qe){let At=-1;return Xn=Xn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Rt,Lt,ae){var De;return++At,ni(Rt,At,(De=xn==null?void 0:xn[At])==null?void 0:De.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${gn(Xn||"")}</pre>`}let Ft=gn(Xn);Ft=(0,he.ZP)(Ft);const St=(0,he.ez)();Xn.match(/\[TOC\]/)&&(Ft=Ft.replace("<p>[TOC]</p>",(0,he.Qv)()),(0,he.Iy)()),Ft=Ft.replace(/(__special_katext_id_\d+__)/g,(At,Rt)=>{const{type:Lt,expression:ae}=St[Rt];return(0,Le.renderToString)(It(ae)||"",{displayMode:Lt==="block",throwOnError:!1,output:"html"})}),Ft=Ft.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,he.AL)();const mt=document.createElement("div");if(mt.innerHTML=Ft,le)return mt.innerText;if(Ve){const At=Ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return we(mt,At),mt.innerHTML}return setTimeout(()=>ge(),500),mt.innerHTML},[Xn,Ve]);(0,wt.useEffect)(()=>{In.current&&In.current.querySelectorAll(["input","textarea"]).forEach(St=>{St.oninput=pn,St.onblur=Un,St.onfocus=On})},[Jn]),(0,wt.useEffect)(()=>{var Ft,St,mt,At,Rt;if(xn!=null&&xn.length)try{const Lt=In.current.querySelectorAll(".edu-program-fill-score"),ae=In.current.querySelectorAll('[name="edu-program-fill"]');for(const[De,Oe]of ae.entries())Oe.value=((Ft=xn==null?void 0:xn[De])==null?void 0:Ft.value)||"",((St=xn==null?void 0:xn[De])==null?void 0:St.type)==="warning"?Oe.className="program-fill-warning":((mt=xn==null?void 0:xn[De])==null?void 0:mt.type)==="success"?Oe.className="program-fill-success":Oe.className="";for(const[De,Oe]of Lt.entries())Oe.innerHTML=(At=xn==null?void 0:xn[De])!=null&&At.score?`${(Rt=xn==null?void 0:xn[De])==null?void 0:Rt.score}\u5206`:"";mn(xn)}catch(Lt){console.log(Lt,"error")}},[xn]);const pn=Ft=>{Jn[Ft.target.dataset.id]=Jn[Ft.target.dataset.id]||{},Jn[Ft.target.dataset.id].value=Ft.target.value,mn([...Jn]),Se(Jn,Ft.target.dataset.id)},Un=Ft=>{Jn[Ft.target.dataset.id]=Jn[Ft.target.dataset.id]||{},Jn[Ft.target.dataset.id].value=Ft.target.value,mn([...Jn]),Vt(Jn,Ft.target.dataset.id)},On=Ft=>{Jn[Ft.target.dataset.id]=Jn[Ft.target.dataset.id]||{},Jn[Ft.target.dataset.id].value=Ft.target.value,mn([...Jn]),Xe(Jn,Ft.target.dataset.id)};function we(Ft,St){return Ft.childNodes.forEach(mt=>{var At;if(mt.childNodes.length>0)we(mt,St);else if(mt.nodeName!=="IMG")if(mt.innerHTML)mt.innerHTML=(At=mt.innerHTML)==null?void 0:At.replace(new RegExp(St,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Rt=document.createElement("span");Rt.innerHTML=mt.textContent.replace(new RegExp(St,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),mt.replaceWith(Rt)}})}const In=(0,wt.useRef)();he.jb.WebkitLineClamp=Zt,Zt&&(Fe=gt(gt({},Fe),he.jb));function rn(Ft){let St=Ft.target;if(St.tagName.toUpperCase()==="A"){let mt=St.getAttribute("href");if(mt.indexOf("office")>-1)Ft.preventDefault(),Ae(mt),bn("office");else if(mt.indexOf("application/pdf")>-1)Ft.preventDefault(),Ae(mt),bn("pdf");else if(mt.indexOf("text/html")>-1)Ft.preventDefault(),Ae(mt),bn("html");else if(mt.startsWith("#")){Ft.preventDefault();let At=document.getElementById(mt.replace("#",""));At&&At.scrollIntoView(!0)}}}const ge=()=>{var Ft;const St=(Ft=In.current)==null?void 0:Ft.querySelectorAll("video");St==null||St.forEach(mt=>{if(mt.oncontextmenu=()=>!1,mt.src.indexOf(".m3u8")>-1&&!mt.canPlayType("application/vnd.apple.mpegurl")){if(te.ZP.isSupported()){var At=new te.ZP;At.loadSource(mt.src),At.attachMedia(mt)}}})};(0,wt.useEffect)(()=>{if(In.current&&Tn&&Tn.match(Tt)&&window.PR.prettyPrint(),In.current)return In.current.addEventListener("click",rn),()=>{var Ft;(Ft=In.current)==null||Ft.removeEventListener("click",rn),(0,he.AL)(),(0,he.Iy)()}},[Tn,In.current,rn]),(0,wt.useEffect)(()=>{var Ft;const St=mt=>{mt.preventDefault(),mt.clipboardData.setData("text",window.getSelection().toString())};return(Ft=In.current)==null||Ft.addEventListener("copy",St),()=>{var mt;(mt=In.current)==null||mt.removeEventListener("copy",St)}},[In.current]);const oe=Ft=>/<style[\s\S]*?>/i.test(Ft||"");return wt.createElement(wt.Fragment,null,le&&wt.createElement("div",{ref:In},Tn),!le&&!oe(Tn)&&wt.createElement("div",{ref:In,style:gt({},Fe),className:`${Jt||""} ${vn?"disabled-fill":""} markdown-body ${ui.current}`,dangerouslySetInnerHTML:{__html:Tn}}),!le&&oe(Tn)&&wt.createElement(je,{html:Tn}),wt.createElement(Xt.Z,{close:!0,data:Bn,type:Bn!=null&&Bn.length?hn:"",style:gt({},me),onClose:()=>Ae("")}))}},53932:function(dn,Mn,bt){"use strict";bt.d(Mn,{h:function(){return Pt},Z:function(){return yt}});var wt=bt(59301),ee=bt(57809),he=bt(78241),Ie=bt(3113),te=bt(89780),Pe=bt.n(te),Nt=bt(37036),Le=Object.defineProperty,ve=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Bt=(Tt,It,zt)=>It in Tt?Le(Tt,It,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Tt[It]=zt,et=(Tt,It)=>{for(var zt in It||(It={}))xe.call(It,zt)&&Bt(Tt,zt,It[zt]);if(fe)for(var zt of fe(It))je.call(It,zt)&&Bt(Tt,zt,It[zt]);return Tt},nt=(Tt,It)=>ve(Tt,Xt(It));const ht=ee.default.Option,lt={labelCol:{span:4},wrapperCol:{span:20}},gt={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"]};var yt=({callback:Tt,onCancel:It})=>{const[zt,_t]=(0,wt.useState)("python");function se(le){_t(gt[le][1])}function Jt(le){Tt(le)}return wt.createElement(he.default,nt(et({},lt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Jt,style:{width:500}}),wt.createElement(he.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},wt.createElement(ee.default,{getPopupContainer:le=>le.parentNode,onChange:se},Object.keys(gt).map(le=>wt.createElement(ht,{key:le,value:le},gt[le][0])))),wt.createElement(he.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},wt.createElement(Pt,{mode:zt})),wt.createElement("div",{className:"flex-container flex-end"},wt.createElement(Ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),wt.createElement(Ie.ZP,{type:"ghost",onClick:It},"\u53D6\u6D88")))};function Pt({value:Tt,onChange:It,mode:zt,options:_t={}}){const se=(0,wt.useRef)(),[Jt,le]=(0,wt.useState)();return(0,wt.useEffect)(()=>{if(Jt){let Zt=function(Fe){const me=Fe.getValue();It&&It(me)};return Jt.on("change",Zt),()=>{Jt.off("change",Zt)}}},[Jt,It]),(0,wt.useEffect)(()=>{Jt&&Jt.setOption("mode",zt)},[Jt,zt]),(0,wt.useEffect)(()=>{Jt&&(Tt!==Jt.getValue()||Tt==="")&&setTimeout(()=>{Jt.setValue(Tt||"")},300)},[Jt,Tt]),(0,wt.useEffect)(()=>{if(se.current&&!Jt){const Zt=Pe().fromTextArea(se.current,et({mode:zt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_t));le(Zt)}},[se.current,Jt]),wt.createElement("div",{className:"my-codemirror-container"},wt.createElement("textarea",{ref:se}))}},12290:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return si}});var wt=bt(59301),ee=bt(89780),he=bt.n(ee),Ie=bt(76374),te=bt(37036),Pe=bt(6313),Nt=bt(25717),Le=bt(99498),ve=bt(25419),Xt=bt(67549),fe=bt(85149),xe=({value:Te="",className:Ee,showTextOnly:Wt,showLines:Ge,style:Ue={}})=>{const ue=(0,wt.useMemo)(()=>"",[Te]);return wt.createElement(wt.Fragment,null,wt.createElement("div",{dangerouslySetInnerHTML:{__html:ue}}))},je=bt(59301),Bt=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(Te,Ee,Wt)=>Ee in Te?Bt(Te,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Te[Ee]=Wt,Pt=(Te,Ee)=>{for(var Wt in Ee||(Ee={}))lt.call(Ee,Wt)&&yt(Te,Wt,Ee[Wt]);if(ht)for(var Wt of ht(Ee))gt.call(Ee,Wt)&&yt(Te,Wt,Ee[Wt]);return Te},Tt=(Te,Ee)=>et(Te,nt(Ee));let It=[{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 zt({onActionCallback:Te,title:Ee,icon:Wt,actionName:Ge,className:Ue="",children:ue}){function qt(){Te(Ge)}return je.createElement("a",{title:Ee,className:Ue,onClick:qt},je.createElement("i",{className:`${Wt}`}),ue)}var _t=({watch:Te,showNullButton:Ee,showNullProgramButton:Wt,onActionCallback:Ge,fullScreen:Ue,insertTemp:ue,hidetoolBar:qt,extraUse:ze})=>{const sn=[...It,{title:`${Te?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Te?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return je.createElement("ul",{className:"markdown-toolbar-container"},!qt&&sn.map((Ln,Nn)=>je.createElement("li",{key:Nn},Ln.actionName?je.createElement(zt,Tt(Pt({},Ln),{onActionCallback:Ge})):je.createElement("span",{className:"v-line"}))),Ee?je.createElement("li",null,je.createElement(zt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ge},je.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Wt?je.createElement(je.Fragment,null,je.createElement("li",null,je.createElement(zt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ge},je.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),je.createElement("li",null,je.createElement(zt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ge},je.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,ue&&je.createElement("li",null,je.createElement(zt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${ue}`,onActionCallback:Ge},je.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ze&&je.createElement("li",null,ze),je.createElement("li",{className:"btn-full-screen"},je.createElement(zt,{icon:`${Ue?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ue?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ge})))},se=bt(79346),Jt=bt(78241),le=bt(92832),Zt=bt(3113),Fe=Object.defineProperty,me=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,xn=(Te,Ee,Wt)=>Ee in Te?Fe(Te,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Te[Ee]=Wt,Se=(Te,Ee)=>{for(var Wt in Ee||(Ee={}))qe.call(Ee,Wt)&&xn(Te,Wt,Ee[Wt]);if(Qe)for(var Wt of Qe(Ee))vn.call(Ee,Wt)&&xn(Te,Wt,Ee[Wt]);return Te},Vt=(Te,Ee)=>me(Te,Ve(Ee));const Xe={labelCol:{span:4},wrapperCol:{span:20}};var Xn=({callback:Te,onCancel:Ee})=>{function Wt(Ge){Te(Ge)}return wt.createElement(Jt.default,Vt(Se({},Xe),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Wt,style:{width:500}}),wt.createElement(Jt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},wt.createElement(le.default,null)),wt.createElement(Jt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},wt.createElement(le.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:Ee},"\u53D6\u6D88")))},Bn=bt(53932),Ae=bt(28451),hn=bt(43418),bn=bt(95237),Jn=bt(16406),mn=bt(59301),ui=({callback:Te,onCancel:Ee})=>{const Wt=document.createElement("canvas"),Ge=Wt.getContext("2d");Wt.width=1e3,Wt.height=800,Ge.fillStyle="#ffffff",Ge.fillRect(0,0,Wt.width,Wt.height);const Ue=Wt.toDataURL("image/png");return mn.createElement(hn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},mn.createElement(bn.Z,{style:{height:"100vh"}},mn.createElement(Jn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ue,visible:!0,title:String(Date.now())},onOk:ue=>{Te({src:ue.url})},onClose:Ee})))},Ce=bt(12378);function ni(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(ni,go.CommandHandler),ni.prototype.canAlignSelection=function(){var Te=this.diagram;return!(Te===null||Te.isReadOnly||Te.isModelReadOnly||Te.selection.count<2)},ni.prototype.alignLeft=function(){var Te=this.diagram;Te.startTransaction("aligning left");var Ee=1/0;Te.selection.each(function(Wt){Wt instanceof go.Link||(Ee=Math.min(Wt.position.x,Ee))}),Te.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Ee,Wt.position.y))}),Te.commitTransaction("aligning left")},ni.prototype.alignRight=function(){var Te=this.diagram;Te.startTransaction("aligning right");var Ee=-1/0;Te.selection.each(function(Wt){if(!(Wt instanceof go.Link)){var Ge=Wt.actualBounds.x+Wt.actualBounds.width;Ee=Math.max(Ge,Ee)}}),Te.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Ee-Wt.actualBounds.width,Wt.position.y))}),Te.commitTransaction("aligning right")},ni.prototype.alignTop=function(){var Te=this.diagram;Te.startTransaction("alignTop");var Ee=1/0;Te.selection.each(function(Wt){Wt instanceof go.Link||(Ee=Math.min(Wt.position.y,Ee))}),Te.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Wt.position.x,Ee))}),Te.commitTransaction("alignTop")},ni.prototype.alignBottom=function(){var Te=this.diagram;Te.startTransaction("aligning bottom");var Ee=-1/0;Te.selection.each(function(Wt){if(!(Wt instanceof go.Link)){var Ge=Wt.actualBounds.y+Wt.actualBounds.height;Ee=Math.max(Ge,Ee)}}),Te.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Wt.actualBounds.x,Ee-Wt.actualBounds.height))}),Te.commitTransaction("aligning bottom")},ni.prototype.alignCenterX=function(){var Te=this.diagram,Ee=Te.selection.first();if(Ee){Te.startTransaction("aligning Center X");var Wt=Ee.actualBounds.x+Ee.actualBounds.width/2;Te.selection.each(function(Ge){Ge instanceof go.Link||Ge.move(new go.Point(Wt-Ge.actualBounds.width/2,Ge.actualBounds.y))}),Te.commitTransaction("aligning Center X")}},ni.prototype.alignCenterY=function(){var Te=this.diagram,Ee=Te.selection.first();if(Ee){Te.startTransaction("aligning Center Y");var Wt=Ee.actualBounds.y+Ee.actualBounds.height/2;Te.selection.each(function(Ge){Ge instanceof go.Link||Ge.move(new go.Point(Ge.actualBounds.x,Wt-Ge.actualBounds.height/2))}),Te.commitTransaction("aligning Center Y")}},ni.prototype.alignColumn=function(Te){var Ee=this.diagram;Ee.startTransaction("align Column"),Te===void 0&&(Te=0),Te=parseFloat(Te);var Wt=new Array;Ee.selection.each(function(ze){ze instanceof go.Link||Wt.push(ze)});for(var Ge=0;Ge<Wt.length-1;Ge++){var Ue=Wt[Ge],ue=Ue.actualBounds.y+Ue.actualBounds.height+Te,qt=Wt[Ge+1];qt.move(new go.Point(Ue.actualBounds.x,ue))}Ee.commitTransaction("align Column")},ni.prototype.alignRow=function(Te){Te===void 0&&(Te=0),Te=parseFloat(Te);var Ee=this.diagram;Ee.startTransaction("align Row");var Wt=new Array;Ee.selection.each(function(ze){ze instanceof go.Link||Wt.push(ze)});for(var Ge=0;Ge<Wt.length-1;Ge++){var Ue=Wt[Ge],ue=Ue.actualBounds.x+Ue.actualBounds.width+Te,qt=Wt[Ge+1];qt.move(new go.Point(ue,Ue.actualBounds.y))}Ee.commitTransaction("align Row")},ni.prototype.canRotate=function(Te){var Ee=this.diagram;return!(Ee===null||Ee.isReadOnly||Ee.isModelReadOnly||Ee.selection.count<1)},ni.prototype.rotate=function(Te){Te===void 0&&(Te=90);var Ee=this.diagram;Ee.startTransaction("rotate "+Te.toString());var Ee=this.diagram;Ee.selection.each(function(Wt){Wt instanceof go.Link||Wt instanceof go.Group||(Wt.angle+=Te)}),Ee.commitTransaction("rotate "+Te.toString())},ni.prototype.pullToFront=function(){var Te=this.diagram;Te.startTransaction("pullToFront");var Ee=new go.Map;Te.selection.each(function(Wt){Ee.set(Wt.layer,0)}),Ee.iteratorKeys.each(function(Wt){var Ge=0;Wt.parts.each(function(Ue){if(!Ue.isSelected){var ue=Ue.zOrder;isNaN(ue)?Ue.zOrder=0:Ge=Math.max(Ge,ue)}}),Ee.set(Wt,Ge)}),Te.selection.each(function(Wt){ni._assignZOrder(Wt,Ee.get(Wt.layer)+1)}),Te.commitTransaction("pullToFront")},ni.prototype.pushToBack=function(){var Te=this.diagram;Te.startTransaction("pushToBack");var Ee=new go.Map;Te.selection.each(function(Wt){Ee.set(Wt.layer,0)}),Ee.iteratorKeys.each(function(Wt){var Ge=0;Wt.parts.each(function(Ue){if(!Ue.isSelected){var ue=Ue.zOrder;isNaN(ue)?Ue.zOrder=0:Ge=Math.min(Ge,ue)}}),Ee.set(Wt,Ge)}),Te.selection.each(function(Wt){ni._assignZOrder(Wt,Ee.get(Wt.layer)-1-ni._findGroupDepth(Wt))}),Te.commitTransaction("pushToBack")},ni._assignZOrder=function(Te,Ee,Wt){Wt===void 0&&(Wt=Te),Te.layer===Wt.layer&&(Te.zOrder=Ee),Te instanceof go.Group&&Te.memberParts.each(function(Ge){ni._assignZOrder(Ge,Ee+1,Wt)})},ni._findGroupDepth=function(Te){if(Te instanceof go.Group){var Ee=0;return Te.memberParts.each(function(Wt){Ee=Math.max(Ee,ni._findGroupDepth(Wt))}),Ee+1}else return 0},ni.prototype.doKeyDown=function(){var Te=this.diagram;if(Te!==null){var Ee=Te.lastInput;if(Ee.key==="Up"||Ee.key==="Down"||Ee.key==="Left"||Ee.key==="Right"){var Wt=this.arrowKeyBehavior;if(Wt==="none")return;if(Wt==="select"){this._arrowKeySelect();return}else if(Wt==="move"){this._arrowKeyMove();return}else if(Wt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},ni.prototype._getAllParts=function(){var Te=new Array;return this.diagram.nodes.each(function(Ee){Te.push(Ee)}),this.diagram.parts.each(function(Ee){Te.push(Ee)}),Te},ni.prototype._arrowKeyMove=function(){var Te=this.diagram,Ee=Te.lastInput,Wt=0,Ge=0;if(Ee.control||Ee.meta)Wt=1,Ge=1;else if(Te.grid!==null){var Ue=Te.grid.gridCellSize;Ge=Ue.width,Wt=Ue.height}Te.startTransaction("arrowKeyMove"),Te.selection.each(function(ue){Ee.key==="Up"?ue.move(new go.Point(ue.actualBounds.x,ue.actualBounds.y-Wt)):Ee.key==="Down"?ue.move(new go.Point(ue.actualBounds.x,ue.actualBounds.y+Wt)):Ee.key==="Left"?ue.move(new go.Point(ue.actualBounds.x-Ge,ue.actualBounds.y)):Ee.key==="Right"&&ue.move(new go.Point(ue.actualBounds.x+Ge,ue.actualBounds.y))}),Te.commitTransaction("arrowKeyMove")},ni.prototype._arrowKeySelect=function(){var Te=this.diagram,Ee=Te.lastInput,Wt=null;Ee.key==="Up"?Wt=this._findNearestPartTowards(270):Ee.key==="Down"?Wt=this._findNearestPartTowards(90):Ee.key==="Left"?Wt=this._findNearestPartTowards(180):Ee.key==="Right"&&(Wt=this._findNearestPartTowards(0)),Wt!==null&&(Ee.shift?Wt.isSelected=!0:Ee.control||Ee.meta?Wt.isSelected=!Wt.isSelected:Te.select(Wt))},ni.prototype._findNearestPartTowards=function(Te){var Ee=this.diagram.selection.first();if(Ee===null)return null;for(var Wt=Ee.actualBounds.center,Ge=this._getAllParts(),Ue=1/0,ue=Ee,qt=0;qt<Ge.length;qt++){var ze=Ge[qt];if(ze!==Ee&&ze.canSelect()){var sn=ze.actualBounds.center,Ln=Wt.directionPoint(sn),Nn=this._angleCloseness(Ln,Te);if(Nn<=45){var ie=Wt.distanceSquaredPoint(sn);ie*=1+Math.sin(Nn*Math.PI/180),ie<Ue&&(Ue=ie,ue=ze)}}}return ue},ni.prototype._angleCloseness=function(Te,Ee){return Math.min(Math.abs(Ee-Te),Math.min(Math.abs(Ee+360-Te),Math.abs(Ee-360-Te)))},ni.prototype._arrowKeyTree=function(){var Te=this.diagram,Ee=Te.selection.first();if(Ee instanceof go.Node){var Wt=Te.lastInput;if(Wt.key==="Right"){if(!Ee.isTreeLeaf)if(!Ee.isTreeExpanded)Te.commandHandler.canExpandTree(Ee)&&Te.commandHandler.expandTree(Ee);else{var Ge=this._sortTreeChildrenByY(Ee).first();Ge!==null&&Te.select(Ge)}}else if(Wt.key==="Left")if(!Ee.isTreeLeaf&&Ee.isTreeExpanded)Te.commandHandler.canCollapseTree(Ee)&&Te.commandHandler.collapseTree(Ee);else{var Ue=Ee.findTreeParentNode();Ue!==null&&Te.select(Ue)}else if(Wt.key==="Up"){var Ue=Ee.findTreeParentNode();if(Ue!==null){var ue=this._sortTreeChildrenByY(Ue),qt=ue.indexOf(Ee);if(qt>0){for(var ze=ue.elt(qt-1);ze!==null&&ze.isTreeExpanded&&!ze.isTreeLeaf;){var sn=this._sortTreeChildrenByY(ze);ze=sn.last()}ze!==null&&Te.select(ze)}else Te.select(Ue)}}else if(Wt.key==="Down")if(Ee.isTreeExpanded&&!Ee.isTreeLeaf){var Ge=this._sortTreeChildrenByY(Ee).first();Ge!==null&&Te.select(Ge)}else for(;Ee!==null;){var Ue=Ee.findTreeParentNode();if(Ue===null)break;var ue=this._sortTreeChildrenByY(Ue),qt=ue.indexOf(Ee);if(qt<ue.length-1){Te.select(ue.elt(qt+1));break}else Ee=Ue}var Ln=Te.selection.first();Ln!==null&&Te.scrollToRect(Ln.actualBounds)}},ni.prototype._sortTreeChildrenByY=function(Te){var Ee=new go.List().addAll(Te.findTreeChildrenNodes());return Ee.sort(function(Wt,Ge){var Ue=Wt.location,ue=Ge.location;return Ue.y<ue.y?-1:Ue.y>ue.y?1:Ue.x<ue.x?-1:Ue.x>ue.x?1:0}),Ee},ni.prototype.copyToClipboard=function(Te){go.CommandHandler.prototype.copyToClipboard.call(this,Te),this._lastPasteOffset.set(this.pasteOffset)},ni.prototype.pasteFromClipboard=function(){var Te=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Te,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Te},Object.defineProperty(ni.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Te){if(Te!=="move"&&Te!=="select"&&Te!=="scroll"&&Te!=="tree"&&Te!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Te);this._arrowKeyBehavior=Te}}),Object.defineProperty(ni.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Te){if(!(Te instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Te);this._pasteOffset.set(Te)}});var Pi=ni,gn=bt(74413),Tn=bt(43604),pn=bt(99064),Un={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},On=bt(24065),we=bt(59301),In=(Te,Ee,Wt)=>new Promise((Ge,Ue)=>{var ue=sn=>{try{ze(Wt.next(sn))}catch(Ln){Ue(Ln)}},qt=sn=>{try{ze(Wt.throw(sn))}catch(Ln){Ue(Ln)}},ze=sn=>sn.done?Ge(sn.value):Promise.resolve(sn.value).then(ue,qt);ze((Wt=Wt.apply(Te,Ee)).next())});function rn({onCancel:Te,callback:Ee}){let Wt=(0,wt.useRef)(),Ge=(0,wt.useRef)(),Ue=(0,wt.useRef)(),ue=(0,wt.useRef)(!1);const qt=(0,wt.useRef)(!1),[ze,sn]=(0,wt.useState)(0);function Ln(){const ie=Ce.bx.make,Je={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Wt.current=new Ce.S0(Ge.current,{padding:20,grid:ie(Ce.s_,"Grid",ie(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),ie(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:jn=>{var ei=jn.diagram.commandHandler.addTopLevelParts(jn.diagram.selection,!0);ei||jn.diagram.currentTool.doCancel()},commandHandler:ie(Pi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:jn=>{var ei=jn.subject;ei.location=ei.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 ei=jn.subject;setTimeout(()=>{jn.diagram.commandHandler.editTextBlock()})},LinkRelinked:jn=>{var ei=jn.parameter.part;ei.invalidateConnectedLinks();var Mi=jn.subject;jn.diagram.toolManager.linkingTool.isForwards?Mi.toNode.invalidateConnectedLinks():Mi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Wt.current.nodeTemplate=ie(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),ie(Ce.bn,{name:"SHAPE",fill:Je.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")),ie(Ce.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),ie(Ce.al,{margin:1,textAlign:"center",overflow:Ce.al.OverflowEllipsis,editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),Wt.current.nodeTemplate.toolTip=ie("ToolTip",ie(Ce.s_,"Vertical",{maxSize:new Ce.$u(200,NaN)},ie(Ce.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ce.KX("text")),ie(Ce.al,{font:"10pt sans-serif",textAlign:"center"},new Ce.KX("text","details"))));function Cn(jn,ei){var Mi=(vi,mi)=>{vi.handled=!0,vi.diagram.model.commit(Ui=>{var ki=mi.part.adornedPart,Hi=new Ce.E9().setRectSpot(ki.actualBounds,jn);Hi.subtract(ki.location),Hi.scale(2,2),Hi.x+=Math.sign(Hi.x)*130,Hi.y+=Math.sign(Hi.y)*130,Hi.add(ki.location),Hi.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 un={from:ki.key,to:Ui.getKeyForNodeData(uo)};Ui.addLinkData(un);var Jo=vi.diagram.findNodeForData(uo);Jo.location=Hi,vi.diagram.select(Jo),setTimeout(()=>{vi.diagram.commandHandler.editTextBlock()},20)})};return ie(Ce.bn,{figure:ei,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:Je.white,strokeWidth:4,mouseEnter:(vi,mi)=>mi.fill="dodgerblue",mouseLeave:(vi,mi)=>mi.fill="orange",isActionable:!0,click:Mi,contextClick:Mi})}function $n(jn){return ie(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:(ei,Mi)=>Mi.fill="dodgerblue",mouseLeave:(ei,Mi)=>Mi.fill="orange",click:(ei,Mi)=>{ei.diagram.commandHandler.showContextMenu(Mi.part.adornedPart)}},jn||{})}Wt.current.nodeTemplate.selectionAdornmentTemplate=ie(Ce.uz,"Spot",ie(Ce.Vm,{padding:10}),Cn(Ce.z6.Top,"TriangleUp"),Cn(Ce.z6.Left,"TriangleLeft"),Cn(Ce.z6.Right,"TriangleRight"),Cn(Ce.z6.Bottom,"TriangleDown"),$n({alignment:new Ce.z6(.75,0)}));function We(jn,ei){return(Mi,vi)=>{Mi.handled=!0,Mi.diagram.model.commit(mi=>{mi.set(vi.part.adornedPart.data,jn,ei)})}}function Ye(jn,ei){return ei||(ei="color"),ie(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:We(ei,jn),contextClick:We(ei,jn)})}function zn(){return[ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Ye(Je.white,"fill"),Ye(Je.beige,"fill"),Ye(Je.extralightblue,"fill"),Ye(Je.extralightred,"fill"))),ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Ye(Je.lightgray,"fill"),Ye(Je.lightgreen,"fill"),Ye(Je.lightblue,"fill"),Ye(Je.lightred,"fill")))]}function Zn(){return[ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Ye(Je.black),Ye(Je.green),Ye(Je.blue),Ye(Je.red))),ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Ye(Je.white),Ye(Je.magenta),Ye(Je.purple),Ye(Je.orange)))]}function fi(jn,ei){return ei||(ei="thickness"),ie(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:We(ei,jn),contextClick:We(ei,jn)})}function Hn(jn,ei){return ei||(ei="dash"),ie(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:We(ei,jn),contextClick:We(ei,jn)})}function ti(){return[ie("ContextMenuButton",ie(Ce.s_,"Horizontal",fi(1),fi(2),fi(3),fi(4))),ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Hn(null),Hn([2,4]),Hn([4,4])))]}function Qn(jn,ei){return ei||(ei="figure"),ie(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:We(ei,jn),contextClick:We(ei,jn)})}Wt.current.nodeTemplate.contextMenu=ie("ContextMenu",ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Qn("Rectangle"),Qn("RoundedRectangle"),Qn("Ellipse"),Qn("Diamond"))),ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Qn("Parallelogram2"),Qn("ManualOperation"),Qn("Procedure"),Qn("Cylinder1"))),ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Qn("Terminator"),Qn("CreateRequest"),Qn("Document"),Qn("TriangleDown"))),zn(),Zn(),ti()),Wt.current.groupTemplate=ie(Ce.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ce.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(jn,ei)=>{var Mi=ei.addMembers(ei.diagram.selection,!0);Mi||ei.diagram.currentTool.doCancel()},avoidable:!1},new Ce.KX("location","loc",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),ie(Ce.s_,"Auto",{name:"BODY"},ie(Ce.bn,{parameter1:10,fill:Je.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")),ie(Ce.Vm,{background:"transparent",margin:20})),ie(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"))),Wt.current.groupTemplate.selectionAdornmentTemplate=ie(Ce.uz,"Spot",ie(Ce.s_,"Auto",ie(Ce.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),ie(Ce.Vm,{margin:1.5})),$n({alignment:Ce.z6.TopRight,alignmentFocus:Ce.z6.BottomRight})),Wt.current.groupTemplate.contextMenu=ie("ContextMenu",zn(),Zn(),ti()),Wt.current.linkTemplate=ie(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(),ie(Ce.bn,{strokeWidth:2},new Ce.KX("stroke","color"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),ie(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)),ie(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))),ie(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))),ie(Ce.al,{alignmentFocus:new Ce.z6(0,1,-4,0),editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),Wt.current.linkTemplate.selectionAdornmentTemplate=ie(Ce.uz,ie(Ce.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:wi(2)},new Ce.KX("pathPattern","thickness",wi)),$n({alignmentFocus:new Ce.z6(0,0,-6,-4)}));function wi(jn){return ie(Ce.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(jn+4).toString()+" H3"})}function Qi(jn){var ei="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return jn===0?ei="M0 0 M16 16 M0 8 L16 8":jn===2&&(ei="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),ie(Ce.bn,{geometryString:ei,margin:2,background:"transparent",mouseEnter:(Mi,vi)=>vi.background="dodgerblue",mouseLeave:(Mi,vi)=>vi.background="transparent",click:We("dir",jn),contextClick:We("dir",jn)})}function qi(jn){var ei=(Mi,vi)=>{Mi.handled=!0,Mi.diagram.model.commit(mi=>{var Ui=vi.part.adornedPart;mi.set(Ui.data,jn?"toSpot":"fromSpot",Ce.z6.stringify(Ce.z6.AllSides)),(jn?Ui.toNode:Ui.fromNode).invalidateConnectedLinks()})};return ie(Ce.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Mi,vi)=>vi.background="dodgerblue",mouseLeave:(Mi,vi)=>vi.background="transparent",click:ei,contextClick:ei})}function _e(jn,ei){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),ei||(Mi-=180);var mi=(Ui,ki)=>{Ui.handled=!0,Ui.diagram.model.commit(Hi=>{var uo=ki.part.adornedPart;Hi.set(uo.data,ei?"toSpot":"fromSpot",Ce.z6.stringify(vi)),(ei?uo.toNode:uo.fromNode).invalidateConnectedLinks()})};return ie(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:mi,contextClick:mi})}Wt.current.linkTemplate.contextMenu=ie("ContextMenu",Zn(),ti(),ie("ContextMenuButton",ie(Ce.s_,"Horizontal",Qi(0),Qi(1),Qi(2))),ie("ContextMenuButton",ie(Ce.s_,"Horizontal",ie(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)),ie(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 Eo=["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 zo(jn){return console.log("shapeName:",jn),Eo.indexOf(jn)>=0}var Ze=new Ce.YI(Ue.current,{maxSelectionCount:1,linkTemplate:ie(Ce.rU,{locationSpot:Ce.z6.Center,selectionAdornmentTemplate:ie(Ce.uz,"Link",{locationSpot:Ce.z6.Center},ie(Ce.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),ie(Ce.bn,{toArrow:"Standard",stroke:null}))},{routing:Ce.rU.AvoidsNodes,curve:Ce.rU.JumpOver,corner:5,toShortLength:4},new Ce.KX("points"),ie(Ce.bn,{isPanelMain:!0,strokeWidth:2}),ie(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 Wt.current.addDiagramListener("TextEdited",function(jn){var ei;const Mi=jn.subject.part;var vi=(ei=document.activeElement)==null?void 0:ei.value;typeof vi=="string"&&vi.trim()===""&&Wt.current.model.commit(function(mi){mi.set(Mi.data,"text","\u672A\u547D\u540D"),Wt.current.commandHandler.stopCommand()},"increment")}),Ze.nodeTemplate=ie(Ce.NB,"Auto",{locationSpot:Ce.z6.Center},new Ce.KX("location","location",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),ie(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")),ie(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(()=>{Wt.current.grid=ie(Ce.s_,"Grid",ie(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),ie(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Wt.current.grid.visible=!0,Wt.current.grid.gridCellStroke="darkgray",Wt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Wt.current,Wt.current}const Nn=()=>In(this,null,function*(){var ie,Je=Wt.current.makeImage();const Cn=yield(0,pn.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Je.src,file_data:JSON.stringify({login:(ie=(0,On.eY)())==null?void 0:ie.login,data:JSON.parse(Wt.current.model.toJson())})}});Ee({src:Cn.url})});return(0,wt.useEffect)(()=>(setTimeout(()=>{Ln()},500),sn(ze+1),()=>{Wt.current=null}),[]),we.createElement("div",{ref:qt,className:ue.current?`${Un.maxH60} body-overflow-initial`:"body-overflow-initial"},we.createElement(hn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!ze,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:we.createElement(bn.Z,null,we.createElement(Tn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),we.createElement(Tn.Z,{onClick:()=>{var ie,Je,Cn=Wt.current.selection.first();if(ue.current=!ue.current,document.activeElement&&Cn){let $n=(Je=(ie=document.activeElement)==null?void 0:ie.value)==null?void 0:Je.trim();typeof $n=="string"&&Wt.current.model.commit(function(We){We.set(Cn.data,"text",$n||"\u672A\u547D\u540D"),Wt.current.commandHandler.stopCommand()},"increment")}sn(ze+1)}},we.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Te},we.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Un.flowChartWrp},we.createElement("div",{style:{display:"flex",height:"100%"}},we.createElement("div",{style:{width:"300px",height:"100%"}},we.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),we.createElement("div",{style:{height:"calc(100% - 50px)"},className:Un.myPaletteDiv,ref:Ue})),we.createElement("div",{style:{flex:1,position:"relative"}},we.createElement("div",{ref:Ge,style:{height:"80vh"}}))),we.createElement("div",{className:"tr"},we.createElement(Zt.ZP,{size:"large",onClick:Nn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ge=rn,oe=bt(5112),Ft=bt(5871);const St=oe.ZP.Group,mt={margin:"0 8px"};var At=({callback:Te,onCancel:Ee})=>{function Wt(Ge){Te(Ge)}return wt.createElement(Jt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Wt},wt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},wt.createElement("span",{style:mt},"\u5355\u5143\u683C\u6570\uFF1A"),wt.createElement("span",{style:mt},"\u884C\u6570"),wt.createElement(Jt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},wt.createElement(Ft.Z,null)),wt.createElement("span",{style:mt},"\u5217\u6570"),wt.createElement(Jt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},wt.createElement(Ft.Z,null))),wt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},wt.createElement("span",{style:mt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),wt.createElement(Jt.default.Item,{name:"align"},wt.createElement(St,null,wt.createElement(oe.ZP,{value:"default"},wt.createElement("i",{className:"fa fa-align-justify"})),wt.createElement(oe.ZP,{value:"left"},wt.createElement("i",{className:"fa fa-align-left"})),wt.createElement(oe.ZP,{value:"center"},wt.createElement("i",{className:"fa fa-align-center"})),wt.createElement(oe.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:Ee},"\u53D6\u6D88")))},Rt=bt(78673),Lt=bt(80727),ae=bt.n(Lt),Oe=(0,wt.forwardRef)(({use3d:Te,width:Ee,height:Wt,callback:Ge,showSaveButton:Ue},ue)=>{const qt=(0,wt.useRef)(),ze=(0,wt.useRef)(),[sn,Ln]=(0,wt.useState)(!1),Nn=(0,wt.useRef)({id:qt,appName:"graphing",width:Ee||1e3,height:Wt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,wt.useEffect)(()=>{ze.current=new(ae())(Nn.current,!0),window.onload=function(){ze.current.inject("applet_container")}},[]);const ie=()=>{var Je=window.ggbApplet.getPNGBase64(1,!0,72);return Ge&&Ge(Je),Je};return(0,wt.useEffect)(()=>{Nn.current.appName=sn?"3D":"graphing",ze.current.inject("applet_container")},[sn]),(0,wt.useEffect)(()=>{Ln(Te)},[Te]),(0,wt.useImperativeHandle)(ue,()=>({getImgData:ie})),wt.createElement(wt.Fragment,null,wt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:qt}),wt.createElement(bn.Z,{align:"middle"},wt.createElement(Tn.Z,{flex:1},wt.createElement(Rt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:sn,onChange:Je=>Ln(Je)})),wt.createElement(Tn.Z,null,wt.createElement(Zt.ZP,{size:"large",onClick:ie,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Be=bt(41588),yn=bt(8591);const Gn="link",Kn="upload-image",Vn="add-flowchart",gi="draw-image",Ti="add-flowchart",Xi="code-block",Mo="add-table",Io="------------",Oo={default:Io,left:`:${Io}`,center:`:${Io}:`,right:`${Io}:`};var co=bt(58856);function Do(){}let Qo=0;const Ai=1e4,$o="\u2581",jo="@\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(Te){return/^\d+$/.test(Te)?`${Te}px`:Te}const rs=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ls={[rs+"-B"]:"bold",[rs+"-I"]:"italic"},Ci={[Gn]:"\u6DFB\u52A0\u94FE\u63A5",[Xi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Kn]:"\u6DFB\u52A0\u56FE\u7247",[gi]:"\u6DFB\u52A0\u753B\u56FE",[Vn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Mo]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var si=({defaultValue:Te="",onChange:Ee,width:Wt="100%",height:Ge=400,miniToolbar:Ue=!1,isFocus:ue=!1,watch:qt,insertTemp:ze,mode:sn="markdown",id:Ln="markdown-editor-id",showResizeBar:Nn=!1,noStorage:ie=!1,showNullButton:Je=!1,showNullProgramButton:Cn=!1,hidetoolBar:$n=!1,fullScreen:We=!1,onBlur:Ye,onCMBeforeChange:zn,onFullScreen:Zn,className:fi="",disablePaste:Hn=!1,disabled:ti=!1,disabledFill:Qn=!1,placeholder:wi="",values:Qi="",extraUse:qi})=>{const[_e,lo]=(0,wt.useState)(null),[Eo,zo]=(0,wt.useState)(Te),[Ze,jn]=(0,wt.useState)(qt),[ei,Mi]=(0,wt.useState)(We),[vi,mi]=(0,wt.useState)(""),[Ui,ki]=(0,wt.useState)(0),[Hi,uo]=(0,wt.useState)(Ge),[un,Jo]=(0,wt.useState)(!1),[nn,ho]=(0,wt.useState)(0),[Er,Ho]=(0,wt.useState)(0),Fr=(0,wt.useRef)(),mr=(0,wt.useRef)(),Oi=(0,wt.useRef)(),Li=(0,wt.useRef)();(0,wt.useEffect)(()=>{const Ji=window.scrollY||window.pageYOffset;zo(Qi),_e==null||_e.setValue(Qi),window.scrollTo(0,Ji)},[Qi]),(0,wt.useEffect)(()=>{Zn==null||Zn(ei)},[ei]),(0,wt.useEffect)(()=>{if(Fr.current){let Ji=function(En,Ki){var qo;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(),sn=="stex")return;try{let hs=Ur[1];((qo=Ur[0])==null?void 0:qo.kind)==="file"&&(hs=Ur[0]);const ns=hs.getAsFile(),sa=ns.name.split(".").pop();(0,Ae.I)(ns,Ys=>{var ga,Ke,vs;Ys.id?((ga=ns==null?void 0:ns.type)==null?void 0:ga.indexOf("image"))>-1?Bi.replaceSelection(`<img width="100%" src="/api/attachments/${Ys.id}?type=${Ys.content_type})" alt="" />`):((Ke=ns==null?void 0:ns.type)==null?void 0:Ke.indexOf("video"))>-1?Bi.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?Bi.replaceSelection(`<a href="/api/attachments/${Ys.id}?type=${ns.type}&disposition=inline" target="_blank">${ns.name}</a>`):ir.includes(sa)?Bi.replaceSelection(`<a href="/api/attachments/${Ys.id}?type=office&disposition=inline" target="_blank">${ns.name}</a>`):Bi.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){yn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Bi=he().fromTextArea(Fr.current,{mode:sn,lineNumbers:!Ue,lineWrapping:!0,value:Te,autoCloseTags:!0,autoCloseBrackets:!0});return Bi.on("keyup",function(En,Ki){Ki.keyCode===8&&(En.getValue()==""?Bi.setOption("placeholder",wi):Bi.setOption("placeholder",null))}),Bi.on("keydown",function(En,Ki){if(Ki.keyCode===8){var qo=ko(En);qo&&Ki.preventDefault()}}),ue&&Bi.focus(),Bi.on("paste",Ji),ti&&Bi.on("beforeChange",function(En,Ki){(Ki.origin==="paste"||Ki.origin==="+input")&&Ki.cancel()}),lo(Bi),()=>{Bi.off("paste",Ji)}}},[]);const So=(0,wt.useCallback)(()=>{if(mr.current)try{}catch(Ji){console.log(Ji,"---- to set md editor body height")}},[Hi,mr,ei]);(0,wt.useEffect)(()=>{function Ji(){let Bi=new Ie.Z(En=>{for(let Ki of En)(Ki.target.offsetHeight>0||Ki.target.offsetWidth>0)&&(So(),_e.setSize("100%","100%"),_e.refresh())});return Bi.observe(Fr.current.parentElement),Bi}if(_e){const Bi=Ji();return()=>{var En,Ki;(En=Fr.current)!=null&&En.parentElement&&Bi.unobserve((Ki=Fr.current)==null?void 0:Ki.parentElement)}}},[_e,So]),(0,wt.useEffect)(()=>{if(_e){let Ji=[];for(const[Bi,En]of Object.entries(ls)){let Ki={[Bi]:()=>{_n(En)}};Ji.push(Ki),_e.addKeyMap(Ki)}return()=>{for(let Bi of Ji)_e.removeKeyMap(Bi)}}},[_e]),(0,wt.useEffect)(()=>{We!==ei&&Mi(We)},[We]),(0,co.Z)(()=>{if(!ie&&Ui>0){let Ji=new Date().getTime(),Bi=window.sessionStorage.getItem(Ln);Ji>=Ui+Ai&&(!Bi||Bi!==Eo)&&(window.sessionStorage.setItem(Ln,Eo),Jo(!0))}},Ai),(0,wt.useEffect)(()=>{jn(qt)},[_e,qt]),(0,wt.useEffect)(()=>{_e&&ue&&_e.focus()},[_e,ue]),(0,wt.useEffect)(()=>{if(Ze&&_e){let Ji=function(En){let Ki=En.target;if(Li.current){let qo=Ki.scrollTop/Ki.scrollHeight;Li.current.scrollTop=Li.current.scrollHeight*qo}};const Bi=_e.getScrollerElement();return Bi.addEventListener("scroll",Ji),()=>{Bi.removeEventListener("scroll",Ji)}}},[_e,Ze]),(0,wt.useEffect)(()=>{if(_e&&zn){let Ji=function(Bi,En){zn(Bi,En)};return _e.on("beforeChange",Ji),()=>{_e.off("beforeChange",Ji)}}},[_e,zn]),(0,wt.useEffect)(()=>{if(_e&&Ye){let Ji=function(){Ye(_e.getValue())};return _e.on("blur",Ji),()=>{_e.off("blur",Ji)}}},[_e,Ye]);function ko(Ji,Bi){var En=Ji.getDoc(),Ki=En.getCursor(),qo=En.getLine(Ki.line),jr=qo.charAt(Ki.ch-1),Ir=qo.lastIndexOf("@\u2581@",Ki.ch),Ur=qo.lastIndexOf("@\u2581\u2581@",Ki.ch),hs=Ir>Ur?Ir:Ur,ns=Ir>Ur?3:4;if(jo.indexOf(jr)===-1)return null;if(console.log("change1:",Bi,Ji,qo,Ki,hs,Ir,Ur,jr),hs>=0&&Ki.ch-hs<5){var sa=hs+ns;return En.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(Bi,En){const Ki=Bi.getValue();zo(Ki),ki(new Date().getTime()),Bi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ee&&(Cn?Ee(Ki,$i(Ki)):Ee(Ki))};return _e.on("change",Ji),()=>{_e.off("change",Ji)}}},[_e,Ee]),(0,wt.useEffect)(()=>{if(_e)if(Te==null)_e.setValue(""),zo("");else{const Ji=window.scrollY||window.pageYOffset;Te!==_e.getValue()&&(_e.setValue(Te),zo(Te),_e.setCursor(ti?1:_e.lineCount(),0),window.scrollTo(0,Ji))}},[_e,Te]);const _n=(0,wt.useCallback)(Ji=>{const Bi=_e.getCursor(),En=_e.getSelection();let Ki=En.split(`
|
|
|
`);switch(Ji){case"bold":return _e.replaceSelection("**"+En+"**"),En===""&&_e.setCursor(Bi.line,Bi.ch+2),_e.focus();case"italic":return _e.replaceSelection("*"+En+"*"),En===""&&_e.setCursor(Bi.line,Bi.ch+1),_e.focus();case"code":return _e.replaceSelection("`"+En+"`"),En===""&&_e.setCursor(Bi.line,Bi.ch+1),_e.focus();case"inline-latex":return mi("inline-latex"),_e.focus();case"latex":return _e.replaceSelection("```latex\n"+En+"\n```"),_e.setCursor(Bi.line+1,En.length+1),_e.focus();case"line-break":return _e.replaceSelection(`<br/>
|
|
|
`),_e.focus();case"list-ul":return En===""?_e.replaceSelection("- "+En):_e.replaceSelection(Ki.map(qo=>qo===""?"":`- ${qo}`).join(`
|
|
|
`)),_e.focus();case"list-ol":return En===""?_e.replaceSelection("1. "+En):_e.replaceSelection(Ki.map((qo,jr)=>qo===""?"":`${jr+1}. ${qo}`).join(`
|
|
|
`)),_e.focus();case"add-null-ch":return En===""&&_e.setCursor(Bi.line,Bi.ch),_e.replaceSelection($o),_e.focus();case"add-signal":return En===""&&_e.setCursor(Bi.line,Bi.ch),_e.replaceSelection(Mt),_e.focus();case"add-multiple":return En===""&&_e.setCursor(Bi.line,Bi.ch),_e.replaceSelection(jo),_e.focus();case"inster-template-1":return En===""&&_e.setCursor(Bi.line,Bi.ch),_e.replaceSelection(cr),_e.focus();case"eraser":return _e.setValue(""),_e.focus();case"trigger-watch":return jn(!Ze),_e.focus();case"trigger-full-screen":return Mi(!ei),_e.focus();case Gn:mi(Gn);return;case Xi:mi(Xi);return;case Kn:mi(Kn);return;case gi:mi(gi);return;case"maths-latex":mi("maths-latex");return;case Vn:mi(Vn);return;case Mo:mi(Mo);return;default:throw new Error}},[_e,Ze,ei]),jt=(0,wt.useCallback)((Ji,Bi)=>{var En,Ki,qo,jr,Ir,Ur;switch(mi(""),vi){case Gn:const{title:ga,link:Ke}=Ji;return _e.replaceSelection(`[${ga}](${Ke})`),_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,Ae.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 Kn:case gi:case Ti:const{src:Ka,alt:gl}=Ji,Xr=Bi,pl=(qo=(Ki=(En=Xr==null?void 0:Xr.name)==null?void 0:En.split("."))==null?void 0:Ki.pop)==null?void 0:qo.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 Mo:const{row:Nu,col:Hr,align:As}=Ji;let kl=`
|
|
|
`;for(let so=0;so<Nu;so++){let hr=[],Uo=[];for(let hi=0;hi<Hr;hi++)so===1&&Uo.push(Oo[As]),hr.push(" ");so===1&&(kl+=`| ${Uo.join(" | ")} |
|
|
|
`),kl+=`| ${hr.join(Hr===1?"":" | ")} |
|
|
|
`}return _e.replaceSelection(kl+`
|
|
|
`),_e.focus();default:throw new Error}},[_e,vi]),_o=(0,wt.useMemo)(()=>{switch(vi){case Gn:return wt.createElement(Xn,{callback:jt,onCancel:xr});case Xi:return wt.createElement(Bn.Z,{callback:jt,onCancel:xr});case Kn:return wt.createElement(Ae.Z,{callback:jt,onCancel:xr});case Vn:return wt.createElement(ge,{callback:jt,onCancel:xr});case Mo:return wt.createElement(At,{callback:jt,onCancel:xr});case"maths-latex":return wt.createElement(Oe,{showSaveButton:!0,callback:jt});case"inline-latex":return wt.createElement(Be.Z,{showSaveButton:!0,callback:jt});default:return null}},[vi]);function xr(){mi("")}(0,wt.useEffect)(()=>{if(Oi.current){let Ji=function(Ir){qo=!0,jr=Ir.pageY},Bi=function(){qo=!1},En=function(Ir){if(qo){let Ur=Ir.pageY-jr;Ur<0&&(Ur=0),Ur>300&&(Ur=300);let hs=Ge+Ur+"px";uo(hs)}},Ki=Oi.current,qo=!1,jr=0;return Ki.addEventListener("mousedown",Ji),document.addEventListener("mousemove",En),document.addEventListener("mouseup",Bi),()=>{Ki.removeEventListener("mousedown",Ji),document.removeEventListener("mousemove",En),document.removeEventListener("mouseup",Bi)}}},[_e,Oi]),(0,wt.useEffect)(()=>{uo(Ge)},[Ge]);const es=pr(Wt),cs=pr(Hi),us={width:es,height:cs},no=(0,wt.useMemo)(()=>{if(Ui){let Ji=new Date(Ui),Bi=Ji.getHours(),En=Ji.getMinutes(),Ki=Ji.getSeconds();return Bi=Bi<10?"0"+Bi:Bi,En=En<10?"0"+En:En,Ki=Ki<10?"0"+Ki:Ki,`${Bi}:${En}:${Ki}`}return 0},[Ui]),$i=Ji=>{const Bi=[];if(Cn){let En=-1;Ji=Ji.replace(/(@▁▁@|@▁@)/g,function(Ki,qo,jr){Bi.push({multiLine:Ki!==Mt})})}return Bi};function Zo(){window.sessionStorage.removeItem(Ln),Jo(!1),ki(0)}function ro(){Jo(!1),ki(0),_e.setValue(window.sessionStorage.getItem(Ln))}(0,wt.useEffect)(()=>{Ci[vi]&&vi!==gi&&vi!==Vn&&setTimeout(()=>{const Ji=document.getElementsByClassName("markdown-popup-form")[0],Bi=window.innerWidth/2-Ji.offsetWidth/2,En=window.innerHeight/2-Ji.offsetHeight/2;ho(Bi),Ho(En)},0)},[vi]);const lr=Ji=>{Ji.preventDefault();const Bi=Ji.clientX-nn,En=Ji.clientY-Er;document.body.onmousemove=Ki=>{let qo=Ki.clientX-Bi,jr=Ki.clientY-En;const Ir=document.getElementsByClassName("markdown-popup-form")[0],Ur=window.innerWidth-Ir.offsetWidth,hs=window.innerHeight-Ir.offsetHeight;qo=Math.max(0,Math.min(qo,Ur)),jr=Math.max(0,Math.min(jr,hs)),ms(Ki.clientX,Ki.clientY,Bi,En)&&(ho(qo),Ho(jr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ms=(Ji,Bi,En,Ki)=>{const qo=document.body.clientHeight,jr=document.body.clientWidth;return Ji<20&&En>Ji||Ji>jr-20&&En<Ji||Bi<20&&Ki>Bi||Bi>qo-20&&Ki<Bi?(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} ${Ze?"on-preview":""} ${Ue?"mini":""} ${ei?"full-screen":""}`,style:us},wt.createElement(_t,{insertTemp:ze,watch:Ze,fullScreen:ei,showNullButton:Je,showNullProgramButton:Cn,onActionCallback:_n,hidetoolBar:$n,extraUse:qi}),wt.createElement("div",{className:"markdown-editor-body"},wt.createElement("div",{className:"codemirror-container"},wt.createElement("textarea",{ref:Fr,placeholder:wi})),Ze?wt.createElement("div",{ref:Li,className:"preview-container"},sn==="stex"&&wt.createElement(xe,{value:Eo}),sn!=="stex"&&wt.createElement(fe.Z,{disabledFill:Qn,showProgramFill:Cn,value:Eo})):null))),Nn?wt.createElement("a",{ref:Oi,className:"editor-resize"}):null,vi===gi&&wt.createElement(ui,{callback:jt,onCancel:xr}),vi===Vn&&wt.createElement(ge,{callback:jt,onCancel:xr}),wt.createElement(se.Z,null,Ci[vi]&&vi!==gi&&vi!==Vn?wt.createElement(hn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:nn,top:Er},title:wt.createElement("div",{style:{cursor:"move"},onMouseDown:lr},Ci[vi]),open:!0,onCancel:xr,footer:null,destroyOnClose:!0,width:vi===Vn?"1200px":null,height:vi===Vn?"80vh":null,className:"markdown-popup-form"},_o):null))}},28451:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return It},I:function(){return _t}});var wt=bt(78241),ee=bt(8591),he=bt(92832),Ie=bt(81327),te=bt(5871),Pe=bt(5112),Nt=bt(3113),Le=bt(77903),ve=bt(59301),Xt=bt(59301),fe=Object.defineProperty,xe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(se,Jt,le)=>Jt in se?fe(se,Jt,{enumerable:!0,configurable:!0,writable:!0,value:le}):se[Jt]=le,lt=(se,Jt)=>{for(var le in Jt||(Jt={}))et.call(Jt,le)&&ht(se,le,Jt[le]);if(Bt)for(var le of Bt(Jt))nt.call(Jt,le)&&ht(se,le,Jt[le]);return se},gt=(se,Jt)=>xe(se,je(Jt));const{useForm:yt}=wt.default,Pt={width:280,marginRight:10},Tt={labelCol:{span:5},wrapperCol:{span:19}};var It=({callback:se,onCancel:Jt})=>{const[le]=yt();let Zt=(0,ve.useRef)();function Fe(Qe){Zt.current.width=le.getFieldValue("width"),Zt.current.align=le.getFieldValue("align"),se(Qe,Zt.current)}function me(Qe,qe){if(Qe.status===-1){ee.ZP.error(Qe.message);return}le.setFieldsValue({src:`/api/attachments/${Qe.id}`,type:qe.type})}function Ve(Qe){let qe=Qe.target.files[0];Zt.current=qe,_t(qe,me)}return Xt.createElement(wt.default,gt(lt({form:le},Tt),{className:"upload-image-panel",onFinish:Fe,style:{width:470,overflow:"hidden"}}),Xt.createElement(wt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Xt.createElement("div",{className:"flex-container"},Xt.createElement(wt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Xt.createElement(he.default,{style:Pt})),Xt.createElement(zt,{onFileChange:Ve}))),Xt.createElement(wt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Xt.createElement(he.default,{style:{width:264}})),Xt.createElement(wt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Xt.createElement(Ie.Z,null,Xt.createElement(wt.default.Item,{name:"width",style:{margin:0}},Xt.createElement(te.Z,{style:{width:264}})),Xt.createElement("span",{className:"ml8"},"%"))),Xt.createElement(wt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Xt.createElement(Pe.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"}]})),Xt.createElement("aside",null,Xt.createElement(wt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Xt.createElement(Nt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Xt.createElement(Nt.ZP,{type:"default",onClick:Jt},"\u53D6\u6D88"))))};function zt({onFileChange:se}){return Xt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Xt.createElement("input",{type:"file",onChange:se}))}function _t(se,Jt){if(!se)throw new String("\u6CA1\u6709\u6587\u4EF6");let le=new FormData;le.append("editormd-image-file",se),le.append("file_param_name","editormd-image-file"),le.append("byxhr","true");var Zt=new window.XMLHttpRequest;Zt.withCredentials=!0,Zt.addEventListener("load",function(Fe){Jt(JSON.parse(Fe.target.responseText),se)},!1),Zt.addEventListener("error",function(Fe){console.error(Fe)},!1),Zt.open("POST",`${Le.KI}/api/attachments.json`),Zt.send(le)}},79346:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return he}});var wt=bt(59301),ee=bt(4676);class he extends wt.Component{constructor(te){super(te);const Pe=window.document;this.node=Pe.createElement("div"),Pe.body.appendChild(this.node)}render(){const{children:te}=this.props;return(0,ee.createPortal)(te,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(dn,Mn,bt){"use strict";bt.d(Mn,{SV:function(){return In},ZP:function(){return we}});var wt=bt(59301),ee=bt(76374);const he={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Ie={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"]},te={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(`
|
|
|
`)}]},Pe={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(`
|
|
|
`)}]},Nt={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 Le=bt(53184),ve=bt.n(Le),Xt=Object.defineProperty,fe=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(rn,ge,oe)=>ge in rn?Xt(rn,ge,{enumerable:!0,configurable:!0,writable:!0,value:oe}):rn[ge]=oe,ht=(rn,ge)=>{for(var oe in ge||(ge={}))Bt.call(ge,oe)&&nt(rn,oe,ge[oe]);if(je)for(var oe of je(ge))et.call(ge,oe)&&nt(rn,oe,ge[oe]);return rn},lt=(rn,ge)=>fe(rn,xe(ge)),gt=(rn,ge,oe)=>new Promise((Ft,St)=>{var mt=Lt=>{try{Rt(oe.next(Lt))}catch(ae){St(ae)}},At=Lt=>{try{Rt(oe.throw(Lt))}catch(ae){St(ae)}},Rt=Lt=>Lt.done?Ft(Lt.value):Promise.resolve(Lt.value).then(mt,At);Rt((oe=oe.apply(rn,ge)).next())});const yt={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=(rn,ge)=>ge.map(oe=>({label:oe,kind:rn.languages.CompletionItemKind.Keyword,insertText:oe})),Tt=rn=>Object.keys(yt.tables).map(ge=>({label:ge,kind:rn.languages.CompletionItemKind.Variable,insertText:ge})),It=(rn,ge)=>{const oe=yt.tables[rn];return oe?oe.map(Ft=>({label:Ft,kind:ge.languages.CompletionItemKind.Field,insertText:Ft})):[]};function zt(rn,ge,oe,Ft,St){let mt=ge.getWordUntilPosition(oe),At={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:mt.startColumn,endColumn:mt.endColumn},Rt=Ft.map(Lt=>({label:Lt,kind:rn.languages.CompletionItemKind.Keyword,insertText:Lt,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:At}));return St.map(Lt=>{Rt.push(lt(ht({},Lt),{range:At}))}),Rt}var _t=rn=>{yt.languages.map(St=>(rn.languages.registerDocumentFormattingEditProvider(St,{provideDocumentFormattingEdits(mt,At,Rt){return gt(this,null,function*(){const Lt=ve()(mt.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:mt.getFullModelRange(),text:Lt}]})}}),St));const ge=te.quickKey.map(St=>({label:St.label,kind:rn.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet})),oe=Pe.quickKey.map(St=>({label:St.label,kind:rn.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ft=Ie.quickKey.map(St=>({label:St.label,kind:rn.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet}));rn.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(St,mt){var At=St.getWordUntilPosition(mt),Rt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:At.startColumn,endColumn:At.endColumn},Lt=St.getLineContent(mt.lineNumber).substring(At.startColumn-2,At.endColumn);return{suggestions:[...te.keywords.map(ae=>({label:ae,kind:rn.languages.CompletionItemKind.Function,documentation:ae,insertText:ae,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt})),...te.quickKey.map(ae=>({label:ae.label,kind:rn.languages.CompletionItemKind.Function,documentation:ae.content,insertText:Lt.startsWith("#")?ae.content.replace(/#/,""):ae.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt}))]}}}),rn.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(St,mt){var At=St.getWordUntilPosition(mt),Rt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:At.startColumn,endColumn:At.endColumn};return{suggestions:[...he.keywords.map(Lt=>({label:Lt,kind:rn.languages.CompletionItemKind.Function,documentation:Lt,insertText:Lt,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt}))]}}}),rn.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(St,mt){var At=St.getWordUntilPosition(mt),Rt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:At.startColumn,endColumn:At.endColumn},Lt=St.getLineContent(mt.lineNumber).substring(At.startColumn-2,At.endColumn);return{suggestions:[...Ie.keywords.map(ae=>({label:ae,kind:rn.languages.CompletionItemKind.Function,documentation:ae,insertText:ae,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt})),...Ie.quickKey.map(ae=>({label:ae.label,kind:rn.languages.CompletionItemKind.Function,documentation:ae.content,insertText:Lt.startsWith("#")?ae.content.replace(/#/,""):ae.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt}))]}}}),rn.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(St,mt){var At=St.getWordUntilPosition(mt),Rt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:At.startColumn,endColumn:At.endColumn},Lt=St.getLineContent(mt.lineNumber).substring(At.startColumn-2,At.endColumn);return{suggestions:[...Nt.keywords.map(ae=>({label:ae,kind:rn.languages.CompletionItemKind.Function,documentation:ae,insertText:ae,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt})),...Nt.quickKey.map(ae=>({label:ae.label,kind:rn.languages.CompletionItemKind.Function,documentation:ae.content,insertText:Lt.startsWith("#")?ae.content.replace(/#/,""):ae.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt}))]}}}),rn.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(St,mt){var At=St.getWordUntilPosition(mt),Rt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:At.startColumn,endColumn:At.endColumn},Lt=St.getLineContent(mt.lineNumber).substring(At.startColumn-2,At.endColumn);return{suggestions:[...Pe.keywords.map(ae=>({label:ae,kind:rn.languages.CompletionItemKind.Function,documentation:ae,insertText:ae,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt})),...Pe.quickKey.map(ae=>({label:ae.label,kind:rn.languages.CompletionItemKind.Function,documentation:ae.content,insertText:Lt.startsWith("#")?ae.content.replace(/#/,""):ae.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Rt}))]}}})};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 Jt=Object.defineProperty,le=(rn,ge,oe)=>ge in rn?Jt(rn,ge,{enumerable:!0,configurable:!0,writable:!0,value:oe}):rn[ge]=oe,Zt=(rn,ge,oe)=>le(rn,typeof ge!="symbol"?ge+"":ge,oe);const Fe=class p1{constructor(ge,oe,Ft){this.placeholder=ge,this.editor=oe,this.monaco=Ft,oe.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(Fe,"ID","editor.widget.placeholderHint");var Ve=Fe,Qe=bt(96236),qe=bt(8591),vn=bt(6848),xn=bt(89392),Se=bt(34604),Vt=bt(56102),Xe=Object.defineProperty,Xn=Object.defineProperties,Bn=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Jn=(rn,ge,oe)=>ge in rn?Xe(rn,ge,{enumerable:!0,configurable:!0,writable:!0,value:oe}):rn[ge]=oe,mn=(rn,ge)=>{for(var oe in ge||(ge={}))hn.call(ge,oe)&&Jn(rn,oe,ge[oe]);if(Ae)for(var oe of Ae(ge))bn.call(ge,oe)&&Jn(rn,oe,ge[oe]);return rn},ui=(rn,ge)=>Xn(rn,Bn(ge)),Ce=(rn,ge)=>{var oe={};for(var Ft in rn)hn.call(rn,Ft)&&ge.indexOf(Ft)<0&&(oe[Ft]=rn[Ft]);if(rn!=null&&Ae)for(var Ft of Ae(rn))ge.indexOf(Ft)<0&&bn.call(rn,Ft)&&(oe[Ft]=rn[Ft]);return oe},ni=(rn,ge,oe)=>new Promise((Ft,St)=>{var mt=Lt=>{try{Rt(oe.next(Lt))}catch(ae){St(ae)}},At=Lt=>{try{Rt(oe.throw(Lt))}catch(ae){St(ae)}},Rt=Lt=>Lt.done?Ft(Lt.value):Promise.resolve(Lt.value).then(mt,At);Rt((oe=oe.apply(rn,ge)).next())});function Pi(rn){return/^\d+$/.test(rn)?`${rn}px`:rn}function gn(){}let Tn=!1;const pn={"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 Un(rn=[]){let ge=rn;if(Array.isArray(rn)){for(let oe=0;oe<rn.length;oe++){let Ft=pn[rn[oe]];if(Ft)return Ft}return ge[0]}return pn[ge]||ge}let On=null;var we=rn=>{var ge=rn,{width:oe="100%",height:Ft="100%",value:St,language:mt="javascript",style:At={},options:Rt={},overrideServices:Lt={},theme:ae="vs-dark",onEditBlur:De,isCopy:Oe=!1,onSave:Be,autoHeight:yn=!1,forbidCopy:Gn=!1,onChange:Kn=gn,editorDidMount:Vn=gn,onFocus:gi=gn,onBreakPoint:Ti=gn,breakPointValue:Xi=[],filename:Mo="educoder.txt",errorLine:Io,errorContent:Oo="",highlightLine:co,openBreakPoint:Do=!1,placeholder:Qo="",showMiniMap:Ai=!0}=ge,$o=Ce(ge,["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 jo=(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),[si,Te]=(0,wt.useState)(!1);function Ee(){let Ye;return jo.current&&(Ye=new ee.Z(zn=>{for(let Zn of zn)(Zn.target.offsetHeight>0||Zn.target.offsetWidth>0)&&Mt.current.instance.layout()}),Ye.observe(jo.current)),Ye}function Wt(){qe.ZP.warning({content:decodeURIComponent(se),key:"monaco-editor-tip"})}const Ge=()=>{let Ye=Mt.current.instance;if(St!=null&&Ye&&si){const zn=Ye.getModel();zn&&St!==zn.getValue()&&(Tn=!0,zn.setValue(St),Ye.layout(),Tn=!1)}};(0,wt.useEffect)(()=>{const Ye=Se.Z.subscribe("formatDocument",zn=>{var Zn;let fi=Mt.current.instance;(Zn=fi==null?void 0:fi.getAction)==null||Zn.call(fi,"editor.action.formatDocument").run()});return window.updateMonacoValue=zn=>{Kn(zn)},Ye},[]),(0,wt.useEffect)(()=>{var Ye;let zn=Mt.current.instance;ir.current&&clearTimeout(ir.current),ir.current=setTimeout(()=>{Ge()},500),St&&(St!=null&&St.length)&&((Ye=zn==null?void 0:zn.updateOptions)==null||Ye.call(zn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(St.split(/\r\n|\r|\n/g).length))+3,5)}))},[St,si,Mt.current]),(0,wt.useEffect)(()=>{if(Io&&Mt.current&&Mt.current.instance){let zn=Mt.current.instance;zn.changeViewZones(function(Zn){var fi=document.createElement("div");fi.style.padding="10px 20px",fi.style.width="calc(100% - 20px)",fi.className="my-error-line-wrp",fi.innerHTML=Oo,Zn.addZone({afterLineNumber:Io||11,heightInLines:3,domNode:fi})});var Ye={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(Ye),zn.revealPositionInCenter({lineNumber:20,column:1})}},[Io,Mt.current,si]);const Ue=(Ye="",zn)=>{if(!Ye||Ye.trim()==="")return!0;const fi=Mt.current.instance.getModel().getLineTokens(zn);let Hn=!1;for(let ti=0;ti<2;ti++)fi.getStandardTokenType(ti)===1&&(Hn=!0);return Hn};(0,wt.useEffect)(()=>{var Ye;const zn=(Ye=Mt.current)==null?void 0:Ye.instance;if(zn&&si&&Gn){const Zn=zn.onDidBlurEditorWidget(()=>{Ci.current=!1}),fi=zn.onDidFocusEditorText(()=>{Ci.current=!0});return()=>{Zn.dispose(),fi.dispose()}}},[Mt.current,si,Gn]),(0,wt.useEffect)(()=>{var Ye;if((Ye=Mt.current)!=null&&Ye.instance&&si&&Do){let zn=Mt.current.instance,Zn=zn.getModel();if(!Zn)return;(()=>{var Ze;let jn=[],ei=[];const Mi=Zn.getAllDecorations();for(let mi of Mi)mi.options.className==="highlighted-line"&&(jn.push((Ze=mi==null?void 0:mi.range)==null?void 0:Ze.startLineNumber),ei.push(mi==null?void 0:mi.id));if(co===jn[0])return;Zn.deltaDecorations(ei,[]);const vi=Zn.getLineCount();co&&co<=vi&&(zn.deltaDecorations([],[{range:new On.Range(co,1,co,Zn.getLineMaxColumn(co)),options:{isWholeLine:!0,className:"highlighted-line"}}]),zn.revealLineInCenter(co))})();const Hn=(Ze=!1)=>{var jn;let ei=[],Mi=[];const vi=Zn.getAllDecorations();for(let mi of vi)mi.options.linesDecorationsClassName==="breakpoints-select"&&(ei.push((jn=mi==null?void 0:mi.range)==null?void 0:jn.startLineNumber),Mi.push(mi==null?void 0:mi.id));if(Ze)return{lines:ei,ids:Mi};Ti(ei)},ti=Ze=>ni(void 0,null,function*(){let jn={range:new On.Range(Ze,1,Ze,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Zn.deltaDecorations([],[jn]),Hn()}),Qn=Ze=>ni(void 0,null,function*(){let jn=[];const ei=zn.getLineDecorations(Ze);for(let Mi of ei)Mi.options.linesDecorationsClassName==="breakpoints-select"&&jn.push(Mi.id);yield Zn.deltaDecorations(jn,[]),Hn()}),wi=Ze=>{let jn=zn.getLineDecorations(Ze);for(let ei of jn)if(ei.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,xn.isEqual)(Xi,Hn(!0).lines)){Zn.deltaDecorations(Hn(!0).ids,[]);const Ze=Xi.map(jn=>({range:new On.Range(jn,1,jn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Zn.deltaDecorations([],Ze)}const Qi=zn.onDidChangeModelContent(Ze=>{let jn=zn.getPosition();if(jn){let ei=jn.lineNumber;clearTimeout(ls.current),ls.current=setTimeout(()=>{Ue(Zn.getLineContent(ei),ei)?Qn(ei):wi(ei)?(Qn(ei),ti(ei)):Hn()},100)}}),qi=zn.onMouseDown(Ze=>{var jn,ei,Mi;if(Ze.target.detail&&((Mi=(ei=(jn=Ze.target)==null?void 0:jn.element)==null?void 0:ei.className)!=null&&Mi.includes("line-numbers"))){let vi=Ze.target.position.lineNumber;if(Ue(Zn.getLineContent(vi),vi))return;wi(vi)?Qn(vi):ti(vi)}}),_e=Ze=>{let jn={range:new On.Range(Ze,1,Ze,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};pr.current=zn.deltaDecorations(pr.current,[jn])},lo=()=>{pr.current=zn.deltaDecorations(pr.current,[])},Eo=zn.onMouseMove(Ze=>{var jn,ei,Mi;if(lo(),Ze.target.detail&&((Mi=(ei=(jn=Ze.target)==null?void 0:jn.element)==null?void 0:ei.className)!=null&&Mi.includes("line-numbers"))){let vi=Ze.target.position.lineNumber;if(Ue(Zn.getLineContent(vi),vi))return;_e(vi)}}),zo=zn.onMouseLeave(()=>{lo()});return()=>{Qi.dispose(),qi.dispose(),Eo.dispose(),zo.dispose()}}},[Mt.current,si,Xi,co,Do,mt]),(0,wt.useEffect)(()=>{var Ye;(Ye=Mt.current)!=null&&Ye.instance&&Do&&Mt.current.instance.setPosition({lineNumber:0,column:0})},[co]);function ue(){let Ye=Mt.current.instance;if(Ye){const zn=Ye.getSelection(),Zn=Mt.current.pastePos||{},fi=new On.Range(Zn.startLineNumber||zn.endLineNumber,Zn.startColumn||zn.endColumn,Zn.endLineNumber||zn.endLineNumber,Zn.endColumn||zn.endColumn);setTimeout(()=>{Ye.executeEdits("",[{range:fi,text:""}])},300)}}function qt(Ye){(window.navigator.platform.match("Mac")?Ye.metaKey:Ye.ctrlKey)&&Ye.keyCode==83&&(Ye.preventDefault(),Be())}const ze=()=>{if(yn&&Mt.current.instance){const Ye=Mt.current.instance.getContentHeight();$n(Ye<Ft?Ft:Ye)}else $n(Ft)};function sn(Ye){var zn=document.createEvent("MouseEvents");zn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ye.dispatchEvent(zn)}const Ln=Ye=>{if(!Ci.current)return;const{keyCode:zn,ctrlKey:Zn,metaKey:fi,target:Hn,type:ti}=Ye;return(ti==="paste"||(zn===67||zn===86)&&(fi||Zn))&&Hn.nodeName==="TEXTAREA"&&(Wt(),Ye.preventDefault()),!1};function Nn(Ye,zn){var Zn=window.URL||window.webkitURL||window,fi=new Blob([zn]),Hn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Hn.href=Zn.createObjectURL(fi),Hn.download=Ye,sn(Hn)}(0,wt.useEffect)(()=>{ze()},[ze]),(0,wt.useEffect)(()=>{jo.current&&!si&&Promise.all([bt.e(8909),bt.e(3267)]).then(bt.bind(bt,71448)).then(Ye=>{try{On=Ye,Mt.current.instance=On.editor.create(jo.current,{value:St,language:Un(mt),theme:ae,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ai||!1}},Lt);const zn=Mt.current.instance;let Hn=[...Qe.BH._menuItems].find(Qi=>Qi[0]._debugName=="EditorContext")[1],ti=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Qn=(Qi,qi)=>{var _e,lo;let Eo=Qi._first;do qi.includes((lo=(_e=Eo.element)==null?void 0:_e.command)==null?void 0:lo.id)&&Qi._remove(Eo);while(Eo=Eo.next)};if(Vn(zn,On),setTimeout(()=>{ze(),Mt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Nn(Mo||"educoder.txt",zn.getValue())}})},500),Mt.current.subscription=zn.onDidChangeModelContent(Qi=>{ts.current?clearTimeout(rs.current):(ze(),Kn(zn.getValue(),Qi)),rs.current=setTimeout(()=>{ts.current=!1},500)}),window.Monaco||_t(On,Un(mt)),Gn&&(Qn(Hn,ti),jo.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ln),window.removeEventListener("paste",Ln),window.addEventListener("keydown",Ln),window.addEventListener("paste",Ln)),window.Monaco=On,De&&zn.onDidBlurEditorWidget(()=>{De(zn.getValue())}),gi&&zn.onDidFocusEditorText(()=>{gi(zn.getValue())}),Gn)try{zn.onDidPaste(Qi=>{const qi=zn.getSelection(),_e=Mt.current.pastePos||{},lo=new On.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=Ee();return Qo&&typeof Qo=="string"&&new Ve(Qo,zn,On),Te(!0),()=>{const Qi=Mt.current.instance;Qi.dispose();const qi=Qi.getModel();qi&&qi.dispose(),Mt.current.subscription&&Mt.current.subscription.dispose(),wi.unobserve(jo.current)}}catch(zn){}})},[]),(0,wt.useEffect)(()=>{if(Mt.current.instance&&si)return document.addEventListener("keydown",qt,!1),()=>{document.removeEventListener("keydown",qt)}},[Be,si]),(0,wt.useEffect)(()=>{let Ye=Mt.current.instance;if(Ye&&si){let zn=Un(mt);On.editor.setModelLanguage(Ye.getModel(),zn)}},[mt,si]),(0,wt.useEffect)(()=>{Mt.current.instance&&si&&On.editor.setTheme(ae)},[ae,si]),(0,wt.useEffect)(()=>{let Ye=Mt.current.instance;cr.current=Rt,Ye&&si&&(Ye.updateOptions(mn({},Rt)),setTimeout(()=>{Ye.getModel().updateOptions(mn({},Rt))},200))},[JSON.stringify(Rt),si]),(0,wt.useEffect)(()=>{let Ye=Mt.current.instance;Ye&&si&&Ye.layout()},[oe,Ft,si]);const[ie,Je]=(0,wt.useState)(Pi(oe)),[Cn,$n]=(0,wt.useState)(Pi(Ft)),We=ui(mn({},At),{width:ie,height:Cn,position:"relative"});return wt.createElement("div",{className:"my-monaco-editor",ref:jo,style:We},Oe&&wt.createElement(Vt.CopyToClipboard,{text:St,onCopy:()=>qe.ZP.success("\u590D\u5236\u6210\u529F")},wt.createElement(vn.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 In({width:rn="100%",height:ge="100%",original:oe,modified:Ft,language:St,options:mt={}}){const At=(0,wt.useRef)(),[Rt,Lt]=(0,wt.useState)(null);function ae(yn){let Gn;return At.current&&(Gn=new ee.Z(Kn=>{for(let Vn of Kn)(Vn.target.offsetHeight>0||Vn.target.offsetWidth>0)&&yn.layout()}),Gn.observe(At.current)),Gn}(0,wt.useEffect)(()=>(At.current&&Promise.all([bt.e(8909),bt.e(9404)]).then(bt.bind(bt,2550)).then(yn=>{On=yn;const Gn=On.editor.createDiffEditor(At.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},mt),{wordWrap:!0}));Lt(Gn);let Kn=ae(Gn);return()=>{Gn.dispose();const Vn=Gn.getModel();Vn&&Vn.dispose(),Kn.unobserve(At.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,wt.useEffect)(()=>{Rt&&Rt.setModel({original:On.editor.createModel(oe,St),modified:On.editor.createModel(Ft,St)})},[oe,Ft,St,Rt]);const De=Pi(rn),Oe=Pi(ge),Be={width:De,height:Oe};return wt.createElement("div",{className:"my-diff-editor",ref:At,style:Be})}},85057:function(dn,Mn,bt){"use strict";bt.d(Mn,{jL:function(){return te},w9:function(){return hn},QD:function(){return Kn},cQ:function(){return Vt},op:function(){return ae},O5:function(){return ls},_b:function(){return Io},t7:function(){return lt},Gi:function(){return ni},YG:function(){return ui},qp:function(){return fe},vr:function(){return Ti},qE:function(){return Be},Je:function(){return Pt},wb:function(){return Qe},cq:function(){return On},tp:function(){return Bt}});var wt=bt(59301),ee={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},he="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDB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z/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",te=({dataSource:Ci=[],img:si,imgWidth:Te=346,title:Ee,sunTitle:Wt,bannerExtraContent:Ge})=>wt.createElement("div",{className:ee.banner},wt.createElement("div",{className:ee.content},wt.createElement("aside",null,wt.createElement("p",null,wt.createElement("b",null,Ee),wt.createElement("span",null,Wt)),Ci.length>0&&wt.createElement("div",{className:ee.btns},Ci.map((Ue,ue)=>wt.createElement("div",{key:ue,onClick:Ue.click},Ue.name,Ue.sign?wt.createElement("img",{src:he,width:39}):null))),Ge),si&&wt.createElement("img",{style:{marginTop:33,marginRight:38},src:si,width:Te}))),Pe={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"},Nt=bt(92310),Le=bt.n(Nt),ve=bt(89392),fe=({dataSource:Ci=[],value:si,onChange:Te,onTitleChange:Ee,className:Wt,title:Ge,titleWidth:Ue=41,style:ue={},fontColor:qt="#6A7283",showCount:ze})=>{const[sn,Ln]=(0,wt.useState)(0),[Nn,ie]=(0,wt.useState)(!1),Je=(0,wt.useRef)(null),Cn=(0,wt.useRef)(null);return(0,wt.useEffect)(()=>{var $n;Ci.length!==0&&((($n=Je==null?void 0:Je.current)==null?void 0:$n.clientHeight)>97?Ln(1):Ln(0)),Ci.length===0&&Ln(0),ie(!1)},[Ci]),wt.createElement("div",{className:Le()(Pe.row,Wt),style:ue},wt.createElement("div",{onClick:(0,ve.throttle)(()=>Ee==null?void 0:Ee(),2e3),style:{width:Ue,marginTop:Nn?12:4},className:`${Pe.title} ${Ee?"current":""}`},Ge),wt.createElement("div",{className:Nn?`${Pe.tagsWrap} ${Pe.tagsBorderWrap}`:Pe.tagsWrap},wt.createElement("div",{className:Pe.bar,ref:Cn,style:sn>0?{height:sn===1?97:"auto",overflow:sn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},wt.createElement("div",{className:Pe.tag,ref:Je},Ci==null?void 0:Ci.map($n=>wt.createElement("span",{onClick:()=>Te($n.id),key:$n.id,style:{color:qt},className:si===$n.id?Pe.active:""},wt.createElement("span",{title:$n.name,className:Pe.name},$n.name),!!ze&&wt.createElement("span",{className:Pe.num},$n.count))))),!!sn&&wt.createElement(wt.Fragment,null,sn===1?wt.createElement("div",{onClick:()=>{var $n;Ln(2),(($n=Je==null?void 0:Je.current)==null?void 0:$n.clientHeight)>245?ie(!0):ie(!1)},className:Pe.action},"\u5C55\u5F00",wt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):wt.createElement("div",{onClick:()=>{Cn.current.scrollTop=0,Ln(1),ie(!1)},className:Pe.action},"\u6536\u8D77",wt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},xe={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"},Bt=({dataSource:Ci=[],value:si,onChange:Te,className:Ee,style:Wt={}})=>wt.createElement("div",{style:Wt,className:Le()(xe.tabs,Ee)},Ci.map(Ge=>wt.createElement("span",{onClick:()=>Te(Ge.id),className:si===Ge.id?xe.active:"",key:Ge.id},Ge.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:si="",onChange:Te,onInputChange:Ee=()=>{},className:Wt,style:Ge={},placeholder:Ue,allowClear:ue=!1})=>{var qt;const[ze,sn]=(0,wt.useState)(""),[Ln,Nn]=(0,wt.useState)("");(0,wt.useEffect)(()=>{var Cn;let $n=si;(Cn=JSON.stringify(si))!=null&&Cn.includes("{")&&(sn(si.id),$n=si.value||"");try{Nn(decodeURIComponent($n||""))}catch(We){Nn(decodeURIComponent($n||""))}},[si]);const ie=()=>{Te(encodeURIComponent(Ln),ze||null)},Je=Cn=>{Cn!==ze&&(sn(Cn),Te(encodeURIComponent(Ln),Cn))};return wt.createElement("div",{className:Le()(et.input,Wt),style:Ge},!!Ci.length&&wt.createElement("div",{className:et.dropdown},wt.createElement("div",{className:et.text},(qt=Ci.find(Cn=>Cn.id===ze))==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((Cn,$n)=>wt.createElement("div",{key:$n,onClick:()=>Je(Cn.id)},Cn.name)))),wt.createElement(nt.default,{onPressEnter:ie,value:Ln,onChange:Cn=>{Nn(Cn.target.value),Ee(encodeURIComponent(Cn.target.value),ze||null)},bordered:!1,placeholder:Ue}),wt.createElement("i",{onClick:ie,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:si,className:Te,total:Ee,pageSize:Wt,style:Ge={}})=>{const Ue=Ci<2,ue=Ci>=Math.ceil(Ee/Wt);return Ee<=Wt?wt.createElement(wt.Fragment,null):wt.createElement("div",{className:Le()(gt.quickPager,Te),style:Ge},wt.createElement("div",{onClick:()=>{Ue||si(Ci-1,"prev")},className:Ue?gt.disabled:""},"\u4E0A\u4E00\u9875"),wt.createElement("div",{onClick:()=>{ue||si(Ci+1,"next")},className:ue?gt.disabled:""},"\u4E0B\u4E00\u9875"))},Tt={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"},It=bt(71418),zt=bt(6848),_t=bt(13570),se=bt(3294),Jt=bt(955),le=bt(96908),Zt=bt(57177),Fe=bt(81378),me=bt(8797),Qe=({className:Ci,dataSource:si=[],col:Te=4,right:Ee,bottom:Wt=23,precision:Ge=0,wrapWidth:Ue=1200,trackEventItems:ue,loading:qt})=>{const ze=Math.floor((Ue-(Te-1)*Ee)/Te);return wt.createElement(It.Z,{spinning:qt},wt.createElement("div",{className:Le()(Tt.list,Ci)},!!si.length&&si.map((sn,Ln)=>{const{name:Nn,id:ie,identifier:Je,power:Cn,cover_image_id:$n,pic:We}=sn;return wt.createElement("div",{className:Tt.wrap,key:ie,style:{width:ze,marginRight:(1+Ln)%Te===0?0:Ee+Ge,marginBottom:Wt}},wt.createElement("a",{target:"_blank",href:`/shixuns/${Je}/challenges`,className:Tt.li,onClick:Ye=>{Ye.preventDefault(),ue&&(0,Jt.L9)([ue]),Cn&&(0,Jt.xg)(`/shixuns/${Je}/challenges`)}},wt.createElement("div",{className:Tt.img},wt.createElement("img",{className:Tt.cover,src:`${We}`}),sn.is_jupyter&&wt.createElement("img",{className:Tt.sign,src:le}),sn.is_jupyter_lab&&wt.createElement("img",{className:Tt.sign,src:Zt}),sn.is_unity_3d&&wt.createElement("img",{className:Tt.sign,src:Fe})),wt.createElement("div",{className:Tt.name},wt.createElement(zt.Z,{title:Nn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},wt.createElement("span",{className:Tt.e},Nn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),wt.createElement("div",{className:Tt.tags},wt.createElement(zt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},wt.createElement("span",null,wt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),wt.createElement("span",null,sn.challenges_count))),!!sn.myshixuns_count&&wt.createElement(zt.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,sn.myshixuns_count))),wt.createElement(zt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},wt.createElement("span",null,wt.createElement("span",null,sn.level))),wt.createElement("div",{className:Tt.rate},wt.createElement(_t.Z,{allowHalf:!0,disabled:!0,defaultValue:sn.score_info}),wt.createElement("span",null,"\xA0",sn.score_info?`${sn.score_info}\u5206`:"5\u5206")))),!Cn&&wt.createElement("div",{className:Tt.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")))}),!si.length&&wt.createElement(me.Z,null)))},qe={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"},vn=bt(24065),xn=bt(59301),Vt=({className:Ci,dataSource:si=[],col:Te=4,right:Ee,bottom:Wt=23,precision:Ge=0,wrapWidth:Ue=1200,trackEventItems:ue,loading:qt,onRemove:ze=()=>{},isCurrent:sn=!0,showAlias:Ln=!1})=>{const Nn=Math.floor((Ue-(Te-1)*Ee)/Te),ie=[{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 xn.createElement(It.Z,{spinning:qt},xn.createElement("div",{className:Le()(qe.list,Ci)},!!(si!=null&&si.length)&&(si==null?void 0:si.map((Je,Cn)=>{var $n;const{name:We,id:Ye,identifier:zn,featured:Zn,school_name:fi,image_url:Hn,excellent:ti,is_plan:Qn}=Je;return xn.createElement("div",{key:Ye,className:qe.wrap,style:{width:Nn,marginRight:(1+Cn)%Te===0?0:Ee+Ge,marginBottom:Wt}},xn.createElement("a",{className:qe.li,onClick:wi=>{wi.preventDefault(),wi.stopPropagation(),ue&&(0,Jt.L9)([ue]),(0,Jt.xg)(`/paths/${zn}`)}},xn.createElement("div",{className:qe.img},xn.createElement("img",{className:qe.cover,src:`${Hn}`}),sn&&(0,vn.bg)()&&(Je==null?void 0:Je.studying)&&xn.createElement("div",{className:`${qe.movebq} user-path-items`,onClick:wi=>{wi.stopPropagation(),ze(Je)}},xn.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),xn.createElement("span",{className:"c-red"},"\u79FB\u9664")),($n=Je==null?void 0:Je.subject_tags)==null?void 0:$n.map((wi,Qi)=>{var qi,_e;if(Qi===0){const Eo=(qi=ie.find(zo=>zo.name==wi))==null?void 0:qi.swimg;return xn.createElement("img",{className:qe.sign,src:Eo,style:{left:"-4px"}})}const lo=(_e=ie.find(Eo=>Eo.name==wi))==null?void 0:_e.ptimg;return xn.createElement("img",{className:qe.sign,src:lo,style:{left:`${48+52*(Qi-1)+2*Qi}px`}})}),xn.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Je==null?void 0:Je.excellent)&&xn.createElement("div",{className:qe.bq},"\u5F00\u653E\u8BFE\u7A0B"))),xn.createElement("div",{className:qe.name},xn.createElement(zt.Z,{title:Ln&&(Je!=null&&Je.excellent_alias_name)?xn.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${We}`,xn.createElement("br",null),xn.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Je==null?void 0:Je.excellent_alias_name}`)):We},xn.createElement("span",{className:qe.e},Ln&&(Je==null?void 0:Je.excellent_alias_name)||We))),xn.createElement(zt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${fi}`},xn.createElement("div",{className:qe.unit},xn.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),fi)),xn.createElement("div",{className:qe.tags},xn.createElement("div",null,xn.createElement(zt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},xn.createElement("span",null,xn.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),xn.createElement("span",null,Je.stages_count))),xn.createElement(zt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},xn.createElement("span",null,xn.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),xn.createElement("span",null,Je.members_count)))))))})),!si.length&&xn.createElement(me.Z,null)))},Xe={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"},Xn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlav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3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Bn=bt(59301),hn=({className:Ci,dataSource:si=[],col:Te=4,right:Ee,bottom:Wt=23,precision:Ge=0,wrapWidth:Ue=1200,trackEventItems:ue,loading:qt,handleVery:ze=()=>!0})=>{const sn=Math.floor((Ue-(Te-1)*Ee)/Te);return Bn.createElement(It.Z,{spinning:qt},Bn.createElement("div",{className:Le()(Xe.list,Ci)},!!si.length&&si.map((Ln,Nn)=>{const{subject_identifier:ie,id:Je,identifier:Cn,power:$n}=Ln,We=Ln.is_public!=0&&Ln.is_public;return Bn.createElement("div",{className:Xe.wrap,key:Je,style:{width:sn,marginRight:(1+Nn)%Te===0?0:Ee+Ge,marginBottom:Wt}},Bn.createElement("a",{className:Xe.li,onClick:Ye=>{Ye.preventDefault(),ze(Ln==null?void 0:Ln.first_category_url)&&(ue&&(0,Jt.L9)([ue]),(0,Jt.xg)(Ln.first_category_url))}},Bn.createElement("div",{className:Xe.top},Bn.createElement(zt.Z,{title:Ln.name},Bn.createElement("div",{className:Xe.name},Ln.name)),Bn.createElement("img",{className:Xe.img,src:se.Z.IMG_SERVER+"/images/"+Ln.avatar_url}),Bn.createElement("div",{className:Xe.text,title:Ln.creator},Ln.creator),ie&&Bn.createElement("div",{className:Xe.btns},Bn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Bn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),We&&Bn.createElement("div",{className:Xe.sign},"\u516C\u5F00")),Bn.createElement("div",{className:Xe.bottom},Ln.visits>0&&Bn.createElement(zt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Bn.createElement("span",null,Bn.createElement("i",{className:"iconfont icon-liulanyan"}),Bn.createElement("span",null,Ln.visits))),Ln.course_members_count>0&&Bn.createElement(zt.Z,{title:"\u6210\u5458",placement:"bottom"},Bn.createElement("span",null,Bn.createElement("i",{className:"iconfont icon-chengyuan"}),Ln.course_members_count)),Ln.tasks_count>0&&Bn.createElement(zt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Bn.createElement("span",null,Bn.createElement("i",{className:"iconfont icon-zuoye"}),Ln.tasks_count)),Ln.is_end?Bn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Bn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Ln.is_accessible&&Bn.createElement("div",{className:Xe.lockWrap},Bn.createElement("img",{src:`${se.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Bn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!si.length&&Bn.createElement(me.Z,null)))},bn={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"},Jn=bt(89070),ui=({dataSource:Ci=[],value:si,onChange:Te,className:Ee,style:Wt={},tabBarExtraContent:Ge})=>wt.createElement("div",{className:Le()(bn.tabs,Ee),style:Wt},wt.createElement("div",{className:bn.tabsWrap},Ci.map((Ue,ue)=>!(Ue!=null&&Ue.hide)&&wt.createElement("aside",{className:bn.tab,onClick:()=>{Te(Ue.id),Ue.link&&Jn.history.push(Ue.link)},key:ue},wt.createElement("div",{className:si===Ue.id?bn.active:""},Ue.name),(Ue==null?void 0:Ue.resetCount)==null&&(Ue==null?void 0:Ue.total)!==void 0&&wt.createElement("span",null,"\uFF08",Ue==null?void 0:Ue.total,"\uFF09"),(Ue==null?void 0:Ue.resetCount)!==void 0&&(Ue==null?void 0:Ue.total)!==void 0&&wt.createElement(zt.Z,{title:(Ue==null?void 0:Ue.tip)!=null?Ue==null?void 0:Ue.tip:""},wt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",wt.createElement("span",{style:{color:"#000"}},Ue==null?void 0:Ue.resetCount),"/",wt.createElement("span",null,Ue==null?void 0:Ue.total),"\uFF09"))))),wt.createElement("div",{className:bn.tabBar},Ge)),ni=({className:Ci,style:si={},children:Te})=>wt.createElement("div",{className:Le()(Ci),style:si},Te),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"},gn=bt(38854),Tn=bt(20834);const pn=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var On=({sortValue:Ci,dropValue:si,className:Te,onSort:Ee,onDrop:Wt,dataSource:Ge=pn})=>{var Ue;return wt.createElement("div",{className:Le()(Pi.orderWrap,Te)},wt.createElement(gn.Z,{dropdownRender:()=>wt.createElement(Tn.default,null,Ge.map((ue,qt)=>wt.createElement(Tn.default.Item,{key:qt,onClick:()=>Wt(ue.id)},ue.name)))},wt.createElement("span",{className:Pi.orderTextWrap},(Ue=Ge.find(ue=>si===ue.id))==null?void 0:Ue.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:()=>Ee(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:()=>Ee(Ci==="asc"?"desc":"asc")}))))},we={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"},In=bt(3113),rn=Object.defineProperty,ge=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,St=(Ci,si,Te)=>si in Ci?rn(Ci,si,{enumerable:!0,configurable:!0,writable:!0,value:Te}):Ci[si]=Te,mt=(Ci,si)=>{for(var Te in si||(si={}))oe.call(si,Te)&&St(Ci,Te,si[Te]);if(ge)for(var Te of ge(si))Ft.call(si,Te)&&St(Ci,Te,si[Te]);return Ci},At=(Ci,si)=>{var Te={};for(var Ee in Ci)oe.call(Ci,Ee)&&si.indexOf(Ee)<0&&(Te[Ee]=Ci[Ee]);if(Ci!=null&&ge)for(var Ee of ge(Ci))si.indexOf(Ee)<0&&Ft.call(Ci,Ee)&&(Te[Ee]=Ci[Ee]);return Te},Rt=(Ci,si,Te)=>new Promise((Ee,Wt)=>{var Ge=qt=>{try{ue(Te.next(qt))}catch(ze){Wt(ze)}},Ue=qt=>{try{ue(Te.throw(qt))}catch(ze){Wt(ze)}},ue=qt=>qt.done?Ee(qt.value):Promise.resolve(qt.value).then(Ge,Ue);ue((Te=Te.apply(Ci,si)).next())}),ae=Ci=>{var si=Ci,{className:Te,style:Ee,children:Wt,loading:Ge=!1,openLoading:Ue,onClick:ue=()=>{},size:qt="middle",shape:ze="round"}=si,sn=At(si,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Ln,Nn]=(0,wt.useState)(!1);return wt.createElement(In.ZP,mt({onClick:(0,ve.throttle)(ie=>Rt(void 0,null,function*(){Ue&&Nn(!0);try{yield ue(ie)}catch(Je){console.log("error",Je)}Ue&&Nn(!1)}),2e3,{leading:!0,trailing:!1}),className:Le()(we.btn,we[`${qt}-${ze}`],Te),style:Ee,size:qt,shape:ze,loading:Ln||Ge},sn),Wt)},De={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"},Be=({className:Ci,style:si,children:Te=null,onClick:Ee,title:Wt})=>wt.createElement("div",{className:Le()(De.head,Ci),style:si},wt.createElement("span",{className:"primary-hover",onClick:Ee},wt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),wt.createElement("b",{title:Wt},Wt),wt.createElement("div",{className:De.node},Te)),yn={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Kn=({confirmShow:Ci=!0,confirmTitle:si,confirmClick:Te,cancelShow:Ee=!0,cancelTitle:Wt,cancelClick:Ge,className:Ue,style:ue,confirmLoading:qt=!1})=>wt.createElement("div",{className:Le()(yn.btns,Ue),style:ue},Ci&&wt.createElement(In.ZP,{loading:qt,onClick:Te,type:"primary",className:yn.confirm},si),Ee&&wt.createElement(In.ZP,{onClick:Ge,className:yn.cancel},Wt)),Vn={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"},Ti=({className:Ci,style:si={},LeftContent:Te,children:Ee,RightContent:Wt})=>wt.createElement("div",{className:Le()(Vn.fixedBottom,Ci),style:si},wt.createElement("div",{className:Vn.wrap},wt.createElement("div",{className:Vn.left},Te),wt.createElement("div",{className:Vn.center},Ee),wt.createElement("div",{className:Vn.right},Wt))),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"},Io=({className:Ci,style:si={},dataSource:Te=[]})=>wt.createElement("div",{className:Le()(Xi.crumbs,Ci),style:si},Te.map((Ee,Wt)=>Wt<Te.length-1?wt.createElement(wt.Fragment,{key:Wt},Ee.path||Ee.onClick?wt.createElement("span",{className:Xi.hover,onClick:Ee!=null&&Ee.onClick?Ee.onClick:()=>Jn.history.push(Ee.path)},Ee.name):wt.createElement("span",null,Ee.name),wt.createElement("span",null,"\xA0",">","\xA0")):wt.createElement("span",{key:Wt,style:{color:"#5F6368"}},Ee.name))),Oo=bt(31797),co=Object.defineProperty,Do=Object.defineProperties,Qo=Object.getOwnPropertyDescriptors,Ai=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,jo=Object.prototype.propertyIsEnumerable,Mt=(Ci,si,Te)=>si in Ci?co(Ci,si,{enumerable:!0,configurable:!0,writable:!0,value:Te}):Ci[si]=Te,cr=(Ci,si)=>{for(var Te in si||(si={}))$o.call(si,Te)&&Mt(Ci,Te,si[Te]);if(Ai)for(var Te of Ai(si))jo.call(si,Te)&&Mt(Ci,Te,si[Te]);return Ci},ir=(Ci,si)=>Do(Ci,Qo(si)),pr=(Ci,si)=>{var Te={};for(var Ee in Ci)$o.call(Ci,Ee)&&si.indexOf(Ee)<0&&(Te[Ee]=Ci[Ee]);if(Ci!=null&&Ai)for(var Ee of Ai(Ci))si.indexOf(Ee)<0&&jo.call(Ci,Ee)&&(Te[Ee]=Ci[Ee]);return Te};const{Countdown:ts}=Oo.default;var ls=Ci=>{var si=Ci,{onChange:Te}=si,Ee=pr(si,["onChange"]);const[Wt,Ge]=(0,wt.useState)(null);(0,wt.useEffect)(()=>{typeof Wt=="number"&&Wt>=0&&Te(Wt)},[Wt]);const Ue=ue=>{const qt=Math.floor(ue/1e3);Ge(qt)};return wt.createElement(ts,ir(cr({},Ee),{onChange:Ue}))}},58856:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return ee}});var wt=bt(59301);function ee(he,Ie){const te=(0,wt.useRef)();(0,wt.useEffect)(()=>{te.current=he}),(0,wt.useEffect)(()=>{function Pe(){te.current()}if(Ie!==null){let Nt=setInterval(Pe,Ie);return()=>clearInterval(Nt)}},[Ie])}},25600:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return te}});var wt=bt(59301),ee=bt(71418),he={loading:"loading___lueiN"},te=({loading:Pe})=>Pe?wt.createElement("div",{className:he.loading},wt.createElement(ee.Z,null)):wt.createElement(wt.Fragment,null)},82238:function(dn,Mn,bt){"use strict";var wt=bt(59301),ee=bt(43418),he=bt(1710),Ie=bt(99064),te=bt(8797),Pe=bt(61186),Nt=bt.n(Pe),Le=bt(12290),ve=Object.defineProperty,Xt=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,je=(ht,lt,gt)=>lt in ht?ve(ht,lt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):ht[lt]=gt,Bt=(ht,lt)=>{for(var gt in lt||(lt={}))fe.call(lt,gt)&&je(ht,gt,lt[gt]);if(Xt)for(var gt of Xt(lt))xe.call(lt,gt)&&je(ht,gt,lt[gt]);return ht},et=(ht,lt,gt)=>new Promise((yt,Pt)=>{var Tt=_t=>{try{zt(gt.next(_t))}catch(se){Pt(se)}},It=_t=>{try{zt(gt.throw(_t))}catch(se){Pt(se)}},zt=_t=>_t.done?yt(_t.value):Promise.resolve(_t.value).then(Tt,It);zt((gt=gt.apply(ht,lt)).next())});const nt=({visible:ht,identifier:lt,challenge_id:gt,onCancle:yt,onOK:Pt})=>{const[Tt,It]=(0,wt.useState)(0),[zt,_t]=(0,wt.useState)([]),[se,Jt]=(0,wt.useState)(!1),[le,Zt]=(0,wt.useState)({page:1,limit:10}),Fe=()=>et(void 0,null,function*(){var me,Ve;Jt(!0);const Qe=yield(0,Ie.ZP)(`/api/shixuns/${lt}/challenges/${gt}/task_pass_histories.json`,{method:"get",params:Bt({},le)});(Qe==null?void 0:Qe.status)===0&&(It((me=Qe==null?void 0:Qe.data)==null?void 0:me.size),_t(((Ve=Qe==null?void 0:Qe.data)==null?void 0:Ve.list)||[])),Jt(!1)});return(0,wt.useEffect)(()=>{ht&&Fe()},[ht]),wt.createElement(ee.default,{centered:!0,destroyOnClose:!0,open:ht,title:"\u7248\u672C\u7BA1\u7406",footer:null,width:620,onCancel:()=>{le.page=1,le.limit=10,Zt(Bt({},le)),yt()}},wt.createElement(he.default,{scroll:{y:47*10},loading:se,dataSource:zt,locale:{emptyText:wt.createElement(te.Z,null)},columns:[{title:"\u7248\u672C\u4FDD\u5B58\u65F6\u95F4",dataIndex:"updated_at",ellipsis:!0,render:(me,Ve,Qe)=>Nt()(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,Qe){return wt.createElement("div",null,wt.createElement("a",{onClick:()=>{ee.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(Le.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*(){ee.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 ",Nt()(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),yt()})})}),className:"ml20"},"\u5207\u6362\u81F3\u8BE5\u7248\u672C"))}}],onChange:me=>{le.page=me==null?void 0:me.current,le.limit=me==null?void 0:me.pageSize,Fe(),Zt(Bt({},le))},pagination:{pageSize:le.limit,total:Tt,current:le.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")}}))};Mn.Z=nt},16349:function(dn,Mn,bt){"use strict";bt.d(Mn,{S:function(){return Pe},m:function(){return Nt}});var wt=bt(955),ee=bt(8591),he=bt(43418),Ie=bt(59301),te=(Le,ve,Xt)=>new Promise((fe,xe)=>{var je=nt=>{try{et(Xt.next(nt))}catch(ht){xe(ht)}},Bt=nt=>{try{et(Xt.throw(nt))}catch(ht){xe(ht)}},et=nt=>nt.done?fe(nt.value):Promise.resolve(nt.value).then(je,Bt);et((Xt=Xt.apply(Le,ve)).next())});const Pe=Le=>{let ve=document.createElement("textarea");return ve.value=Le,ve.value},Nt=(Le,ve,Xt,fe,xe)=>te(void 0,null,function*(){var je,Bt;const et=yield Le({type:"shixunsDetail/saveCopyForExercise",payload:{id:Xt,save_type:fe}});fe===1?((et==null?void 0:et.status)==0&&ee.ZP.success("\u4FDD\u5B58\u6210\u529F"),(je=et==null?void 0:et.data)!=null&&je.exists_same_shixun_name?Le({type:"classroomList/setActionTabs",payload:{key:"\u91CD\u540D\u4FEE\u6539",name:(Bt=et==null?void 0:et.data)==null?void 0:Bt.shixun_name}}):Le({type:"classroomList/setActionTabs",payload:{}})):(Le({type:"classroomList/setActionTabs",payload:{}}),(et==null?void 0:et.status)===0&&he.default.info({title:"\u63D0\u793A",width:460,icon:null,centered:!0,content:Ie.createElement("div",null,Ie.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=ve==null?void 0:ve.detail)==null?void 0:nt.fork_from)==null?void 0:ht.fork_identifier}/challenges`)}}))})},24768:function(dn,Mn,bt){"use strict";bt.d(Mn,{AL:function(){return Pt},Iy:function(){return fe},Qv:function(){return Bt},ez:function(){return yt},jb:function(){return xe}});var wt=bt(32834),ee=bt.n(wt),he=bt(11690),Ie=bt.n(he);let te=1;function Pe(se,Jt){const le=se.match(/^(\s+)(?:```)/);if(le===null)return Jt;const Zt=le[1];return Jt.split(`
|
|
|
`).map(Fe=>{const me=Fe.match(/^\s+/);if(me===null)return Fe;const[Ve]=me;return Ve.length>=Zt.length?Fe.slice(Zt.length):Fe}).join(`
|
|
|
`)}let Nt=[],Le=["<ul>"];const ve=new(ee()).Renderer,Xt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function fe(){Nt.length=0,Le=["<ul>"]}const xe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function je(se,Jt,le,Zt){if(Jt>=se.length||se[Jt].level<=le)return Jt;var Fe=se[Jt];Zt.push("<li><a href='#"+te+Fe.anchor+"'>"+Fe.text+"</a>"),Jt++;var me=[];return Jt=je(se,Jt,Fe.level,me),me.length>0&&(Zt.push("<ul>"),me.forEach(function(Ve){Zt.push(Ve)}),Zt.push("</ul>")),Zt.push("</li>"),Jt=je(se,Jt,le,Zt),Jt}function Bt(){return je(Nt,0,0,Le),Le.push("</ul>"),Le.join("")}const et={heading(se){const Jt=Xt.exec(se);if(te+=1,Jt)return{type:"heading",raw:Jt[0],depth:Jt[1].length,text:Jt[2]}},fences(se){const Jt=this.rules.block.fences.exec(se);if(Jt){const le=Jt[0];let Zt=Pe(le,Jt[3]||"");const Fe=Jt[2]?Jt[2].trim():Jt[2];if(["latex","katex","math"].indexOf(Fe)>=0){const me=lt(),Ve=Zt;Zt=me,gt[me]={type:"block",expression:Ve}}return{type:"code",raw:le,lang:Fe,text:Zt}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const lt=()=>`__special_katext_id_${ht++}__`;let gt={};function yt(){return gt}function Pt(){ht=0,gt={}}function Tt(se){return se=se.replace(nt,(Jt,le)=>{const Zt=lt();return gt[Zt]={type:"inline",expression:le},Zt}),se}const It=ve.listitem;ve.listitem=function(se){return It(Tt(se))};const zt=ve.paragraph;ve.paragraph=function(se){return zt(Tt(se))};const _t=ve.tablecell;ve.tablecell=function(se,Jt){return _t(Tt(se),Jt)},ve.code=function(se,Jt,le){const Zt=(Jt||"").match(/\S*/)[0];return Zt?["latex","katex","math"].indexOf(Zt)>=0?`<p class='editormd-tex'>${se}</p>`:`<pre class="prettyprint linenums"><code class="language-${Jt}">${le?se:(0,he.escape)(se,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(le?se:(0,he.escape)(se,!0))+"</code></pre>"},ve.heading=function(se,Jt,le){let Zt=this.options.headerPrefix+le.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Nt.push({anchor:Zt,level:Jt,text:se}),"<h"+Jt+' id="'+te+Zt+'">'+se+"</h"+Jt+">"},ee().setOptions({silent:!0,gfm:!0,pedantic:!1}),ee().use({tokenizer:et,renderer:ve}),Mn.ZP=ee()},50371:function(dn,Mn){"use strict";function bt(){const wt=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let ee=1;ee<arguments.length;ee++){const he=ee<0||arguments.length<=ee?void 0:arguments[ee];he&&Object.keys(he).forEach(Ie=>{const te=he[Ie];te!==void 0&&(wt[Ie]=te)})}return wt}Mn.Z=bt},77578:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return wt}});const wt=ee=>ee?typeof ee=="function"?ee():ee:null},13845:function(dn,Mn,bt){"use strict";bt.d(Mn,{F:function(){return wt},Z:function(){return ee}});function wt(he){return he!=null&&he===he.window}function ee(he,Ie){var te,Pe;if(typeof window=="undefined")return 0;const Nt=Ie?"scrollTop":"scrollLeft";let Le=0;return wt(he)?Le=he[Ie?"pageYOffset":"pageXOffset"]:he instanceof Document?Le=he.documentElement[Nt]:(he instanceof HTMLElement||he)&&(Le=he[Nt]),he&&!wt(he)&&typeof Le!="number"&&(Le=(Pe=((te=he.ownerDocument)!==null&&te!==void 0?te:he).documentElement)===null||Pe===void 0?void 0:Pe[Nt]),Le}},68031:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Ie}});var wt=bt(16089);function ee(te,Pe,Nt,Le){const ve=Nt-Pe;return te/=Le/2,te<1?ve/2*te*te*te+Pe:ve/2*((te-=2)*te*te+2)+Pe}var he=bt(13845);function Ie(te){let Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Nt=()=>window,callback:Le,duration:ve=450}=Pe,Xt=Nt(),fe=(0,he.Z)(Xt,!0),xe=Date.now(),je=()=>{const et=Date.now()-xe,nt=ee(et>ve?ve:et,fe,te,ve);(0,he.F)(Xt)?Xt.scrollTo(window.pageXOffset,nt):Xt instanceof Document||Xt.constructor.name==="HTMLDocument"?Xt.documentElement.scrollTop=nt:Xt.scrollTop=nt,et<ve?(0,wt.Z)(je):typeof Le=="function"&&Le()};(0,wt.Z)(je)}},93891:function(dn,Mn,bt){"use strict";var wt=bt(59301),ee=bt(36355),he=bt(64165);const Ie=te=>{const{componentName:Pe}=te,{getPrefixCls:Nt}=(0,wt.useContext)(ee.E_),Le=Nt("empty");switch(Pe){case"Table":case"List":return wt.createElement(he.Z,{image:he.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return wt.createElement(he.Z,{image:he.Z.PRESENTED_IMAGE_SIMPLE,className:`${Le}-small`});default:return wt.createElement(he.Z,null)}};Mn.Z=Ie},78241:function(dn,Mn,bt){"use strict";bt.d(Mn,{default:function(){return Ee}});var wt=bt(80702),ee=bt(92310),he=bt.n(ee),Ie=bt(77900),te=bt(59301),Pe=bt(62892),Nt=bt(32441);function Le(Wt){const[Ge,Ue]=te.useState(Wt);return te.useEffect(()=>{const ue=setTimeout(()=>{Ue(Wt)},Wt.length?0:10);return()=>{clearTimeout(ue)}},[Wt]),Ge}var ve=bt(17313),Xt=bt(29878),fe=bt(8378),xe=bt(37613),je=bt(83116),et=Wt=>{const{componentCls:Ge}=Wt,Ue=`${Ge}-show-help`,ue=`${Ge}-show-help-item`;return{[Ue]:{transition:`opacity ${Wt.motionDurationSlow} ${Wt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[ue]:{overflow:"hidden",transition:`height ${Wt.motionDurationSlow} ${Wt.motionEaseInOut},
|
|
|
opacity ${Wt.motionDurationSlow} ${Wt.motionEaseInOut},
|
|
|
transform ${Wt.motionDurationSlow} ${Wt.motionEaseInOut} !important`,[`&${ue}-appear, &${ue}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${ue}-leave-active`]:{transform:"translateY(-5px)"}}}}};const nt=Wt=>({legend:{display:"block",width:"100%",marginBottom:Wt.marginLG,padding:0,color:Wt.colorTextDescription,fontSize:Wt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Wt.lineWidth}px ${Wt.lineType} ${Wt.colorBorder}`},label:{fontSize:Wt.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Wt.controlOutlineWidth}px ${Wt.controlOutline}`},output:{display:"block",paddingTop:15,color:Wt.colorText,fontSize:Wt.fontSize,lineHeight:Wt.lineHeight}}),ht=(Wt,Ge)=>{const{formItemCls:Ue}=Wt;return{[Ue]:{[`${Ue}-label > label`]:{height:Ge},[`${Ue}-control-input`]:{minHeight:Ge}}}},lt=Wt=>{const{componentCls:Ge}=Wt;return{[Wt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ve.Wf)(Wt)),nt(Wt)),{[`${Ge}-text`]:{display:"inline-block",paddingInlineEnd:Wt.paddingSM},"&-small":Object.assign({},ht(Wt,Wt.controlHeightSM)),"&-large":Object.assign({},ht(Wt,Wt.controlHeightLG))})}},gt=Wt=>{const{formItemCls:Ge,iconCls:Ue,componentCls:ue,rootPrefixCls:qt,labelRequiredMarkColor:ze,labelColor:sn,labelFontSize:Ln,labelHeight:Nn,labelColonMarginInlineStart:ie,labelColonMarginInlineEnd:Je,itemMarginBottom:Cn}=Wt;return{[Ge]:Object.assign(Object.assign({},(0,ve.Wf)(Wt)),{marginBottom:Cn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${qt}-row`]:{display:"none"},"&-has-warning":{[`${Ge}-split`]:{color:Wt.colorError}},"&-has-error":{[`${Ge}-split`]:{color:Wt.colorWarning}},[`${Ge}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Wt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Nn,color:sn,fontSize:Ln,[`> ${Ue}`]:{fontSize:Wt.fontSize,verticalAlign:"top"},[`&${Ge}-required:not(${Ge}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Wt.marginXXS,color:ze,fontSize:Wt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${ue}-hide-required-mark &`]:{display:"none"}},[`${Ge}-optional`]:{display:"inline-block",marginInlineStart:Wt.marginXXS,color:Wt.colorTextDescription,[`${ue}-hide-required-mark &`]:{display:"none"}},[`${Ge}-tooltip`]:{color:Wt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Wt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:ie,marginInlineEnd:Je},[`&${Ge}-no-colon::after`]:{content:'"\\a0"'}}},[`${Ge}-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:Wt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Ge]:{"&-explain, &-extra":{clear:"both",color:Wt.colorTextDescription,fontSize:Wt.fontSize,lineHeight:Wt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Wt.controlHeightSM,transition:`color ${Wt.motionDurationMid} ${Wt.motionEaseOut}`},"&-explain":{"&-error":{color:Wt.colorError},"&-warning":{color:Wt.colorWarning}}},[`&-with-help ${Ge}-explain`]:{height:"auto",opacity:1},[`${Ge}-feedback-icon`]:{fontSize:Wt.fontSize,textAlign:"center",visibility:"visible",animationName:Xt.kr,animationDuration:Wt.motionDurationMid,animationTimingFunction:Wt.motionEaseOutBack,pointerEvents:"none","&-success":{color:Wt.colorSuccess},"&-error":{color:Wt.colorError},"&-warning":{color:Wt.colorWarning},"&-validating":{color:Wt.colorPrimary}}})}},yt=Wt=>{const{componentCls:Ge,formItemCls:Ue}=Wt;return{[`${Ge}-horizontal`]:{[`${Ue}-label`]:{flexGrow:0},[`${Ue}-control`]:{flex:"1 1 0",minWidth:0},[`${Ue}-label[class$='-24'], ${Ue}-label[class*='-24 ']`]:{[`& + ${Ue}-control`]:{minWidth:"unset"}}}}},Pt=Wt=>{const{componentCls:Ge,formItemCls:Ue}=Wt;return{[`${Ge}-inline`]:{display:"flex",flexWrap:"wrap",[Ue]:{flex:"none",marginInlineEnd:Wt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Ue}-label,
|
|
|
> ${Ue}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Ue}-label`]:{flex:"none"},[`${Ge}-text`]:{display:"inline-block"},[`${Ue}-has-feedback`]:{display:"inline-block"}}}}},Tt=Wt=>({padding:Wt.verticalLabelPadding,margin:Wt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),It=Wt=>{const{componentCls:Ge,formItemCls:Ue,rootPrefixCls:ue}=Wt;return{[`${Ue} ${Ue}-label`]:Tt(Wt),[Ge]:{[Ue]:{flexWrap:"wrap",[`${Ue}-label, ${Ue}-control`]:{[`&:not([class*=" ${ue}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},zt=Wt=>{const{componentCls:Ge,formItemCls:Ue,rootPrefixCls:ue}=Wt;return{[`${Ge}-vertical`]:{[Ue]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Ge}-item-control`]:{width:"100%"}}},[`${Ge}-vertical ${Ue}-label,
|
|
|
.${ue}-col-24${Ue}-label,
|
|
|
.${ue}-col-xl-24${Ue}-label`]:Tt(Wt),[`@media (max-width: ${Wt.screenXSMax}px)`]:[It(Wt),{[Ge]:{[`.${ue}-col-xs-24${Ue}-label`]:Tt(Wt)}}],[`@media (max-width: ${Wt.screenSMMax}px)`]:{[Ge]:{[`.${ue}-col-sm-24${Ue}-label`]:Tt(Wt)}},[`@media (max-width: ${Wt.screenMDMax}px)`]:{[Ge]:{[`.${ue}-col-md-24${Ue}-label`]:Tt(Wt)}},[`@media (max-width: ${Wt.screenLGMax}px)`]:{[Ge]:{[`.${ue}-col-lg-24${Ue}-label`]:Tt(Wt)}}}},_t=(Wt,Ge)=>(0,xe.TS)(Wt,{formItemCls:`${Wt.componentCls}-item`,rootPrefixCls:Ge});var se=(0,je.Z)("Form",(Wt,Ge)=>{let{rootPrefixCls:Ue}=Ge;const ue=_t(Wt,Ue);return[lt(ue),gt(ue),et(ue),yt(ue),Pt(ue),zt(ue),(0,fe.Z)(ue),Xt.kr]},Wt=>({labelRequiredMarkColor:Wt.colorError,labelColor:Wt.colorTextHeading,labelFontSize:Wt.fontSize,labelHeight:Wt.controlHeight,labelColonMarginInlineStart:Wt.marginXXS/2,labelColonMarginInlineEnd:Wt.marginXS,itemMarginBottom:Wt.marginLG,verticalLabelPadding:`0 0 ${Wt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Jt=[];function le(Wt,Ge,Ue){let ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Wt=="string"?Wt:`${Ge}-${ue}`,error:Wt,errorStatus:Ue}}var Fe=Wt=>{let{help:Ge,helpStatus:Ue,errors:ue=Jt,warnings:qt=Jt,className:ze,fieldId:sn,onVisibleChanged:Ln}=Wt;const{prefixCls:Nn}=te.useContext(Nt.Rk),ie=`${Nn}-item-explain`,[,Je]=se(Nn),Cn=(0,te.useMemo)(()=>(0,Pe.Z)(Nn),[Nn]),$n=Le(ue),We=Le(qt),Ye=te.useMemo(()=>Ge!=null?[le(Ge,"help",Ue)]:[].concat((0,wt.Z)($n.map((Zn,fi)=>le(Zn,"error","error",fi))),(0,wt.Z)(We.map((Zn,fi)=>le(Zn,"warning","warning",fi)))),[Ge,Ue,$n,We]),zn={};return sn&&(zn.id=`${sn}_help`),te.createElement(Ie.default,{motionDeadline:Cn.motionDeadline,motionName:`${Nn}-show-help`,visible:!!Ye.length,onVisibleChanged:Ln},Zn=>{const{className:fi,style:Hn}=Zn;return te.createElement("div",Object.assign({},zn,{className:he()(ie,fi,ze,Je),style:Hn,role:"alert"}),te.createElement(Ie.CSSMotionList,Object.assign({keys:Ye},(0,Pe.Z)(Nn),{motionName:`${Nn}-show-help-item`,component:!1}),ti=>{const{key:Qn,error:wi,errorStatus:Qi,className:qi,style:_e}=ti;return te.createElement("div",{key:Qn,className:he()(qi,{[`${ie}-${Qi}`]:Qi}),style:_e},wi)}))})},me=bt(95013),Ve=bt(36355),Qe=bt(1684),qe=bt(52946),vn=bt(19716),xn=bt(16722);const Se=["parentNode"],Vt="form_item";function Xe(Wt){return Wt===void 0||Wt===!1?[]:Array.isArray(Wt)?Wt:[Wt]}function Xn(Wt,Ge){if(!Wt.length)return;const Ue=Wt.join("_");return Ge?`${Ge}_${Ue}`:Se.includes(Ue)?`${Vt}_${Ue}`:Ue}function Bn(Wt,Ge,Ue,ue,qt,ze){let sn=ue;return ze!==void 0?sn=ze:Ue.validating?sn="validating":Wt.length?sn="error":Ge.length?sn="warning":(Ue.touched||qt&&Ue.validated)&&(sn="success"),sn}function Ae(Wt){return Xe(Wt).join("_")}function hn(Wt){const[Ge]=(0,me.useForm)(),Ue=te.useRef({}),ue=te.useMemo(()=>Wt!=null?Wt:Object.assign(Object.assign({},Ge),{__INTERNAL__:{itemRef:qt=>ze=>{const sn=Ae(qt);ze?Ue.current[sn]=ze:delete Ue.current[sn]}},scrollToField:function(qt){let ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const sn=Xe(qt),Ln=Xn(sn,ue.__INTERNAL__.name),Nn=Ln?document.getElementById(Ln):null;Nn&&(0,xn.Z)(Nn,Object.assign({scrollMode:"if-needed",block:"nearest"},ze))},getFieldInstance:qt=>{const ze=Ae(qt);return Ue.current[ze]}}),[Wt,Ge]);return[ue]}var bn=bt(28726),Jn=function(Wt,Ge){var Ue={};for(var ue in Wt)Object.prototype.hasOwnProperty.call(Wt,ue)&&Ge.indexOf(ue)<0&&(Ue[ue]=Wt[ue]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ue=Object.getOwnPropertySymbols(Wt);qt<ue.length;qt++)Ge.indexOf(ue[qt])<0&&Object.prototype.propertyIsEnumerable.call(Wt,ue[qt])&&(Ue[ue[qt]]=Wt[ue[qt]]);return Ue};const mn=(Wt,Ge)=>{const Ue=te.useContext(Qe.Z),{getPrefixCls:ue,direction:qt,form:ze}=te.useContext(Ve.E_),{prefixCls:sn,className:Ln,rootClassName:Nn,size:ie,disabled:Je=Ue,form:Cn,colon:$n,labelAlign:We,labelWrap:Ye,labelCol:zn,wrapperCol:Zn,hideRequiredMark:fi,layout:Hn="horizontal",scrollToFirstError:ti,requiredMark:Qn,onFinishFailed:wi,name:Qi,style:qi,feedbackIcons:_e}=Wt,lo=Jn(Wt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Eo=(0,vn.Z)(ie),zo=te.useContext(bn.Z),Ze=(0,te.useMemo)(()=>Qn!==void 0?Qn:ze&&ze.requiredMark!==void 0?ze.requiredMark:!fi,[fi,Qn,ze]),jn=$n!=null?$n:ze==null?void 0:ze.colon,ei=ue("form",sn),[Mi,vi]=se(ei),mi=he()(ei,`${ei}-${Hn}`,{[`${ei}-hide-required-mark`]:Ze===!1,[`${ei}-rtl`]:qt==="rtl",[`${ei}-${Eo}`]:Eo},vi,ze==null?void 0:ze.className,Ln,Nn),[Ui]=hn(Cn),{__INTERNAL__:ki}=Ui;ki.name=Qi;const Hi=(0,te.useMemo)(()=>({name:Qi,labelAlign:We,labelCol:zn,labelWrap:Ye,wrapperCol:Zn,vertical:Hn==="vertical",colon:jn,requiredMark:Ze,itemRef:ki.itemRef,form:Ui,feedbackIcons:_e}),[Qi,We,zn,Zn,Hn,jn,Ze,Ui,_e]);te.useImperativeHandle(Ge,()=>Ui);const uo=(Jo,nn)=>{if(Jo){let ho={block:"nearest"};typeof Jo=="object"&&(ho=Jo),Ui.scrollToField(nn,ho)}},un=Jo=>{if(wi==null||wi(Jo),Jo.errorFields.length){const nn=Jo.errorFields[0].name;if(ti!==void 0){uo(ti,nn);return}ze&&ze.scrollToFirstError!==void 0&&uo(ze.scrollToFirstError,nn)}};return Mi(te.createElement(Qe.n,{disabled:Je},te.createElement(qe.q,{size:Eo},te.createElement(Nt.RV,Object.assign({},{validateMessages:zo}),te.createElement(Nt.q3.Provider,{value:Hi},te.createElement(me.default,Object.assign({id:Qi},lo,{name:Qi,onFinishFailed:un,form:Ui,style:Object.assign(Object.assign({},ze==null?void 0:ze.style),qi),className:mi})))))))};var Ce=te.forwardRef(mn),ni=bt(41799),Pi=bt(8654),gn=bt(92343),Tn=bt(11592);function pn(Wt){if(typeof Wt=="function")return Wt;const Ge=(0,Tn.Z)(Wt);return Ge.length<=1?Ge[0]:Ge}const Un=()=>{const{status:Wt,errors:Ge=[],warnings:Ue=[]}=(0,te.useContext)(Nt.aM);return{status:Wt,errors:Ge,warnings:Ue}};Un.Context=Nt.aM;var On=Un,we=bt(16089);function In(Wt){const[Ge,Ue]=te.useState(Wt),ue=(0,te.useRef)(null),qt=(0,te.useRef)([]),ze=(0,te.useRef)(!1);te.useEffect(()=>(ze.current=!1,()=>{ze.current=!0,we.Z.cancel(ue.current),ue.current=null}),[]);function sn(Ln){ze.current||(ue.current===null&&(qt.current=[],ue.current=(0,we.Z)(()=>{ue.current=null,Ue(Nn=>{let ie=Nn;return qt.current.forEach(Je=>{ie=Je(ie)}),ie})})),qt.current.push(Ln))}return[Ge,sn]}function rn(){const{itemRef:Wt}=te.useContext(Nt.q3),Ge=te.useRef({});function Ue(ue,qt){const ze=qt&&typeof qt=="object"&&qt.ref,sn=ue.join("_");return(Ge.current.name!==sn||Ge.current.originRef!==ze)&&(Ge.current.name=sn,Ge.current.originRef=ze,Ge.current.ref=(0,Pi.sQ)(Wt(ue),ze)),Ge.current.ref}return Ue}var ge=bt(29194),oe=bt(34280),Ft=bt(2738),St=bt(27382),mt=bt(37028);const At=Wt=>{const{formItemCls:Ge}=Wt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Ge}-control`]:{display:"flex"}}}};var Rt=(0,je.b)(["Form","item-item"],(Wt,Ge)=>{let{rootPrefixCls:Ue}=Ge;const ue=_t(Wt,Ue);return[At(ue)]}),ae=Wt=>{const{prefixCls:Ge,status:Ue,wrapperCol:ue,children:qt,errors:ze,warnings:sn,_internalItemRender:Ln,extra:Nn,help:ie,fieldId:Je,marginBottom:Cn,onErrorVisibleChanged:$n}=Wt,We=`${Ge}-item`,Ye=te.useContext(Nt.q3),zn=ue||Ye.wrapperCol||{},Zn=he()(`${We}-control`,zn.className),fi=te.useMemo(()=>Object.assign({},Ye),[Ye]);delete fi.labelCol,delete fi.wrapperCol;const Hn=te.createElement("div",{className:`${We}-control-input`},te.createElement("div",{className:`${We}-control-input-content`},qt)),ti=te.useMemo(()=>({prefixCls:Ge,status:Ue}),[Ge,Ue]),Qn=Cn!==null||ze.length||sn.length?te.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},te.createElement(Nt.Rk.Provider,{value:ti},te.createElement(Fe,{fieldId:Je,errors:ze,warnings:sn,help:ie,helpStatus:Ue,className:`${We}-explain-connected`,onVisibleChanged:$n})),!!Cn&&te.createElement("div",{style:{width:0,height:Cn}})):null,wi={};Je&&(wi.id=`${Je}_extra`);const Qi=Nn?te.createElement("div",Object.assign({},wi,{className:`${We}-extra`}),Nn):null,qi=Ln&&Ln.mark==="pro_table_render"&&Ln.render?Ln.render(Wt,{input:Hn,errorList:Qn,extra:Qi}):te.createElement(te.Fragment,null,Hn,Qn,Qi);return te.createElement(Nt.q3.Provider,{value:fi},te.createElement(mt.Z,Object.assign({},zn,{className:Zn}),qi),te.createElement(Rt,{prefixCls:Ge}))},De=bt(61485),Oe=bt(31724),Be=bt(9763),yn=bt(6848),Gn=function(Wt,Ge){var Ue={};for(var ue in Wt)Object.prototype.hasOwnProperty.call(Wt,ue)&&Ge.indexOf(ue)<0&&(Ue[ue]=Wt[ue]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ue=Object.getOwnPropertySymbols(Wt);qt<ue.length;qt++)Ge.indexOf(ue[qt])<0&&Object.prototype.propertyIsEnumerable.call(Wt,ue[qt])&&(Ue[ue[qt]]=Wt[ue[qt]]);return Ue};function Kn(Wt){return Wt?typeof Wt=="object"&&!te.isValidElement(Wt)?Wt:{title:Wt}:null}var gi=Wt=>{let{prefixCls:Ge,label:Ue,htmlFor:ue,labelCol:qt,labelAlign:ze,colon:sn,required:Ln,requiredMark:Nn,tooltip:ie}=Wt;var Je;const[Cn]=(0,Be.Z)("Form"),{vertical:$n,labelAlign:We,labelCol:Ye,labelWrap:zn,colon:Zn}=te.useContext(Nt.q3);if(!Ue)return null;const fi=qt||Ye||{},Hn=ze||We,ti=`${Ge}-item-label`,Qn=he()(ti,Hn==="left"&&`${ti}-left`,fi.className,{[`${ti}-wrap`]:!!zn});let wi=Ue;const Qi=sn===!0||Zn!==!1&&sn!==!1;Qi&&!$n&&typeof Ue=="string"&&Ue.trim()!==""&&(wi=Ue.replace(/[:|:]\s*$/,""));const _e=Kn(ie);if(_e){const{icon:Ze=te.createElement(De.Z,null)}=_e,jn=Gn(_e,["icon"]),ei=te.createElement(yn.Z,Object.assign({},jn),te.cloneElement(Ze,{className:`${Ge}-item-tooltip`,title:""}));wi=te.createElement(te.Fragment,null,wi,ei)}const lo=Nn==="optional",Eo=typeof Nn=="function";Eo?wi=Nn(wi,{required:!!Ln}):lo&&!Ln&&(wi=te.createElement(te.Fragment,null,wi,te.createElement("span",{className:`${Ge}-item-optional`,title:""},(Cn==null?void 0:Cn.optional)||((Je=Oe.Z.Form)===null||Je===void 0?void 0:Je.optional))));const zo=he()({[`${Ge}-item-required`]:Ln,[`${Ge}-item-required-mark-optional`]:lo||Eo,[`${Ge}-item-no-colon`]:!Qi});return te.createElement(mt.Z,Object.assign({},fi,{className:Qn}),te.createElement("label",{htmlFor:ue,className:zo,title:typeof Ue=="string"?Ue:""},wi))},Ti=bt(29679),Xi=bt(19248),Mo=bt(96512),Io=bt(58617);const Oo={success:Ti.Z,warning:Mo.Z,error:Xi.Z,validating:Io.Z};function co(Wt){let{children:Ge,errors:Ue,warnings:ue,hasFeedback:qt,validateStatus:ze,prefixCls:sn,meta:Ln,noStyle:Nn}=Wt;const ie=`${sn}-item`,{feedbackIcons:Je}=te.useContext(Nt.q3),Cn=Bn(Ue,ue,Ln,null,!!qt,ze),{isFormItemInput:$n,status:We}=te.useContext(Nt.aM),Ye=te.useMemo(()=>{var zn;let Zn;if(qt){const ti=qt!==!0&&qt.icons||Je,Qn=Cn&&((zn=ti==null?void 0:ti({status:Cn,errors:Ue,warnings:ue}))===null||zn===void 0?void 0:zn[Cn]),wi=Cn&&Oo[Cn];Zn=Qn!==!1&&wi?te.createElement("span",{className:he()(`${ie}-feedback-icon`,`${ie}-feedback-icon-${Cn}`)},Qn||te.createElement(wi,null)):null}let fi=!0,Hn=Cn||"";return Nn&&(fi=$n,Hn=(Cn!=null?Cn:We)||""),{status:Hn,errors:Ue,warnings:ue,hasFeedback:!!qt,feedbackIcon:Zn,isFormItemInput:fi}},[Cn,qt,Nn,$n,We]);return te.createElement(Nt.aM.Provider,{value:Ye},Ge)}var Do=function(Wt,Ge){var Ue={};for(var ue in Wt)Object.prototype.hasOwnProperty.call(Wt,ue)&&Ge.indexOf(ue)<0&&(Ue[ue]=Wt[ue]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ue=Object.getOwnPropertySymbols(Wt);qt<ue.length;qt++)Ge.indexOf(ue[qt])<0&&Object.prototype.propertyIsEnumerable.call(Wt,ue[qt])&&(Ue[ue[qt]]=Wt[ue[qt]]);return Ue};function Qo(Wt){const{prefixCls:Ge,className:Ue,rootClassName:ue,style:qt,help:ze,errors:sn,warnings:Ln,validateStatus:Nn,meta:ie,hasFeedback:Je,hidden:Cn,children:$n,fieldId:We,required:Ye,isRequired:zn,onSubItemMetaChange:Zn}=Wt,fi=Do(Wt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Hn=`${Ge}-item`,{requiredMark:ti}=te.useContext(Nt.q3),Qn=te.useRef(null),wi=Le(sn),Qi=Le(Ln),qi=ze!=null,_e=!!(qi||sn.length||Ln.length),lo=!!Qn.current&&(0,ge.Z)(Qn.current),[Eo,zo]=te.useState(null);(0,oe.Z)(()=>{if(_e&&Qn.current){const vi=getComputedStyle(Qn.current);zo(parseInt(vi.marginBottom,10))}},[_e,lo]);const Ze=vi=>{vi||zo(null)},ei=function(){let vi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const mi=vi?wi:ie.errors,Ui=vi?Qi:ie.warnings;return Bn(mi,Ui,ie,"",!!Je,Nn)}(),Mi=he()(Hn,Ue,ue,{[`${Hn}-with-help`]:qi||wi.length||Qi.length,[`${Hn}-has-feedback`]:ei&&Je,[`${Hn}-has-success`]:ei==="success",[`${Hn}-has-warning`]:ei==="warning",[`${Hn}-has-error`]:ei==="error",[`${Hn}-is-validating`]:ei==="validating",[`${Hn}-hidden`]:Cn});return te.createElement("div",{className:Mi,style:qt,ref:Qn},te.createElement(St.Z,Object.assign({className:`${Hn}-row`},(0,Ft.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"])),te.createElement(gi,Object.assign({htmlFor:We},Wt,{requiredMark:ti,required:Ye!=null?Ye:zn,prefixCls:Ge})),te.createElement(ae,Object.assign({},Wt,ie,{errors:wi,warnings:Qi,prefixCls:Ge,status:ei,help:ze,marginBottom:Eo,onErrorVisibleChanged:Ze}),te.createElement(Nt.qI.Provider,{value:Zn},te.createElement(co,{prefixCls:Ge,meta:ie,errors:ie.errors,warnings:ie.warnings,hasFeedback:Je,validateStatus:ei},$n)))),!!Eo&&te.createElement("div",{className:`${Hn}-margin-offset`,style:{marginBottom:-Eo}}))}const Ai="__SPLIT__",$o=null,jo=te.memo(Wt=>{let{children:Ge}=Wt;return Ge},(Wt,Ge)=>Wt.value===Ge.value&&Wt.update===Ge.update&&Wt.childProps.length===Ge.childProps.length&&Wt.childProps.every((Ue,ue)=>Ue===Ge.childProps[ue]));function Mt(Wt){return Wt!=null}function cr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function ir(Wt){const{name:Ge,noStyle:Ue,className:ue,dependencies:qt,prefixCls:ze,shouldUpdate:sn,rules:Ln,children:Nn,required:ie,label:Je,messageVariables:Cn,trigger:$n="onChange",validateTrigger:We,hidden:Ye,help:zn}=Wt,{getPrefixCls:Zn}=te.useContext(Ve.E_),{name:fi}=te.useContext(Nt.q3),Hn=pn(Nn),ti=typeof Hn=="function",Qn=te.useContext(Nt.qI),{validateTrigger:wi}=te.useContext(me.FieldContext),Qi=We!==void 0?We:wi,qi=Mt(Ge),_e=Zn("form",ze),[lo,Eo]=se(_e),zo=te.useContext(me.ListContext),Ze=te.useRef(),[jn,ei]=In({}),[Mi,vi]=(0,ni.Z)(()=>cr()),mi=nn=>{const ho=zo==null?void 0:zo.getKey(nn.name);if(vi(nn.destroy?cr():nn,!0),Ue&&zn!==!1&&Qn){let Er=nn.name;if(nn.destroy)Er=Ze.current||Er;else if(ho!==void 0){const[Ho,Fr]=ho;Er=[Ho].concat((0,wt.Z)(Fr)),Ze.current=Er}Qn(nn,Er)}},Ui=(nn,ho)=>{ei(Er=>{const Ho=Object.assign({},Er),mr=[].concat((0,wt.Z)(nn.name.slice(0,-1)),(0,wt.Z)(ho)).join(Ai);return nn.destroy?delete Ho[mr]:Ho[mr]=nn,Ho})},[ki,Hi]=te.useMemo(()=>{const nn=(0,wt.Z)(Mi.errors),ho=(0,wt.Z)(Mi.warnings);return Object.values(jn).forEach(Er=>{nn.push.apply(nn,(0,wt.Z)(Er.errors||[])),ho.push.apply(ho,(0,wt.Z)(Er.warnings||[]))}),[nn,ho]},[jn,Mi.errors,Mi.warnings]),uo=rn();function un(nn,ho,Er){return Ue&&!Ye?te.createElement(co,{prefixCls:_e,hasFeedback:Wt.hasFeedback,validateStatus:Wt.validateStatus,meta:Mi,errors:ki,warnings:Hi,noStyle:!0},nn):te.createElement(Qo,Object.assign({key:"row"},Wt,{className:he()(ue,Eo),prefixCls:_e,fieldId:ho,isRequired:Er,errors:ki,warnings:Hi,meta:Mi,onSubItemMetaChange:Ui}),nn)}if(!qi&&!ti&&!qt)return lo(un(Hn));let Jo={};return typeof Je=="string"?Jo.label=Je:Ge&&(Jo.label=String(Ge)),Cn&&(Jo=Object.assign(Object.assign({},Jo),Cn)),lo(te.createElement(me.Field,Object.assign({},Wt,{messageVariables:Jo,trigger:$n,validateTrigger:Qi,onMetaChange:mi}),(nn,ho,Er)=>{const Ho=Xe(Ge).length&&ho?ho.name:[],Fr=Xn(Ho,fi),mr=ie!==void 0?ie:!!(Ln&&Ln.some(So=>{if(So&&typeof So=="object"&&So.required&&!So.warningOnly)return!0;if(typeof So=="function"){const ko=So(Er);return ko&&ko.required&&!ko.warningOnly}return!1})),Oi=Object.assign({},nn);let Li=null;if(Array.isArray(Hn)&&qi)Li=Hn;else if(!(ti&&(!(sn||qt)||qi))){if(!(qt&&!ti&&!qi))if((0,gn.l$)(Hn)){const So=Object.assign(Object.assign({},Hn.props),Oi);if(So.id||(So.id=Fr),zn||ki.length>0||Hi.length>0||Wt.extra){const jt=[];(zn||ki.length>0)&&jt.push(`${Fr}_help`),Wt.extra&&jt.push(`${Fr}_extra`),So["aria-describedby"]=jt.join(" ")}ki.length>0&&(So["aria-invalid"]="true"),mr&&(So["aria-required"]="true"),(0,Pi.Yr)(Hn)&&(So.ref=uo(Ho,Hn)),new Set([].concat((0,wt.Z)(Xe($n)),(0,wt.Z)(Xe(Qi)))).forEach(jt=>{So[jt]=function(){for(var _o,xr,es,cs,us,no=arguments.length,$i=new Array(no),Zo=0;Zo<no;Zo++)$i[Zo]=arguments[Zo];(es=Oi[jt])===null||es===void 0||(_o=es).call.apply(_o,[Oi].concat($i)),(us=(cs=Hn.props)[jt])===null||us===void 0||(xr=us).call.apply(xr,[cs].concat($i))}});const _n=[So["aria-required"],So["aria-invalid"],So["aria-describedby"]];Li=te.createElement(jo,{value:Oi[Wt.valuePropName||"value"],update:Hn,childProps:_n},(0,gn.Tm)(Hn,So))}else ti&&(sn||qt)&&!qi?Li=Hn(Er):Li=Hn}return un(Li,Fr,mr)}))}const pr=ir;pr.useStatus=On;var ts=pr,rs=function(Wt,Ge){var Ue={};for(var ue in Wt)Object.prototype.hasOwnProperty.call(Wt,ue)&&Ge.indexOf(ue)<0&&(Ue[ue]=Wt[ue]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,ue=Object.getOwnPropertySymbols(Wt);qt<ue.length;qt++)Ge.indexOf(ue[qt])<0&&Object.prototype.propertyIsEnumerable.call(Wt,ue[qt])&&(Ue[ue[qt]]=Wt[ue[qt]]);return Ue},Ci=Wt=>{var{prefixCls:Ge,children:Ue}=Wt,ue=rs(Wt,["prefixCls","children"]);const{getPrefixCls:qt}=te.useContext(Ve.E_),ze=qt("form",Ge),sn=te.useMemo(()=>({prefixCls:ze,status:"error"}),[ze]);return te.createElement(me.List,Object.assign({},ue),(Ln,Nn,ie)=>te.createElement(Nt.Rk.Provider,{value:sn},Ue(Ln.map(Je=>Object.assign(Object.assign({},Je),{fieldKey:Je.key})),Nn,{errors:ie.errors,warnings:ie.warnings})))};function si(){const{form:Wt}=(0,te.useContext)(Nt.q3);return Wt}const Te=Ce;Te.Item=ts,Te.List=Ci,Te.ErrorList=Fe,Te.useForm=hn,Te.useFormInstance=si,Te.useWatch=me.useWatch,Te.Provider=Nt.RV,Te.create=()=>{};var Ee=Te},8628:function(dn,Mn,bt){"use strict";var wt=bt(59301),ee=bt(34280),he=bt(56762),Ie=bt(69507);function te(){let Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Nt=(0,wt.useRef)({}),Le=(0,he.Z)(),ve=(0,Ie.ZP)();return(0,ee.Z)(()=>{const Xt=ve.subscribe(fe=>{Nt.current=fe,Pe&&Le()});return()=>ve.unsubscribe(Xt)},[]),Nt.current}Mn.Z=te},58421:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return rn}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(oe,Ft){return ee.createElement(te.Z,(0,wt.Z)({},oe,{ref:Ft,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt,ve=bt(49198),Xt=bt(33853),fe=bt(38819),xe=bt(92310),je=bt.n(xe),Bt=bt(49618),et=bt(77321),nt=bt(96949),ht=bt(55090),lt=bt(77205),gt=bt(38793),yt=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},Tt=Pt,It=bt(91735),zt=function(ge){(0,lt.Z)(Ft,ge);var oe=(0,gt.Z)(Ft);function Ft(){var St;(0,nt.Z)(this,Ft);for(var mt=arguments.length,At=new Array(mt),Rt=0;Rt<mt;Rt++)At[Rt]=arguments[Rt];return St=oe.call.apply(oe,[this].concat(At)),St.state={goInputText:""},St.getValidValue=function(){var Lt=St.state.goInputText;return!Lt||Number.isNaN(Lt)?void 0:Number(Lt)},St.buildOptionText=function(Lt){return"".concat(Lt," ").concat(St.props.locale.items_per_page)},St.changeSize=function(Lt){St.props.changeSize(Number(Lt))},St.handleChange=function(Lt){St.setState({goInputText:Lt.target.value})},St.handleBlur=function(Lt){var ae=St.props,De=ae.goButton,Oe=ae.quickGo,Be=ae.rootPrefixCls,yn=St.state.goInputText;De||yn===""||(St.setState({goInputText:""}),!(Lt.relatedTarget&&(Lt.relatedTarget.className.indexOf("".concat(Be,"-item-link"))>=0||Lt.relatedTarget.className.indexOf("".concat(Be,"-item"))>=0))&&Oe(St.getValidValue()))},St.go=function(Lt){var ae=St.state.goInputText;ae!==""&&(Lt.keyCode===Tt.ENTER||Lt.type==="click")&&(St.setState({goInputText:""}),St.props.quickGo(St.getValidValue()))},St}return(0,ht.Z)(Ft,[{key:"getPageSizeOptions",value:function(){var mt=this.props,At=mt.pageSize,Rt=mt.pageSizeOptions;return Rt.some(function(Lt){return Lt.toString()===At.toString()})?Rt:Rt.concat([At.toString()]).sort(function(Lt,ae){var De=Number.isNaN(Number(Lt))?0:Number(Lt),Oe=Number.isNaN(Number(ae))?0:Number(ae);return De-Oe})}},{key:"render",value:function(){var mt=this,At=this.props,Rt=At.pageSize,Lt=At.locale,ae=At.rootPrefixCls,De=At.changeSize,Oe=At.quickGo,Be=At.goButton,yn=At.selectComponentClass,Gn=At.buildOptionText,Kn=At.selectPrefixCls,Vn=At.disabled,gi=this.state.goInputText,Ti="".concat(ae,"-options"),Xi=yn,Mo=null,Io=null,Oo=null;if(!De&&!Oe)return null;var co=this.getPageSizeOptions();if(De&&Xi){var Do=co.map(function(Qo,Ai){return ee.createElement(Xi.Option,{key:Ai,value:Qo.toString()},(Gn||mt.buildOptionText)(Qo))});Mo=ee.createElement(Xi,{disabled:Vn,prefixCls:Kn,showSearch:!1,className:"".concat(Ti,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(Rt||co[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ai){return Ai.parentNode},"aria-label":Lt.page_size,defaultOpen:!1},Do)}return Oe&&(Be&&(Oo=typeof Be=="boolean"?ee.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Vn,className:"".concat(Ti,"-quick-jumper-button")},Lt.jump_to_confirm):ee.createElement("span",{onClick:this.go,onKeyUp:this.go},Be)),Io=ee.createElement("div",{className:"".concat(Ti,"-quick-jumper")},Lt.jump_to,ee.createElement("input",{disabled:Vn,type:"text",value:gi,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Lt.page}),Lt.page,Oo)),ee.createElement("li",{className:"".concat(Ti)},Mo,Io)}}]),Ft}(ee.Component);zt.defaultProps={pageSizeOptions:["10","20","50","100"]};var _t=zt,se=function(oe){var Ft,St=oe.rootPrefixCls,mt=oe.page,At=oe.active,Rt=oe.className,Lt=oe.showTitle,ae=oe.onClick,De=oe.onKeyPress,Oe=oe.itemRender,Be="".concat(St,"-item"),yn=je()(Be,"".concat(Be,"-").concat(mt),(Ft={},(0,Bt.Z)(Ft,"".concat(Be,"-active"),At),(0,Bt.Z)(Ft,"".concat(Be,"-disabled"),!mt),(0,Bt.Z)(Ft,oe.className,Rt),Ft)),Gn=function(){ae(mt)},Kn=function(Ti){De(Ti,ae,mt)},Vn=Oe(mt,"page",ee.createElement("a",{rel:"nofollow"},mt));return Vn?ee.createElement("li",{title:Lt?mt.toString():null,className:yn,onClick:Gn,onKeyPress:Kn,tabIndex:0},Vn):null},Jt=se;function le(){}function Zt(ge){var oe=Number(ge);return typeof oe=="number"&&!Number.isNaN(oe)&&isFinite(oe)&&Math.floor(oe)===oe}var Fe=function(oe,Ft,St){return St};function me(ge,oe,Ft){var St=typeof ge=="undefined"?oe.pageSize:ge;return Math.floor((Ft.total-1)/St)+1}var Ve=function(ge){(0,lt.Z)(Ft,ge);var oe=(0,gt.Z)(Ft);function Ft(St){var mt;(0,nt.Z)(this,Ft),mt=oe.call(this,St),mt.paginationNode=ee.createRef(),mt.getJumpPrevPage=function(){return Math.max(1,mt.state.current-(mt.props.showLessItems?3:5))},mt.getJumpNextPage=function(){return Math.min(me(void 0,mt.state,mt.props),mt.state.current+(mt.props.showLessItems?3:5))},mt.getItemIcon=function(De,Oe){var Be=mt.props.prefixCls,yn=De||ee.createElement("button",{type:"button","aria-label":Oe,className:"".concat(Be,"-item-link")});return typeof De=="function"&&(yn=ee.createElement(De,(0,et.Z)({},mt.props))),yn},mt.isValid=function(De){var Oe=mt.props.total;return Zt(De)&&De!==mt.state.current&&Zt(Oe)&&Oe>0},mt.shouldDisplayQuickJumper=function(){var De=mt.props,Oe=De.showQuickJumper,Be=De.total,yn=mt.state.pageSize;return Be<=yn?!1:Oe},mt.handleKeyDown=function(De){(De.keyCode===Tt.ARROW_UP||De.keyCode===Tt.ARROW_DOWN)&&De.preventDefault()},mt.handleKeyUp=function(De){var Oe=mt.getValidValue(De),Be=mt.state.currentInputValue;Oe!==Be&&mt.setState({currentInputValue:Oe}),De.keyCode===Tt.ENTER?mt.handleChange(Oe):De.keyCode===Tt.ARROW_UP?mt.handleChange(Oe-1):De.keyCode===Tt.ARROW_DOWN&&mt.handleChange(Oe+1)},mt.handleBlur=function(De){var Oe=mt.getValidValue(De);mt.handleChange(Oe)},mt.changePageSize=function(De){var Oe=mt.state.current,Be=me(De,mt.state,mt.props);Oe=Oe>Be?Be:Oe,Be===0&&(Oe=mt.state.current),typeof De=="number"&&("pageSize"in mt.props||mt.setState({pageSize:De}),"current"in mt.props||mt.setState({current:Oe,currentInputValue:Oe})),mt.props.onShowSizeChange(Oe,De),"onChange"in mt.props&&mt.props.onChange&&mt.props.onChange(Oe,De)},mt.handleChange=function(De){var Oe=mt.props,Be=Oe.disabled,yn=Oe.onChange,Gn=mt.state,Kn=Gn.pageSize,Vn=Gn.current,gi=Gn.currentInputValue;if(mt.isValid(De)&&!Be){var Ti=me(void 0,mt.state,mt.props),Xi=De;return De>Ti?Xi=Ti:De<1&&(Xi=1),"current"in mt.props||mt.setState({current:Xi}),Xi!==gi&&mt.setState({currentInputValue:Xi}),yn(Xi,Kn),Xi}return Vn},mt.prev=function(){mt.hasPrev()&&mt.handleChange(mt.state.current-1)},mt.next=function(){mt.hasNext()&&mt.handleChange(mt.state.current+1)},mt.jumpPrev=function(){mt.handleChange(mt.getJumpPrevPage())},mt.jumpNext=function(){mt.handleChange(mt.getJumpNextPage())},mt.hasPrev=function(){return mt.state.current>1},mt.hasNext=function(){return mt.state.current<me(void 0,mt.state,mt.props)},mt.runIfEnter=function(De,Oe){if(De.key==="Enter"||De.charCode===13){for(var Be=arguments.length,yn=new Array(Be>2?Be-2:0),Gn=2;Gn<Be;Gn++)yn[Gn-2]=arguments[Gn];Oe.apply(void 0,yn)}},mt.runIfEnterPrev=function(De){mt.runIfEnter(De,mt.prev)},mt.runIfEnterNext=function(De){mt.runIfEnter(De,mt.next)},mt.runIfEnterJumpPrev=function(De){mt.runIfEnter(De,mt.jumpPrev)},mt.runIfEnterJumpNext=function(De){mt.runIfEnter(De,mt.jumpNext)},mt.handleGoTO=function(De){(De.keyCode===Tt.ENTER||De.type==="click")&&mt.handleChange(mt.state.currentInputValue)},mt.renderPrev=function(De){var Oe=mt.props,Be=Oe.prevIcon,yn=Oe.itemRender,Gn=yn(De,"prev",mt.getItemIcon(Be,"prev page")),Kn=!mt.hasPrev();return(0,ee.isValidElement)(Gn)?(0,ee.cloneElement)(Gn,{disabled:Kn}):Gn},mt.renderNext=function(De){var Oe=mt.props,Be=Oe.nextIcon,yn=Oe.itemRender,Gn=yn(De,"next",mt.getItemIcon(Be,"next page")),Kn=!mt.hasNext();return(0,ee.isValidElement)(Gn)?(0,ee.cloneElement)(Gn,{disabled:Kn}):Gn};var At=St.onChange!==le,Rt="current"in St;Rt&&!At&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Lt=St.defaultCurrent;"current"in St&&(Lt=St.current);var ae=St.defaultPageSize;return"pageSize"in St&&(ae=St.pageSize),Lt=Math.min(Lt,me(ae,void 0,St)),mt.state={current:Lt,currentInputValue:Lt,pageSize:ae},mt}return(0,ht.Z)(Ft,[{key:"componentDidUpdate",value:function(mt,At){var Rt=this.props.prefixCls;if(At.current!==this.state.current&&this.paginationNode.current){var Lt=this.paginationNode.current.querySelector(".".concat(Rt,"-item-").concat(At.current));if(Lt&&document.activeElement===Lt){var ae;Lt==null||(ae=Lt.blur)===null||ae===void 0||ae.call(Lt)}}}},{key:"getValidValue",value:function(mt){var At=mt.target.value,Rt=me(void 0,this.state,this.props),Lt=this.state.currentInputValue,ae;return At===""?ae=At:Number.isNaN(Number(At))?ae=Lt:At>=Rt?ae=Rt:ae=Number(At),ae}},{key:"getShowSizeChanger",value:function(){var mt=this.props,At=mt.showSizeChanger,Rt=mt.total,Lt=mt.totalBoundaryShowSizeChanger;return typeof At!="undefined"?At:Rt>Lt}},{key:"render",value:function(){var mt=this.props,At=mt.prefixCls,Rt=mt.className,Lt=mt.style,ae=mt.disabled,De=mt.hideOnSinglePage,Oe=mt.total,Be=mt.locale,yn=mt.showQuickJumper,Gn=mt.showLessItems,Kn=mt.showTitle,Vn=mt.showTotal,gi=mt.simple,Ti=mt.itemRender,Xi=mt.showPrevNextJumpers,Mo=mt.jumpPrevIcon,Io=mt.jumpNextIcon,Oo=mt.selectComponentClass,co=mt.selectPrefixCls,Do=mt.pageSizeOptions,Qo=this.state,Ai=Qo.current,$o=Qo.pageSize,jo=Qo.currentInputValue;if(De===!0&&Oe<=$o)return null;var Mt=me(void 0,this.state,this.props),cr=[],ir=null,pr=null,ts=null,rs=null,ls=null,Ci=yn&&yn.goButton,si=Gn?1:2,Te=Ai-1>0?Ai-1:0,Ee=Ai+1<Mt?Ai+1:Mt,Wt=(0,yt.Z)(this.props,{aria:!0,data:!0}),Ge=Vn&&ee.createElement("li",{className:"".concat(At,"-total-text")},Vn(Oe,[Oe===0?0:(Ai-1)*$o+1,Ai*$o>Oe?Oe:Ai*$o]));if(gi){Ci&&(typeof Ci=="boolean"?ls=ee.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Be.jump_to_confirm):ls=ee.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ci),ls=ee.createElement("li",{title:Kn?"".concat(Be.jump_to).concat(Ai,"/").concat(Mt):null,className:"".concat(At,"-simple-pager")},ls));var Ue=this.renderPrev(Te);return ee.createElement("ul",(0,wt.Z)({className:je()(At,"".concat(At,"-simple"),(0,Bt.Z)({},"".concat(At,"-disabled"),ae),Rt),style:Lt,ref:this.paginationNode},Wt),Ge,Ue?ee.createElement("li",{title:Kn?Be.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:je()("".concat(At,"-prev"),(0,Bt.Z)({},"".concat(At,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Ue):null,ee.createElement("li",{title:Kn?"".concat(Ai,"/").concat(Mt):null,className:"".concat(At,"-simple-pager")},ee.createElement("input",{type:"text",value:jo,disabled:ae,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),ee.createElement("span",{className:"".concat(At,"-slash")},"/"),Mt),ee.createElement("li",{title:Kn?Be.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:je()("".concat(At,"-next"),(0,Bt.Z)({},"".concat(At,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ee)),ls)}if(Mt<=3+si*2){var ue={locale:Be,rootPrefixCls:At,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Kn,itemRender:Ti};Mt||cr.push(ee.createElement(Jt,(0,wt.Z)({},ue,{key:"noPager",page:1,className:"".concat(At,"-item-disabled")})));for(var qt=1;qt<=Mt;qt+=1){var ze=Ai===qt;cr.push(ee.createElement(Jt,(0,wt.Z)({},ue,{key:qt,page:qt,active:ze})))}}else{var sn=Gn?Be.prev_3:Be.prev_5,Ln=Gn?Be.next_3:Be.next_5,Nn=Ti(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Mo,"prev page")),ie=Ti(this.getJumpNextPage(),"jump-next",this.getItemIcon(Io,"next page"));Xi&&(ir=Nn?ee.createElement("li",{title:Kn?sn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:je()("".concat(At,"-jump-prev"),(0,Bt.Z)({},"".concat(At,"-jump-prev-custom-icon"),!!Mo))},Nn):null,pr=ie?ee.createElement("li",{title:Kn?Ln:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:je()("".concat(At,"-jump-next"),(0,Bt.Z)({},"".concat(At,"-jump-next-custom-icon"),!!Io))},ie):null),rs=ee.createElement(Jt,{locale:Be,last:!0,rootPrefixCls:At,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Mt,page:Mt,active:!1,showTitle:Kn,itemRender:Ti}),ts=ee.createElement(Jt,{locale:Be,rootPrefixCls:At,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Kn,itemRender:Ti});var Je=Math.max(1,Ai-si),Cn=Math.min(Ai+si,Mt);Ai-1<=si&&(Cn=1+si*2),Mt-Ai<=si&&(Je=Mt-si*2);for(var $n=Je;$n<=Cn;$n+=1){var We=Ai===$n;cr.push(ee.createElement(Jt,{locale:Be,rootPrefixCls:At,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:$n,page:$n,active:We,showTitle:Kn,itemRender:Ti}))}Ai-1>=si*2&&Ai!==3&&(cr[0]=(0,ee.cloneElement)(cr[0],{className:"".concat(At,"-item-after-jump-prev")}),cr.unshift(ir)),Mt-Ai>=si*2&&Ai!==Mt-2&&(cr[cr.length-1]=(0,ee.cloneElement)(cr[cr.length-1],{className:"".concat(At,"-item-before-jump-next")}),cr.push(pr)),Je!==1&&cr.unshift(ts),Cn!==Mt&&cr.push(rs)}var Ye=!this.hasPrev()||!Mt,zn=!this.hasNext()||!Mt,Zn=this.renderPrev(Te),fi=this.renderNext(Ee);return ee.createElement("ul",(0,wt.Z)({className:je()(At,Rt,(0,Bt.Z)({},"".concat(At,"-disabled"),ae)),style:Lt,ref:this.paginationNode},Wt),Ge,Zn?ee.createElement("li",{title:Kn?Be.prev_page:null,onClick:this.prev,tabIndex:Ye?null:0,onKeyPress:this.runIfEnterPrev,className:je()("".concat(At,"-prev"),(0,Bt.Z)({},"".concat(At,"-disabled"),Ye)),"aria-disabled":Ye},Zn):null,cr,fi?ee.createElement("li",{title:Kn?Be.next_page:null,onClick:this.next,tabIndex:zn?null:0,onKeyPress:this.runIfEnterNext,className:je()("".concat(At,"-next"),(0,Bt.Z)({},"".concat(At,"-disabled"),zn)),"aria-disabled":zn},fi):null,ee.createElement(_t,{disabled:ae,locale:Be,rootPrefixCls:At,selectComponentClass:Oo,selectPrefixCls:co,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ai,pageSize:$o,pageSizeOptions:Do,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ci}))}}],[{key:"getDerivedStateFromProps",value:function(mt,At){var Rt={};if("current"in mt&&(Rt.current=mt.current,mt.current!==At.current&&(Rt.currentInputValue=Rt.current)),"pageSize"in mt&&mt.pageSize!==At.pageSize){var Lt=At.current,ae=me(mt.pageSize,At,mt);Lt=Lt>ae?ae:Lt,"current"in mt||(Rt.current=Lt,Rt.currentInputValue=Lt),Rt.pageSize=mt.pageSize}return Rt}}]),Ft}(ee.Component);Ve.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:le,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:le,locale:It.Z,style:{},itemRender:Fe,totalBoundaryShowSizeChanger:50};var Qe=Ve,qe=bt(22075),vn=bt(36355),xn=bt(19716),Se=bt(8628),Vt=bt(9763),Xe=bt(57809);const Xn=ge=>ee.createElement(Xe.default,Object.assign({},ge,{showSearch:!0,size:"small"})),Bn=ge=>ee.createElement(Xe.default,Object.assign({},ge,{showSearch:!0,size:"middle"}));Xn.Option=Xe.default.Option,Bn.Option=Xe.default.Option;var Ae=bt(9937),hn=bt(17313),bn=bt(83116),Jn=bt(37613);const mn=ge=>{const{componentCls:oe}=ge;return{[`${oe}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${oe}-item-link`]:{color:ge.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${oe}-item-link`]:{color:ge.colorTextDisabled,cursor:"not-allowed"}}},[`&${oe}-disabled`]:{cursor:"not-allowed",[`${oe}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:ge.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:ge.colorBorder,backgroundColor:ge.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:ge.itemActiveBgDisabled},a:{color:ge.itemActiveColorDisabled}}},[`${oe}-item-link`]:{color:ge.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${oe}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${oe}-simple-pager`]:{color:ge.colorTextDisabled},[`${oe}-jump-prev, ${oe}-jump-next`]:{[`${oe}-item-link-icon`]:{opacity:0},[`${oe}-item-ellipsis`]:{opacity:1}}},[`&${oe}-simple`]:{[`${oe}-prev, ${oe}-next`]:{[`&${oe}-disabled ${oe}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},ui=ge=>{const{componentCls:oe}=ge;return{[`&${oe}-mini ${oe}-total-text, &${oe}-mini ${oe}-simple-pager`]:{height:ge.itemSizeSM,lineHeight:`${ge.itemSizeSM}px`},[`&${oe}-mini ${oe}-item`]:{minWidth:ge.itemSizeSM,height:ge.itemSizeSM,margin:0,lineHeight:`${ge.itemSizeSM-2}px`},[`&${oe}-mini:not(${oe}-disabled) ${oe}-item:not(${oe}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:ge.colorBgTextHover},"&:active":{backgroundColor:ge.colorBgTextActive}},[`&${oe}-mini ${oe}-prev, &${oe}-mini ${oe}-next`]:{minWidth:ge.itemSizeSM,height:ge.itemSizeSM,margin:0,lineHeight:`${ge.itemSizeSM}px`},[`&${oe}-mini:not(${oe}-disabled)`]:{[`${oe}-prev, ${oe}-next`]:{[`&:hover ${oe}-item-link`]:{backgroundColor:ge.colorBgTextHover},[`&:active ${oe}-item-link`]:{backgroundColor:ge.colorBgTextActive},[`&${oe}-disabled:hover ${oe}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${oe}-mini ${oe}-prev ${oe}-item-link,
|
|
|
&${oe}-mini ${oe}-next ${oe}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:ge.itemSizeSM,lineHeight:`${ge.itemSizeSM}px`}},[`&${oe}-mini ${oe}-jump-prev, &${oe}-mini ${oe}-jump-next`]:{height:ge.itemSizeSM,marginInlineEnd:0,lineHeight:`${ge.itemSizeSM}px`},[`&${oe}-mini ${oe}-options`]:{marginInlineStart:ge.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:ge.miniOptionsSizeChangerTop},"&-quick-jumper":{height:ge.itemSizeSM,lineHeight:`${ge.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Ae.x0)(ge)),{width:ge.paginationMiniQuickJumperInputWidth,height:ge.controlHeightSM})}}}},Ce=ge=>{const{componentCls:oe}=ge;return{[`
|
|
|
&${oe}-simple ${oe}-prev,
|
|
|
&${oe}-simple ${oe}-next
|
|
|
`]:{height:ge.itemSizeSM,lineHeight:`${ge.itemSizeSM}px`,verticalAlign:"top",[`${oe}-item-link`]:{height:ge.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:ge.colorBgTextHover},"&:active":{backgroundColor:ge.colorBgTextActive},"&::after":{height:ge.itemSizeSM,lineHeight:`${ge.itemSizeSM}px`}}},[`&${oe}-simple ${oe}-simple-pager`]:{display:"inline-block",height:ge.itemSizeSM,marginInlineEnd:ge.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:ge.marginXS,padding:`0 ${ge.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:ge.itemInputBg,border:`${ge.lineWidth}px ${ge.lineType} ${ge.colorBorder}`,borderRadius:ge.borderRadius,outline:"none",transition:`border-color ${ge.motionDurationMid}`,color:"inherit","&:hover":{borderColor:ge.colorPrimary},"&:focus":{borderColor:ge.colorPrimaryHover,boxShadow:`${ge.inputOutlineOffset}px 0 ${ge.controlOutlineWidth}px ${ge.controlOutline}`},"&[disabled]":{color:ge.colorTextDisabled,backgroundColor:ge.colorBgContainerDisabled,borderColor:ge.colorBorder,cursor:"not-allowed"}}}}},ni=ge=>{const{componentCls:oe}=ge;return{[`${oe}-jump-prev, ${oe}-jump-next`]:{outline:0,[`${oe}-item-container`]:{position:"relative",[`${oe}-item-link-icon`]:{color:ge.colorPrimary,fontSize:ge.fontSizeSM,opacity:0,transition:`all ${ge.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${oe}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:ge.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:ge.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:ge.paginationEllipsisTextIndent,opacity:1,transition:`all ${ge.motionDurationMid}`}},"&:hover":{[`${oe}-item-link-icon`]:{opacity:1},[`${oe}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${oe}-prev,
|
|
|
${oe}-jump-prev,
|
|
|
${oe}-jump-next
|
|
|
`]:{marginInlineEnd:ge.marginXS},[`
|
|
|
${oe}-prev,
|
|
|
${oe}-next,
|
|
|
${oe}-jump-prev,
|
|
|
${oe}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:ge.itemSize,height:ge.itemSize,color:ge.colorText,fontFamily:ge.fontFamily,lineHeight:`${ge.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:ge.borderRadius,cursor:"pointer",transition:`all ${ge.motionDurationMid}`},[`${oe}-prev, ${oe}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:ge.colorText,cursor:"pointer",userSelect:"none"},[`${oe}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:ge.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${ge.lineWidth}px ${ge.lineType} transparent`,borderRadius:ge.borderRadius,outline:"none",transition:`all ${ge.motionDurationMid}`},[`&:hover ${oe}-item-link`]:{backgroundColor:ge.colorBgTextHover},[`&:active ${oe}-item-link`]:{backgroundColor:ge.colorBgTextActive},[`&${oe}-disabled:hover`]:{[`${oe}-item-link`]:{backgroundColor:"transparent"}}},[`${oe}-slash`]:{marginInlineEnd:ge.paginationSlashMarginInlineEnd,marginInlineStart:ge.paginationSlashMarginInlineStart},[`${oe}-options`]:{display:"inline-block",marginInlineStart:ge.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:ge.controlHeight,marginInlineStart:ge.marginXS,lineHeight:`${ge.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Ae.ik)(ge)),{width:ge.controlHeightLG*1.25,height:ge.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:ge.marginXS,marginInlineEnd:ge.marginXS})}}}},Pi=ge=>{const{componentCls:oe}=ge;return{[`${oe}-item`]:{display:"inline-block",minWidth:ge.itemSize,height:ge.itemSize,marginInlineEnd:ge.marginXS,fontFamily:ge.fontFamily,lineHeight:`${ge.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${ge.lineWidth}px ${ge.lineType} transparent`,borderRadius:ge.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ge.paginationItemPaddingInline}px`,color:ge.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${oe}-item-active)`]:{"&:hover":{transition:`all ${ge.motionDurationMid}`,backgroundColor:ge.colorBgTextHover},"&:active":{backgroundColor:ge.colorBgTextActive}},"&-active":{fontWeight:ge.fontWeightStrong,backgroundColor:ge.itemActiveBg,borderColor:ge.colorPrimary,a:{color:ge.colorPrimary},"&:hover":{borderColor:ge.colorPrimaryHover},"&:hover a":{color:ge.colorPrimaryHover}}}}},gn=ge=>{const{componentCls:oe}=ge;return{[oe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,hn.Wf)(ge)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${oe}-total-text`]:{display:"inline-block",height:ge.itemSize,marginInlineEnd:ge.marginXS,lineHeight:`${ge.itemSize-2}px`,verticalAlign:"middle"}}),Pi(ge)),ni(ge)),Ce(ge)),ui(ge)),mn(ge)),{[`@media only screen and (max-width: ${ge.screenLG}px)`]:{[`${oe}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${ge.screenSM}px)`]:{[`${oe}-options`]:{display:"none"}}}),[`&${ge.componentCls}-rtl`]:{direction:"rtl"}}},Tn=ge=>{const{componentCls:oe}=ge;return{[`${oe}${oe}-disabled:not(${oe}-mini)`]:{"&, &:hover":{[`${oe}-item-link`]:{borderColor:ge.colorBorder}},"&:focus-visible":{[`${oe}-item-link`]:{borderColor:ge.colorBorder}},[`${oe}-item, ${oe}-item-link`]:{backgroundColor:ge.colorBgContainerDisabled,borderColor:ge.colorBorder,[`&:hover:not(${oe}-item-active)`]:{backgroundColor:ge.colorBgContainerDisabled,borderColor:ge.colorBorder,a:{color:ge.colorTextDisabled}},[`&${oe}-item-active`]:{backgroundColor:ge.itemActiveBgDisabled}},[`${oe}-prev, ${oe}-next`]:{"&:hover button":{backgroundColor:ge.colorBgContainerDisabled,borderColor:ge.colorBorder,color:ge.colorTextDisabled},[`${oe}-item-link`]:{backgroundColor:ge.colorBgContainerDisabled,borderColor:ge.colorBorder}}},[`${oe}:not(${oe}-mini)`]:{[`${oe}-prev, ${oe}-next`]:{"&:hover button":{borderColor:ge.colorPrimaryHover,backgroundColor:ge.itemBg},[`${oe}-item-link`]:{backgroundColor:ge.itemLinkBg,borderColor:ge.colorBorder},[`&:hover ${oe}-item-link`]:{borderColor:ge.colorPrimary,backgroundColor:ge.itemBg,color:ge.colorPrimary},[`&${oe}-disabled`]:{[`${oe}-item-link`]:{borderColor:ge.colorBorder,color:ge.colorTextDisabled}}},[`${oe}-item`]:{backgroundColor:ge.itemBg,border:`${ge.lineWidth}px ${ge.lineType} ${ge.colorBorder}`,[`&:hover:not(${oe}-item-active)`]:{borderColor:ge.colorPrimary,backgroundColor:ge.itemBg,a:{color:ge.colorPrimary}},"&-active":{borderColor:ge.colorPrimary}}}}},pn=ge=>{const{componentCls:oe}=ge;return{[`${oe}:not(${oe}-disabled)`]:{[`${oe}-item`]:Object.assign({},(0,hn.Qy)(ge)),[`${oe}-jump-prev, ${oe}-jump-next`]:{"&:focus-visible":Object.assign({[`${oe}-item-link-icon`]:{opacity:1},[`${oe}-item-ellipsis`]:{opacity:0}},(0,hn.oN)(ge))},[`${oe}-prev, ${oe}-next`]:{[`&:focus-visible ${oe}-item-link`]:Object.assign({},(0,hn.oN)(ge))}}}};var Un=(0,bn.Z)("Pagination",ge=>{const oe=(0,Jn.TS)(ge,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:ge.marginXXS/2,paginationMiniQuickJumperInputWidth:ge.controlHeightLG*1.1,paginationItemPaddingInline:ge.marginXXS*1.5,paginationEllipsisLetterSpacing:ge.marginXXS/2,paginationSlashMarginInlineStart:ge.marginXXS,paginationSlashMarginInlineEnd:ge.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ae.e5)(ge),(0,Ae.TM)(ge));return[gn(oe),pn(oe),ge.wireframe&&Tn(oe)]},ge=>({itemBg:ge.colorBgContainer,itemSize:ge.controlHeight,itemSizeSM:ge.controlHeightSM,itemActiveBg:ge.colorBgContainer,itemLinkBg:ge.colorBgContainer,itemActiveColorDisabled:ge.colorTextDisabled,itemActiveBgDisabled:ge.controlItemBgActiveDisabled,itemInputBg:ge.colorBgContainer,miniOptionsSizeChangerTop:0})),On=function(ge,oe){var Ft={};for(var St in ge)Object.prototype.hasOwnProperty.call(ge,St)&&oe.indexOf(St)<0&&(Ft[St]=ge[St]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,St=Object.getOwnPropertySymbols(ge);mt<St.length;mt++)oe.indexOf(St[mt])<0&&Object.prototype.propertyIsEnumerable.call(ge,St[mt])&&(Ft[St[mt]]=ge[St[mt]]);return Ft},In=ge=>{const{prefixCls:oe,selectPrefixCls:Ft,className:St,rootClassName:mt,style:At,size:Rt,locale:Lt,selectComponentClass:ae,responsive:De,showSizeChanger:Oe}=ge,Be=On(ge,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:yn}=(0,Se.Z)(De),{getPrefixCls:Gn,direction:Kn,pagination:Vn={}}=ee.useContext(vn.E_),gi=Gn("pagination",oe),[Ti,Xi]=Un(gi),Mo=Oe!=null?Oe:Vn.showSizeChanger,Io=ee.useMemo(()=>{const Mt=ee.createElement("span",{className:`${gi}-item-ellipsis`},"\u2022\u2022\u2022"),cr=ee.createElement("button",{className:`${gi}-item-link`,type:"button",tabIndex:-1},Kn==="rtl"?ee.createElement(fe.Z,null):ee.createElement(Xt.Z,null)),ir=ee.createElement("button",{className:`${gi}-item-link`,type:"button",tabIndex:-1},Kn==="rtl"?ee.createElement(Xt.Z,null):ee.createElement(fe.Z,null)),pr=ee.createElement("a",{className:`${gi}-item-link`},ee.createElement("div",{className:`${gi}-item-container`},Kn==="rtl"?ee.createElement(ve.Z,{className:`${gi}-item-link-icon`}):ee.createElement(Le,{className:`${gi}-item-link-icon`}),Mt)),ts=ee.createElement("a",{className:`${gi}-item-link`},ee.createElement("div",{className:`${gi}-item-container`},Kn==="rtl"?ee.createElement(Le,{className:`${gi}-item-link-icon`}):ee.createElement(ve.Z,{className:`${gi}-item-link-icon`}),Mt));return{prevIcon:cr,nextIcon:ir,jumpPrevIcon:pr,jumpNextIcon:ts}},[Kn,gi]),[Oo]=(0,Vt.Z)("Pagination",qe.Z),co=Object.assign(Object.assign({},Oo),Lt),Do=(0,xn.Z)(Rt),Qo=Do==="small"||!!(yn&&!Do&&De),Ai=Gn("select",Ft),$o=je()({[`${gi}-mini`]:Qo,[`${gi}-rtl`]:Kn==="rtl"},Vn==null?void 0:Vn.className,St,mt,Xi),jo=Object.assign(Object.assign({},Vn==null?void 0:Vn.style),At);return Ti(ee.createElement(Qe,Object.assign({},Io,Be,{style:jo,prefixCls:gi,selectPrefixCls:Ai,className:$o,selectComponentClass:ae||(Qo?Xn:Bn),locale:co,showSizeChanger:Mo})))},rn=In},14478:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Jt}});var wt=bt(96512),ee=bt(92310),he=bt.n(ee),Ie=bt(10228),te=bt(18929),Pe=bt(2738),Nt=bt(59301),Le=bt(92343),ve=bt(36355),Xt=bt(60324),fe=bt(92806),xe=bt(77578),je=bt(3113),Bt=bt(67797),et=bt(9763),nt=bt(31724),ht=bt(39722),lt=bt(83116);const gt=le=>{const{componentCls:Zt,iconCls:Fe,antCls:me,zIndexPopup:Ve,colorText:Qe,colorWarning:qe,marginXXS:vn,marginXS:xn,fontSize:Se,fontWeightStrong:Vt,colorTextHeading:Xe}=le;return{[Zt]:{zIndex:Ve,[`&${me}-popover`]:{fontSize:Se},[`${Zt}-message`]:{marginBottom:xn,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${Zt}-message-icon ${Fe}`]:{color:qe,fontSize:Se,lineHeight:1,marginInlineEnd:xn},[`${Zt}-title`]:{fontWeight:Vt,color:Xe,"&:only-child":{fontWeight:"normal"}},[`${Zt}-description`]:{marginTop:vn,color:Qe}},[`${Zt}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:xn}}}}};var yt=(0,lt.Z)("Popconfirm",le=>gt(le),le=>{const{zIndexPopupBase:Zt}=le;return{zIndexPopup:Zt+60}},{resetStyle:!1}),Pt=function(le,Zt){var Fe={};for(var me in le)Object.prototype.hasOwnProperty.call(le,me)&&Zt.indexOf(me)<0&&(Fe[me]=le[me]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,me=Object.getOwnPropertySymbols(le);Ve<me.length;Ve++)Zt.indexOf(me[Ve])<0&&Object.prototype.propertyIsEnumerable.call(le,me[Ve])&&(Fe[me[Ve]]=le[me[Ve]]);return Fe};const Tt=le=>{const{prefixCls:Zt,okButtonProps:Fe,cancelButtonProps:me,title:Ve,description:Qe,cancelText:qe,okText:vn,okType:xn="primary",icon:Se=Nt.createElement(wt.Z,null),showCancel:Vt=!0,close:Xe,onConfirm:Xn,onCancel:Bn,onPopupClick:Ae}=le,{getPrefixCls:hn}=Nt.useContext(ve.E_),[bn]=(0,et.Z)("Popconfirm",nt.Z.Popconfirm),Jn=(0,xe.Z)(Ve),mn=(0,xe.Z)(Qe);return Nt.createElement("div",{className:`${Zt}-inner-content`,onClick:Ae},Nt.createElement("div",{className:`${Zt}-message`},Se&&Nt.createElement("span",{className:`${Zt}-message-icon`},Se),Nt.createElement("div",{className:`${Zt}-message-text`},Jn&&Nt.createElement("div",{className:he()(`${Zt}-title`)},Jn),mn&&Nt.createElement("div",{className:`${Zt}-description`},mn))),Nt.createElement("div",{className:`${Zt}-buttons`},Vt&&Nt.createElement(je.ZP,Object.assign({onClick:Bn,size:"small"},me),qe!=null?qe:bn==null?void 0:bn.cancelText),Nt.createElement(fe.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,Bt.n)(xn)),Fe),actionFn:Xn,close:Xe,prefixCls:hn("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},vn!=null?vn:bn==null?void 0:bn.okText)))};var zt=le=>{const{prefixCls:Zt,placement:Fe,className:me,style:Ve}=le,Qe=Pt(le,["prefixCls","placement","className","style"]),{getPrefixCls:qe}=Nt.useContext(ve.E_),vn=qe("popconfirm",Zt),[xn]=yt(vn);return xn(Nt.createElement(ht.ZP,{placement:Fe,className:he()(vn,me),style:Ve,content:Nt.createElement(Tt,Object.assign({prefixCls:vn},Qe))}))},_t=function(le,Zt){var Fe={};for(var me in le)Object.prototype.hasOwnProperty.call(le,me)&&Zt.indexOf(me)<0&&(Fe[me]=le[me]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,me=Object.getOwnPropertySymbols(le);Ve<me.length;Ve++)Zt.indexOf(me[Ve])<0&&Object.prototype.propertyIsEnumerable.call(le,me[Ve])&&(Fe[me[Ve]]=le[me[Ve]]);return Fe};const se=Nt.forwardRef((le,Zt)=>{const{prefixCls:Fe,placement:me="top",trigger:Ve="click",okType:Qe="primary",icon:qe=Nt.createElement(wt.Z,null),children:vn,overlayClassName:xn,onOpenChange:Se,onVisibleChange:Vt}=le,Xe=_t(le,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:Xn}=Nt.useContext(ve.E_),[Bn,Ae]=(0,te.Z)(!1,{value:le.open,defaultValue:le.defaultOpen}),hn=(Tn,pn)=>{Ae(Tn,!0),Vt==null||Vt(Tn),Se==null||Se(Tn,pn)},bn=Tn=>{hn(!1,Tn)},Jn=Tn=>{var pn;return(pn=le.onConfirm)===null||pn===void 0?void 0:pn.call(void 0,Tn)},mn=Tn=>{var pn;hn(!1,Tn),(pn=le.onCancel)===null||pn===void 0||pn.call(void 0,Tn)},ui=Tn=>{Tn.keyCode===Ie.Z.ESC&&Bn&&hn(!1,Tn)},Ce=Tn=>{const{disabled:pn=!1}=le;pn||hn(Tn)},ni=Xn("popconfirm",Fe),Pi=he()(ni,xn),[gn]=yt(ni);return gn(Nt.createElement(Xt.Z,Object.assign({},(0,Pe.Z)(Xe,["title"]),{trigger:Ve,placement:me,onOpenChange:Ce,open:Bn,ref:Zt,overlayClassName:Pi,content:Nt.createElement(Tt,Object.assign({okType:Qe,icon:qe},le,{prefixCls:ni,close:bn,onConfirm:Jn,onCancel:mn})),"data-popover-inject":!0}),(0,Le.Tm)(vn,{onKeyDown:Tn=>{var pn,Un;Nt.isValidElement(vn)&&((Un=vn==null?void 0:(pn=vn.props).onKeyDown)===null||Un===void 0||Un.call(pn,Tn)),ui(Tn)}})))});se._InternalPanelDoNotUseOrYouWillBeFired=zt;var Jt=se},39722:function(dn,Mn,bt){"use strict";bt.d(Mn,{t5:function(){return Xt}});var wt=bt(92310),ee=bt.n(wt),he=bt(55477),Ie=bt(59301),te=bt(36355),Pe=bt(77578),Nt=bt(17356),Le=function(xe,je){var Bt={};for(var et in xe)Object.prototype.hasOwnProperty.call(xe,et)&&je.indexOf(et)<0&&(Bt[et]=xe[et]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,et=Object.getOwnPropertySymbols(xe);nt<et.length;nt++)je.indexOf(et[nt])<0&&Object.prototype.propertyIsEnumerable.call(xe,et[nt])&&(Bt[et[nt]]=xe[et[nt]]);return Bt};const ve=(xe,je,Bt)=>{if(!(!je&&!Bt))return Ie.createElement(Ie.Fragment,null,je&&Ie.createElement("div",{className:`${xe}-title`},(0,Pe.Z)(je)),Ie.createElement("div",{className:`${xe}-inner-content`},(0,Pe.Z)(Bt)))},Xt=xe=>{const{hashId:je,prefixCls:Bt,className:et,style:nt,placement:ht="top",title:lt,content:gt,children:yt}=xe;return Ie.createElement("div",{className:ee()(je,Bt,`${Bt}-pure`,`${Bt}-placement-${ht}`,et),style:nt},Ie.createElement("div",{className:`${Bt}-arrow`}),Ie.createElement(he.G,Object.assign({},xe,{className:je,prefixCls:Bt}),yt||ve(Bt,lt,gt)))},fe=xe=>{const{prefixCls:je}=xe,Bt=Le(xe,["prefixCls"]),{getPrefixCls:et}=Ie.useContext(te.E_),nt=et("popover",je),[ht,lt]=(0,Nt.Z)(nt);return ht(Ie.createElement(Xt,Object.assign({},Bt,{prefixCls:nt,hashId:lt})))};Mn.ZP=fe},60324:function(dn,Mn,bt){"use strict";var wt=bt(92310),ee=bt.n(wt),he=bt(59301),Ie=bt(77578),te=bt(62892),Pe=bt(36355),Nt=bt(6848),Le=bt(39722),ve=bt(17356),Xt=function(je,Bt){var et={};for(var nt in je)Object.prototype.hasOwnProperty.call(je,nt)&&Bt.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++)Bt.indexOf(nt[ht])<0&&Object.prototype.propertyIsEnumerable.call(je,nt[ht])&&(et[nt[ht]]=je[nt[ht]]);return et};const fe=je=>{let{title:Bt,content:et,prefixCls:nt}=je;return he.createElement(he.Fragment,null,Bt&&he.createElement("div",{className:`${nt}-title`},(0,Ie.Z)(Bt)),he.createElement("div",{className:`${nt}-inner-content`},(0,Ie.Z)(et)))},xe=he.forwardRef((je,Bt)=>{const{prefixCls:et,title:nt,content:ht,overlayClassName:lt,placement:gt="top",trigger:yt="hover",mouseEnterDelay:Pt=.1,mouseLeaveDelay:Tt=.1,overlayStyle:It={}}=je,zt=Xt(je,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:_t}=he.useContext(Pe.E_),se=_t("popover",et),[Jt,le]=(0,ve.Z)(se),Zt=_t(),Fe=ee()(lt,le);return Jt(he.createElement(Nt.Z,Object.assign({placement:gt,trigger:yt,mouseEnterDelay:Pt,mouseLeaveDelay:Tt,overlayStyle:It},zt,{prefixCls:se,overlayClassName:Fe,ref:Bt,overlay:nt||ht?he.createElement(fe,{prefixCls:se,title:nt,content:ht}):null,transitionName:(0,te.m)(Zt,"zoom-big",zt.transitionName),"data-popover-inject":!0})))});xe._InternalPanelDoNotUseOrYouWillBeFired=Le.ZP,Mn.Z=xe},17356:function(dn,Mn,bt){"use strict";var wt=bt(17313),ee=bt(29878),he=bt(19447),Ie=bt(33166),te=bt(83116),Pe=bt(37613);const Nt=Xt=>{const{componentCls:fe,popoverColor:xe,minWidth:je,fontWeightStrong:Bt,popoverPadding:et,boxShadowSecondary:nt,colorTextHeading:ht,borderRadiusLG:lt,zIndexPopup:gt,marginXS:yt,colorBgElevated:Pt,popoverBg:Tt}=Xt;return[{[fe]:Object.assign(Object.assign({},(0,wt.Wf)(Xt)),{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"},[`${fe}-content`]:{position:"relative"},[`${fe}-inner`]:{backgroundColor:Tt,backgroundClip:"padding-box",borderRadius:lt,boxShadow:nt,padding:et},[`${fe}-title`]:{minWidth:je,marginBottom:yt,color:ht,fontWeight:Bt},[`${fe}-inner-content`]:{color:xe}})},(0,he.ZP)(Xt,{colorBg:"var(--antd-arrow-background-color)"}),{[`${fe}-pure`]:{position:"relative",maxWidth:"none",margin:Xt.sizePopupArrow,display:"inline-block",[`${fe}-content`]:{display:"inline-block"}}}]},Le=Xt=>{const{componentCls:fe}=Xt;return{[fe]:Ie.i.map(xe=>{const je=Xt[`${xe}6`];return{[`&${fe}-${xe}`]:{"--antd-arrow-background-color":je,[`${fe}-inner`]:{backgroundColor:je},[`${fe}-arrow`]:{background:"transparent"}}}})}},ve=Xt=>{const{componentCls:fe,lineWidth:xe,lineType:je,colorSplit:Bt,paddingSM:et,controlHeight:nt,fontSize:ht,lineHeight:lt,padding:gt}=Xt,yt=nt-Math.round(ht*lt),Pt=yt/2,Tt=yt/2-xe,It=gt;return{[fe]:{[`${fe}-inner`]:{padding:0},[`${fe}-title`]:{margin:0,padding:`${Pt}px ${It}px ${Tt}px`,borderBottom:`${xe}px ${je} ${Bt}`},[`${fe}-inner-content`]:{padding:`${et}px ${It}px`}}}};Mn.Z=(0,te.Z)("Popover",Xt=>{const{colorBgElevated:fe,colorText:xe,wireframe:je}=Xt,Bt=(0,Pe.TS)(Xt,{popoverPadding:12,popoverBg:fe,popoverColor:xe});return[Nt(Bt),Le(Bt),je&&ve(Bt),(0,ee._y)(Bt,"zoom-big")]},Xt=>({width:177,minWidth:177,zIndexPopup:Xt.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},57809:function(dn,Mn,bt){"use strict";var wt=bt(92310),ee=bt.n(wt),he=bt(77861),Ie=bt(2738),te=bt(59301),Pe=bt(53487),Nt=bt(62892),Le=bt(19080),ve=bt(36355),Xt=bt(1684),fe=bt(93891),xe=bt(19716),je=bt(32441),Bt=bt(33234),et=bt(14154),nt=bt(58582),ht=bt(84443),lt=bt(66339),gt=function(zt,_t){var se={};for(var Jt in zt)Object.prototype.hasOwnProperty.call(zt,Jt)&&_t.indexOf(Jt)<0&&(se[Jt]=zt[Jt]);if(zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,Jt=Object.getOwnPropertySymbols(zt);le<Jt.length;le++)_t.indexOf(Jt[le])<0&&Object.prototype.propertyIsEnumerable.call(zt,Jt[le])&&(se[Jt[le]]=zt[Jt[le]]);return se};const yt="SECRET_COMBOBOX_MODE_DO_NOT_USE",Pt=(zt,_t)=>{var se,{prefixCls:Jt,bordered:le=!0,className:Zt,rootClassName:Fe,getPopupContainer:me,popupClassName:Ve,dropdownClassName:Qe,listHeight:qe=256,placement:vn,listItemHeight:xn=24,size:Se,disabled:Vt,notFoundContent:Xe,status:Xn,builtinPlacements:Bn,dropdownMatchSelectWidth:Ae,popupMatchSelectWidth:hn,direction:bn,style:Jn,allowClear:mn}=zt,ui=gt(zt,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ce,getPrefixCls:ni,renderEmpty:Pi,direction:gn,virtual:Tn,popupMatchSelectWidth:pn,popupOverflow:Un,select:On}=te.useContext(ve.E_),we=ni("select",Jt),In=ni(),rn=bn!=null?bn:gn,{compactSize:ge,compactItemClassnames:oe}=(0,Bt.ri)(we,rn),[Ft,St]=(0,et.Z)(we),mt=te.useMemo(()=>{const{mode:jo}=ui;if(jo!=="combobox")return jo===yt?"combobox":jo},[ui.mode]),At=mt==="multiple"||mt==="tags",Rt=(0,ht.Z)(ui.suffixIcon,ui.showArrow),Lt=(se=hn!=null?hn:Ae)!==null&&se!==void 0?se:pn,{status:ae,hasFeedback:De,isFormItemInput:Oe,feedbackIcon:Be}=te.useContext(je.aM),yn=(0,Le.F)(ae,Xn);let Gn;Xe!==void 0?Gn=Xe:mt==="combobox"?Gn=null:Gn=(Pi==null?void 0:Pi("Select"))||te.createElement(fe.Z,{componentName:"Select"});const{suffixIcon:Kn,itemIcon:Vn,removeIcon:gi,clearIcon:Ti}=(0,lt.Z)(Object.assign(Object.assign({},ui),{multiple:At,hasFeedback:De,feedbackIcon:Be,showSuffixIcon:Rt,prefixCls:we,showArrow:ui.showArrow,componentName:"Select"})),Xi=mn===!0?{clearIcon:Ti}:mn,Mo=(0,Ie.Z)(ui,["suffixIcon","itemIcon"]),Io=ee()(Ve||Qe,{[`${we}-dropdown-${rn}`]:rn==="rtl"},Fe,St),Oo=(0,xe.Z)(jo=>{var Mt;return(Mt=Se!=null?Se:ge)!==null&&Mt!==void 0?Mt:jo}),co=te.useContext(Xt.Z),Do=Vt!=null?Vt:co,Qo=ee()({[`${we}-lg`]:Oo==="large",[`${we}-sm`]:Oo==="small",[`${we}-rtl`]:rn==="rtl",[`${we}-borderless`]:!le,[`${we}-in-form-item`]:Oe},(0,Le.Z)(we,yn,De),oe,On==null?void 0:On.className,Zt,Fe,St),Ai=te.useMemo(()=>vn!==void 0?vn:rn==="rtl"?"bottomRight":"bottomLeft",[vn,rn]),$o=(0,nt.Z)(Bn,Un);return Ft(te.createElement(he.ZP,Object.assign({ref:_t,virtual:Tn,showSearch:On==null?void 0:On.showSearch},Mo,{style:Object.assign(Object.assign({},On==null?void 0:On.style),Jn),dropdownMatchSelectWidth:Lt,builtinPlacements:$o,transitionName:(0,Nt.m)(In,"slide-up",ui.transitionName),listHeight:qe,listItemHeight:xn,mode:mt,prefixCls:we,placement:Ai,direction:rn,suffixIcon:Kn,menuItemSelectedIcon:Vn,removeIcon:gi,allowClear:Xi,notFoundContent:Gn,className:Qo,getPopupContainer:me||Ce,dropdownClassName:Io,disabled:Do})))},Tt=te.forwardRef(Pt),It=(0,Pe.Z)(Tt);Tt.SECRET_COMBOBOX_MODE_DO_NOT_USE=yt,Tt.Option=he.Wx,Tt.OptGroup=he.Xo,Tt._InternalPanelDoNotUseOrYouWillBeFired=It,Mn.default=Tt},14154:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Tt}});var wt=bt(17313),ee=bt(74207),he=bt(37613),Ie=bt(83116),te=bt(13826),Pe=bt(92899);const Nt=It=>{const{optionHeight:zt,optionFontSize:_t,optionLineHeight:se,optionPadding:Jt}=It;return{position:"relative",display:"block",minHeight:zt,padding:Jt,color:It.colorText,fontWeight:"normal",fontSize:_t,lineHeight:se,boxSizing:"border-box"}};var ve=It=>{const{antCls:zt,componentCls:_t}=It,se=`${_t}-item`,Jt=`&${zt}-slide-up-enter${zt}-slide-up-enter-active`,le=`&${zt}-slide-up-appear${zt}-slide-up-appear-active`,Zt=`&${zt}-slide-up-leave${zt}-slide-up-leave-active`,Fe=`${_t}-dropdown-placement-`;return[{[`${_t}-dropdown`]:Object.assign(Object.assign({},(0,wt.Wf)(It)),{position:"absolute",top:-9999,zIndex:It.zIndexPopup,boxSizing:"border-box",padding:It.paddingXXS,overflow:"hidden",fontSize:It.fontSize,fontVariant:"initial",backgroundColor:It.colorBgElevated,borderRadius:It.borderRadiusLG,outline:"none",boxShadow:It.boxShadowSecondary,[`
|
|
|
${Jt}${Fe}bottomLeft,
|
|
|
${le}${Fe}bottomLeft
|
|
|
`]:{animationName:te.fJ},[`
|
|
|
${Jt}${Fe}topLeft,
|
|
|
${le}${Fe}topLeft,
|
|
|
${Jt}${Fe}topRight,
|
|
|
${le}${Fe}topRight
|
|
|
`]:{animationName:te.Qt},[`${Zt}${Fe}bottomLeft`]:{animationName:te.Uw},[`
|
|
|
${Zt}${Fe}topLeft,
|
|
|
${Zt}${Fe}topRight
|
|
|
`]:{animationName:te.ly},"&-hidden":{display:"none"},[`${se}`]:Object.assign(Object.assign({},Nt(It)),{cursor:"pointer",transition:`background ${It.motionDurationSlow} ease`,borderRadius:It.borderRadiusSM,"&-group":{color:It.colorTextDescription,fontSize:It.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:It.optionActiveBg},[`&-selected:not(${se}-option-disabled)`]:{color:It.optionSelectedColor,fontWeight:It.optionSelectedFontWeight,backgroundColor:It.optionSelectedBg,[`${se}-option-state`]:{color:It.colorPrimary}},"&-disabled":{[`&${se}-option-selected`]:{backgroundColor:It.colorBgContainerDisabled},color:It.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:It.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,te.oN)(It,"slide-up"),(0,te.oN)(It,"slide-down"),(0,Pe.Fm)(It,"move-up"),(0,Pe.Fm)(It,"move-down")]};const Xt=2,fe=It=>{let{controlHeightSM:zt,controlHeight:_t,lineWidth:se}=It;const Jt=(_t-zt)/2-se,le=Math.ceil(Jt/2);return[Jt,le]};function xe(It,zt){const{componentCls:_t,iconCls:se}=It,Jt=`${_t}-selection-overflow`,le=It.multipleSelectItemHeight,[Zt]=fe(It),Fe=zt?`${_t}-${zt}`:"";return{[`${_t}-multiple${Fe}`]:{fontSize:It.fontSize,[Jt]:{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-Xt}px ${Xt*2}px`,borderRadius:It.borderRadius,[`${_t}-show-search&`]:{cursor:"text"},[`${_t}-disabled&`]:{background:It.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Xt}px 0`,lineHeight:`${le}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${_t}-show-arrow ${_t}-selector,
|
|
|
&${_t}-allow-clear ${_t}-selector
|
|
|
`]:{paddingInlineEnd:It.fontSizeIcon+It.controlPaddingHorizontal},[`${_t}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:le,marginTop:Xt,marginBottom:Xt,lineHeight:`${le-It.lineWidth*2}px`,background:It.multipleItemBg,border:`${It.lineWidth}px ${It.lineType} ${It.multipleItemBorderColor}`,borderRadius:It.borderRadiusSM,cursor:"default",transition:`font-size ${It.motionDurationSlow}, line-height ${It.motionDurationSlow}, height ${It.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Xt*2,paddingInlineStart:It.paddingXS,paddingInlineEnd:It.paddingXS/2,[`${_t}-disabled&`]:{color:It.multipleItemColorDisabled,borderColor:It.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:It.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,wt.Ro)()),{display:"inline-flex",alignItems:"center",color:It.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${se}`]:{verticalAlign:"-0.2em"},"&:hover":{color:It.colorIconHover}})},[`${Jt}-item + ${Jt}-item`]:{[`${_t}-selection-search`]:{marginInlineStart:0}},[`${_t}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:It.inputPaddingHorizontalBase-Zt,"\n &-input,\n &-mirror\n ":{height:le,fontFamily:It.fontFamily,lineHeight:`${le}px`,transition:`all ${It.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:It.inputPaddingHorizontalBase,insetInlineEnd:It.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${It.motionDurationSlow}`}}}}var Bt=It=>{const{componentCls:zt}=It,_t=(0,he.TS)(It,{controlHeight:It.controlHeightSM,multipleSelectItemHeight:It.controlHeightXS,borderRadius:It.borderRadiusSM,borderRadiusSM:It.borderRadiusXS}),se=(0,he.TS)(It,{fontSize:It.fontSizeLG,controlHeight:It.controlHeightLG,multipleSelectItemHeight:It.multipleItemHeightLG,borderRadius:It.borderRadiusLG,borderRadiusSM:It.borderRadius}),[,Jt]=fe(It);return[xe(It),xe(_t,"sm"),{[`${zt}-multiple${zt}-sm`]:{[`${zt}-selection-placeholder`]:{insetInline:It.controlPaddingHorizontalSM-It.lineWidth},[`${zt}-selection-search`]:{marginInlineStart:Jt}}},xe(se,"lg")]};function et(It,zt){const{componentCls:_t,inputPaddingHorizontalBase:se,borderRadius:Jt}=It,le=It.controlHeight-It.lineWidth*2,Zt=Math.ceil(It.fontSize*1.25),Fe=zt?`${_t}-${zt}`:"";return{[`${_t}-single${Fe}`]:{fontSize:It.fontSize,[`${_t}-selector`]:Object.assign(Object.assign({},(0,wt.Wf)(It)),{display:"flex",borderRadius:Jt,[`${_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:`${le}px`,transition:`all ${It.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${le}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:It.colorTextPlaceholder},[`&:not(${_t}-customize-input)`]:{[`${_t}-selector`]:{width:"100%",height:It.controlHeight,padding:`0 ${se}px`,[`${_t}-selection-search-input`]:{height:le},"&:after":{lineHeight:`${le}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(It){const{componentCls:zt}=It,_t=It.controlPaddingHorizontalSM-It.lineWidth;return[et(It),et((0,he.TS)(It,{controlHeight:It.controlHeightSM,borderRadius:It.borderRadiusSM}),"sm"),{[`${zt}-single${zt}-sm`]:{[`&:not(${zt}-customize-input)`]:{[`${zt}-selection-search`]:{insetInlineStart:_t,insetInlineEnd:_t},[`${zt}-selector`]:{padding:`0 ${_t}px`},[`&${zt}-show-arrow ${zt}-selection-search`]:{insetInlineEnd:_t+It.fontSize*1.5},[`
|
|
|
&${zt}-show-arrow ${zt}-selection-item,
|
|
|
&${zt}-show-arrow ${zt}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:It.fontSize*1.5}}}},et((0,he.TS)(It,{controlHeight:It.singleItemHeightLG,fontSize:It.fontSizeLG,borderRadius:It.borderRadiusLG}),"lg")]}const ht=It=>{const{componentCls:zt,selectorBg:_t}=It;return{position:"relative",backgroundColor:_t,border:`${It.lineWidth}px ${It.lineType} ${It.colorBorder}`,transition:`all ${It.motionDurationMid} ${It.motionEaseInOut}`,input:{cursor:"pointer"},[`${zt}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${zt}-disabled&`]:{color:It.colorTextDisabled,background:It.colorBgContainerDisabled,cursor:"not-allowed",[`${zt}-multiple&`]:{background:It.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},lt=function(It,zt){let _t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:se,borderHoverColor:Jt,outlineColor:le,antCls:Zt}=zt,Fe=_t?{[`${se}-selector`]:{borderColor:Jt}}:{};return{[It]:{[`&:not(${se}-disabled):not(${se}-customize-input):not(${Zt}-pagination-size-changer)`]:Object.assign(Object.assign({},Fe),{[`${se}-focused& ${se}-selector`]:{borderColor:Jt,boxShadow:`0 0 0 ${zt.controlOutlineWidth}px ${le}`,outline:0},[`&:hover ${se}-selector`]:{borderColor:Jt}})}}},gt=It=>{const{componentCls:zt}=It;return{[`${zt}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},yt=It=>{const{componentCls:zt,inputPaddingHorizontalBase:_t,iconCls:se}=It;return{[zt]:Object.assign(Object.assign({},(0,wt.Wf)(It)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${zt}-customize-input) ${zt}-selector`]:Object.assign(Object.assign({},ht(It)),gt(It)),[`${zt}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},wt.vS),[`${zt}-selection-placeholder`]:Object.assign(Object.assign({},wt.vS),{flex:1,color:It.colorTextPlaceholder,pointerEvents:"none"}),[`${zt}-arrow`]:Object.assign(Object.assign({},(0,wt.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_t,height:It.fontSizeIcon,marginTop:-It.fontSizeIcon/2,color:It.colorTextQuaternary,fontSize:It.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[se]:{verticalAlign:"top",transition:`transform ${It.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${zt}-suffix)`]:{pointerEvents:"auto"}},[`${zt}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${zt}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_t,zIndex:1,display:"inline-block",width:It.fontSizeIcon,height:It.fontSizeIcon,marginTop:-It.fontSizeIcon/2,color:It.colorTextQuaternary,fontSize:It.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:It.clearBg,cursor:"pointer",opacity:0,transition:`color ${It.motionDurationMid} ease, opacity ${It.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:It.colorTextTertiary}},"&:hover":{[`${zt}-clear`]:{opacity:1}}}),[`${zt}-has-feedback`]:{[`${zt}-clear`]:{insetInlineEnd:_t+It.fontSize+It.paddingXS}}}},Pt=It=>{const{componentCls:zt}=It;return[{[zt]:{[`&-borderless ${zt}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${zt}-in-form-item`]:{width:"100%"}}},yt(It),nt(It),Bt(It),ve(It),{[`${zt}-rtl`]:{direction:"rtl"}},lt(zt,(0,he.TS)(It,{borderHoverColor:It.colorPrimaryHover,outlineColor:It.controlOutline})),lt(`${zt}-status-error`,(0,he.TS)(It,{borderHoverColor:It.colorErrorHover,outlineColor:It.colorErrorOutline}),!0),lt(`${zt}-status-warning`,(0,he.TS)(It,{borderHoverColor:It.colorWarningHover,outlineColor:It.colorWarningOutline}),!0),(0,ee.c)(It,{borderElCls:`${zt}-selector`,focusElCls:`${zt}-focused`})]};var Tt=(0,Ie.Z)("Select",(It,zt)=>{let{rootPrefixCls:_t}=zt;const se=(0,he.TS)(It,{rootPrefixCls:_t,inputPaddingHorizontalBase:It.paddingSM-1,multipleSelectItemHeight:It.multipleItemHeight});return[Pt(se)]},It=>{const{fontSize:zt,lineHeight:_t,controlHeight:se,controlPaddingHorizontal:Jt,zIndexPopupBase:le,colorText:Zt,fontWeightStrong:Fe,controlItemBgActive:me,controlItemBgHover:Ve,colorBgContainer:Qe,colorFillSecondary:qe,controlHeightLG:vn,controlHeightSM:xn,colorBgContainerDisabled:Se,colorTextDisabled:Vt}=It;return{zIndexPopup:le+50,optionSelectedColor:Zt,optionSelectedFontWeight:Fe,optionSelectedBg:me,optionActiveBg:Ve,optionPadding:`${(se-zt*_t)/2}px ${Jt}px`,optionFontSize:zt,optionLineHeight:_t,optionHeight:se,selectorBg:Qe,clearBg:Qe,singleItemHeightLG:vn,multipleItemBg:qe,multipleItemBorderColor:"transparent",multipleItemHeight:xn,multipleItemHeightLG:se,multipleSelectorBgDisabled:Se,multipleItemColorDisabled:Vt,multipleItemBorderColorDisabled:"transparent"}})},58582:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return ee}});const wt=he=>{const te={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:he==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},te),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},te),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},te),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},te),{points:["br","tr"],offset:[0,-4]})}};function ee(he,Ie){return he||wt(Ie)}},84443:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return wt}});function wt(ee,he){return he!==void 0?he:ee!==null}},66339:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});var wt=bt(40001),ee=bt(19248),he=bt(99267),Ie=bt(84105),te=bt(58617),Pe=bt(47472),Nt=bt(59301);function Le(ve){let{suffixIcon:Xt,clearIcon:fe,menuItemSelectedIcon:xe,removeIcon:je,loading:Bt,multiple:et,hasFeedback:nt,prefixCls:ht,showSuffixIcon:lt,feedbackIcon:gt,showArrow:yt,componentName:Pt}=ve;const Tt=fe!=null?fe:Nt.createElement(ee.Z,null),It=Jt=>Xt===null&&!nt&&!yt?null:Nt.createElement(Nt.Fragment,null,lt!==!1&&Jt,nt&>);let zt=null;if(Xt!==void 0)zt=It(Xt);else if(Bt)zt=It(Nt.createElement(te.Z,{spin:!0}));else{const Jt=`${ht}-suffix`;zt=le=>{let{open:Zt,showSearch:Fe}=le;return It(Zt&&Fe?Nt.createElement(Pe.Z,{className:Jt}):Nt.createElement(Ie.Z,{className:Jt}))}}let _t=null;xe!==void 0?_t=xe:et?_t=Nt.createElement(wt.Z,null):_t=null;let se=null;return je!==void 0?se=je:se=Nt.createElement(he.Z,null),{clearIcon:Tt,suffixIcon:zt,itemIcon:_t,removeIcon:se}}},15969:function(dn,Mn,bt){"use strict";bt.d(Mn,{N:function(){return wt}});const wt=ee=>({color:ee.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${ee.motionDurationSlow}`,"&:focus, &:hover":{color:ee.colorLinkHover},"&:active":{color:ee.colorLinkActive}})},78673:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Fe}});var wt=bt(58617),ee=bt(92310),he=bt.n(ee),Ie=bt(72308),te=bt(49618),Pe=bt(52487),Nt=bt(74416),Le=bt(59301),ve=bt(18929),Xt=bt(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],xe=Le.forwardRef(function(me,Ve){var Qe,qe=me.prefixCls,vn=qe===void 0?"rc-switch":qe,xn=me.className,Se=me.checked,Vt=me.defaultChecked,Xe=me.disabled,Xn=me.loadingIcon,Bn=me.checkedChildren,Ae=me.unCheckedChildren,hn=me.onClick,bn=me.onChange,Jn=me.onKeyDown,mn=(0,Nt.Z)(me,fe),ui=(0,ve.Z)(!1,{value:Se,defaultValue:Vt}),Ce=(0,Pe.Z)(ui,2),ni=Ce[0],Pi=Ce[1];function gn(On,we){var In=ni;return Xe||(In=On,Pi(In),bn==null||bn(In,we)),In}function Tn(On){On.which===Xt.Z.LEFT?gn(!1,On):On.which===Xt.Z.RIGHT&&gn(!0,On),Jn==null||Jn(On)}function pn(On){var we=gn(!ni,On);hn==null||hn(we,On)}var Un=he()(vn,xn,(Qe={},(0,te.Z)(Qe,"".concat(vn,"-checked"),ni),(0,te.Z)(Qe,"".concat(vn,"-disabled"),Xe),Qe));return Le.createElement("button",(0,Ie.Z)({},mn,{type:"button",role:"switch","aria-checked":ni,disabled:Xe,className:Un,ref:Ve,onKeyDown:Tn,onClick:pn}),Xn,Le.createElement("span",{className:"".concat(vn,"-inner")},Le.createElement("span",{className:"".concat(vn,"-inner-checked")},Bn),Le.createElement("span",{className:"".concat(vn,"-inner-unchecked")},Ae)))});xe.displayName="Switch";var je=xe,Bt=bt(14088),et=bt(36355),nt=bt(1684),ht=bt(19716),lt=bt(64993),gt=bt(17313),yt=bt(83116),Pt=bt(37613);const Tt=me=>{const{componentCls:Ve,trackHeightSM:Qe,trackPadding:qe,trackMinWidthSM:vn,innerMinMarginSM:xn,innerMaxMarginSM:Se,handleSizeSM:Vt}=me,Xe=`${Ve}-inner`;return{[Ve]:{[`&${Ve}-small`]:{minWidth:vn,height:Qe,lineHeight:`${Qe}px`,[`${Ve}-inner`]:{paddingInlineStart:Se,paddingInlineEnd:xn,[`${Xe}-checked`]:{marginInlineStart:`calc(-100% + ${Vt+qe*2}px - ${Se*2}px)`,marginInlineEnd:`calc(100% - ${Vt+qe*2}px + ${Se*2}px)`},[`${Xe}-unchecked`]:{marginTop:-Qe,marginInlineStart:0,marginInlineEnd:0}},[`${Ve}-handle`]:{width:Vt,height:Vt},[`${Ve}-loading-icon`]:{top:(Vt-me.switchLoadingIconSize)/2,fontSize:me.switchLoadingIconSize},[`&${Ve}-checked`]:{[`${Ve}-inner`]:{paddingInlineStart:xn,paddingInlineEnd:Se,[`${Xe}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Xe}-unchecked`]:{marginInlineStart:`calc(100% - ${Vt+qe*2}px + ${Se*2}px)`,marginInlineEnd:`calc(-100% + ${Vt+qe*2}px - ${Se*2}px)`}},[`${Ve}-handle`]:{insetInlineStart:`calc(100% - ${Vt+qe}px)`}},[`&:not(${Ve}-disabled):active`]:{[`&:not(${Ve}-checked) ${Xe}`]:{[`${Xe}-unchecked`]:{marginInlineStart:me.marginXXS/2,marginInlineEnd:-me.marginXXS/2}},[`&${Ve}-checked ${Xe}`]:{[`${Xe}-checked`]:{marginInlineStart:-me.marginXXS/2,marginInlineEnd:me.marginXXS/2}}}}}}},It=me=>{const{componentCls:Ve,handleSize:Qe}=me;return{[Ve]:{[`${Ve}-loading-icon${me.iconCls}`]:{position:"relative",top:(Qe-me.fontSize)/2,color:me.switchLoadingIconColor,verticalAlign:"top"},[`&${Ve}-checked ${Ve}-loading-icon`]:{color:me.switchColor}}}},zt=me=>{const{componentCls:Ve,motion:Qe,trackPadding:qe,handleBg:vn,handleShadow:xn,handleSize:Se}=me,Vt=`${Ve}-handle`;return{[Ve]:{[Vt]:{position:"absolute",top:qe,insetInlineStart:qe,width:Se,height:Se,transition:`all ${me.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:vn,borderRadius:Se/2,boxShadow:xn,transition:`all ${me.switchDuration} ease-in-out`,content:'""'}},[`&${Ve}-checked ${Vt}`]:{insetInlineStart:`calc(100% - ${Se+qe}px)`},[`&:not(${Ve}-disabled):active`]:Qe?{[`${Vt}::before`]:{insetInlineEnd:me.switchHandleActiveInset,insetInlineStart:0},[`&${Ve}-checked ${Vt}::before`]:{insetInlineEnd:0,insetInlineStart:me.switchHandleActiveInset}}:{}}}},_t=me=>{const{componentCls:Ve,trackHeight:Qe,trackPadding:qe,innerMinMargin:vn,innerMaxMargin:xn,handleSize:Se}=me,Vt=`${Ve}-inner`;return{[Ve]:{[Vt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:xn,paddingInlineEnd:vn,transition:`padding-inline-start ${me.switchDuration} ease-in-out, padding-inline-end ${me.switchDuration} ease-in-out`,[`${Vt}-checked, ${Vt}-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"},[`${Vt}-checked`]:{marginInlineStart:`calc(-100% + ${Se+qe*2}px - ${xn*2}px)`,marginInlineEnd:`calc(100% - ${Se+qe*2}px + ${xn*2}px)`},[`${Vt}-unchecked`]:{marginTop:-Qe,marginInlineStart:0,marginInlineEnd:0}},[`&${Ve}-checked ${Vt}`]:{paddingInlineStart:vn,paddingInlineEnd:xn,[`${Vt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Vt}-unchecked`]:{marginInlineStart:`calc(100% - ${Se+qe*2}px + ${xn*2}px)`,marginInlineEnd:`calc(-100% + ${Se+qe*2}px - ${xn*2}px)`}},[`&:not(${Ve}-disabled):active`]:{[`&:not(${Ve}-checked) ${Vt}`]:{[`${Vt}-unchecked`]:{marginInlineStart:qe*2,marginInlineEnd:-qe*2}},[`&${Ve}-checked ${Vt}`]:{[`${Vt}-checked`]:{marginInlineStart:-qe*2,marginInlineEnd:qe*2}}}}}},se=me=>{const{componentCls:Ve,trackHeight:Qe,trackMinWidth:qe}=me;return{[Ve]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(me)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:qe,height:Qe,lineHeight:`${Qe}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 Jt=(0,yt.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),zt(Ve),It(Ve),Tt(Ve)]},me=>{const{fontSize:Ve,lineHeight:Qe,controlHeight:qe,colorWhite:vn}=me,xn=Ve*Qe,Se=qe/2,Vt=2,Xe=xn-Vt*2,Xn=Se-Vt*2;return{trackHeight:xn,trackHeightSM:Se,trackMinWidth:Xe*2+Vt*4,trackMinWidthSM:Xn*2+Vt*2,trackPadding:Vt,handleBg:vn,handleSize:Xe,handleSizeSM:Xn,handleShadow:`0 2px 4px 0 ${new lt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Xe/2,innerMaxMargin:Xe+Vt+Vt*2,innerMinMarginSM:Xn/2,innerMaxMarginSM:Xn+Vt+Vt*2}}),le=function(me,Ve){var Qe={};for(var qe in me)Object.prototype.hasOwnProperty.call(me,qe)&&Ve.indexOf(qe)<0&&(Qe[qe]=me[qe]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,qe=Object.getOwnPropertySymbols(me);vn<qe.length;vn++)Ve.indexOf(qe[vn])<0&&Object.prototype.propertyIsEnumerable.call(me,qe[vn])&&(Qe[qe[vn]]=me[qe[vn]]);return Qe};const Zt=Le.forwardRef((me,Ve)=>{const{prefixCls:Qe,size:qe,disabled:vn,loading:xn,className:Se,rootClassName:Vt,style:Xe}=me,Xn=le(me,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Bn,direction:Ae,switch:hn}=Le.useContext(et.E_),bn=Le.useContext(nt.Z),Jn=(vn!=null?vn:bn)||xn,mn=Bn("switch",Qe),ui=Le.createElement("div",{className:`${mn}-handle`},xn&&Le.createElement(wt.Z,{className:`${mn}-loading-icon`})),[Ce,ni]=Jt(mn),Pi=(0,ht.Z)(qe),gn=he()(hn==null?void 0:hn.className,{[`${mn}-small`]:Pi==="small",[`${mn}-loading`]:xn,[`${mn}-rtl`]:Ae==="rtl"},Se,Vt,ni),Tn=Object.assign(Object.assign({},hn==null?void 0:hn.style),Xe);return Ce(Le.createElement(Bt.Z,{component:"Switch"},Le.createElement(je,Object.assign({},Xn,{prefixCls:mn,className:gn,style:Tn,disabled:Jn,ref:Ve,loadingIcon:ui}))))});Zt.__ANT_SWITCH=!0;var Fe=Zt},1710:function(dn,Mn,bt){"use strict";bt.d(Mn,{default:function(){return Zg}});var wt={},ee="rc-table-internal-hook",he=bt(52487),Ie=bt(6089),te=bt(34280),Pe=bt(13697),Nt=bt(59301),Le=bt(4676);function ve(Ut){var Qt=Nt.createContext(void 0),ye=function(He){var Ne=He.value,an=He.children,ln=Nt.useRef(Ne);ln.current=Ne;var en=Nt.useState(function(){return{getValue:function(){return ln.current},listeners:new Set}}),kn=(0,he.Z)(en,1),Rn=kn[0];return(0,te.Z)(function(){(0,Le.unstable_batchedUpdates)(function(){Rn.listeners.forEach(function(Fn){Fn(Ne)})})},[Ne]),Nt.createElement(Qt.Provider,{value:Rn},an)};return{Context:Qt,Provider:ye,defaultValue:Ut}}function Xt(Ut,Qt){var ye=(0,Ie.Z)(typeof Qt=="function"?Qt:function(Fn){if(Qt===void 0)return Fn;if(!Array.isArray(Qt))return Fn[Qt];var pi={};return Qt.forEach(function(di){pi[di]=Fn[di]}),pi}),Me=Nt.useContext(Ut==null?void 0:Ut.Context),He=Me||{},Ne=He.listeners,an=He.getValue,ln=Nt.useRef();ln.current=ye(Me?an():Ut==null?void 0:Ut.defaultValue);var en=Nt.useState({}),kn=(0,he.Z)(en,2),Rn=kn[1];return(0,te.Z)(function(){if(!Me)return;function Fn(pi){var di=ye(pi);(0,Pe.Z)(ln.current,di,!0)||Rn({})}return Ne.add(Fn),function(){Ne.delete(Fn)}},[Me]),ln.current}var fe=bt(72308),xe=bt(8654);function je(){var Ut=Nt.createContext(null);function Qt(){return Nt.useContext(Ut)}function ye(He,Ne){var an=(0,xe.Yr)(He),ln=function(kn,Rn){var Fn=an?{ref:Rn}:{},pi=Nt.useRef(0),di=Nt.useRef(kn),oi=Qt();return oi!==null?Nt.createElement(He,(0,fe.Z)({},kn,Fn)):((!Ne||Ne(di.current,kn))&&(pi.current+=1),di.current=kn,Nt.createElement(Ut.Provider,{value:pi.current},Nt.createElement(He,(0,fe.Z)({},kn,Fn))))};return an?Nt.forwardRef(ln):ln}function Me(He,Ne){var an=(0,xe.Yr)(He),ln=function(kn,Rn){var Fn=an?{ref:Rn}:{};return Qt(),Nt.createElement(He,(0,fe.Z)({},kn,Fn))};return an?Nt.memo(Nt.forwardRef(ln),Ne):Nt.memo(ln,Ne)}return{makeImmutable:ye,responseImmutable:Me,useImmutableMark:Qt}}var Bt=je(),et=Bt.makeImmutable,nt=Bt.responseImmutable,ht=Bt.useImmutableMark,lt=je(),gt=lt.makeImmutable,yt=lt.responseImmutable,Pt=lt.useImmutableMark,Tt=ve(),It=Tt;function zt(Ut,Qt){var ye=Nt.useRef(0);ye.current+=1;var Me=Nt.useRef(Ut),He=[];Object.keys(Ut||{}).map(function(an){var ln;(Ut==null?void 0:Ut[an])!==((ln=Me.current)===null||ln===void 0?void 0:ln[an])&&He.push(an)}),Me.current=Ut;var Ne=Nt.useRef([]);return He.length&&(Ne.current=He),Nt.useDebugValue(ye.current),Nt.useDebugValue(Ne.current.join(", ")),Qt&&console.log("".concat(Qt,":"),ye.current,Ne.current),ye.current}var _t=null,se=Nt.memo(function(){var Ut=zt();return Nt.createElement("h1",null,"Render Times: ",Ut)});se.displayName="RenderBlock";var Jt=bt(62853),le=bt(77321),Zt=bt(49618),Fe=bt(92310),me=bt.n(Fe),Ve=bt(80547),Qe=bt(97938),qe=bt(48736),vn=Nt.createContext({renderWithProps:!1}),xn=vn,Se="RC_TABLE_KEY";function Vt(Ut){return Ut==null?[]:Array.isArray(Ut)?Ut:[Ut]}function Xe(Ut){var Qt=[],ye={};return Ut.forEach(function(Me){for(var He=Me||{},Ne=He.key,an=He.dataIndex,ln=Ne||Vt(an).join("-")||Se;ye[ln];)ln="".concat(ln,"_next");ye[ln]=!0,Qt.push(ln)}),Qt}function Xn(Ut){return Ut!=null}function Bn(Ut){return Ut&&(0,Jt.Z)(Ut)==="object"&&!Array.isArray(Ut)&&!Nt.isValidElement(Ut)}function Ae(Ut,Qt,ye,Me,He,Ne){var an=Nt.useContext(xn),ln=Pt(),en=(0,Ve.Z)(function(){if(Xn(Me))return[Me];var kn=Qt==null||Qt===""?[]:Array.isArray(Qt)?Qt:[Qt],Rn=(0,Qe.Z)(Ut,kn),Fn=Rn,pi=void 0;if(He){var di=He(Rn,Ut,ye);Bn(di)?(Fn=di.children,pi=di.props,an.renderWithProps=!0):Fn=di}return[Fn,pi]},[ln,Ut,Me,Qt,He,ye],function(kn,Rn){if(Ne){var Fn=(0,he.Z)(kn,2),pi=Fn[1],di=(0,he.Z)(Rn,2),oi=di[1];return Ne(oi,pi)}return an.renderWithProps?!0:!(0,Pe.Z)(kn,Rn,!0)});return en}function hn(Ut,Qt,ye,Me){var He=Ut+Qt-1;return Ut<=Me&&He>=ye}function bn(Ut,Qt){return Xt(It,function(ye){var Me=hn(Ut,Qt||1,ye.hoverStartRow,ye.hoverEndRow);return[Me,ye.onHover]})}var Jn=function(Qt){var ye=Qt.ellipsis,Me=Qt.rowType,He=Qt.children,Ne,an=ye===!0?{showTitle:!0}:ye;return an&&(an.showTitle||Me==="header")&&(typeof He=="string"||typeof He=="number"?Ne=He.toString():Nt.isValidElement(He)&&typeof He.props.children=="string"&&(Ne=He.props.children)),Ne};function mn(Ut){var Qt,ye,Me,He,Ne,an,ln,en,kn=Ut.component,Rn=Ut.children,Fn=Ut.ellipsis,pi=Ut.scope,di=Ut.prefixCls,oi=Ut.className,Ii=Ut.align,ai=Ut.record,Ni=Ut.render,bi=Ut.dataIndex,Vi=Ut.renderIndex,yo=Ut.shouldCellUpdate,Bo=Ut.index,Ri=Ut.rowType,po=Ut.colSpan,or=Ut.rowSpan,Zi=Ut.fixLeft,io=Ut.fixRight,Wi=Ut.firstFixLeft,xi=Ut.lastFixLeft,to=Ut.firstFixRight,Lo=Ut.lastFixRight,Ko=Ut.appendNode,Vo=Ut.additionalProps,ji=Vo===void 0?{}:Vo,sr=Ut.isSticky,fr="".concat(di,"-cell"),Qr=Xt(It,["supportSticky","allColumnsFixedLeft"]),br=Qr.supportSticky,Os=Qr.allColumnsFixedLeft,Bs=Ae(ai,bi,Vi,Rn,Ni,yo),ur=(0,he.Z)(Bs,2),No=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 Yo=(Qt=(ye=(Me=zr==null?void 0:zr.colSpan)!==null&&Me!==void 0?Me:ji.colSpan)!==null&&ye!==void 0?ye:po)!==null&&Qt!==void 0?Qt:1,Ro=(He=(Ne=(an=zr==null?void 0:zr.rowSpan)!==null&&an!==void 0?an:ji.rowSpan)!==null&&Ne!==void 0?Ne:or)!==null&&He!==void 0?He:1,Xo=bn(Bo,Ro),wo=(0,he.Z)(Xo,2),Kr=wo[0],Po=wo[1],rr=function(ta){var ma;ai&&Po(Bo,Bo+Ro-1),ji==null||(ma=ji.onMouseEnter)===null||ma===void 0||ma.call(ji,ta)},Nr=function(ta){var ma;ai&&Po(-1,-1),ji==null||(ma=ji.onMouseLeave)===null||ma===void 0||ma.call(ji,ta)};if(Yo===0||Ro===0)return null;var Tr=(ln=ji.title)!==null&&ln!==void 0?ln:Jn({rowType:Ri,ellipsis:Fn,children:No}),Ea=me()(fr,oi,(en={},(0,Zt.Z)(en,"".concat(fr,"-fix-left"),Cs&&br),(0,Zt.Z)(en,"".concat(fr,"-fix-left-first"),Wi&&br),(0,Zt.Z)(en,"".concat(fr,"-fix-left-last"),xi&&br),(0,Zt.Z)(en,"".concat(fr,"-fix-left-all"),xi&&Os&&br),(0,Zt.Z)(en,"".concat(fr,"-fix-right"),ia&&br),(0,Zt.Z)(en,"".concat(fr,"-fix-right-first"),to&&br),(0,Zt.Z)(en,"".concat(fr,"-fix-right-last"),Lo&&br),(0,Zt.Z)(en,"".concat(fr,"-ellipsis"),Fn),(0,Zt.Z)(en,"".concat(fr,"-with-append"),Ko),(0,Zt.Z)(en,"".concat(fr,"-fix-sticky"),(Cs||ia)&&sr&&br),(0,Zt.Z)(en,"".concat(fr,"-row-hover"),!zr&&Kr),en),ji.className,zr==null?void 0:zr.className),la={};Ii&&(la.textAlign=Ii);var Va=(0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)({},Rs),ji.style),la),zr==null?void 0:zr.style),Jr=No;return(0,Jt.Z)(Jr)==="object"&&!Array.isArray(Jr)&&!Nt.isValidElement(Jr)&&(Jr=null),Fn&&(xi||to)&&(Jr=Nt.createElement("span",{className:"".concat(fr,"-content")},Jr)),Nt.createElement(kn,(0,fe.Z)({},zr,ji,{className:Ea,style:Va,title:Tr,scope:pi,onMouseEnter:rr,onMouseLeave:Nr,colSpan:Yo!==1?Yo:null,rowSpan:Ro!==1?Ro:null}),Ko,Jr)}var ui=Nt.memo(mn);function Ce(Ut,Qt,ye,Me,He,Ne){var an=ye[Ut]||{},ln=ye[Qt]||{},en,kn;an.fixed==="left"?en=Me.left[He==="rtl"?Qt:Ut]:ln.fixed==="right"&&(kn=Me.right[He==="rtl"?Ut:Qt]);var Rn=!1,Fn=!1,pi=!1,di=!1,oi=ye[Qt+1],Ii=ye[Ut-1],ai=!(Ne!=null&&Ne.children);if(He==="rtl"){if(en!==void 0){var Ni=Ii&&Ii.fixed==="left";di=!Ni&&ai}else if(kn!==void 0){var bi=oi&&oi.fixed==="right";pi=!bi&&ai}}else if(en!==void 0){var Vi=oi&&oi.fixed==="left";Rn=!Vi&&ai}else if(kn!==void 0){var yo=Ii&&Ii.fixed==="right";Fn=!yo&&ai}return{fixLeft:en,fixRight:kn,lastFixLeft:Rn,firstFixRight:Fn,lastFixRight:pi,firstFixLeft:di,isSticky:Me.isSticky}}var ni=Nt.createContext({}),Pi=ni;function gn(Ut){var Qt=Ut.className,ye=Ut.index,Me=Ut.children,He=Ut.colSpan,Ne=He===void 0?1:He,an=Ut.rowSpan,ln=Ut.align,en=Xt(It,["prefixCls","direction"]),kn=en.prefixCls,Rn=en.direction,Fn=Nt.useContext(Pi),pi=Fn.scrollColumnIndex,di=Fn.stickyOffsets,oi=Fn.flattenColumns,Ii=Fn.columns,ai=ye+Ne-1,Ni=ai+1===pi?Ne+1:Ne,bi=Ce(ye,ye+Ni-1,oi,di,Rn,Ii==null?void 0:Ii[ye]);return Nt.createElement(ui,(0,fe.Z)({className:Qt,index:ye,component:"td",prefixCls:kn,record:null,dataIndex:null,align:ln,colSpan:Ni,rowSpan:an,render:function(){return Me}},bi))}var Tn=bt(74416),pn=["children"];function Un(Ut){var Qt=Ut.children,ye=(0,Tn.Z)(Ut,pn);return Nt.createElement("tr",ye,Qt)}function On(Ut){var Qt=Ut.children;return Qt}On.Row=Un,On.Cell=gn;var we=On;function In(Ut){var Qt=Ut.children,ye=Ut.stickyOffsets,Me=Ut.flattenColumns,He=Ut.columns,Ne=Xt(It,"prefixCls"),an=Me.length-1,ln=Me[an],en=Nt.useMemo(function(){return{stickyOffsets:ye,flattenColumns:Me,scrollColumnIndex:ln!=null&&ln.scrollbar?an:null,columns:He}},[ln,Me,an,ye,He]);return Nt.createElement(Pi.Provider,{value:en},Nt.createElement("tfoot",{className:"".concat(Ne,"-summary")},Qt))}var rn=yt(In),ge=we,oe=bt(70425),Ft=bt(29301),St=bt(29194),mt=bt(24514),At=bt(75152),Rt=bt(26112);function Lt(Ut,Qt,ye,Me,He,Ne,an){Ut.push({record:Qt,indent:ye,index:an});var ln=Ne(Qt),en=He==null?void 0:He.has(ln);if(Qt&&Array.isArray(Qt[Me])&&en)for(var kn=0;kn<Qt[Me].length;kn+=1)Lt(Ut,Qt[Me][kn],ye+1,Me,He,Ne,kn)}function ae(Ut,Qt,ye,Me){var He=Nt.useMemo(function(){if(ye!=null&&ye.size){for(var Ne=[],an=0;an<(Ut==null?void 0:Ut.length);an+=1){var ln=Ut[an];Lt(Ne,ln,0,Qt,ye,Me,an)}return Ne}return Ut==null?void 0:Ut.map(function(en,kn){return{record:en,indent:0,index:kn}})},[Ut,Qt,ye,Me]);return He}function De(Ut){var Qt=Ut.prefixCls,ye=Ut.children,Me=Ut.component,He=Ut.cellComponent,Ne=Ut.className,an=Ut.expanded,ln=Ut.colSpan,en=Ut.isEmpty,kn=Xt(It,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Rn=kn.scrollbarSize,Fn=kn.fixHeader,pi=kn.fixColumn,di=kn.componentWidth,oi=kn.horizonScroll,Ii=ye;return(en?oi&&di:pi)&&(Ii=Nt.createElement("div",{style:{width:di-(Fn?Rn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Qt,"-expanded-row-fixed")},Ii)),Nt.createElement(Me,{className:Ne,style:{display:an?null:"none"}},Nt.createElement(ui,{component:He,prefixCls:Qt,colSpan:ln},Ii))}var Oe=De;function Be(Ut,Qt,ye,Me){var He=Xt(It,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Ne=He.flattenColumns,an=He.expandableType,ln=He.expandedKeys,en=He.childrenColumnName,kn=He.onTriggerExpand,Rn=He.rowExpandable,Fn=He.onRow,pi=He.expandRowByClick,di=He.rowClassName,oi=an==="nest",Ii=an==="row"&&(!Rn||Rn(Ut)),ai=Ii||oi,Ni=ln&&ln.has(Qt),bi=en&&Ut&&Ut[en],Vi=(0,oe.useEvent)(kn),yo=Fn==null?void 0:Fn(Ut,ye),Bo=yo==null?void 0:yo.onClick,Ri=function(io){pi&&ai&&kn(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))},po;typeof di=="string"?po=di:typeof di=="function"&&(po=di(Ut,ye,Me));var or=Xe(Ne);return(0,le.Z)((0,le.Z)({},He),{},{columnsKey:or,nestExpandable:oi,expanded:Ni,hasNestChildren:bi,record:Ut,onTriggerExpand:Vi,rowSupportExpand:Ii,expandable:ai,rowProps:(0,le.Z)((0,le.Z)({},yo),{},{className:me()(po,yo==null?void 0:yo.className),onClick:Ri})})}function yn(Ut,Qt,ye,Me,He){var Ne=Ut.record,an=Ut.prefixCls,ln=Ut.columnsKey,en=Ut.fixedInfoList,kn=Ut.expandIconColumnIndex,Rn=Ut.nestExpandable,Fn=Ut.indentSize,pi=Ut.expandIcon,di=Ut.expanded,oi=Ut.hasNestChildren,Ii=Ut.onTriggerExpand,ai=ln[ye],Ni=en[ye],bi;ye===(kn||0)&&Rn&&(bi=Nt.createElement(Nt.Fragment,null,Nt.createElement("span",{style:{paddingLeft:"".concat(Fn*Me,"px")},className:"".concat(an,"-row-indent indent-level-").concat(Me)}),pi({prefixCls:an,expanded:di,expandable:oi,record:Ne,onExpand:Ii})));var Vi;return Qt.onCell&&(Vi=Qt.onCell(Ne,He)),{key:ai,fixedInfo:Ni,appendCellNode:bi,additionalCellProps:Vi||{}}}function Gn(Ut){var Qt=Ut.className,ye=Ut.style,Me=Ut.record,He=Ut.index,Ne=Ut.renderIndex,an=Ut.rowKey,ln=Ut.indent,en=ln===void 0?0:ln,kn=Ut.rowComponent,Rn=Ut.cellComponent,Fn=Ut.scopeCellComponent,pi=Be(Me,an,He,en),di=pi.prefixCls,oi=pi.flattenColumns,Ii=pi.expandedRowClassName,ai=pi.expandedRowRender,Ni=pi.rowProps,bi=pi.expanded,Vi=pi.rowSupportExpand,yo=Nt.useState(!1),Bo=(0,he.Z)(yo,2),Ri=Bo[0],po=Bo[1];Nt.useEffect(function(){bi&&po(!0)},[bi]);var or=Nt.createElement(kn,(0,fe.Z)({},Ni,{"data-row-key":an,className:me()(Qt,"".concat(di,"-row"),"".concat(di,"-row-level-").concat(en),Ni==null?void 0:Ni.className),style:(0,le.Z)((0,le.Z)({},ye),Ni==null?void 0:Ni.style)}),oi.map(function(xi,to){var Lo=xi.render,Ko=xi.dataIndex,Vo=xi.className,ji=yn(pi,xi,to,en,He),sr=ji.key,fr=ji.fixedInfo,Qr=ji.appendCellNode,br=ji.additionalCellProps;return Nt.createElement(ui,(0,fe.Z)({className:Vo,ellipsis:xi.ellipsis,align:xi.align,scope:xi.rowScope,component:xi.rowScope?Fn:Rn,prefixCls:di,key:sr,record:Me,index:He,renderIndex:Ne,dataIndex:Ko,render:Lo,shouldCellUpdate:xi.shouldCellUpdate},fr,{appendNode:Qr,additionalProps:br}))})),Zi;if(Vi&&(Ri||bi)){var io=ai(Me,He,en+1,bi),Wi=Ii&&Ii(Me,He,en);Zi=Nt.createElement(Oe,{expanded:bi,className:me()("".concat(di,"-expanded-row"),"".concat(di,"-expanded-row-level-").concat(en+1),Wi),prefixCls:di,component:kn,cellComponent:Rn,colSpan:oi.length,isEmpty:!1},io)}return Nt.createElement(Nt.Fragment,null,or,Zi)}Gn.displayName="BodyRow";var Kn=yt(Gn);function Vn(Ut){var Qt=Ut.columnKey,ye=Ut.onColumnResize,Me=Nt.useRef();return Nt.useEffect(function(){Me.current&&ye(Qt,Me.current.offsetWidth)},[]),Nt.createElement(Ft.Z,{data:Qt},Nt.createElement("td",{ref:Me,style:{padding:0,border:0,height:0}},Nt.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function gi(Ut){var Qt=Ut.prefixCls,ye=Ut.columnsKey,Me=Ut.onColumnResize;return Nt.createElement("tr",{"aria-hidden":"true",className:"".concat(Qt,"-measure-row"),style:{height:0,fontSize:0}},Nt.createElement(Ft.Z.Collection,{onBatchResize:function(Ne){Ne.forEach(function(an){var ln=an.data,en=an.size;Me(ln,en.offsetWidth)})}},ye.map(function(He){return Nt.createElement(Vn,{key:He,columnKey:He,onColumnResize:Me})})))}function Ti(Ut){var Qt=Ut.data,ye=Ut.measureColumnWidth,Me=Xt(It,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),He=Me.prefixCls,Ne=Me.getComponent,an=Me.onColumnResize,ln=Me.flattenColumns,en=Me.getRowKey,kn=Me.expandedKeys,Rn=Me.childrenColumnName,Fn=Me.emptyNode,pi=ae(Qt,Rn,kn,en),di=Nt.useRef({renderWithProps:!1}),oi=Ne(["body","wrapper"],"tbody"),Ii=Ne(["body","row"],"tr"),ai=Ne(["body","cell"],"td"),Ni=Ne(["body","cell"],"th"),bi;Qt.length?bi=pi.map(function(yo,Bo){var Ri=yo.record,po=yo.indent,or=yo.index,Zi=en(Ri,Bo);return Nt.createElement(Kn,{key:Zi,rowKey:Zi,record:Ri,index:Bo,renderIndex:or,rowComponent:Ii,cellComponent:ai,scopeCellComponent:Ni,getRowKey:en,indent:po})}):bi=Nt.createElement(Oe,{expanded:!0,className:"".concat(He,"-placeholder"),prefixCls:He,component:Ii,cellComponent:ai,colSpan:ln.length,isEmpty:!0},Fn);var Vi=Xe(ln);return Nt.createElement(xn.Provider,{value:di.current},Nt.createElement(oi,{className:"".concat(He,"-tbody")},ye&&Nt.createElement(gi,{prefixCls:He,columnsKey:Vi,onColumnResize:an}),bi))}Ti.displayName="Body";var Xi=yt(Ti),Mo=["expandable"],Io="RC_TABLE_INTERNAL_COL_DEFINE";function Oo(Ut){var Qt=Ut.expandable,ye=(0,Tn.Z)(Ut,Mo),Me;return"expandable"in Ut?Me=(0,le.Z)((0,le.Z)({},ye),Qt):Me=ye,Me.showExpandColumn===!1&&(Me.expandIconColumnIndex=-1),Me}var co=["columnType"];function Do(Ut){for(var Qt=Ut.colWidths,ye=Ut.columns,Me=Ut.columCount,He=[],Ne=Me||ye.length,an=!1,ln=Ne-1;ln>=0;ln-=1){var en=Qt[ln],kn=ye&&ye[ln],Rn=kn&&kn[Io];if(en||Rn||an){var Fn=Rn||{},pi=Fn.columnType,di=(0,Tn.Z)(Fn,co);He.unshift(Nt.createElement("col",(0,fe.Z)({key:ln,style:{width:en}},di))),an=!0}}return Nt.createElement("colgroup",null,He)}var Qo=Do,Ai=bt(80702),$o=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function jo(Ut,Qt){return(0,Nt.useMemo)(function(){for(var ye=[],Me=0;Me<Qt;Me+=1){var He=Ut[Me];if(He!==void 0)ye[Me]=He;else return null}return ye},[Ut.join("_"),Qt])}var Mt=Nt.forwardRef(function(Ut,Qt){var ye=Ut.className,Me=Ut.noData,He=Ut.columns,Ne=Ut.flattenColumns,an=Ut.colWidths,ln=Ut.columCount,en=Ut.stickyOffsets,kn=Ut.direction,Rn=Ut.fixHeader,Fn=Ut.stickyTopOffset,pi=Ut.stickyBottomOffset,di=Ut.stickyClassName,oi=Ut.onScroll,Ii=Ut.maxContentScroll,ai=Ut.children,Ni=(0,Tn.Z)(Ut,$o),bi=Xt(It,["prefixCls","scrollbarSize","isSticky"]),Vi=bi.prefixCls,yo=bi.scrollbarSize,Bo=bi.isSticky,Ri=Bo&&!Rn?0:yo,po=Nt.useRef(null),or=Nt.useCallback(function(Vo){(0,xe.mH)(Qt,Vo),(0,xe.mH)(po,Vo)},[]);Nt.useEffect(function(){var Vo;function ji(sr){var fr=sr,Qr=fr.currentTarget,br=fr.deltaX;br&&(oi({currentTarget:Qr,scrollLeft:Qr.scrollLeft+br}),sr.preventDefault())}return(Vo=po.current)===null||Vo===void 0||Vo.addEventListener("wheel",ji),function(){var sr;(sr=po.current)===null||sr===void 0||sr.removeEventListener("wheel",ji)}},[]);var Zi=Nt.useMemo(function(){return Ne.every(function(Vo){return Vo.width})},[Ne]),io=Ne[Ne.length-1],Wi={fixed:io?io.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Vi,"-cell-scrollbar")}}},xi=(0,Nt.useMemo)(function(){return Ri?[].concat((0,Ai.Z)(He),[Wi]):He},[Ri,He]),to=(0,Nt.useMemo)(function(){return Ri?[].concat((0,Ai.Z)(Ne),[Wi]):Ne},[Ri,Ne]),Lo=(0,Nt.useMemo)(function(){var Vo=en.right,ji=en.left;return(0,le.Z)((0,le.Z)({},en),{},{left:kn==="rtl"?[].concat((0,Ai.Z)(ji.map(function(sr){return sr+Ri})),[0]):ji,right:kn==="rtl"?Vo:[].concat((0,Ai.Z)(Vo.map(function(sr){return sr+Ri})),[0]),isSticky:Bo})},[Ri,en,Bo]),Ko=jo(an,ln);return Nt.createElement("div",{style:(0,le.Z)({overflow:"hidden"},Bo?{top:Fn,bottom:pi}:{}),ref:or,className:me()(ye,(0,Zt.Z)({},di,!!di))},Nt.createElement("table",{style:{tableLayout:"fixed",visibility:Me||Ko?null:"hidden"}},(!Me||!Ii||Zi)&&Nt.createElement(Qo,{colWidths:Ko?[].concat((0,Ai.Z)(Ko),[Ri]):[],columCount:ln+1,columns:to}),ai((0,le.Z)((0,le.Z)({},Ni),{},{stickyOffsets:Lo,columns:xi,flattenColumns:to}))))});Mt.displayName="FixedHolder";var cr=Nt.memo(Mt);function ir(Ut){var Qt=Ut.cells,ye=Ut.stickyOffsets,Me=Ut.flattenColumns,He=Ut.rowComponent,Ne=Ut.cellComponent,an=Ut.tdCellComponent,ln=Ut.onHeaderRow,en=Ut.index,kn=Xt(It,["prefixCls","direction"]),Rn=kn.prefixCls,Fn=kn.direction,pi;ln&&(pi=ln(Qt.map(function(oi){return oi.column}),en));var di=Xe(Qt.map(function(oi){return oi.column}));return Nt.createElement(He,pi,Qt.map(function(oi,Ii){var ai=oi.column,Ni=Ce(oi.colStart,oi.colEnd,Me,ye,Fn,ai),bi;return ai&&ai.onHeaderCell&&(bi=oi.column.onHeaderCell(ai)),Nt.createElement(ui,(0,fe.Z)({},oi,{scope:ai.title?oi.colSpan>1?"colgroup":"col":null,ellipsis:ai.ellipsis,align:ai.align,component:ai.title?Ne:an,prefixCls:Rn,key:di[Ii]},Ni,{additionalProps:bi,rowType:"header"}))}))}ir.displayName="HeaderRow";var pr=ir;function ts(Ut){var Qt=[];function ye(an,ln){var en=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Qt[en]=Qt[en]||[];var kn=ln,Rn=an.filter(Boolean).map(function(Fn){var pi={key:Fn.key,className:Fn.className||"",children:Fn.title,column:Fn,colStart:kn},di=1,oi=Fn.children;return oi&&oi.length>0&&(di=ye(oi,kn,en+1).reduce(function(Ii,ai){return Ii+ai},0),pi.hasSubColumns=!0),"colSpan"in Fn&&(di=Fn.colSpan),"rowSpan"in Fn&&(pi.rowSpan=Fn.rowSpan),pi.colSpan=di,pi.colEnd=pi.colStart+di-1,Qt[en].push(pi),kn+=di,di});return Rn}ye(Ut,0);for(var Me=Qt.length,He=function(ln){Qt[ln].forEach(function(en){!("rowSpan"in en)&&!en.hasSubColumns&&(en.rowSpan=Me-ln)})},Ne=0;Ne<Me;Ne+=1)He(Ne);return Qt}function rs(Ut){var Qt=Ut.stickyOffsets,ye=Ut.columns,Me=Ut.flattenColumns,He=Ut.onHeaderRow,Ne=Xt(It,["prefixCls","getComponent"]),an=Ne.prefixCls,ln=Ne.getComponent,en=Nt.useMemo(function(){return ts(ye)},[ye]),kn=ln(["header","wrapper"],"thead"),Rn=ln(["header","row"],"tr"),Fn=ln(["header","cell"],"th"),pi=ln(["header","cell"],"td");return Nt.createElement(kn,{className:"".concat(an,"-thead")},en.map(function(di,oi){var Ii=Nt.createElement(pr,{key:oi,flattenColumns:Me,cells:di,stickyOffsets:Qt,rowComponent:Rn,cellComponent:Fn,tdCellComponent:pi,onHeaderRow:He,index:oi});return Ii}))}var ls=yt(rs),Ci=bt(11592);function si(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 Te(Ut,Qt){return Nt.useMemo(function(){if(Qt&&Qt>0){var ye=0,Me=0;Ut.forEach(function(kn){var Rn=si(Qt,kn.width);Rn?ye+=Rn:Me+=1});var He=Qt-ye,Ne=Me,an=He/Me,ln=0,en=Ut.map(function(kn){var Rn=(0,le.Z)({},kn),Fn=si(Qt,Rn.width);if(Fn)Rn.width=Fn;else{var pi=Math.floor(an);Rn.width=Ne===1?He:pi,He-=pi,Ne-=1}return ln+=Rn.width,Rn});return[en,ln]}return[Ut,Qt]},[Ut,Qt])}var Ee=["children"],Wt=["fixed"];function Ge(Ut){return(0,Ci.Z)(Ut).filter(function(Qt){return Nt.isValidElement(Qt)}).map(function(Qt){var ye=Qt.key,Me=Qt.props,He=Me.children,Ne=(0,Tn.Z)(Me,Ee),an=(0,le.Z)({key:ye},Ne);return He&&(an.children=Ge(He)),an})}function Ue(Ut){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Ut.filter(function(ye){return ye&&(0,Jt.Z)(ye)==="object"}).reduce(function(ye,Me,He){var Ne=Me.fixed,an=Ne===!0?"left":Ne,ln="".concat(Qt,"-").concat(He),en=Me.children;return en&&en.length>0?[].concat((0,Ai.Z)(ye),(0,Ai.Z)(Ue(en,ln).map(function(kn){return(0,le.Z)({fixed:an},kn)}))):[].concat((0,Ai.Z)(ye),[(0,le.Z)((0,le.Z)({key:ln},Me),{},{fixed:an})])},[])}function ue(Ut){for(var Qt=!0,ye=0;ye<Ut.length;ye+=1){var Me=Ut[ye];if(Qt&&Me.fixed!=="left")Qt=!1;else if(!Qt&&Me.fixed==="left"){warning(!1,"Index ".concat(ye-1," of `columns` missing `fixed='left'` prop."));break}}for(var He=!0,Ne=Ut.length-1;Ne>=0;Ne-=1){var an=Ut[Ne];if(He&&an.fixed!=="right")He=!1;else if(!He&&an.fixed==="right"){warning(!1,"Index ".concat(Ne+1," of `columns` missing `fixed='right'` prop."));break}}}function qt(Ut){return Ut.map(function(Qt){var ye=Qt.fixed,Me=(0,Tn.Z)(Qt,Wt),He=ye;return ye==="left"?He="right":ye==="right"&&(He="left"),(0,le.Z)({fixed:He},Me)})}function ze(Ut,Qt){var ye=Ut.prefixCls,Me=Ut.columns,He=Ut.children,Ne=Ut.expandable,an=Ut.expandedKeys,ln=Ut.columnTitle,en=Ut.getRowKey,kn=Ut.onTriggerExpand,Rn=Ut.expandIcon,Fn=Ut.rowExpandable,pi=Ut.expandIconColumnIndex,di=Ut.direction,oi=Ut.expandRowByClick,Ii=Ut.columnWidth,ai=Ut.fixed,Ni=Ut.scrollWidth,bi=Nt.useMemo(function(){return Me||Ge(He)},[Me,He]),Vi=Nt.useMemo(function(){if(Ne){var io,Wi=bi.slice();if(!Wi.includes(wt)){var xi=pi||0;xi>=0&&Wi.splice(xi,0,wt)}var to=Wi.indexOf(wt);Wi=Wi.filter(function(ji,sr){return ji!==wt||sr===to});var Lo=bi[to],Ko;(ai==="left"||ai)&&!pi?Ko="left":(ai==="right"||ai)&&pi===bi.length?Ko="right":Ko=Lo?Lo.fixed:null;var Vo=(io={},(0,Zt.Z)(io,Io,{className:"".concat(ye,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Zt.Z)(io,"title",ln),(0,Zt.Z)(io,"fixed",Ko),(0,Zt.Z)(io,"className","".concat(ye,"-row-expand-icon-cell")),(0,Zt.Z)(io,"width",Ii),(0,Zt.Z)(io,"render",function(sr,fr,Qr){var br=en(fr,Qr),Os=an.has(br),Bs=Fn?Fn(fr):!0,ur=Rn({prefixCls:ye,expanded:Os,expandable:Bs,record:fr,onExpand:kn});return oi?Nt.createElement("span",{onClick:function(zr){return zr.stopPropagation()}},ur):ur}),io);return Wi.map(function(ji){return ji===wt?Vo:ji})}return bi.filter(function(ji){return ji!==wt})},[Ne,bi,en,an,Rn,di]),yo=Nt.useMemo(function(){var io=Vi;return Qt&&(io=Qt(io)),io.length||(io=[{render:function(){return null}}]),io},[Qt,Vi,di]),Bo=Nt.useMemo(function(){return di==="rtl"?qt(Ue(yo)):Ue(yo)},[yo,di,Ni]),Ri=Te(Bo,Ni),po=(0,he.Z)(Ri,2),or=po[0],Zi=po[1];return[yo,or,Zi]}var sn=ze;function Ln(Ut){var Qt,ye=Ut.prefixCls,Me=Ut.record,He=Ut.onExpand,Ne=Ut.expanded,an=Ut.expandable,ln="".concat(ye,"-row-expand-icon");if(!an)return Nt.createElement("span",{className:me()(ln,"".concat(ye,"-row-spaced"))});var en=function(Rn){He(Me,Rn),Rn.stopPropagation()};return Nt.createElement("span",{className:me()(ln,(Qt={},(0,Zt.Z)(Qt,"".concat(ye,"-row-expanded"),Ne),(0,Zt.Z)(Qt,"".concat(ye,"-row-collapsed"),!Ne),Qt)),onClick:en})}function Nn(Ut,Qt,ye){var Me=[];function He(Ne){(Ne||[]).forEach(function(an,ln){Me.push(Qt(an,ln)),He(an[ye])})}return He(Ut),Me}function ie(Ut,Qt,ye){var Me=Oo(Ut),He=Me.expandIcon,Ne=Me.expandedRowKeys,an=Me.defaultExpandedRowKeys,ln=Me.defaultExpandAllRows,en=Me.expandedRowRender,kn=Me.onExpand,Rn=Me.onExpandedRowsChange,Fn=Me.childrenColumnName,pi=He||Ln,di=Fn||"children",oi=Nt.useMemo(function(){return en?"row":Ut.expandable&&Ut.internalHooks===ee&&Ut.expandable.__PARENT_RENDER_ICON__||Qt.some(function(Bo){return Bo&&(0,Jt.Z)(Bo)==="object"&&Bo[di]})?"nest":!1},[!!en,Qt]),Ii=Nt.useState(function(){return an||(ln?Nn(Qt,ye,di):[])}),ai=(0,he.Z)(Ii,2),Ni=ai[0],bi=ai[1],Vi=Nt.useMemo(function(){return new Set(Ne||Ni||[])},[Ne,Ni]),yo=Nt.useCallback(function(Bo){var Ri=ye(Bo,Qt.indexOf(Bo)),po,or=Vi.has(Ri);or?(Vi.delete(Ri),po=(0,Ai.Z)(Vi)):po=[].concat((0,Ai.Z)(Vi),[Ri]),bi(po),kn&&kn(!or,Bo),Rn&&Rn(po)},[ye,Vi,Qt,kn,Rn]);return[Me,oi,Vi,pi,di,yo]}function Je(Ut,Qt,ye,Me){var He=Ut.map(function(Ne,an){return Ce(an,an,Ut,Qt,ye,Me==null?void 0:Me[an])});return(0,Ve.Z)(function(){return He},[He],function(Ne,an){return!(0,Pe.Z)(Ne,an)})}function Cn(Ut){var Qt=(0,Nt.useRef)(Ut),ye=(0,Nt.useState)({}),Me=(0,he.Z)(ye,2),He=Me[1],Ne=(0,Nt.useRef)(null),an=(0,Nt.useRef)([]);function ln(en){an.current.push(en);var kn=Promise.resolve();Ne.current=kn,kn.then(function(){if(Ne.current===kn){var Rn=an.current,Fn=Qt.current;an.current=[],Rn.forEach(function(pi){Qt.current=pi(Qt.current)}),Ne.current=null,Fn!==Qt.current&&He({})}})}return(0,Nt.useEffect)(function(){return function(){Ne.current=null}},[]),[Qt.current,ln]}function $n(Ut){var Qt=(0,Nt.useRef)(Ut||null),ye=(0,Nt.useRef)();function Me(){window.clearTimeout(ye.current)}function He(an){Qt.current=an,Me(),ye.current=window.setTimeout(function(){Qt.current=null,ye.current=void 0},100)}function Ne(){return Qt.current}return(0,Nt.useEffect)(function(){return Me},[]),[He,Ne]}function We(){var Ut=Nt.useState(-1),Qt=(0,he.Z)(Ut,2),ye=Qt[0],Me=Qt[1],He=Nt.useState(-1),Ne=(0,he.Z)(He,2),an=Ne[0],ln=Ne[1],en=Nt.useCallback(function(kn,Rn){Me(kn),ln(Rn)},[]);return[ye,an,en]}var Ye=bt(47273),zn=(0,Ye.Z)()?window:null;function Zn(Ut,Qt){var ye=(0,Jt.Z)(Ut)==="object"?Ut:{},Me=ye.offsetHeader,He=Me===void 0?0:Me,Ne=ye.offsetSummary,an=Ne===void 0?0:Ne,ln=ye.offsetScroll,en=ln===void 0?0:ln,kn=ye.getContainer,Rn=kn===void 0?function(){return zn}:kn,Fn=Rn()||zn;return Nt.useMemo(function(){var pi=!!Ut;return{isSticky:pi,stickyClassName:pi?"".concat(Qt,"-sticky-holder"):"",offsetHeader:He,offsetSummary:an,offsetScroll:en,container:Fn}},[en,He,an,Qt,Fn])}function fi(Ut,Qt,ye){var Me=(0,Nt.useMemo)(function(){for(var He=[],Ne=[],an=0,ln=0,en=0;en<Qt;en+=1)if(ye==="rtl"){Ne[en]=ln,ln+=Ut[en]||0;var kn=Qt-en-1;He[kn]=an,an+=Ut[kn]||0}else{He[en]=an,an+=Ut[en]||0;var Rn=Qt-en-1;Ne[Rn]=ln,ln+=Ut[Rn]||0}return{left:He,right:Ne}},[Ut,Qt,ye]);return Me}var Hn=fi;function ti(Ut){var Qt=Ut.className,ye=Ut.children;return Nt.createElement("div",{className:Qt},ye)}var Qn=ti,wi=bt(8224),Qi=bt(55468),qi=function(Qt,ye){var Me,He,Ne=Qt.scrollBodyRef,an=Qt.onScroll,ln=Qt.offsetScroll,en=Qt.container,kn=Xt(It,"prefixCls"),Rn=((Me=Ne.current)===null||Me===void 0?void 0:Me.scrollWidth)||0,Fn=((He=Ne.current)===null||He===void 0?void 0:He.clientWidth)||0,pi=Rn&&Fn*(Fn/Rn),di=Nt.useRef(),oi=Cn({scrollLeft:0,isHiddenScrollBar:!1}),Ii=(0,he.Z)(oi,2),ai=Ii[0],Ni=Ii[1],bi=Nt.useRef({delta:0,x:0}),Vi=Nt.useState(!1),yo=(0,he.Z)(Vi,2),Bo=yo[0],Ri=yo[1],po=function(){Ri(!1)},or=function(to){to.persist(),bi.current.delta=to.pageX-ai.scrollLeft,bi.current.x=0,Ri(!0),to.preventDefault()},Zi=function(to){var Lo,Ko=to||((Lo=window)===null||Lo===void 0?void 0:Lo.event),Vo=Ko.buttons;if(!Bo||Vo===0){Bo&&Ri(!1);return}var ji=bi.current.x+to.pageX-bi.current.x-bi.current.delta;ji<=0&&(ji=0),ji+pi>=Fn&&(ji=Fn-pi),an({scrollLeft:ji/Fn*(Rn+2)}),bi.current.x=to.pageX},io=function(){if(Ne.current){var to=(0,Qi.os)(Ne.current).top,Lo=to+Ne.current.offsetHeight,Ko=en===window?document.documentElement.scrollTop+window.innerHeight:(0,Qi.os)(en).top+en.clientHeight;Lo-(0,At.Z)()<=Ko||to>=Ko-ln?Ni(function(Vo){return(0,le.Z)((0,le.Z)({},Vo),{},{isHiddenScrollBar:!0})}):Ni(function(Vo){return(0,le.Z)((0,le.Z)({},Vo),{},{isHiddenScrollBar:!1})})}},Wi=function(to){Ni(function(Lo){return(0,le.Z)((0,le.Z)({},Lo),{},{scrollLeft:to/Rn*Fn||0})})};return Nt.useImperativeHandle(ye,function(){return{setScrollLeft:Wi}}),Nt.useEffect(function(){var xi=(0,wi.Z)(document.body,"mouseup",po,!1),to=(0,wi.Z)(document.body,"mousemove",Zi,!1);return io(),function(){xi.remove(),to.remove()}},[pi,Bo]),Nt.useEffect(function(){var xi=(0,wi.Z)(en,"scroll",io,!1),to=(0,wi.Z)(window,"resize",io,!1);return function(){xi.remove(),to.remove()}},[en]),Nt.useEffect(function(){ai.isHiddenScrollBar||Ni(function(xi){var to=Ne.current;return to?(0,le.Z)((0,le.Z)({},xi),{},{scrollLeft:to.scrollLeft/to.scrollWidth*to.clientWidth}):xi})},[ai.isHiddenScrollBar]),Rn<=Fn||!pi||ai.isHiddenScrollBar?null:Nt.createElement("div",{style:{height:(0,At.Z)(),width:Fn,bottom:ln},className:"".concat(kn,"-sticky-scroll")},Nt.createElement("div",{onMouseDown:or,ref:di,className:me()("".concat(kn,"-sticky-scroll-bar"),(0,Zt.Z)({},"".concat(kn,"-sticky-scroll-bar-active"),Bo)),style:{width:"".concat(pi,"px"),transform:"translate3d(".concat(ai.scrollLeft,"px, 0, 0)")}}))},_e=Nt.forwardRef(qi);function lo(Ut){return null}var Eo=lo;function zo(Ut){return null}var Ze=zo,jn="rc-table",ei=[],Mi={};function vi(){return"No Data"}function mi(Ut){var Qt,ye=(0,le.Z)({rowKey:"key",prefixCls:jn,emptyText:vi},Ut),Me=ye.prefixCls,He=ye.className,Ne=ye.rowClassName,an=ye.style,ln=ye.data,en=ye.rowKey,kn=ye.scroll,Rn=ye.tableLayout,Fn=ye.direction,pi=ye.title,di=ye.footer,oi=ye.summary,Ii=ye.caption,ai=ye.id,Ni=ye.showHeader,bi=ye.components,Vi=ye.emptyText,yo=ye.onRow,Bo=ye.onHeaderRow,Ri=ye.internalHooks,po=ye.transformColumns,or=ye.internalRefs,Zi=ye.tailor,io=ye.sticky,Wi=ln||ei,xi=!!Wi.length,to=Ri===ee,Lo=Nt.useCallback(function(qr,Fs){return(0,Qe.Z)(bi,qr)||Fs},[bi]),Ko=Nt.useMemo(function(){return typeof en=="function"?en:function(qr){var Fs=qr&&qr[en];return Fs}},[en]),Vo=Lo(["body"]),ji=We(),sr=(0,he.Z)(ji,3),fr=sr[0],Qr=sr[1],br=sr[2],Os=ie(ye,Wi,Ko),Bs=(0,he.Z)(Os,6),ur=Bs[0],No=Bs[1],zr=Bs[2],Rs=Bs[3],Cs=Bs[4],ia=Bs[5],Yo=kn==null?void 0:kn.x,Ro=Nt.useState(0),Xo=(0,he.Z)(Ro,2),wo=Xo[0],Kr=Xo[1],Po=sn((0,le.Z)((0,le.Z)((0,le.Z)({},ye),ur),{},{expandable:!!ur.expandedRowRender,columnTitle:ur.columnTitle,expandedKeys:zr,getRowKey:Ko,onTriggerExpand:ia,expandIcon:Rs,expandIconColumnIndex:ur.expandIconColumnIndex,direction:Fn,scrollWidth:to&&Zi&&typeof Yo=="number"?Yo:null}),to?po:null),rr=(0,he.Z)(Po,3),Nr=rr[0],Tr=rr[1],Ea=rr[2],la=Ea!=null?Ea:Yo,Va=Nt.useMemo(function(){return{columns:Nr,flattenColumns:Tr}},[Nr,Tr]),Jr=Nt.useRef(),La=Nt.useRef(),ta=Nt.useRef(),ma=Nt.useRef(),qu=Nt.useRef(),_r=Nt.useState(!1),ss=(0,he.Z)(_r,2),ps=ss[0],Qs=ss[1],va=Nt.useState(!1),Cr=(0,he.Z)(va,2),Ss=Cr[0],ya=Cr[1],Sl=Cn(new Map),Wl=(0,he.Z)(Sl,2),Nl=Wl[0],nu=Wl[1],iu=Xe(Tr),Kl=iu.map(function(qr){return Nl.get(qr)}),$r=Nt.useMemo(function(){return Kl},[Kl.join("_")]),ka=Hn($r,Tr.length,Fn),Zs=kn&&Xn(kn.y),xs=kn&&Xn(la)||!!ur.fixed,Zl=xs&&Tr.some(function(qr){var Fs=qr.fixed;return Fs}),mh=Nt.useRef(),ou=Zn(io,Me),Ru=ou.isSticky,$u=ou.offsetHeader,Tl=ou.offsetSummary,Zr=ou.offsetScroll,Ms=ou.stickyClassName,ua=ou.container,Es=Nt.useMemo(function(){return oi==null?void 0:oi(Wi)},[oi,Wi]),Rr=(Zs||Ru)&&Nt.isValidElement(Es)&&Es.type===we&&Es.props.fixed,Sa,xl,xu;Zs&&(xl={overflowY:"scroll",maxHeight:kn.y}),xs&&(Sa={overflowX:"auto"},Zs||(xl={overflowY:"hidden"}),xu={width:la===!0?"auto":la,minWidth:"100%"});var uf=Nt.useCallback(function(qr,Fs){(0,St.Z)(Jr.current)&&nu(function(Ra){if(Ra.get(qr)!==Fs){var ru=new Map(Ra);return ru.set(qr,Fs),ru}return Ra})},[]),be=$n(null),Ih=(0,he.Z)(be,2),th=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,Ie.Z)(function(qr){var Fs=qr.currentTarget,Ra=qr.scrollLeft,ru=Fn==="rtl",su=typeof Ra=="number"?Ra:Fs.scrollLeft,Dc=Fs||Mi;if(!hf()||hf()===Dc){var Rh;th(Dc),Sd(su,La.current),Sd(su,ta.current),Sd(su,qu.current),Sd(su,(Rh=mh.current)===null||Rh===void 0?void 0:Rh.setScrollLeft)}var _d=Fs||La.current;if(_d){var wu=_d.scrollWidth,vh=_d.clientWidth;if(wu===vh){Qs(!1),ya(!1);return}ru?(Qs(-su<wu-vh),ya(-su>0)):(Qs(su>0),ya(su<wu-vh))}}),bc=function(){xs&&ta.current?id({currentTarget:ta.current}):(Qs(!1),ya(!1))},Ug=function(Fs){var Ra=Fs.width;Ra!==wo&&(bc(),Kr(Jr.current?Jr.current.offsetWidth:Ra))},Aa=Nt.useRef(!1);Nt.useEffect(function(){Aa.current&&bc()},[xs,ln,Nr.length]),Nt.useEffect(function(){Aa.current=!0},[]);var Qd=Nt.useState(0),kc=(0,he.Z)(Qd,2),Jd=kc[0],df=kc[1],Yf=Nt.useState(!0),cf=(0,he.Z)(Yf,2),Ac=cf[0],Ul=cf[1];Nt.useEffect(function(){(!Zi||!to)&&(ta.current instanceof Element?df((0,At.o)(ta.current).width):df((0,At.o)(ma.current).width)),Ul((0,mt.G)("position","sticky"))},[]),Nt.useEffect(function(){to&&or&&(or.body.current=ta.current)});var xd=Nt.useCallback(function(qr){return Nt.createElement(Nt.Fragment,null,Nt.createElement(ls,qr),Rr==="top"&&Nt.createElement(rn,qr,Es))},[Rr,Es]),ff=Nt.useCallback(function(qr){return Nt.createElement(rn,qr,Es)},[Es]),ju=Lo(["table"],"table"),Dh=Nt.useMemo(function(){return Rn||(Zl?la==="max-content"?"auto":"fixed":Zs||Ru||Tr.some(function(qr){var Fs=qr.ellipsis;return Fs})?"fixed":"auto")},[Zs,Zl,Tr,Rn,Ru]),wd,od={colWidths:$r,columCount:Tr.length,stickyOffsets:ka,onHeaderRow:Bo,fixHeader:Zs,scroll:kn},wl=Nt.useMemo(function(){return xi?null:typeof Vi=="function"?Vi():Vi},[xi,Vi]),Nc=Nt.createElement(Xi,{data:Wi,measureColumnWidth:Zs||xs||Ru}),Tc=Nt.createElement(Qo,{colWidths:Tr.map(function(qr){var Fs=qr.width;return Fs}),columns:Tr}),Vl=Ii!=null?Nt.createElement("caption",{className:"".concat(Me,"-caption")},Ii):void 0,Pd=(0,Rt.Z)(ye,{data:!0}),Bc=(0,Rt.Z)(ye,{aria:!0});if(Zs||Ru){var Fc;typeof Vo=="function"?(Fc=Vo(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=Nt.createElement("div",{style:(0,le.Z)((0,le.Z)({},Sa),xl),onScroll:id,ref:ta,className:me()("".concat(Me,"-body"))},Nt.createElement(ju,(0,fe.Z)({style:(0,le.Z)((0,le.Z)({},xu),{},{tableLayout:Dh})},Bc),Vl,Tc,Nc,!Rr&&Es&&Nt.createElement(rn,{stickyOffsets:ka,flattenColumns:Tr,columns:Nr},Es)));var Oh=(0,le.Z)((0,le.Z)((0,le.Z)({noData:!Wi.length,maxContentScroll:xs&&la==="max-content"},od),Va),{},{direction:Fn,stickyClassName:Ms,onScroll:id});wd=Nt.createElement(Nt.Fragment,null,Ni!==!1&&Nt.createElement(cr,(0,fe.Z)({},Oh,{stickyTopOffset:$u,className:"".concat(Me,"-header"),ref:La}),xd),Fc,Rr&&Rr!=="top"&&Nt.createElement(cr,(0,fe.Z)({},Oh,{stickyBottomOffset:Tl,className:"".concat(Me,"-summary"),ref:qu}),ff),Ru&&Nt.createElement(_e,{ref:mh,offsetScroll:Zr,scrollBodyRef:ta,onScroll:id,container:ua}))}else wd=Nt.createElement("div",{style:(0,le.Z)((0,le.Z)({},Sa),xl),className:me()("".concat(Me,"-content")),onScroll:id,ref:ta},Nt.createElement(ju,(0,fe.Z)({style:(0,le.Z)((0,le.Z)({},xu),{},{tableLayout:Dh})},Bc),Vl,Tc,Ni!==!1&&Nt.createElement(ls,(0,fe.Z)({},od,Va)),Nc,Es&&Nt.createElement(rn,{stickyOffsets:ka,flattenColumns:Tr,columns:Nr},Es)));var al=Nt.createElement("div",(0,fe.Z)({className:me()(Me,He,(Qt={},(0,Zt.Z)(Qt,"".concat(Me,"-rtl"),Fn==="rtl"),(0,Zt.Z)(Qt,"".concat(Me,"-ping-left"),ps),(0,Zt.Z)(Qt,"".concat(Me,"-ping-right"),Ss),(0,Zt.Z)(Qt,"".concat(Me,"-layout-fixed"),Rn==="fixed"),(0,Zt.Z)(Qt,"".concat(Me,"-fixed-header"),Zs),(0,Zt.Z)(Qt,"".concat(Me,"-fixed-column"),Zl),(0,Zt.Z)(Qt,"".concat(Me,"-scroll-horizontal"),xs),(0,Zt.Z)(Qt,"".concat(Me,"-has-fix-left"),Tr[0]&&Tr[0].fixed),(0,Zt.Z)(Qt,"".concat(Me,"-has-fix-right"),Tr[Tr.length-1]&&Tr[Tr.length-1].fixed==="right"),Qt)),style:an,id:ai,ref:Jr},Pd),pi&&Nt.createElement(Qn,{className:"".concat(Me,"-title")},pi(Wi)),Nt.createElement("div",{ref:ma,className:"".concat(Me,"-container")},wd),di&&Nt.createElement(Qn,{className:"".concat(Me,"-footer")},di(Wi)));xs&&(al=Nt.createElement(Ft.Z,{onResize:Ug},al));var Ic=Je(Tr,ka,Fn,Nr),ha=Nt.useMemo(function(){return{scrollX:la,prefixCls:Me,getComponent:Lo,scrollbarSize:Jd,direction:Fn,fixedInfoList:Ic,isSticky:Ru,supportSticky:Ac,componentWidth:wo,fixHeader:Zs,fixColumn:Zl,horizonScroll:xs,tableLayout:Dh,rowClassName:Ne,expandedRowClassName:ur.expandedRowClassName,expandIcon:Rs,expandableType:No,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:yo,getRowKey:Ko,expandedKeys:zr,childrenColumnName:Cs}},[la,Me,Lo,Jd,Fn,Ic,Ru,Ac,wo,Zs,Zl,xs,Dh,Ne,ur.expandedRowClassName,Rs,No,ur.expandRowByClick,ur.expandedRowRender,ia,ur.expandIconColumnIndex,ur.indentSize,wl,Nr,Tr,uf,fr,Qr,br,ur.rowExpandable,yo,Ko,zr,Cs]);return Nt.createElement(It.Provider,{value:ha},al)}function Ui(Ut){return gt(mi,Ut)}var ki=Ui();ki.EXPAND_COLUMN=wt,ki.INTERNAL_HOOKS=ee,ki.Column=Eo,ki.ColumnGroup=Ze,ki.Summary=ge;var Hi=ki,uo=bt(45680),un=ve(null),Jo=ve(null);function nn(Ut,Qt,ye){var Me=Qt||1;return ye[Ut+Me]-(ye[Ut]||0)}function ho(Ut){var Qt=Ut.rowInfo,ye=Ut.column,Me=Ut.colIndex,He=Ut.indent,Ne=Ut.index,an=Ut.renderIndex,ln=Ut.record,en=Ut.style,kn=Ut.className,Rn=Ut.inverse,Fn=Ut.getHeight,pi=ye.render,di=ye.dataIndex,oi=ye.className,Ii=ye.width,ai=Xt(Jo,["columnsOffset"]),Ni=ai.columnsOffset,bi=yn(Qt,ye,Me,He,Ne),Vi=bi.key,yo=bi.fixedInfo,Bo=bi.appendCellNode,Ri=bi.additionalCellProps,po=Ri.style,or=Ri.colSpan,Zi=or===void 0?1:or,io=Ri.rowSpan,Wi=io===void 0?1:io,xi=Me-1,to=nn(xi,Zi,Ni),Lo=Zi>1?Ii-to:0,Ko=(0,le.Z)((0,le.Z)((0,le.Z)({},po),en),{},{flex:"0 0 ".concat(to,"px"),width:"".concat(to,"px"),marginRight:Lo,pointerEvents:"auto"}),Vo=Nt.useMemo(function(){return Rn?Wi<=1:Zi===0||Wi===0||Wi>1},[Wi,Zi,Rn]);Vo?Ko.visibility="hidden":Rn&&(Ko.height=Fn==null?void 0:Fn(Wi));var ji=Vo?function(){return null}:pi,sr={};return(Wi===0||Zi===0)&&(sr.rowSpan=1,sr.colSpan=1),Nt.createElement(ui,(0,fe.Z)({className:me()(oi,kn),ellipsis:ye.ellipsis,align:ye.align,scope:ye.rowScope,component:"div",prefixCls:Qt.prefixCls,key:Vi,record:ln,index:Ne,renderIndex:an,dataIndex:di,render:ji,shouldCellUpdate:ye.shouldCellUpdate},yo,{appendNode:Bo,additionalProps:(0,le.Z)((0,le.Z)({},Ri),{},{style:Ko},sr)}))}var Er=ho,Ho=["data","index","className","rowKey","style","extra","getHeight"],Fr=Nt.forwardRef(function(Ut,Qt){var ye=Ut.data,Me=Ut.index,He=Ut.className,Ne=Ut.rowKey,an=Ut.style,ln=Ut.extra,en=Ut.getHeight,kn=(0,Tn.Z)(Ut,Ho),Rn=ye.record,Fn=ye.indent,pi=ye.index,di=Xt(It,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),oi=di.scrollX,Ii=di.flattenColumns,ai=di.prefixCls,Ni=di.fixColumn,bi=di.componentWidth,Vi=Be(Rn,Ne,Me,Fn),yo=Vi.rowSupportExpand,Bo=Vi.expanded,Ri=Vi.rowProps,po=Vi.expandedRowRender,or=Vi.expandedRowClassName,Zi;if(yo&&Bo){var io=po(Rn,Me,Fn+1,Bo),Wi=or==null?void 0:or(Rn,Me,Fn),xi={};Ni&&(xi={style:(0,Zt.Z)({},"--virtual-width","".concat(bi,"px"))});var to="".concat(ai,"-expanded-row-cell");Zi=Nt.createElement("div",{className:me()("".concat(ai,"-expanded-row"),"".concat(ai,"-expanded-row-level-").concat(Fn+1),Wi)},Nt.createElement(ui,{component:"div",prefixCls:ai,className:me()(to,(0,Zt.Z)({},"".concat(to,"-fixed"),Ni)),additionalProps:xi},io))}var Lo=(0,le.Z)((0,le.Z)({},an),{},{width:oi});ln&&(Lo.position="absolute",Lo.pointerEvents="none");var Ko=Nt.createElement("div",(0,fe.Z)({},Ri,kn,{ref:yo?null:Qt,className:me()(He,"".concat(ai,"-row"),Ri==null?void 0:Ri.className,(0,Zt.Z)({},"".concat(ai,"-row-extra"),ln)),style:(0,le.Z)((0,le.Z)({},Lo),Ri==null?void 0:Ri.style)}),Ii.map(function(Vo,ji){return Nt.createElement(Er,{key:ji,rowInfo:Vi,column:Vo,colIndex:ji,indent:Fn,index:Me,renderIndex:pi,record:Rn,inverse:ln,getHeight:en})}));return yo?Nt.createElement("div",{ref:Qt},Ko,Zi):Ko}),mr=yt(Fr),Oi=mr,Li=Nt.forwardRef(function(Ut,Qt){var ye=Ut.data,Me=Ut.onScroll,He=Xt(It,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Ne=He.flattenColumns,an=He.onColumnResize,ln=He.getRowKey,en=He.expandedKeys,kn=He.prefixCls,Rn=He.childrenColumnName,Fn=He.emptyNode,pi=He.scrollX,di=Xt(un),oi=di.scrollY,Ii=di.listItemHeight,ai=Nt.useRef(),Ni=ae(ye,Rn,en,ln),bi=Nt.useMemo(function(){var Zi=0;return Ne.map(function(io){var Wi=io.width,xi=io.key;return Zi+=Wi,[xi,Wi,Zi]})},[Ne]),Vi=Nt.useMemo(function(){return bi.map(function(Zi){return Zi[2]})},[bi]);Nt.useEffect(function(){bi.forEach(function(Zi){var io=(0,he.Z)(Zi,2),Wi=io[0],xi=io[1];an(Wi,xi)})},[bi]),Nt.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 yo=function(io,Wi){var xi,to=(xi=Ni[Wi])===null||xi===void 0?void 0:xi.record,Lo=io.onCell;if(Lo){var Ko,Vo=Lo(to,Wi);return(Ko=Vo==null?void 0:Vo.rowSpan)!==null&&Ko!==void 0?Ko:1}return 1},Bo=function(io){var Wi=io.start,xi=io.end,to=io.getSize,Lo=io.offsetY;if(xi<0)return null;for(var Ko=Ne.filter(function(Yo){return yo(Yo,Wi)===0}),Vo=Wi,ji=function(Ro){if(Ko=Ko.filter(function(Xo){return yo(Xo,Ro)===0}),!Ko.length)return Vo=Ro,"break"},sr=Wi;sr>=0;sr-=1){var fr=ji(sr);if(fr==="break")break}for(var Qr=Ne.filter(function(Yo){return yo(Yo,xi)!==1}),br=xi,Os=function(Ro){if(Qr=Qr.filter(function(Xo){return yo(Xo,Ro)!==1}),!Qr.length)return br=Math.max(Ro-1,xi),"break"},Bs=xi;Bs<Ni.length;Bs+=1){var ur=Os(Bs);if(ur==="break")break}for(var No=[],zr=function(Ro){var Xo=Ni[Ro];if(!Xo)return"continue";Ne.some(function(wo){return yo(wo,Ro)>1})&&No.push(Ro)},Rs=Vo;Rs<=br;Rs+=1)var Cs=zr(Rs);var ia=No.map(function(Yo){var Ro=Ni[Yo],Xo=ln(Ro.record,Yo),wo=function(rr){var Nr=Yo+rr-1,Tr=ln(Ni[Nr].record,Nr),Ea=to(Xo,Tr);return Ea.bottom-Ea.top},Kr=to(Xo);return Nt.createElement(Oi,{key:Yo,data:Ro,rowKey:Xo,index:Yo,style:{top:-Lo+Kr.top},extra:!0,getHeight:wo})});return ia},Ri=Nt.useMemo(function(){return{columnsOffset:Vi}},[Vi]),po="".concat(kn,"-tbody"),or;return Ni.length?or=Nt.createElement(uo.Z,{fullHeight:!1,ref:ai,className:me()(po,"".concat(po,"-virtual")),height:oi,itemHeight:Ii||24,data:Ni,itemKey:function(io){return ln(io.record)},scrollWidth:pi,onVirtualScroll:function(io){var Wi=io.x;Me({scrollLeft:Wi})},extraRender:Bo},function(Zi,io,Wi){var xi=ln(Zi.record,io);return Nt.createElement(Oi,(0,fe.Z)({data:Zi,rowKey:xi,index:io},Wi))}):or=Nt.createElement("div",{className:me()("".concat(kn,"-placeholder"))},Nt.createElement(ui,{component:"div",prefixCls:kn},Fn)),Nt.createElement(Jo.Provider,{value:Ri},or)}),So=yt(Li),ko=So,_n=function(Qt,ye){var Me=ye.ref,He=ye.onScroll;return Nt.createElement(ko,{ref:Me,data:Qt,onScroll:He})},jt=100;function _o(Ut){var Qt=Ut.columns,ye=Ut.scroll,Me=Ut.prefixCls,He=Me===void 0?jn:Me,Ne=Ut.className,an=Ut.listItemHeight,ln=ye||{},en=ln.x,kn=ln.y;typeof en!="number"&&(en=((Qt||[]).length+1)*jt),typeof kn!="number"&&(kn=500);var Rn=Nt.useMemo(function(){return{scrollY:kn,listItemHeight:an}},[kn,an]);return Nt.createElement(un.Provider,{value:Rn},Nt.createElement(Hi,(0,fe.Z)({},Ut,{className:me()(Ne,"".concat(He,"-virtual")),scroll:(0,le.Z)((0,le.Z)({},ye),{},{x:en}),components:{body:_n},columns:Qt,internalHooks:ee,tailor:!0})))}function xr(Ut){return gt(_o,Ut)}var es=xr(),cs=null;function us(Ut){return null}var no=us;function $i(Ut){return null}var Zo=$i,ro=bt(2738),lr=bt(68031),ms=bt(36355),Ji=bt(93891),Bi=bt(19716),En=bt(8628),Ki=bt(31724),qo=bt(58421),jr=bt(71418),Ir=bt(88088);function Ur(Ut){return function(ye){let{prefixCls:Me,onExpand:He,record:Ne,expanded:an,expandable:ln}=ye;const en=`${Me}-row-expand-icon`;return Nt.createElement("button",{type:"button",onClick:kn=>{He(Ne,kn),kn.stopPropagation()},className:me()(en,{[`${en}-spaced`]:!ln,[`${en}-expanded`]:ln&&an,[`${en}-collapsed`]:ln&&!an}),"aria-label":an?Ut.collapse:Ut.expand,"aria-expanded":an})}}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 ye=Ys(Ut,Qt);return Object.prototype.toString.call(ye)==="[object Object]"?"":ye}var Ke={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=Ke,mu=bt(7657),Ka=function(Qt,ye){return Nt.createElement(mu.Z,(0,fe.Z)({},Qt,{ref:ye,icon:vs}))},gl=Nt.forwardRef(Ka),Xr=gl,pl=bt(56762);function Nu(Ut){const Qt=Nt.useRef(Ut),ye=(0,pl.Z)();return[()=>Qt.current,Me=>{Qt.current=Me,ye()}]}var Hr=bt(3113),As=bt(24905),kl=bt(38854),so=bt(64165),hr=bt(20834),Uo=bt(40875),hi=bt(5112),Ns=bt(17574),is=bt(47472),Js=bt(92832);function ol(Ut){let{value:Qt,onChange:ye,filterSearch:Me,tablePrefixCls:He,locale:Ne}=Ut;return Me?Nt.createElement("div",{className:`${He}-filter-dropdown-search`},Nt.createElement(Js.default,{prefix:Nt.createElement(is.Z,null),placeholder:Ne.filterSearchPlaceholder,onChange:ye,value:Qt,htmlSize:1,className:`${He}-filter-dropdown-search-input`})):null}var ml=ol,ii=bt(10228);const Vr=Ut=>{const{keyCode:Qt}=Ut;Qt===ii.Z.ENTER&&Ut.stopPropagation()};var ba=Nt.forwardRef((Ut,Qt)=>Nt.createElement("div",{className:Ut.className,onClick:ye=>ye.stopPropagation(),onKeyDown:Vr,ref:Qt},Ut.children));function Pa(Ut){let Qt=[];return(Ut||[]).forEach(ye=>{let{value:Me,children:He}=ye;Qt.push(Me),He&&(Qt=[].concat((0,Ai.Z)(Qt),(0,Ai.Z)(Pa(He))))}),Qt}function vl(Ut){return Ut.some(Qt=>{let{children:ye}=Qt;return ye})}function mo(Ut,Qt){return typeof Qt=="string"||typeof Qt=="number"?Qt==null?void 0:Qt.toString().toLowerCase().includes(Ut.trim().toLowerCase()):!1}function Tu(Ut){let{filters:Qt,prefixCls:ye,filteredKeys:Me,filterMultiple:He,searchValue:Ne,filterSearch:an}=Ut;return Qt.map((ln,en)=>{const kn=String(ln.value);if(ln.children)return{key:kn||en,label:ln.text,popupClassName:`${ye}-dropdown-submenu`,children:Tu({filters:ln.children,prefixCls:ye,filteredKeys:Me,filterMultiple:He,searchValue:Ne,filterSearch:an})};const Rn=He?As.default:hi.ZP,Fn={key:ln.value!==void 0?kn:en,label:Nt.createElement(Nt.Fragment,null,Nt.createElement(Rn,{checked:Me.includes(kn)}),Nt.createElement("span",null,ln.text))};return Ne.trim()?typeof an=="function"?an(Ne,ln)?Fn:null:mo(Ne,ln.text)?Fn:null:Fn})}function Ia(Ut){var Qt,ye;const{tablePrefixCls:Me,prefixCls:He,column:Ne,dropdownPrefixCls:an,columnKey:ln,filterMultiple:en,filterMode:kn="menu",filterSearch:Rn=!1,filterState:Fn,triggerFilter:pi,locale:di,children:oi,getPopupContainer:Ii}=Ut,{filterDropdownOpen:ai,onFilterDropdownOpenChange:Ni,filterResetToDefaultFilteredValue:bi,defaultFilteredValue:Vi,filterDropdownVisible:yo,onFilterDropdownVisibleChange:Bo}=Ne,[Ri,po]=Nt.useState(!1),or=!!(Fn&&(!((Qt=Fn.filteredKeys)===null||Qt===void 0)&&Qt.length||Fn.forceFiltered)),Zi=Po=>{po(Po),Ni==null||Ni(Po),Bo==null||Bo(Po)},io=(ye=ai!=null?ai:yo)!==null&&ye!==void 0?ye:Ri,Wi=Fn==null?void 0:Fn.filteredKeys,[xi,to]=Nu(Wi||[]),Lo=Po=>{let{selectedKeys:rr}=Po;to(rr)},Ko=(Po,rr)=>{let{node:Nr,checked:Tr}=rr;Lo(en?{selectedKeys:Po}:{selectedKeys:Tr&&Nr.key?[Nr.key]:[]})};Nt.useEffect(()=>{Ri&&Lo({selectedKeys:Wi||[]})},[Wi]);const[Vo,ji]=Nt.useState([]),sr=Po=>{ji(Po)},[fr,Qr]=Nt.useState(""),br=Po=>{const{value:rr}=Po.target;Qr(rr)};Nt.useEffect(()=>{Ri||Qr("")},[Ri]);const Os=Po=>{const rr=Po&&Po.length?Po:null;if(rr===null&&(!Fn||!Fn.filteredKeys)||(0,Pe.Z)(rr,Fn==null?void 0:Fn.filteredKeys,!0))return null;pi({column:Ne,key:ln,filteredKeys:rr})},Bs=()=>{Zi(!1),Os(xi())},ur=function(){let{confirm:Po,closeDropdown:rr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Po&&Os([]),rr&&Zi(!1),Qr(""),to(bi?(Vi||[]).map(Nr=>String(Nr)):[])},No=function(){let{closeDropdown:Po}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Po&&Zi(!1),Os(xi())},zr=Po=>{Po&&Wi!==void 0&&to(Wi||[]),Zi(Po),!Po&&!Ne.filterDropdown&&Bs()},Rs=me()({[`${an}-menu-without-submenu`]:!vl(Ne.filters||[])}),Cs=Po=>{if(Po.target.checked){const rr=Pa(Ne==null?void 0:Ne.filters).map(Nr=>String(Nr));to(rr)}else to([])},ia=Po=>{let{filters:rr}=Po;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})},Yo=Po=>{var rr;return Object.assign(Object.assign({},Po),{text:Po.title,value:Po.key,children:((rr=Po.children)===null||rr===void 0?void 0:rr.map(Nr=>Yo(Nr)))||[]})};let Ro;if(typeof Ne.filterDropdown=="function")Ro=Ne.filterDropdown({prefixCls:`${an}-custom`,setSelectedKeys:Po=>Lo({selectedKeys:Po}),selectedKeys:xi(),confirm:No,clearFilters:ur,filters:Ne.filters,visible:io,close:()=>{Zi(!1)}});else if(Ne.filterDropdown)Ro=Ne.filterDropdown;else{const Po=xi()||[],rr=()=>(Ne.filters||[]).length===0?Nt.createElement(so.Z,{image:so.Z.PRESENTED_IMAGE_SIMPLE,description:di.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):kn==="tree"?Nt.createElement(Nt.Fragment,null,Nt.createElement(ml,{filterSearch:Rn,value:fr,onChange:br,tablePrefixCls:Me,locale:di}),Nt.createElement("div",{className:`${Me}-filter-dropdown-tree`},en?Nt.createElement(As.default,{checked:Po.length===Pa(Ne.filters).length,indeterminate:Po.length>0&&Po.length<Pa(Ne.filters).length,className:`${Me}-filter-dropdown-checkall`,onChange:Cs},di.filterCheckall):null,Nt.createElement(Ns.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:en,checkStrictly:!en,className:`${an}-menu`,onCheck:Ko,checkedKeys:Po,selectedKeys:Po,showIcon:!1,treeData:ia({filters:Ne.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:fr.trim()?Tr=>typeof Rn=="function"?Rn(fr,Yo(Tr)):mo(fr,Tr.title):void 0}))):Nt.createElement(Nt.Fragment,null,Nt.createElement(ml,{filterSearch:Rn,value:fr,onChange:br,tablePrefixCls:Me,locale:di}),Nt.createElement(hr.default,{selectable:!0,multiple:en,prefixCls:`${an}-menu`,className:Rs,onSelect:Lo,onDeselect:Lo,selectedKeys:Po,getPopupContainer:Ii,openKeys:Vo,onOpenChange:sr,items:Tu({filters:Ne.filters||[],filterSearch:Rn,prefixCls:He,filteredKeys:xi(),filterMultiple:en,searchValue:fr})})),Nr=()=>bi?(0,Pe.Z)((Vi||[]).map(Tr=>String(Tr)),Po,!0):Po.length===0;Ro=Nt.createElement(Nt.Fragment,null,rr(),Nt.createElement("div",{className:`${He}-dropdown-btns`},Nt.createElement(Hr.ZP,{type:"link",size:"small",disabled:Nr(),onClick:()=>ur()},di.filterReset),Nt.createElement(Hr.ZP,{type:"primary",size:"small",onClick:Bs},di.filterConfirm)))}Ne.filterDropdown&&(Ro=Nt.createElement(Uo.J,{selectable:void 0},Ro));const Xo=()=>Nt.createElement(ba,{className:`${He}-dropdown`},Ro);let wo;typeof Ne.filterIcon=="function"?wo=Ne.filterIcon(or):Ne.filterIcon?wo=Ne.filterIcon:wo=Nt.createElement(Xr,null);const{direction:Kr}=Nt.useContext(ms.E_);return Nt.createElement("div",{className:`${He}-column`},Nt.createElement("span",{className:`${Me}-column-title`},oi),Nt.createElement(kl.Z,{dropdownRender:Xo,trigger:["click"],open:io,onOpenChange:zr,getPopupContainer:Ii,placement:Kr==="rtl"?"bottomLeft":"bottomRight"},Nt.createElement("span",{role:"button",tabIndex:-1,className:me()(`${He}-trigger`,{active:or}),onClick:Po=>{Po.stopPropagation()}},wo)))}var Da=Ia;function Ca(Ut,Qt,ye){let Me=[];return(Ut||[]).forEach((He,Ne)=>{var an;const ln=sa(Ne,ye);if(He.filters||"filterDropdown"in He||"onFilter"in He)if("filteredValue"in He){let en=He.filteredValue;"filterDropdown"in He||(en=(an=en==null?void 0:en.map(String))!==null&&an!==void 0?an:en),Me.push({column:He,key:ns(He,ln),filteredKeys:en,forceFiltered:He.filtered})}else Me.push({column:He,key:ns(He,ln),filteredKeys:Qt&&He.defaultFilteredValue?He.defaultFilteredValue:void 0,forceFiltered:He.filtered});"children"in He&&(Me=[].concat((0,Ai.Z)(Me),(0,Ai.Z)(Ca(He.children,Qt,ln))))}),Me}function zl(Ut,Qt,ye,Me,He,Ne,an,ln){return ye.map((en,kn)=>{const Rn=sa(kn,ln),{filterMultiple:Fn=!0,filterMode:pi,filterSearch:di}=en;let oi=en;if(oi.filters||oi.filterDropdown){const Ii=ns(oi,Rn),ai=Me.find(Ni=>{let{key:bi}=Ni;return Ii===bi});oi=Object.assign(Object.assign({},oi),{title:Ni=>Nt.createElement(Da,{tablePrefixCls:Ut,prefixCls:`${Ut}-filter`,dropdownPrefixCls:Qt,column:oi,columnKey:Ii,filterState:ai,filterMultiple:Fn,filterMode:pi,filterSearch:di,triggerFilter:Ne,locale:He,getPopupContainer:an},Ys(en.title,Ni))})}return"children"in oi&&(oi=Object.assign(Object.assign({},oi),{children:zl(Ut,Qt,oi.children,Me,He,Ne,an,Rn)})),oi})}function vu(Ut){const Qt={};return Ut.forEach(ye=>{let{key:Me,filteredKeys:He,column:Ne}=ye;const{filters:an,filterDropdown:ln}=Ne;if(ln)Qt[Me]=He||null;else if(Array.isArray(He)){const en=Pa(an);Qt[Me]=en.filter(kn=>He.includes(String(kn)))}else Qt[Me]=null}),Qt}function pa(Ut,Qt){return Qt.reduce((ye,Me)=>{const{column:{onFilter:He,filters:Ne},filteredKeys:an}=Me;return He&&an&&an.length?ye.filter(ln=>an.some(en=>{const kn=Pa(Ne),Rn=kn.findIndex(pi=>String(pi)===String(en)),Fn=Rn!==-1?kn[Rn]:en;return He(Fn,ln)})):ye},Ut)}const Oa=Ut=>Ut.flatMap(Qt=>"children"in Qt?[Qt].concat((0,Ai.Z)(Oa(Qt.children||[]))):[Qt]);function Bu(Ut){let{prefixCls:Qt,dropdownPrefixCls:ye,mergedColumns:Me,onFilterChange:He,getPopupContainer:Ne,locale:an}=Ut;const ln=Nt.useMemo(()=>Oa(Me||[]),[Me]),[en,kn]=Nt.useState(()=>Ca(ln,!0)),Rn=Nt.useMemo(()=>{const oi=Ca(ln,!1);if(oi.length===0)return oi;let Ii=!0,ai=!0;if(oi.forEach(Ni=>{let{filteredKeys:bi}=Ni;bi!==void 0?Ii=!1:ai=!1}),Ii){const Ni=(ln||[]).map((bi,Vi)=>ns(bi,sa(Vi)));return en.filter(bi=>{let{key:Vi}=bi;return Ni.includes(Vi)}).map(bi=>{const Vi=ln[Ni.findIndex(yo=>yo===bi.key)];return Object.assign(Object.assign({},bi),{column:Object.assign(Object.assign({},bi.column),Vi),forceFiltered:Vi.filtered})})}return oi},[ln,en]),Fn=Nt.useMemo(()=>vu(Rn),[Rn]),pi=oi=>{const Ii=Rn.filter(ai=>{let{key:Ni}=ai;return Ni!==oi.key});Ii.push(oi),kn(Ii),He(vu(Ii),Ii)};return[oi=>zl(Qt,ye,oi,Rn,an,pi,Ne),Rn,Fn]}var bh=Bu;function dh(Ut,Qt,ye){const Me=Nt.useRef({});function He(Ne){if(!Me.current||Me.current.data!==Ut||Me.current.childrenColumnName!==Qt||Me.current.getRowKey!==ye){let ln=function(en){en.forEach((kn,Rn)=>{const Fn=ye(kn,Rn);an.set(Fn,kn),kn&&typeof kn=="object"&&Qt in kn&&ln(kn[Qt]||[])})};const an=new Map;ln(Ut),Me.current={data:Ut,childrenColumnName:Qt,kvMap:an,getRowKey:ye}}return Me.current.kvMap.get(Ne)}return[He]}var qh=bt(50371),ch=function(Ut,Qt){var ye={};for(var Me in Ut)Object.prototype.hasOwnProperty.call(Ut,Me)&&Qt.indexOf(Me)<0&&(ye[Me]=Ut[Me]);if(Ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,Me=Object.getOwnPropertySymbols(Ut);He<Me.length;He++)Qt.indexOf(Me[He])<0&&Object.prototype.propertyIsEnumerable.call(Ut,Me[He])&&(ye[Me[He]]=Ut[Me[He]]);return ye};const yu=10;function tu(Ut,Qt){const ye={current:Ut.current,pageSize:Ut.pageSize};return Object.keys(Qt&&typeof Qt=="object"?Qt:{}).forEach(He=>{const Ne=Ut[He];typeof Ne!="function"&&(ye[He]=Ne)}),ye}function Za(Ut,Qt,ye){const Me=ye&&typeof ye=="object"?ye:{},{total:He=0}=Me,Ne=ch(Me,["total"]),[an,ln]=(0,Nt.useState)(()=>({current:"defaultCurrent"in Ne?Ne.defaultCurrent:1,pageSize:"defaultPageSize"in Ne?Ne.defaultPageSize:yu})),en=(0,qh.Z)(an,Ne,{total:He>0?He:Ut}),kn=Math.ceil((He||Ut)/en.pageSize);en.current>kn&&(en.current=kn||1);const Rn=(pi,di)=>{ln({current:pi!=null?pi:1,pageSize:di||en.pageSize})},Fn=(pi,di)=>{var oi;ye&&((oi=ye.onChange)===null||oi===void 0||oi.call(ye,pi,di)),Rn(pi,di),Qt(pi,di||(en==null?void 0:en.pageSize))};return ye===!1?[{},()=>{}]:[Object.assign(Object.assign({},en),{onChange:Fn}),Rn]}var fh=Za,gh=bt(84105),Fu=bt(35654),$e=bt(90782),Si=bt(71430),vo=bt(18929);const xo={},Go="SELECT_ALL",ao="SELECT_INVERT",dr="SELECT_NONE",wr=[],Lr=(Ut,Qt)=>{let ye=[];return(Qt||[]).forEach(Me=>{ye.push(Me),Me&&typeof Me=="object"&&Ut in Me&&(ye=[].concat((0,Ai.Z)(ye),(0,Ai.Z)(Lr(Ut,Me[Ut]))))}),ye};var Ws=(Ut,Qt)=>{const{preserveSelectedRowKeys:ye,selectedRowKeys:Me,defaultSelectedRowKeys:He,getCheckboxProps:Ne,onChange:an,onSelect:ln,onSelectAll:en,onSelectInvert:kn,onSelectNone:Rn,onSelectMultiple:Fn,columnWidth:pi,type:di,selections:oi,fixed:Ii,renderCell:ai,hideSelectAll:Ni,checkStrictly:bi=!0}=Qt||{},{prefixCls:Vi,data:yo,pageData:Bo,getRecordByKey:Ri,getRowKey:po,expandType:or,childrenColumnName:Zi,locale:io,getPopupContainer:Wi}=Ut,[xi,to]=(0,vo.Z)(Me||He||wr,{value:Me}),Lo=Nt.useRef(new Map),Ko=(0,Nt.useCallback)(Yo=>{if(ye){const Ro=new Map;Yo.forEach(Xo=>{let wo=Ri(Xo);!wo&&Lo.current.has(Xo)&&(wo=Lo.current.get(Xo)),Ro.set(Xo,wo)}),Lo.current=Ro}},[Ri,ye]);Nt.useEffect(()=>{Ko(xi)},[xi]);const{keyEntities:Vo}=(0,Nt.useMemo)(()=>{if(bi)return{keyEntities:null};let Yo=yo;if(ye){const Ro=new Set(yo.map((wo,Kr)=>po(wo,Kr))),Xo=Array.from(Lo.current).reduce((wo,Kr)=>{let[Po,rr]=Kr;return Ro.has(Po)?wo:wo.concat(rr)},[]);Yo=[].concat((0,Ai.Z)(Yo),(0,Ai.Z)(Xo))}return(0,Si.I8)(Yo,{externalGetKey:po,childrenPropName:Zi})},[yo,po,bi,Zi,ye]),ji=(0,Nt.useMemo)(()=>Lr(Zi,Bo),[Zi,Bo]),sr=(0,Nt.useMemo)(()=>{const Yo=new Map;return ji.forEach((Ro,Xo)=>{const wo=po(Ro,Xo),Kr=(Ne?Ne(Ro):null)||{};Yo.set(wo,Kr)}),Yo},[ji,po,Ne]),fr=(0,Nt.useCallback)(Yo=>{var Ro;return!!(!((Ro=sr.get(po(Yo)))===null||Ro===void 0)&&Ro.disabled)},[sr,po]),[Qr,br]=(0,Nt.useMemo)(()=>{if(bi)return[xi||[],[]];const{checkedKeys:Yo,halfCheckedKeys:Ro}=(0,$e.S)(xi,!0,Vo,fr);return[Yo||[],Ro]},[xi,bi,Vo,fr]),Os=(0,Nt.useMemo)(()=>{const Yo=di==="radio"?Qr.slice(0,1):Qr;return new Set(Yo)},[Qr,di]),Bs=(0,Nt.useMemo)(()=>di==="radio"?new Set:new Set(br),[br,di]),[ur,No]=(0,Nt.useState)(null);Nt.useEffect(()=>{Qt||to(wr)},[!!Qt]);const zr=(0,Nt.useCallback)((Yo,Ro)=>{let Xo,wo;Ko(Yo),ye?(Xo=Yo,wo=Yo.map(Kr=>Lo.current.get(Kr))):(Xo=[],wo=[],Yo.forEach(Kr=>{const Po=Ri(Kr);Po!==void 0&&(Xo.push(Kr),wo.push(Po))})),to(Xo),an==null||an(Xo,wo,{type:Ro})},[to,Ri,an,ye]),Rs=(0,Nt.useCallback)((Yo,Ro,Xo,wo)=>{if(ln){const Kr=Xo.map(Po=>Ri(Po));ln(Ri(Yo),Ro,Kr,wo)}zr(Xo,"single")},[ln,Ri,zr]),Cs=(0,Nt.useMemo)(()=>!oi||Ni?null:(oi===!0?[Go,ao,dr]:oi).map(Ro=>Ro===Go?{key:"all",text:io.selectionAll,onSelect(){zr(yo.map((Xo,wo)=>po(Xo,wo)).filter(Xo=>{const wo=sr.get(Xo);return!(wo!=null&&wo.disabled)||Os.has(Xo)}),"all")}}:Ro===ao?{key:"invert",text:io.selectInvert,onSelect(){const Xo=new Set(Os);Bo.forEach((Kr,Po)=>{const rr=po(Kr,Po),Nr=sr.get(rr);Nr!=null&&Nr.disabled||(Xo.has(rr)?Xo.delete(rr):Xo.add(rr))});const wo=Array.from(Xo);kn&&kn(wo),zr(wo,"invert")}}:Ro===dr?{key:"none",text:io.selectNone,onSelect(){Rn==null||Rn(),zr(Array.from(Os).filter(Xo=>{const wo=sr.get(Xo);return wo==null?void 0:wo.disabled}),"none")}}:Ro).map(Ro=>Object.assign(Object.assign({},Ro),{onSelect:function(){for(var Xo,wo,Kr=arguments.length,Po=new Array(Kr),rr=0;rr<Kr;rr++)Po[rr]=arguments[rr];(wo=Ro.onSelect)===null||wo===void 0||(Xo=wo).call.apply(Xo,[Ro].concat(Po)),No(null)}})),[oi,Os,Bo,po,kn,zr]);return[(0,Nt.useCallback)(Yo=>{var Ro;if(!Qt)return Yo.filter(_r=>_r!==xo);let Xo=(0,Ai.Z)(Yo);const wo=new Set(Os),Kr=ji.map(po).filter(_r=>!sr.get(_r).disabled),Po=Kr.every(_r=>wo.has(_r)),rr=Kr.some(_r=>wo.has(_r)),Nr=()=>{const _r=[];Po?Kr.forEach(ps=>{wo.delete(ps),_r.push(ps)}):Kr.forEach(ps=>{wo.has(ps)||(wo.add(ps),_r.push(ps))});const ss=Array.from(wo);en==null||en(!Po,ss.map(ps=>Ri(ps)),_r.map(ps=>Ri(ps))),zr(ss,"all"),No(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=Nt.createElement("div",{className:`${Vi}-selection-extra`},Nt.createElement(kl.Z,{menu:Cr,getPopupContainer:Wi},Nt.createElement("span",null,Nt.createElement(gh.Z,null))))}const ss=ji.map((Cr,Ss)=>{const ya=po(Cr,Ss),Sl=sr.get(ya)||{};return Object.assign({checked:wo.has(ya)},Sl)}).filter(Cr=>{let{disabled:Ss}=Cr;return Ss}),ps=!!ss.length&&ss.length===ji.length,Qs=ps&&ss.every(Cr=>{let{checked:Ss}=Cr;return Ss}),va=ps&&ss.some(Cr=>{let{checked:Ss}=Cr;return Ss});Tr=!Ni&&Nt.createElement("div",{className:`${Vi}-selection`},Nt.createElement(As.default,{checked:ps?Qs:!!ji.length&&Po,indeterminate:ps?!Qs&&va:!Po&&rr,onChange:Nr,disabled:ji.length===0||ps,"aria-label":_r?"Custom selection":"Select all",skipGroup:!0}),_r)}let Ea;di==="radio"?Ea=(_r,ss,ps)=>{const Qs=po(ss,ps),va=wo.has(Qs);return{node:Nt.createElement(hi.ZP,Object.assign({},sr.get(Qs),{checked:va,onClick:Cr=>Cr.stopPropagation(),onChange:Cr=>{wo.has(Qs)||Rs(Qs,!0,[Qs],Cr.nativeEvent)}})),checked:va}}:Ea=(_r,ss,ps)=>{var Qs;const va=po(ss,ps),Cr=wo.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:Nt.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=>{wo.has(xs)&&(ka.push(xs),wo.delete(xs))}):$r.forEach(xs=>{wo.has(xs)||(ka.push(xs),wo.add(xs))});const Zs=Array.from(wo);Fn==null||Fn(!Cr,Zs.map(xs=>Ri(xs)),ka.map(xs=>Ri(xs))),zr(Zs,"multiple")}else{const $r=Qr;if(bi){const ka=Cr?(0,Fu._5)($r,va):(0,Fu.L0)($r,va);Rs(va,!Cr,ka,Nl)}else{const ka=(0,$e.S)([].concat((0,Ai.Z)($r),[va]),!0,Vo,fr),{checkedKeys:Zs,halfCheckedKeys:xs}=ka;let Zl=Zs;if(Cr){const mh=new Set(Zs);mh.delete(va),Zl=(0,$e.S)(Array.from(mh),{checked:!1,halfCheckedKeys:xs},Vo,fr).checkedKeys}Rs(va,!Cr,Zl,Nl)}}No(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(!Xo.includes(xo))if(Xo.findIndex(_r=>{var ss;return((ss=_r[Io])===null||ss===void 0?void 0:ss.columnType)==="EXPAND_COLUMN"})===0){const[_r,...ss]=Xo;Xo=[_r,xo].concat((0,Ai.Z)(ss))}else Xo=[xo].concat((0,Ai.Z)(Xo));const Va=Xo.indexOf(xo);Xo=Xo.filter((_r,ss)=>_r!==xo||ss===Va);const Jr=Xo[Va-1],La=Xo[Va+1];let ta=Ii;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&&((Ro=Jr[Io])===null||Ro===void 0?void 0:Ro.columnType)==="EXPAND_COLUMN"&&Jr.fixed===void 0&&(Jr.fixed=ta);const ma=me()(`${Vi}-selection-col`,{[`${Vi}-selection-col-with-dropdown`]:oi&&di==="checkbox"}),qu={fixed:ta,width:pi,className:`${Vi}-selection-column`,title:Qt.columnTitle||Tr,render:la,onCell:Qt.onCell,[Io]:{className:ma}};return Xo.map(_r=>_r===xo?qu:_r)},[po,ji,Qt,Qr,Os,Bs,pi,Cs,or,ur,sr,Fn,Rs,fr]),Os]},fs=bt(89489),kh=bt(59477),Ah=bt(6848);const eu="ascend",Gi="descend";function Iu(Ut){return typeof Ut.sorter=="object"&&typeof Ut.sorter.multiple=="number"?Ut.sorter.multiple:!1}function pe(Ut){return typeof Ut=="function"?Ut:Ut&&typeof Ut=="object"&&Ut.compare?Ut.compare:!1}function Pn(Ut,Qt){return Qt?Ut[Ut.indexOf(Qt)+1]:Ut[0]}function Xu(Ut,Qt,ye){let Me=[];function He(Ne,an){Me.push({column:Ne,key:ns(Ne,an),multiplePriority:Iu(Ne),sortOrder:Ne.sortOrder})}return(Ut||[]).forEach((Ne,an)=>{const ln=sa(an,ye);Ne.children?("sortOrder"in Ne&&He(Ne,ln),Me=[].concat((0,Ai.Z)(Me),(0,Ai.Z)(Xu(Ne.children,Qt,ln)))):Ne.sorter&&("sortOrder"in Ne?He(Ne,ln):Qt&&Ne.defaultSortOrder&&Me.push({column:Ne,key:ns(Ne,ln),multiplePriority:Iu(Ne),sortOrder:Ne.defaultSortOrder}))}),Me}function Du(Ut,Qt,ye,Me,He,Ne,an,ln){return(Qt||[]).map((en,kn)=>{const Rn=sa(kn,ln);let Fn=en;if(Fn.sorter){const pi=Fn.sortDirections||He,di=Fn.showSorterTooltip===void 0?an:Fn.showSorterTooltip,oi=ns(Fn,Rn),Ii=ye.find(or=>{let{key:Zi}=or;return Zi===oi}),ai=Ii?Ii.sortOrder:null,Ni=Pn(pi,ai);let bi;if(en.sortIcon)bi=en.sortIcon({sortOrder:ai});else{const or=pi.includes(eu)&&Nt.createElement(kh.Z,{className:me()(`${Ut}-column-sorter-up`,{active:ai===eu})}),Zi=pi.includes(Gi)&&Nt.createElement(fs.Z,{className:me()(`${Ut}-column-sorter-down`,{active:ai===Gi})});bi=Nt.createElement("span",{className:me()(`${Ut}-column-sorter`,{[`${Ut}-column-sorter-full`]:!!(or&&Zi)})},Nt.createElement("span",{className:`${Ut}-column-sorter-inner`,"aria-hidden":"true"},or,Zi))}const{cancelSort:Vi,triggerAsc:yo,triggerDesc:Bo}=Ne||{};let Ri=Vi;Ni===Gi?Ri=Bo:Ni===eu&&(Ri=yo);const po=typeof di=="object"?di:{title:Ri};Fn=Object.assign(Object.assign({},Fn),{className:me()(Fn.className,{[`${Ut}-column-sort`]:ai}),title:or=>{const Zi=Nt.createElement("div",{className:`${Ut}-column-sorters`},Nt.createElement("span",{className:`${Ut}-column-title`},Ys(en.title,or)),bi);return di?Nt.createElement(Ah.Z,Object.assign({},po),Zi):Zi},onHeaderCell:or=>{const Zi=en.onHeaderCell&&en.onHeaderCell(or)||{},io=Zi.onClick,Wi=Zi.onKeyDown;Zi.onClick=Lo=>{Me({column:en,key:oi,sortOrder:Ni,multiplePriority:Iu(en)}),io==null||io(Lo)},Zi.onKeyDown=Lo=>{Lo.keyCode===ii.Z.ENTER&&(Me({column:en,key:oi,sortOrder:Ni,multiplePriority:Iu(en)}),Wi==null||Wi(Lo))};const xi=ga(en.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,en.ellipsis&&(Zi.title=(xi!=null?xi:"").toString()),Zi}})}return"children"in Fn&&(Fn=Object.assign(Object.assign({},Fn),{children:Du(Ut,Fn.children,ye,Me,He,Ne,an,Rn)})),Fn})}function Hl(Ut){const{column:Qt,sortOrder:ye}=Ut;return{column:Qt,order:ye,field:Qt.dataIndex,columnKey:Qt.key}}function Qu(Ut){const Qt=Ut.filter(ye=>{let{sortOrder:Me}=ye;return Me}).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 ph(Ut,Qt,ye){const Me=Qt.slice().sort((an,ln)=>ln.multiplePriority-an.multiplePriority),He=Ut.slice(),Ne=Me.filter(an=>{let{column:{sorter:ln},sortOrder:en}=an;return pe(ln)&&en});return Ne.length?He.sort((an,ln)=>{for(let en=0;en<Ne.length;en+=1){const kn=Ne[en],{column:{sorter:Rn},sortOrder:Fn}=kn,pi=pe(Rn);if(pi&&Fn){const di=pi(an,ln,Fn);if(di!==0)return Fn===eu?di:-di}}return 0}).map(an=>{const ln=an[ye];return ln?Object.assign(Object.assign({},an),{[ye]:ph(ln,Qt,ye)}):an}):He}function Mc(Ut){let{prefixCls:Qt,mergedColumns:ye,onSorterChange:Me,sortDirections:He,tableLocale:Ne,showSorterTooltip:an}=Ut;const[ln,en]=Nt.useState(Xu(ye,!0)),kn=Nt.useMemo(()=>{let oi=!0;const Ii=Xu(ye,!1);if(!Ii.length)return ln;const ai=[];function Ni(Vi){oi?ai.push(Vi):ai.push(Object.assign(Object.assign({},Vi),{sortOrder:null}))}let bi=null;return Ii.forEach(Vi=>{bi===null?(Ni(Vi),Vi.sortOrder&&(Vi.multiplePriority===!1?oi=!1:bi=!0)):(bi&&Vi.multiplePriority!==!1||(oi=!1),Ni(Vi))}),ai},[ye,ln]),Rn=Nt.useMemo(()=>{const oi=kn.map(Ii=>{let{column:ai,sortOrder:Ni}=Ii;return{column:ai,order:Ni}});return{sortColumns:oi,sortColumn:oi[0]&&oi[0].column,sortOrder:oi[0]&&oi[0].order}},[kn]);function Fn(oi){let Ii;oi.multiplePriority===!1||!kn.length||kn[0].multiplePriority===!1?Ii=[oi]:Ii=[].concat((0,Ai.Z)(kn.filter(ai=>{let{key:Ni}=ai;return Ni!==oi.key})),[oi]),en(Ii),Me(Qu(Ii),Ii)}return[oi=>Du(Qt,oi,kn,Fn,He,Ne,an),kn,Rn,()=>Qu(kn)]}function yd(Ut,Qt){return Ut.map(ye=>{const Me=Object.assign({},ye);return Me.title=Ys(ye.title,Qt),"children"in Me&&(Me.children=yd(Me.children,Qt)),Me})}function Ks(Ut){return[Nt.useCallback(ye=>yd(ye,Ut),[Ut])]}var To=Ui((Ut,Qt)=>{const{_renderTimes:ye}=Ut,{_renderTimes:Me}=Qt;return ye!==Me}),rl=xr((Ut,Qt)=>{const{_renderTimes:ye}=Ut,{_renderTimes:Me}=Qt;return ye!==Me}),Ua=bt(64993),Ps=bt(17313),vr=bt(83116),aa=bt(37613),ys=Ut=>{const{componentCls:Qt}=Ut,ye=`${Ut.lineWidth}px ${Ut.lineType} ${Ut.tableBorderColor}`,Me=(He,Ne,an)=>({[`&${Qt}-${He}`]:{[`> ${Qt}-container`]:{[`> ${Qt}-content, > ${Qt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Qt}-expanded-row-fixed`]:{margin:`-${Ne}px -${an+Ut.lineWidth}px`}}}}}});return{[`${Qt}-wrapper`]:{[`${Qt}${Qt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Qt}-title`]:{border:ye,borderBottom:0},[`> ${Qt}-container`]:{borderInlineStart:ye,borderTop:ye,[`
|
|
|
> ${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:ye},"> thead":{"> tr:not(:last-child) > th":{borderBottom:ye},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Qt}-cell-fix-right-first::after`]:{borderInlineEnd:ye}},"\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:ye,content:'""'}}}}}},[`&${Qt}-scroll-horizontal`]:{[`> ${Qt}-container > ${Qt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Qt}-expanded-row,
|
|
|
> tr${Qt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Me("middle",Ut.tablePaddingVerticalMiddle,Ut.tablePaddingHorizontalMiddle)),Me("small",Ut.tablePaddingVerticalSmall,Ut.tablePaddingHorizontalSmall)),{[`> ${Qt}-footer`]:{border:ye,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:ye}}}},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:ye,controlInteractiveSize:Me,motionDurationSlow:He,lineWidth:Ne,paddingXS:an,lineType:ln,tableBorderColor:en,tableExpandIconBg:kn,tableExpandColumnWidth:Rn,borderRadius:Fn,fontSize:pi,fontSizeSM:di,lineHeight:oi,tablePaddingVertical:Ii,tablePaddingHorizontal:ai,tableExpandedRowBg:Ni,paddingXXS:bi}=Ut,Vi=Me/2-Ne,yo=Vi*2+Ne*3,Bo=`${Ne}px ${ln} ${en}`,Ri=bi-Ne;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:yo,height:yo,padding:0,color:"inherit",lineHeight:`${yo}px`,background:kn,border:Bo,borderRadius:Fn,transform:`scale(${Me/yo})`,transition:`all ${He}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${He} ease-out`,content:'""'},"&::before":{top:Vi,insetInlineEnd:Ri,insetInlineStart:Ri,height:Ne},"&::after":{top:Ri,bottom:Ri,insetInlineStart:Vi,width:Ne,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:(pi*oi-Ne*3)/2-Math.ceil((di*1.4-Ne*3)/2),marginInlineEnd:an},[`tr${Qt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Ni}},[`${ye}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Qt}-expanded-row-fixed`]:{position:"relative",margin:`-${Ii}px -${ai}px`,padding:`${Ii}px ${ai}px`}}}},Xs=Ut=>{const{componentCls:Qt,antCls:ye,iconCls:Me,tableFilterDropdownWidth:He,tableFilterDropdownSearchWidth:Ne,paddingXXS:an,paddingXS:ln,colorText:en,lineWidth:kn,lineType:Rn,tableBorderColor:Fn,tableHeaderIconColor:pi,fontSizeSM:di,tablePaddingHorizontal:oi,borderRadius:Ii,motionDurationSlow:ai,colorTextDescription:Ni,colorPrimary:bi,tableHeaderFilterActiveBg:Vi,colorTextDisabled:yo,tableFilterDropdownBg:Bo,tableFilterDropdownHeight:Ri,controlItemBgHover:po,controlItemBgActive:or,boxShadowSecondary:Zi,filterDropdownMenuBg:io}=Ut,Wi=`${ye}-dropdown`,xi=`${Qt}-filter-dropdown`,to=`${ye}-tree`,Lo=`${kn}px ${Rn} ${Fn}`;return[{[`${Qt}-wrapper`]:{[`${Qt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Qt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-an,marginInline:`${an}px ${-oi/2}px`,padding:`0 ${an}px`,color:pi,fontSize:di,borderRadius:Ii,cursor:"pointer",transition:`all ${ai}`,"&:hover":{color:Ni,background:Vi},"&.active":{color:bi}}}},{[`${ye}-dropdown`]:{[xi]:Object.assign(Object.assign({},(0,Ps.Wf)(Ut)),{minWidth:He,backgroundColor:Bo,borderRadius:Ii,boxShadow:Zi,overflow:"hidden",[`${Wi}-menu`]:{maxHeight:Ri,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:io,"&:empty::after":{display:"block",padding:`${ln}px 0`,color:yo,fontSize:di,textAlign:"center",content:'"Not Found"'}},[`${xi}-tree`]:{paddingBlock:`${ln}px 0`,paddingInline:ln,[to]:{padding:0},[`${to}-treenode ${to}-node-content-wrapper:hover`]:{backgroundColor:po},[`${to}-treenode-checkbox-checked ${to}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:or}}},[`${xi}-search`]:{padding:ln,borderBottom:Lo,"&-input":{input:{minWidth:Ne},[Me]:{color:yo}}},[`${xi}-checkall`]:{width:"100%",marginBottom:an,marginInlineStart:an},[`${xi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${ln-kn}px ${ln}px`,overflow:"hidden",borderTop:Lo}})}},{[`${ye}-dropdown ${xi}, ${xi}-submenu`]:{[`${ye}-checkbox-wrapper + span`]:{paddingInlineStart:ln,color:en},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},td=Ut=>{const{componentCls:Qt,lineWidth:ye,colorSplit:Me,motionDurationSlow:He,zIndexTableFixed:Ne,tableBg:an,zIndexTableSticky:ln}=Ut,en=Me;return{[`${Qt}-wrapper`]:{[`
|
|
|
${Qt}-cell-fix-left,
|
|
|
${Qt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Ne,background:an},[`
|
|
|
${Qt}-cell-fix-left-first::after,
|
|
|
${Qt}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-ye,width:30,transform:"translateX(100%)",transition:`box-shadow ${He}`,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:-ye,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${He}`,content:'""',pointerEvents:"none"},[`${Qt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:ln+1,width:30,transition:`box-shadow ${He}`,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 ${en}`}},[`
|
|
|
${Qt}-cell-fix-left-first::after,
|
|
|
${Qt}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${en}`},[`${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 ${en}`}},[`
|
|
|
${Qt}-cell-fix-right-first::after,
|
|
|
${Qt}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${en}`}}}}},Wf=Ut=>{const{componentCls:Qt,antCls:ye}=Ut;return{[`${Qt}-wrapper`]:{[`${Qt}-pagination${ye}-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:ye}=Ut;return{[`${Qt}-wrapper`]:{[Qt]:{[`${Qt}-title, ${Qt}-header`]:{borderRadius:`${ye}px ${ye}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:ye,borderStartEndRadius:ye,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:ye},"> *:last-child":{borderStartEndRadius:ye}}},"&-footer":{borderRadius:`0 0 ${ye}px ${ye}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:ye,iconCls:Me,fontSizeIcon:He,padding:Ne,paddingXS:an,tableHeaderIconColor:ln,tableHeaderIconColorHover:en,tableSelectionColumnWidth:kn}=Ut;return{[`${Qt}-wrapper`]:{[`${Qt}-selection-col`]:{width:kn,[`&${Qt}-selection-col-with-dropdown`]:{width:kn+He+Ne/4}},[`${Qt}-bordered ${Qt}-selection-col`]:{width:kn+an*2,[`&${Qt}-selection-col-with-dropdown`]:{width:kn+He+Ne/4+an*2}},[`
|
|
|
table tr th${Qt}-selection-column,
|
|
|
table tr td${Qt}-selection-column
|
|
|
`]:{paddingInlineEnd:Ut.paddingXS,paddingInlineStart:Ut.paddingXS,textAlign:"center",[`${ye}-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`,[Me]:{color:ln,fontSize:He,verticalAlign:"baseline","&:hover":{color:en}}}}}},ed=Ut=>{const{componentCls:Qt}=Ut,ye=(Me,He,Ne,an)=>({[`${Qt}${Qt}-${Me}`]:{fontSize:an,[`
|
|
|
${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:`${He}px ${Ne}px`},[`${Qt}-filter-trigger`]:{marginInlineEnd:`-${Ne/2}px`},[`${Qt}-expanded-row-fixed`]:{margin:`-${He}px -${Ne}px`},[`${Qt}-tbody`]:{[`${Qt}-wrapper:only-child ${Qt}`]:{marginBlock:`-${He}px`,marginInline:`${Ut.tableExpandColumnWidth-Ne}px -${Ne}px`}},[`${Qt}-selection-column`]:{paddingInlineStart:`${Ne/4}px`}}});return{[`${Qt}-wrapper`]:Object.assign(Object.assign({},ye("middle",Ut.tablePaddingVerticalMiddle,Ut.tablePaddingHorizontalMiddle,Ut.tableFontSizeMiddle)),ye("small",Ut.tablePaddingVerticalSmall,Ut.tablePaddingHorizontalSmall,Ut.tableFontSizeSmall))}},Ju=Ut=>{const{componentCls:Qt,marginXXS:ye,fontSizeIcon:Me,tableHeaderIconColor:He,tableHeaderIconColorHover:Ne}=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:ye,color:He,fontSize:0,transition:`color ${Ut.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Me,"&.active":{color:Ut.colorPrimary}},[`${Qt}-column-sorter-up + ${Qt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Qt}-column-sorters:hover ${Qt}-column-sorter`]:{color:Ne}}}},nd=Ut=>{const{componentCls:Qt,opacityLoading:ye,tableScrollThumbBg:Me,tableScrollThumbBgHover:He,tableScrollThumbSize:Ne,tableScrollBg:an,zIndexTableSticky:ln,stickyScrollBarBorderRadius:en}=Ut,kn=`${Ut.lineWidth}px ${Ut.lineType} ${Ut.tableBorderColor}`;return{[`${Qt}-wrapper`]:{[`${Qt}-sticky`]:{"&-holder":{position:"sticky",zIndex:ln,background:Ut.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Ne}px !important`,zIndex:ln,display:"flex",alignItems:"center",background:an,borderTop:kn,opacity:ye,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Ne,backgroundColor:Me,borderRadius:en,transition:`all ${Ut.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:He}}}}}}},_u=Ut=>{const{componentCls:Qt,lineWidth:ye,tableBorderColor:Me}=Ut,He=`${ye}px ${Ut.lineType} ${Me}`;return{[`${Qt}-wrapper`]:{[`${Qt}-summary`]:{position:"relative",zIndex:Ut.zIndexTableFixed,background:Ut.tableBg,"> tr":{"> th, > td":{borderBottom:He}}},[`div${Qt}-summary`]:{boxShadow:`0 -${ye}px 0 ${Me}`}}}},Th=Ut=>{const{componentCls:Qt}=Ut,ye=`${Ut.lineWidth}px ${Ut.lineType} ${Ut.tableBorderColor}`,Me=`${Qt}-expanded-row-cell`;return{[`${Qt}-wrapper`]:{[`${Qt}-tbody-virtual`]:{[`${Qt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Qt}-cell`]:{borderBottom:ye},[`${Qt}-expanded-row`]:{[`${Me}${Me}-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:ye,position:"absolute"},[`${Qt}-cell`]:{borderInlineEnd:ye,[`&${Qt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Ut.lineWidth,borderInlineStart:ye}}}}}}};const Ou=Ut=>{const{componentCls:Qt,fontWeightStrong:ye,tablePaddingVertical:Me,tablePaddingHorizontal:He,lineWidth:Ne,lineType:an,tableBorderColor:ln,tableFontSize:en,tableBg:kn,tableRadius:Rn,tableHeaderTextColor:Fn,motionDurationMid:pi,tableHeaderBg:di,tableHeaderCellSplitColor:oi,tableRowHoverBg:Ii,tableSelectedRowBg:ai,tableSelectedRowHoverBg:Ni,tableFooterTextColor:bi,tableFooterBg:Vi,paddingContentVerticalLG:yo}=Ut,Bo=`${Ne}px ${an} ${ln}`;return{[`${Qt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ps.dF)()),{[Qt]:Object.assign(Object.assign({},(0,Ps.Wf)(Ut)),{fontSize:en,background:kn,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:`${yo}px ${He}px`,overflowWrap:"break-word"},[`${Qt}-title`]:{padding:`${Me}px ${He}px`},[`${Qt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Fn,fontWeight:ye,textAlign:"start",background:di,borderBottom:Bo,transition:`background ${pi} 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:oi,transform:"translateY(-50%)",transition:`background-color ${pi}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Qt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${pi}, border-color ${pi}`,borderBottom:Bo,[`
|
|
|
> ${Qt}-wrapper:only-child,
|
|
|
> ${Qt}-expanded-row-fixed > ${Qt}-wrapper:only-child
|
|
|
`]:{[Qt]:{marginBlock:`-${Me}px`,marginInline:`${Ut.tableExpandColumnWidth-He}px -${He}px`,[`${Qt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Fn,fontWeight:ye,textAlign:"start",background:di,borderBottom:Bo,transition:`background ${pi} ease`},[`
|
|
|
&${Qt}-row:hover > th,
|
|
|
&${Qt}-row:hover > td,
|
|
|
> th${Qt}-cell-row-hover,
|
|
|
> td${Qt}-cell-row-hover
|
|
|
`]:{background:Ii},[`&${Qt}-row-selected`]:{"> th, > td":{background:ai},"&:hover > th, &:hover > td":{background:Ni}}}},[`${Qt}-footer`]:{padding:`${Me}px ${He}px`,color:bi,background:Vi}})}};var Bh=(0,vr.Z)("Table",Ut=>{const{colorTextHeading:Qt,colorSplit:ye,colorIcon:Me,colorIconHover:He,opacityLoading:Ne,colorBgContainer:an,controlInteractiveSize:ln,headerBg:en,headerColor:kn,headerSortActiveBg:Rn,headerSortHoverBg:Fn,bodySortBg:pi,rowHoverBg:di,rowSelectedBg:oi,rowSelectedHoverBg:Ii,rowExpandedBg:ai,cellPaddingBlock:Ni,cellPaddingInline:bi,cellPaddingBlockMD:Vi,cellPaddingInlineMD:yo,cellPaddingBlockSM:Bo,cellPaddingInlineSM:Ri,borderColor:po,footerBg:or,footerColor:Zi,headerBorderRadius:io,cellFontSize:Wi,cellFontSizeMD:xi,cellFontSizeSM:to,headerSplitColor:Lo,fixedHeaderSortActiveBg:Ko,headerFilterHoverBg:Vo,filterDropdownBg:ji,expandIconBg:sr,selectionColumnWidth:fr,stickyScrollBarBg:Qr}=Ut,br=new Ua.C(Me),Os=new Ua.C(He),Bs=2,ur=(0,aa.TS)(Ut,{tableFontSize:Wi,tableBg:an,tableRadius:io,tablePaddingVertical:Ni,tablePaddingHorizontal:bi,tablePaddingVerticalMiddle:Vi,tablePaddingHorizontalMiddle:yo,tablePaddingVerticalSmall:Bo,tablePaddingHorizontalSmall:Ri,tableBorderColor:po,tableHeaderTextColor:kn,tableHeaderBg:en,tableFooterTextColor:Zi,tableFooterBg:or,tableHeaderCellSplitColor:Lo,tableHeaderSortBg:Rn,tableHeaderSortHoverBg:Fn,tableHeaderIconColor:br.clone().setAlpha(br.getAlpha()*Ne).toRgbString(),tableHeaderIconColorHover:Os.clone().setAlpha(Os.getAlpha()*Ne).toRgbString(),tableBodySortBg:pi,tableFixedHeaderSortActiveBg:Ko,tableHeaderFilterActiveBg:Vo,tableFilterDropdownBg:ji,tableRowHoverBg:di,tableSelectedRowBg:oi,tableSelectedRowHoverBg:Ii,zIndexTableFixed:Bs,zIndexTableSticky:Bs+1,tableFontSizeMiddle:xi,tableFontSizeSmall:to,tableSelectionColumnWidth:fr,tableExpandIconBg:sr,tableExpandColumnWidth:ln+2*Ut.padding,tableExpandedRowBg:ai,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Qr,tableScrollThumbBgHover:Qt,tableScrollBg:ye});return[Ou(ur),Wf(ur),_u(ur),Ju(ur),Xs(ur),ys(ur),Kf(ur),gs(ur),_u(ur),Dr(ur),Ec(ur),td(ur),nd(ur),Ma(ur),ed(ur),Xd(ur),Th(ur)]},Ut=>{const{colorFillAlter:Qt,colorBgContainer:ye,colorTextHeading:Me,colorFillSecondary:He,colorFillContent:Ne,controlItemBgActive:an,controlItemBgActiveHover:ln,padding:en,paddingSM:kn,paddingXS:Rn,colorBorderSecondary:Fn,borderRadiusLG:pi,fontSize:di,controlHeight:oi,colorTextPlaceholder:Ii}=Ut,ai=new Ua.C(He).onBackground(ye).toHexShortString(),Ni=new Ua.C(Ne).onBackground(ye).toHexShortString(),bi=new Ua.C(Qt).onBackground(ye).toHexShortString();return{headerBg:bi,headerColor:Me,headerSortActiveBg:ai,headerSortHoverBg:Ni,bodySortBg:bi,rowHoverBg:bi,rowSelectedBg:an,rowSelectedHoverBg:ln,rowExpandedBg:Qt,cellPaddingBlock:en,cellPaddingInline:en,cellPaddingBlockMD:kn,cellPaddingInlineMD:Rn,cellPaddingBlockSM:Rn,cellPaddingInlineSM:Rn,borderColor:Fn,headerBorderRadius:pi,footerBg:bi,footerColor:Me,cellFontSize:di,cellFontSizeMD:di,cellFontSizeSM:di,headerSplitColor:Fn,fixedHeaderSortActiveBg:ai,headerFilterHoverBg:Ne,filterDropdownMenuBg:ye,filterDropdownBg:ye,expandIconBg:ye,selectionColumnWidth:oi,stickyScrollBarBg:Ii,stickyScrollBarBorderRadius:100}});const Lc=[],af=(Ut,Qt)=>{const{prefixCls:ye,className:Me,rootClassName:He,style:Ne,size:an,bordered:ln,dropdownPrefixCls:en,dataSource:kn,pagination:Rn,rowSelection:Fn,rowKey:pi="key",rowClassName:di,columns:oi,children:Ii,childrenColumnName:ai,onChange:Ni,getPopupContainer:bi,loading:Vi,expandIcon:yo,expandable:Bo,expandedRowRender:Ri,expandIconColumnIndex:po,indentSize:or,scroll:Zi,sortDirections:io,locale:Wi,showSorterTooltip:xi=!0,virtual:to}=Ut,Lo=Nt.useMemo(()=>oi||Ge(Ii),[oi,Ii]),Ko=Nt.useMemo(()=>Lo.some(Zr=>Zr.responsive),[Lo]),Vo=(0,En.Z)(Ko),ji=Nt.useMemo(()=>{const Zr=new Set(Object.keys(Vo).filter(Ms=>Vo[Ms]));return Lo.filter(Ms=>!Ms.responsive||Ms.responsive.some(ua=>Zr.has(ua)))},[Lo,Vo]),sr=(0,ro.Z)(Ut,["className","style","columns"]),{locale:fr=Ki.Z,direction:Qr,table:br,renderEmpty:Os,getPrefixCls:Bs,getPopupContainer:ur}=Nt.useContext(ms.E_),No=(0,Bi.Z)(an),zr=Object.assign(Object.assign({},fr.Table),Wi),Rs=kn||Lc,Cs=Bs("table",ye),ia=Bs("dropdown",en),Yo=Object.assign({childrenColumnName:ai,expandIconColumnIndex:po},Bo),{childrenColumnName:Ro="children"}=Yo,Xo=Nt.useMemo(()=>Rs.some(Zr=>Zr==null?void 0:Zr[Ro])?"nest":Ri||Bo&&Bo.expandedRowRender?"row":null,[Rs]),wo={body:Nt.useRef()},Kr=Nt.useMemo(()=>typeof pi=="function"?pi:Zr=>Zr==null?void 0:Zr[pi],[pi]),[Po]=dh(Rs,Ro,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&&wo.body.current&&(0,lr.Z)(0,{getContainer:()=>wo.body.current}),Ni==null||Ni(xl.pagination,xl.filters,xl.sorter,{currentDataSource:pa(ph(Rs,xl.sorterStates,Ro),xl.filterStates),action:Ms})},Tr=(Zr,Ms)=>{Nr({sorter:Zr,sorterStates:Ms},"sort",!1)},[Ea,la,Va,Jr]=Mc({prefixCls:Cs,mergedColumns:ji,onSorterChange:Tr,sortDirections:io||["ascend","descend"],tableLocale:zr,showSorterTooltip:xi}),La=Nt.useMemo(()=>ph(Rs,la,Ro),[Rs,la]);rr.sorter=Jr(),rr.sorterStates=la;const ta=(Zr,Ms)=>{Nr({filters:Zr,filterStates:Ms},"filter",!0)},[ma,qu,_r]=bh({prefixCls:Cs,locale:zr,dropdownPrefixCls:ia,mergedColumns:ji,onFilterChange:ta,getPopupContainer:bi||ur}),ss=pa(La,qu);rr.filters=_r,rr.filterStates=qu;const ps=Nt.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]=fh(ss.length,va,Rn);rr.pagination=Rn===!1?{}:tu(Cr,Rn),rr.resetPagination=Ss;const ya=Nt.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:Po,expandType:Xo,childrenColumnName:Ro,locale:zr,getPopupContainer:bi||ur},Fn),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)};Yo.__PARENT_RENDER_ICON__=Yo.expandIcon,Yo.expandIcon=Yo.expandIcon||yo||hs(zr),Xo==="nest"&&Yo.expandIconColumnIndex===void 0?Yo.expandIconColumnIndex=Fn?1:0:Yo.expandIconColumnIndex>0&&Fn&&(Yo.expandIconColumnIndex-=1),typeof Yo.indentSize!="number"&&(Yo.indentSize=typeof or=="number"?or:15);const nu=Nt.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=No==="small"||No==="middle"?"small":void 0;const Ms=Rr=>Nt.createElement(qo.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(xu=>xu.includes("top")),Sa=Es.find(xu=>xu.includes("bottom")),xl=Es.every(xu=>`${xu}`=="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"},Me,He,Zs),mh=Object.assign(Object.assign({},br==null?void 0:br.style),Ne),ou=Wi&&Wi.emptyText||(Os==null?void 0:Os("Table"))||Nt.createElement(Ji.Z,{componentName:"Table"}),Ru=to?rl:To,$u={},Tl=Nt.useMemo(()=>{const{fontSize:Zr,lineHeight:Ms,padding:ua,paddingXS:Es,paddingSM:Rr}=xs,Sa=Math.floor(Zr*Ms);switch(No){case"large":return ua*2+Sa;case"small":return Es*2+Sa;default:return Rr*2+Sa}},[xs,No]);return to&&($u.listItemHeight=Tl),ka(Nt.createElement("div",{ref:Qt,className:Zl,style:mh},Nt.createElement(jr.Z,Object.assign({spinning:!1},$r),iu,Nt.createElement(Ru,Object.assign({},$u,sr,{columns:ji,direction:Qr,expandable:Yo,prefixCls:Cs,className:me()({[`${Cs}-middle`]:No==="middle",[`${Cs}-small`]:No==="small",[`${Cs}-bordered`]:ln,[`${Cs}-empty`]:Rs.length===0}),data:ya,rowKey:Kr,rowClassName:Nl,emptyText:ou,internalHooks:ee,internalRefs:wo,transformColumns:nu})),Kl)))};var lf=Nt.forwardRef(af);const Vf=(Ut,Qt)=>{const ye=Nt.useRef(0);return ye.current+=1,Nt.createElement(lf,Object.assign({},Ut,{ref:Qt,_renderTimes:ye.current}))},yl=Nt.forwardRef(Vf);yl.SELECTION_COLUMN=xo,yl.EXPAND_COLUMN=wt,yl.SELECTION_ALL=Go,yl.SELECTION_INVERT=ao,yl.SELECTION_NONE=dr,yl.Column=no,yl.ColumnGroup=Zo,yl.Summary=ge;var Fh=yl,Zg=Fh},17574:function(dn,Mn,bt){"use strict";bt.d(Mn,{default:function(){return Se}});var wt=bt(54844),ee=bt(80702),he=bt(52671),Ie=bt(8657),te=bt(72308),Pe=bt(59301),Nt={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"},Le=Nt,ve=bt(7657),Xt=function(Xe,Xn){return Pe.createElement(ve.Z,(0,te.Z)({},Xe,{ref:Xn,icon:Le}))},fe=Pe.forwardRef(Xt),xe=fe,je=bt(92310),Bt=bt.n(je),et=bt(35654),nt=bt(71430),ht=bt(36355),lt=bt(56082),gt=bt(62892),yt=bt(20648);const Pt=4;function Tt(Vt){const{dropPosition:Xe,dropLevelOffset:Xn,prefixCls:Bn,indent:Ae,direction:hn="ltr"}=Vt,bn=hn==="ltr"?"left":"right",Jn=hn==="ltr"?"right":"left",mn={[bn]:-Xn*Ae+Pt,[Jn]:0};switch(Xe){case-1:mn.top=-3;break;case 1:mn.bottom=-3;break;default:mn.bottom=-3,mn[bn]=Ae+Pt;break}return Pe.createElement("div",{style:mn,className:`${Bn}-drop-indicator`})}var It=bt(71997),_t=Pe.forwardRef((Vt,Xe)=>{const{getPrefixCls:Xn,direction:Bn,virtual:Ae,tree:hn}=Pe.useContext(ht.E_),{prefixCls:bn,className:Jn,showIcon:mn=!1,showLine:ui,switcherIcon:Ce,blockNode:ni=!1,children:Pi,checkable:gn=!1,selectable:Tn=!0,draggable:pn,motion:Un,style:On}=Vt,we=Xn("tree",bn),In=Xn(),rn=Un!=null?Un:Object.assign(Object.assign({},(0,gt.Z)(In)),{motionAppear:!1}),ge=Object.assign(Object.assign({},Vt),{checkable:gn,selectable:Tn,showIcon:mn,motion:rn,blockNode:ni,showLine:!!ui,dropIndicatorRender:Tt}),[oe,Ft]=(0,yt.ZP)(we),St=Pe.useMemo(()=>{if(!pn)return!1;let At={};switch(typeof pn){case"function":At.nodeDraggable=pn;break;case"object":At=Object.assign({},pn);break;default:break}return At.icon!==!1&&(At.icon=At.icon||Pe.createElement(lt.Z,null)),At},[pn]),mt=At=>Pe.createElement(It.Z,{prefixCls:we,switcherIcon:Ce,treeNodeProps:At,showLine:ui});return oe(Pe.createElement(wt.Z,Object.assign({itemHeight:20,ref:Xe,virtual:Ae},ge,{style:Object.assign(Object.assign({},hn==null?void 0:hn.style),On),prefixCls:we,className:Bt()({[`${we}-icon-hide`]:!mn,[`${we}-block-node`]:ni,[`${we}-unselectable`]:!Tn,[`${we}-rtl`]:Bn==="rtl"},hn==null?void 0:hn.className,Jn,Ft),direction:Bn,checkable:gn&&Pe.createElement("span",{className:`${we}-checkbox-inner`}),selectable:Tn,switcherIcon:mt,draggable:St}),Pi))}),se;(function(Vt){Vt[Vt.None=0]="None",Vt[Vt.Start=1]="Start",Vt[Vt.End=2]="End"})(se||(se={}));function Jt(Vt,Xe){function Xn(Bn){const{key:Ae,children:hn}=Bn;Xe(Ae,Bn)!==!1&&Jt(hn||[],Xe)}Vt.forEach(Xn)}function le(Vt){let{treeData:Xe,expandedKeys:Xn,startKey:Bn,endKey:Ae}=Vt;const hn=[];let bn=se.None;if(Bn&&Bn===Ae)return[Bn];if(!Bn||!Ae)return[];function Jn(mn){return mn===Bn||mn===Ae}return Jt(Xe,mn=>{if(bn===se.End)return!1;if(Jn(mn)){if(hn.push(mn),bn===se.None)bn=se.Start;else if(bn===se.Start)return bn=se.End,!1}else bn===se.Start&&hn.push(mn);return Xn.includes(mn)}),hn}function Zt(Vt,Xe){const Xn=(0,ee.Z)(Xe),Bn=[];return Jt(Vt,(Ae,hn)=>{const bn=Xn.indexOf(Ae);return bn!==-1&&(Bn.push(hn),Xn.splice(bn,1)),!!Xn.length}),Bn}var Fe=function(Vt,Xe){var Xn={};for(var Bn in Vt)Object.prototype.hasOwnProperty.call(Vt,Bn)&&Xe.indexOf(Bn)<0&&(Xn[Bn]=Vt[Bn]);if(Vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Bn=Object.getOwnPropertySymbols(Vt);Ae<Bn.length;Ae++)Xe.indexOf(Bn[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Vt,Bn[Ae])&&(Xn[Bn[Ae]]=Vt[Bn[Ae]]);return Xn};function me(Vt){const{isLeaf:Xe,expanded:Xn}=Vt;return Xe?Pe.createElement(he.Z,null):Xn?Pe.createElement(Ie.Z,null):Pe.createElement(xe,null)}function Ve(Vt){let{treeData:Xe,children:Xn}=Vt;return Xe||(0,nt.zn)(Xn)}const Qe=(Vt,Xe)=>{var{defaultExpandAll:Xn,defaultExpandParent:Bn,defaultExpandedKeys:Ae}=Vt,hn=Fe(Vt,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const bn=Pe.useRef(),Jn=Pe.useRef(),mn=()=>{const{keyEntities:St}=(0,nt.I8)(Ve(hn));let mt;return Xn?mt=Object.keys(St):Bn?mt=(0,et.r7)(hn.expandedKeys||Ae||[],St):mt=hn.expandedKeys||Ae,mt},[ui,Ce]=Pe.useState(hn.selectedKeys||hn.defaultSelectedKeys||[]),[ni,Pi]=Pe.useState(()=>mn());Pe.useEffect(()=>{"selectedKeys"in hn&&Ce(hn.selectedKeys)},[hn.selectedKeys]),Pe.useEffect(()=>{"expandedKeys"in hn&&Pi(hn.expandedKeys)},[hn.expandedKeys]);const gn=(St,mt)=>{var At;return"expandedKeys"in hn||Pi(St),(At=hn.onExpand)===null||At===void 0?void 0:At.call(hn,St,mt)},Tn=(St,mt)=>{var At;const{multiple:Rt}=hn,{node:Lt,nativeEvent:ae}=mt,{key:De=""}=Lt,Oe=Ve(hn),Be=Object.assign(Object.assign({},mt),{selected:!0}),yn=(ae==null?void 0:ae.ctrlKey)||(ae==null?void 0:ae.metaKey),Gn=ae==null?void 0:ae.shiftKey;let Kn;Rt&&yn?(Kn=St,bn.current=De,Jn.current=Kn,Be.selectedNodes=Zt(Oe,Kn)):Rt&&Gn?(Kn=Array.from(new Set([].concat((0,ee.Z)(Jn.current||[]),(0,ee.Z)(le({treeData:Oe,expandedKeys:ni,startKey:De,endKey:bn.current}))))),Be.selectedNodes=Zt(Oe,Kn)):(Kn=[De],bn.current=De,Jn.current=Kn,Be.selectedNodes=Zt(Oe,Kn)),(At=hn.onSelect)===null||At===void 0||At.call(hn,Kn,Be),"selectedKeys"in hn||Ce(Kn)},{getPrefixCls:pn,direction:Un}=Pe.useContext(ht.E_),{prefixCls:On,className:we,showIcon:In=!0,expandAction:rn="click"}=hn,ge=Fe(hn,["prefixCls","className","showIcon","expandAction"]),oe=pn("tree",On),Ft=Bt()(`${oe}-directory`,{[`${oe}-directory-rtl`]:Un==="rtl"},we);return Pe.createElement(_t,Object.assign({icon:me,ref:Xe,blockNode:!0},ge,{showIcon:In,expandAction:rn,prefixCls:oe,className:Ft,expandedKeys:ni,selectedKeys:ui,onSelect:Tn,onExpand:gn}))};var vn=Pe.forwardRef(Qe);const xn=_t;xn.DirectoryTree=vn,xn.TreeNode=wt.O;var Se=xn},20648:function(dn,Mn,bt){"use strict";bt.d(Mn,{TM:function(){return je},Yk:function(){return xe}});var wt=bt(93083),ee=bt(98447),he=bt(17313),Ie=bt(8378),te=bt(37613),Pe=bt(83116);const Nt=new wt.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Le=(Bt,et)=>({[`.${Bt}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${et.motionDurationSlow}`}}}),ve=(Bt,et)=>({[`.${Bt}-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:'""'}}}),Xt=(Bt,et)=>{const{treeCls:nt,treeNodeCls:ht,treeNodePadding:lt,titleHeight:gt,nodeSelectedBg:yt,nodeHoverBg:Pt}=et,Tt=et.paddingXS;return{[nt]:Object.assign(Object.assign({},(0,he.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,he.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:Nt,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,he.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({},Le(Bt,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:Tt},[`${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:yt},[`${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"},ve(Bt,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`}}}}})}},fe=Bt=>{const{treeCls:et,treeNodeCls:nt,treeNodePadding:ht,directoryNodeSelectedBg:lt,directoryNodeSelectedColor:gt}=Bt;return{[`${et}${et}-directory`]:{[nt]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ht,insetInlineStart:0,transition:`background-color ${Bt.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Bt.controlItemBgHover}},"> *":{zIndex:1},[`${et}-switcher`]:{transition:`color ${Bt.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"}}}}}},xe=(Bt,et)=>{const nt=`.${Bt}`,ht=`${nt}-treenode`,lt=et.paddingXS/2,gt=(0,te.TS)(et,{treeCls:nt,treeNodeCls:ht,treeNodePadding:lt});return[Xt(Bt,gt),fe(gt)]},je=Bt=>{const{controlHeightSM:et}=Bt;return{titleHeight:et,nodeHoverBg:Bt.controlItemBgHover,nodeSelectedBg:Bt.controlItemBgActive}};Mn.ZP=(0,Pe.Z)("Tree",(Bt,et)=>{let{prefixCls:nt}=et;return[{[Bt.componentCls]:(0,ee.C2)(`${nt}-checkbox`,Bt)},xe(nt,Bt),(0,Ie.Z)(Bt)]},Bt=>{const{colorTextLightSolid:et,colorPrimary:nt}=Bt;return Object.assign(Object.assign({},je(Bt)),{directoryNodeSelectedColor:et,directoryNodeSelectedBg:nt})})},71997:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return ht}});var wt=bt(72308),ee=bt(59301),he={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"},Ie=he,te=bt(7657),Pe=function(gt,yt){return ee.createElement(te.Z,(0,wt.Z)({},gt,{ref:yt,icon:Ie}))},Nt=ee.forwardRef(Pe),Le=Nt,ve=bt(52671),Xt=bt(58617),fe=bt(15075),xe=bt(43531),je=bt(92310),Bt=bt.n(je),et=bt(92343),ht=lt=>{const{prefixCls:gt,switcherIcon:yt,treeNodeProps:Pt,showLine:Tt}=lt,{isLeaf:It,expanded:zt,loading:_t}=Pt;if(_t)return ee.createElement(Xt.Z,{className:`${gt}-switcher-loading-icon`});let se;if(Tt&&typeof Tt=="object"&&(se=Tt.showLeafIcon),It){if(!Tt)return null;if(typeof se!="boolean"&&se){const Zt=typeof se=="function"?se(Pt):se,Fe=`${gt}-switcher-line-custom-icon`;return(0,et.l$)(Zt)?(0,et.Tm)(Zt,{className:Bt()(Zt.props.className||"",Fe)}):Zt}return se?ee.createElement(ve.Z,{className:`${gt}-switcher-line-icon`}):ee.createElement("span",{className:`${gt}-switcher-leaf-line`})}const Jt=`${gt}-switcher-icon`,le=typeof yt=="function"?yt(Pt):yt;return(0,et.l$)(le)?(0,et.Tm)(le,{className:Bt()(le.props.className||"",Jt)}):le!==void 0?le:Tt?zt?ee.createElement(fe.Z,{className:`${gt}-switcher-line-icon`}):ee.createElement(xe.Z,{className:`${gt}-switcher-line-icon`}):ee.createElement(Le,{className:Jt})}},99498:function(dn,Mn,bt){(function(wt){wt(bt(89780))})(function(wt){wt.defineOption("placeholder","",function(Le,ve,Xt){var fe=Xt&&Xt!=wt.Init;if(ve&&!fe)Le.on("blur",te),Le.on("change",Pe),Le.on("swapDoc",Pe),wt.on(Le.getInputField(),"compositionupdate",Le.state.placeholderCompose=function(){Ie(Le)}),Pe(Le);else if(!ve&&fe){Le.off("blur",te),Le.off("change",Pe),Le.off("swapDoc",Pe),wt.off(Le.getInputField(),"compositionupdate",Le.state.placeholderCompose),ee(Le);var xe=Le.getWrapperElement();xe.className=xe.className.replace(" CodeMirror-empty","")}ve&&!Le.hasFocus()&&te(Le)});function ee(Le){Le.state.placeholder&&(Le.state.placeholder.parentNode.removeChild(Le.state.placeholder),Le.state.placeholder=null)}function he(Le){ee(Le);var ve=Le.state.placeholder=document.createElement("pre");ve.style.cssText="height: 0; overflow: visible",ve.style.direction=Le.getOption("direction"),ve.className="CodeMirror-placeholder CodeMirror-line-like";var Xt=Le.getOption("placeholder");typeof Xt=="string"&&(Xt=document.createTextNode(Xt)),ve.appendChild(Xt),Le.display.lineSpace.insertBefore(ve,Le.display.lineSpace.firstChild)}function Ie(Le){setTimeout(function(){var ve=!1,Xt=Le.getInputField();Xt.nodeName=="TEXTAREA"?ve=!Xt.value:Le.lineCount()==1&&(ve=!/[^\u200b]/.test(Xt.querySelector(".CodeMirror-line").textContent)),ve?he(Le):ee(Le)},20)}function te(Le){Nt(Le)&&he(Le)}function Pe(Le){var ve=Le.getWrapperElement(),Xt=Nt(Le);ve.className=ve.className.replace(" CodeMirror-empty","")+(Xt?" CodeMirror-empty":""),Xt?he(Le):ee(Le)}function Nt(Le){return Le.lineCount()===1&&Le.getLine(0)===""}})},25717:function(dn,Mn,bt){(function(wt){wt(bt(89780))})(function(wt){var ee={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},he=wt.Pos;wt.defineOption("autoCloseBrackets",!1,function(et,nt,ht){ht&&ht!=wt.Init&&(et.removeKeyMap(te),et.state.closeBrackets=null),nt&&(Pe(Ie(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(te))});function Ie(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:ee[nt]}var te={Backspace:ve,Enter:Xt};function Pe(et){for(var nt=0;nt<et.length;nt++){var ht=et.charAt(nt),lt="'"+ht+"'";te[lt]||(te[lt]=Nt(ht))}}Pe(ee.pairs+"`");function Nt(et){return function(nt){return xe(nt,et)}}function Le(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var ht=et.getModeAt(et.getCursor());return ht.closeBrackets||nt}function ve(et){var nt=Le(et);if(!nt||et.getOption("disableInput"))return wt.Pass;for(var ht=Ie(nt,"pairs"),lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return wt.Pass;var yt=je(et,lt[gt].head);if(!yt||ht.indexOf(yt)%2!=0)return wt.Pass}for(var gt=lt.length-1;gt>=0;gt--){var Pt=lt[gt].head;et.replaceRange("",he(Pt.line,Pt.ch-1),he(Pt.line,Pt.ch+1),"+delete")}}function Xt(et){var nt=Le(et),ht=nt&&Ie(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 yt=je(et,lt[gt].head);if(!yt||ht.indexOf(yt)%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 Tt=0;Tt<lt.length;Tt++){var It=lt[Tt].head.line;et.indentLine(It,null,!0),et.indentLine(It+1,null,!0)}})}function fe(et){var nt=wt.cmpPos(et.anchor,et.head)>0;return{anchor:new he(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new he(et.head.line,et.head.ch+(nt?1:-1))}}function xe(et,nt){var ht=Le(et);if(!ht||et.getOption("disableInput"))return wt.Pass;var lt=Ie(ht,"pairs"),gt=lt.indexOf(nt);if(gt==-1)return wt.Pass;for(var yt=Ie(ht,"closeBefore"),Pt=Ie(ht,"triples"),Tt=lt.charAt(gt+1)==nt,It=et.listSelections(),zt=gt%2==0,_t,se=0;se<It.length;se++){var Jt=It[se],le=Jt.head,Zt,Fe=et.getRange(le,he(le.line,le.ch+1));if(zt&&!Jt.empty())Zt="surround";else if((Tt||!zt)&&Fe==nt)Tt&&Bt(et,le)?Zt="both":Pt.indexOf(nt)>=0&&et.getRange(le,he(le.line,le.ch+3))==nt+nt+nt?Zt="skipThree":Zt="skip";else if(Tt&&le.ch>1&&Pt.indexOf(nt)>=0&&et.getRange(he(le.line,le.ch-2),le)==nt+nt){if(le.ch>2&&/\bstring/.test(et.getTokenTypeAt(he(le.line,le.ch-2))))return wt.Pass;Zt="addFour"}else if(Tt){var me=le.ch==0?" ":et.getRange(he(le.line,le.ch-1),le);if(!wt.isWordChar(Fe)&&me!=nt&&!wt.isWordChar(me))Zt="both";else return wt.Pass}else if(zt&&(Fe.length===0||/\s/.test(Fe)||yt.indexOf(Fe)>-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,Qe=gt%2?nt:lt.charAt(gt+1);et.operation(function(){if(_t=="skip")et.execCommand("goCharRight");else if(_t=="skipThree")for(var qe=0;qe<3;qe++)et.execCommand("goCharRight");else if(_t=="surround"){for(var vn=et.getSelections(),qe=0;qe<vn.length;qe++)vn[qe]=Ve+vn[qe]+Qe;et.replaceSelections(vn,"around"),vn=et.listSelections().slice();for(var qe=0;qe<vn.length;qe++)vn[qe]=fe(vn[qe]);et.setSelections(vn)}else _t=="both"?(et.replaceSelection(Ve+Qe,null),et.triggerElectric(Ve+Qe),et.execCommand("goCharLeft")):_t=="addFour"&&(et.replaceSelection(Ve+Ve+Ve+Ve,"before"),et.execCommand("goCharRight"))})}function je(et,nt){var ht=et.getRange(he(nt.line,nt.ch-1),he(nt.line,nt.ch+1));return ht.length==2?ht:null}function Bt(et,nt){var ht=et.getTokenAt(he(nt.line,nt.ch+1));return/\bstring/.test(ht.type)&&ht.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},6313:function(dn,Mn,bt){(function(wt){wt(bt(89780),bt(32855))})(function(wt){wt.defineOption("autoCloseTags",!1,function(ve,Xt,fe){if(fe!=wt.Init&&fe&&ve.removeKeyMap("autoCloseTags"),!!Xt){var xe={name:"autoCloseTags"};(typeof Xt!="object"||Xt.whenClosing!==!1)&&(xe["'/'"]=function(je){return Pe(je)}),(typeof Xt!="object"||Xt.whenOpening!==!1)&&(xe["'>'"]=function(je){return Ie(je)}),ve.addKeyMap(xe)}});var ee=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],he=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Ie(ve){if(ve.getOption("disableInput"))return wt.Pass;for(var Xt=ve.listSelections(),fe=[],xe=ve.getOption("autoCloseTags"),je=0;je<Xt.length;je++){if(!Xt[je].empty())return wt.Pass;var Bt=Xt[je].head,et=ve.getTokenAt(Bt),nt=wt.innerMode(ve.getMode(),et.state),ht=nt.state,lt=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(ht),gt=lt&<.name;if(!gt)return wt.Pass;var yt=nt.mode.configuration=="html",Pt=typeof xe=="object"&&xe.dontCloseTags||yt&&ee,Tt=typeof xe=="object"&&xe.indentTags||yt&&he;et.end>Bt.ch&&(gt=gt.slice(0,gt.length-et.end+Bt.ch));var It=gt.toLowerCase();if(!gt||et.type=="string"&&(et.end!=Bt.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&<.close||et.string.indexOf("/")==Bt.ch-et.start-1||Pt&&Nt(Pt,It)>-1||Le(ve,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ht)||[],gt,Bt,!0))return wt.Pass;var zt=typeof xe=="object"&&xe.emptyTags;if(zt&&Nt(zt,gt)>-1){fe[je]={text:"/>",newPos:wt.Pos(Bt.line,Bt.ch+2)};continue}var _t=Tt&&Nt(Tt,It)>-1;fe[je]={indent:_t,text:">"+(_t?`
|
|
|
|
|
|
`:"")+"</"+gt+">",newPos:_t?wt.Pos(Bt.line+1,0):wt.Pos(Bt.line,Bt.ch+1)}}for(var se=typeof xe=="object"&&xe.dontIndentOnAutoClose,je=Xt.length-1;je>=0;je--){var Jt=fe[je];ve.replaceRange(Jt.text,Xt[je].head,Xt[je].anchor,"+insert");var le=ve.listSelections().slice(0);le[je]={head:Jt.newPos,anchor:Jt.newPos},ve.setSelections(le),!se&&Jt.indent&&(ve.indentLine(Jt.newPos.line,null,!0),ve.indentLine(Jt.newPos.line+1,null,!0))}}function te(ve,Xt){for(var fe=ve.listSelections(),xe=[],je=Xt?"/":"</",Bt=ve.getOption("autoCloseTags"),et=typeof Bt=="object"&&Bt.dontIndentOnSlash,nt=0;nt<fe.length;nt++){if(!fe[nt].empty())return wt.Pass;var ht=fe[nt].head,lt=ve.getTokenAt(ht),gt=wt.innerMode(ve.getMode(),lt.state),yt=gt.state;if(Xt&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ht.ch-1))return wt.Pass;var Pt,Tt=gt.mode.name!="xml"&&ve.getMode().name=="htmlmixed";if(Tt&>.mode.name=="javascript")Pt=je+"script";else if(Tt&>.mode.name=="css")Pt=je+"style";else{var It=gt.mode.xmlCurrentContext&>.mode.xmlCurrentContext(yt);if(!It||It.length&&Le(ve,It,It[It.length-1],ht))return wt.Pass;Pt=je+It[It.length-1]}ve.getLine(ht.line).charAt(lt.end)!=">"&&(Pt+=">"),xe[nt]=Pt}if(ve.replaceSelections(xe),fe=ve.listSelections(),!et)for(var nt=0;nt<fe.length;nt++)(nt==fe.length-1||fe[nt].head.line<fe[nt+1].head.line)&&ve.indentLine(fe[nt].head.line)}function Pe(ve){return ve.getOption("disableInput")?wt.Pass:te(ve,!0)}wt.commands.closeTag=function(ve){return te(ve)};function Nt(ve,Xt){if(ve.indexOf)return ve.indexOf(Xt);for(var fe=0,xe=ve.length;fe<xe;++fe)if(ve[fe]==Xt)return fe;return-1}function Le(ve,Xt,fe,xe,je){if(!wt.scanForClosingTag)return!1;var Bt=Math.min(ve.lastLine()+1,xe.line+500),et=wt.scanForClosingTag(ve,xe,null,Bt);if(!et||et.tag!=fe)return!1;for(var nt=je?1:0,ht=Xt.length-1;ht>=0&&Xt[ht]==fe;ht--)++nt;xe=et.to;for(var ht=1;ht<nt;ht++){var lt=wt.scanForClosingTag(ve,xe,null,Bt);if(!lt||lt.tag!=fe)return!1;xe=lt.to}return!0}})},32855:function(dn,Mn,bt){(function(wt){wt(bt(89780))})(function(wt){"use strict";var ee=wt.Pos;function he(ht,lt){return ht.line-lt.line||ht.ch-lt.ch}var Ie="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",te=Ie+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Pe=new RegExp("<(/?)(["+Ie+"]["+te+"]*)","g");function Nt(ht,lt,gt,yt){this.line=lt,this.ch=gt,this.cm=ht,this.text=ht.getLine(lt),this.min=yt?Math.max(yt.from,ht.firstLine()):ht.firstLine(),this.max=yt?Math.min(yt.to-1,ht.lastLine()):ht.lastLine()}function Le(ht,lt){var gt=ht.cm.getTokenTypeAt(ee(ht.line,lt));return gt&&/\btag\b/.test(gt)}function ve(ht){if(!(ht.line>=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function Xt(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function fe(ht){for(;;){var lt=ht.text.indexOf(">",ht.ch);if(lt==-1){if(ve(ht))continue;return}if(!Le(ht,lt+1)){ht.ch=lt+1;continue}var gt=ht.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,yt?"selfClose":"regular"}}function xe(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(lt==-1){if(Xt(ht))continue;return}if(!Le(ht,lt+1)){ht.ch=lt;continue}Pe.lastIndex=lt,ht.ch=lt;var gt=Pe.exec(ht.text);if(gt&>.index==lt)return gt}}function je(ht){for(;;){Pe.lastIndex=ht.ch;var lt=Pe.exec(ht.text);if(!lt){if(ve(ht))continue;return}if(!Le(ht,lt.index+1)){ht.ch=lt.index+1;continue}return ht.ch=lt.index+lt[0].length,lt}}function Bt(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(lt==-1){if(Xt(ht))continue;return}if(!Le(ht,lt+1)){ht.ch=lt;continue}var gt=ht.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,yt?"selfClose":"regular"}}function et(ht,lt){for(var gt=[];;){var yt=je(ht),Pt,Tt=ht.line,It=ht.ch-(yt?yt[0].length:0);if(!yt||!(Pt=fe(ht)))return;if(Pt!="selfClose")if(yt[1]){for(var zt=gt.length-1;zt>=0;--zt)if(gt[zt]==yt[2]){gt.length=zt;break}if(zt<0&&(!lt||lt==yt[2]))return{tag:yt[2],from:ee(Tt,It),to:ee(ht.line,ht.ch)}}else gt.push(yt[2])}}function nt(ht,lt){for(var gt=[];;){var yt=Bt(ht);if(!yt)return;if(yt=="selfClose"){xe(ht);continue}var Pt=ht.line,Tt=ht.ch,It=xe(ht);if(!It)return;if(It[1])gt.push(It[2]);else{for(var zt=gt.length-1;zt>=0;--zt)if(gt[zt]==It[2]){gt.length=zt;break}if(zt<0&&(!lt||lt==It[2]))return{tag:It[2],from:ee(ht.line,ht.ch),to:ee(Pt,Tt)}}}}wt.registerHelper("fold","xml",function(ht,lt){for(var gt=new Nt(ht,lt.line,0);;){var yt=je(gt);if(!yt||gt.line!=lt.line)return;var Pt=fe(gt);if(!Pt)return;if(!yt[1]&&Pt!="selfClose"){var Tt=ee(gt.line,gt.ch),It=et(gt,yt[2]);return It&&he(It.from,Tt)>0?{from:Tt,to:It.from}:null}}}),wt.findMatchingTag=function(ht,lt,gt){var yt=new Nt(ht,lt.line,lt.ch,gt);if(!(yt.text.indexOf(">")==-1&&yt.text.indexOf("<")==-1)){var Pt=fe(yt),Tt=Pt&&ee(yt.line,yt.ch),It=Pt&&xe(yt);if(!(!Pt||!It||he(yt,lt)>0)){var zt={from:ee(yt.line,yt.ch),to:Tt,tag:It[2]};return Pt=="selfClose"?{open:zt,close:null,at:"open"}:It[1]?{open:nt(yt,It[2]),close:zt,at:"close"}:(yt=new Nt(ht,Tt.line,Tt.ch,gt),{open:zt,close:et(yt,It[2]),at:"open"})}}},wt.findEnclosingTag=function(ht,lt,gt,yt){for(var Pt=new Nt(ht,lt.line,lt.ch,gt);;){var Tt=nt(Pt,yt);if(!Tt)break;var It=new Nt(ht,lt.line,lt.ch,gt),zt=et(It,Tt.tag);if(zt)return{open:Tt,close:zt}}},wt.scanForClosingTag=function(ht,lt,gt,yt){var Pt=new Nt(ht,lt.line,lt.ch,yt?{from:0,to:yt}:null);return et(Pt,gt)}})},89780:function(dn){(function(Mn,bt){dn.exports=bt()})(this,function(){"use strict";var Mn=navigator.userAgent,bt=navigator.platform,wt=/gecko\/\d/i.test(Mn),ee=/MSIE \d/.test(Mn),he=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Mn),Ie=/Edge\/(\d+)/.exec(Mn),te=ee||he||Ie,Pe=te&&(ee?document.documentMode||6:+(Ie||he)[1]),Nt=!Ie&&/WebKit\//.test(Mn),Le=Nt&&/Qt\/\d+\.\d+/.test(Mn),ve=!Ie&&/Chrome\//.test(Mn),Xt=/Opera\//.test(Mn),fe=/Apple Computer/.test(navigator.vendor),xe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Mn),je=/PhantomJS/.test(Mn),Bt=!Ie&&/AppleWebKit/.test(Mn)&&/Mobile\/\w+/.test(Mn),et=/Android/.test(Mn),nt=Bt||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Mn),ht=Bt||/Mac/.test(bt),lt=/\bCrOS\b/.test(Mn),gt=/win/i.test(bt),yt=Xt&&Mn.match(/Version\/(\d*\.\d*)/);yt&&(yt=Number(yt[1])),yt&&yt>=15&&(Xt=!1,Nt=!0);var Pt=ht&&(Le||Xt&&(yt==null||yt<12.11)),Tt=wt||te&&Pe>=9;function It(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var zt=function(it,st){var ct=it.className,dt=It(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 Jt(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 le(it,st,ct,dt){var pt=Jt(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 Fe(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;It(st).test(ct)||(it.className+=(ct?" ":"")+st)}function Qe(it,st){for(var ct=it.split(" "),dt=0;dt<ct.length;dt++)ct[dt]&&!It(ct[dt]).test(st)&&(st+=" "+ct[dt]);return st}var qe=function(it){it.select()};Bt?qe=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:te&&(qe=function(it){try{it.select()}catch(st){}});function vn(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function xn(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 Se(it,st,ct,dt,pt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Et=dt||0,Dt=pt||0;;){var Kt=it.indexOf(" ",Et);if(Kt<0||Kt>=st)return Dt+(st-Et);Dt+=Kt-Et,Dt+=ct-Dt%ct,Et=Kt+1}}var Vt=function(){this.id=null,this.f=null,this.time=0,this.handler=vn(this.onTimeout,this)};Vt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Vt.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 Xe(it,st){for(var ct=0;ct<it.length;++ct)if(it[ct]==st)return ct;return-1}var Xn=50,Bn={toString:function(){return"CodeMirror.Pass"}},Ae={scroll:!1},hn={origin:"*mouse"},bn={origin:"+move"};function Jn(it,st,ct){for(var dt=0,pt=0;;){var Et=it.indexOf(" ",dt);Et==-1&&(Et=it.length);var Dt=Et-dt;if(Et==it.length||pt+Dt>=st)return dt+Math.min(Dt,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 ni(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 gn(){}function Tn(it,st){var ct;return Object.create?ct=Object.create(it):(gn.prototype=it,ct=new gn),st&&xn(st,ct),ct}var pn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Un(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||pn.test(it))}function On(it,st){return st?st.source.indexOf("\\w")>-1&&Un(it)?!0:st.test(it):Un(it)}function we(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var In=/[\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 rn(it){return it.charCodeAt(0)>=768&&In.test(it)}function ge(it,st,ct){for(;(ct<0?st>0:st<it.length)&&rn(it.charAt(st));)st+=ct;return st}function oe(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 Ft(it,st,ct,dt){if(!it)return dt(st,ct,"ltr",0);for(var pt=!1,Et=0;Et<it.length;++Et){var Dt=it[Et];(Dt.from<ct&&Dt.to>st||st==ct&&Dt.to==st)&&(dt(Math.max(Dt.from,st),Math.min(Dt.to,ct),Dt.level==1?"rtl":"ltr",Et),pt=!0)}pt||dt(st,ct,"ltr")}var St=null;function mt(it,st,ct){var dt;St=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:St=pt),Et.from==st&&(Et.from!=Et.to&&ct!="before"?dt=pt:St=pt)}return dt!=null?dt:St}var At=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]/,Dt=/[Lb1n]/,Kt=/[1n]/;function Ht(re,Re,ce){this.level=re,this.from=Re,this.to=ce}return function(re,Re){var ce=Re=="ltr"?"L":"R";if(re.length==0||Re=="ltr"&&!dt.test(re))return!1;for(var cn=re.length,on=[],qn=0;qn<cn;++qn)on.push(ct(re.charCodeAt(qn)));for(var li=0,yi=ce;li<cn;++li){var zi=on[li];zi=="m"?on[li]=yi:yi=zi}for(var fo=0,eo=ce;fo<cn;++fo){var bo=on[fo];bo=="1"&&eo=="r"?on[fo]="n":Et.test(bo)&&(eo=bo,bo=="r"&&(on[fo]="R"))}for(var ar=1,_i=on[0];ar<cn-1;++ar){var Mr=on[ar];Mr=="+"&&_i=="1"&&on[ar+1]=="1"?on[ar]="1":Mr==","&&_i==on[ar+1]&&(_i=="1"||_i=="n")&&(on[ar]=_i),_i=Mr}for(var _s=0;_s<cn;++_s){var za=on[_s];if(za==",")on[_s]="N";else if(za=="%"){var oa=void 0;for(oa=_s+1;oa<cn&&on[oa]=="%";++oa);for(var Xl=_s&&on[_s-1]=="!"||oa<cn&&on[oa]=="1"?"1":"N",Pl=_s;Pl<oa;++Pl)on[Pl]=Xl;_s=oa-1}}for(var Ta=0,au=ce;Ta<cn;++Ta){var ll=on[Ta];au=="L"&&ll=="1"?on[Ta]="L":Et.test(ll)&&(au=ll)}for(var Ba=0;Ba<cn;++Ba)if(pt.test(on[Ba])){var as=void 0;for(as=Ba+1;as<cn&&pt.test(on[as]);++as);for(var da=(Ba?on[Ba-1]:ce)=="L",Ya=(as<cn?on[as]:ce)=="L",ul=da==Ya?da?"L":"R":ce,eh=Ba;eh<as;++eh)on[eh]=ul;Ba=as-1}for(var ra=[],zu,xa=0;xa<cn;)if(Dt.test(on[xa])){var Sf=xa;for(++xa;xa<cn&&Dt.test(on[xa]);++xa);ra.push(new Ht(0,Sf,xa))}else{var Pu=xa,lu=ra.length,Ql=Re=="rtl"?1:0;for(++xa;xa<cn&&on[xa]!="L";++xa);for(var zs=Pu;zs<xa;)if(Kt.test(on[zs])){Pu<zs&&(ra.splice(lu,0,new Ht(1,Pu,zs)),lu+=Ql);var Xa=zs;for(++zs;zs<xa&&Kt.test(on[zs]);++zs);ra.splice(lu,0,new Ht(2,Xa,zs)),lu+=Ql,Pu=zs}else++zs;Pu<xa&&ra.splice(lu,0,new Ht(1,Pu,xa))}return Re=="ltr"&&(ra[0].level==1&&(zu=re.match(/^\s+/))&&(ra[0].from=zu[0].length,ra.unshift(new Ht(0,0,zu[0].length))),Ce(ra).level==1&&(zu=re.match(/\s+$/))&&(Ce(ra).to-=zu[0].length,ra.push(new Ht(0,cn-zu[0].length,cn)))),Re=="rtl"?ra.reverse():ra}}();function Rt(it,st){var ct=it.order;return ct==null&&(ct=it.order=At(it.text,st)),ct}var Lt=[],ae=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]||Lt).concat(ct)}};function De(it,st){return it._handlers&&it._handlers[st]||Lt}function Oe(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=Xe(pt,ct);Et>-1&&(dt[st]=pt.slice(0,Et).concat(pt.slice(Et+1)))}}}function Be(it,st){var ct=De(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 yn(it,st,ct){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),Be(it,ct||st.type,it,st),Xi(st)||st.codemirrorIgnore}function Gn(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)Xe(ct,st[dt])==-1&&ct.push(st[dt])}function Kn(it,st){return De(it,st).length>0}function Vn(it){it.prototype.on=function(st,ct){ae(this,st,ct)},it.prototype.off=function(st,ct){Oe(this,st,ct)}}function gi(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Ti(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Xi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Mo(it){gi(it),Ti(it)}function Io(it){return it.target||it.srcElement}function Oo(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 co=function(){if(te&&Pe<9)return!1;var it=Jt("div");return"draggable"in it||"dragDrop"in it}(),Do;function Qo(it){if(Do==null){var st=Jt("span","\u200B");se(it,Jt("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(Do=st.offsetWidth<=1&&st.offsetHeight>2&&!(te&&Pe<8))}var ct=Do?Jt("span","\u200B"):Jt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var Ai;function $o(it){if(Ai!=null)return Ai;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:Ai=dt.right-ct.right<3}var jo=`
|
|
|
|
|
|
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),Dt=Et.indexOf("\r");Dt!=-1?(ct.push(Et.slice(0,Dt)),st+=Dt+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=Jt("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,Jt("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 si(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=Tn(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return si("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return si("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Te(it,st){st=si(st);var ct=ts[st.name];if(!ct)return Te(it,"text/plain");var dt=ct(it,st);if(Ee.hasOwnProperty(st.name)){var pt=Ee[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 Dt in st.modeProps)dt[Dt]=st.modeProps[Dt];return dt}var Ee={};function Wt(it,st){var ct=Ee.hasOwnProperty(it)?Ee[it]:Ee[it]={};xn(st,ct)}function Ge(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 Ue(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 ue(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=Se(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Se(this.string,this.lineStart,this.tabSize):0)},qt.prototype.indentation=function(){return Se(this.string,null,this.tabSize)-(this.lineStart?Se(this.string,this.lineStart,this.tabSize):0)},qt.prototype.match=function(it,st,ct){if(typeof it=="string"){var dt=function(Dt){return ct?Dt.toLowerCase():Dt},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 ze(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 sn(it,st,ct){var dt=[],pt=st.line;return it.iter(st.line,ct.line+1,function(Et){var Dt=Et.text;pt==ct.line&&(Dt=Dt.slice(0,ct.ch)),pt==st.line&&(Dt=Dt.slice(st.ch)),dt.push(Dt),++pt}),dt}function Ln(it,st,ct){var dt=[];return it.iter(st,ct,function(pt){dt.push(pt.text)}),dt}function Nn(it,st){var ct=st-it.height;if(ct)for(var dt=it;dt;dt=dt.parent)dt.height+=ct}function ie(it){if(it.parent==null)return null;for(var st=it.parent,ct=Xe(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 Je(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 Dt=0;Dt<it.lines.length;++Dt){var Kt=it.lines[Dt],Ht=Kt.height;if(st<Ht)break;st-=Ht}return ct+Dt}function Cn(it,st){return st>=it.first&&st<it.first+it.size}function $n(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function We(it,st,ct){if(ct===void 0&&(ct=null),!(this instanceof We))return new We(it,st,ct);this.line=it,this.ch=st,this.sticky=ct}function Ye(it,st){return it.line-st.line||it.ch-st.ch}function zn(it,st){return it.sticky==st.sticky&&Ye(it,st)==0}function Zn(it){return We(it.line,it.ch)}function fi(it,st){return Ye(it,st)<0?st:it}function Hn(it,st){return Ye(it,st)<0?it:st}function ti(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function Qn(it,st){if(st.line<it.first)return We(it.first,0);var ct=it.first+it.size-1;return st.line>ct?We(ct,ze(it,ct).text.length):wi(st,ze(it,st.line).text.length)}function wi(it,st){var ct=it.ch;return ct==null||ct>st?We(it.line,st):ct<0?We(it.line,0):it}function Qi(it,st){for(var ct=[],dt=0;dt<st.length;dt++)ct[dt]=Qn(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,Ge(it.mode,st.state),ct,st.lookAhead):new _e(it,Ge(it.mode,st),ct)},_e.prototype.save=function(it){var st=it!==!1?Ge(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,Re){return pt.push(re,Re)},Et,dt);for(var Dt=ct.state,Kt=function(re){ct.baseTokens=pt;var Re=it.state.overlays[re],ce=1,cn=0;ct.state=!0,Ui(it,st.text,Re.mode,ct,function(on,qn){for(var li=ce;cn<on;){var yi=pt[ce];yi>on&&pt.splice(ce,1,on,pt[ce+1],yi),ce+=2,cn=Math.min(on,yi)}if(qn)if(Re.opaque)pt.splice(li,ce-li,on,"overlay "+qn),ce=li+2;else for(;li<ce;li+=2){var zi=pt[li+1];pt[li+1]=(zi?zi+" ":"")+"overlay "+qn}},Et),ct.state=Dt,ct.baseTokens=null,ct.baseTokenPos=1},Ht=0;Ht<it.state.overlays.length;++Ht)Kt(Ht);return{styles:pt,classes:Et.bgClass||Et.textClass?Et:null}}function Eo(it,st,ct){if(!st.styles||st.styles[0]!=it.state.modeGen){var dt=zo(it,ie(st)),pt=st.text.length>it.options.maxHighlightLength&&Ge(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 zo(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),Dt=Et>dt.first&&ze(dt,Et-1).stateAfter,Kt=Dt?_e.fromSaved(dt,Dt,Et):new _e(dt,ue(dt.mode),Et);return dt.iter(Et,st,function(Ht){Ze(it,Ht.text,Kt);var re=Kt.line;Ht.stateAfter=re==st-1||re%5==0||re>=pt.viewFrom&&re<pt.viewTo?Kt.save():null,Kt.nextLine()}),ct&&(dt.modeFrontier=Kt.line),Kt}function Ze(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();)ei(pt,Et,ct.state),Et.start=Et.pos}function jn(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ct=Ue(it,st);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function ei(it,st,ct,dt){for(var pt=0;pt<10;pt++){dt&&(dt[0]=Ue(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,Dt;st=Qn(pt,st);var Kt=ze(pt,st.line),Ht=zo(it,st.line,ct),re=new qt(Kt.text,it.options.tabSize,Ht),Re;for(dt&&(Re=[]);(dt||re.pos<st.ch)&&!re.eol();)re.start=re.pos,Dt=ei(Et,re,Ht.state),dt&&Re.push(new Mi(re,Dt,Ge(pt.mode,Ht.state)));return dt?Re:new Mi(re,Dt,Ht.state)}function mi(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,Dt){var Kt=ct.flattenSpans;Kt==null&&(Kt=it.options.flattenSpans);var Ht=0,re=null,Re=new qt(st,it.options.tabSize,dt),ce,cn=it.options.addModeClass&&[null];for(st==""&&mi(jn(ct,dt.state),Et);!Re.eol();){if(Re.pos>it.options.maxHighlightLength?(Kt=!1,Dt&&Ze(it,st,dt,Re.pos),Re.pos=st.length,ce=null):ce=mi(ei(ct,Re,dt.state,cn),Et),cn){var on=cn[0].name;on&&(ce="m-"+(ce?on+" "+ce:on))}if(!Kt||re!=ce){for(;Ht<Re.start;)Ht=Math.min(Re.start,Ht+5e3),pt(Ht,re);re=ce}Re.start=Re.pos}for(;Ht<Re.pos;){var qn=Math.min(Re.pos,Ht+5e3);pt(qn,re),Ht=qn}}function ki(it,st,ct){for(var dt,pt,Et=it.doc,Dt=ct?-1:st-(it.doc.mode.innerMode?1e3:100),Kt=st;Kt>Dt;--Kt){if(Kt<=Et.first)return Et.first;var Ht=ze(Et,Kt-1),re=Ht.stateAfter;if(re&&(!ct||Kt+(re instanceof qi?re.lookAhead:0)<=Et.modeFrontier))return Kt;var Re=Se(Ht.text,null,it.options.tabSize);(pt==null||dt>Re)&&(pt=Kt-1,dt=Re)}return pt}function Hi(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=ze(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,un=!1;function Jo(){uo=!0}function nn(){un=!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 Ho(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],Dt=Et.marker,Kt=Et.from==null||(Dt.inclusiveLeft?Et.from<=st:Et.from<st);if(Kt||Et.from==st&&Dt.type=="bookmark"&&(!ct||!Et.marker.insertLeft)){var Ht=Et.to==null||(Dt.inclusiveRight?Et.to>=st:Et.to>st);(dt||(dt=[])).push(new ho(Dt,Et.from,Ht?null:Et.to))}}return dt}function Oi(it,st,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var Et=it[pt],Dt=Et.marker,Kt=Et.to==null||(Dt.inclusiveRight?Et.to>=st:Et.to>st);if(Kt||Et.from==st&&Dt.type=="bookmark"&&(!ct||Et.marker.insertLeft)){var Ht=Et.from==null||(Dt.inclusiveLeft?Et.from<=st:Et.from<st);(dt||(dt=[])).push(new ho(Dt,Ht?null:Et.from-st,Et.to==null?null:Et.to-st))}}return dt}function Li(it,st){if(st.full)return null;var ct=Cn(it,st.from.line)&&ze(it,st.from.line).markedSpans,dt=Cn(it,st.to.line)&&ze(it,st.to.line).markedSpans;if(!ct&&!dt)return null;var pt=st.from.ch,Et=st.to.ch,Dt=Ye(st.from,st.to)==0,Kt=mr(ct,pt,Dt),Ht=Oi(dt,Et,Dt),re=st.text.length==1,Re=Ce(st.text).length+(re?pt:0);if(Kt)for(var ce=0;ce<Kt.length;++ce){var cn=Kt[ce];if(cn.to==null){var on=Er(Ht,cn.marker);on?re&&(cn.to=on.to==null?null:on.to+Re):cn.to=pt}}if(Ht)for(var qn=0;qn<Ht.length;++qn){var li=Ht[qn];if(li.to!=null&&(li.to+=Re),li.from==null){var yi=Er(Kt,li.marker);yi||(li.from=Re,re&&(Kt||(Kt=[])).push(li))}else li.from+=Re,re&&(Kt||(Kt=[])).push(li)}Kt&&(Kt=So(Kt)),Ht&&Ht!=Kt&&(Ht=So(Ht));var zi=[Kt];if(!re){var fo=st.text.length-2,eo;if(fo>0&&Kt)for(var bo=0;bo<Kt.length;++bo)Kt[bo].to==null&&(eo||(eo=[])).push(new ho(Kt[bo].marker,null,null));for(var ar=0;ar<fo;++ar)zi.push(eo);zi.push(Ht)}return zi}function So(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 ko(it,st,ct){var dt=null;if(it.iter(st.line,ct.line+1,function(on){if(on.markedSpans)for(var qn=0;qn<on.markedSpans.length;++qn){var li=on.markedSpans[qn].marker;li.readOnly&&(!dt||Xe(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 Dt=dt[Et],Kt=Dt.find(0),Ht=0;Ht<pt.length;++Ht){var re=pt[Ht];if(!(Ye(re.to,Kt.from)<0||Ye(re.from,Kt.to)>0)){var Re=[Ht,1],ce=Ye(re.from,Kt.from),cn=Ye(re.to,Kt.to);(ce<0||!Dt.inclusiveLeft&&!ce)&&Re.push({from:re.from,to:Kt.from}),(cn>0||!Dt.inclusiveRight&&!cn)&&Re.push({from:Kt.to,to:re.to}),pt.splice.apply(pt,Re),Ht+=Re.length-3}}return pt}function _n(it){var st=it.markedSpans;if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.detachLine(it);it.markedSpans=null}}function jt(it,st){if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.attachLine(it);it.markedSpans=st}}function _o(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=Ye(dt.from,pt.from)||_o(it)-_o(st);if(Et)return-Et;var Dt=Ye(dt.to,pt.to)||xr(it)-xr(st);return Dt||st.id-it.id}function cs(it,st){var ct=un&&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=un&&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 Zo(it,st,ct,dt,pt){var Et=ze(it,st),Dt=un&&Et.markedSpans;if(Dt)for(var Kt=0;Kt<Dt.length;++Kt){var Ht=Dt[Kt];if(Ht.marker.collapsed){var re=Ht.marker.find(0),Re=Ye(re.from,ct)||_o(Ht.marker)-_o(pt),ce=Ye(re.to,dt)||xr(Ht.marker)-xr(pt);if(!(Re>=0&&ce<=0||Re<=0&&ce>=0)&&(Re<=0&&(Ht.marker.inclusiveRight&&pt.inclusiveLeft?Ye(re.to,ct)>=0:Ye(re.to,ct)>0)||Re>=0&&(Ht.marker.inclusiveRight&&pt.inclusiveLeft?Ye(re.from,dt)<=0:Ye(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=ze(it,st),dt=ro(ct);return ct==dt?st:ie(dt)}function Bi(it,st){if(st>it.lastLine())return st;var ct=ze(it,st),dt;if(!En(it,ct))return st;for(;dt=no(ct);)ct=dt.find(1,!0).line;return ie(ct)+1}function En(it,st){var ct=un&&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 qo(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 Dt=0;Dt<Et.children.length;++Dt){var Kt=Et.children[Dt];if(Kt==ct)break;st+=Kt.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=ze(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,jt(this,st),this.height=ct?ct(this):1};Ur.prototype.lineNo=function(){return ie(this)},Vn(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),_n(it),jt(it,ct);var pt=dt?dt(it):1;pt!=it.height&&Nn(it,pt)}function ns(it){it.parent=null,_n(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 Ke(it,st){var ct=le("span",null,null,Nt?"padding-right: .1px":null),dt={pre:le("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,Dt=void 0;dt.pos=0,dt.addToken=mu,$o(it.display.measure)&&(Dt=Rt(Et,it.doc.direction))&&(dt.addToken=gl(dt.addToken,Dt)),dt.map=[];var Kt=st!=it.display.externalMeasured&&ie(Et);pl(Et,dt,Eo(it,Et,Kt)),Et.styleClasses&&(Et.styleClasses.bgClass&&(dt.bgClass=Qe(Et.styleClasses.bgClass,dt.bgClass||"")),Et.styleClasses.textClass&&(dt.textClass=Qe(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(Nt){var Ht=dt.content.lastChild;(/\bcm-tab\b/.test(Ht.className)||Ht.querySelector&&Ht.querySelector(".cm-tab"))&&(dt.content.className="cm-tab-wrap-hack")}return Be(it,"renderLine",it,st.line,dt.pre),dt.pre.className&&(dt.textClass=Qe(dt.pre.className,dt.textClass||"")),dt}function vs(it){var st=Jt("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,Dt){if(st){var Kt=it.splitSpaces?Ka(st,it.trailingSpace):st,Ht=it.cm.state.specialChars,re=!1,Re;if(!Ht.test(st))it.col+=st.length,Re=document.createTextNode(Kt),it.map.push(it.pos,it.pos+st.length,Re),te&&Pe<9&&(re=!0),it.pos+=st.length;else{Re=document.createDocumentFragment();for(var ce=0;;){Ht.lastIndex=ce;var cn=Ht.exec(st),on=cn?cn.index-ce:st.length-ce;if(on){var qn=document.createTextNode(Kt.slice(ce,ce+on));te&&Pe<9?Re.appendChild(Jt("span",[qn])):Re.appendChild(qn),it.map.push(it.pos,it.pos+on,qn),it.col+=on,it.pos+=on}if(!cn)break;ce+=on+1;var li=void 0;if(cn[0]==" "){var yi=it.cm.options.tabSize,zi=yi-it.col%yi;li=Re.appendChild(Jt("span",ui(zi),"cm-tab")),li.setAttribute("role","presentation"),li.setAttribute("cm-text"," "),it.col+=zi}else cn[0]=="\r"||cn[0]==`
|
|
|
`?(li=Re.appendChild(Jt("span",cn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),li.setAttribute("cm-text",cn[0]),it.col+=1):(li=it.cm.options.specialCharPlaceholder(cn[0]),li.setAttribute("cm-text",cn[0]),te&&Pe<9?Re.appendChild(Jt("span",[li])):Re.appendChild(li),it.col+=1);it.map.push(it.pos,it.pos+1,li),it.pos++}}if(it.trailingSpace=Kt.charCodeAt(st.length-1)==32,ct||dt||pt||re||Et||Dt){var fo=ct||"";dt&&(fo+=dt),pt&&(fo+=pt);var eo=Jt("span",[Re],fo,Et);if(Dt)for(var bo in Dt)Dt.hasOwnProperty(bo)&&bo!="style"&&bo!="class"&&eo.setAttribute(bo,Dt[bo]);return it.content.appendChild(eo)}it.content.appendChild(Re)}}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,Dt,Kt,Ht){pt=pt?pt+" cm-force-border":"cm-force-border";for(var re=ct.pos,Re=re+dt.length;;){for(var ce=void 0,cn=0;cn<st.length&&(ce=st[cn],!(ce.to>re&&ce.from<=re));cn++);if(ce.to>=Re)return it(ct,dt,pt,Et,Dt,Kt,Ht);it(ct,dt.slice(0,ce.to-re),pt,Et,null,Kt,Ht),Et=null,dt=dt.slice(ce.to-re),re=ce.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 Dt=1;Dt<ct.length;Dt+=2)st.addToken(st,pt.slice(Et,Et=ct[Dt]),ga(ct[Dt+1],st.cm.options));return}for(var Kt=pt.length,Ht=0,re=1,Re="",ce,cn,on=0,qn,li,yi,zi,fo;;){if(on==Ht){qn=li=yi=cn="",fo=null,zi=null,on=1/0;for(var eo=[],bo=void 0,ar=0;ar<dt.length;++ar){var _i=dt[ar],Mr=_i.marker;if(Mr.type=="bookmark"&&_i.from==Ht&&Mr.widgetNode)eo.push(Mr);else if(_i.from<=Ht&&(_i.to==null||_i.to>Ht||Mr.collapsed&&_i.to==Ht&&_i.from==Ht)){if(_i.to!=null&&_i.to!=Ht&&on>_i.to&&(on=_i.to,li=""),Mr.className&&(qn+=" "+Mr.className),Mr.css&&(cn=(cn?cn+";":"")+Mr.css),Mr.startStyle&&_i.from==Ht&&(yi+=" "+Mr.startStyle),Mr.endStyle&&_i.to==on&&(bo||(bo=[])).push(Mr.endStyle,_i.to),Mr.title&&((fo||(fo={})).title=Mr.title),Mr.attributes)for(var _s in Mr.attributes)(fo||(fo={}))[_s]=Mr.attributes[_s];Mr.collapsed&&(!zi||es(zi.marker,Mr)<0)&&(zi=_i)}else _i.from>Ht&&on>_i.from&&(on=_i.from)}if(bo)for(var za=0;za<bo.length;za+=2)bo[za+1]==on&&(li+=" "+bo[za]);if(!zi||zi.from==Ht)for(var oa=0;oa<eo.length;++oa)Xr(st,0,eo[oa]);if(zi&&(zi.from||0)==Ht){if(Xr(st,(zi.to==null?Kt+1:zi.to)-Ht,zi.marker,zi.from==null),zi.to==null)return;zi.to==Ht&&(zi=!1)}}if(Ht>=Kt)break;for(var Xl=Math.min(Kt,on);;){if(Re){var Pl=Ht+Re.length;if(!zi){var Ta=Pl>Xl?Re.slice(0,Xl-Ht):Re;st.addToken(st,Ta,ce?ce+qn:qn,yi,Ht+Ta.length==on?li:"",cn,fo)}if(Pl>=Xl){Re=Re.slice(Xl-Ht),Ht=Xl;break}Ht=Pl,yi=""}Re=pt.slice(Et,Et=ct[re++]),ce=ga(ct[re++],st.cm.options)}}}function Nu(it,st,ct){this.line=st,this.rest=ms(st),this.size=this.rest?ie(Ce(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=En(it,st)}function Hr(it,st,ct){for(var dt=[],pt,Et=st;Et<ct;Et=pt){var Dt=new Nu(it.doc,ze(it.doc,Et),Et);pt=Et+Dt.size,dt.push(Dt)}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 Uo=null;function hi(it,st){var ct=De(it,st);if(ct.length){var dt=Array.prototype.slice.call(arguments,2),pt;As?pt=As.delayedCallbacks:Uo?pt=Uo:(pt=Uo=[],setTimeout(Ns,0));for(var Et=function(Kt){pt.push(function(){return ct[Kt].apply(null,dt)})},Dt=0;Dt<ct.length;++Dt)Et(Dt)}}function Ns(){var it=Uo;Uo=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"?ii(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=Jt("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),te&&Pe<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(Jt("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):Ke(it,st)}function ii(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=Jt("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 Dt=Js(st),Kt=st.gutter=Jt("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px");if(it.display.input.setUneditable(Kt),Dt.insertBefore(Kt,st.text),st.line.gutterClass&&(Kt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Et||!Et["CodeMirror-linenumbers"])&&(st.lineNumber=Kt.appendChild(Jt("div",$n(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Et)for(var Ht=0;Ht<it.display.gutterSpecs.length;++Ht){var re=it.display.gutterSpecs[Ht].className,Re=Et.hasOwnProperty(re)&&Et[re];Re&&Kt.appendChild(Jt("div",[Re],"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=It("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(mo(it,st.line,st,ct,!0),st.rest)for(var dt=0;dt<st.rest.length;dt++)mo(it,st.rest[dt],st,ct,!1)}function mo(it,st,ct,dt,pt){if(st.widgets)for(var Et=Js(ct),Dt=0,Kt=st.widgets;Dt<Kt.length;++Dt){var Ht=Kt[Dt],re=Jt("div",[Ht.node],"CodeMirror-linewidget"+(Ht.className?" "+Ht.className:""));Ht.handleMouseEvents||re.setAttribute("cm-ignore-events","true"),Tu(Ht,re,ct,dt),it.display.input.setUneditable(re),pt&&Ht.above?Et.insertBefore(re,ct.gutter||ct.text):Et.appendChild(re),hi(Ht,"redraw")}}function Tu(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(!Fe(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,Jt("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function Da(it,st){for(var ct=Io(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,Jt("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 Xn-it.display.nativeBarWidth}function Oa(it){return it.display.scroller.clientWidth-pa(it)-it.display.barWidth}function Bu(it){return it.display.scroller.clientHeight-pa(it)-it.display.barHeight}function bh(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 Dt=st.text.firstChild.getClientRects(),Kt=0;Kt<Dt.length-1;Kt++){var Ht=Dt[Kt],re=Dt[Kt+1];Math.abs(Ht.bottom-re.bottom)>2&&Et.push((Ht.bottom+re.top)/2-ct.top)}}Et.push(ct.bottom-ct.top)}}function dh(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(ie(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=ie(st),dt=it.display.externalMeasured=new Nu(it.doc,st,ct);dt.lineN=ct;var pt=dt.built=Ke(it,dt);return dt.text=pt.pre,se(it.display.lineMeasure,pt.pre),dt}function ch(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=ie(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=dh(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||""),Dt;return st.cache.hasOwnProperty(Et)?Dt=st.cache[Et]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(bh(it,st.view,st.rect),st.hasHeights=!0),Dt=$e(it,st,ct,dt),Dt.bogus||(st.cache[Et]=Dt)),{left:Dt.left,right:Dt.right,top:pt?Dt.rtop:Dt.top,bottom:pt?Dt.rbottom:Dt.bottom}}var fh={left:0,right:0,top:0,bottom:0};function gh(it,st,ct){for(var dt,pt,Et,Dt,Kt,Ht,re=0;re<it.length;re+=3)if(Kt=it[re],Ht=it[re+1],st<Kt?(pt=0,Et=1,Dt="left"):st<Ht?(pt=st-Kt,Et=pt+1):(re==it.length-3||st==Ht&&it[re+3]>st)&&(Et=Ht-Kt,pt=Et-1,st>=Ht&&(Dt="right")),pt!=null){if(dt=it[re+2],Kt==Ht&&ct==(dt.insertLeft?"left":"right")&&(Dt=ct),ct=="left"&&pt==0)for(;re&&it[re-2]==it[re-3]&&it[re-1].insertLeft;)dt=it[(re-=3)+2],Dt="left";if(ct=="right"&&pt==Ht-Kt)for(;re<it.length-3&&it[re+3]==it[re+4]&&!it[re+5].insertLeft;)dt=it[(re+=3)+2],Dt="right";break}return{node:dt,start:pt,end:Et,collapse:Dt,coverStart:Kt,coverEnd:Ht}}function Fu(it,st){var ct=fh;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 $e(it,st,ct,dt){var pt=gh(st.map,ct,dt),Et=pt.node,Dt=pt.start,Kt=pt.end,Ht=pt.collapse,re;if(Et.nodeType==3){for(var Re=0;Re<4;Re++){for(;Dt&&rn(st.line.text.charAt(pt.coverStart+Dt));)--Dt;for(;pt.coverStart+Kt<pt.coverEnd&&rn(st.line.text.charAt(pt.coverStart+Kt));)++Kt;if(te&&Pe<9&&Dt==0&&Kt==pt.coverEnd-pt.coverStart?re=Et.parentNode.getBoundingClientRect():re=Fu(Zt(Et,Dt,Kt).getClientRects(),dt),re.left||re.right||Dt==0)break;Kt=Dt,Dt=Dt-1,Ht="right"}te&&Pe<11&&(re=Si(it.display.measure,re))}else{Dt>0&&(Ht=dt="right");var ce;it.options.lineWrapping&&(ce=Et.getClientRects()).length>1?re=ce[dt=="right"?ce.length-1:0]:re=Et.getBoundingClientRect()}if(te&&Pe<9&&!Dt&&(!re||!re.left&&!re.right)){var cn=Et.parentNode.getClientRects()[0];cn?re={left:cn.left,right:cn.left+ph(it.display),top:cn.top,bottom:cn.bottom}:re=fh}for(var on=re.top-st.rect.top,qn=re.bottom-st.rect.top,li=(on+qn)/2,yi=st.view.measure.heights,zi=0;zi<yi.length-1&&!(li<yi[zi]);zi++);var fo=zi?yi[zi-1]:0,eo=yi[zi],bo={left:(Ht=="right"?re.right:re.left)-st.rect.left,right:(Ht=="left"?re.left:re.right)-st.rect.left,top:fo,bottom:eo};return!re.left&&!re.right&&(bo.bogus=!0),it.options.singleCursorHeightPerLine||(bo.rtop=on,bo.rbottom=qn),bo}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 vo(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 xo(it){it.display.externalMeasure=null,_t(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)vo(it.display.view[st])}function Go(it){xo(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 ve&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function dr(){return ve&&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 Dt=qo(st);if(dt=="local"?Dt+=Ca(it.display):Dt-=it.display.viewOffset,dt=="page"||dt=="window"){var Kt=it.display.lineSpace.getBoundingClientRect();Dt+=Kt.top+(dt=="window"?0:dr());var Ht=Kt.left+(dt=="window"?0:ao());ct.left+=Ht,ct.right+=Ht}return ct.top+=Dt,ct.bottom+=Dt,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 Dt=it.display.lineSpace.getBoundingClientRect();return{left:dt-Dt.left,top:pt-Dt.top}}function Ws(it,st,ct,dt,pt){return dt||(dt=ze(it.doc,st.line)),Lr(it,dt,ch(it,dt,st.ch,pt),ct)}function fs(it,st,ct,dt,pt,Et){dt=dt||ze(it.doc,st.line),pt||(pt=tu(it,dt));function Dt(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 Kt=Rt(dt,it.doc.direction),Ht=st.ch,re=st.sticky;if(Ht>=dt.text.length?(Ht=dt.text.length,re="before"):Ht<=0&&(Ht=0,re="after"),!Kt)return Dt(re=="before"?Ht-1:Ht,re=="before");function Re(qn,li,yi){var zi=Kt[li],fo=zi.level==1;return Dt(yi?qn-1:qn,fo!=yi)}var ce=mt(Kt,Ht,re),cn=St,on=Re(Ht,ce,re=="before");return cn!=null&&(on.other=Re(Ht,cn,re!="before")),on}function kh(it,st){var ct=0;st=Qn(it.doc,st),it.options.lineWrapping||(ct=ph(it.display)*st.ch);var dt=ze(it.doc,st.line),pt=qo(dt)+Ca(it.display);return{left:ct,right:ct,top:pt,bottom:pt+dt.height}}function Ah(it,st,ct,dt,pt){var Et=We(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 Ah(dt.first,0,null,-1,-1);var pt=Je(dt,ct),Et=dt.first+dt.size-1;if(pt>Et)return Ah(dt.first+dt.size-1,ze(dt,Et).text.length,null,1,1);st<0&&(st=0);for(var Dt=ze(dt,pt);;){var Kt=Pn(it,Dt,pt,st,ct),Ht=$i(Dt,Kt.ch+(Kt.xRel>0||Kt.outside>0?1:0));if(!Ht)return Kt;var re=Ht.find(1);if(re.line==pt)return re;Dt=ze(dt,pt=re.line)}}function Gi(it,st,ct,dt){dt-=wr(st);var pt=st.text.length,Et=oe(function(Dt){return Za(it,ct,Dt-1).bottom<=dt},pt,0);return pt=oe(function(Dt){return Za(it,ct,Dt).top>dt},Et,pt),{begin:Et,end:pt}}function Iu(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 pe(it,st,ct,dt){return it.bottom<=ct?!1:it.top>ct?!0:(dt?it.left:it.right)>st}function Pn(it,st,ct,dt,pt){pt-=qo(st);var Et=tu(it,st),Dt=wr(st),Kt=0,Ht=st.text.length,re=!0,Re=Rt(st,it.doc.direction);if(Re){var ce=(it.options.lineWrapping?Du:Xu)(it,st,ct,Et,Re,dt,pt);re=ce.level!=1,Kt=re?ce.from:ce.to-1,Ht=re?ce.to:ce.from-1}var cn=null,on=null,qn=oe(function(ar){var _i=Za(it,Et,ar);return _i.top+=Dt,_i.bottom+=Dt,pe(_i,dt,pt,!1)?(_i.top<=pt&&_i.left<=dt&&(cn=ar,on=_i),!0):!1},Kt,Ht),li,yi,zi=!1;if(on){var fo=dt-on.left<on.right-dt,eo=fo==re;qn=cn+(eo?0:1),yi=eo?"after":"before",li=fo?on.left:on.right}else{!re&&(qn==Ht||qn==Kt)&&qn++,yi=qn==0?"after":qn==st.text.length?"before":Za(it,Et,qn-(re?1:0)).bottom+Dt<=pt==re?"after":"before";var bo=fs(it,We(ct,qn,yi),"line",st,Et);li=bo.left,zi=pt<bo.top?-1:pt>=bo.bottom?1:0}return qn=ge(st.text,qn,1),Ah(ct,qn,yi,zi,dt-li)}function Xu(it,st,ct,dt,pt,Et,Dt){var Kt=oe(function(ce){var cn=pt[ce],on=cn.level!=1;return pe(fs(it,We(ct,on?cn.to:cn.from,on?"before":"after"),"line",st,dt),Et,Dt,!0)},0,pt.length-1),Ht=pt[Kt];if(Kt>0){var re=Ht.level!=1,Re=fs(it,We(ct,re?Ht.from:Ht.to,re?"after":"before"),"line",st,dt);pe(Re,Et,Dt,!0)&&Re.top>Dt&&(Ht=pt[Kt-1])}return Ht}function Du(it,st,ct,dt,pt,Et,Dt){var Kt=Gi(it,st,dt,Dt),Ht=Kt.begin,re=Kt.end;/\s/.test(st.text.charAt(re-1))&&re--;for(var Re=null,ce=null,cn=0;cn<pt.length;cn++){var on=pt[cn];if(!(on.from>=re||on.to<=Ht)){var qn=on.level!=1,li=Za(it,dt,qn?Math.min(re,on.to)-1:Math.max(Ht,on.from)).right,yi=li<Et?Et-li+1e9:li-Et;(!Re||ce>yi)&&(Re=on,ce=yi)}}return Re||(Re=pt[pt.length-1]),Re.from<Ht&&(Re={from:Ht,to:Re.to,level:Re.level}),Re.to>re&&(Re={from:Re.from,to:re,level:Re.level}),Re}var Hl;function Qu(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Hl==null){Hl=Jt("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)Hl.appendChild(document.createTextNode("x")),Hl.appendChild(Jt("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 ph(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=Jt("span","xxxxxxxxxx"),ct=Jt("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,Dt=0;Et;Et=Et.nextSibling,++Dt){var Kt=it.display.gutterSpecs[Dt].className;ct[Kt]=Et.offsetLeft+Et.clientLeft+pt,dt[Kt]=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=Qu(it.display),ct=it.options.lineWrapping,dt=ct&&Math.max(5,it.display.scroller.clientWidth/ph(it.display)-3);return function(pt){if(En(it.doc,pt))return 0;var Et=0;if(pt.widgets)for(var Dt=0;Dt<pt.widgets.length;Dt++)pt.widgets[Dt].height&&(Et+=pt.widgets[Dt].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&&Nn(dt,pt)})}function rl(it,st,ct,dt){var pt=it.display;if(!ct&&Io(st).getAttribute("cm-not-content")=="true")return null;var Et,Dt,Kt=pt.lineSpace.getBoundingClientRect();try{Et=st.clientX-Kt.left,Dt=st.clientY-Kt.top}catch(ce){return null}var Ht=eu(it,Et,Dt),re;if(dt&&Ht.xRel>0&&(re=ze(it.doc,Ht.line).text).length==Ht.ch){var Re=Se(re,re.length,it.options.tabSize)-re.length;Ht=We(Ht.line,Math.max(0,Math.round((Et-vu(it.display).left)/ph(it.display))-Re))}return Ht}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)un&&Ji(it.doc,st)<pt.viewTo&&aa(it);else if(ct<=pt.viewFrom)un&&Bi(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 Dt=Al(it,st,st,-1);Dt?(pt.view=pt.view.slice(0,Dt.index),pt.viewTo=Dt.lineN):aa(it)}else{var Kt=Al(it,st,st,-1),Ht=Al(it,ct,ct+dt,1);Kt&&Ht?(pt.view=pt.view.slice(0,Kt.index).concat(Hr(it,Kt.lineN,Ht.lineN)).concat(pt.view.slice(Ht.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 Dt=Et.changes||(Et.changes=[]);Xe(Dt,ct)==-1&&Dt.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,Dt=it.display.view;if(!un||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var Kt=it.display.viewFrom,Ht=0;Ht<pt;Ht++)Kt+=Dt[Ht].size;if(Kt!=st){if(dt>0){if(pt==Dt.length-1)return null;Et=Kt+Dt[pt].size-st,pt++}else Et=Kt-st;st+=Et,ct+=Et}for(;Ji(it.doc,ct)!=ct;){if(pt==(dt<0?0:Dt.length-1))return null;ct+=dt*Dt[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(),Dt=0;Dt<ct.sel.ranges.length;Dt++)if(!(!st&&Dt==ct.sel.primIndex)){var Kt=ct.sel.ranges[Dt];if(!(Kt.from().line>=it.display.viewTo||Kt.to().line<it.display.viewFrom)){var Ht=Kt.empty();(Ht||it.options.showCursorWhenSelecting)&&Dr(it,Kt.head,pt),Ht||Or(it,Kt,Et)}}return dt}function Dr(it,st,ct){var dt=fs(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),pt=ct.appendChild(Jt("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(Jt("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(),Dt=vu(it.display),Kt=Dt.left,Ht=Math.max(dt.sizerWidth,Oa(it)-dt.sizer.offsetLeft)-Dt.right,re=pt.direction=="ltr";function Re(eo,bo,ar,_i){bo<0&&(bo=0),bo=Math.round(bo),_i=Math.round(_i),Et.appendChild(Jt("div",null,"CodeMirror-selected","position: absolute; left: "+eo+`px;
|
|
|
top: `+bo+"px; width: "+(ar==null?Ht-eo:ar)+`px;
|
|
|
height: `+(_i-bo)+"px"))}function ce(eo,bo,ar){var _i=ze(pt,eo),Mr=_i.text.length,_s,za;function oa(Ta,au){return Ws(it,We(eo,Ta),"div",_i,au)}function Xl(Ta,au,ll){var Ba=Iu(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=Rt(_i,pt.direction);return Ft(Pl,bo||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=bo==null&&Ta==0,eh=ar==null&&au==Mr,ra=Ba==0,zu=!Pl||Ba==Pl.length-1;if(Ya.top-da.top<=3){var xa=(re?ul:eh)&&ra,Sf=(re?eh:ul)&&zu,Pu=xa?Kt:(as?da:Ya).left,lu=Sf?Ht:(as?Ya:da).right;Re(Pu,da.top,lu-Pu,da.bottom)}else{var Ql,zs,Xa,jh;as?(Ql=re&&ul&&ra?Kt:da.left,zs=re?Ht:Xl(Ta,ll,"before"),Xa=re?Kt:Xl(au,ll,"after"),jh=re&&eh&&zu?Ht:Ya.right):(Ql=re?Xl(Ta,ll,"before"):Kt,zs=!re&&ul&&ra?Ht:da.right,Xa=!re&&eh&&zu?Kt:Ya.left,jh=re?Xl(au,ll,"after"):Ht),Re(Ql,da.top,zs-Ql,da.bottom),da.bottom<Ya.top&&Re(Kt,da.bottom,null,Ya.top),Re(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 cn=st.from(),on=st.to();if(cn.line==on.line)ce(cn.line,cn.ch,on.ch);else{var qn=ze(pt,cn.line),li=ze(pt,on.line),yi=ro(qn)==ro(li),zi=ce(cn.line,cn.ch,yi?qn.text.length+1:null).end,fo=ce(on.line,yi?0:null,on.ch).start;yi&&(zi.top<fo.top-2?(Re(zi.right,zi.top,null,zi.bottom),Re(Kt,fo.top,fo.left,fo.bottom)):Re(zi.right,zi.top,fo.left-zi.right,zi.bottom)),zi.bottom<fo.top&&Re(Kt,zi.bottom,null,fo.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||(Be(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(),Nt&&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&&(Be(it,"blur",it,st),it.state.focused=!1,zt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Ao(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,Dt=void 0,Kt=0;if(!pt.hidden){if(te&&Pe<8){var Ht=pt.node.offsetTop+pt.node.offsetHeight;Dt=Ht-ct,ct=Ht}else{var re=pt.node.getBoundingClientRect();Dt=re.bottom-re.top,!Et&&pt.text.firstChild&&(Kt=pt.text.firstChild.getBoundingClientRect().right-re.left-1)}var Re=pt.line.height-Dt;if((Re>.005||Re<-.005)&&(Nn(pt.line,Dt),Wf(pt.line),pt.rest))for(var ce=0;ce<pt.rest.length;ce++)Wf(pt.rest[ce]);if(Kt>it.display.sizerWidth){var cn=Math.ceil(Kt/ph(it.display));cn>it.display.maxLineLength&&(it.display.maxLineLength=cn,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=Je(st,dt),Dt=Je(st,pt);if(ct&&ct.ensure){var Kt=ct.ensure.from.line,Ht=ct.ensure.to.line;Kt<Et?(Et=Kt,Dt=Je(st,qo(ze(st,Kt))+it.wrapper.clientHeight)):Math.min(Ht,st.lastLine())>=Dt&&(Et=Je(st,qo(ze(st,Ht))-it.wrapper.clientHeight),Dt=Ht)}return{from:Et,to:Math.max(Dt,Et+1)}}function Kf(it,st){if(!yn(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=Jt("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?We(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ct=st.sticky=="before"?We(st.line,st.ch+1,"before"):st);for(var Et=0;Et<5;Et++){var Dt=!1,Kt=fs(it,st),Ht=!ct||ct==st?Kt:fs(it,ct);pt={left:Math.min(Kt.left,Ht.left),top:Math.min(Kt.top,Ht.top)-dt,right:Math.max(Kt.left,Ht.left),bottom:Math.max(Kt.bottom,Ht.bottom)+dt};var re=Zf(it,pt),Re=it.doc.scrollTop,ce=it.doc.scrollLeft;if(re.scrollTop!=null&&(nd(it,re.scrollTop),Math.abs(it.doc.scrollTop-Re)>1&&(Dt=!0)),re.scrollLeft!=null&&(_u(it,re.scrollLeft),Math.abs(it.doc.scrollLeft-ce)>1&&(Dt=!0)),!Dt)break}return pt}function Xd(it,st){var ct=Zf(it,st);ct.scrollTop!=null&&nd(it,ct.scrollTop),ct.scrollLeft!=null&&_u(it,ct.scrollLeft)}function Zf(it,st){var ct=it.display,dt=Qu(it.display);st.top<0&&(st.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,Et=Bu(it),Dt={};st.bottom-st.top>Et&&(st.bottom=st.top+Et);var Kt=it.doc.height+zl(ct),Ht=st.top<dt,re=st.bottom>Kt-dt;if(st.top<pt)Dt.scrollTop=Ht?0:st.top;else if(st.bottom>pt+Et){var Re=Math.min(st.top,(re?Kt:st.bottom)-Et);Re!=pt&&(Dt.scrollTop=Re)}var ce=it.options.fixedGutter?0:ct.gutters.offsetWidth,cn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-ce,on=Oa(it)-ct.gutters.offsetWidth,qn=st.right-st.left>on;return qn&&(st.right=st.left+on),st.left<10?Dt.scrollLeft=0:st.left<cn?Dt.scrollLeft=Math.max(0,st.left+ce-(qn?0:10)):st.right>on+cn-3&&(Dt.scrollLeft=st.right+(qn?0:10)-on),Dt}function Ec(it,st){st!=null&&(Ju(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function Nh(it){Ju(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)&&Ju(it),st!=null&&(it.curOp.scrollLeft=st),ct!=null&&(it.curOp.scrollTop=ct)}function Wr(it,st){Ju(it),it.curOp.scrollToPos=st}function Ju(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ct=kh(it,st.from),dt=kh(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||Ni(it,{top:st}),Uf(it,st,!0),wt&&Ni(it),kn(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 _u(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 Su(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=Jt("div",[Jt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=Jt("div",[Jt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");dt.tabIndex=pt.tabIndex=-1,it(dt),it(pt),ae(dt,"scroll",function(){dt.clientHeight&&st(dt.scrollTop,"vertical")}),ae(pt,"scroll",function(){pt.clientWidth&&st(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,te&&Pe<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&&!xe?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Vt,this.disableVert=new Vt},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 Ou=function(){};Ou.prototype.update=function(){return{bottom:0,right:0}},Ou.prototype.setScrollLeft=function(){},Ou.prototype.setScrollTop=function(){},Ou.prototype.clear=function(){};function Bh(it,st){st||(st=Su(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&&Ao(it),Lc(it,Su(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:Ou};function lf(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&zt(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),ae(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"?_u(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++)ye(st[pt]);for(var Et=0;Et<st.length;Et++)Me(st[Et]);for(var Dt=0;Dt<st.length;Dt++)He(st[Dt])}function Ut(it){var st=it.cm,ct=st.display;pi(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 Fn(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function Qt(it){it.updatedDisplay=it.mustUpdate&&Ii(it.cm,it.update)}function ye(it){var st=it.cm,ct=st.display;it.updatedDisplay&&Ao(st),it.barMeasure=Su(st),ct.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=ch(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 Me(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&_u(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&&yo(st,it.barMeasure),it.selectionChanged&&gs(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ct&&Ds(it.cm)}function He(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&&_u(st,it.scrollLeft,!0,!0),it.scrollToPos){var pt=Yd(st,Qn(dt,it.scrollToPos.from),Qn(dt,it.scrollToPos.to),it.scrollToPos.margin);Kf(st,pt)}var Et=it.maybeHiddenMarkers,Dt=it.maybeUnhiddenMarkers;if(Et)for(var Kt=0;Kt<Et.length;++Kt)Et[Kt].lines.length||Be(Et[Kt],"hide");if(Dt)for(var Ht=0;Ht<Dt.length;++Ht)Dt[Ht].lines.length&&Be(Dt[Ht],"unhide");ct.wrapper.offsetHeight&&(dt.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&Be(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function Ne(it,st){if(it.curOp)return st();yl(it);try{return st()}finally{Fh(it)}}function an(it,st){return function(){if(it.curOp)return st.apply(it,arguments);yl(it);try{return st.apply(it,arguments)}finally{Fh(it)}}}function ln(it){return function(){if(this.curOp)return it.apply(this,arguments);yl(this);try{return it.apply(this,arguments)}finally{Fh(this)}}}function en(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 kn(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,vn(Rn,it))}function Rn(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,dt=zo(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 Dt=Et.styles,Kt=Et.text.length>it.options.maxHighlightLength?Ge(st.mode,dt.state):null,Ht=lo(it,Et,dt,!0);Kt&&(dt.state=Kt),Et.styles=Ht.styles;var re=Et.styleClasses,Re=Ht.classes;Re?Et.styleClasses=Re:re&&(Et.styleClasses=null);for(var ce=!Dt||Dt.length!=Et.styles.length||re!=Re&&(!re||!Re||re.bgClass!=Re.bgClass||re.textClass!=Re.textClass),cn=0;!ce&&cn<Dt.length;++cn)ce=Dt[cn]!=Et.styles[cn];ce&&pt.push(dt.line),Et.stateAfter=dt.save(),dt.nextLine()}else Et.text.length<=it.options.maxHighlightLength&&Ze(it,Et.text,dt),Et.stateAfter=dt.line%5==0?dt.save():null,dt.nextLine();if(+new Date>ct)return kn(it,it.options.workDelay),!0}),st.highlightFrontier=dt.line,st.modeFrontier=Math.max(st.modeFrontier,dt.line),pt.length&&Ne(it,function(){for(var Et=0;Et<pt.length;Et++)vr(it,pt[Et],"text")})}}var Fn=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=[]};Fn.prototype.signal=function(it,st){Kn(it,st)&&this.events.push(arguments)},Fn.prototype.finish=function(){for(var it=0;it<this.events.length;it++)Be.apply(null,this.events[it])};function pi(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||!Fe(it.display.lineDiv,st))return null;var ct={activeElt:st};if(window.getSelection){var dt=window.getSelection();dt.anchorNode&&dt.extend&&Fe(it.display.lineDiv,dt.anchorNode)&&(ct.anchorNode=dt.anchorNode,ct.anchorOffset=dt.anchorOffset,ct.focusNode=dt.focusNode,ct.focusOffset=dt.focusOffset)}return ct}function oi(it){if(!(!it||!it.activeElt||it.activeElt==me())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Fe(document.body,it.anchorNode)&&Fe(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 Ii(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;Ri(it)&&(aa(it),st.dims=Mc(it));var pt=dt.first+dt.size,Et=Math.max(st.visible.from-it.options.viewportMargin,dt.first),Dt=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>Dt&&ct.viewTo-Dt<20&&(Dt=Math.min(pt,ct.viewTo)),un&&(Et=Ji(it.doc,Et),Dt=Bi(it.doc,Dt));var Kt=Et!=ct.viewFrom||Dt!=ct.viewTo||ct.lastWrapHeight!=st.wrapperHeight||ct.lastWrapWidth!=st.wrapperWidth;ys(it,Et,Dt),ct.viewOffset=qo(ze(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Ht=Gl(it);if(!Kt&&Ht==0&&!st.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var re=di(it);return Ht>4&&(ct.lineDiv.style.display="none"),bi(it,ct.updateLineNumbers,st.dims),Ht>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,oi(re),_t(ct.cursorDiv),_t(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,Kt&&(ct.lastWrapHeight=st.wrapperHeight,ct.lastWrapWidth=st.wrapperWidth,kn(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)-Bu(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(!Ii(it,st))break;Ao(it);var pt=Su(it);Ma(it),Bh(it,pt),yo(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 Ni(it,st){var ct=new Fn(it,st);if(Ii(it,ct)){Ao(it),ai(it,ct);var dt=Su(it);Ma(it),Bh(it,dt),yo(it,dt),ct.finish()}}function bi(it,st,ct){var dt=it.display,pt=it.options.lineNumbers,Et=dt.lineDiv,Dt=Et.firstChild;function Kt(qn){var li=qn.nextSibling;return Nt&&ht&&it.display.currentWheelTarget==qn?qn.style.display="none":qn.parentNode.removeChild(qn),li}for(var Ht=dt.view,re=dt.viewFrom,Re=0;Re<Ht.length;Re++){var ce=Ht[Re];if(!ce.hidden)if(!ce.node||ce.node.parentNode!=Et){var cn=Pa(it,ce,re,ct);Et.insertBefore(cn,Dt)}else{for(;Dt!=ce.node;)Dt=Kt(Dt);var on=pt&&st!=null&&st<=re&&ce.lineNumber;ce.changes&&(Xe(ce.changes,"gutter")>-1&&(on=!1),is(it,ce,re,ct)),on&&(_t(ce.lineNumber),ce.lineNumber.appendChild(document.createTextNode($n(it.options,re)))),Dt=ce.node.nextSibling}re+=ce.size}for(;Dt;)Dt=Kt(Dt)}function Vi(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function yo(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",Dt=0;Dt<ct.length;Dt++)if(!ct[Dt].hidden){it.options.fixedGutter&&(ct[Dt].gutter&&(ct[Dt].gutter.style.left=Et),ct[Dt].gutterBackground&&(ct[Dt].gutterBackground.style.left=Et));var Kt=ct[Dt].alignable;if(Kt)for(var Ht=0;Ht<Kt.length;Ht++)Kt[Ht].style.left=Et}it.options.fixedGutter&&(st.gutters.style.left=dt+pt+"px")}}function Ri(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ct=$n(it.options,st.first+st.size-1),dt=it.display;if(ct.length!=dt.lineNumChars){var pt=dt.measure.appendChild(Jt("div",[Jt("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Et=pt.firstChild.offsetWidth,Dt=pt.offsetWidth-Et;return dt.lineGutter.style.width="",dt.lineNumInnerWidth=Math.max(Et,dt.lineGutter.offsetWidth-Dt)+1,dt.lineNumWidth=dt.lineNumInnerWidth+Dt,dt.lineNumChars=dt.lineNumInnerWidth?ct.length:-1,dt.lineGutter.style.width=dt.lineNumWidth+"px",Vi(it.display),!0}return!1}function po(it,st){for(var ct=[],dt=!1,pt=0;pt<it.length;pt++){var Et=it[pt],Dt=null;if(typeof Et!="string"&&(Dt=Et.style,Et=Et.className),Et=="CodeMirror-linenumbers")if(st)dt=!0;else continue;ct.push({className:Et,style:Dt})}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,Dt=pt.style,Kt=st.appendChild(Jt("div",null,"CodeMirror-gutter "+Et));Dt&&(Kt.style.cssText=Dt),Et=="CodeMirror-linenumbers"&&(it.lineGutter=Kt,Kt.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=Jt("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=Jt("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=le("div",null,"CodeMirror-code"),pt.selectionDiv=Jt("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=Jt("div",null,"CodeMirror-cursors"),pt.measure=Jt("div",null,"CodeMirror-measure"),pt.lineMeasure=Jt("div",null,"CodeMirror-measure"),pt.lineSpace=le("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var Et=le("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=Jt("div",[Et],null,"position: relative"),pt.sizer=Jt("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=Jt("div",null,null,"position: absolute; height: "+Xn+"px; width: 1px;"),pt.gutters=Jt("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=Jt("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=Jt("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),te&&Pe<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!Nt&&!(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=po(dt.gutters,dt.lineNumbers),or(pt),ct.init(pt)}var Wi=0,xi=null;te?xi=-.53:wt?xi=15:ve?xi=-.7:fe&&(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 Lo(it){var st=to(it);return st.x*=xi,st.y*=xi,st}function Ko(it,st){var ct=to(st),dt=ct.x,pt=ct.y,Et=it.display,Dt=Et.scroller,Kt=Dt.scrollWidth>Dt.clientWidth,Ht=Dt.scrollHeight>Dt.clientHeight;if(dt&&Kt||pt&&Ht){if(pt&&ht&&Nt){t:for(var re=st.target,Re=Et.view;re!=Dt;re=re.parentNode)for(var ce=0;ce<Re.length;ce++)if(Re[ce].node==re){it.display.currentWheelTarget=re;break t}}if(dt&&!wt&&!Xt&&xi!=null){pt&&Ht&&nd(it,Math.max(0,Dt.scrollTop+pt*xi)),_u(it,Math.max(0,Dt.scrollLeft+dt*xi)),(!pt||pt&&Ht)&&gi(st),Et.wheelStartX=null;return}if(pt&&xi!=null){var cn=pt*xi,on=it.doc.scrollTop,qn=on+Et.wrapper.clientHeight;cn<0?on=Math.max(0,on+cn-50):qn=Math.min(it.doc.height,qn+cn+50),Ni(it,{top:on,bottom:qn})}Wi<20&&(Et.wheelStartX==null?(Et.wheelStartX=Dt.scrollLeft,Et.wheelStartY=Dt.scrollTop,Et.wheelDX=dt,Et.wheelDY=pt,setTimeout(function(){if(Et.wheelStartX!=null){var li=Dt.scrollLeft-Et.wheelStartX,yi=Dt.scrollTop-Et.wheelStartY,zi=yi&&Et.wheelDY&&yi/Et.wheelDY||li&&Et.wheelDX&&li/Et.wheelDX;Et.wheelStartX=Et.wheelStartY=null,zi&&(xi=(xi*Wi+zi)/(Wi+1),++Wi)}},200)):(Et.wheelDX+=dt,Et.wheelDY+=pt))}}var Vo=function(it,st){this.ranges=it,this.primIndex=st};Vo.prototype.primary=function(){return this.ranges[this.primIndex]},Vo.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},Vo.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new ji(Zn(this.ranges[st].anchor),Zn(this.ranges[st].head));return new Vo(it,this.primIndex)},Vo.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Vo.prototype.contains=function(it,st){st||(st=it);for(var ct=0;ct<this.ranges.length;ct++){var dt=this.ranges[ct];if(Ye(st,dt.from())>=0&&Ye(it,dt.to())<=0)return ct}return-1};var ji=function(it,st){this.anchor=it,this.head=st};ji.prototype.from=function(){return Hn(this.anchor,this.head)},ji.prototype.to=function(){return fi(this.anchor,this.head)},ji.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(cn,on){return Ye(cn.from(),on.from())}),ct=Xe(st,pt);for(var Et=1;Et<st.length;Et++){var Dt=st[Et],Kt=st[Et-1],Ht=Ye(Kt.to(),Dt.from());if(dt&&!Dt.empty()?Ht>0:Ht>=0){var re=Hn(Kt.from(),Dt.from()),Re=fi(Kt.to(),Dt.to()),ce=Kt.empty()?Dt.from()==Dt.head:Kt.from()==Kt.head;Et<=ct&&--ct,st.splice(--Et,2,new ji(ce?Re:re,ce?re:Re))}}return new Vo(st,ct)}function fr(it,st){return new Vo([new ji(it,st||it)],0)}function Qr(it){return it.text?We(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(Ye(it,st.from)<0)return it;if(Ye(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),We(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 ji(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?We(ct.line,it.ch-st.ch+ct.ch):We(ct.line+(it.line-st.line),it.ch)}function ur(it,st,ct){for(var dt=[],pt=We(it.first,0),Et=pt,Dt=0;Dt<st.length;Dt++){var Kt=st[Dt],Ht=Bs(Kt.from,pt,Et),re=Bs(Qr(Kt),pt,Et);if(pt=Kt.to,Et=re,ct=="around"){var Re=it.sel.ranges[Dt],ce=Ye(Re.head,Re.anchor)<0;dt[Dt]=new ji(ce?re:Ht,ce?Ht:re)}else dt[Dt]=new ji(Ht,Ht)}return new Vo(dt,it.sel.primIndex)}function No(it){it.doc.mode=Te(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,kn(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(fo){return ct?ct[fo]:null}function Et(fo,eo,bo){hs(fo,eo,bo,dt),hi(fo,"change",fo,st)}function Dt(fo,eo){for(var bo=[],ar=fo;ar<eo;++ar)bo.push(new Ur(re[ar],pt(ar),dt));return bo}var Kt=st.from,Ht=st.to,re=st.text,Re=ze(it,Kt.line),ce=ze(it,Ht.line),cn=Ce(re),on=pt(re.length-1),qn=Ht.line-Kt.line;if(st.full)it.insert(0,Dt(0,re.length)),it.remove(re.length,it.size-re.length);else if(Rs(it,st)){var li=Dt(0,re.length-1);Et(ce,ce.text,on),qn&&it.remove(Kt.line,qn),li.length&&it.insert(Kt.line,li)}else if(Re==ce)if(re.length==1)Et(Re,Re.text.slice(0,Kt.ch)+cn+Re.text.slice(Ht.ch),on);else{var yi=Dt(1,re.length-1);yi.push(new Ur(cn+Re.text.slice(Ht.ch),on,dt)),Et(Re,Re.text.slice(0,Kt.ch)+re[0],pt(0)),it.insert(Kt.line+1,yi)}else if(re.length==1)Et(Re,Re.text.slice(0,Kt.ch)+re[0]+ce.text.slice(Ht.ch),pt(0)),it.remove(Kt.line+1,qn);else{Et(Re,Re.text.slice(0,Kt.ch)+re[0],pt(0)),Et(ce,cn+ce.text.slice(Ht.ch),on);var zi=Dt(1,re.length-1);qn>1&&it.remove(Kt.line+1,qn-1),it.insert(Kt.line+1,zi)}hi(it,"change",it,st)}function ia(it,st,ct){function dt(pt,Et,Dt){if(pt.linked)for(var Kt=0;Kt<pt.linked.length;++Kt){var Ht=pt.linked[Kt];if(Ht.doc!=Et){var re=Dt&&Ht.sharedHist;ct&&!re||(st(Ht.doc,re),dt(Ht.doc,pt,re))}}}dt(it,null,!0)}function Yo(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,To(it),No(it),Ro(it),it.options.lineWrapping||Ir(it),it.options.mode=st.modeOption,Ps(it)}function Ro(it){(it.doc.direction=="rtl"?Ve:zt)(it.display.lineDiv,"CodeMirror-rtl")}function Xo(it){Ne(it,function(){Ro(it),Ps(it)})}function wo(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:Zn(st.from),to:Qr(st),text:sn(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 Po(it){for(;it.length;){var st=Ce(it);if(st.ranges)it.pop();else break}}function rr(it,st){if(st)return Po(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,Dt,Kt;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)=="*"))&&(Dt=rr(pt,pt.lastOp==dt)))Kt=Ce(Dt.changes),Ye(st.from,st.to)==0&&Ye(st.from,Kt.to)==0?Kt.to=Qr(st):Dt.changes.push(Kr(it,st));else{var Ht=Ce(pt.done);for((!Ht||!Ht.ranges)&&la(it.sel,pt.done),Dt={changes:[Kr(it,st)],generation:pt.generation},pt.done.push(Dt);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,Kt||Be(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&&Po(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(Dt){Dt.markedSpans&&((pt||(pt=st["spans_"+it.id]={}))[Et]=Dt.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],Dt=dt[pt];if(Et&&Dt)t:for(var Kt=0;Kt<Dt.length;++Kt){for(var Ht=Dt[Kt],re=0;re<Et.length;++re)if(Et[re].marker==Ht.marker)continue t;Et.push(Ht)}else Dt&&(ct[pt]=Dt)}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?Vo.prototype.deepCopy.call(Et):Et);continue}var Dt=Et.changes,Kt=[];dt.push({changes:Kt});for(var Ht=0;Ht<Dt.length;++Ht){var re=Dt[Ht],Re=void 0;if(Kt.push({from:re.from,to:re.to,text:re.text}),st)for(var ce in re)(Re=ce.match(/^spans_(\d+)$/))&&Xe(st,Number(Re[1]))>-1&&(Ce(Kt)[ce]=re[ce],delete re[ce])}}return dt}function qu(it,st,ct,dt){if(dt){var pt=it.anchor;if(ct){var Et=Ye(st,pt)<0;Et!=Ye(ct,pt)<0?(pt=st,st=ct):Et!=Ye(st,ct)<0&&(st=ct)}return new ji(pt,st)}else return new ji(ct||st,st)}function _r(it,st,ct,dt,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Ss(it,new Vo([qu(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]=qu(it.sel.ranges[Et],st[Et],null,pt);var Dt=sr(it.cm,dt,it.sel.primIndex);Ss(it,Dt,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 ji(Qn(it,pt[Et].anchor),Qn(it,pt[Et].head))},origin:ct&&ct.origin};return Be(it,"beforeSelectionChange",it,dt),it.cm&&Be(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){(Kn(it,"beforeSelectionChange")||it.cm&&Kn(it.cm,"beforeSelectionChange"))&&(st=va(it,st,ct));var dt=ct&&ct.bias||(Ye(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,Gn(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 Dt=st.ranges[Et],Kt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Et],Ht=iu(it,Dt.anchor,Kt&&Kt.anchor,ct,dt),re=iu(it,Dt.head,Kt&&Kt.head,ct,dt);(pt||Ht!=Dt.anchor||re!=Dt.head)&&(pt||(pt=st.ranges.slice(0,Et)),pt[Et]=new ji(Ht,re))}return pt?sr(it.cm,pt,st.primIndex):st}function nu(it,st,ct,dt,pt){var Et=ze(it,st.line);if(Et.markedSpans)for(var Dt=0;Dt<Et.markedSpans.length;++Dt){var Kt=Et.markedSpans[Dt],Ht=Kt.marker,re="selectLeft"in Ht?!Ht.selectLeft:Ht.inclusiveLeft,Re="selectRight"in Ht?!Ht.selectRight:Ht.inclusiveRight;if((Kt.from==null||(re?Kt.from<=st.ch:Kt.from<st.ch))&&(Kt.to==null||(Re?Kt.to>=st.ch:Kt.to>st.ch))){if(pt&&(Be(Ht,"beforeCursorEnter"),Ht.explicitlyCleared))if(Et.markedSpans){--Dt;continue}else break;if(!Ht.atomic)continue;if(ct){var ce=Ht.find(dt<0?1:-1),cn=void 0;if((dt<0?Re:re)&&(ce=Kl(it,ce,-dt,ce&&ce.line==st.line?Et:null)),ce&&ce.line==st.line&&(cn=Ye(ce,ct))&&(dt<0?cn<0:cn>0))return nu(it,ce,st,dt,pt)}var on=Ht.find(dt<0?-1:1);return(dt<0?re:Re)&&(on=Kl(it,on,dt,on.line==st.line?Et:null)),on?nu(it,on,st,dt,pt):null}}return st}function iu(it,st,ct,dt,pt){var Et=dt||1,Dt=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 Dt||(it.cantEdit=!0,We(it.first,0))}function Kl(it,st,ct,dt){return ct<0&&st.ch==0?st.line>it.first?Qn(it,We(st.line-1)):null:ct>0&&st.ch==(dt||ze(it,st.line)).text.length?st.line<it.first+it.size-1?We(st.line+1,0):null:new We(st.line,st.ch+ct)}function $r(it){it.setSelection(We(it.firstLine(),0),We(it.lastLine()),Ae)}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,Dt,Kt){pt&&(dt.from=Qn(it,pt)),Et&&(dt.to=Qn(it,Et)),Dt&&(dt.text=Dt),Kt!==void 0&&(dt.origin=Kt)}),Be(it,"beforeChange",it,dt),it.cm&&Be(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 an(it.cm,Zs)(it,st,ct);if(it.cm.state.suppressEdits)return}if(!((Kn(it,"beforeChange")||it.cm&&Kn(it.cm,"beforeChange"))&&(st=ka(it,st,!0),!st))){var dt=uo&&!ct&&ko(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]==""&&Ye(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&&Xe(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,Dt=it.sel,Kt=st=="undo"?pt.done:pt.undone,Ht=st=="undo"?pt.undone:pt.done,re=0;re<Kt.length&&(Et=Kt[re],!(ct?Et.ranges&&!Et.equals(it.sel):!Et.ranges));re++);if(re!=Kt.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(Et=Kt.pop(),Et.ranges){if(la(Et,Ht),ct&&!Et.equals(it.sel)){Ss(it,Et,{clearRedo:!1});return}Dt=Et}else if(dt){Kt.push(Et);return}else break;var Re=[];la(Dt,Ht),Ht.push({changes:Re,generation:pt.generation}),pt.generation=Et.generation||++pt.maxGeneration;for(var ce=Kn(it,"beforeChange")||it.cm&&Kn(it.cm,"beforeChange"),cn=function(li){var yi=Et.changes[li];if(yi.origin=st,ce&&!ka(it,yi,!1))return Kt.length=0,{};Re.push(Kr(it,yi));var zi=li?Os(it,yi):Ce(Kt);ou(it,yi,zi,ta(it,yi)),!li&&it.cm&&it.cm.scrollIntoView({from:yi.from,to:Qr(yi)});var fo=[];ia(it,function(eo,bo){!bo&&Xe(fo,eo.history)==-1&&(Ms(eo.history,yi),fo.push(eo.history)),ou(eo,yi,null,ta(eo,yi))})},on=Et.changes.length-1;on>=0;--on){var qn=cn(on);if(qn)return qn.v}}}}function mh(it,st){if(st!=0&&(it.first+=st,it.sel=new Vo(ni(it.sel.ranges,function(pt){return new ji(We(pt.anchor.line+st,pt.anchor.ch),We(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 an(it.cm,ou)(it,st,ct,dt);if(st.to.line<it.first){mh(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);mh(it,pt),st={from:We(it.first,0),to:We(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:We(Et,ze(it,Et).text.length),text:[st.text[0]],origin:st.origin}),st.removed=sn(it,st.from,st.to),ct||(ct=Os(it,st)),it.cm?Ru(it.cm,st,dt):Cs(it,st,dt),ya(it,ct,Ae),it.cantEdit&&iu(it,We(it.firstLine(),0))&&(it.cantEdit=!1)}}function Ru(it,st,ct){var dt=it.doc,pt=it.display,Et=st.from,Dt=st.to,Kt=!1,Ht=Et.line;it.options.lineWrapping||(Ht=ie(ro(ze(dt,Et.line))),dt.iter(Ht,Dt.line+1,function(on){if(on==pt.maxLine)return Kt=!0,!0})),dt.sel.contains(st.from,st.to)>-1&&Gn(it),Cs(dt,st,ct,Ks(it)),it.options.lineWrapping||(dt.iter(Ht,Et.line+st.text.length,function(on){var qn=jr(on);qn>pt.maxLineLength&&(pt.maxLine=on,pt.maxLineLength=qn,pt.maxLineChanged=!0,Kt=!1)}),Kt&&(it.curOp.updateMaxLine=!0)),Hi(dt,Et.line),kn(it,400);var re=st.text.length-(Dt.line-Et.line)-1;st.full?Ps(it):Et.line==Dt.line&&st.text.length==1&&!Rs(it.doc,st)?vr(it,Et.line,"text"):Ps(it,Et.line,Dt.line+1,re);var Re=Kn(it,"changes"),ce=Kn(it,"change");if(ce||Re){var cn={from:Et,to:Dt,text:st.text,removed:st.removed,origin:st.origin};ce&&hi(it,"change",it,cn),Re&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(cn)}it.display.selForContextMenu=null}function $u(it,st,ct,dt,pt){var Et;dt||(dt=ct),Ye(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],Dt=!0;if(Et.ranges){Et.copied||(Et=it[pt]=Et.deepCopy(),Et.copied=!0);for(var Kt=0;Kt<Et.ranges.length;Kt++)Tl(Et.ranges[Kt].anchor,st,ct,dt),Tl(Et.ranges[Kt].head,st,ct,dt);continue}for(var Ht=0;Ht<Et.changes.length;++Ht){var re=Et.changes[Ht];if(ct<re.from.line)re.from=We(re.from.line+dt,re.from.ch),re.to=We(re.to.line+dt,re.to.ch);else if(st<=re.to.line){Dt=!1;break}}Dt||(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=ze(it,ti(it,st)):pt=ie(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),Dt=dt.height;if(dt.removeInner(it,Et),this.height-=Dt-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 Kt=[];this.collapse(Kt),this.children=[new Es(Kt)],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 Dt=pt.lines.length%25+25,Kt=Dt;Kt<pt.lines.length;){var Ht=new Es(pt.lines.slice(Kt,Kt+=25));pt.height-=Ht.height,this.children.splice(++dt,0,Ht),Ht.parent=this}pt.lines=pt.lines.slice(0,Dt),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=Xe(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 Dt=Math.min(st,Et-it);if(pt.iterN(it,Dt,ct))return!0;if((st-=Dt)==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=ie(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);Nn(ct,Math.max(0,ct.height-Et)),it&&(Ne(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&&(En(this.doc,dt)||Nn(dt,dt.height+pt),ct&&Ne(ct,function(){ct.curOp.forceUpdate=!0,xl(ct,dt,pt),hi(ct,"lineWidgetChanged",ct,it,ie(dt))}))},Vn(Sa);function xl(it,st,ct){qo(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&Ec(it,ct)}function xu(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(Dt){var Kt=Dt.widgets||(Dt.widgets=[]);if(pt.insertAt==null?Kt.push(pt):Kt.splice(Math.min(Kt.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Dt,Et&&!En(it,Dt)){var Ht=qo(Dt)<it.scrollTop;Nn(Dt,Dt.height+Ia(pt)),Ht&&Ec(Et,pt.height),Et.curOp.forceUpdate=!0}return!0}),Et&&hi(Et,"lineWidgetAdded",Et,pt,typeof st=="number"?st:ie(st)),pt}var uf=0,be=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++uf};be.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&yl(it),Kn(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 Dt=this.lines[Et],Kt=Er(Dt.markedSpans,this);it&&!this.collapsed?vr(it,ie(Dt),"text"):it&&(Kt.to!=null&&(pt=ie(Dt)),Kt.from!=null&&(dt=ie(Dt))),Dt.markedSpans=Ho(Dt.markedSpans,Kt),Kt.from==null&&this.collapsed&&!En(this.doc,Dt)&&it&&Nn(Dt,Qu(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Ht=0;Ht<this.lines.length;++Ht){var re=ro(this.lines[Ht]),Re=jr(re);Re>it.display.maxLineLength&&(it.display.maxLine=re,it.display.maxLineLength=Re,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()}},be.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],Dt=Er(Et.markedSpans,this);if(Dt.from!=null&&(ct=We(st?Et:ie(Et),Dt.from),it==-1))return ct;if(Dt.to!=null&&(dt=We(st?Et:ie(Et),Dt.to),it==1))return dt}return ct&&{from:ct,to:dt}},be.prototype.changed=function(){var it=this,st=this.find(-1,!0),ct=this,dt=this.doc.cm;!st||!dt||Ne(dt,function(){var pt=st.line,Et=ie(st.line),Dt=yu(dt,Et);if(Dt&&(vo(Dt),dt.curOp.selectionChanged=dt.curOp.forceUpdate=!0),dt.curOp.updateMaxLine=!0,!En(ct.doc,pt)&&ct.height!=null){var Kt=ct.height;ct.height=null;var Ht=Ia(ct)-Kt;Ht&&Nn(pt,pt.height+Ht)}hi(dt,"markerChanged",dt,it)})},be.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||Xe(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},be.prototype.detachLine=function(it){if(this.lines.splice(Xe(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},Vn(be);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 an(it.cm,Ih)(it,st,ct,dt,pt);var Et=new be(it,pt),Dt=Ye(st,ct);if(dt&&xn(dt,Et,!1),Dt>0||Dt==0&&Et.clearWhenEmpty!==!1)return Et;if(Et.replacedWith&&(Et.collapsed=!0,Et.widgetNode=le("span",[Et.replacedWith],"CodeMirror-widget"),dt.handleMouseEvents||Et.widgetNode.setAttribute("cm-ignore-events","true"),dt.insertLeft&&(Et.widgetNode.insertLeft=!0)),Et.collapsed){if(Zo(it,st.line,st,ct,Et)||st.line!=ct.line&&Zo(it,ct.line,st,ct,Et))throw new Error("Inserting collapsed marker partially overlapping an existing one");nn()}Et.addToHistory&&Nr(it,{from:st,to:ct,origin:"markText"},it.sel,NaN);var Kt=st.line,Ht=it.cm,re;if(it.iter(Kt,ct.line+1,function(ce){Ht&&Et.collapsed&&!Ht.options.lineWrapping&&ro(ce)==Ht.display.maxLine&&(re=!0),Et.collapsed&&Kt!=st.line&&Nn(ce,0),Fr(ce,new ho(Et,Kt==st.line?st.ch:null,Kt==ct.line?ct.ch:null)),++Kt}),Et.collapsed&&it.iter(st.line,ct.line+1,function(ce){En(it,ce)&&Nn(ce,0)}),Et.clearOnEnter&&ae(Et,"beforeCursorEnter",function(){return Et.clear()}),Et.readOnly&&(Jo(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Et.collapsed&&(Et.id=++uf,Et.atomic=!0),Ht){if(re&&(Ht.curOp.updateMaxLine=!0),Et.collapsed)Ps(Ht,st.line,ct.line+1);else if(Et.className||Et.startStyle||Et.endStyle||Et.css||Et.attributes||Et.title)for(var Re=st.line;Re<=ct.line;Re++)vr(Ht,Re,"text");Et.atomic&&Wl(Ht.doc),hi(Ht,"markerAdded",Ht,Et)}return Et}var th=function(it,st){this.markers=it,this.primary=st;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};th.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")}},th.prototype.find=function(it,st){return this.primary.find(it,st)},Vn(th);function hf(it,st,ct,dt,pt){dt=xn(dt),dt.shared=!1;var Et=[Ih(it,st,ct,dt,pt)],Dt=Et[0],Kt=dt.widgetNode;return ia(it,function(Ht){Kt&&(dt.widgetNode=Kt.cloneNode(!0)),Et.push(Ih(Ht,Qn(Ht,st),Qn(Ht,ct),dt,pt));for(var re=0;re<Ht.linked.length;++re)if(Ht.linked[re].isParent)return;Dt=Ce(Et)}),new th(Et,Dt)}function Sd(it){return it.findMarks(We(it.first,0),it.clipPos(We(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),Dt=it.clipPos(pt.to);if(Ye(Et,Dt)){var Kt=Ih(it,Et,Dt,dt.primary,dt.primary.type);dt.markers.push(Kt),Kt.parent=dt}}}function bc(it){for(var st=function(dt){var pt=it[dt],Et=[pt.primary.doc];ia(pt.primary.doc,function(Ht){return Et.push(Ht)});for(var Dt=0;Dt<pt.markers.length;Dt++){var Kt=pt.markers[Dt];Xe(Et,Kt.doc)==-1&&(Kt.parent=null,pt.markers.splice(Dt--,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=We(ct,0);this.sel=fr(Et),this.history=new wo(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),Ae)};Aa.prototype=Tn(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=Ln(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:en(function(it){var st=We(this.first,0),ct=this.first+this.size-1;Zs(this,{from:st,to:We(ct,ze(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&ed(this.cm,0,0),Ss(this,fr(st),Ae)}),replaceRange:function(it,st,ct,dt){st=Qn(this,st),ct=ct?Qn(this,ct):st,$u(this,it,st,ct,dt)},getRange:function(it,st,ct){var dt=sn(this,Qn(this,it),Qn(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(Cn(this,it))return ze(this,it)},getLineNumber:function(it){return ie(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=ze(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 Qn(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:en(function(it,st,ct){Qs(this,Qn(this,typeof it=="number"?We(it,st||0):it),null,ct)}),setSelection:en(function(it,st,ct){Qs(this,Qn(this,it),Qn(this,st||it),ct)}),extendSelection:en(function(it,st,ct){_r(this,Qn(this,it),st&&Qn(this,st),ct)}),extendSelections:en(function(it,st){ss(this,Qi(this,it),st)}),extendSelectionsBy:en(function(it,st){var ct=ni(this.sel.ranges,it);ss(this,Qi(this,ct),st)}),setSelections:en(function(it,st,ct){if(it.length){for(var dt=[],pt=0;pt<it.length;pt++)dt[pt]=new ji(Qn(this,it[pt].anchor),Qn(this,it[pt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Ss(this,sr(this.cm,dt,st),ct)}}),addSelection:en(function(it,st,ct){var dt=this.sel.ranges.slice(0);dt.push(new ji(Qn(this,it),Qn(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=sn(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=sn(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:en(function(it,st,ct){for(var dt=[],pt=this.sel,Et=0;Et<pt.ranges.length;Et++){var Dt=pt.ranges[Et];dt[Et]={from:Dt.from(),to:Dt.to(),text:this.splitLines(it[Et]),origin:ct}}for(var Kt=st&&st!="end"&&ur(this,dt,st),Ht=dt.length-1;Ht>=0;Ht--)Zs(this,dt[Ht]);Kt?Cr(this,Kt):this.cm&&Nh(this.cm)}),undo:en(function(){Zl(this,"undo")}),redo:en(function(){Zl(this,"redo")}),undoSelection:en(function(){Zl(this,"undo",!0)}),redoSelection:en(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 wo(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 wo(this.history.maxGeneration);st.done=ma(it.done.slice(0),null,!0),st.undone=ma(it.undone.slice(0),null,!0)},setGutterMarker:en(function(it,st,ct){return ua(this,it,"gutter",function(dt){var pt=dt.gutterMarkers||(dt.gutterMarkers={});return pt[st]=ct,!ct&&we(pt)&&(dt.gutterMarkers=null),!0})}),clearGutter:en(function(it){var st=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&ua(st,ct,"gutter",function(){return ct.gutterMarkers[it]=null,we(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!Cn(this,it)||(st=it,it=ze(this,it),!it))return null}else if(st=ie(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:en(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(It(ct).test(dt[pt]))return!1;dt[pt]+=" "+ct}return!0})}),removeLineClass:en(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 Dt=Et.match(It(ct));if(!Dt)return!1;var Kt=Dt.index+Dt[0].length;dt[pt]=Et.slice(0,Dt.index)+(!Dt.index||Kt==Et.length?"":" ")+Et.slice(Kt)||null}else return!1;return!0})}),addLineWidget:en(function(it,st,ct){return xu(this,it,st,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ct){return Ih(this,Qn(this,it),Qn(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=Qn(this,it),Ih(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=Qn(this,it);var st=[],ct=ze(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=Qn(this,it),st=Qn(this,st);var dt=[],pt=it.line;return this.iter(it.line,st.line+1,function(Et){var Dt=Et.markedSpans;if(Dt)for(var Kt=0;Kt<Dt.length;Kt++){var Ht=Dt[Kt];!(Ht.to!=null&&pt==it.line&&it.ch>=Ht.to||Ht.from==null&&pt!=it.line||Ht.from!=null&&pt==st.line&&Ht.from>=st.ch)&&(!ct||ct(Ht.marker))&&dt.push(Ht.marker.parent||Ht.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}),Qn(this,We(ct,st))},indexFromPos:function(it){it=Qn(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(Ln(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(Ln(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 wo(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):jo(it)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:en(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&Xo(this.cm))})}),Aa.prototype.eachLine=Aa.prototype.iter;var Qd=0;function kc(it){var st=this;if(Yf(st),!(yn(st,it)||Da(st.display,it))){gi(it),te&&(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),Dt=0,Kt=function(){++Dt==pt&&an(st,function(){ct=Qn(st.doc,ct);var on={from:ct,to:ct,text:st.doc.splitLines(Et.filter(function(qn){return qn!=null}).join(st.doc.lineSeparator())),origin:"paste"};Zs(st.doc,on),Cr(st.doc,fr(Qn(st.doc,ct),Qn(st.doc,Qr(on))))})()},Ht=function(on,qn){if(st.options.allowDropFileTypes&&Xe(st.options.allowDropFileTypes,on.type)==-1){Kt();return}var li=new FileReader;li.onerror=function(){return Kt()},li.onload=function(){var yi=li.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(yi)){Kt();return}Et[qn]=yi,Kt()},li.readAsText(on)},re=0;re<dt.length;re++)Ht(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 Re=it.dataTransfer.getData("Text");if(Re){var ce;if(st.state.draggingText&&!st.state.draggingText.copy&&(ce=st.listSelections()),ya(st.doc,fr(ct,ct)),ce)for(var cn=0;cn<ce.length;++cn)$u(st.doc,"",ce[cn].anchor,ce[cn].head,"drag");st.replaceSelection(Re,"around","paste"),st.display.input.focus()}}catch(on){}}}}function Jd(it,st){if(te&&(!it.state.draggingText||+new Date-Qd<100)){Mo(st);return}if(!(yn(it,st)||Da(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!fe)){var ct=Jt("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Xt&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),st.dataTransfer.setDragImage(ct,0,0),Xt&&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=Jt("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;ae(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,cf(ff)},100))}),ae(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 ju={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++)ju[Dh+48]=ju[Dh+96]=String(Dh);for(var wd=65;wd<=90;wd++)ju[wd]=String.fromCharCode(wd);for(var od=1;od<=12;od++)ju[od+111]=ju[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,Dt=0;Dt<st.length-1;Dt++){var Kt=st[Dt];if(/^(cmd|meta|m)$/i.test(Kt))Et=!0;else if(/^a(lt)?$/i.test(Kt))ct=!0;else if(/^(c|ctrl|control)$/i.test(Kt))dt=!0;else if(/^s(hift)?$/i.test(Kt))pt=!0;else throw new Error("Unrecognized modifier name: "+Kt)}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=ni(ct.split(" "),Nc),Et=0;Et<pt.length;Et++){var Dt=void 0,Kt=void 0;Et==pt.length-1?(Kt=pt.join(" "),Dt=dt):(Kt=pt.slice(0,Et+1).join(" "),Dt="...");var Ht=st[Kt];if(!Ht)st[Kt]=Dt;else if(Ht!=Dt)throw new Error("Inconsistent bindings for "+Kt)}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 Dt=Vl(it,st.fallthrough[Et],ct,dt);if(Dt)return Dt}}}function Pd(it){var st=typeof it=="string"?it:ju[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(Xt&&it.keyCode==34&&it.char)return!1;var ct=ju[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&&Ye(Et.from,Ce(dt).to)<=0;){var Dt=dt.pop();if(Ye(Dt.from,Et.from)<0){Et.from=Dt.from;break}}dt.push(Et)}Ne(it,function(){for(var Kt=dt.length-1;Kt>=0;Kt--)$u(it.doc,"",dt[Kt].from,dt[Kt].to,"+delete");Nh(it)})}function Ic(it,st,ct){var dt=ge(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 We(st.line,dt,ct<0?"after":"before")}function qr(it,st,ct,dt,pt){if(it){st.doc.direction=="rtl"&&(pt=-pt);var Et=Rt(ct,st.doc.direction);if(Et){var Dt=pt<0?Ce(Et):Et[0],Kt=pt<0==(Dt.level==1),Ht=Kt?"after":"before",re;if(Dt.level>0||st.doc.direction=="rtl"){var Re=tu(st,ct);re=pt<0?ct.text.length-1:0;var ce=Za(st,Re,re).top;re=oe(function(cn){return Za(st,Re,cn).top==ce},pt<0==(Dt.level==1)?Dt.from:Dt.to-1,re),Ht=="before"&&(re=Ic(ct,re,1))}else re=pt<0?Dt.to:Dt.from;return new We(dt,re,Ht)}}return new We(dt,pt<0?ct.text.length:0,pt<0?"before":"after")}function Fs(it,st,ct,dt){var pt=Rt(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=mt(pt,ct.ch,ct.sticky),Dt=pt[Et];if(it.doc.direction=="ltr"&&Dt.level%2==0&&(dt>0?Dt.to>ct.ch:Dt.from<ct.ch))return ha(st,ct,dt);var Kt=function(zi,fo){return Ic(st,zi instanceof We?zi.ch:zi,fo)},Ht,re=function(zi){return it.options.lineWrapping?(Ht=Ht||tu(it,st),Iu(it,st,Ht,zi)):{begin:0,end:st.text.length}},Re=re(ct.sticky=="before"?Kt(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Dt.level==1){var ce=Dt.level==1==dt<0,cn=Kt(ct,ce?1:-1);if(cn!=null&&(ce?cn<=Dt.to&&cn<=Re.end:cn>=Dt.from&&cn>=Re.begin)){var on=ce?"before":"after";return new We(ct.line,cn,on)}}var qn=function(zi,fo,eo){for(var bo=function(_s,za){return za?new We(ct.line,Kt(_s,1),"before"):new We(ct.line,_s,"after")};zi>=0&&zi<pt.length;zi+=fo){var ar=pt[zi],_i=fo>0==(ar.level!=1),Mr=_i?eo.begin:Kt(eo.end,-1);if(ar.from<=Mr&&Mr<ar.to||(Mr=_i?ar.from:Kt(ar.to,-1),eo.begin<=Mr&&Mr<eo.end))return bo(Mr,_i)}},li=qn(Et+dt,dt,Re);if(li)return li;var yi=dt>0?Re.end:Kt(Re.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"),Ae)},killLine:function(it){return al(it,function(st){if(st.empty()){var ct=ze(it.doc,st.head.line).text.length;return st.head.ch==ct&&st.head.line<it.lastLine()?{from:st.head,to:We(st.head.line+1,0)}:{from:st.head,to:We(st.head.line,ct)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return al(it,function(st){return{from:We(st.from().line,0),to:Qn(it.doc,We(st.to().line+1,0))}})},delLineLeft:function(it){return al(it,function(st){return{from:We(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(We(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(We(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")},bn)},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")},bn)},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},bn)},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(),Dt=Se(it.getLine(Et.line),Et.ch,dt);st.push(ui(dt-Dt%dt))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Ne(it,function(){for(var st=it.listSelections(),ct=[],dt=0;dt<st.length;dt++)if(st[dt].empty()){var pt=st[dt].head,Et=ze(it.doc,pt.line).text;if(Et){if(pt.ch==Et.length&&(pt=new We(pt.line,pt.ch-1)),pt.ch>0)pt=new We(pt.line,pt.ch+1),it.replaceRange(Et.charAt(pt.ch-1)+Et.charAt(pt.ch-2),We(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Dt=ze(it.doc,pt.line-1).text;Dt&&(pt=new We(pt.line,1),it.replaceRange(Et.charAt(0)+it.doc.lineSeparator()+Dt.charAt(Dt.length-1),We(pt.line-1,Dt.length-1),pt,"+transpose"))}}ct.push(new ji(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return Ne(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=ze(it.doc,st),dt=ro(ct);return dt!=ct&&(st=ie(dt)),qr(!0,it,dt,st,1)}function su(it,st){var ct=ze(it.doc,st),dt=lr(ct);return dt!=ct&&(st=ie(dt)),qr(!0,it,ct,st,-1)}function Dc(it,st){var ct=ru(it,st.line),dt=ze(it.doc,ct.line),pt=Rt(dt,it.doc.direction);if(!pt||pt[0].level==0){var Et=Math.max(ct.ch,dt.text.search(/\S/)),Dt=st.line==ct.line&&st.ch<=Et&&st.ch;return We(ct.line,Dt?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)!=Bn}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 wu=new Vt;function vh(it,st,ct,dt){var pt=it.state.keySeq;if(pt){if(Pd(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:wu.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")&&(gi(ct),gs(it)),!!pt}function Qf(it,st){var ct=Fc(st,!0);return ct?st.shiftKey&&!it.state.keySeq?vh(it,"Shift-"+ct,st,function(dt){return Rh(it,dt,!0)})||vh(it,ct,st,function(dt){if(typeof dt=="string"?/^go[A-Z]/.test(dt):dt.motion)return Rh(it,dt)}):vh(it,ct,st,function(dt){return Rh(it,dt)}):!1}function Jf(it,st,ct){return vh(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(),!yn(st,it))){te&&Pe<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;st.display.shift=ct==16||it.shiftKey;var dt=Qf(st,it);Xt&&(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)&&(zt(st,"CodeMirror-crosshair"),Oe(document,"keyup",ct),Oe(document,"mouseover",ct))}ae(document,"keyup",ct),ae(document,"mouseover",ct)}function Xg(it){it.keyCode==16&&(this.doc.sel.shift=!1),yn(this,it)}function yh(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(Da(st.display,it)||yn(st,it)||it.ctrlKey&&!it.altKey||ht&&it.metaKey)){var ct=it.keyCode,dt=it.charCode;if(Xt&&ct==qd){qd=null,gi(it);return}if(!(Xt&&(!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&&Ye(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 Sh(it){var st=this,ct=st.display;if(!(yn(st,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,Da(ct,it)){Nt||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!$f(st,it)){var dt=rl(st,it),pt=Oo(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):Io(it)==ct.scroller&&gi(it):pt==2?(dt&&_r(st.doc,dt),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(Tt?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,vh(it,Bc(Et,pt),pt,function(Dt){if(typeof Dt=="string"&&(Dt=Ra[Dt]),!Dt)return!1;var Kt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Kt=Dt(it,ct)!=Bn}finally{it.state.suppressEdits=!1}return Kt})}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){te?setTimeout(vn(Ds,it),0):it.curOp.focus=me();var pt=_f(it,ct,dt),Et=it.doc.sel,Dt;it.options.dragDrop&&co&&!it.isReadOnly()&&ct=="single"&&(Dt=Et.contains(st))>-1&&(Ye((Dt=Et.ranges[Dt]).from(),st)<0||st.xRel>0)&&(Ye(Dt.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,Dt=an(it,function(re){Nt&&(pt.scroller.draggable=!1),it.state.draggingText=!1,Oe(pt.wrapper.ownerDocument,"mouseup",Dt),Oe(pt.wrapper.ownerDocument,"mousemove",Kt),Oe(pt.scroller,"dragstart",Ht),Oe(pt.scroller,"drop",Dt),Et||(gi(re),dt.addNew||_r(it.doc,ct,null,null,dt.extend),Nt&&!fe||te&&Pe==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),Kt=function(re){Et=Et||Math.abs(st.clientX-re.clientX)+Math.abs(st.clientY-re.clientY)>=10},Ht=function(){return Et=!0};Nt&&(pt.scroller.draggable=!0),it.state.draggingText=Dt,Dt.copy=!dt.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),ae(pt.wrapper.ownerDocument,"mouseup",Dt),ae(pt.wrapper.ownerDocument,"mousemove",Kt),ae(pt.scroller,"dragstart",Ht),ae(pt.scroller,"drop",Dt),Xs(it),setTimeout(function(){return pt.input.focus()},20)}function $g(it,st,ct){if(ct=="char")return new ji(st,st);if(ct=="word")return it.findWordAt(st);if(ct=="line")return new ji(We(st.line,0),Qn(it.doc,We(st.line+1,0)));var dt=ct(it,st);return new ji(dt.from,dt.to)}function ev(it,st,ct,dt){var pt=it.display,Et=it.doc;gi(st);var Dt,Kt,Ht=Et.sel,re=Ht.ranges;if(dt.addNew&&!dt.extend?(Kt=Et.sel.contains(ct),Kt>-1?Dt=re[Kt]:Dt=new ji(ct,ct)):(Dt=Et.sel.primary(),Kt=Et.sel.primIndex),dt.unit=="rectangle")dt.addNew||(Dt=new ji(ct,ct)),ct=rl(it,st,!0,!0),Kt=-1;else{var Re=$g(it,ct,dt.unit);dt.extend?Dt=qu(Dt,Re.anchor,Re.head,dt.extend):Dt=Re}dt.addNew?Kt==-1?(Kt=re.length,Ss(Et,sr(it,re.concat([Dt]),Kt),{scroll:!1,origin:"*mouse"})):re.length>1&&re[Kt].empty()&&dt.unit=="char"&&!dt.extend?(Ss(Et,sr(it,re.slice(0,Kt).concat(re.slice(Kt+1)),0),{scroll:!1,origin:"*mouse"}),Ht=Et.sel):ps(Et,Kt,Dt,hn):(Kt=0,Ss(Et,new Vo([Dt],0),hn),Ht=Et.sel);var ce=ct;function cn(eo){if(Ye(ce,eo)!=0)if(ce=eo,dt.unit=="rectangle"){for(var bo=[],ar=it.options.tabSize,_i=Se(ze(Et,ct.line).text,ct.ch,ar),Mr=Se(ze(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=ze(Et,oa).text,Ta=Jn(Pl,_s,ar);_s==za?bo.push(new ji(We(oa,Ta),We(oa,Ta))):Pl.length>Ta&&bo.push(new ji(We(oa,Ta),We(oa,Jn(Pl,za,ar))))}bo.length||bo.push(new ji(ct,ct)),Ss(Et,sr(it,Ht.ranges.slice(0,Kt).concat(bo),Kt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(eo)}else{var au=Dt,ll=$g(it,eo,dt.unit),Ba=au.anchor,as;Ye(ll.anchor,Ba)>0?(as=ll.head,Ba=Hn(au.from(),ll.anchor)):(as=ll.anchor,Ba=fi(au.to(),ll.head));var da=Ht.ranges.slice(0);da[Kt]=sm(it,new ji(Qn(Et,Ba),as)),Ss(Et,sr(it,da,Kt),hn)}}var on=pt.wrapper.getBoundingClientRect(),qn=0;function li(eo){var bo=++qn,ar=rl(it,eo,!0,dt.unit=="rectangle");if(ar)if(Ye(ar,ce)!=0){it.curOp.focus=me(),cn(ar);var _i=Ar(pt,Et);(ar.line>=_i.to||ar.line<_i.from)&&setTimeout(an(it,function(){qn==bo&&li(eo)}),150)}else{var Mr=eo.clientY<on.top?-20:eo.clientY>on.bottom?20:0;Mr&&setTimeout(an(it,function(){qn==bo&&(pt.scroller.scrollTop+=Mr,li(eo))}),50)}}function yi(eo){it.state.selectingText=!1,qn=1/0,eo&&(gi(eo),pt.input.focus()),Oe(pt.wrapper.ownerDocument,"mousemove",zi),Oe(pt.wrapper.ownerDocument,"mouseup",fo),Et.history.lastSelOrigin=null}var zi=an(it,function(eo){eo.buttons===0||!Oo(eo)?yi(eo):li(eo)}),fo=an(it,yi);it.state.selectingText=fo,ae(pt.wrapper.ownerDocument,"mousemove",zi),ae(pt.wrapper.ownerDocument,"mouseup",fo)}function sm(it,st){var ct=st.anchor,dt=st.head,pt=ze(it.doc,ct.line);if(Ye(ct,dt)==0&&ct.sticky==dt.sticky)return st;var Et=Rt(pt);if(!Et)return st;var Dt=mt(Et,ct.ch,ct.sticky),Kt=Et[Dt];if(Kt.from!=ct.ch&&Kt.to!=ct.ch)return st;var Ht=Dt+(Kt.from==ct.ch==(Kt.level!=1)?0:1);if(Ht==0||Ht==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 Re=mt(Et,dt.ch,dt.sticky),ce=Re-Dt||(dt.ch-ct.ch)*(Kt.level==1?-1:1);Re==Ht-1||Re==Ht?re=ce<0:re=ce>0}var cn=Et[Ht+(re?-1:0)],on=re==(cn.level==1),qn=on?cn.from:cn.to,li=on?"after":"before";return ct.ch==qn&&ct.sticky==li?st:new ji(new We(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(cn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;dt&&gi(st);var Dt=it.display,Kt=Dt.lineDiv.getBoundingClientRect();if(Et>Kt.bottom||!Kn(it,ct))return Xi(st);Et-=Kt.top-Dt.viewOffset;for(var Ht=0;Ht<it.display.gutterSpecs.length;++Ht){var re=Dt.gutters.childNodes[Ht];if(re&&re.getBoundingClientRect().right>=pt){var Re=Je(it.doc,Et),ce=it.display.gutterSpecs[Ht];return Be(it,ct,it,Re,ce.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)||yn(it,st,"contextmenu")||Tt||it.display.input.onContextMenu(st)}function am(it,st){return Kn(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-"),Go(it)}var Cd={toString:function(){return"CodeMirror.Init"}},tp={},gf={};function lm(it){var st=it.optionHandlers;function ct(dt,pt,Et,Dt){it.defaults[dt]=pt,Et&&(st[dt]=Dt?function(Kt,Ht,re){re!=Cd&&Et(Kt,Ht,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,No(dt)},!0),ct("indentUnit",2,No,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(dt){zr(dt),Go(dt),Ps(dt)},!0),ct("lineSeparator",null,function(dt,pt){if(dt.doc.lineSep=pt,!!pt){var Et=[],Dt=dt.doc.first;dt.doc.iter(function(Ht){for(var re=0;;){var Re=Ht.text.indexOf(pt,re);if(Re==-1)break;re=Re+pt.length,Et.push(We(Dt,Re))}Dt++});for(var Kt=Et.length-1;Kt>=0;Kt--)$u(dt.doc,pt,Et[Kt],We(Et[Kt].line,Et[Kt].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 Dt=Oh(pt),Kt=Et!=Cd&&Oh(Et);Kt&&Kt.detach&&Kt.detach(dt,Dt),Dt.attach&&Dt.attach(dt,Kt||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,um,!0),ct("gutters",[],function(dt,pt){dt.display.gutterSpecs=po(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=po(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?ae:Oe;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):(zt(it.display.wrapper,"CodeMirror-wrap"),Ir(it)),To(it),Ps(it),Go(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?xn(st):{},xn(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 Vt,keySeq:null,specialChars:null},st.autofocus&&!nt&&Et.input.focus(),te&&Pe<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Rc(this),Ul(),yl(this),this.curOp.forceUpdate=!0,Yo(this,dt),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&Gr(ct)},20):td(this);for(var Dt in gf)gf.hasOwnProperty(Dt)&&gf[Dt](this,st[Dt],Cd);Ri(this),st.finishInit&&st.finishInit(this);for(var Kt=0;Kt<tc.length;++Kt)tc[Kt](this);Fh(this),Nt&&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;ae(st.scroller,"mousedown",an(it,Sh)),te&&Pe<11?ae(st.scroller,"dblclick",an(it,function(Ht){if(!yn(it,Ht)){var re=rl(it,Ht);if(!(!re||$f(it,Ht)||Da(it.display,Ht))){gi(Ht);var Re=it.findWordAt(re);_r(it.doc,Re.anchor,Re.head)}}})):ae(st.scroller,"dblclick",function(Ht){return yn(it,Ht)||gi(Ht)}),ae(st.scroller,"contextmenu",function(Ht){return tg(it,Ht)}),ae(st.input.getField(),"contextmenu",function(Ht){st.scroller.contains(Ht.target)||tg(it,Ht)});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(Ht){if(Ht.touches.length!=1)return!1;var re=Ht.touches[0];return re.radiusX<=1&&re.radiusY<=1}function Dt(Ht,re){if(re.left==null)return!0;var Re=re.left-Ht.left,ce=re.top-Ht.top;return Re*Re+ce*ce>20*20}ae(st.scroller,"touchstart",function(Ht){if(!yn(it,Ht)&&!Et(Ht)&&!$f(it,Ht)){st.input.ensurePolled(),clearTimeout(ct);var re=+new Date;st.activeTouch={start:re,moved:!1,prev:re-dt.end<=300?dt:null},Ht.touches.length==1&&(st.activeTouch.left=Ht.touches[0].pageX,st.activeTouch.top=Ht.touches[0].pageY)}}),ae(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),ae(st.scroller,"touchend",function(Ht){var re=st.activeTouch;if(re&&!Da(st,Ht)&&re.left!=null&&!re.moved&&new Date-re.start<300){var Re=it.coordsChar(st.activeTouch,"page"),ce;!re.prev||Dt(re,re.prev)?ce=new ji(Re,Re):!re.prev.prev||Dt(re,re.prev.prev)?ce=it.findWordAt(Re):ce=new ji(We(Re.line,0),Qn(it.doc,We(Re.line+1,0))),it.setSelection(ce.anchor,ce.head),it.focus(),gi(Ht)}pt()}),ae(st.scroller,"touchcancel",pt),ae(st.scroller,"scroll",function(){st.scroller.clientHeight&&(nd(it,st.scroller.scrollTop),_u(it,st.scroller.scrollLeft,!0),Be(it,"scroll",it))}),ae(st.scroller,"mousewheel",function(Ht){return Ko(it,Ht)}),ae(st.scroller,"DOMMouseScroll",function(Ht){return Ko(it,Ht)}),ae(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Ht){yn(it,Ht)||Mo(Ht)},over:function(Ht){yn(it,Ht)||(df(it,Ht),Mo(Ht))},start:function(Ht){return Jd(it,Ht)},drop:an(it,kc),leave:function(Ht){yn(it,Ht)||Yf(it)}};var Kt=st.input.getField();ae(Kt,"keyup",function(Ht){return Xg.call(it,Ht)}),ae(Kt,"keydown",an(it,Vg)),ae(Kt,"keypress",an(it,yh)),ae(Kt,"focus",function(Ht){return Gr(it,Ht)}),ae(Kt,"blur",function(Ht){return td(it,Ht)})}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=zo(it,st).state:ct="prev");var Dt=it.options.tabSize,Kt=ze(pt,st),Ht=Se(Kt.text,null,Dt);Kt.stateAfter&&(Kt.stateAfter=null);var re=Kt.text.match(/^\s*/)[0],Re;if(!dt&&!/\S/.test(Kt.text))Re=0,ct="not";else if(ct=="smart"&&(Re=pt.mode.indent(Et,Kt.text.slice(re.length),Kt.text),Re==Bn||Re>150)){if(!dt)return;ct="prev"}ct=="prev"?st>pt.first?Re=Se(ze(pt,st-1).text,null,Dt):Re=0:ct=="add"?Re=Ht+it.options.indentUnit:ct=="subtract"?Re=Ht-it.options.indentUnit:typeof ct=="number"&&(Re=Ht+ct),Re=Math.max(0,Re);var ce="",cn=0;if(it.options.indentWithTabs)for(var on=Math.floor(Re/Dt);on;--on)cn+=Dt,ce+=" ";if(cn<Re&&(ce+=ui(Re-cn)),ce!=re)return $u(pt,ce,We(st,0),We(st,re.length),"+input"),Kt.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=We(st,re.length);ps(pt,qn,new ji(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 Dt=+new Date-200,Kt=pt=="paste"||it.state.pasteIncoming>Dt,Ht=jo(st),re=null;if(Kt&&dt.ranges.length>1)if(Yl&&Yl.text.join(`
|
|
|
`)==st){if(dt.ranges.length%Yl.text.length==0){re=[];for(var Re=0;Re<Yl.text.length;Re++)re.push(Et.splitLines(Yl.text[Re]))}}else Ht.length==dt.ranges.length&&it.options.pasteLinesPerSelection&&(re=ni(Ht,function(zi){return[zi]}));for(var ce=it.curOp.updateInput,cn=dt.ranges.length-1;cn>=0;cn--){var on=dt.ranges[cn],qn=on.from(),li=on.to();on.empty()&&(ct&&ct>0?qn=We(qn.line,qn.ch-ct):it.state.overwrite&&!Kt?li=We(li.line,Math.min(ze(Et,li.line).text.length,li.ch+Ce(Ht).length)):Kt&&Yl&&Yl.lineWise&&Yl.text.join(`
|
|
|
`)==Ht.join(`
|
|
|
`)&&(qn=li=We(qn.line,0)));var yi={from:qn,to:li,text:re?re[cn%re.length]:Ht,origin:pt||(Kt?"paste":it.state.cutIncoming>Dt?"cut":"+input")};Zs(it.doc,yi),hi(it,"inputRead",it,yi)}st&&!Kt&&np(it,st),Nh(it),it.curOp.updateInput<2&&(it.curOp.updateInput=ce),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&&Ne(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),Dt=!1;if(Et.electricChars){for(var Kt=0;Kt<Et.electricChars.length;Kt++)if(st.indexOf(Et.electricChars.charAt(Kt))>-1){Dt=ja(it,pt.head.line,"smart");break}}else Et.electricInput&&Et.electricInput.test(ze(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Dt=ja(it,pt.head.line,"smart"));Dt&&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:We(pt,0),head:We(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=Jt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=Jt("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Nt?it.style.width="1000px":it.setAttribute("wrap","off"),Bt&&(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,Dt=Et[dt];Et[dt]==pt&&dt!="mode"||(Et[dt]=pt,st.hasOwnProperty(dt)&&an(this,st[dt])(this,pt,Dt),Be(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:ln(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(Dt){return Dt.priority}),this.state.modeGen++,Ps(this)}),removeOverlay:ln(function(dt){for(var pt=this.state.overlays,Et=0;Et<pt.length;++Et){var Dt=pt[Et].modeSpec;if(Dt==dt||typeof dt=="string"&&Dt.name==dt){pt.splice(Et,1),this.state.modeGen++,Ps(this);return}}}),indentLine:ln(function(dt,pt,Et){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),Cn(this.doc,dt)&&ja(this,dt,pt,Et)}),indentSelection:ln(function(dt){for(var pt=this.doc.sel.ranges,Et=-1,Dt=0;Dt<pt.length;Dt++){var Kt=pt[Dt];if(Kt.empty())Kt.head.line>Et&&(ja(this,Kt.head.line,dt,!0),Et=Kt.head.line,Dt==this.doc.sel.primIndex&&Nh(this));else{var Ht=Kt.from(),re=Kt.to(),Re=Math.max(Et,Ht.line);Et=Math.min(this.lastLine(),re.line-(re.ch?0:1))+1;for(var ce=Re;ce<Et;++ce)ja(this,ce,dt);var cn=this.doc.sel.ranges;Ht.ch==0&&pt.length==cn.length&&cn[Dt].from().ch>0&&ps(this.doc,Dt,new ji(Ht,cn[Dt].to()),Ae)}}}),getTokenAt:function(dt,pt){return vi(this,dt,pt)},getLineTokens:function(dt,pt){return vi(this,We(dt),pt,!0)},getTokenTypeAt:function(dt){dt=Qn(this.doc,dt);var pt=Eo(this,ze(this.doc,dt.line)),Et=0,Dt=(pt.length-1)/2,Kt=dt.ch,Ht;if(Kt==0)Ht=pt[2];else for(;;){var re=Et+Dt>>1;if((re?pt[re*2-1]:0)>=Kt)Dt=re;else if(pt[re*2+1]<Kt)Et=re+1;else{Ht=pt[re*2+2];break}}var Re=Ht?Ht.indexOf("overlay "):-1;return Re<0?Ht:Re==0?null:Ht.slice(0,Re-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 Dt=ct[pt],Kt=this.getModeAt(dt);if(typeof Kt[pt]=="string")Dt[Kt[pt]]&&Et.push(Dt[Kt[pt]]);else if(Kt[pt])for(var Ht=0;Ht<Kt[pt].length;Ht++){var re=Dt[Kt[pt][Ht]];re&&Et.push(re)}else Kt.helperType&&Dt[Kt.helperType]?Et.push(Dt[Kt.helperType]):Dt[Kt.name]&&Et.push(Dt[Kt.name]);for(var Re=0;Re<Dt._global.length;Re++){var ce=Dt._global[Re];ce.pred(Kt,this)&&Xe(Et,ce.val)==-1&&Et.push(ce.val)}return Et},getStateAfter:function(dt,pt){var Et=this.doc;return dt=ti(Et,dt==null?Et.first+Et.size-1:dt),zo(this,dt+1,pt).state},cursorCoords:function(dt,pt){var Et,Dt=this.doc.sel.primary();return dt==null?Et=Dt.head:typeof dt=="object"?Et=Qn(this.doc,dt):Et=dt?Dt.from():Dt.to(),fs(this,Et,pt||"page")},charCoords:function(dt,pt){return Ws(this,Qn(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,Je(this.doc,dt+this.display.viewOffset)},heightAtLine:function(dt,pt,Et){var Dt=!1,Kt;if(typeof dt=="number"){var Ht=this.doc.first+this.doc.size-1;dt<this.doc.first?dt=this.doc.first:dt>Ht&&(dt=Ht,Dt=!0),Kt=ze(this.doc,dt)}else Kt=dt;return Lr(this,Kt,{top:0,left:0},pt||"page",Et||Dt).top+(Dt?this.doc.height-qo(Kt):0)},defaultTextHeight:function(){return Qu(this.display)},defaultCharWidth:function(){return ph(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(dt,pt,Et,Dt,Kt){var Ht=this.display;dt=fs(this,Qn(this.doc,dt));var re=dt.bottom,Re=dt.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Ht.sizer.appendChild(pt),Dt=="over")re=dt.top;else if(Dt=="above"||Dt=="near"){var ce=Math.max(Ht.wrapper.clientHeight,this.doc.height),cn=Math.max(Ht.sizer.clientWidth,Ht.lineSpace.clientWidth);(Dt=="above"||dt.bottom+pt.offsetHeight>ce)&&dt.top>pt.offsetHeight?re=dt.top-pt.offsetHeight:dt.bottom+pt.offsetHeight<=ce&&(re=dt.bottom),Re+pt.offsetWidth>cn&&(Re=cn-pt.offsetWidth)}pt.style.top=re+"px",pt.style.left=pt.style.right="",Kt=="right"?(Re=Ht.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(Kt=="left"?Re=0:Kt=="middle"&&(Re=(Ht.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=Re+"px"),Et&&Xd(this,{left:Re,top:re,right:Re+pt.offsetWidth,bottom:re+pt.offsetHeight})},triggerOnKeyDown:ln(Vg),triggerOnKeyPress:ln(yh),triggerOnKeyUp:Xg,triggerOnMouseDown:ln(Sh),execCommand:function(dt){if(Ra.hasOwnProperty(dt))return Ra[dt].call(null,this)},triggerElectric:ln(function(dt){np(this,dt)}),findPosH:function(dt,pt,Et,Dt){var Kt=1;pt<0&&(Kt=-1,pt=-pt);for(var Ht=Qn(this.doc,dt),re=0;re<pt&&(Ht=mf(this.doc,Ht,Kt,Et,Dt),!Ht.hitSide);++re);return Ht},moveH:ln(function(dt,pt){var Et=this;this.extendSelectionsBy(function(Dt){return Et.display.shift||Et.doc.extend||Dt.empty()?mf(Et.doc,Dt.head,dt,pt,Et.options.rtlMoveVisually):dt<0?Dt.from():Dt.to()},bn)}),deleteH:ln(function(dt,pt){var Et=this.doc.sel,Dt=this.doc;Et.somethingSelected()?Dt.replaceSelection("",null,"+delete"):al(this,function(Kt){var Ht=mf(Dt,Kt.head,dt,pt,!1);return dt<0?{from:Ht,to:Kt.head}:{from:Kt.head,to:Ht}})}),findPosV:function(dt,pt,Et,Dt){var Kt=1,Ht=Dt;pt<0&&(Kt=-1,pt=-pt);for(var re=Qn(this.doc,dt),Re=0;Re<pt;++Re){var ce=fs(this,re,"div");if(Ht==null?Ht=ce.left:ce.left=Ht,re=Ed(this,ce,Kt,Et),re.hitSide)break}return re},moveV:ln(function(dt,pt){var Et=this,Dt=this.doc,Kt=[],Ht=!this.display.shift&&!Dt.extend&&Dt.sel.somethingSelected();if(Dt.extendSelectionsBy(function(Re){if(Ht)return dt<0?Re.from():Re.to();var ce=fs(Et,Re.head,"div");Re.goalColumn!=null&&(ce.left=Re.goalColumn),Kt.push(ce.left);var cn=Ed(Et,ce,dt,pt);return pt=="page"&&Re==Dt.sel.primary()&&Ec(Et,Ws(Et,cn,"div").top-ce.top),cn},bn),Kt.length)for(var re=0;re<Dt.sel.ranges.length;re++)Dt.sel.ranges[re].goalColumn=Kt[re]}),findWordAt:function(dt){var pt=this.doc,Et=ze(pt,dt.line).text,Dt=dt.ch,Kt=dt.ch;if(Et){var Ht=this.getHelper(dt,"wordChars");(dt.sticky=="before"||Kt==Et.length)&&Dt?--Dt:++Kt;for(var re=Et.charAt(Dt),Re=On(re,Ht)?function(ce){return On(ce,Ht)}:/\s/.test(re)?function(ce){return/\s/.test(ce)}:function(ce){return!/\s/.test(ce)&&!On(ce)};Dt>0&&Re(Et.charAt(Dt-1));)--Dt;for(;Kt<Et.length&&Re(Et.charAt(Kt));)++Kt}return new ji(We(dt.line,Dt),We(dt.line,Kt))},toggleOverwrite:function(dt){dt!=null&&dt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ve(this.display.cursorDiv,"CodeMirror-overwrite"):zt(this.display.cursorDiv,"CodeMirror-overwrite"),Be(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==me()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ln(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:Bu(this),clientWidth:Oa(this)}},scrollIntoView:ln(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:We(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:ln(function(dt,pt){var Et=this,Dt=function(Ht){return typeof Ht=="number"||/^\d+$/.test(String(Ht))?Ht+"px":Ht};dt!=null&&(this.display.wrapper.style.width=Dt(dt)),pt!=null&&(this.display.wrapper.style.height=Dt(pt)),this.options.lineWrapping&&xo(this);var Kt=this.display.viewFrom;this.doc.iter(Kt,this.display.viewTo,function(Ht){if(Ht.widgets){for(var re=0;re<Ht.widgets.length;re++)if(Ht.widgets[re].noHScroll){vr(Et,Kt,"widget");break}}++Kt}),this.curOp.forceUpdate=!0,Be(this,"refresh",this)}),operation:function(dt){return Ne(this,dt)},startOperation:function(){return yl(this)},endOperation:function(){return Fh(this)},refresh:ln(function(){var dt=this.display.cachedTextHeight;Ps(this),this.curOp.forceUpdate=!0,Go(this),ed(this,this.doc.scrollLeft,this.doc.scrollTop),Vi(this.display),(dt==null||Math.abs(dt-Qu(this.display))>.5||this.options.lineWrapping)&&To(this),Be(this,"refresh",this)}),swapDoc:ln(function(dt){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),Yo(this,dt),Go(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}},Vn(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,Dt){it.registerHelper(dt,pt,Dt),ct[dt]._global.push({pred:Et,val:Dt})}}function mf(it,st,ct,dt,pt){var Et=st,Dt=ct,Kt=ze(it,st.line),Ht=pt&&it.direction=="rtl"?-ct:ct;function re(){var fo=st.line+Ht;return fo<it.first||fo>=it.first+it.size?!1:(st=new We(fo,st.ch,st.sticky),Kt=ze(it,fo))}function Re(fo){var eo;if(dt=="codepoint"){var bo=Kt.text.charCodeAt(st.ch+(dt>0?0:-1));isNaN(bo)?eo=null:eo=new We(st.line,Math.max(0,Math.min(Kt.text.length,st.ch+ct*(bo>=55296&&bo<56320?2:1))),-ct)}else pt?eo=Fs(it.cm,Kt,st,ct):eo=ha(Kt,st,ct);if(eo==null)if(!fo&&re())st=qr(pt,it.cm,Kt,st.line,Ht);else return!1;else st=eo;return!0}if(dt=="char"||dt=="codepoint")Re();else if(dt=="column")Re(!0);else if(dt=="word"||dt=="group")for(var ce=null,cn=dt=="group",on=it.cm&&it.cm.getHelper(st,"wordChars"),qn=!0;!(ct<0&&!Re(!qn));qn=!1){var li=Kt.text.charAt(st.ch)||`
|
|
|
`,yi=On(li,on)?"w":cn&&li==`
|
|
|
`?"n":!cn||/\s/.test(li)?null:"p";if(cn&&!qn&&!yi&&(yi="s"),ce&&ce!=yi){ct<0&&(ct=1,Re(),st.sticky="after");break}if(yi&&(ce=yi),ct>0&&!Re(!qn))break}var zi=iu(it,st,Et,Dt,!0);return zn(Et,zi)&&(zi.hitSide=!0),zi}function Ed(it,st,ct,dt){var pt=it.doc,Et=st.left,Dt;if(dt=="page"){var Kt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ht=Math.max(Kt-.5*Qu(it.display),3);Dt=(ct>0?st.bottom:st.top)+ct*Ht}else dt=="line"&&(Dt=ct>0?st.bottom+3:st.top-3);for(var re;re=eu(it,Et,Dt),!!re.outside;){if(ct<0?Dt<=0:Dt>=pt.height){re.hitSide=!0;break}Dt+=ct*5}return re}var js=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Vt,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(Kt){for(var Ht=Kt.target;Ht;Ht=Ht.parentNode){if(Ht==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ht.className))break}return!1}ae(pt,"paste",function(Kt){!Et(Kt)||yn(dt,Kt)||ep(Kt,dt)||Pe<=11&&setTimeout(an(dt,function(){return st.updateFromDOM()}),20)}),ae(pt,"compositionstart",function(Kt){st.composing={data:Kt.data,done:!1}}),ae(pt,"compositionupdate",function(Kt){st.composing||(st.composing={data:Kt.data,done:!1})}),ae(pt,"compositionend",function(Kt){st.composing&&(Kt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),ae(pt,"touchstart",function(){return ct.forceCompositionEnd()}),ae(pt,"input",function(){st.composing||st.readFromDOMSoon()});function Dt(Kt){if(!(!Et(Kt)||yn(dt,Kt))){if(dt.somethingSelected())ec({lineWise:!1,text:dt.getSelections()}),Kt.type=="cut"&&dt.replaceSelection("",null,"cut");else if(dt.options.lineWiseCopyCut){var Ht=ip(dt);ec({lineWise:!0,text:Ht.text}),Kt.type=="cut"&&dt.operation(function(){dt.setSelections(Ht.ranges,0,Ae),dt.replaceSelection("",null,"cut")})}else return;if(Kt.clipboardData){Kt.clipboardData.clearData();var re=Yl.text.join(`
|
|
|
`);if(Kt.clipboardData.setData("Text",re),Kt.clipboardData.getData("Text")==re){Kt.preventDefault();return}}var Re=rp(),ce=Re.firstChild;dt.display.lineSpace.insertBefore(Re,dt.display.lineSpace.firstChild),ce.value=Yl.text.join(`
|
|
|
`);var cn=document.activeElement;qe(ce),setTimeout(function(){dt.display.lineSpace.removeChild(Re),cn.focus(),cn==pt&&ct.showPrimarySelection()},50)}}ae(pt,"copy",Dt),ae(pt,"cut",Dt)},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),Dt=vf(st,it.focusNode,it.focusOffset);if(!(Et&&!Et.bad&&Dt&&!Dt.bad&&Ye(Hn(Et,Dt),dt)==0&&Ye(fi(Et,Dt),pt)==0)){var Kt=st.display.view,Ht=dt.line>=st.display.viewFrom&&ig(st,dt)||{node:Kt[0].measure.map[2],offset:0},re=pt.line<st.display.viewTo&&ig(st,pt);if(!re){var Re=Kt[Kt.length-1].measure,ce=Re.maps?Re.maps[Re.maps.length-1]:Re.map;re={node:ce[ce.length-1],offset:ce[ce.length-2]-ce[ce.length-3]}}if(!Ht||!re){it.removeAllRanges();return}var cn=it.rangeCount&&it.getRangeAt(0),on;try{on=Zt(Ht.node,Ht.offset,re.offset,re.node)}catch(qn){}on&&(!wt&&st.state.focused?(it.collapse(Ht.node,Ht.offset),on.collapsed||(it.removeAllRanges(),it.addRange(on))):(it.removeAllRanges(),it.addRange(on)),cn&&it.anchorNode==null?it.addRange(cn):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 Fe(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():Ne(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&&ve&&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&&Ne(st,function(){Ss(st.doc,fr(ct,dt),Ae),(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=We(dt.line-1,ze(it.doc,dt.line-1).length)),pt.ch==ze(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=We(pt.line+1,0)),dt.line<st.viewFrom||pt.line>st.viewTo-1)return!1;var Et,Dt,Kt;dt.line==st.viewFrom||(Et=Ua(it,dt.line))==0?(Dt=ie(st.view[0].line),Kt=st.view[0].node):(Dt=ie(st.view[Et].line),Kt=st.view[Et-1].node.nextSibling);var Ht=Ua(it,pt.line),re,Re;if(Ht==st.view.length-1?(re=st.viewTo-1,Re=st.lineDiv.lastChild):(re=ie(st.view[Ht+1].line)-1,Re=st.view[Ht+1].node.previousSibling),!Kt)return!1;for(var ce=it.doc.splitLines(zc(it,Kt,Re,Dt,re)),cn=sn(it.doc,We(Dt,0),We(re,ze(it.doc,re).text.length));ce.length>1&&cn.length>1;)if(Ce(ce)==Ce(cn))ce.pop(),cn.pop(),re--;else if(ce[0]==cn[0])ce.shift(),cn.shift(),Dt++;else break;for(var on=0,qn=0,li=ce[0],yi=cn[0],zi=Math.min(li.length,yi.length);on<zi&&li.charCodeAt(on)==yi.charCodeAt(on);)++on;for(var fo=Ce(ce),eo=Ce(cn),bo=Math.min(fo.length-(ce.length==1?on:0),eo.length-(cn.length==1?on:0));qn<bo&&fo.charCodeAt(fo.length-qn-1)==eo.charCodeAt(eo.length-qn-1);)++qn;if(ce.length==1&&cn.length==1&&Dt==dt.line)for(;on&&on>dt.ch&&fo.charCodeAt(fo.length-qn-1)==eo.charCodeAt(eo.length-qn-1);)on--,qn++;ce[ce.length-1]=fo.slice(0,fo.length-qn).replace(/^\u200b+/,""),ce[0]=ce[0].slice(on).replace(/\u200b+$/,"");var ar=We(Dt,on),_i=We(re,cn.length?Ce(cn).length-qn:0);if(ce.length>1||ce[0]||Ye(ar,_i))return $u(it.doc,ce,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())&&Ne(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()||an(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=ze(it.doc,st.line),pt=dh(ct,dt,st.line),Et=Rt(dt,it.doc.direction),Dt="left";if(Et){var Kt=mt(Et,st.ch);Dt=Kt%2?"right":"left"}var Ht=gh(pt.map,st.ch,Dt);return Ht.offset=Ht.collapse=="right"?Ht.end:Ht.start,Ht}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="",Dt=!1,Kt=it.doc.lineSeparator(),Ht=!1;function re(on){return function(qn){return qn.id==on}}function Re(){Dt&&(Et+=Kt,Ht&&(Et+=Kt),Dt=Ht=!1)}function ce(on){on&&(Re(),Et+=on)}function cn(on){if(on.nodeType==1){var qn=on.getAttribute("cm-text");if(qn){ce(qn);return}var li=on.getAttribute("cm-marker"),yi;if(li){var zi=it.findMarks(We(dt,0),We(pt+1,0),re(+li));zi.length&&(yi=zi[0].find(0))&&ce(sn(it.doc,yi.from,yi.to).join(Kt));return}if(on.getAttribute("contenteditable")=="false")return;var fo=/^(pre|div|p|li|table|br)$/i.test(on.nodeName);if(!/^br$/i.test(on.nodeName)&&on.textContent.length==0)return;fo&&Re();for(var eo=0;eo<on.childNodes.length;eo++)cn(on.childNodes[eo]);/^(pre|p)$/i.test(on.nodeName)&&(Ht=!0),fo&&(Dt=!0)}else on.nodeType==3&&ce(on.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;cn(st),st!=ct;)st=st.nextSibling,Ht=!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(We(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||!Fe(dt,st))return jc(We(ie(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(We(ie(Et),Et.text.length),pt)}var Dt=st.nodeType==3?st:null,Kt=st;for(!Dt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Dt=st.firstChild,ct&&(ct=Dt.nodeValue.length));Kt.parentNode!=dt;)Kt=Kt.parentNode;var Ht=it.measure,re=Ht.maps;function Re(yi,zi,fo){for(var eo=-1;eo<(re?re.length:0);eo++)for(var bo=eo<0?Ht.map:re[eo],ar=0;ar<bo.length;ar+=3){var _i=bo[ar+2];if(_i==yi||_i==zi){var Mr=ie(eo<0?it.line:it.rest[eo]),_s=bo[ar]+fo;return(fo<0||_i!=yi)&&(_s=bo[ar+(fo?1:0)]),We(Mr,_s)}}}var ce=Re(Dt,Kt,ct);if(ce)return jc(ce,pt);for(var cn=Kt.nextSibling,on=Dt?Dt.nodeValue.length-ct:0;cn;cn=cn.nextSibling){if(ce=Re(cn,cn.firstChild,0),ce)return jc(We(ce.line,ce.ch-on),pt);on+=cn.textContent.length}for(var qn=Kt.previousSibling,li=ct;qn;qn=qn.previousSibling){if(ce=Re(qn,qn.firstChild,-1),ce)return jc(We(ce.line,ce.ch+li),pt);li+=qn.textContent.length}}var Na=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Vt,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),Bt&&(pt.style.width="0px"),ae(pt,"input",function(){te&&Pe>=9&&st.hasSelection&&(st.hasSelection=null),ct.poll()}),ae(pt,"paste",function(Dt){yn(dt,Dt)||ep(Dt,dt)||(dt.state.pasteIncoming=+new Date,ct.fastPoll())});function Et(Dt){if(!yn(dt,Dt)){if(dt.somethingSelected())ec({lineWise:!1,text:dt.getSelections()});else if(dt.options.lineWiseCopyCut){var Kt=ip(dt);ec({lineWise:!0,text:Kt.text}),Dt.type=="cut"?dt.setSelections(Kt.ranges,null,Ae):(ct.prevInput="",pt.value=Kt.text.join(`
|
|
|
`),qe(pt))}else return;Dt.type=="cut"&&(dt.state.cutIncoming=+new Date)}}ae(pt,"cut",Et),ae(pt,"copy",Et),ae(it.scroller,"paste",function(Dt){if(!(Da(it,Dt)||yn(dt,Dt))){if(!pt.dispatchEvent){dt.state.pasteIncoming=+new Date,ct.focus();return}var Kt=new Event("paste");Kt.clipboardData=Dt.clipboardData,pt.dispatchEvent(Kt)}}),ae(it.lineSpace,"selectstart",function(Dt){Da(it,Dt)||gi(Dt)}),ae(pt,"compositionstart",function(){var Dt=dt.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:Dt,range:dt.markText(Dt,dt.getCursor("to"),{className:"CodeMirror-composing"})}}),ae(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(),Dt=st.lineDiv.getBoundingClientRect();dt.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,pt.top+Dt.top-Et.top)),dt.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,pt.left+Dt.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&&qe(this.textarea),te&&Pe>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",te&&Pe>=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(te&&Pe>=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 Dt=0,Kt=Math.min(dt.length,pt.length);Dt<Kt&&dt.charCodeAt(Dt)==pt.charCodeAt(Dt);)++Dt;return Ne(st,function(){pf(st,pt.slice(Dt),dt.length-Dt,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(){te&&Pe>=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),Dt=dt.scroller.scrollTop;if(!Et||Xt)return;var Kt=ct.options.resetSelectionOnContextMenu;Kt&&ct.doc.sel.contains(Et)==-1&&an(ct,Ss)(ct.doc,fr(Et),Ae);var Ht=pt.style.cssText,re=st.wrapper.style.cssText,Re=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(it.clientY-Re.top-5)+"px; left: "+(it.clientX-Re.left-5)+`px;
|
|
|
z-index: 1000; background: `+(te?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ce;Nt&&(ce=window.scrollY),dt.input.focus(),Nt&&window.scrollTo(null,ce),dt.input.reset(),ct.somethingSelected()||(pt.value=st.prevInput=" "),st.contextMenuPending=on,dt.selForContextMenu=ct.doc.sel,clearTimeout(dt.detectingSelectAll);function cn(){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 on(){if(st.contextMenuPending==on&&(st.contextMenuPending=!1,st.wrapper.style.cssText=re,pt.style.cssText=Ht,te&&Pe<9&&dt.scrollbars.setScrollTop(dt.scroller.scrollTop=Dt),pt.selectionStart!=null)){(!te||te&&Pe<9)&&cn();var li=0,yi=function(){dt.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&st.prevInput=="\u200B"?an(ct,$r)(ct):li++<10?dt.detectingSelectAll=setTimeout(yi,500):(dt.selForContextMenu=null,dt.input.reset())};dt.detectingSelectAll=setTimeout(yi,200)}}if(te&&Pe>=9&&cn(),Tt){Mo(it);var qn=function(){Oe(window,"mouseup",qn),setTimeout(on,20)};ae(window,"mouseup",qn)}else setTimeout(on,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?xn(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=Kt.getValue()}var pt;if(it.form&&(ae(it.form,"submit",dt),!st.leaveSubmitMethodAlone)){var Et=it.form;pt=Et.submit;try{var Dt=Et.submit=function(){dt(),Et.submit=pt,Et.submit(),Et.submit=Dt}}catch(Ht){}}st.finishInit=function(Ht){Ht.save=dt,Ht.getTextArea=function(){return it},Ht.toTextArea=function(){Ht.toTextArea=isNaN,dt(),it.parentNode.removeChild(Ht.getWrapperElement()),it.style.display="",it.form&&(Oe(it.form,"submit",dt),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var Kt=os(function(Ht){return it.parentNode.insertBefore(Ht,it.nextSibling)},st);return Kt}function Hc(it){it.off=Oe,it.on=ae,it.wheelEventPixels=Lo,it.Doc=Aa,it.splitLines=jo,it.countColumn=Se,it.findColumn=Jn,it.isWordChar=Un,it.Pass=Bn,it.signal=Be,it.Line=Ur,it.changeEnd=Qr,it.scrollbarModel=af,it.Pos=We,it.cmpPos=Ye,it.modes=ts,it.mimeModes=rs,it.resolveMode=si,it.getMode=Te,it.modeExtensions=Ee,it.extendMode=Wt,it.copyState=Ge,it.startState=ue,it.innerMode=Ue,it.commands=Ra,it.keyMap=wl,it.keyName=Fc,it.isModifierKey=Pd,it.lookupKey=Vl,it.normalizeKeyMap=Tc,it.StringStream=qt,it.SharedTextMarker=th,it.TextMarker=be,it.LineWidget=Sa,it.e_preventDefault=gi,it.e_stopPropagation=Ti,it.e_stop=Mo,it.addClass=Ve,it.contains=Fe,it.rmClass=zt,it.keyNames=ju}lm(os),Md(os);var rd="iter insert remove copy getEditor constructor".split(" ");for(var yf in Aa.prototype)Aa.prototype.hasOwnProperty(yf)&&Xe(rd,yf)<0&&(os.prototype[yf]=function(it){return function(){return it.apply(this.doc,arguments)}}(Aa.prototype[yf]));return Vn(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(dn,Mn,bt){(function(wt){wt(bt(89780),bt(15525),bt(98101))})(function(wt){"use strict";wt.defineMode("markdown",function(ee,he){var Ie=wt.getMode(ee,"text/html"),te=Ie.name=="null";function Pe(Se){if(wt.findModeByName){var Vt=wt.findModeByName(Se);Vt&&(Se=Vt.mime||Vt.mimes[0])}var Xe=wt.getMode(ee,Se);return Xe.name=="null"?null:Xe}he.highlightFormatting===void 0&&(he.highlightFormatting=!1),he.maxBlockquoteDepth===void 0&&(he.maxBlockquoteDepth=0),he.taskLists===void 0&&(he.taskLists=!1),he.strikethrough===void 0&&(he.strikethrough=!1),he.emoji===void 0&&(he.emoji=!1),he.fencedCodeBlockHighlighting===void 0&&(he.fencedCodeBlockHighlighting=!0),he.fencedCodeBlockDefaultMode===void 0&&(he.fencedCodeBlockDefaultMode="text/plain"),he.xml===void 0&&(he.xml=!0),he.tokenTypeOverrides===void 0&&(he.tokenTypeOverrides={});var Nt={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 Le in Nt)Nt.hasOwnProperty(Le)&&he.tokenTypeOverrides[Le]&&(Nt[Le]=he.tokenTypeOverrides[Le]);var ve=/^([*\-_])(?:\s*\1){2,}\s*$/,Xt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,fe=/^\[(x| )\](?=\s)/i,xe=he.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,je=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Bt=/^[^#!\[\]*_\\<>` "'(~:]+/,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(Se,Vt,Xe){return Vt.f=Vt.inline=Xe,Xe(Se,Vt)}function yt(Se,Vt,Xe){return Vt.f=Vt.block=Xe,Xe(Se,Vt)}function Pt(Se){return!Se||!/\S/.test(Se.string)}function Tt(Se){if(Se.linkTitle=!1,Se.linkHref=!1,Se.linkText=!1,Se.em=!1,Se.strong=!1,Se.strikethrough=!1,Se.quote=0,Se.indentedCode=!1,Se.f==zt){var Vt=te;if(!Vt){var Xe=wt.innerMode(Ie,Se.htmlState);Vt=Xe.mode.name=="xml"&&Xe.state.tagStart===null&&!Xe.state.context&&Xe.state.tokenize.isInText}Vt&&(Se.f=le,Se.block=It,Se.htmlState=null)}return Se.trailingSpace=0,Se.trailingSpaceNewLine=!1,Se.prevLine=Se.thisLine,Se.thisLine={stream:null},null}function It(Se,Vt){var Xe=Se.column()===Vt.indentation,Xn=Pt(Vt.prevLine.stream),Bn=Vt.indentedCode,Ae=Vt.prevLine.hr,hn=Vt.list!==!1,bn=(Vt.listStack[Vt.listStack.length-1]||0)+3;Vt.indentedCode=!1;var Jn=Vt.indentation;if(Vt.indentationDiff===null&&(Vt.indentationDiff=Vt.indentation,hn)){for(Vt.list=null;Jn<Vt.listStack[Vt.listStack.length-1];)Vt.listStack.pop(),Vt.listStack.length?Vt.indentation=Vt.listStack[Vt.listStack.length-1]:Vt.list=!1;Vt.list!==!1&&(Vt.indentationDiff=Jn-Vt.listStack[Vt.listStack.length-1])}var mn=!Xn&&!Ae&&!Vt.prevLine.header&&(!hn||!Bn)&&!Vt.prevLine.fencedCodeEnd,ui=(Vt.list===!1||Ae||Xn)&&Vt.indentation<=bn&&Se.match(ve),Ce=null;if(Vt.indentationDiff>=4&&(Bn||Vt.prevLine.fencedCodeEnd||Vt.prevLine.header||Xn))return Se.skipToEnd(),Vt.indentedCode=!0,Nt.code;if(Se.eatSpace())return null;if(Xe&&Vt.indentation<=bn&&(Ce=Se.match(xe))&&Ce[1].length<=6)return Vt.quote=0,Vt.header=Ce[1].length,Vt.thisLine.header=!0,he.highlightFormatting&&(Vt.formatting="header"),Vt.f=Vt.inline,se(Vt);if(Vt.indentation<=bn&&Se.eat(">"))return Vt.quote=Xe?1:Vt.quote+1,he.highlightFormatting&&(Vt.formatting="quote"),Se.eatSpace(),se(Vt);if(!ui&&!Vt.setext&&Xe&&Vt.indentation<=bn&&(Ce=Se.match(Xt))){var ni=Ce[1]?"ol":"ul";return Vt.indentation=Jn+Se.current().length,Vt.list=!0,Vt.quote=0,Vt.listStack.push(Vt.indentation),Vt.em=!1,Vt.strong=!1,Vt.code=!1,Vt.strikethrough=!1,he.taskLists&&Se.match(fe,!1)&&(Vt.taskList=!0),Vt.f=Vt.inline,he.highlightFormatting&&(Vt.formatting=["list","list-"+ni]),se(Vt)}else{if(Xe&&Vt.indentation<=bn&&(Ce=Se.match(et,!0)))return Vt.quote=0,Vt.fencedEndRE=new RegExp(Ce[1]+"+ *$"),Vt.localMode=he.fencedCodeBlockHighlighting&&Pe(Ce[2]||he.fencedCodeBlockDefaultMode),Vt.localMode&&(Vt.localState=wt.startState(Vt.localMode)),Vt.f=Vt.block=_t,he.highlightFormatting&&(Vt.formatting="code-block"),Vt.code=-1,se(Vt);if(Vt.setext||(!mn||!hn)&&!Vt.quote&&Vt.list===!1&&!Vt.code&&!ui&&!nt.test(Se.string)&&(Ce=Se.lookAhead(1))&&(Ce=Ce.match(je)))return Vt.setext?(Vt.header=Vt.setext,Vt.setext=0,Se.skipToEnd(),he.highlightFormatting&&(Vt.formatting="header")):(Vt.header=Ce[0].charAt(0)=="="?1:2,Vt.setext=Vt.header),Vt.thisLine.header=!0,Vt.f=Vt.inline,se(Vt);if(ui)return Se.skipToEnd(),Vt.hr=!0,Vt.thisLine.hr=!0,Nt.hr;if(Se.peek()==="[")return gt(Se,Vt,Qe)}return gt(Se,Vt,Vt.inline)}function zt(Se,Vt){var Xe=Ie.token(Se,Vt.htmlState);if(!te){var Xn=wt.innerMode(Ie,Vt.htmlState);(Xn.mode.name=="xml"&&Xn.state.tagStart===null&&!Xn.state.context&&Xn.state.tokenize.isInText||Vt.md_inside&&Se.current().indexOf(">")>-1)&&(Vt.f=le,Vt.block=It,Vt.htmlState=null)}return Xe}function _t(Se,Vt){var Xe=Vt.listStack[Vt.listStack.length-1]||0,Xn=Vt.indentation<Xe,Bn=Xe+3;if(Vt.fencedEndRE&&Vt.indentation<=Bn&&(Xn||Se.match(Vt.fencedEndRE))){he.highlightFormatting&&(Vt.formatting="code-block");var Ae;return Xn||(Ae=se(Vt)),Vt.localMode=Vt.localState=null,Vt.block=It,Vt.f=le,Vt.fencedEndRE=null,Vt.code=0,Vt.thisLine.fencedCodeEnd=!0,Xn?yt(Se,Vt,Vt.block):Ae}else return Vt.localMode?Vt.localMode.token(Se,Vt.localState):(Se.skipToEnd(),Nt.code)}function se(Se){var Vt=[];if(Se.formatting){Vt.push(Nt.formatting),typeof Se.formatting=="string"&&(Se.formatting=[Se.formatting]);for(var Xe=0;Xe<Se.formatting.length;Xe++)Vt.push(Nt.formatting+"-"+Se.formatting[Xe]),Se.formatting[Xe]==="header"&&Vt.push(Nt.formatting+"-"+Se.formatting[Xe]+"-"+Se.header),Se.formatting[Xe]==="quote"&&(!he.maxBlockquoteDepth||he.maxBlockquoteDepth>=Se.quote?Vt.push(Nt.formatting+"-"+Se.formatting[Xe]+"-"+Se.quote):Vt.push("error"))}if(Se.taskOpen)return Vt.push("meta"),Vt.length?Vt.join(" "):null;if(Se.taskClosed)return Vt.push("property"),Vt.length?Vt.join(" "):null;if(Se.linkHref?Vt.push(Nt.linkHref,"url"):(Se.strong&&Vt.push(Nt.strong),Se.em&&Vt.push(Nt.em),Se.strikethrough&&Vt.push(Nt.strikethrough),Se.emoji&&Vt.push(Nt.emoji),Se.linkText&&Vt.push(Nt.linkText),Se.code&&Vt.push(Nt.code),Se.image&&Vt.push(Nt.image),Se.imageAltText&&Vt.push(Nt.imageAltText,"link"),Se.imageMarker&&Vt.push(Nt.imageMarker)),Se.header&&Vt.push(Nt.header,Nt.header+"-"+Se.header),Se.quote&&(Vt.push(Nt.quote),!he.maxBlockquoteDepth||he.maxBlockquoteDepth>=Se.quote?Vt.push(Nt.quote+"-"+Se.quote):Vt.push(Nt.quote+"-"+he.maxBlockquoteDepth)),Se.list!==!1){var Xn=(Se.listStack.length-1)%3;Xn?Xn===1?Vt.push(Nt.list2):Vt.push(Nt.list3):Vt.push(Nt.list1)}return Se.trailingSpaceNewLine?Vt.push("trailing-space-new-line"):Se.trailingSpace&&Vt.push("trailing-space-"+(Se.trailingSpace%2?"a":"b")),Vt.length?Vt.join(" "):null}function Jt(Se,Vt){if(Se.match(Bt,!0))return se(Vt)}function le(Se,Vt){var Xe=Vt.text(Se,Vt);if(typeof Xe!="undefined")return Xe;if(Vt.list)return Vt.list=null,se(Vt);if(Vt.taskList){var Xn=Se.match(fe,!0)[1]===" ";return Xn?Vt.taskOpen=!0:Vt.taskClosed=!0,he.highlightFormatting&&(Vt.formatting="task"),Vt.taskList=!1,se(Vt)}if(Vt.taskOpen=!1,Vt.taskClosed=!1,Vt.header&&Se.match(/^#+$/,!0))return he.highlightFormatting&&(Vt.formatting="header"),se(Vt);var Bn=Se.next();if(Vt.linkTitle){Vt.linkTitle=!1;var Ae=Bn;Bn==="("&&(Ae=")"),Ae=(Ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var hn="^\\s*(?:[^"+Ae+"\\\\]+|\\\\\\\\|\\\\.)"+Ae;if(Se.match(new RegExp(hn),!0))return Nt.linkHref}if(Bn==="`"){var bn=Vt.formatting;he.highlightFormatting&&(Vt.formatting="code"),Se.eatWhile("`");var Jn=Se.current().length;if(Vt.code==0&&(!Vt.quote||Jn==1))return Vt.code=Jn,se(Vt);if(Jn==Vt.code){var mn=se(Vt);return Vt.code=0,mn}else return Vt.formatting=bn,se(Vt)}else if(Vt.code)return se(Vt);if(Bn==="\\"&&(Se.next(),he.highlightFormatting)){var ui=se(Vt),Ce=Nt.formatting+"-escape";return ui?ui+" "+Ce:Ce}if(Bn==="!"&&Se.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Vt.imageMarker=!0,Vt.image=!0,he.highlightFormatting&&(Vt.formatting="image"),se(Vt);if(Bn==="["&&Vt.imageMarker&&Se.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Vt.imageMarker=!1,Vt.imageAltText=!0,he.highlightFormatting&&(Vt.formatting="image"),se(Vt);if(Bn==="]"&&Vt.imageAltText){he.highlightFormatting&&(Vt.formatting="image");var ui=se(Vt);return Vt.imageAltText=!1,Vt.image=!1,Vt.inline=Vt.f=Fe,ui}if(Bn==="["&&!Vt.image)return Vt.linkText&&Se.match(/^.*?\]/)||(Vt.linkText=!0,he.highlightFormatting&&(Vt.formatting="link")),se(Vt);if(Bn==="]"&&Vt.linkText){he.highlightFormatting&&(Vt.formatting="link");var ui=se(Vt);return Vt.linkText=!1,Vt.inline=Vt.f=Se.match(/\(.*?\)| ?\[.*?\]/,!1)?Fe:le,ui}if(Bn==="<"&&Se.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Vt.f=Vt.inline=Zt,he.highlightFormatting&&(Vt.formatting="link");var ui=se(Vt);return ui?ui+=" ":ui="",ui+Nt.linkInline}if(Bn==="<"&&Se.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Vt.f=Vt.inline=Zt,he.highlightFormatting&&(Vt.formatting="link");var ui=se(Vt);return ui?ui+=" ":ui="",ui+Nt.linkEmail}if(he.xml&&Bn==="<"&&Se.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ni=Se.string.indexOf(">",Se.pos);if(ni!=-1){var Pi=Se.string.substring(Se.start,ni);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Pi)&&(Vt.md_inside=!0)}return Se.backUp(1),Vt.htmlState=wt.startState(Ie),yt(Se,Vt,zt)}if(he.xml&&Bn==="<"&&Se.match(/^\/\w*?>/))return Vt.md_inside=!1,"tag";if(Bn==="*"||Bn==="_"){for(var gn=1,Tn=Se.pos==1?" ":Se.string.charAt(Se.pos-2);gn<3&&Se.eat(Bn);)gn++;var pn=Se.peek()||" ",Un=!/\s/.test(pn)&&(!ht.test(pn)||/\s/.test(Tn)||ht.test(Tn)),On=!/\s/.test(Tn)&&(!ht.test(Tn)||/\s/.test(pn)||ht.test(pn)),we=null,In=null;if(gn%2&&(!Vt.em&&Un&&(Bn==="*"||!On||ht.test(Tn))?we=!0:Vt.em==Bn&&On&&(Bn==="*"||!Un||ht.test(pn))&&(we=!1)),gn>1&&(!Vt.strong&&Un&&(Bn==="*"||!On||ht.test(Tn))?In=!0:Vt.strong==Bn&&On&&(Bn==="*"||!Un||ht.test(pn))&&(In=!1)),In!=null||we!=null){he.highlightFormatting&&(Vt.formatting=we==null?"strong":In==null?"em":"strong em"),we===!0&&(Vt.em=Bn),In===!0&&(Vt.strong=Bn);var mn=se(Vt);return we===!1&&(Vt.em=!1),In===!1&&(Vt.strong=!1),mn}}else if(Bn===" "&&(Se.eat("*")||Se.eat("_"))){if(Se.peek()===" ")return se(Vt);Se.backUp(1)}if(he.strikethrough){if(Bn==="~"&&Se.eatWhile(Bn)){if(Vt.strikethrough){he.highlightFormatting&&(Vt.formatting="strikethrough");var mn=se(Vt);return Vt.strikethrough=!1,mn}else if(Se.match(/^[^\s]/,!1))return Vt.strikethrough=!0,he.highlightFormatting&&(Vt.formatting="strikethrough"),se(Vt)}else if(Bn===" "&&Se.match(/^~~/,!0)){if(Se.peek()===" ")return se(Vt);Se.backUp(2)}}if(he.emoji&&Bn===":"&&Se.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Vt.emoji=!0,he.highlightFormatting&&(Vt.formatting="emoji");var rn=se(Vt);return Vt.emoji=!1,rn}return Bn===" "&&(Se.match(/^ +$/,!1)?Vt.trailingSpace++:Vt.trailingSpace&&(Vt.trailingSpaceNewLine=!0)),se(Vt)}function Zt(Se,Vt){var Xe=Se.next();if(Xe===">"){Vt.f=Vt.inline=le,he.highlightFormatting&&(Vt.formatting="link");var Xn=se(Vt);return Xn?Xn+=" ":Xn="",Xn+Nt.linkInline}return Se.match(/^[^>]+/,!0),Nt.linkInline}function Fe(Se,Vt){if(Se.eatSpace())return null;var Xe=Se.next();return Xe==="("||Xe==="["?(Vt.f=Vt.inline=Ve(Xe==="("?")":"]"),he.highlightFormatting&&(Vt.formatting="link-string"),Vt.linkHref=!0,se(Vt)):"error"}var me={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ve(Se){return function(Vt,Xe){var Xn=Vt.next();if(Xn===Se){Xe.f=Xe.inline=le,he.highlightFormatting&&(Xe.formatting="link-string");var Bn=se(Xe);return Xe.linkHref=!1,Bn}return Vt.match(me[Se]),Xe.linkHref=!0,se(Xe)}}function Qe(Se,Vt){return Se.match(/^([^\]\\]|\\.)*\]:/,!1)?(Vt.f=qe,Se.next(),he.highlightFormatting&&(Vt.formatting="link"),Vt.linkText=!0,se(Vt)):gt(Se,Vt,le)}function qe(Se,Vt){if(Se.match(/^\]:/,!0)){Vt.f=Vt.inline=vn,he.highlightFormatting&&(Vt.formatting="link");var Xe=se(Vt);return Vt.linkText=!1,Xe}return Se.match(/^([^\]\\]|\\.)+/,!0),Nt.linkText}function vn(Se,Vt){return Se.eatSpace()?null:(Se.match(/^[^\s]+/,!0),Se.peek()===void 0?Vt.linkTitle=!0:Se.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Vt.f=Vt.inline=le,Nt.linkHref+" url")}var xn={startState:function(){return{f:It,prevLine:{stream:null},thisLine:{stream:null},block:It,htmlState:null,indentation:0,inline:le,text:Jt,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(Se){return{f:Se.f,prevLine:Se.prevLine,thisLine:Se.thisLine,block:Se.block,htmlState:Se.htmlState&&wt.copyState(Ie,Se.htmlState),indentation:Se.indentation,localMode:Se.localMode,localState:Se.localMode?wt.copyState(Se.localMode,Se.localState):null,inline:Se.inline,text:Se.text,formatting:!1,linkText:Se.linkText,linkTitle:Se.linkTitle,linkHref:Se.linkHref,code:Se.code,em:Se.em,strong:Se.strong,strikethrough:Se.strikethrough,emoji:Se.emoji,header:Se.header,setext:Se.setext,hr:Se.hr,taskList:Se.taskList,list:Se.list,listStack:Se.listStack.slice(0),quote:Se.quote,indentedCode:Se.indentedCode,trailingSpace:Se.trailingSpace,trailingSpaceNewLine:Se.trailingSpaceNewLine,md_inside:Se.md_inside,fencedEndRE:Se.fencedEndRE}},token:function(Se,Vt){if(Vt.formatting=!1,Se!=Vt.thisLine.stream){if(Vt.header=0,Vt.hr=!1,Se.match(/^\s*$/,!0))return Tt(Vt),null;if(Vt.prevLine=Vt.thisLine,Vt.thisLine={stream:Se},Vt.taskList=!1,Vt.trailingSpace=0,Vt.trailingSpaceNewLine=!1,!Vt.localState&&(Vt.f=Vt.block,Vt.f!=zt)){var Xe=Se.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Vt.indentation=Xe,Vt.indentationDiff=null,Xe>0)return null}}return Vt.f(Se,Vt)},innerMode:function(Se){return Se.block==zt?{state:Se.htmlState,mode:Ie}:Se.localState?{state:Se.localState,mode:Se.localMode}:{state:Se,mode:xn}},indent:function(Se,Vt,Xe){return Se.block==zt&&Ie.indent?Ie.indent(Se.htmlState,Vt,Xe):Se.localState&&Se.localMode.indent?Se.localMode.indent(Se.localState,Vt,Xe):wt.Pass},blankLine:Tt,getType:se,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return xn},"xml"),wt.defineMIME("text/markdown","markdown"),wt.defineMIME("text/x-markdown","markdown")})},98101:function(dn,Mn,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 ee=0;ee<wt.modeInfo.length;ee++){var he=wt.modeInfo[ee];he.mimes&&(he.mime=he.mimes[0])}wt.findModeByMIME=function(Ie){Ie=Ie.toLowerCase();for(var te=0;te<wt.modeInfo.length;te++){var Pe=wt.modeInfo[te];if(Pe.mime==Ie)return Pe;if(Pe.mimes){for(var Nt=0;Nt<Pe.mimes.length;Nt++)if(Pe.mimes[Nt]==Ie)return Pe}}if(/\+xml$/.test(Ie))return wt.findModeByMIME("application/xml");if(/\+json$/.test(Ie))return wt.findModeByMIME("application/json")},wt.findModeByExtension=function(Ie){Ie=Ie.toLowerCase();for(var te=0;te<wt.modeInfo.length;te++){var Pe=wt.modeInfo[te];if(Pe.ext){for(var Nt=0;Nt<Pe.ext.length;Nt++)if(Pe.ext[Nt]==Ie)return Pe}}},wt.findModeByFileName=function(Ie){for(var te=0;te<wt.modeInfo.length;te++){var Pe=wt.modeInfo[te];if(Pe.file&&Pe.file.test(Ie))return Pe}var Nt=Ie.lastIndexOf("."),Le=Nt>-1&&Ie.substring(Nt+1,Ie.length);if(Le)return wt.findModeByExtension(Le)},wt.findModeByName=function(Ie){Ie=Ie.toLowerCase();for(var te=0;te<wt.modeInfo.length;te++){var Pe=wt.modeInfo[te];if(Pe.name.toLowerCase()==Ie)return Pe;if(Pe.alias){for(var Nt=0;Nt<Pe.alias.length;Nt++)if(Pe.alias[Nt].toLowerCase()==Ie)return Pe}}}})},67549:function(dn,Mn,bt){(function(wt){wt(bt(89780))})(function(wt){"use strict";wt.defineMode("stex",function(ee,he){"use strict";function Ie(Bt,et){Bt.cmdState.push(et)}function te(Bt){return Bt.cmdState.length>0?Bt.cmdState[Bt.cmdState.length-1]:null}function Pe(Bt){var et=Bt.cmdState.pop();et&&et.closeBracket()}function Nt(Bt){for(var et=Bt.cmdState,nt=et.length-1;nt>=0;nt--){var ht=et[nt];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function Le(Bt,et,nt){return function(){this.name=Bt,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 ve={};ve.importmodule=Le("importmodule","tag",["string","builtin"]),ve.documentclass=Le("documentclass","tag",["","atom"]),ve.usepackage=Le("usepackage","tag",["atom"]),ve.begin=Le("begin","tag",["atom"]),ve.end=Le("end","tag",["atom"]),ve.label=Le("label","tag",["atom"]),ve.ref=Le("ref","tag",["atom"]),ve.eqref=Le("eqref","tag",["atom"]),ve.cite=Le("cite","tag",["atom"]),ve.bibitem=Le("bibitem","tag",["atom"]),ve.Bibitem=Le("Bibitem","tag",["atom"]),ve.RBibitem=Le("RBibitem","tag",["atom"]),ve.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Xt(Bt,et){Bt.f=et}function fe(Bt,et){var nt;if(Bt.match(/^\\[a-zA-Z@]+/)){var ht=Bt.current().slice(1);return nt=ve.hasOwnProperty(ht)?ve[ht]:ve.DEFAULT,nt=new nt,Ie(et,nt),Xt(et,je),nt.style}if(Bt.match(/^\\[$&%#{}_]/)||Bt.match(/^\\[,;!\/\\]/))return"tag";if(Bt.match("\\["))return Xt(et,function(gt,yt){return xe(gt,yt,"\\]")}),"keyword";if(Bt.match("\\("))return Xt(et,function(gt,yt){return xe(gt,yt,"\\)")}),"keyword";if(Bt.match("$$"))return Xt(et,function(gt,yt){return xe(gt,yt,"$$")}),"keyword";if(Bt.match("$"))return Xt(et,function(gt,yt){return xe(gt,yt,"$")}),"keyword";var lt=Bt.next();if(lt=="%")return Bt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(nt=te(et),nt)nt.closeBracket(lt),Xt(et,je);else return"error";return"bracket"}else return lt=="{"||lt=="["?(nt=ve.DEFAULT,nt=new nt,Ie(et,nt),"bracket"):/\d/.test(lt)?(Bt.eatWhile(/[\w.%]/),"atom"):(Bt.eatWhile(/[\w\-_]/),nt=Nt(et),nt.name=="begin"&&(nt.argument=Bt.current()),nt.styleIdentifier())}function xe(Bt,et,nt){if(Bt.eatSpace())return null;if(nt&&Bt.match(nt))return Xt(et,fe),"keyword";if(Bt.match(/^\\[a-zA-Z@]+/))return"tag";if(Bt.match(/^[a-zA-Z]+/))return"variable-2";if(Bt.match(/^\\[$&%#{}_]/)||Bt.match(/^\\[,;!\/]/)||Bt.match(/^[\^_&]/))return"tag";if(Bt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Bt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=Bt.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(Bt.skipToEnd(),"comment"):"error"}function je(Bt,et){var nt=Bt.peek(),ht;return nt=="{"||nt=="["?(ht=te(et),ht.openBracket(nt),Bt.eat(nt),Xt(et,fe),"bracket"):/[ \t\r]/.test(nt)?(Bt.eat(nt),null):(Xt(et,fe),Pe(et),fe(Bt,et))}return{startState:function(){var Bt=he.inMathMode?function(et,nt){return xe(et,nt)}:fe;return{cmdState:[],f:Bt}},copyState:function(Bt){return{cmdState:Bt.cmdState.slice(),f:Bt.f}},token:function(Bt,et){return et.f(Bt,et)},blankLine:function(Bt){Bt.f=fe,Bt.cmdState.length=0},lineComment:"%"}}),wt.defineMIME("text/x-stex","stex"),wt.defineMIME("text/x-latex","stex")})},15525:function(dn,Mn,bt){(function(wt){wt(bt(89780))})(function(wt){"use strict";var ee={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},he={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};wt.defineMode("xml",function(Ie,te){var Pe=Ie.indentUnit,Nt={},Le=te.htmlMode?ee:he;for(var ve in Le)Nt[ve]=Le[ve];for(var ve in te)Nt[ve]=te[ve];var Xt,fe;function xe(Zt,Fe){function me(qe){return Fe.tokenize=qe,qe(Zt,Fe)}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\._\-]/),Fe.tokenize=et("meta","?>"),"meta"):(Xt=Zt.eat("/")?"closeTag":"openTag",Fe.tokenize=je,"tag bracket");if(Ve=="&"){var Qe;return Zt.eat("#")?Zt.eat("x")?Qe=Zt.eatWhile(/[a-fA-F\d]/)&&Zt.eat(";"):Qe=Zt.eatWhile(/[\d]/)&&Zt.eat(";"):Qe=Zt.eatWhile(/[\w\.\-:]/)&&Zt.eat(";"),Qe?"atom":"error"}else return Zt.eatWhile(/[^&<]/),null}xe.isInText=!0;function je(Zt,Fe){var me=Zt.next();if(me==">"||me=="/"&&Zt.eat(">"))return Fe.tokenize=xe,Xt=me==">"?"endTag":"selfcloseTag","tag bracket";if(me=="=")return Xt="equals",null;if(me=="<"){Fe.tokenize=xe,Fe.state=yt,Fe.tagName=Fe.tagStart=null;var Ve=Fe.tokenize(Zt,Fe);return Ve?Ve+" tag error":"tag error"}else return/[\'\"]/.test(me)?(Fe.tokenize=Bt(me),Fe.stringStartCol=Zt.column(),Fe.tokenize(Zt,Fe)):(Zt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Bt(Zt){var Fe=function(me,Ve){for(;!me.eol();)if(me.next()==Zt){Ve.tokenize=je;break}return"string"};return Fe.isInAttribute=!0,Fe}function et(Zt,Fe){return function(me,Ve){for(;!me.eol();){if(me.match(Fe)){Ve.tokenize=xe;break}me.next()}return Zt}}function nt(Zt){return function(Fe,me){for(var Ve;(Ve=Fe.next())!=null;){if(Ve=="<")return me.tokenize=nt(Zt+1),me.tokenize(Fe,me);if(Ve==">")if(Zt==1){me.tokenize=xe;break}else return me.tokenize=nt(Zt-1),me.tokenize(Fe,me)}return"meta"}}function ht(Zt,Fe,me){this.prev=Zt.context,this.tagName=Fe,this.indent=Zt.indented,this.startOfLine=me,(Nt.doNotIndent.hasOwnProperty(Fe)||Zt.context&&Zt.context.noIndent)&&(this.noIndent=!0)}function lt(Zt){Zt.context&&(Zt.context=Zt.context.prev)}function gt(Zt,Fe){for(var me;;){if(!Zt.context||(me=Zt.context.tagName,!Nt.contextGrabbers.hasOwnProperty(me)||!Nt.contextGrabbers[me].hasOwnProperty(Fe)))return;lt(Zt)}}function yt(Zt,Fe,me){return Zt=="openTag"?(me.tagStart=Fe.column(),Pt):Zt=="closeTag"?Tt:yt}function Pt(Zt,Fe,me){return Zt=="word"?(me.tagName=Fe.current(),fe="tag",_t):Nt.allowMissingTagName&&Zt=="endTag"?(fe="tag bracket",_t(Zt,Fe,me)):(fe="error",Pt)}function Tt(Zt,Fe,me){if(Zt=="word"){var Ve=Fe.current();return me.context&&me.context.tagName!=Ve&&Nt.implicitlyClosed.hasOwnProperty(me.context.tagName)&<(me),me.context&&me.context.tagName==Ve||Nt.matchClosing===!1?(fe="tag",It):(fe="tag error",zt)}else return Nt.allowMissingTagName&&Zt=="endTag"?(fe="tag bracket",It(Zt,Fe,me)):(fe="error",zt)}function It(Zt,Fe,me){return Zt!="endTag"?(fe="error",It):(lt(me),yt)}function zt(Zt,Fe,me){return fe="error",It(Zt,Fe,me)}function _t(Zt,Fe,me){if(Zt=="word")return fe="attribute",se;if(Zt=="endTag"||Zt=="selfcloseTag"){var Ve=me.tagName,Qe=me.tagStart;return me.tagName=me.tagStart=null,Zt=="selfcloseTag"||Nt.autoSelfClosers.hasOwnProperty(Ve)?gt(me,Ve):(gt(me,Ve),me.context=new ht(me,Ve,Qe==me.indented)),yt}return fe="error",_t}function se(Zt,Fe,me){return Zt=="equals"?Jt:(Nt.allowMissing||(fe="error"),_t(Zt,Fe,me))}function Jt(Zt,Fe,me){return Zt=="string"?le:Zt=="word"&&Nt.allowUnquoted?(fe="string",_t):(fe="error",_t(Zt,Fe,me))}function le(Zt,Fe,me){return Zt=="string"?le:_t(Zt,Fe,me)}return{startState:function(Zt){var Fe={tokenize:xe,state:yt,indented:Zt||0,tagName:null,tagStart:null,context:null};return Zt!=null&&(Fe.baseIndent=Zt),Fe},token:function(Zt,Fe){if(!Fe.tagName&&Zt.sol()&&(Fe.indented=Zt.indentation()),Zt.eatSpace())return null;Xt=null;var me=Fe.tokenize(Zt,Fe);return(me||Xt)&&me!="comment"&&(fe=null,Fe.state=Fe.state(Xt||me,Zt,Fe),fe&&(me=fe=="error"?me+" error":fe)),me},indent:function(Zt,Fe,me){var Ve=Zt.context;if(Zt.tokenize.isInAttribute)return Zt.tagStart==Zt.indented?Zt.stringStartCol+1:Zt.indented+Pe;if(Ve&&Ve.noIndent)return wt.Pass;if(Zt.tokenize!=je&&Zt.tokenize!=xe)return me?me.match(/^(\s*)/)[0].length:0;if(Zt.tagName)return Nt.multilineTagIndentPastTag!==!1?Zt.tagStart+Zt.tagName.length+2:Zt.tagStart+Pe*(Nt.multilineTagIndentFactor||1);if(Nt.alignCDATA&&/<!\[CDATA\[/.test(Fe))return 0;var Qe=Fe&&/^<(\/)?([\w_:\.-]*)/.exec(Fe);if(Qe&&Qe[1])for(;Ve;)if(Ve.tagName==Qe[2]){Ve=Ve.prev;break}else if(Nt.implicitlyClosed.hasOwnProperty(Ve.tagName))Ve=Ve.prev;else break;else if(Qe)for(;Ve;){var qe=Nt.contextGrabbers[Ve.tagName];if(qe&&qe.hasOwnProperty(Qe[2]))Ve=Ve.prev;else break}for(;Ve&&Ve.prev&&!Ve.startOfLine;)Ve=Ve.prev;return Ve?Ve.indent+Pe:Zt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Nt.htmlMode?"html":"xml",helperType:Nt.htmlMode?"html":"xml",skipAttribute:function(Zt){Zt.state==Jt&&(Zt.state=_t)},xmlCurrentTag:function(Zt){return Zt.tagName?{name:Zt.tagName,close:Zt.type=="closeTag"}:null},xmlCurrentContext:function(Zt){for(var Fe=[],me=Zt.context;me;me=me.prev)me.tagName&&Fe.push(me.tagName);return Fe.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(dn,Mn,bt){"use strict";bt.d(Mn,{$u:function(){return ve},BD:function(){return gn},E9:function(){return Le},FF:function(){return Do},FJ:function(){return yt},Hn:function(){return gt},KX:function(){return Tt},NB:function(){return Ft},S0:function(){return Ce},UL:function(){return Xt},Vk:function(){return lt},Vm:function(){return mt},YI:function(){return ni},ZA:function(){return he},Zt:function(){return fe},al:function(){return we},bn:function(){return On},bx:function(){return Tn},g2:function(){return Pi},h1:function(){return Jt},hD:function(){return Vn},l4:function(){return Pe},rU:function(){return St},s_:function(){return pn},uz:function(){return oe},z6:function(){return xe}}),dn=bt.hmd(dn),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},si={};try{si.__proto__=Ci,ls=si.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 Te=rs;function Ee(a,y){if(a.prototype=ts(y.prototype),a.prototype.constructor=a,Te)Te(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 Wt=typeof bt.g!="undefined"&&bt.g!=null?bt.g:self,Ge=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},Ue=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ue(a,y){if(y){var x=Wt;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&&Ue(x,a,{writable:!0,value:y})}}ue("Object.assign",function(a){return a||Ge}),ue("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 ze(){}function sn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&qt.clearTimeout(x),x=Ln(function(){x=-1,a.apply(E,b)},y)}}function Ln(a,y){return qt.setTimeout(a,y)}function Nn(a){return qt.document.createElement(a)}function ie(a){throw Error(a)}function Je(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),ie(a)}function Cn(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),ie(x+" is not in the range "+y+": "+a)}function $n(a){qt.console&&qt.console.log(a)}function We(a){return typeof a=="object"&&a!==null}function Ye(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 Zn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):ie("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):ie("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Hn(){var a=zo.pop();return a===void 0?[]:a}function ti(a){a.length=0,zo.push(a)}function Qn(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(We(a)&&a.constructor)return Qn(a.constructor);return typeof a}function wi(a){var y=a;return We(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"),Eo=qt.navigator!==void 0&&qt.navigator.platform!==void 0&&qt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,zo=[];Object.freeze([]),ze.className="Util",ze.Dx="32ab5ff3b26f42dc0ed90f21472913b5",ze.adym="gojs.net",ze.vfo="28e645fdb266",ze.className="Util";function Ze(a,y,x){ho(this),this.j=a,this.xa=y,this.o=x}Ze.prototype.toString=function(){return"EnumValue."+this.xa};function jn(a,y){return y==null||y===""?null:a[y]}Wt.Object.defineProperties(Ze.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Ze.className="EnumValue";function ei(){this.ew=[]}ei.prototype.toString=function(){return this.ew.join("")},ei.prototype.add=function(a){a!==""&&this.ew.push(a)},ei.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 mi(){}mi.prototype.reset=function(){},mi.prototype.next=function(){return!1},mi.prototype.Ad=function(){return!1},mi.prototype.first=function(){return null},mi.prototype.any=function(){return!1},mi.prototype.all=function(){return!0},mi.prototype.each=function(){return this},mi.prototype.map=function(){return this},mi.prototype.filter=function(){return this},mi.prototype.de=function(){},mi.prototype.toString=function(){return"EmptyIterator"},Wt.Object.defineProperties(mi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),mi.prototype.first=mi.prototype.first,mi.prototype.hasNext=mi.prototype.Ad,mi.prototype.next=mi.prototype.next,mi.prototype.reset=mi.prototype.reset;var Ui=null;mi.className="EmptyIterator",Ui=new mi;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+")"},Wt.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 Hi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Hi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Hi.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},Hi.prototype.Ad=function(){return this.next()},Hi.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},Hi.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},Hi.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},Hi.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},Hi.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 un,a.s=x,a.xb(),a.iterator},Hi.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 un,a.s=x,a.xb(),a.iterator},Hi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Hi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Wt.Object.defineProperties(Hi.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}}}),Hi.prototype.first=Hi.prototype.first,Hi.prototype.hasNext=Hi.prototype.Ad,Hi.prototype.next=Hi.prototype.next,Hi.prototype.reset=Hi.prototype.reset,Hi.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 un,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 un,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+")"},Wt.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 un(a){ho(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&ie("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=un.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()#"+Ho(this)},Mt.add=function(a){return a===null?this:(this._isFrozen&&Je(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&&Je(this);var y=this.s;if(Ye(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&&Je(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)&&Cn(a,"0 <= i < length",un,"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)&&Cn(a,"0 <= i < length",un,"setElt:i"),this._isFrozen&&Je(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&&Je(this);var a=this.s;return 0<a.length?a.pop():null},un.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},un.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},un.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},un.prototype.map=function(a){for(var y=new un,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},un.prototype.filter=function(a){for(var y=new un,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=un.prototype,Mt.Gb=function(a,y){0>a&&Cn(a,">= 0",un,"insertAt:i"),this._isFrozen&&Je(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&&Je(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)&&Cn(a,"0 <= i < length",un,"removeAt:i"),this._isFrozen&&Je(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&&Je(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},un.prototype.copy=function(){var a=new un,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Mt=un.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 nn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Mt.sort=function(a){return this._isFrozen&&Je(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&&Je(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Cn(y,"0 <= from < length",un,"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&&Je(this),this.s.reverse(),this.xb(),this},Wt.Object.defineProperties(un.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 Hi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Ui;var a=this.Hg;return a!==null?(a.reset(),a):new uo(this)}}}),un.prototype.reverse=un.prototype.reverse,un.prototype.sortRange=un.prototype.zi,un.prototype.sort=un.prototype.sort,un.prototype.toSet=un.prototype.Iv,un.prototype.toArray=un.prototype.Fa,un.prototype.removeRange=un.prototype.removeRange,un.prototype.removeAt=un.prototype.mb,un.prototype.delete=un.prototype.delete,un.prototype.remove=un.prototype.remove,un.prototype.insertAt=un.prototype.Gb,un.prototype.pop=un.prototype.pop,un.prototype.last=un.prototype.jc,un.prototype.first=un.prototype.first,un.prototype.set=un.prototype.set,un.prototype.setElt=un.prototype.cd,un.prototype.get=un.prototype.get,un.prototype.elt=un.prototype.M,un.prototype.indexOf=un.prototype.indexOf,un.prototype.has=un.prototype.has,un.prototype.contains=un.prototype.contains,un.prototype.clear=un.prototype.clear,un.prototype.addAll=un.prototype.addAll,un.prototype.push=un.prototype.push,un.prototype.add=un.prototype.add,un.prototype.thaw=un.prototype.ka,un.prototype.freeze=un.prototype.freeze,un.className="List";function Jo(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Jo.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Jo.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)},Jo.prototype.Ad=function(){return this.next()},Jo.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},Jo.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},Jo.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},Jo.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},Jo.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new un;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Jo.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new un;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Jo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Jo.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Wt.Object.defineProperties(Jo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Jo.prototype.first=Jo.prototype.first,Jo.prototype.hasNext=Jo.prototype.Ad,Jo.prototype.next=Jo.prototype.next,Jo.prototype.reset=Jo.prototype.reset,Jo.className="SetIterator";function nn(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"&&ie("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=nn.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()#"+Ho(this)},Mt.add=function(a){if(a===null)return this;this._isFrozen&&Je(this,a);var y=a;return We(a)&&(y=Er(a)),this.Tb[y]===void 0&&(this.Sb++,a=new So(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&&Je(this),Ye(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 We(a)&&(y=Ho(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},nn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},nn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},nn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},nn.prototype.map=function(a){for(var y=new nn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},nn.prototype.filter=function(a){for(var y=new nn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Mt=nn.prototype,Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&Je(this,a);var y=a;if(We(a)&&(y=Ho(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&&Je(this),Ye(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&&Je(this);var y=new nn;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&&Je(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},nn.prototype.copy=function(){var a=new nn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},nn.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},nn.prototype.Hv=function(){var a=new un,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 Ho(a){return a.__gohashid}Wt.Object.defineProperties(nn.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 Jo(this)}}}),nn.prototype.toList=nn.prototype.Hv,nn.prototype.toArray=nn.prototype.Fa,nn.prototype.clear=nn.prototype.clear,nn.prototype.retainAll=nn.prototype.pA,nn.prototype.removeAll=nn.prototype.hp,nn.prototype.delete=nn.prototype.delete,nn.prototype.remove=nn.prototype.remove,nn.prototype.first=nn.prototype.first,nn.prototype.containsAny=nn.prototype.Ty,nn.prototype.containsAll=nn.prototype.Sy,nn.prototype.has=nn.prototype.has,nn.prototype.contains=nn.prototype.contains,nn.prototype.addAll=nn.prototype.addAll,nn.prototype.add=nn.prototype.add,nn.prototype.thaw=nn.prototype.ka,nn.prototype.freeze=nn.prototype.freeze;var Fr=1;nn.className="Set",nn.uniqueHash=ho,nn.hashIdUnique=Er,nn.hashId=Ho;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 un;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 un;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"},Wt.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 Oi(a){nn.call(this),ho(this),this._isFrozen=!0,this.ma=a}Ee(Oi,nn),Mt=Oi.prototype,Mt.freeze=function(){return this},Mt.ka=function(){return this},Mt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Mt.add=function(){ie("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(){ie("This Set is read-only: "+this.toString())},Mt.delete=function(a){return this.remove(a)},Mt.clear=function(){ie("This Set is read-only: "+this.toString())},Mt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Oi.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Oi.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Oi.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Oi.prototype.map=function(a){for(var y=new nn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Oi.prototype.filter=function(a){for(var y=new nn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Oi.prototype.copy=function(){return new Oi(this.ma)},Oi.prototype.Iv=function(){var a=new nn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Oi.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},Oi.prototype.Hv=function(){var a=new un,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Wt.Object.defineProperties(Oi.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)}}}),Oi.prototype.toList=Oi.prototype.Hv,Oi.prototype.toArray=Oi.prototype.Fa,Oi.prototype.toSet=Oi.prototype.Iv,Oi.prototype.first=Oi.prototype.first,Oi.prototype.clear=Oi.prototype.clear,Oi.prototype.delete=Oi.prototype.delete,Oi.prototype.remove=Oi.prototype.remove,Oi.prototype.has=Oi.prototype.has,Oi.prototype.contains=Oi.prototype.contains,Oi.prototype.add=Oi.prototype.add,Oi.prototype.thaw=Oi.prototype.ka,Oi.prototype.freeze=Oi.prototype.freeze,Oi.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 un;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 un;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"},Wt.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 So(a,y){this.key=a,this.value=y,this.ll=this.va=null}So.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},So.className="KeyValuePair";function ko(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ko.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},ko.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)},ko.prototype.Ad=function(){return this.next()},ko.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},ko.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},ko.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},ko.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},ko.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new un;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},ko.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new un;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},ko.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},ko.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Wt.Object.defineProperties(ko.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ko.prototype.first=ko.prototype.first,ko.prototype.hasNext=ko.prototype.Ad,ko.prototype.next=ko.prototype.next,ko.prototype.reset=ko.prototype.reset,ko.className="MapIterator";function _n(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"&&ie("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=_n.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()#"+Ho(this)},Mt.add=function(a,y){this._isFrozen&&Je(this,a);var x=a;We(a)&&(x=Er(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new So(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(Ye(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 _n)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},_n.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},_n.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},_n.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},_n.prototype.map=function(a){for(var y=new _n,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},_n.prototype.filter=function(a){for(var y=new _n,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Mt=_n.prototype,Mt.contains=function(a){var y=a;return We(a)&&(y=Ho(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 We(a)&&(y=Ho(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&&Je(this,a);var y=a;if(We(a)&&(y=Ho(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&&Je(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()},_n.prototype.copy=function(){var a=new _n,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},_n.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 So(b.key,b.value),x++}return y},_n.prototype.Lf=function(){return new Oi(this)},Wt.Object.defineProperties(_n.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 ko(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)}}}),_n.prototype.toKeySet=_n.prototype.Lf,_n.prototype.toArray=_n.prototype.Fa,_n.prototype.clear=_n.prototype.clear,_n.prototype.delete=_n.prototype.delete,_n.prototype.remove=_n.prototype.remove,_n.prototype.get=_n.prototype.get,_n.prototype.getValue=_n.prototype.I,_n.prototype.has=_n.prototype.has,_n.prototype.contains=_n.prototype.contains,_n.prototype.first=_n.prototype.first,_n.prototype.addAll=_n.prototype.addAll,_n.prototype.set=_n.prototype.set,_n.prototype.add=_n.prototype.add,_n.prototype.thaw=_n.prototype.ka,_n.prototype.freeze=_n.prototype.freeze,_n.className="Map";function jt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):ie("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var _o,xr,es,cs,us;jt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},jt.prototype.h=function(a,y){return this.x=a,this.y=y,this},jt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},jt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},jt.prototype.copy=function(){var a=new jt;return a.x=this.x,a.y=this.y,a},Mt=jt.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)&&ie("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 jt(x,b)}return new jt}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 jt?this.x===a.x&&this.y===a.y:!1},Mt.hi=function(a,y){return this.x===a&&this.y===y},Mt.Xa=function(a){return pe.B(this.x,a.x)&&pe.B(this.y,a.y)},Mt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Mt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},jt.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=jt.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 Zo(a.x-this.x,a.y-this.y)},Mt.direction=function(a,y){return Zo(a-this.x,y-this.y)};function Zo(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Mt.Ry=function(a,y){return pe.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Mt.fA=function(a,y,x,E){return pe.qh(a,y,x,E,this.x,this.y,this),this},Mt.gA=function(a,y){return pe.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Mt.uA=function(a,y,x,E){return pe.No(this.x,this.y,a,y,x,E,this),this},Mt.vA=function(a,y){return pe.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Mt.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Mt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Mt.transform=function(a){return a.Ga(this),this};function 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)},jt.alloc=function(){var a=Bi.pop();return a===void 0?new jt:a},jt.allocAt=function(a,y){var x=Bi.pop();return x===void 0?new jt(a,y):(x.x=a,x.y=y,x)},jt.free=function(a){Bi.push(a)},jt.prototype.isReal=jt.prototype.w,jt.prototype.setSpot=jt.prototype.yi,jt.prototype.setRectSpot=jt.prototype.xi,jt.prototype.snapToGridPoint=jt.prototype.vA,jt.prototype.snapToGrid=jt.prototype.uA,jt.prototype.projectOntoLineSegmentPoint=jt.prototype.gA,jt.prototype.projectOntoLineSegment=jt.prototype.fA,jt.intersectingLineSegments=function(a,y,x,E,b,z,tt,ot){return pe.Rl(a,y,x,E,b,z,tt,ot)},jt.prototype.compareWithLineSegmentPoint=jt.prototype.Ry,jt.compareWithLineSegment=function(a,y,x,E,b,z){return pe.Fl(a,y,x,E,b,z)},jt.prototype.direction=jt.prototype.direction,jt.prototype.directionPoint=jt.prototype.ab,jt.prototype.normalize=jt.prototype.normalize,jt.prototype.distanceSquared=jt.prototype.zd,jt.prototype.distanceSquaredPoint=jt.prototype.Bf,jt.prototype.scale=jt.prototype.scale,jt.prototype.rotate=jt.prototype.rotate,jt.prototype.offset=jt.prototype.offset,jt.prototype.subtract=jt.prototype.re,jt.prototype.add=jt.prototype.add,jt.prototype.equalsApprox=jt.prototype.Xa,jt.prototype.equalTo=jt.prototype.hi,jt.prototype.equals=jt.prototype.D,jt.prototype.set=jt.prototype.set,jt.prototype.setTo=jt.prototype.sg;var Bi=[];jt.className="Point",jt.parse=no,jt.stringify=$i,jt.distanceLineSegmentSquared=lr,jt.distanceSquared=ms,jt.direction=Ji,jt.Origin=_o=new jt(0,0).ja(),jt.InfiniteTopLeft=xr=new jt(-1/0,-1/0).ja(),jt.InfiniteBottomRight=es=new jt(1/0,1/0).ja(),jt.SixPoint=cs=new jt(6,6).ja(),jt.NoPoint=us=new jt(NaN,NaN).ja(),jt.parse=no,jt.stringify=$i,jt.distanceLineSegmentSquared=lr,jt.distanceSquared=ms,jt.direction=Ji;function En(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):ie("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ki,qo,jr,Ir,Ur,hs,ns;En.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},En.prototype.h=function(a,y){return this.width=a,this.height=y,this},En.prototype.sg=function(a,y){return this.width=a,this.height=y,this},En.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},En.prototype.copy=function(){var a=new En;return a.width=this.width,a.height=this.height,a},Mt=En.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)&&ie("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 En(x,b)}return new En}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 En?this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y){return this.width===a&&this.height===y},Mt.Xa=function(a){return pe.B(this.width,a.width)&&pe.B(this.height,a.height)},Mt.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Mt.w=function(){return isFinite(this.width)&&isFinite(this.height)},En.alloc=function(){var a=ga.pop();return a===void 0?new En:a},En.free=function(a){ga.push(a)},En.prototype.isReal=En.prototype.w,En.prototype.inflate=En.prototype.Bc,En.prototype.equalsApprox=En.prototype.Xa,En.prototype.equalTo=En.prototype.hi,En.prototype.equals=En.prototype.D,En.prototype.set=En.prototype.set,En.prototype.setTo=En.prototype.sg;var ga=[];En.className="Size",En.parse=sa,En.stringify=Ys,En.ZeroSize=Ki=new En(0,0).ja(),En.OneSize=qo=new En(1,1).ja(),En.SixSize=jr=new En(6,6).ja(),En.EightSize=Ir=new En(8,8).ja(),En.TenSize=Ur=new En(10,10).ja(),En.InfiniteSize=hs=new En(1/0,1/0).ja(),En.NoSize=ns=new En(NaN,NaN).ja(),En.parse=sa,En.stringify=Ys;function Ke(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 jt?(x=a.x,a=a.y,y instanceof jt?(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 En?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):ie("Incorrect second argument supplied to Rect constructor "+y)):ie("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Mt=Ke.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},Ke.prototype.copy=function(){var a=new Ke;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Mt=Ke.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)&&ie("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 Ke(x,b,z,tt)}return new Ke}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 Ke?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Mt.Xa=function(a){return pe.B(this.x,a.x)&&pe.B(this.y,a.y)&&pe.B(this.width,a.width)&&pe.B(this.height,a.height)};function gl(a,y){return pe.$(a.x,y.x)&&pe.$(a.y,y.y)&&pe.$(a.width,y.width)&&pe.$(a.height,y.height)}Mt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Mt.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Mt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},Mt.Bc=function(a,y){return 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 Nu(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},Ke.alloc=function(){var a=Uo.pop();return a===void 0?new Ke:a},Ke.allocAt=function(a,y,x,E){var b=Uo.pop();return b===void 0?new Ke(a,y,x,E):b.h(a,y,x,E)},Ke.free=function(a){Uo.push(a)},Wt.Object.defineProperties(Ke.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new jt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new En(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new jt(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Ke.prototype.isEmpty=Ke.prototype.Mz,Ke.prototype.isReal=Ke.prototype.w,Ke.intersectsLineSegment=function(a,y,x,E,b,z,tt,ot){return pe.Fx(a,y,x,E,b,z,tt,ot)},Ke.prototype.setSpot=Ke.prototype.yi,Ke.prototype.union=Ke.prototype.Kv,Ke.prototype.unionRect=Ke.prototype.ed,Ke.prototype.unionPoint=Ke.prototype.Ye,Ke.prototype.intersects=Ke.prototype.Vu,Ke.prototype.intersectsRect=Ke.prototype.Yc,Ke.prototype.intersect=Ke.prototype.Uu,Ke.prototype.intersectRect=Ke.prototype.Ex,Ke.prototype.grow=Ke.prototype.Hz,Ke.prototype.subtractMargin=Ke.prototype.Fv,Ke.prototype.addMargin=Ke.prototype.Co,Ke.prototype.inflate=Ke.prototype.Bc,Ke.prototype.offset=Ke.prototype.offset,Ke.prototype.contains=Ke.prototype.contains,Ke.prototype.containsRect=Ke.prototype.Re,Ke.prototype.containsPoint=Ke.prototype.ca,Ke.prototype.equalsApprox=Ke.prototype.Xa,Ke.prototype.equalTo=Ke.prototype.hi,Ke.prototype.equals=Ke.prototype.D,Ke.prototype.setSize=Ke.prototype.tA,Ke.prototype.setPoint=Ke.prototype.dd,Ke.prototype.set=Ke.prototype.set,Ke.prototype.setTo=Ke.prototype.sg;var so=null,hr=null,Uo=[];Ke.className="Rect",Ke.parse=mu,Ke.stringify=Ka,Ke.contains=As,Ke.intersects=kl,Ke.ZeroRect=so=new Ke(0,0,0,0).ja(),Ke.NoRect=hr=new Ke(NaN,NaN,NaN,NaN).ja(),Ke.parse=mu,Ke.stringify=Ka,Ke.contains=As,Ke.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):ie("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)&&ie("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 pe.B(this.top,a.top)&&pe.B(this.right,a.right)&&pe.B(this.bottom,a.bottom)&&pe.B(this.left,a.left)},Mt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},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 ii(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,mo,Tu,Ia,Da,Ca,zl,vu,pa,Oa,Bu,bh,dh,qh,ch,yu,tu,Za,fh,gh,Fu,$e,Si,vo,xo,Go,ao,dr,wr,Lr,Ts,Ws;ii.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ii.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},ii.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ii.prototype.copy=function(){var a=new ii;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Mt=ii.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)&&ie("cannot thaw constant: "+this),this._isFrozen=!1,this};function fs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function kh(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 mo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Tu;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 Bu;if(a==="LeftRightSides")return bh;if(a==="TopLeftSides")return dh;if(a==="TopRightSides")return qh;if(a==="BottomLeftSides")return ch;if(a==="BottomRightSides")return yu;if(a==="NotTopSide")return tu;if(a==="NotLeftSide")return Za;if(a==="NotRightSide")return fh;if(a==="NotBottomSide")return gh;if(a==="AllSides")return Fu;if(a==="Default")return $e;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 ii(x,b,z,tt)}return new ii}function Ah(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(mo)?"Center":this.D(Tu)?"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(Bu)?"TopBottomSides":this.D(bh)?"LeftRightSides":this.D(dh)?"TopLeftSides":this.D(qh)?"TopRightSides":this.D(ch)?"BottomLeftSides":this.D(yu)?"BottomRightSides":this.D(tu)?"NotTopSide":this.D(Za)?"NotLeftSide":this.D(fh)?"NotRightSide":this.D(gh)?"NotBottomSide":this.D(Fu)?"AllSides":this.D($e)?"Default":"None"},Mt.D=function(a){return a instanceof ii?(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 ii(.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(vo))a=pa;else if(a.D(xo))a=zl;else if(a.D(Go))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},ii.alloc=function(){var a=eu.pop();return a===void 0?new ii:a},ii.free=function(a){eu.push(a)},ii.prototype.isDefault=ii.prototype.Xb,ii.prototype.isNone=ii.prototype.ys,ii.prototype.isSide=ii.prototype.$c,ii.prototype.isNoSpot=ii.prototype.Mc,ii.prototype.isSpot=ii.prototype.sb,ii.prototype.includesSide=ii.prototype.Hf,ii.prototype.opposite=ii.prototype.gv,ii.prototype.equals=ii.prototype.D,ii.prototype.set=ii.prototype.set,ii.prototype.setTo=ii.prototype.sg;var eu=[];ii.className="Spot",ii.parse=kh,ii.stringify=Ah,ii.None=Vr=fs(new ii(0,0,0,0),0).ja(),ii.Default=$e=fs(new ii(0,0,-1,0),-1).ja(),ii.TopLeft=Is=new ii(0,0,0,0).ja(),ii.TopCenter=ba=new ii(.5,0,0,0).ja(),ii.TopRight=Pa=new ii(1,0,0,0).ja(),ii.LeftCenter=vl=new ii(0,.5,0,0).ja(),ii.Center=mo=new ii(.5,.5,0,0).ja(),ii.RightCenter=Tu=new ii(1,.5,0,0).ja(),ii.BottomLeft=Ia=new ii(0,1,0,0).ja(),ii.BottomCenter=Da=new ii(.5,1,0,0).ja(),ii.BottomRight=Ca=new ii(1,1,0,0).ja(),ii.MiddleTop=ao=ba,ii.MiddleLeft=dr=vl,ii.MiddleRight=wr=Tu,ii.MiddleBottom=Lr=Da,ii.Top=xo=ba,ii.Left=Si=vl,ii.Right=vo=Tu,ii.Bottom=Go=Da,ii.TopSide=zl=fs(new ii(0,0,1,1),1).ja(),ii.LeftSide=vu=fs(new ii(0,0,1,2),1).ja(),ii.RightSide=pa=fs(new ii(0,0,1,4),1).ja(),ii.BottomSide=Oa=fs(new ii(0,0,1,8),1).ja(),ii.TopBottomSides=Bu=fs(new ii(0,0,1,9),1).ja(),ii.LeftRightSides=bh=fs(new ii(0,0,1,6),1).ja(),ii.TopLeftSides=dh=fs(new ii(0,0,1,3),1).ja(),ii.TopRightSides=qh=fs(new ii(0,0,1,5),1).ja(),ii.BottomLeftSides=ch=fs(new ii(0,0,1,10),1).ja(),ii.BottomRightSides=yu=fs(new ii(0,0,1,12),1).ja(),ii.NotTopSide=tu=fs(new ii(0,0,1,14),1).ja(),ii.NotLeftSide=Za=fs(new ii(0,0,1,13),1).ja(),ii.NotRightSide=fh=fs(new ii(0,0,1,11),1).ja(),ii.NotBottomSide=gh=fs(new ii(0,0,1,7),1).ja(),ii.AllSides=Fu=fs(new ii(0,0,1,15),1).ja(),Ts=new ii(.156,.156).ja(),Ws=new ii(.844,.844).ja(),ii.parse=kh,ii.stringify=Ah;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,vt=y*tt+x*rt+ut,xt=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,xt),ft=Math.max(ft,xt),xt=Math.min(vt,Ct),vt=Math.max(vt,Ct),b=Math.min(b,x),ft=Math.max(ft,x),xt=Math.min(xt,y),vt=Math.max(vt,y),b=Math.min(b,z),ft=Math.max(ft,z),xt=Math.min(xt,E),vt=Math.max(vt,E),a.h(b,xt,ft-b,vt-xt),a},Gi.alloc=function(){var a=Iu.pop();return a===void 0?new Gi:a},Gi.free=function(a){Iu.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 Iu=[];Gi.className="Transform",Gi.xF="54a702f3e53909c447824c6706603faf4c";var pe={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=pe.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);pe.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var 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(pe.Yb(a,y,tt,ot,ft,x,E)&&pe.Yb(a,y,tt,ot,ft,b,z))return pe.Yb(a,y,tt,ot,ft,at,ut);var vt=(a+x)/2,xt=(y+E)/2,Ct=(x+b)/2,kt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(vt+Ct)/2,x=(xt+kt)/2,Ct=(Ct+b)/2,kt=(kt+z)/2;var Gt=(E+Ct)/2,Ot=(x+kt)/2;return pe.cs(a,y,vt,xt,E,x,Gt,Ot,rt,at,ut,ft)||pe.cs(Gt,Ot,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(pe.Yb(a,y,tt,ot,rt,x,E)&&pe.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,vt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(ut+vt)/2,x=(ft+xt)/2,vt=(vt+b)/2,xt=(xt+z)/2;var Ct=(E+vt)/2,kt=(x+xt)/2;pe.Dl(a,y,ut,ft,E,x,Ct,kt,rt,at),pe.Dl(Ct,kt,vt,xt,b,z,tt,ot,rt,at)}return at},Qe:function(a,y,x,E,b,z,tt,ot,rt,at){if(pe.Yb(a,y,tt,ot,rt,x,E)&&pe.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,vt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(ut+vt)/2,x=(ft+xt)/2,vt=(vt+b)/2,xt=(xt+z)/2;var Ct=(E+vt)/2,kt=(x+xt)/2;pe.Qe(a,y,ut,ft,E,x,Ct,kt,rt,at),pe.Qe(Ct,kt,vt,xt,b,z,tt,ot,rt,at)}return at},jv:function(a,y,x,E,b,z,tt,ot,rt,at){if(pe.Yb(a,y,b,z,at,x,E))return pe.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 vt=(ut+x)/2,xt=(ft+E)/2;return pe.jv(a,y,ut,ft,vt,xt,tt,ot,rt,at)||pe.jv(vt,xt,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(pe.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;pe.iv(a,y,rt,at,ut,ft,tt,ot),pe.iv(ut,ft,x,E,b,z,tt,ot)}return ot},ep:function(a,y,x,E,b,z,tt,ot){if(pe.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+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>=ut)return xt;if((rt>ut?rt-ut:ut-rt)<(at>ft?at-ft:ft-at)){if(y<ot?(rt=y,a=ot):(rt=ot,a=y),kt<rt||kt>a)return xt}else if(a<tt?(rt=a,a=tt):rt=tt,Ct<rt||Ct>a)return xt;0<vt?xt++:0>vt&&xt--}else{Ct=(a+x)/2,kt=(y+E)/2;var Gt=(x+b)/2,Ot=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(Ct+Gt)/2,x=(kt+Ot)/2,Gt=(Gt+b)/2,Ot=(Ot+z)/2;var Yt=(E+Gt)/2,$t=(x+Ot)/2;xt+=pe.Fo(a,y,Ct,kt,E,x,Yt,$t,rt,at,ut,ft,vt),xt+=pe.Fo(Yt,$t,Gt,Ot,b,z,tt,ot,rt,at,ut,ft,vt)}return xt},qh:function(a,y,x,E,b,z,tt){return pe.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):pe.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,ot,rt){return pe.B(a,x)&&pe.B(y,E)?(rt.h(a,y),!1):pe.$(b,tt)?pe.$(a,x)?(pe.qh(a,y,x,E,b,z,rt),!1):pe.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,rt):(ot=(ot-z)/(tt-b),pe.$(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),pe.$(ot,tt)?(pe.qh(a,y,x,E,b,z,rt),!1):(b=(tt*a-ot*b+z-y)/(tt-ot),pe.$(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)):pe.qh(a,y,x,E,b,tt*(b-a)+y,rt))))},MA:function(a,y,x,E,b){return pe.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,ot,rt,at){function ut(Gt,Ot){var Yt=(Gt-a)*(Gt-a)+(Ot-y)*(Ot-y);Yt<ft&&(ft=Yt,rt.h(Gt,Ot))}var ft=1/0;ut(rt.x,rt.y);var vt=0,xt=0,Ct=0,kt=0;if(b<tt?(vt=b,xt=tt):(vt=tt,xt=b),z<ot?(Ct=b,kt=tt):(Ct=tt,kt=b),vt=(xt-vt)/2+at,at=(kt-Ct)/2+at,b=(b+tt)/2,z=(z+ot)/2,vt===0||at===0)return rt;if(.5>(x>a?x-a:a-x)){if(vt=1-(x-b)*(x-b)/(vt*vt),0>vt)return rt;vt=Math.sqrt(vt),E=-at*vt+z,ut(x,at*vt+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(vt*vt)+x*x/(at*at),ot=2*x*(y-x*a)/(at*at)-2*x*z/(at*at)-2*b/(vt*vt),vt=ot*ot-4*E*(2*x*a*z/(at*at)-2*y*z/(at*at)+z*z/(at*at)+b*b/(vt*vt)-1+(y-x*a)*(y-x*a)/(at*at)),0>vt)return rt;vt=Math.sqrt(vt),at=(-ot+vt)/(2*E),ut(at,x*at-x*a+y),vt=(-ot-vt)/(2*E),ut(vt,x*vt-x*a+y)}return rt},Ff:function(a,y,x,E,b,z,tt,ot,rt){var at=1e21,ut=a,ft=y;if(pe.Ve(a,y,a,E,b,z,tt,ot,rt)){var vt=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z);vt<at&&(at=vt,ut=rt.x,ft=rt.y)}return pe.Ve(x,y,x,E,b,z,tt,ot,rt)&&(vt=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z),vt<at&&(at=vt,ut=rt.x,ft=rt.y)),pe.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)),pe.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 pe.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,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)||pe.Rl(a,y,rt,y,b,z,tt,ot)||pe.Rl(rt,y,rt,at,b,z,tt,ot)||pe.Rl(rt,at,a,at,b,z,tt,ot)||pe.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>=pe.Fl(a,y,x,E,b,z)*pe.Fl(a,y,x,E,tt,ot)&&0>=pe.Fl(b,z,tt,ot,a,y)*pe.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(pe.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),pe.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};pe.za=pe.AA;function Pn(a){ho(this),this.l=2,a===void 0&&(a=Pn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Pn.o?this.ee=new un:(Pn.V===null&&(Pn.V=new un().freeze()),this.ee=Pn.V),this.aq=this.ee.Ja,this.Ip=new Ke().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Is,this.gg=Ca,this.Rk=this.Sk=NaN,this.Uf=cn}Pn.prototype.copy=function(){var a=new Pn;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===Pn.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},Pn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Pn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Pn.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},Pn.prototype.ka=function(){if(Object.isFrozen(this)&&ie("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Pn.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},Pn.prototype.Xa=function(a){if(!(a instanceof Pn))return!1;if(this.type!==a.type)return this.type===Pn.j&&a.type===Pn.o?Xu(this,a):a.type===Pn.j&&this.type===Pn.o?Xu(a,this):!1;if(this.type===Pn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return pe.B(this.startX,a.startX)&&pe.B(this.startY,a.startY)&&pe.B(this.endX,a.endX)&&pe.B(this.endY,a.endY)};function Xu(a,y){return a.type!==Pn.j||y.type!==Pn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&pe.B(a.startX,y.startX)&&pe.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===vr&&pe.B(a.endX,y.endX)&&pe.B(a.endY,y.endY))))}Pn.ia=function(a){return a.toString()},Pn.prototype.qb=function(a){a.classType===Pn&&(this.type=a)},Pn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Pn.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 Pn.u:var y=new Ke(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case Pn.F:if(y=new Ke(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case Pn.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()}},Pn.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},Pn.parse=function(a,y){function x(){return kt>=ne-1?!0:at[kt+1].match(de)!==null}function E(){return kt++,at[kt]}function b(Fi){var Ei=parseFloat(E()),Wo=parseFloat(E());Gt===Gt.toLowerCase()&&(Ei=$t.x+Ei,Wo=$t.y+Wo),Fi.h(Ei,Wo)}function z(){return b($t),$t}function tt(){return b(Yt),Yt}function ot(){var Fi=Ot.toLowerCase();return Fi!=="c"&&Fi!=="s"&&Fi!=="q"&&Fi!=="t"?$t:new jt(2*$t.x-Yt.x,2*$t.y-Yt.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="",vt=!1,xt=0;xt<ut.length;xt++){var Ct=ut[xt];Ct!=="."||vt?Ct==="."?(rt.push(ft),ft="."):ft+=Ct:(vt=!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,ti(rt)}}var kt=-1,Gt="",Ot="";rt=new jt(0,0);var Yt=new jt(0,0),$t=new jt(0,0),ne=at.length;a=NS(null),vt=ft=ut=!1,xt=!0,Ct=null;for(var de=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(kt>=ne-1);)if(Ot=Gt,Gt=E(),Gt!=="")switch(Gt.toUpperCase()){case"X":xt=!0,ft=ut=!1;break;case"M":for(Ct=z(),a.mc===null||xt===!0?(vg(a,Ct.x,Ct.y,ut,!ft,vt),xt=!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 jt((Gt===Gt.toLowerCase()?$t.x:0)+parseFloat(E()),$t.y),a.lineTo($t.x,$t.y);break;case"V":for(;!x();)$t=new jt($t.x,(Gt===Gt.toLowerCase()?$t.y:0)+parseFloat(E())),a.lineTo($t.x,$t.y);break;case"C":for(;!x();){Ct=new jt,b(Ct);var ke=tt(),An=z();Ad(a,Ct.x,Ct.y,ke.x,ke.y,An.x,An.y)}break;case"S":for(;!x();)Ct=ot(),ke=tt(),An=z(),Ad(a,Ct.x,Ct.y,ke.x,ke.y,An.x,An.y);break;case"Q":for(;!x();)Ct=tt(),ke=z(),Gm(a,Ct.x,Ct.y,ke.x,ke.y);break;case"T":for(;!x();)Yt=Ct=ot(),ke=z(),Gm(a,Ct.x,Ct.y,ke.x,ke.y);break;case"B":for(;!x();){Ct=parseFloat(E()),ke=parseFloat(E()),An=parseFloat(E());var Yn=parseFloat(E()),Wn=parseFloat(E()),Sn=Wn,tn=!1;x()||(Sn=parseFloat(E()),x()||(tn=parseFloat(E())!==0)),Gt===Gt.toLowerCase()&&(An+=$t.x,Yn+=$t.y),a.arcTo(Ct,ke,An,Yn,Wn,Sn,tn)}break;case"A":for(;!x();)Ct=Math.abs(parseFloat(E())),ke=Math.abs(parseFloat(E())),An=parseFloat(E()),Wn=Yn=!1,tn=Sn=0,Sn=E(),Sn.length===1?(Yn=!!parseFloat(Sn),Wn=!!parseFloat(E()),Sn=parseFloat(E())):Sn.length===2?(Yn=!!parseFloat(Sn[0]),Wn=!!parseFloat(Sn[1]),Sn=parseFloat(E())):(Yn=!!parseFloat(Sn[0]),Wn=!!parseFloat(Sn[1]),Sn=parseFloat(Sn.slice(2))),tn=parseFloat(E()),Gt===Gt.toLowerCase()&&(Sn=$t.x+Sn,tn=$t.y+tn),$t.h(Sn,tn),P1(a,Ct,ke,An,Yn,Wn,Sn,tn);break;case"Z":w1(a),$t.assign(rt);break;case"F":for(Ct="",ke=1;at[kt+ke];)if(at[kt+ke]==="0")vt=!0,ke++;else if(at[kt+ke].match(/[Uu]/)!==null)ke++;else if(at[kt+ke].match(de)===null)ke++;else{Ct=at[kt+ke];break}Ct.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ct="",ke=1;at[kt+ke];)if(at[kt+ke].match(/[Ff]/)!==null)ke++;else if(at[kt+ke].match(de)===null)ke++;else{Ct=at[kt+ke];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},Pn.Ha=function(a,y){for(var x=a.length,E=jt.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}jt.free(E)},Pn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Pn.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},Pn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Pn.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),Du(this,a,!1),Hr(a,0,0,0,0),a.freeze()},Pn.prototype.ix=function(){var a=new Ke;return Du(this,a,!0),a};function Du(a,y,x){switch(a.type){case Pn.j:case Pn.u:case Pn.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 Pn.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:pe.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:pe.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 vt=ft.type===ys?rl(ft,z):Ua(ft,z,rt,at),xt=vt.length;if(xt===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<xt;Ct++)ft=vt[Ct],pe.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:ie("Unknown Segment type: "+ft.type)}}}break;default:ie("Unknown Geometry type: "+a.type)}}Pn.prototype.normalize=function(){this._isFrozen&&Je(this);var a=this.ix();return this.offset(-a.x,-a.y),new jt(-a.x,-a.y)},Pn.prototype.offset=function(a,y){return this._isFrozen&&Je(this),this.transform(1,0,0,1,a,y),this},Pn.prototype.scale=function(a,y){return this._isFrozen&&Je(this),this.transform(a,0,0,y,0,0),this},Pn.prototype.rotate=function(a,y,x){this._isFrozen&&Je(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=Pn.prototype,Mt.transform=function(a,y,x,E,b,z){switch(this.type){case Pn.j:case Pn.u:case Pn.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 Pn.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 vt=ft.length,xt=0;xt<vt;xt++){var Ct=ft[xt];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:ie("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 Pn.j:return pe.Yb(x,E,b,z,y,a.x,a.y);case Pn.u:var tt=Ke.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),Ke.free(tt),a;case Pn.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 Pn.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,vt=a.figures.s,xt=vt.length,Ct=0;Ct<xt;Ct++){var kt=vt[Ct],Gt=!kt.isEvenOdd;if(kt.isFilled){if(E&&kt.ca(z,y,x))return!0;var Ot=kt.segments;rt=kt.startX,at=kt.startY;for(var Yt=rt,$t=at,ne=Ot.s,de=0;de<=Ot.length;de++){var ke=void 0;if(de!==Ot.length){ke=ne[de];var An=ke.type;a=ke.endX,ft=ke.endY}else An=vr,a=Yt,ft=$t;switch(An){case Ps:if(Yt=Qu(z,y,tt,y,rt,at,Yt,$t),isNaN(Yt))return!0;ot+=Yt,Yt=a,$t=ft;break;case vr:if(rt=Qu(z,y,tt,y,rt,at,a,ft),isNaN(rt))return!0;ot+=rt;break;case aa:ut=pe.Fo(rt,at,ke.point1X,ke.point1Y,ke.point2X,ke.point2Y,a,ft,tt,y,z,y,.5),ot+=ut;break;case Al:ut=pe.Fo(rt,at,(rt+2*ke.point1X)/3,(at+2*ke.point1Y)/3,(2*ke.point1X+a)/3,(2*ke.point1Y+ft)/3,a,ft,tt,y,z,y,.5),ot+=ut;break;case ys:case Gl:An=ke.type===ys?rl(ke,kt):Ua(ke,kt,rt,at);var Yn=An.length;if(Yn===0){if(rt=Qu(z,y,tt,y,rt,at,ke.type===ys?ke.centerX:ke.endX,ke.type===ys?ke.centerY:ke.endY),isNaN(rt))return!0;ot+=rt;break}ke=null;for(var Wn=0;Wn<Yn;Wn++){if(ke=An[Wn],Wn===0){if(ut=Qu(z,y,tt,y,rt,at,ke[0],ke[1]),isNaN(ut))return!0;ot+=ut}ut=pe.Fo(ke[0],ke[1],ke[2],ke[3],ke[4],ke[5],ke[6],ke[7],tt,y,z,y,.5),ot+=ut}ke!==null&&(a=ke[6],ft=ke[7]);break;default:ie("Unknown Segment type: "+ke.type)}rt=a,at=ft}if(Gt){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 Qu(a,y,x,E,b,z,tt,ot){if(pe.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 ph(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 jt),this.type===Pn.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===Pn.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===Pn.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===Pn.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=jt.alloc();return pe.qh(y,x,E,b,z,a,ot),a=ot.x,z=ot.y,jt.free(ot),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===Pn.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=jt.alloc(),b=1/0,ot=tt=0,rt=y.length;for(var ut=at=0,ft=0;ft<rt;ft++)for(var vt=y[ft],xt=x[ft],Ct=vt.length,kt=0;kt<Ct;kt+=2){var Gt=vt[kt],Ot=vt[kt+1];if(kt!==0){pe.qh(at,ut,Gt,Ot,a.x,a.y,E);var Yt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);Yt<b&&(b=Yt,tt=ot,tt+=Math.sqrt((E.x-at)*(E.x-at)+(E.y-ut)*(E.y-ut))),ot+=xt[(kt-2)/2]}at=Gt,ut=Ot}return jt.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===Pn.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===Pn.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===Pn.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];pe.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 vt=at[ft];switch(vt.type){case Ps:4<=E.length&&(y.push(E),x.push(yd(E))),E=[],E.push(vt.endX),E.push(vt.endY),tt=vt.endX,z=vt.endY,ot=tt,rt=z;break;case vr:E.push(vt.endX),E.push(vt.endY),tt=vt.endX,z=vt.endY;break;case aa:pe.Qe(tt,z,vt.point1X,vt.point1Y,vt.point2X,vt.point2Y,vt.endX,vt.endY,.5,E),tt=vt.endX,z=vt.endY;break;case Al:pe.ep(tt,z,vt.point1X,vt.point1Y,vt.endX,vt.endY,.5,E),tt=vt.endX,z=vt.endY;break;case ys:var xt=rl(vt,b),Ct=xt.length;if(Ct===0){E.push(vt.centerX),E.push(vt.centerY),tt=vt.centerX,z=vt.centerY;break}for(var kt=0;kt<Ct;kt++){var Gt=xt[kt];pe.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7]}break;case Gl:if(xt=Ua(vt,b,tt,z),Ct=xt.length,kt=vt.endX,Gt=vt.endY,Ct===0){E.push(kt),E.push(Gt),tt=kt,z=Gt;break}for(kt=0;kt<Ct;kt++)Gt=xt[kt],pe.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7];break;default:ie("Segment not of valid type: "+vt.type)}vt.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&&Je(this),this.fg=new ii(a,y,b,z).freeze(),this.gg=new ii(x,E,tt,ot).freeze(),this},Wt.Object.defineProperties(Pn.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===Pn.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===Pn.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&&Je(this,a),this.na=a,a===Pn.o?this.ee=new un:(Pn.V===null&&(Pn.V=new un().freeze()),this.ee=Pn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Je(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Je(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Je(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Je(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Je(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Je(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Je(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Je(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Pn.prototype.setSpots=Pn.prototype.pm,Pn.prototype.add=Pn.prototype.add,Pn.prototype.getFractionForPoint=Pn.prototype.xx,Pn.prototype.getPointAndAngleAlongPath=Pn.prototype.Qu,Pn.prototype.getAngleAlongPath=Pn.prototype.wx,Pn.prototype.getPointAlongPath=Pn.prototype.Pu,Pn.prototype.containsPoint=Pn.prototype.ca,Pn.prototype.transform=Pn.prototype.transform,Pn.prototype.rotate=Pn.prototype.rotate,Pn.prototype.scale=Pn.prototype.scale,Pn.prototype.offset=Pn.prototype.offset,Pn.prototype.normalize=Pn.prototype.normalize,Pn.prototype.computeBoundsWithoutOrigin=Pn.prototype.ix,Pn.prototype.equalsApprox=Pn.prototype.Xa,Pn.className="Geometry",Pn.j=new Ze(Pn,"Line",0),Pn.u=new Ze(Pn,"Rectangle",1),Pn.F=new Ze(Pn,"Ellipse",2),Pn.o=new Ze(Pn,"Path",3),Pn.V=null,Pn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Pn.className="Geometry",Pn.stringify=Pn.ia,Pn.fillPath=Pn.nb,Pn.parse=Pn.parse,Pn.Line=Pn.j,Pn.Rectangle=Pn.u,Pn.Ellipse=Pn.F,Pn.Path=Pn.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 un,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&&pe.B(this.startX,a.startX)&&pe.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Mt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Mt.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Mt.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Mt.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Mt.add=function(a){return this.pl.add(a),this},Mt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,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(pe.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case aa:if(pe.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(pe.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),vt=ft.length,xt=ut.type===ys?ut.centerX:ut.endX,Ct=ut.type===ys?ut.centerY:ut.endY;if(vt===0){if(pe.Yb(E,b,xt,Ct,x,a,y))return!0;E=xt,b=Ct;break}for(xt=null,Ct=0;Ct<vt;Ct++)if(xt=ft[Ct],Ct===0&&pe.Yb(E,b,xt[0],xt[1],x,a,y)||pe.cs(xt[0],xt[1],xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,a,y,x))return!0;xt!==null&&(E=xt[6],b=xt[7]);break;default:ie("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&pe.Yb(E,b,z,tt,x,a,y))return!0}return!1},Wt.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&&Je(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Je(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Je(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Je(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Je(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Je(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 pe.B(this.endX,a.endX)&&pe.B(this.endY,a.endY);case aa:return pe.B(this.endX,a.endX)&&pe.B(this.endY,a.endY)&&pe.B(this.point1X,a.point1X)&&pe.B(this.point1Y,a.point1Y)&&pe.B(this.point2X,a.point2X)&&pe.B(this.point2Y,a.point2Y);case Al:return pe.B(this.endX,a.endX)&&pe.B(this.endY,a.endY)&&pe.B(this.point1X,a.point1X)&&pe.B(this.point1Y,a.point1Y);case ys:return pe.B(this.startAngle,a.startAngle)&&pe.B(this.sweepAngle,a.sweepAngle)&&pe.B(this.centerX,a.centerX)&&pe.B(this.centerY,a.centerY)&&pe.B(this.radiusX,a.radiusX)&&pe.B(this.radiusY,a.radiusY);case Gl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&pe.B(this.xAxisRotation,a.xAxisRotation)&&pe.B(this.endX,a.endX)&&pe.B(this.endY,a.endY)&&pe.B(this.radiusX,a.radiusX)&&pe.B(this.radiusY,a.radiusY);default:return!1}},Mt.qb=function(a){a.classType===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=pe.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),Pn.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,Gt,Ot,Yt){return(kt*Yt<Gt*Ot?-1:1)*Math.acos((kt*Ot+Gt*Yt)/(Math.sqrt(kt*kt+Gt*Gt)*Math.sqrt(Ot*Ot+Yt*Yt)))}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),vt=Math.sin(tt),xt=ft*(x-at)/2+vt*(E-ut)/2;tt=-vt*(x-at)/2+ft*(E-ut)/2;var Ct=xt*xt/(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*xt*xt)/(y*y*tt*tt+z*z*xt*xt)),isNaN(Ct)&&(Ct=0),ot=Ct*y*tt/z,Ct=Ct*-z*xt/y,isNaN(ot)&&(ot=0),isNaN(Ct)&&(Ct=0),x=(x+at)/2+ft*ot-vt*Ct,E=(E+ut)/2+vt*ot+ft*Ct,ut=b(1,0,(xt-ot)/y,(tt-Ct)/z),ft=(xt-ot)/y,at=(tt-Ct)/z,xt=(-xt-ot)/y,ot=(-tt-Ct)/z,tt=b(ft,at,xt,ot),xt=(ft*xt+at*ot)/(Math.sqrt(ft*ft+at*at)*Math.sqrt(xt*xt+ot*ot)),-1>=xt?tt=Math.PI:1<=xt&&(tt=0),!rt&&0<tt&&(tt-=2*Math.PI),rt&&0>tt&&(tt+=2*Math.PI),rt=y>z?1:y/z,xt=y>z?z/y:1,y=pe.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,xt),Pn.Ha(y,z),Gi.free(z),a.ae=y,a.ae}Wt.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&&Je(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Je(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Je(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Je(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Je(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Je(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Je(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Je(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Je(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Cn(a,">= zero",To,"radiusX"),this._isFrozen&&Je(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Cn(a,">= zero",To,"radiusY"),this._isFrozen&&Je(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Je(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&&Je(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&&Je(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&&Je(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&&Je(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),To.prototype.equalsApprox=To.prototype.Xa;var Ps=new Ze(To,"Move",0),vr=new Ze(To,"Line",1),aa=new Ze(To,"Bezier",2),Al=new Ze(To,"QuadraticBezier",3),ys=new Ze(To,"Arc",4),Gl=new Ze(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 jt(0,0).freeze(),this.mt=new jt(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},Wt.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},Wt.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=We(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=We(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=We(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=We(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))},Wt.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 Ze(Dr,"Transaction",-1),Or=new Ze(Dr,"Property",0),gs=new Ze(Dr,"Insert",1),Ds=new Ze(Dr,"Remove",2);Dr.className="ChangedEvent",Dr.Transaction=sl,Dr.Property=Or,Dr.Insert=gs,Dr.Remove=Ds;function Xs(){this.o=new un().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 _n,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 _n,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()}},Wt.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 nn,this.Jd=!1,this.u=new un().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new un().freeze(),this.hl=new un,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&&$n("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){$n("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){$n("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||$n("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},Wt.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 Ao(){ho(this),this.H=th,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ma,this.Zr=-1}Ao.prototype.toString=function(){return this.name!==""?this.name+" Tool":Qn(this.constructor)},Ao.prototype.updateAdornments=function(){},Ao.prototype.canStart=function(){return this.isEnabled},Ao.prototype.doStart=function(){},Ao.prototype.doActivate=function(){this.isActive=!0},Ao.prototype.doDeactivate=function(){this.isActive=!1},Ao.prototype.doStop=function(){},Ao.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Ao.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Ao.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Ao.prototype.doMouseMove=function(){},Ao.prototype.doMouseUp=function(){this.stopTool()},Ao.prototype.doMouseWheel=function(){},Ao.prototype.canStartMultiTouch=function(){return!0},Ao.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,jt.allocAt(NaN,NaN)),E=y.So(1,jt.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}jt.free(x),jt.free(E)},Ao.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,jt.allocAt(NaN,NaN)),E=y.So(1,jt.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 jt((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}jt.free(x),jt.free(E)},Ao.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Ao.prototype.doKeyUp=function(){},Ao.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Ao.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Ao.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Eo?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||(Eo?y.meta:y.control)||y.shift||a.clearSelection()}},Ao.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)}}}Ao.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}},Ao.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Ao.prototype.doCurrentObjectChanged=function(){},Ao.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)}}},Ao.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Ao.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Ln(function(){x.doWaitAfter(E)},a)},Ao.prototype.cancelWaitAfter=function(){this.Zr!==-1&&qt.clearTimeout(this.Zr),this.Zr=-1},Ao.prototype.doWaitAfter=function(){},Ao.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},Ao.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},Wt.Object.defineProperties(Ao.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof be&&(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}}}),Ao.prototype.startTransaction=Ao.prototype.Ea,Ao.className="Tool";function Ar(){Ao.call(this),this.name="ToolManager",this.hb=new un,this.ob=new un,this.Hb=new un,this.F=this.V=850,this.o=new En(2,2).ja(),this.Ha=5e3,this.ia=Yd,this.u=Ec,this.Mp=this.j=null,this.zj=-1}Ee(Ar,Ao),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=Ln(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)},Wt.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 Ze(Ar,"WheelScroll",0),Xd=new Ze(Ar,"WheelZoom",1),Zf=new Ze(Ar,"WheelNone",2),Ec=new Ze(Ar,"GestureZoom",3),Nh=new Ze(Ar,"GestureCancel",4),ed=new Ze(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(){Ao.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 jt(NaN,NaN),this.Fr=new jt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new nn().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ju;Ee(Wr,Ao),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,(Eo?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),Me=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,Me=this,He=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 wn?(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 oi,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(_o):this.isGridSnapEnabled?new rd(new jt(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<Ju.count){for(var y=Ju,x=y.length,E=0;E<x;E++){var b=y.M(E);Th(b),Su(b),nd(b),b.diagram.ug()}y.clear()}Th(this),this.tl.h(NaN,NaN),He!==null&&(He.currentCursor=""),Me=He=null,Su(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Qd(a,!0)},Wr.prototype.stopTransaction=function(){var a=this.diagram,y=Ao.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=Me;Su(a),Bh(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Wr.prototype.doCancel=function(){Su(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 _u(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 _n,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 wn&&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 Su(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 wn&&(x.value.point=new jt(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 Ou(a,y,x){var E=a.diagram,b=a.startPoint,z=jt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),jt.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&&vh(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 wn&&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&&Me===null)return;var ot=E!==null?E.part:null;if(ot===null||x.handlesDragDropForTopLevelParts&&ot.isTopLevel&&!(ot instanceof Di)){var rt=x.mouseDragOver;rt!==null&&(rt(b),tt=!0)}if(!a.isActive&&Me===null||(a.doDragOver(y,E),!a.isActive&&Me===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 ju(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&&Me===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 Di)&&(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=jt.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(mo,a);rt=y.Bf(rt),rt<z&&(tt=ot,z=rt)}}return jt.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)):Ii(b,tt,z,rt,ot):Ii(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||Me!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Dn&&z.linksConnected.each(function(ot){ot.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Me!==null){for(a=Ke.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Dn&&Ut(x,E,a);Ke.free(a)}}}function Zg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Di||(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 wn},!0,function(b){return b instanceof wn},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()?(_u(this,!1),Jf(a,this.copiedParts),Ou(this,this.copiedParts,!1),qd(a,this.copiedParts)):this.mayMove()?(Su(this),Ou(this,this.draggedParts,!0)):this.mayDragOut()?(_u(this,!1),Ou(this,this.copiedParts,!1)):Su(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?(Su(this),_u(this,!0),Jf(a,this.copiedParts),Ou(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,Su(this),this.mayMove()&&(Ou(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(Me===null)return!1;var E=Me.diagram;x instanceof be||(x=null);var b=He;return x!==b&&(b!==null&&b!==E&&(b.ug(),Me.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),He=x,x!==null&&x!==E&&(Uf(),b=x.toolManager.findTool("Dragging"),b!==null&&(Ju.contains(b)||Ju.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(Me===null)return!1;var E=He,b=Me.diagram;if(x===null)return Me.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Me.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;He=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Uf(),Ju.contains(E)||Ju.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 jt),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=Me,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 Dn&&(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||(Eo?!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 Me},Wr.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Me;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=Me,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Wr.prototype.doSimulatedDragLeave=function(){var a=Me;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Wr.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Me;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;ye(this,y.draggedParts.Lf(),!1,a.firstInput),Ou(this,this.copiedParts,!1),Lc(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Wr.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Me;if(y!==null){var x=y.diagram;if(y.Ym=!0,Su(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),ye(this,y.draggedParts.Lf(),!0,a.lastInput),Ou(this,this.copiedParts,!1);var E=new nn;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 ye(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=Ke.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,Ke.free(z),z=a.Fr,tt=new _n,ot=jt.alloc(),rt=y.iterator;rt.next();)at=rt.value,at instanceof wn&&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))));jt.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 jt},Wt.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 Me=null,He=null;Wr.className="DraggingTool",Ju=new un,qi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ar.prototype.doCancel=function(){Me!==null&&Me.doCancel(),Ao.prototype.doCancel.call(this)};function Ne(){Ao.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new wn,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 Dn,y=new Yi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=qo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Dn,y=new Yi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=qo,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 _n,this.Of=this.gj=this.Pf=null}Ee(Ne,Ao),Ne.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Ne.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=En.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,En.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=mo,z=jt.alloc(),x.location=y.ga(mo,z),jt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Ne.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=qo,y.fromSpot=Vr,y.toSpot=Vr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Ne.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Ne.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Dn){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)}},Ne.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Dn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Dn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Ne.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 Dn){var rt=tt.ga(mo,jt.alloc()),at=x.x-rt.x,ut=x.y-rt.y;jt.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 Dn&&(x.layer===null||x.layer.allowLink))?y:null},Ne.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},Ne.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},Ne.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Ne.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Dn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Dn))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},Ne.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)},Ne.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 nn;return E.add(a),an(this,x,y,E)};function an(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),an(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),an(a,y.labeledLink,x,E))))}Ne.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!ln(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!ln(this,a,y,x,!0)}if(E===ep)return a===y?a=!0:(E=new nn,E.add(y),a=en(this,E,a,y,x)),!a;if(E===np)return!ln(this,a,y,x,!1);if(E===ip)return a===y?a=!0:(E=new nn,E.add(y),a=kn(this,E,a,y,x)),!a}return!0};function ln(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&&ln(a,tt,x,E,b)))return!0}return!1}function en(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&&en(a,y,tt,E,b)))return!0}return!1}function kn(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&&kn(a,y,ot,E,b))return!0}}return!1}Wt.Object.defineProperties(Ne.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}}}),Ne.className="LinkingBaseTool";function Rn(){Ne.call(this),this.name="Linking",this.V={},this.F=null,this.K=Fn,this.Xd=null}Ee(Rn,Ne),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 Dn)))return null;var x=this.direction;if(x===Fn||x===pi){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===Fn||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 Dn&&(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 Dn&&(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(){Ne.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 Dn&&(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 wn)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(){},Wt.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 Fn=new Ze(Rn,"Either",0),pi=new Ze(Rn,"ForwardsOnly",0),di=new Ze(Rn,"BackwardsOnly",0);Rn.className="LinkingTool",Rn.Either=Fn,Rn.ForwardsOnly=pi,Rn.BackwardsOnly=di;function oi(){Ne.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 Ke}Ee(oi,Ne),oi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof wn){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)}},oi.prototype.makeAdornment=function(a,y){var x=new Fo;return x.type=fn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},oi.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},oi.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 wn))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},oi.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}},oi.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()},oi.prototype.doStop=function(){Ne.prototype.doStop.call(this),this.handle=null},oi.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 Dn&&(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()}}},oi.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},oi.prototype.doNoRelink=function(){};function Ii(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)}Wt.Object.defineProperties(oi.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}}}),oi.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(){Ao.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 jt,this.Yq=new un}Ee(ai,Ao),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 wn){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=fn.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);pe.B(rt.x,at.x)&&pe.B(rt.y,at.y)&&(at=y.i(x-1)),pe.B(rt.x,at.x)?(this.om(ot,yo),ot.cursor="n-resize"):pe.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),pe.B(rt.x,at.x)&&pe.B(rt.y,at.y)&&(rt=y.i(z+1)),pe.B(rt.x,at.x)?(this.om(ot,yo),ot.cursor="n-resize"):pe.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 wn){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=Ao.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(mo)},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&&(Ni(this,tt,E,b,z,!0)||Ni(this,tt,E,b,z,!1))){var ot=y.points.copy();Ni(this,tt,E,b,z,!0)?(ot.cd(x-2,new jt(tt.x,(z.y+tt.y)/2)),ot.cd(x+1,new jt(z.x,(z.y+tt.y)/2))):(ot.cd(x-2,new jt((z.x+tt.x)/2,tt.y)),ot.cd(x+1,new jt((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&&(Ni(this,E,b,z,tt,!0)||Ni(this,E,b,z,tt,!1))&&(ot=y.points.copy(),Ni(this,E,b,z,tt,!0)?(ot.cd(x-1,new jt(E.x,(E.y+tt.y)/2)),ot.cd(x+2,new jt(tt.x,(E.y+tt.y)/2))):(ot.cd(x-1,new jt((E.x+tt.x)/2,E.y)),ot.cd(x+2,new jt((E.x+tt.x)/2,tt.y))),ot.mb(x+1),ot.mb(x),y.points=ot,y.Wb())}}else tt=jt.alloc(),pe.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),jt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Ni(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===yo?(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===yo?(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);pe.B(z.x,b.x)&&pe.B(b.y,tt.y)?(pe.B(z.x,y.i(E-2).x)&&!pe.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),pe.B(tt.y,y.i(E+2).y)&&!pe.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):pe.B(z.y,b.y)&&pe.B(b.x,tt.x)?(pe.B(z.y,y.i(E-2).y)&&!pe.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),pe.B(tt.x,y.i(E+2).x)&&!pe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):pe.B(z.x,b.x)&&pe.B(b.x,tt.x)?(pe.B(z.x,y.i(E-2).x)&&!pe.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),pe.B(tt.x,y.i(E+2).x)&&!pe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):pe.B(z.y,b.y)&&pe.B(b.y,tt.y)&&(pe.B(z.y,y.i(E-2).y)&&!pe.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),pe.B(tt.y,y.i(E+2).y)&&!pe.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(mo,jt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,jt.alloc()),y.L(0,E.x,E.y),jt.free(z),jt.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(mo,jt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,jt.alloc()),y.L(y.pointsCount-1,a.x,a.y),jt.free(x),jt.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 yo:return new jt(y.i(x).x,a.y);case Vi:return new jt(a.x,y.i(x).y);default:case bi:return y.i(x)}},Wt.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 Ze(ai,"None",0),Vi=new Ze(ai,"Horizontal",1),yo=new Ze(ai,"Vertical",2),Bo=new Ze(ai,"All",3);ai.className="LinkReshapingTool",ai.None=bi,ai.Horizontal=Vi,ai.Vertical=yo,ai.All=Bo,qi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ri(){Ao.call(this),this.name="Resizing",this.o=new En(1,1).freeze(),this.j=new En(9999,9999).freeze(),this.yg=new En(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Yi;a.alignmentFocus=mo,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 jt,this.Dw=new En,this.Tn=new jt,this.rt=new En(0,0),this.qt=new En(1/0,1/0),this.pt=new En(1,1)}Ee(Ri,Ao),Ri.prototype.updateAdornments=function(a){if(!(a===null||a instanceof wn)){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)}},Ri.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Fo,y.type=fn.Spot,y.locationSpot=mo;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(Mu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ri.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ri.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=mo),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 fn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ri.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},Ri.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))},Ri.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ri.prototype.stopTransaction=function(){var a=this.diagram,y=Ao.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ri.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ri.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,jt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),jt.free(b)}},Ri.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,jt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),jt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ri.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 Di){var E=new un;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()}},Ri.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=mo);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 vt=tt.height;0>=ft&&(ft=1),0>=vt&&(vt=1),ft=vt/ft}return vt=jt.alloc(),pe.No(a.x,a.y,ot,rt,b.width,b.height,vt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(vt.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(vt.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(vt.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(vt.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(vt.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(vt.x-ot,E.width),x.width),a.y=Math.max(vt.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(vt.x-ot,E.width),x.width),a.height=Math.max(Math.min(vt.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(vt.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(vt.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(vt.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))),jt.free(vt),a},Ri.prototype.computeReshape=function(){var a=on;return this.adornedObject instanceof Yi&&(a=Mv(this.adornedObject)),!(a===qn||this.diagram.lastInput.shift)},Ri.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},Ri.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},Ri.prototype.computeCellSize=function(){var a=new En(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},Wt.Object.defineProperties(Ri.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}}}),Ri.className="ResizingTool",qi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function po(){Ao.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new jt,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 jt(NaN,NaN),this.u=0,this.F=50}Ee(po,Ao),po.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)}},po.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Fo,y.type=fn.Position,y.locationSpot=mo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Mu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},po.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},po.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)},po.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(mo)},po.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)},po.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new jt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},po.prototype.stopTransaction=function(){var a=this.diagram,y=Ao.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},po.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},po.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},po.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()},po.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()}},po.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},Wt.Object.defineProperties(po.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}}}),po.className="RotatingTool",qi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function or(){Ao.call(this),this.name="ClickSelecting"}Ee(or,Ao),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(){Ao.call(this),this.name="Action",this.pk=null}Ee(Zi,Ao),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(){Ao.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new jt(0,0)}Ee(io,Ao),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()&&(Mu(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);We(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=jt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Qf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),jt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Wt.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(){Ao.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}Ee(Wi,Ao),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=En.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),En.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 Ke(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),Eo?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 un,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)}},Wt.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(){Ao.call(this),this.name="Panning",this.Xt=new jt,this.xy=new jt,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()}}Ee(xi,Ao),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)}},Wt.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}Wt.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 Lo(a,y,x){this.text=a,this.hx=y,this.visible=x}Lo.className="ContextMenuButtonInfo";function Ko(){Ao.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new jt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ee(Ko,Ao);function Vo(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=Nn("div");var x=Nn("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=Nn("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",ji,!1),E.addEventListener(y,"selectstart",ji,!1),E.addEventListener(x,"contextmenu",ji,!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 ji(a){return a.preventDefault(),!1}Ko.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)},Ko.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Ko.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Ko.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof be||(a instanceof ce?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},Ko.prototype.doActivate=function(){},Ko.prototype.doMouseDown=function(){if(Ao.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)},Ko.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())}Ko.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 ce?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()}}Ko.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Ko.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},Ko.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}},Ko.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 un;return y.add(new Lo("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Lo("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Lo("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Lo("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Lo("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Lo("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Lo("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Lo("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Lo("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Lo("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Lo("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Lo("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Lo("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Ko.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=Nn("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=Nn("li"),z.className="goCXli";var tt=Nn("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"},Ko.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}},Wt.Object.defineProperties(Ko.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&&Vo(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;Ko.className="ContextMenuTool",qi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function No(){Ao.call(this),this.name="TextEditing",this.Zh=new yr,this.ia=null,this.V=wo,this.vj=null,this.qa=Po,this.u=1,this.F=!0,this.o=null,this.j=new to,this.kt=null,zr(this,this.j)}Ee(No,Ao);function zr(a,y){if(os){var x=Nn("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(Ro)):b==="Tab"?(a.acceptText(Yo),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Po){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!==Po){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 No)if(z.state===Ea)x.style.border="3px solid red",x.focus();else{var tt=E.ga(mo),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,vt=(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=(vt-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)}}}No.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===wo&&!y.isSelected||this.starting===Kr&&2>a.lastInput.clickCount)):!1},No.prototype.doStart=function(){Va=this,this.textBlock!==null&&this.doActivate()},No.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof 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 Ke(this.textBlock.ga(Is),this.textBlock.ga(Ca));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},No.prototype.doCancel=function(){this.stopTool()},No.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},No.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ia)},No.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 Ro:case Yo:(Ro!==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))}}No.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},No.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},No.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Po,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},No.prototype.doStop=function(){Va=null},No.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)))},No.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Wt.Object.defineProperties(No.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),No.prototype.measureTemporaryTextBlock=No.prototype.Lx;var Cs=new Ze(No,"LostFocus",0),ia=new Ze(No,"MouseDown",1),Yo=new Ze(No,"Tab",2),Ro=new Ze(No,"Enter",3),Xo=new Ze(No,"SingleClick",0),wo=new Ze(No,"SingleClickSelected",1),Kr=new Ze(No,"DoubleClick",2),Po=new Ze(No,"StateNone",0),rr=new Ze(No,"StateActive",1),Nr=new Ze(No,"StateEditing",2),Tr=new Ze(No,"StateValidating",3),Ea=new Ze(No,"StateInvalid",4),la=new Ze(No,"StateValidated",5),Va=null;No.className="TextEditingTool",No.LostFocus=Cs,No.MouseDown=ia,No.Tab=Yo,No.Enter=Ro,No.SingleClick=Xo,No.SingleClickSelected=wo,No.DoubleClick=Kr,No.StateNone=Po,No.StateActive=rr,No.StateEditing=Nr,No.StateValidating=Tr,No.StateInvalid=Ea,No.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=th,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 nn,this.ce=new $r,this.ce.Yd=this,this.Ei=new nn,this.pu=new nn,this.Sr=new nn,this.pr=new nn,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(),mh(y,0),al(x,!0),Qs(a),x.R("AnimationStarting",a)))}))}}function ma(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function qu(a,y,x,E){a.isTicking||ma(a)||y instanceof wn&&(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 ce&&rt.diagram!==null||rt instanceof be){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 jt(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot))}var y=new _n;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 jt(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 jt(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 jt(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 jt(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 Ke(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}Wt.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&&Cn(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 Ze(Jr,"Default",1),iu=new Ze(Jr,"AnimateLocations",2),Kl=new Ze(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=_o,this.vc=new _n,this.Tt=new _n,this.yl=new nn,this.Ut=new nn,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 be?a=x:x instanceof ce&&(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=Ru,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 be?this.H=a:a instanceof ce&&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 be&&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 ce&&ot instanceof jt&&!ot.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ot.assign(at.position),ot=new $u(rt,at,z),tt.add(y,ot);tt=rt[x],tt instanceof jt&&!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 jt||a instanceof En?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),mh(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 mh(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof ce&&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 vt=ft;!ot.Hu||vt!=="position:nodeCollapse"&&vt!=="position:placeholder"||(vt="position"),z.get(vt)(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 Di&&(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 jt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Di)for(a=a.memberParts;a.next();)E=a.value,E instanceof Dn&&this.Cj(E,y)},Mt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Di&&(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 Di)for(a=a.memberParts;a.next();)E=a.value,E instanceof Dn&&this.Aj(E,y)}},Mt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Wt.Object.defineProperties($r.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Cn(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:ie("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 Ru(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=Ru;function $u(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}$u.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))}Wt.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 Ze(Tl,"Default",1),ua=new Ze(Tl,"Immediate",2),Es=new Ze(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 un,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 Di?b++:rt instanceof Dn?E++:rt instanceof wn?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&&Ho(E)&&(ot+=" #"+Ho(E)),x instanceof Dn?ot+=" "+wi(E):x instanceof wn&&(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=jt.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 jt.free(b),ot}return jt.free(b),null},Mt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof un||E instanceof nn||(E=new nn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=jt.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 jt.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 un||b instanceof nn||(b=new nn),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 un||b instanceof nn)&&(z=b),b=!0),z instanceof un||z instanceof nn||(z=new nn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var ot=jt.alloc(),rt=jt.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 vt=ft;ft.og(ot,rt,x,E,b,z)&&(x!==null&&(vt=x(vt)),vt===null||E!==null&&!E(vt)||z.add(vt))}}return jt.free(ot),jt.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 wn){if(tt.fd===!1)continue}else if(tt instanceof Fo&&tt.adornedPart!==null)continue;var ot=tt.actualBounds;tt.isVisible()&&Nu(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]);ti(a),ti(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=Ke.alloc(),rt=0;rt<E;rt++)this.Oj(a,x[rt],y,z,tt,ot,!0);if(Ke.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=Ke.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,ot,rt,at,!1)}Ke.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 wn&&(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)),xu(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 xu(a,y,x){if(y=uf(a,y,x),x instanceof Di&&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&&xu(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}Wt.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===""&&ie("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&ie("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)&&Cn(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 be(a,y){if(hm||(Na(),hm=!0),ho(this),th=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,th;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 un,a.pj=new _n,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new jt(NaN,NaN).freeze(),a.du=new jt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new jt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Gi,a.zu=new jt(NaN,NaN).freeze(),a.ut=new Ke(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=$e,a.Fg=ja,a.pq=$e,a.yt=Is,a.Bt=Is,a.Fc=!0,a.pn=!1,a.De=new nn,a.Eh=new _n,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 nn,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 _n,a.Xn=new un,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 nn().freeze(),a.Nt=999999999,a.nw=new nn().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 nn,a.ow=new nn,a.Xh=null,a.aw=new En(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new jt,bounds:new Ke,Py:new En,bA:new En,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Ke(NaN,NaN,NaN,NaN).freeze(),a.wo=new En(NaN,NaN).freeze(),a.Sp=new Ke(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new _n;var y=new Dn,x=new yr;x.bind(new Ls("text","",wi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Dn,x=new yr,x.stroke="brown",x.bind(new Ls("text","",wi)),y.add(x),a.Lg.add("Comment",y),y=new Dn,y.selectable=!1,y.avoidable=!1,x=new Yi,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new En(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new _n,y=new Di,y.selectionObjectName="GROUPPANEL",y.type=fn.Vertical,x=new yr,x.font="bold 12pt sans-serif",x.bind(new Ls("text","",wi)),y.add(x),x=new fn(fn.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 _n,y=new wn,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 wn,x=new Yi,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Fo,y.type=fn.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=fn.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 jt,a.zy=500,a.wp=new jt,a.wq=!1}be.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 nn().freeze(),a.nw=new nn().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(),zo=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function id(){return null}be.prototype.reset=function(){this.clear(),this.vb=!0,hf(this),Sh(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()},be.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=qt.document.body);var y=Nn("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},be.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=Nn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Ih=Nn("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||Eo||(y=11)}this.Db=y,this.Gw=!0},be.prototype.qb=function(a){a.classType===be&&(this.autoScale=a)},be.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||ie("Diagram setup requires an argument DIV."),a.Ka!==null&&ie("Diagram has already completed setup."),typeof y=="string"?a.Ka=qt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:ie("No DIV or DIV id supplied: "+y),a.Ka===null&&ie("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&ie("Invalid div id; div already has a Diagram associated with it."),!a.ol&&qt.ResizeObserver){var x=sn(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 Cu(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 Cu(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,os){b=Nn("div");var z=Nn("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=sn(function(){a.Yh=null,a.N()},300),a.Ov=sn(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 be&&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)}}be.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},be.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))}be.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:qt.devicePixelRatio||1},be.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},be.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},be.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},be.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},be.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},be.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},be.prototype.doFocus=function(){this.focus()},be.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)}},be.prototype.Oy=function(){this.H.R("GainedFocus")},be.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 fn(fn.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)}be.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 vt=b.width,xt=b.height,Ct=b.right,kt=b.bottom;b=this.scale;var Gt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Gt=Gt+a.scrollWidth-a.clientWidth;break;case"reverse":Gt=a.scrollWidth-Gt-a.clientWidth}var Ot=Gt;vt<rt||xt<at?(Gt=jt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ot&&(Gt.x=Ot/b+tt,this.ju=Ot),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Gt.y=a.scrollTop/b+ot,this.lu=a.scrollTop),this.position=Gt,jt.free(Gt),this.Ee=this.qr=!1):(Gt=jt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Gt.h(Ot+tt,this.position.y)),ut>Ct&&(this.position=Gt.h(-(y.scrollWidth-this.Aa)+Ot-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(ot<E&&(this.position=Gt.h(this.position.x,a.scrollTop+ot)),z>kt&&(this.position=Gt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),jt.free(Gt),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,vt>=rt&&tt>=ft&&ut<=Ct&&(x.style.width="1px"),xt>=at&&ot>=E&&z<=kt&&(x.style.height="1px"))}},be.prototype.computeBounds=function(a){return a===void 0&&(a=new Ke),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}be.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Ye(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof wn||(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 wn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Ke(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=jt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Ke.allocAt(0,0,E.width,E.height);var b=jt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Ke.free(E),jt.free(b),jt.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()?mo:rt),ff(a,a.documentBounds,b,tt,ot,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,pe.B(z.x,x)&&pe.B(z.y,E)&&pe.B(z.width,b)&&pe.B(z.height,tt)||a.onViewportBoundsChanged(new Ke(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}be.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=be.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 jt(a.x,a.y)}},Mt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new jt(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 ce){this.eq=a;var y=jt.alloc();this.fq=this.op(a.ga(Is,y)),jt.free(y)}else this.eq=null,this.fq=us};function ff(a,y,x,E,b,z){var tt=jt.allocAt(a.pa.x,a.pa.y),ot=tt.x,rt=tt.y;if(a.eq!==null){var at=jt.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,jt.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),Sh(a),jt.free(tt)}Mt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=ju(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof ci)return a}else if(a=ju(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 ju(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 un||b instanceof nn||(b=new nn),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 un||E instanceof nn||(E=new nn),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 un||b instanceof nn||(b=new nn),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 nn;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 un||b instanceof nn||(b=new nn),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 un||b instanceof nn)&&(z=b),b=!0),z instanceof un||z instanceof nn||(z=new nn),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 un||b instanceof nn)&&(z=b),b=!0),z instanceof un||z instanceof nn||(z=new nn),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}be.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),Eo&&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,Eo&&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)}be.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)},be.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)},be.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)},be.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)},be.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new jt(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 jt(y,a),this.Ab):new jt(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=jt.allocAt(tt,ot),a.Ab.Cd(y),x.documentPoint.assign(y),jt.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))}}be.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Fc(a){a.ld||ha(a),a.Va()}be.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Mt=be.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 jt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Ln(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&&(yh(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=Ke.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),Ke.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),yh(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 nn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof Di&&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 Di||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Di&&x.isVisible()&&qr(this,x);for(a.reset();a.next();)x=a.value,x instanceof wn&&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 Di?(Ql(z)||Xa(z)||ic(z))&&qr(a,z):z instanceof wn?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(ti(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();ti(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&&ie("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&&ie("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,vt=ft.length;try{var xt=new Ke(z.x,z.y,E.width/b,E.height/b),Ct=xt.copy();Ct.Co(x),yh(a,Ct),ha(a),a.Fd(ft,vt,a,xt),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 Gt=Gi.alloc();Gt.reset(),Gt.translate(x.left,x.top),Gt.scale(b),z.x===0&&z.y===0||Gt.translate(-z.x,-z.y),y.setTransform(Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),y.yc(),y instanceof Bl&&Xy(y,Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),Gi.free(Gt),Ra(a,y),y.globalAlpha=a.pb;var Ot=a.Qj("Grid");if(tt){var Yt=new nn,$t=tt.iterator;for($t.reset();$t.next();){var ne=$t.value;ne instanceof ci&&(at||ne.layer!==Ot)&&(ne.Gj(),Yt.add(ne))}for(at=0;at<vt;at++)xl(ft[at],y,a,Yt,rt);Yt.each(function(ke){return ke.Gj()})}else for(Yt=0;Yt<vt;Yt++){var de=ft[Yt];de===Ot?at&&de.gc(y,a,!0):de.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,vt,a,a.viewportBounds),yh(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=!(Eo||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 fn,E=a instanceof be,b;for(b in y){b===""&&ie("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])),We(z)?tt=b.substr(ot+1):ie("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 ri&&tt==="Changed"){a.Pe(y[tt]);continue}else ie('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof ce&&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 _n,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")},be.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=Ke.alloc(),_g(this,this.computeBounds(E)),Ke.free(E)),E=this.ta,E===null||E instanceof xh)))){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),vt=Math.floor(b-ut),xt=Math.floor(ot-ft);a.drawImage(E.Oa,ut,ft,vt,xt,0,0,vt,xt),Hc(this.Yf,this)&&a.clearRect(0,0,rt,at),E=Hn(),a=Hn(),xt=Math.abs(z),vt=Math.abs(y);var Ct=ut===0?0:b-xt;ut=jt.allocAt(Ct,0),xt=jt.allocAt(xt+Ct,ot),a.push(new Ke(Math.min(ut.x,xt.x),Math.min(ut.y,xt.y),Math.abs(ut.x-xt.x),Math.abs(ut.y-xt.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(xt,kt),E.push(new Ke(Math.min(ut.x,xt.x),Math.min(ut.y,xt.y),Math.abs(ut.x-xt.x),Math.abs(ut.y-xt.y))),Ct=ft===0?0:ot-vt,ut.h(0,Ct),xt.h(b,vt+Ct),a.push(new Ke(Math.min(ut.x,xt.x),Math.min(ut.y,xt.y),Math.abs(ut.x-xt.x),Math.abs(ut.y-xt.y))),ro(ut,kt),ro(xt,kt),E.push(new Ke(Math.min(ut.x,xt.x),Math.min(ut.y,xt.y),Math.abs(ut.x-xt.x),Math.abs(ut.y-xt.y))),Hc(this.Yf,this)&&(b=0<z?0:-z,ot=0<y?0:-y,ut.h(b,ot),xt.h(rt+b,at+ot),a.push(new Ke(Math.min(ut.x,xt.x),Math.min(ut.y,xt.y),Math.abs(ut.x-xt.x),Math.abs(ut.y-xt.y))),ro(ut,kt),ro(xt,kt),E.push(new Ke(Math.min(ut.x,xt.x),Math.min(ut.y,xt.y),Math.abs(ut.x-xt.x),Math.abs(ut.y-xt.y)))),jt.free(ut),jt.free(xt),Oh(this,!1,!0),this.Ka===null&&ie("No div specified"),this.ta===null&&ie("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,vt=Ke.alloc(),xt=tt.Pa.s,kt=xt.length,Ct=rt.length;for(var Gt=0;Gt<kt;Gt++){var Ot=xt[Gt],Yt=Yc(Ot,Ot.actualBounds);t:{for(var $t=2/ut,ne=4/ut,de=0;de<Ct;de++){var ke=rt[de];if(ke.width!==0&&ke.height!==0&&Yt.Vu(ke.x-$t,ke.y-$t,ke.width+ne,ke.height+ne)){Yt=!0;break t}}Yt=!1}Yt&&tt.Oj(b,Ot,this,ft,ut,vt,!0)}Ke.free(vt),b.globalAlpha=at}b.restore(),b.Vc(!0),this.Yf&&Hc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ti(E),ti(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){Sh(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,vt=ut.width,xt=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,Sh(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 Gt=a.documentBounds,Ot=0,Yt=0,$t=0,ne=0,de=ut.width,ke=ut.height,An=a.rj;a.contentAlignment.sb()?(Gt.width>de&&(Ot=An.left,Yt=An.right),Gt.height>ke&&($t=An.top,ne=An.bottom)):(Ot=An.left,Yt=An.right,$t=An.top,ne=An.bottom);var Yn=Gt.width+Ot+Yt,Wn=Gt.height+$t+ne;An=a.scale;var Sn=Yn>rt/An,tn=Wn>at/An;if(!(z||a.gf||a.Be||Sn||tn))return!0;Ot=Gt.x-Ot,rt=ut.x,Yt=Gt.right+Yt,at=ut.right+tt,$t=Gt.y-$t;var Fi=ut.y;Gt=Gt.bottom+ne,ut=ut.bottom+ot;var Ei="1px";if(ne="1px",a.scrollMode===Md&&(Sn||tn)&&(Sn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Sn=1,Ot+1<rt&&(Sn=Math.max((rt-Ot)*An+a.Aa,Sn)),Yt>at+1&&(Sn=Math.max((Yt-at)*An+a.Aa,Sn)),de+tt+1<Yn&&(Sn=Math.max((Yn-de)*An+a.Aa,Sn)),Ei=Sn.toString()+"px"),tn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Sn=1,$t+1<Fi&&(Sn=Math.max((Fi-$t)*An+a.ya,Sn)),Gt>ut+1&&(Sn=Math.max((Gt-ut)*An+a.ya,Sn)),ke+ot+1<Wn&&(Sn=Math.max((Wn-ke)*An+a.ya,Sn)),ne=Sn.toString()+"px")),Sn=Ei!=="1px",tn=ne!=="1px",Sn&&tn||!Sn&&!tn||(tn&&(at-=a.Db),Sn&&(ut-=a.Db),Yn<de+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Ot+1<rt&&(tt=Math.max((rt-Ot)*An+a.Aa,tt)),Yt>at+1&&(tt=Math.max((Yt-at)*An+a.Aa,tt)),de+1<Yn&&(tt=Math.max((Yn-de)*An+a.Aa,tt)),Ei=tt.toString()+"px"),Sn=Ei!=="1px",tt=a.ya,Sn!==a.Be&&(tt=Sn?a.ya-a.Db:a.ya+a.Db),Wn<ke+ot||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ot=1,$t+1<Fi&&(ot=Math.max((Fi-$t)*An+tt,ot)),Gt>ut+1&&(ot=Math.max((Gt-ut)*An+tt,ot)),ke+1<Wn&&(ot=Math.max((Wn-ke)*An+tt,ot)),ne=ot.toString()+"px"),tn=ne!=="1px"),a.qr&&Sn===a.Be&&tn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Sn!==a.Be&&(Ei==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Sn,kt.style.width=Ei,tn!==a.gf&&(ne==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(ot=jt.alloc(),tn?(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)),jt.free(ot))),z&&Sh(a),a.gf=tn,kt.style.height=ne,a.gu=!0,z&&(a.pn=!0),y=Ct.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(de+1<Yn?y=(a.position.x-Ot)*An:Ot+1<rt?y=Ct.scrollWidth-Ct.clientWidth:Yt>at+1&&(y=a.position.x*An)),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&&(ke+1<Wn?Ct.scrollTop=(a.position.y-$t)*An:$t+1<Fi?Ct.scrollTop=Ct.scrollHeight-Ct.clientHeight:Gt>ut+1&&(Ct.scrollTop=a.position.y*An)),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=Ke.allocAt(b,ft,vt,xt),a.onViewportBoundsChanged(x,a.viewportBounds,An,z),Ke.free(x),!1):!0}Mt=be.prototype,Mt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&ie("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&&ie('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 Di&&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),Ye(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 nn,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)},be.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 _n;if(a!==null)if(Ye(a))for(var z=0;z<a.length;z++)wu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)wu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)wu(this,b,a.value,x,E);for(a=this.nodes;a.next();)wu(this,b,a.value,x,E);for(a=this.links;a.next();)wu(this,b,a.value,x,E)}vh(this,b,y,E,x)}};function wu(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 Dn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof Di&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)wu(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)&&wu(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)wu(a,y,x.value,E,b)}else if(x instanceof wn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)wu(a,y,x.value,E,b);else x instanceof Fo||y.add(x,a.Pd(b,x,x.location))}function vh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=jt.alloc(),tt=jt.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=jt.alloc();at.next();){var ft=at.key,vt=at.value;if(ft.Zc()){var xt=Vg(a,ft,y);xt!==null?ot.push(new it(ft,vt,xt)):(!b||ft.canMove())&&(xt=vt.point,z.assign(xt),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,vt.shifted===void 0&&(vt.shifted=new jt),vt.shifted.assign(ut.re(xt)))}else at.key instanceof wn&&rt.push(at.sa)}for(jt.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 jt),ft.node.location=z.add(ft.Su.shifted);for(b=jt.alloc(),at=jt.alloc(),ft=rt.length,vt=0;vt<ft;vt++){var Ct=rt[vt];if(xt=Ct.key,xt instanceof wn)if(xt.suspendsRouting){xt.Tg=null,ut=xt.fromNode;var kt=xt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(kt=Ct.value.point,xt.dragComputation===null)y.add(xt,a.Pd(E,xt,tt)),Bd(xt,tt.x-kt.x,tt.y-kt.y);else{Ct=jt.allocAt(0,0),(ut=xt.i(0))&&ut.w()&&Ct.assign(ut);var Gt=ut=jt.alloc().assign(Ct).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Gt=jt.alloc(),Qf(a,xt,ut,Gt,E)),ut.assign(xt.dragComputation(xt,ut,Gt)).re(Ct),y.add(xt,a.Pd(E,xt,ut)),Bd(xt,ut.x-kt.x,ut.y-kt.y),jt.free(Ct),jt.free(ut),Gt!==ut&&jt.free(Gt)}else ut!==null&&(b.assign(ut.location),Gt=y.I(ut),Gt!==null&&b.re(Gt.point)),kt!==null&&(at.assign(kt.location),Gt=y.I(kt),Gt!==null&&at.re(Gt.point)),ut!==null&&kt!==null?b.Xa(at)?(ut=Ct.value.point,kt=z,kt.assign(b),kt.re(ut),y.add(xt,a.Pd(E,xt,b)),Bd(xt,kt.x,kt.y)):(xt.suspendsRouting=!1,xt.bb()):(Ct=Ct.value.point,ut=ut!==null?b:kt!==null?at:tt,y.add(xt,a.Pd(E,xt,ut)),Bd(xt,ut.x-Ct.x,ut.y-Ct.y))}else(xt.fromNode===null||xt.toNode===null)&&(ut=Ct.value.point,y.add(xt,a.Pd(E,xt,tt)),Bd(xt,tt.x-ut.x,tt.y-ut.y))}jt.free(z),jt.free(tt),jt.free(b),jt.free(at),ti(ot),ti(rt),x||(ha(a),qd(a,y))}}be.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new jt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=jt.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&&jt.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=jt.allocAt(0,0),z.yi(0,0,a,y,b),pe.No(x.x,x.y,ot+z.x,tt+z.y,a,y,E),jt.free(z)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof wn&&(y.suspendsRouting=!0)}function qd(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof wn&&(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=be.prototype,Mt.Pd=function(a,y,x){if(x===void 0)return new rd(_o);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new rd(new jt(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&&ie("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&ie("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&ie("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&ie("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&&ie("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&&ie("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 un),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 un),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)},be.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 ce){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 fn)if(typeof ot=="number"&&rt instanceof ce){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 be?typeof ot=="number"&&rt instanceof Rr&&(y?this.Wa.mb(ot):(rt.Xe(this),this.Wa.Gb(ot,rt))):ie("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Ds){var ft=a.object,vt=a.oldParam,xt=a.oldValue;if(ft instanceof fn)typeof vt=="number"&&xt instanceof ce?y?ft.Gb(vt,xt):ft.pc(vt):typeof vt=="number"&&xt instanceof Hs&&(xt.isRow?hS(ft,vt,y?xt:void 0):dS(ft,vt,y?xt:void 0));else if(ft instanceof Rr){var Ct=a.newParam===!0;typeof vt=="number"&&xt instanceof ci&&(y?0>ft.Pa.indexOf(xt)&&ft.oi(vt,xt,Ct):(xt.isSelected=!1,xt.isHighlighted=!1,xt.Wb(),ft.pc(Ct?vt:-1,xt,Ct)))}else ft instanceof be?typeof vt=="number"&&xt instanceof Rr&&(y?(xt.Xe(this),this.Wa.Gb(vt,xt)):this.Wa.mb(vt)):ie("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==sl&&ie("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},be.prototype.Ea=function(a){return this.undoManager.Ea(a)},be.prototype.eb=function(a){return this.undoManager.eb(a)},be.prototype.Kf=function(){return this.undoManager.Kf()},be.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}},be.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},be.prototype.rp=function(){this.partManager.rp()};function Xg(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Sh(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,Sh(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=jt.allocAt(a.pa.x+ot/y-ot/x,a.pa.y+rt/y-rt/x),a.position=z,jt.free(z),a.Ca=x,Sh(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))}}be.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),yh(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 yh(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=En.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/pe.vx(z,ut):b=b*ut/pe.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=Ke.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ke.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Ke.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=jt.alloc(),pe.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),En.free(E),x.part.location=y,jt.free(y)}}be.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)}},be.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))},be.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Ye(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof ci||ie("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||ie("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},be.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=be.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 nn().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||ie("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=jt.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)),jt.free(z);return}ie("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):ie("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),jt.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,vt=x*tt+E*rt+ut;y=x*ot+E*at+ft;var xt=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(vt,xt),vt=Math.max(vt,xt),xt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),vt=Math.max(vt,E),xt=Math.min(xt,x),y=Math.max(y,x),z=Math.min(z,tt),vt=Math.max(vt,tt),xt=Math.min(xt,b),y=Math.max(y,b),new Ke(z,xt,vt-z,y-xt)},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}be.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;Ln(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 nn&&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 nn&&x.Bg.remove(a),pg(E));break}}}}}be.prototype.Wd=function(){this.partManager.Wd()},be.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},be.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},be.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},be.prototype.Vb=function(a){return this.partManager.Vb(a)},be.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Mt=be.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 Sh(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=Ke.alloc();_g(this,this.computeBounds(a)),Ke.free(a)}},Mt.rz=function(){for(var a=new nn,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 un,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 un;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new _n,E=new _n;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;ie("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)},be.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=Ke.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)}Ke.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Ke.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Dn&&eg(a,tt,E,y);Ke.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 Di)for(y=y.memberParts;y.next();)b=y.value,b instanceof Dn&&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)}be.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=Ln(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=Ke.alloc(),a.computeBounds(y),y.ed(a.documentBounds),_g(a,y),Ke.free(y),a.Fc=!0,a.bd(),tp(a))}},a.vp))}be.prototype.ug=function(){this.vk!==-1&&(qt.clearTimeout(this.vk),this.vk=-1)},be.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=Ke.allocAt(0,0,E.width*b,E.height*b);var z=jt.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(_o)||(y=new jt(y.x+z.x/b,y.y+z.y/b)),Ke.free(E),jt.free(z),y},Mt=be.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 Di&&(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"&&ie('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"&&ie("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 En(1/0,1/0):new En(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 vt=y.document||document,xt=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||ie("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 Cu(null,vt,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=vt,E.hs=xt,Fs(a,E.context,at,new En(ft.width,ft.height),a.Ca,a.pa,rt,ut,Ct,y),E.context):(a.Xm=!1,Fs(a,kt,at,new En(ft.width,ft.height),a.Ca,a.pa,rt,ut,Ct,y),a.Xm=!0,ft.context);var Gt=a.Pp,Ot=a.documentBounds.copy();if(Ot.Fv(a.yb),Ct)for(var Yt=a.Wa.s,$t=Yt.length,ne=0;ne<$t;ne++){var de=Yt[ne];if(de.visible&&de.isTemporary){de=de.Pa.s;for(var ke=de.length,An=0;An<ke;An++){var Yn=de[An];Yn.isInDocumentBounds&&Yn.isVisible()&&(Yn=Yn.actualBounds,Yn.w()&&Ot.ed(Yn))}}}if(Yt=new jt(Ot.x,Ot.y),rt!==null){for($t=new Ke(0,0,0,0),ne=!0,de=rt.iterator,de.reset();de.next();)ke=de.value,ke instanceof ci&&(An=ke.layer,An!==null&&!An.visible||An!==null&&!Ct&&An.isTemporary||!ke.isVisible()||(ke=ke.actualBounds,ke.w()&&(ne?(ne=!1,$t.assign(ke)):$t.ed(ke))));Ot.width=$t.width,Ot.height=$t.height,Yt.x=$t.x,Yt.y=$t.y}return ot!==null&&ot.w()&&(Yt=ot,z||(z=Gt)),$t=ot=0,at!==null&&(ot=at.left+at.right,$t=at.top+at.bottom),ne=de=0,b!==null&&(de=b.width,ne=b.height,isFinite(de)&&(de=Math.max(0,de-ot)),isFinite(ne)&&(ne=Math.max(0,ne-$t))),b!==null&&z!==null?(z==="NaN"&&(z=Gt),b.w()?(b=de,Ot=ne):isNaN(ne)?(b=de,Ot=Ot.height*z):(b=Ot.width*z,Ot=ne)):b!==null?b.w()?(z=Math.min(de/Ot.width,ne/Ot.height),b=de,Ot=ne):isNaN(ne)?(z=de/Ot.width,b=de,Ot=Ot.height*z):(z=ne/Ot.height,b=Ot.width*z,Ot=ne):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-ot)/Ot.width,(tt.height-$t)/Ot.height),z>Gt?(z=Gt,b=Ot.width,Ot=Ot.height):(b=tt.width,Ot=tt.height)):(b=Ot.width*z,Ot=Ot.height*z):(z=Gt,b=Ot.width,Ot=Ot.height),at!==null?(b+=ot,Ot+=$t):at=new hi(0),tt!==null&&(Gt=tt.width,tt=tt.height,isNaN(Gt)&&(Gt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Gt)&&(b=Math.min(b,Gt)),isFinite(tt)&&(Ot=Math.min(Ot,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Ot),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=vt,E.hs=xt,Fs(a,E.context,at,new En(Math.ceil(b),Math.ceil(Ot)),z,Yt,rt,ut,Ct,y),E.context):(a.Xm=!1,Fs(a,kt,at,new En(Math.ceil(b),Math.ceil(Ot)),z,Yt,rt,ut,Ct,y),a.Xm=!0,ft.context)}Wt.Object.defineProperties(be.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 xh(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 xh(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),th===this&&(th=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)&&Cn(a,"0 <= value <= 1",be,"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&&Cn(a,">= 0",be,"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&&Cn(a,">= 0",be,"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 Cn(a,">= 0",be,"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&&ie("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=jt.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()?Sh(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)}jt.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!==fn.Grid&&ie("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),yh(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),Sh(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||ie("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()||ie("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()||ie("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)):Cn(a,"> 0",be,"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)):Cn(a,"> 0",be,"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&&ie("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&&ie("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 En(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))}}}),Wt.Object.defineProperties(be,{licenseKey:{get:function(){return sp.jc()},set:function(a){sp.add(a.replace(/\s/g,""))}},version:{get:function(){return jc}}}),be.prototype.makeImageData=be.prototype.Jx,be.prototype.makeImage=be.prototype.Wz,be.prototype.cacheGroupExternalLinks=be.prototype.Fu,be.prototype.addRenderer=be.prototype.bs,be.prototype.makeSVG=be.prototype.av,be.prototype.makeSvg=be.prototype.Cs,be.prototype.stopAutoScroll=be.prototype.ug,be.prototype.doAutoScroll=be.prototype.gs,be.prototype.isUnoccupied=be.prototype.Yj,be.prototype.raiseDiagramEvent=be.prototype.R,be.prototype.removeDiagramListener=be.prototype.am,be.prototype.addDiagramListener=be.prototype.Bj,be.prototype.findTreeRoots=be.prototype.yz,be.prototype.layoutDiagram=be.prototype.Uz,be.prototype.findTopLevelGroups=be.prototype.qz,be.prototype.findTopLevelNodesAndLinks=be.prototype.rz,be.prototype.ensureBounds=be.prototype.Va,be.prototype.findLinksByExample=be.prototype.ls,be.prototype.findNodesByExample=be.prototype.ms,be.prototype.findLinkForData=be.prototype.Kc,be.prototype.findNodeForData=be.prototype.ii,be.prototype.findPartForData=be.prototype.Lc,be.prototype.findLinkForKey=be.prototype.findLinkForKey,be.prototype.findNodeForKey=be.prototype.Vb,be.prototype.findPartForKey=be.prototype.findPartForKey,be.prototype.rebuildParts=be.prototype.Wd,be.prototype.transformViewToDoc=be.prototype.Ps,be.prototype.transformRectDocToView=be.prototype.zA,be.prototype.transformDocToView=be.prototype.op,be.prototype.centerRect=be.prototype.es,be.prototype.scrollToRect=be.prototype.tv,be.prototype.scroll=be.prototype.scroll,be.prototype.highlightCollection=be.prototype.Jz,be.prototype.highlight=be.prototype.Iz,be.prototype.selectCollection=be.prototype.rA,be.prototype.select=be.prototype.select,be.prototype.updateAllRelationshipsFromData=be.prototype.rp,be.prototype.updateAllTargetBindings=be.prototype.updateAllTargetBindings,be.prototype.commit=be.prototype.commit,be.prototype.rollbackTransaction=be.prototype.Kf,be.prototype.commitTransaction=be.prototype.eb,be.prototype.startTransaction=be.prototype.Ea,be.prototype.raiseChanged=be.prototype.g,be.prototype.raiseChangedEvent=be.prototype.cb,be.prototype.removeChangedListener=be.prototype.ik,be.prototype.addChangedListener=be.prototype.Pe,be.prototype.removeModelChangedListener=be.prototype.mA,be.prototype.addModelChangedListener=be.prototype.Yw,be.prototype.findLayer=be.prototype.Qj,be.prototype.removeLayer=be.prototype.kA,be.prototype.addLayerAfter=be.prototype.Cy,be.prototype.addLayerBefore=be.prototype.Ww,be.prototype.addLayer=be.prototype.Al,be.prototype.moveParts=be.prototype.moveParts,be.prototype.copyParts=be.prototype.Kj,be.prototype.removeParts=be.prototype.Is,be.prototype.remove=be.prototype.remove,be.prototype.add=be.prototype.add,be.prototype.clearDelayedGeometries=be.prototype.bx,be.prototype.setProperties=be.prototype.nm,be.prototype.attach=be.prototype.Du,be.prototype.set=be.prototype.set,be.prototype.resetInputOptions=be.prototype.Sx,be.prototype.setInputOption=be.prototype.sA,be.prototype.getInputOption=be.prototype.Ql,be.prototype.resetRenderingHints=be.prototype.Tx,be.prototype.setRenderingHint=be.prototype.Xx,be.prototype.getRenderingHint=be.prototype.Gf,be.prototype.maybeUpdate=be.prototype.bd,be.prototype.requestUpdate=be.prototype.$b,be.prototype.delayInitialization=be.prototype.Xy,be.prototype.isUpdateRequested=be.prototype.Pz,be.prototype.invalidateDocumentBounds=be.prototype.Ya,be.prototype.findObjectsNear=be.prototype.og,be.prototype.findPartsNear=be.prototype.mz,be.prototype.findObjectsIn=be.prototype.Cf,be.prototype.findPartsIn=be.prototype.ux,be.prototype.findObjectsAt=be.prototype.ji,be.prototype.findPartsAt=be.prototype.lz,be.prototype.findObjectAt=be.prototype.ic,be.prototype.findPartAt=be.prototype.Ol,be.prototype.focusObject=be.prototype.zz,be.prototype.alignDocument=be.prototype.Jy,be.prototype.zoomToRect=be.prototype.BA,be.prototype.zoomToFit=be.prototype.zoomToFit,be.prototype.diagramScroll=be.prototype.kx,be.prototype.focus=be.prototype.focus;var ng=new _n,um=null,os=qt.document!==void 0,Rc=null,tc="",ja=new Ze(be,"None",0),Yl=new Ze(be,"Uniform",1),ec=new Ze(be,"UniformToFill",2),pf=new Ze(be,"CycleAll",10),ep=new Ze(be,"CycleNotDirected",11),np=new Ze(be,"CycleNotDirectedFast",12),ip=new Ze(be,"CycleNotUndirected",13),op=new Ze(be,"CycleDestinationTree",14),rp=new Ze(be,"CycleSourceTree",15),Md=new Ze(be,"DocumentScroll",1),mf=new Ze(be,"InfiniteScroll",2),Ed=new Ze(be,"TreeParentCollapsed",21),js=new Ze(be,"AllParentsCollapsed",22),ig=new Ze(be,"AnyParentsCollapsed",23),sp=new un,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",ze.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",pe.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}}be.className="Diagram",be.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=qt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof be?y.H:null},be.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},be.useDOM=function(a){os=a?qt.document!==void 0:!1},be.isUsingDOM=function(){return os},be.None=ja,be.Uniform=Yl,be.UniformToFill=ec,be.CycleAll=pf,be.CycleNotDirected=ep,be.CycleNotDirectedFast=np,be.CycleNotUndirected=ip,be.CycleDestinationTree=op,be.CycleSourceTree=rp,be.DocumentScroll=Md,be.InfiniteScroll=mf,be.TreeParentCollapsed=Ed,be.AllParentsCollapsed=js,be.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=be[_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(ze[_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 jt:a,this.o=new jt}Wt.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 En(NaN,NaN).freeze(),this.gridSnapCellSpot=Is,this.gridSnapOrigin=new jt(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=be.call(this,a)||this;else x=be.call(this)||this,y=a;return dt(x),y&&x.nm(y),x}Ee(ct,be);function dt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=ba,a.layout=new ca}ct.prototype.reset=function(){be.prototype.reset.call(this),dt(this)},ct.className="Palette";function pt(a,y){if(typeof a=="string"||qt.Element&&a instanceof Element)var x=be.call(this,a)||this;else x=be.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 Kt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,ot=E.lastInput.documentPoint;z.position=new jt(ot.x-tt.width/2,ot.y-tt.height/2)}},x.Pf=function(){E.Ya(),Dt(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&&Dt(E)},x.autoScale=Yl,x.vb=!1,y&&Object.assign(x,y),x}Ee(pt,be),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 Cu(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}}}be.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&ie("No div specified"),this.ta===null&&ie("No canvas specified"),!(this.ta instanceof xh)&&(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=Ke.alloc().assign(a.viewportBounds).ed(y.viewportBounds),yh(y,b),Ke.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,vt=Ke.alloc(),xt=ot.Pa.s,Ct=xt.length,kt=0;kt<Ct;kt++){var Gt=xt[kt];(E||Gt!==at)&&ot.Oj(b,Gt,rt,null,ft,vt,!1)}Ke.free(vt),b.globalAlpha=ut}}}}}function Dt(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=En.alloc();b.h(x.width,x.height),E.desiredSize=b,En.free(b),a=2/a.scale,E instanceof Yi&&(E.strokeWidth=a),y.location=new jt(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(),Dt(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))},Wt.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&ie("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),Dt(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),Dt(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 Kt(){Wr.call(this),this.j=null}Ee(Kt,Wr),Kt.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 jt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new jt(a.x-this.j.x,a.y-this.j.y)),!0)},Kt.prototype.doActivate=function(){this.j=null,Wr.prototype.doActivate.call(this)},Kt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Kt.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 jt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new jt(a.x-this.j.x,a.y-this.j.y)}}},Kt.className="OverviewDraggingTool";function Ht(){ho(this),this.H=th,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}Ht.prototype.toString=function(){return"CommandHandler"},Ht.prototype.Xe=function(a){this.H=a},Ht.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Eo?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()},Ht.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Ht.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ar&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Ht.prototype.canStopCommand=function(){return!0},Ht.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=""}},Ht.prototype.canSelectAll=function(){return this.diagram.allowSelect},Ht.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 nn,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=""}},Ht.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Ht.prototype.copySelection=function(){var a=this.diagram,y=new nn;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)},Ht.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Ht.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Ht.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Ht.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 un,x.addAll(z),Rc=x,tc=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ht.prototype.pasteFromClipboard=function(){var a=new nn,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},Ht.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);vh(y,z,new jt(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=""}},Ht.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)},Ht.prototype.undo=function(){this.diagram.undoManager.undo()},Ht.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Ht.prototype.redo=function(){this.diagram.undoManager.redo()},Ht.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Ht.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))},Ht.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)},Ht.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))},Ht.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)},Ht.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Ht.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Ht.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)},Ht.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Ht.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 Dn&&rt.isTreeExpanded&&(!(rt instanceof Di)||rt.isSubGraphExpanded);)rt=b.pop();0<b.length?(rt instanceof ci&&y.tv(rt.actualBounds),rt instanceof Dn&&!rt.isTreeExpanded&&(rt.isTreeExpanded=!0),rt instanceof Di&&!rt.isSubGraphExpanded&&(rt.isSubGraphExpanded=!0)):(rt instanceof ci&&y.es(rt.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Ln(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 wn){var E=y.fromNode;E!==null&&re(a,E,x),y=y.toNode,y!==null&&re(a,y,x)}else y instanceof Dn&&(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}Ht.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)},Ht.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 un;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 Dn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Ht.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Dn&&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 Dn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ht.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 un;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 Dn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Ht.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Dn)||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 Dn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ht.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 un,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var ot=new un,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 vt=ot.iterator;vt.next();)if(!vt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof Di)Mu(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var xt=y.copyNodeData(x);We(xt)&&(y.xf(xt),E=a.ii(xt))}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=""}}}},Ht.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 Re(a){var y=Hn();for(a=a.iterator;a.next();){var x=a.value;x instanceof wn||y.push(x)}a=new nn,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 ti(y),a}Ht.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof wn)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},Ht.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 un;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof Di&&z.canUngroup()&&E.add(z)}var tt=new un;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 vt=ft.value;if(vt.isSelected=!0,!(vt instanceof wn)){var xt=vt.data;xt!==null?x.mp(xt,ut):vt.containingGroup=at}}y.remove(rt)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Ht.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 Di))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Di&&y.canUngroup())return!0;return!1},Ht.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Re(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Ht.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 un;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 Di&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ht.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Di&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Di&&y.isSubGraphExpanded)return!0;return!1},Ht.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 un;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 Di&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ht.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Di&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Di&&!y.isSubGraphExpanded)return!0;return!1},Ht.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)}},Ht.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},Ht.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 ce?b=a.ga(mo):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new jt(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)}},Ht.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)},Ht.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 _n,a===null)return E;for(var z=a.iterator;z.next();)wu(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 wn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Wt.Object.defineProperties(Ht.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||ie("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}}}),Ht.className="CommandHandler",id=function(){return new Ht};function ce(){ho(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new jt(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 Ke(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Ke(NaN,NaN,NaN,NaN).freeze(),this.dc=new Ke(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=$e,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 cn,on,qn,li,yi,zi,fo,eo,bo,ar;ce.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())},ce.prototype.Vw=function(a){var y=this.Dh;if(Ye(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},ce.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},ce.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},ce.prototype.copy=function(){return this.clone()},Mt=ce.prototype,Mt.qb=function(a){a.classType===wn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:ie("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ce&&(this.stretch=a)},Mt.toString=function(){return Qn(this.constructor)+"#"+Ho(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 _n),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 fn&&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 fn&&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=jt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return jt.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),jt.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)),jt.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=Ke.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=jt.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)))),jt.free(b),Ke.free(y),E},Mt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=jt.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)))),jt.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=jt.allocAt(0,0),b=jt.allocAt(0,x.height),z=jt.allocAt(x.width,x.height),tt=jt.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=Ke.allocAt(0,0,x.width,x.height);var rt=jt.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)))),jt.free(rt),Ke.free(x),!ot&&(pe.us(a,E,b)||pe.us(a,b,z)||pe.us(a,z,tt)||pe.us(a,tt,E))&&(ot=!0)}return jt.free(E),jt.free(b),jt.free(z),jt.free(tt),ot},Mt.ga=function(a,y){if(y===void 0&&(y=new jt),a instanceof ii){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 Ke);var y=this.naturalBounds,x=this.oe,E=jt.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),jt.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 jt),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),vt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,pe.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*ot+y*at+ft,a=a*rt+y*ut+vt,y=x*ot+E*at+ft,x=x*rt+E*ut+vt,b.h(0,0),E=this.naturalBounds,x=pe.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},ce.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 fn;switch(ul(this,!0)){case on:tt=b=0,ot&&(y=a=1/0);break;case cn: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()||ie("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),zs(this,!1)}},ce.prototype.Wl=function(){},ce.prototype.Dd=function(){return!1},ce.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Ke.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()||ie("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),jh(this,!1),Ke.free(z)},Mt=ce.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=on),y){case on:(x>E||z>b)&&(zs(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case cn: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 Dn&&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 fn&&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 vt;if(!(vt=y.$i||!ut)){var xt=this.naturalBounds;vt=this.wh;var Ct=vt.m11,kt=vt.m21,Gt=vt.dx,Ot=vt.m12,Yt=vt.m22,$t=vt.dy,ne,de=ne=0;vt=ne*Ct+de*kt+Gt;var ke=ne*Ot+de*Yt+$t;ne=xt.width+ft,de=0;var An=ne*Ct+de*kt+Gt;ne=ne*Ot+de*Yt+$t,de=Math.min(vt,An);var Yn=Math.min(ke,ne),Wn=Math.max(vt+0,An)-de,Sn=Math.max(ke+0,ne)-Yn;vt=de,ke=Yn,ne=xt.width+ft,de=xt.height+ft,An=ne*Ct+de*kt+Gt,ne=ne*Ot+de*Yt+$t,de=Math.min(vt,An),Yn=Math.min(ke,ne),Wn=Math.max(vt+Wn,An)-de,Sn=Math.max(ke+Sn,ne)-Yn,vt=de,ke=Yn,ne=0,de=xt.height+ft,An=ne*Ct+de*kt+Gt,ne=ne*Ot+de*Yt+$t,de=Math.min(vt,An),Yn=Math.min(ke,ne),Wn=Math.max(vt+Wn,An)-de,Sn=Math.max(ke+Sn,ne)-Yn,vt=de,ke=Yn,ft=y.viewportBounds,xt=ft.x,Ct=ft.y,vt=!(vt>ft.width+xt||xt>Wn+vt||ke>ft.height+Ct||Ct>Sn+ke)}if(vt){if(vt=(this.l&256)!==0,a.clipInsteadOfFill&&(vt=!1),this instanceof yr&&(a.font=this.font),vt){if(ke=ot.se()?ot.naturalBounds:ot.actualBounds,Wn=Math.max(tt.x,ke.x),Sn=Math.max(tt.y,ke.y),ft=Math.min(tt.right,ke.right)-Wn,xt=Math.min(tt.bottom,ke.bottom)-Sn,Ct=this.tb,Ct!==null&&(Wn=Ct.x,Sn=Ct.y,ft=Ct.width,xt=Ct.height),Wn>tt.width+tt.x||tt.x>ke.width+ke.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Wn,Sn,ft,xt),a.clip()}if(ut){if(!at.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}rt&&(ke=at.shadowOffset,a.Ev(ke.x*y.scale*this.scale*y.Mb,ke.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))?(zu(this,!0),this.shadowVisible===null&&zh(a)):zu(this,!1),this.hh(a,y),rt&&this.l&512&&sd(a),ut&&rt&&zh(a),vt&&(a.restore(),a.Vc(this instanceof fn)),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===fn.Auto||y.type===fn.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===fn.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 fn;var ot=a instanceof fn?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))?(zu(a,!0),a.shadowVisible===null&&zh(y)):zu(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 fn&&(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 fn?kd(this):!1;if(!(this instanceof fn&&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 fn)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 fn))&&(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,vt=0,xt=0,Ct=0,kt=0,Gt=0;if(Gt=kt=0,b?(kt=tt.x,Gt=tt.y):E||(kt-=at/2,Gt-=at/2),ft=x.start.x*ot+x.start.offsetX,vt=x.start.y*rt+x.start.offsetY,xt=x.end.x*ot+x.end.offsetX,Ct=x.end.y*rt+x.end.offsetY,ft+=kt,xt+=kt,vt+=Gt,Ct+=Gt,x.type===ld)ut=y.createLinearGradient(ft,vt,xt,Ct);else if(x.type===hu)Gt=isNaN(x.endRadius)?Math.max(ot,rt)/2:x.endRadius,isNaN(x.startRadius)?(kt=0,Gt=Math.max(ot,rt)/2):kt=x.startRadius,ut=y.createRadialGradient(ft,vt,kt,xt,Ct,Gt);else if(x.type===hg)try{ut=y.createPattern(x.pattern,"repeat")}catch(Yt){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 Ot=a.diagram;Ot!==null&&x.yk===-1&&Ln(function(){Ot.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Mt.rg=function(a){if(a instanceof fn)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 fn?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()){Pu(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)}Pu(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=jt.alloc();z.yi(y,x,E,b,mo),a.rotate(this.Kb,z.x,z.y),jt.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 Dn&&a.Bd(),y.$b())),jh(a,!0)}}Mt.Uk=function(){!(this.l&2048)&&(Pu(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===fn.Table?eh(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===fn.Auto&&E.Pb()===a?ra(a,cn,y):x===zi?E!==null?E.type===fn.Spot&&E.Pb()===a?ra(a,cn,y):(x=E.defaultStretch,x===zi?ra(a,on,y):ra(a,x,y)):ra(a,on,y):ra(a,x,y)}function eh(a,y,x,E){var b=a.stretch;if(b!==zi)return ra(a,b,E);var z=b=null;switch(y.stretch){case yi:z=!0;break;case cn:z=!0}switch(x.stretch){case li:b=!0;break;case cn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===li||y===cn),z===null&&(z=y===yi||y===cn),b===!0&&z===!0?ra(a,cn,E):b===!0?ra(a,li,E):z===!0?ra(a,yi,E):ra(a,on,E)}function ra(a,y,x){if(x)return y;if(y===on||(x=a.desiredSize,x.w()))return on;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===li)return on;if(y===cn)return yi}else{if(y===yi)return on;if(y===cn)return li}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===yi)return on;if(y===cn)return li}else{if(y===li)return on;if(y===cn)return yi}return y}function zu(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 Pu(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 Dn&&(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 fn?a instanceof Dn?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)&&ie("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new un),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 fn?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 _n),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),We(E)||ie('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=qt.go[a]}if(E===null&&(b!=null&&b.constructor||ie("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 be&&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?ie("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 fn)y=Hu.I(y),y!==null&&(a.type=y);else if(a instanceof tr){var x=jn(tr,y);x!==null?a.type=x:ie("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Pn?(y=jn(Pn,y),y!==null&&(a.type=y)):a instanceof To&&(y=jn(To,y),y!==null&&(a.type=y));else if(y instanceof ce)a instanceof fn||ie("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):ie("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Ze)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Us)a.type=y;else if(y instanceof Ls)a instanceof ce||a instanceof Hs?a.bind(y):ie("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Tl)a instanceof ce?a.Jv(y):ie("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Ks)a instanceof Pn&&a.type===Pn.o?a.figures.add(y):ie("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):ie("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Br)a instanceof be||a instanceof Di?a.layout=y:ie("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)&&ie("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)&&ie("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 ie('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}Wt.Object.defineProperties(ce.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:_o},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:zi},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)&&Cn(a,"0 <= value <= 1",ce,"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 jt(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&&ie("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 En(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 En(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:on},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()&&ie("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&&Cn(a,">= 0",ce,"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&&Cn(a,">= 1",ce,"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&&Cn(a,">= 0",ce,"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&&Cn(a,">= 1",ce,"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 Dn||ie("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&&Cn(a,">= 0",ce,"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&&Cn(a,">= 0",ce,"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&&Cn(a,">= 0",ce,"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&&Cn(a,">= 0",ce,"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))}}}),ce.prototype.trigger=ce.prototype.Jv,ce.prototype.findBindingPanel=ce.prototype.ih,ce.prototype.findTemplateBinder=ce.prototype.pz,ce.prototype.setProperties=ce.prototype.nm,ce.prototype.apply=ce.prototype.apply,ce.prototype.attach=ce.prototype.Du,ce.prototype.set=ce.prototype.set,ce.prototype.isEnabledObject=ce.prototype.If,ce.prototype.isVisibleObject=ce.prototype.Ed,ce.prototype.isContainedBy=ce.prototype.rg,ce.prototype.getNearestIntersectionPoint=ce.prototype.rs,ce.prototype.getLocalPoint=ce.prototype.qs,ce.prototype.getDocumentScale=ce.prototype.Df,ce.prototype.getDocumentAngle=ce.prototype.li,ce.prototype.getDocumentBounds=ce.prototype.mi,ce.prototype.getDocumentPoint=ce.prototype.ga,ce.prototype.intersectsRect=ce.prototype.Yc,ce.prototype.containedInRect=ce.prototype.fh,ce.prototype.containsRect=ce.prototype.Re,ce.prototype.containsPoint=ce.prototype.ca,ce.prototype.raiseChanged=ce.prototype.g,ce.prototype.raiseChangedEvent=ce.prototype.cb,ce.prototype.addCopyProperty=ce.prototype.Vw;var og=null;ce.className="GraphObject",og=new _n,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(fn,fn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof fn){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 ii(0,0,2.76142374915397,2.761423749153969),spot2:new ii(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 fn&&(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 fn&&(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 fn&&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 fn&&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 fn&&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 fn&&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 Dn){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 Di){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,fn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new jt(0,3),shadowBlur:5},uu(Yi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ii(0,0,4,6),spot2:new ii(1,1,-4,-4)}))}),Ld("ContextMenu",function(){return uu(Fo,fn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new jt(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 ii(0,0,2,3),y.spot2=new ii(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 En(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:cn,geometryStretch:qn,visible:!1},y!==""?new Ls("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof fn){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(fn,"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}),ce.None=on=new Ze(ce,"None",0),ce.Default=zi=new Ze(ce,"Default",0),ce.Vertical=yi=new Ze(ce,"Vertical",4),ce.Horizontal=li=new Ze(ce,"Horizontal",5),ce.Fill=cn=new Ze(ce,"Fill",3),ce.Uniform=qn=new Ze(ce,"Uniform",1),ce.UniformToFill=fo=new Ze(ce,"UniformToFill",2),ce.FlipVertical=eo=new Ze(ce,"FlipVertical",1),ce.FlipHorizontal=bo=new Ze(ce,"FlipHorizontal",2),ce.FlipBoth=ar=new Ze(ce,"FlipBoth",3),ce.make=uu,ce.getBuilders=function(){var a=new _n,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},ce.defineBuilder=Ld,ce.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 ce))return y&&E.set(y),E;ie('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},ce.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=zi,this.ob=this.Bi=1,this.Pf=on,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=_o,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=$e,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 xh(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)}xh.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},xh.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),We(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},xh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},xh.prototype.focus=function(){this.Oa.focus()},xh.prototype.mx=function(){this.ownerDocument=null},Wt.Object.defineProperties(xh.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}}}),xh.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),vt=a+ut,xt=y+ft,Ct=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-vt)||1e-6<Math.abs(ot-xt))&&this.path.push(["L",vt,+xt]),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,vt,xt])):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},pe.$(E,ot)&&pe.$(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",be.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new xh(this,qt.document));var y=new xh(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)},be.prototype.makeSvg=be.prototype.Cs,be.prototype.av=function(a){return this.Cs(a)},be.prototype.makeSVG=be.prototype.av;function Cu(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}Cu.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},Cu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Cu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Cu.prototype.focus=function(){this.Oa.focus()},Cu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Wt.Object.defineProperties(Cu.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}}}),Cu.className="CanvasSurface";function Kc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&ie("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(){},Wt.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=mo: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)&&ie("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&&Je(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Cn(a,"0 <= loc <= 1",tr,"addColorStop:loc"),this.we===null&&(this.we=new _n),this.we.add(a,y),this.na===bd&&(this.type=ld),this.xe=null,this},Mt.Vz=function(a,y){if(this._isFrozen&&Je(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&&Je(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:ie("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||ie("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=os?new Cu(null,void 0,{willReadFrequently:!0}).context:null}Wt.Object.defineProperties(tr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Je(this,a),this.na=a,this.start.Mc()&&(a===ld?this.start=ba:a===hu&&(this.start=mo)),this.end.Mc()&&(a===ld?this.end=Da:a===hu&&(this.end=mo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Je(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Je(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Je(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Je(this,a),0>a&&Cn(a,">= zero",tr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Je(this,a),0>a&&Cn(a,">= zero",tr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Je(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Je(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 Ze(tr,"Solid",0);var ld;tr.Linear=ld=new Ze(tr,"Linear",1);var hu;tr.Radial=hu=new Ze(tr,"Radial",2);var hg;tr.Pattern=hg=new Ze(tr,"Pattern",4);var dg;tr.Lab=dg=new Ze(tr,"Lab",5);var nS;tr.HSL=nS=new Ze(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(){},Wt.Object.defineProperties(Us.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return fn}}}),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"}Ee(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 vt=at.measuredBounds;ft=Math.max(vt.width+ft,0),ut=Math.max(vt.height+ut,0),vt=at.position.x;var xt=at.position.y;isFinite(vt)||(vt=0),isFinite(xt)||(xt=0),at instanceof Yi&&at.isGeometryPositioned&&(at=at.strokeWidth/2,vt-=at,xt-=at),Hr(b,vt,xt,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"}Ee(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!==on&&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));ti(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,vt=ut.margin,xt=vt.top+vt.bottom,Ct=z+b.bottom,kt=ft.height,Gt=ul(ut,!1);(isNaN(ut.desiredSize.height)&&Gt===cn||Gt===yi)&&(kt=Math.max(x.height-xt-Ct,0)),xt=kt+xt+Ct,Ct=ut.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=mo),tt&&(ot-=ft.width+vt.left+vt.right),ut.arrange(ot+Ct.offsetX+vt.left,at+Ct.offsetY+vt.top+(x.height*Ct.y-xt*Ct.y),ft.width,kt),tt||(ot+=ft.width+vt.left+vt.right)}}};function ym(){this.xa="Base"}Ee(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!==on&&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);ti(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,vt=ut.margin,xt=vt.left+vt.right,Ct=z+b.right,kt=ft.width,Gt=ul(ut,!1);(isNaN(ut.desiredSize.width)&&Gt===cn||Gt===li)&&(kt=Math.max(x.width-xt-Ct,0)),xt=kt+xt+Ct,Ct=ut.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=mo),tt&&(ot-=ft.height+vt.bottom+vt.top),ut.arrange(at+Ct.offsetX+vt.left+(x.width*Ct.x-xt*Ct.x),ot+Ct.offsetY+vt.top,kt,ft.height),tt||(ot+=ft.height+vt.bottom+vt.top)}}};function Sm(){this.xa="Base"}Ee(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 vt=rt.measuredBounds;z=vt.width,tt=vt.height;var xt=Math.max(z+ut,0),Ct=Math.max(tt+ft,0),kt=a.isClipping,Gt=Ke.allocAt(-at.left,-at.top,xt,Ct),Ot=Ke.allocAt(0,0,z,tt);fv(rt,Ot,!0),z=Ot.width,tt=Ot.height;for(var Yt=!0,$t=ud(a),ne=0;ne<ot;ne++){var de=E[ne];vt=y;var ke=x;if(de!==rt&&(de.visible||de===$t)){at=de.margin;var An=at.left,Yn=at.top;switch(xt=at.right+at.left,Ct=at.top+at.bottom,at=ul(de,!1),at){case cn:vt=z,ke=tt,Yn=An=Ct=xt=0;break;case li:vt=z,An=xt=0;break;case yi:ke=tt,Yn=Ct=0}de.measure(vt,ke,0,0),vt=de.measuredBounds,xt=Math.max(vt.width+xt,0),Ct=Math.max(vt.height+Ct,0),at=de.alignment,at.Xb()&&(at=a.defaultAlignment),at.sb()||(at=mo);var Wn=de.alignmentFocus;if(Wn.Xb()&&(Wn=mo),ke=null,de instanceof fn&&de.$e!==""&&(ke=de.fb(de.$e),ke===de&&(ke=null)),An=Ot.x-An,Yn=Ot.y-Yn,ke!==null){for(de.arrange(0,0,vt.width,vt.height),vt=ke.actualBounds,vt=jt.allocAt(vt.x+(Wn.x*vt.width-Wn.offsetX),vt.y+(Wn.y*vt.height-Wn.offsetY)),ke=ke.panel;ke!==de;)ke.transform.Ga(vt),ke=ke.panel;An+=at.x*z+at.offsetX-vt.x,Yn+=at.y*tt+at.offsetY-vt.y,jt.free(vt)}else An+=at.x*z+at.offsetX-(Wn.x*vt.width+Wn.offsetX),Yn+=at.y*tt+at.offsetY-(Wn.y*vt.height+Wn.offsetY);Yt?(Yt=!1,b.h(An,Yn,xt,Ct)):Hr(b,An,Yn,xt,Ct)}}switch(Yt?b.assign(Gt):kt?b.Uu(Ot.x,Ot.y,Ot.width,Ot.height):Hr(b,Gt.x,Gt.y,Gt.width,Gt.height),Ke.free(Gt),Ke.free(Ot),at=rt.stretch,at===zi&&(at=ul(rt,!1)),at){case on:return;case cn:if(!isFinite(y)&&!isFinite(x))return;break;case li:if(!isFinite(y))return;break;case yi:if(!isFinite(x))return}for(vt=rt.measuredBounds,z=vt.width,tt=vt.height,xt=Math.max(z+ut,0),Ct=Math.max(tt+ft,0),at=rt.margin,Ot=Ke.allocAt(-at.left,-at.top,xt,Ct),fv(rt,Ot,!0),z=Ot.width,tt=Ot.height,y=0;y<ot;y++)x=E[y],x===rt||!x.visible&&x!==$t||(at=x.margin,xt=at.right+at.left,Ct=at.top+at.bottom,vt=x.measuredBounds,xt=Math.max(vt.width+xt,0),Ct=Math.max(vt.height+Ct,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=mo),x=x.alignmentFocus,x.Xb()&&(x=mo),Yt?(Yt=!1,b.h(ut.x*z+ut.offsetX-(x.x*vt.width+x.offsetX)-at.left,ut.y*tt+ut.offsetY-(x.y*vt.height+x.offsetY)-at.top,xt,Ct)):Hr(b,ut.x*z+ut.offsetX-(x.x*vt.width+x.offsetX)-at.left,ut.y*tt+ut.offsetY-(x.y*vt.height+x.offsetY)-at.top,xt,Ct));Yt?b.assign(Gt):kt?b.Uu(Ot.x,Ot.y,Ot.width,Ot.height):Hr(b,Gt.x,Gt.y,Gt.width,Gt.height),Ke.free(Ot)},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=Ke.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 vt=at.width,xt=at.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=mo);var Ct=ft.alignmentFocus;if(Ct.Xb()&&(Ct=mo),at=null,ft instanceof fn&&ft.$e!==""&&(at=ft.fb(ft.$e),at===ft&&(at=null)),at!==null){var kt=at.actualBounds;for(Ct=jt.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,jt.free(Ct)}else at=ut.x*tt.width+ut.offsetX-(Ct.x*vt+Ct.offsetX),ut=ut.y*tt.height+ut.offsetY-(Ct.y*xt+Ct.offsetY);at+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+at,rt+ut,vt,xt)}}Ke.free(tt)};function fv(a,y,x){var E=null;if(a instanceof fn&&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"}Ee(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,vt=at.right+at.left,xt=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 Gt=Math.max(at.width+vt,0);at=Math.max(at.height+xt,0);var Ot=vv(rt),Yt=Ot.x*Gt+Ot.offsetX;Ot=Ot.y*at+Ot.offsetY;var $t=yv(rt),ne=$t.x*Gt+$t.offsetX;for($t=$t.y*at+$t.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(Yt-ne)-Ct,0)),isFinite(x)&&(ft=Math.max(Math.abs(Ot-$t)-Ct,0)),Ct=En.alloc(),Ct.h(0,0),a=ud(a),$t=0;$t<ot;$t++)Ot=E[$t],Ot===rt||!Ot.visible&&Ot!==a||(at=Ot.margin,Gt=at.right+at.left,Yt=at.top+at.bottom,Ot.measure(ut,ft,0,0),at=Ot.measuredBounds,Gt=Math.max(at.width+Gt,0),at=Math.max(at.height+Yt,0),Ct.h(Math.max(Gt,Ct.width),Math.max(at,Ct.height)));if(ot===1)b.width=Gt,b.height=at,En.free(Ct);else{switch(Ot=vv(rt),$t=yv(rt),ot=E=0,$t.x!==Ot.x&&$t.y!==Ot.y&&(E=Ct.width/Math.abs($t.x-Ot.x),ot=Ct.height/Math.abs($t.y-Ot.y)),En.free(Ct),Ct=0,kt!==null&&(Ct=kt.strokeWidth*kt.scale,Mv(kt)===qn&&(E=ot=Math.max(E,ot))),E+=Math.abs(Ot.offsetX)+Math.abs($t.offsetX)+Ct,ot+=Math.abs(Ot.offsetY)+Math.abs($t.offsetY)+Ct,kt=rt.stretch,kt===zi&&(kt=ul(rt,!1)),kt){case on:tt=z=0;break;case cn: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+vt,b.height=rt.measuredBounds.height+xt}},xm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Ke.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),vt=ut.y*b.height+ut.offsetY,xt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=vt,Hr(z,xt,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),vt=ot.alignment,vt.Xb()&&(vt=a.defaultAlignment),vt.sb()||(vt=mo),rt=z.width*vt.x+vt.offsetX-rt*vt.x+tt.left+z.x,tt=z.height*vt.y+vt.offsetY-ut*vt.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 Ke(z.x,z.y,z.width,z.height))));Ke.free(z)};function wm(){this.xa="Base",this.name="Table"}Ee(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 fn?at:null;if(ut!==null&&kd(ut)&&at.visible){ot.push(ut);for(var ft=ut.O.s,vt=ft.length,xt=0;xt<vt;xt++){var Ct=ft[xt];ut.type===fn.TableRow?Ct.row=at.row:ut.type===fn.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=[],Gt=0;Gt<z;Gt++){var Ot=tt[Gt];Ot.visible&&(zs(Ot,!0),jh(Ot,!0),kt[Ot.row]||(kt[Ot.row]=[]),kt[Ot.row][Ot.column]||(kt[Ot.row][Ot.column]=[]),kt[Ot.row][Ot.column].push(Ot))}ti(tt);var Yt=Hn(),$t=Hn(),ne=Hn(),de={count:0},ke={count:0},An=y,Yn=x,Wn=a.rowDefs,Sn=a.colDefs,tn=null;z=Wn.length;for(var Fi=0;Fi<z;Fi++)tn=Wn[Fi],tn!==void 0&&(tn.actual=0);z=Sn.length;for(var Ei=0;Ei<z;Ei++)tn=Sn[Ei],tn!==void 0&&(tn.actual=0);for(var Wo=kt.length,gr=0,qs=0;qs<Wo;qs++)kt[qs]&&(gr=Math.max(gr,kt[qs].length));var na=Math.min(a.topIndex,Wo-1),Ha=Math.min(a.leftIndex,gr-1),$s=0;Wo=kt.length;for(var jd=ud(a),bs=0;bs<Wo;bs++)if(kt[bs]){gr=kt[bs].length;var sh=a.Fb(bs);sh.actual=0;for(var Ga=sh.oc=0;Ga<gr;Ga++)if(kt[bs][Ga]){var zd=a.Eb(Ga);Yt[Ga]===void 0&&(zd.actual=0,zd.oc=0,Yt[Ga]=!0);for(var $l=kt[bs][Ga],bu=$l.length,Dl=0;Dl<bu;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 ah=Ml.margin,Ig=ah.right+ah.left,Ol=ah.top+ah.bottom,Wa=eh(Ml,sh,zd,!1),Jp=Ml.desiredSize,If=!isNaN(Jp.height),Ch=!isNaN(Jp.width)&&If;if(mc||Wa===on||Ch||bs<na||Ga<Ha||(de[Ga]!==void 0||Wa!==cn&&Wa!==li||(de[Ga]=-1,de.count++),ke[bs]!==void 0||Wa!==cn&&Wa!==yi||(ke[bs]=-1,ke.count++),ne.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===on||Wa===li)){tn=a.Fb(bs);var vc=tn.Wc();$s=Math.max(Rl-tn.actual,0),$s+vc>Yn&&($s=Math.max(Yn-vc,0));var Z0=tn.oa===0;tn.oc=tn.oc+$s,tn.actual=tn.oa+$s,Yn=Math.max(Yn-($s+(Z0?vc:0)),0)}if(Ml.columnSpan===1&&(Wa===on||Wa===yi)){tn=a.Eb(Ga);var _p=tn.Wc();$s=Math.max(qc-tn.actual,0),$s+_p>An&&($s=Math.max(An-_p,0));var Hy=tn.oa===0;tn.oc=tn.oc+$s,tn.actual=tn.oa+$s,An=Math.max(An-($s+(Hy?_p:0)),0)}mc&&Ml.Uj()}}}}}ti(Yt);var Qh=0,cd=0;z=a.columnCount;for(var Df=0;Df<z;Df++){var yc=Sn[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=Wn[Dg];Sc!==void 0&&(cd+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(cd+=Sc.Wc()))}An=Math.max(y-Qh,0);var Jh=Yn=Math.max(x-cd,0),Hd=An;z=ne.length;for(var Ll=0;Ll<z;Ll++){var Mh=ne[Ll],U0=a.Fb(Mh.row),fd=a.Eb(Mh.column),Og=Mh.measuredBounds,lh=Mh.margin,$c=lh.right+lh.left,Eh=lh.top+lh.bottom;de[Mh.column]=fd.oc===0&&de[Mh.column]!==void 0?Math.max(Og.width+$c,de[Mh.column]):null,ke[Mh.row]=U0.oc===0&&ke[Mh.row]!==void 0?Math.max(Og.height+Eh,ke[Mh.row]):null}var Of=0,Rg=0,Vu;for(Vu in ke)Vu!=="count"&&(Of+=ke[Vu]);for(Vu in de)Vu!=="count"&&(Rg+=de[Vu]);for(var fa=En.alloc(),qp=0;qp<z;qp++){var nl=ne[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(An)&&de[nl.column]!==null?Rg===0?gd=il.actual+An:gd=de[nl.column]/Rg*Hd:de[nl.column]!==null?gd=An:gd=il.actual||An,gd=Math.max(0,gd-il.Wc()));var Gd=0;switch(isFinite(ks.height)?Gd=ks.height:(isFinite(Yn)&&ke[nl.row]!==null?Of===0?Gd=ks.actual+Yn:Gd=ke[nl.row]/Of*Jh:ke[nl.row]!==null?Gd=Yn:Gd=ks.actual||Yn,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=eh(nl,ks,il,!1),Wa){case li:fa.height=Math.max(fa.height,ks.actual+Yn);break;case yi:fa.width=Math.max(fa.width,il.actual+An)}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(An)&&(ef=Math.min(ef,fa.width)),isFinite(Yn)&&(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,Yn=Math.max(Yn-$s,0),ke[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,An=Math.max(An-$s,0),de[nl.column]===null&&(Hd=Math.max(Hd-$s,0))}}ti(ne);var pd=En.alloc(),uh=Hn(),pu=Hn();if(z=$t.length,z!==0){for(var xc=0;xc<Wo;xc++)if(kt[xc]){gr=kt[xc].length;var zg=a.Fb(xc);uh[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 Yu=a.Fb(ds.row),ku=a.Eb(ds.column);switch(fa.h(Math.max(ku.minimum,Math.min(y,ku.maximum)),Math.max(Yu.minimum,Math.min(x,Yu.maximum))),Wa=eh(ds,Yu,ku,!1),Wa){case cn:pu[ku.index]!==0&&(fa.width=Math.min(fa.width,pu[ku.index])),uh[Yu.index]!==0&&(fa.height=Math.min(fa.height,uh[Yu.index]));break;case li:pu[ku.index]!==0&&(fa.width=Math.min(fa.width,pu[ku.index]));break;case yi:uh[Yu.index]!==0&&(fa.height=Math.min(fa.height,uh[Yu.index]))}isFinite(ku.width)&&(fa.width=ku.width),isFinite(Yu.height)&&(fa.height=Yu.height),pd.h(0,0);for(var X0=ku.minimum,jl=Yu.minimum,Wd=1;Wd<ds.rowSpan&&!(ds.row+Wd>=a.rowCount);Wd++)tn=a.Fb(ds.row+Wd),$s=0,$s=Wa===cn||Wa===yi?Math.max(tn.minimum,uh[ds.row+Wd]===0?tn.maximum:Math.min(uh[ds.row+Wd],tn.maximum)):Math.max(tn.minimum,isNaN(tn.Hc)?tn.maximum:Math.min(tn.Hc,tn.maximum)),pd.height+=$s,jl+=tn.minimum;for(var Au=1;Au<ds.columnSpan&&!(ds.column+Au>=a.columnCount);Au++)tn=a.Eb(ds.column+Au),$s=0,$s=Wa===cn||Wa===li?Math.max(tn.minimum,pu[ds.column+Au]===0?tn.maximum:Math.min(pu[ds.column+Au],tn.maximum)):Math.max(tn.minimum,isNaN(tn.Hc)?tn.maximum:Math.min(tn.Hc,tn.maximum)),pd.width+=$s,X0+=tn.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,Lh=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++)tn=a.Fb(ds.row+Kg),Cc+=tn.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++){tn=a.Fb(ds.row+md);var Ud=tn.oa||0,of=Zd(ds,tn,_h);tn.actual=Math.min(tn.maximum,Ud+of),tn.oa!==Ud&&(Kd-=tn.oa-Ud)}for(;0<Kd;){var hh=tn.oa||0;if(isNaN(tn.height)&&tn.maximum>hh&&(tn.actual=Math.min(tn.maximum,hh+Kd),tn.oa!==hh&&(Kd-=tn.oa-hh)),tn.index===0)break;tn=a.Fb(tn.index-1)}}for(var jf=0,Vd=0;Vd<ds.columnSpan&&!(ds.column+Vd>=a.columnCount);Vd++)tn=a.Eb(ds.column+Vd),jf+=tn.total||0;if(jf<Lh){var zf=Lh-jf,Wy=Lh-jf;if(ds.spanAllocation!==null)for(var vd=ds.spanAllocation,rf=0;rf<ds.columnSpan&&!(0>=zf)&&!(ds.column+rf>=a.columnCount);rf++){tn=a.Eb(ds.column+rf);var tm=tn.oa||0,Ky=vd(ds,tn,Wy);tn.actual=Math.min(tn.maximum,tm+Ky),tn.oa!==tm&&(zf-=tn.oa-tm)}for(;0<zf;){var Q0=tn.oa||0;if(isNaN(tn.width)&&tn.maximum>Q0&&(tn.actual=Math.min(tn.maximum,Q0+zf),tn.oa!==Q0&&(zf-=tn.oa-Q0)),tn.index===0)break;tn=a.Eb(tn.index-1)}}}}ti($t),En.free(pd),En.free(fa),uh!==void 0&&ti(uh),pu!==void 0&&ti(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++)Sn[_0]!==void 0&&(tn=a.Eb(_0),isFinite(tn.width)?(em+=tn.width,em+=tn.Wc()):Tm(tn)===fp?(em+=tn.oa,em+=tn.Wc()):tn.oa!==0&&(Qh+=tn.oa,Qh+=tn.Wc()));isFinite(J0.width)?Hf=Math.min(J0.width,g1.width):Hf=Wa!==on&&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++)Sn[q0]!==void 0&&(tn=a.Eb(q0),isFinite(tn.width)||Tm(tn)===fp||(tn.actual=tn.oa*_1),tn.position=b.width,tn.oa!==0&&(b.width+=tn.oa,b.width+=tn.Wc()));z=a.rowCount;for(var $0=0;$0<z;$0++)Wn[$0]!==void 0&&(tn=a.Fb($0),isFinite(tn.height)?(nm+=tn.height,nm+=tn.Wc()):Tm(tn)===fp?(nm+=tn.oa,nm+=tn.Wc()):tn.oa!==0&&(cd+=tn.oa,cd+=tn.Wc()));isFinite(J0.height)?Gf=Math.min(J0.height,g1.height):Gf=Wa!==on&&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++)Wn[tv]!==void 0&&(tn=a.Fb(tv),isFinite(tn.height)||Tm(tn)===fp||(tn.actual=tn.oa*q1),tn.position=b.height,tn.oa!==0&&(b.height+=tn.oa,b.height+=tn.Wc()));z=ot.length;for(var Zy=0;Zy<z;Zy++){var im=ot[Zy],Uy=0,Vy=0;im.type===fn.TableRow?(Uy=b.width,tn=a.Fb(im.row),Vy=tn.actual):(tn=a.Eb(im.column),Uy=tn.actual,Vy=b.height),im.measuredBounds.h(0,0,Uy,Vy),zs(im,!1)}ti(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 vt=ft=0,xt=Math.min(a.topIndex,at-1);if(0<rt.length){for(;xt!==at&&(rt[xt]===void 0||rt[xt].oa===0);)xt++;xt=Math.max(Math.min(xt,at-1),0),ft=-rt[xt].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),vt=-ot[Ct].position}for(var kt=0,Gt=0;kt!==at&&rt[kt]===void 0;)kt++;for(;Gt!==at&&ot[Gt]===void 0;)Gt++;ut=a.part,a.Fb(kt),a.Eb(Gt);for(var Ot=0;Ot<y.length;Ot++){var Yt=y[Ot];if(Yt instanceof fn&&Yt.visible&&kd(Yt)){if(Yt.type===fn.TableRow){ot=a.Fb(Yt.row);var $t=a.Eb(Gt)}else ot=a.Fb(kt),$t=a.Eb(Yt.column);rt=ot.position+ft+b,ot.oa!==0&&(rt+=ot.Io(Math.max(kt,xt))),ot=$t.position+vt+z,$t.oa!==0&&(ot+=$t.Io(Math.max(Gt,Ct))),$t=Yt.measuredBounds,Yt.Uk(),Yt.actualBounds.ka();var ne=Yt.actualBounds,de=Ke.allocAt(ne.x,ne.y,ne.width,ne.height);ne.x=Yt.type===fn.TableRow?z:ot,ne.y=Yt.type===fn.TableColumn?b:rt,ne.width=$t.width,ne.height=$t.height,Yt.actualBounds.freeze(),jh(Yt,!1),gl(de,ne)||ut===null||(ut.oh(),Yt.Pn(ut)),Ke.free(de)}}for(Ot=En.alloc(),Yt=0;Yt<at;Yt++)if(tt[Yt]){for(ut=tt[Yt].length,$t=a.Fb(Yt),rt=$t.position+ft+b,$t.oa!==0&&(rt+=$t.Io(Math.max(kt,xt))),ne=0;ne<ut;ne++)if(tt[Yt][ne]){de=a.Eb(ne),ot=de.position+vt+z,de.oa!==0&&(ot+=de.Io(Math.max(Gt,Ct)));for(var ke=tt[Yt][ne],An=ke.length,Yn=0;Yn<An;Yn++){var Wn=ke[Yn],Sn=Wn.measuredBounds;Ot.h(0,0);for(var tn=1;tn<Wn.rowSpan&&!(Yt+tn>=a.rowCount);tn++){var Fi=a.Fb(Yt+tn);Fi.oa!==0&&(Ot.height+=Fi.total)}for(tn=1;tn<Wn.columnSpan&&!(ne+tn>=a.columnCount);tn++)Fi=a.Eb(ne+tn),Fi.oa!==0&&(Ot.width+=Fi.total);var Ei=de.oa+Ot.width,Wo=$t.oa+Ot.height;tn=ot,Fi=rt;var gr=Ei,qs=Wo,na=ot,Ha=rt,$s=Ei,jd=Wo;ot+Ei>x.width&&($s=Math.max(x.width-ot,0)),rt+Wo>x.height&&(jd=Math.max(x.height-rt,0));var bs=Wn.alignment;if(bs.Xb()){bs=a.defaultAlignment,bs.sb()||(bs=mo);var sh=bs.x,Ga=bs.y,zd=bs.offsetX;bs=bs.offsetY;var $l=de.alignment,bu=$t.alignment;$l.sb()&&(sh=$l.x,zd=$l.offsetX),bu.sb()&&(Ga=bu.y,bs=bu.offsetY)}else sh=bs.x,Ga=bs.y,zd=bs.offsetX,bs=bs.offsetY;(isNaN(sh)||isNaN(Ga))&&(Ga=sh=.5,bs=zd=0),$l=Sn.width,bu=Sn.height;var Dl=Wn.margin,Ml=Dl.left+Dl.right,mc=Dl.top+Dl.bottom,ah=eh(Wn,$t,de,!1);!isNaN(Wn.desiredSize.width)||ah!==cn&&ah!==li||($l=Math.max(Ei-Ml,0)),!isNaN(Wn.desiredSize.height)||ah!==cn&&ah!==yi||(bu=Math.max(Wo-mc,0)),Ei=Wn.maxSize,Wo=Wn.minSize,$l=Math.min(Ei.width,$l),bu=Math.min(Ei.height,bu),$l=Math.max(Wo.width,$l),bu=Math.max(Wo.height,bu),Ei=bu+mc,tn+=gr*sh-($l+Ml)*sh+zd+Dl.left,Fi+=qs*Ga-Ei*Ga+bs+Dl.top,Wn.visible&&(As(na,Ha,$s,jd,tn,Fi,Sn.width,Sn.height)?Wn.arrange(tn,Fi,$l,bu):Wn.arrange(tn,Fi,$l,bu,new Ke(na,Ha,$s,jd)))}}}for(En.free(Ot),a=0;a<E;a++)x=y[a],z=x instanceof fn?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"}Ee(Pm,Us),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Ee(Cm,Us),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Mm(){this.xa="Base"}Ee(Mm,Us),Mm.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&ie("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 vt=Math.max(y-at,0),xt=Math.max(x-rt,0),Ct=1;a.viewboxStretch===qn?ft!==0&&ot!==0&&(Ct=Math.min(vt/ft,xt/ot)):ft!==0&&ot!==0&&(Ct=Math.max(vt/ft,xt/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=mo),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"}Ee(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,vt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,ot,rt),y.clip(),y.Se();for(var xt=[],Ct=a.O.s,kt=Ct.length,Gt=0;Gt<kt;Gt++){var Ot=Ct[Gt],Yt=[];if(xt.push(Yt),Ot.visible){var $t=Ot.interval;if(!(0>$t)){Ot=pv(Ot.figure);for(var ne=0;ne<kt;ne++)if(ne!==Gt){var de=Ct[ne];de.visible&&pv(de.figure)===Ot&&(de=de.interval,de>$t&&Yt.push(de))}}}}for(Ct=a.O.s,kt=Ct.length,Gt=0;Gt<kt;Gt++){var ke=Ct[Gt];if(ke.visible&&(Yt=ke.interval||1,Ot=Math.abs(Yt),!(2>b*Ot*x))){if($t=ke.segmentIndex,(!isFinite($t)||isNaN($t))&&($t=0),0>$t&&($t=Ot-Math.min(-$t,Ot)),$t=Math.round($t%Ot),Ot=ke.opacity,ne=1,Ot!==1){if(Ot===0)continue;ne=y.globalAlpha,y.globalAlpha=ne*Ot}de=xt[Gt];var An=!1,Yn=ke.strokeDashArray;if(Yn!==null&&(An=!0,y.js(Yn,ke.strokeDashOffset)),ke.figure==="LineV"&&ke.stroke!==null&&0<ke.strokeWidth){for(y.lineWidth=ke.strokeWidth,as(a,y,ke.stroke,!1,!1,z,tt),y.beginPath(),Yn=ke=Math.floor((vt-b)/b);Yn<=ke+at;Yn++){var Wn=Yn*b+vt;0<=Wn&&Wn<=ot&&Em(Yn,Yt,$t,de)&&(y.moveTo(Wn,0),y.lineTo(Wn,rt))}y.stroke(),y.Se()}else if(ke.figure==="LineH"&&ke.stroke!==null&&0<ke.strokeWidth){for(y.lineWidth=ke.strokeWidth,as(a,y,ke.stroke,!1,!1,z,tt),y.beginPath(),Yn=ke=Math.floor((ft-E)/E);Yn<=ke+ut;Yn++)Wn=Yn*E+ft,0<=Wn&&Wn<=rt&&Em(Yn,Yt,$t,de)&&(y.moveTo(0,Wn),y.lineTo(ot,Wn));y.stroke(),y.Se()}else if(ke.figure==="BarV"&&ke.fill!==null)for(as(a,y,ke.fill,!0,!1,z,tt),ke=ke.width,isNaN(ke)&&(ke=b),Wn=Yn=Math.floor((vt-b)/b);Wn<=Yn+at;Wn++){var Sn=Wn*b+vt;0<=Sn+ke&&Sn<=ot&&Em(Wn,Yt,$t,de)&&y.fillRect(Sn,0,ke,rt)}else if(ke.figure==="BarH"&&ke.fill!==null)for(as(a,y,ke.fill,!0,!1,z,tt),ke=ke.height,isNaN(ke)&&(ke=E),Wn=Yn=Math.floor((ft-E)/E);Wn<=Yn+ut;Wn++)Sn=Wn*E+ft,0<=Sn+ke&&Sn<=rt&&Em(Wn,Yt,$t,de)&&y.fillRect(0,Sn,ot,ke);An&&y.fs(),Ot!==1&&(y.globalAlpha=ne)}}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"}Ee(Lm,Us),Lm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Fo||a instanceof wn){var tt=null,ot=null;if(a instanceof wn&&(tt=a),a instanceof Fo&&(ot=a,tt=ot.adornedPart,a.j===null&&(a.j=[])),tt instanceof wn){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 vt=y.height,xt=a.j;if(xt.length=0,at!==null){iS(a,ot,vt,at);var Ct=at.measuredBounds;x.ed(Ct),xt.push(Ct)}Ct=Gi.alloc();for(var kt=jt.alloc(),Gt=jt.alloc(),Ot=0;Ot<z;Ot++){var Yt=E[Ot];if(Yt!==at)if(Yt.isPanelMain&&Yt instanceof Yi){iS(a,ot,vt,Yt);var $t=Yt.measuredBounds;x.ed($t),xt.push($t)}else if(2>ft)Yt.measure(1/0,1/0,0,0),$t=Yt.measuredBounds,x.ed($t),xt.push($t);else{var ne=Yt.segmentIndex,de=Yt.segmentFraction,ke=Yt.alignmentFocus;ke.Mc()&&(ke=mo);var An=Yt.segmentOrientation,Yn=Yt.segmentOffset;if(isNaN(ne)){var Wn=rt.ua;$t=Hn(),Wn.Qu(de,$t);var Sn=jt.allocAt($t[0],$t[1]);if(Sn.add(rt.i(0)),Wn.type===Pn.j?Sn.offset(-Wn.startX,-Wn.startY):(Wn=Wn.figures.first(),Wn!==null&&Sn.offset(-Wn.startX,-Wn.startY)),Wn=$t[2],An!==_a){var tn=rt.computeAngle(Yt,An,Wn);Yt.Kb=tn}tn=Sn.x-y.x;var Fi=Sn.y-y.y;jt.free(Sn),ti($t)}else if(ne<-ft||ne>=ft)$t=jt.alloc(),rt.vg(),rt.computeMidPoint($t),Wn=rt.midAngle,An!==_a&&(tn=rt.computeAngle(Yt,An,Wn),Yt.Kb=tn),tn=$t.x-y.x,Fi=$t.y-y.y,jt.free($t);else{if(tn=0,0<=ne?(Fi=ut.M(ne),$t=ne<ft-1?ut.M(ne+1):Fi):(tn=ft+ne,Fi=ut.M(tn),$t=0<tn?ut.M(tn-1):Fi),Fi.Xa($t)){0<=ne?(Wn=0<ne?ut.M(ne-1):Fi,tn=ne<ft-2?ut.M(ne+2):$t):(Wn=tn<ft-1?ut.M(tn+1):Fi,tn=1<tn?ut.M(tn-2):$t),Sn=Wn.Bf(Fi);var Ei=$t.Bf(tn);Wn=Sn>Ei+10?0<=ne?Wn.ab(Fi):Fi.ab(Wn):Ei>Sn+10?0<=ne?$t.ab(tn):tn.ab($t):0<=ne?Wn.ab(tn):tn.ab(Wn)}else Wn=0<=ne?Fi.ab($t):$t.ab(Fi);An!==_a&&(tn=rt.computeAngle(Yt,An,Wn),Yt.Kb=tn),tn=Fi.x+($t.x-Fi.x)*de-y.x,Fi=Fi.y+($t.y-Fi.y)*de-y.y}Yt.measure(1/0,1/0,0,0),$t=Yt.measuredBounds,Sn=Yt.naturalBounds;var Wo=0;Yt instanceof Yi&&(Wo=Yt.strokeWidth),Ei=Sn.width+Wo;var gr=Sn.height+Wo;Ct.reset(),Ct.translate(-$t.x,-$t.y),Ct.scale(Yt.scale,Yt.scale),Ct.rotate(An===_a?Yt.angle:Wn,Ei/2,gr/2),An!==Cp&&An!==Ep||Ct.rotate(90,Ei/2,gr/2),An!==Mp&&An!==Lp||Ct.rotate(-90,Ei/2,gr/2),An===n0&&(45<Wn&&135>Wn||225<Wn&&315>Wn)&&Ct.rotate(-Wn,Ei/2,gr/2),Sn=new Ke(0,0,Ei,gr),kt.xi(Sn,ke),Ct.Ga(kt),ke=-kt.x+Wo/2*Yt.scale,Yt=-kt.y+Wo/2*Yt.scale,Gt.assign(Yn),Wo=isNaN(Yn.x);var qs=isNaN(Yn.y);if(Wo||qs){Ei=Ei/2+3,gr=gr/2+3;var na=45<=Wn&&135>=Wn,Ha=225<=Wn&&315>=Wn;An===_a&&(na||Ha)?(Gt.x=qs?Ei:Yn.y,Gt.y=Wo?gr:Yn.x,na?0<=ne||isNaN(ne)&&.5>de||!Wo||(Gt.y=-gr):Ha&&((0<=ne||isNaN(ne)&&.5>de)&&Wo&&(Gt.y=-gr),qs&&(Gt.x=-Ei))):(Wo&&(Gt.x=0<=ne||isNaN(ne)&&.5>de?Ei:-Ei),qs&&(Gt.y=-gr),Gt.rotate(Wn))}else Gt.rotate(Wn);tn+=Gt.x,Fi+=Gt.y,Sn.set($t),Sn.h(tn+ke,Fi+Yt,$t.width,$t.height),xt.push(Sn),x.ed(Sn)}}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),jt.free(kt),jt.free(Gt)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Fo||a instanceof wn){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 wn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,ot=tt.segmentIndex,rt=tt.segmentFraction;var vt=tt.alignmentFocus;if(at=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(ot)){var xt=ft.ua,Ct=Hn();xt.Qu(rt,Ct);var kt=jt.allocAt(Ct[0],Ct[1]);kt.add(ft.i(0)),xt.type===Pn.j||(xt=xt.figures.first()),kt.offset(-xt.startX,-xt.startY),xt=Ct[2],at!==_a&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=kt.x;var Gt=kt.y;jt.free(kt),ti(Ct)}else if(ot<-x||ot>=x)Ct=jt.alloc(),xt=ft,Gt=Ct,xt.vg(),xt.computeMidPoint(Gt),xt=ft.midAngle,at!==_a&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Ct.x,Gt=Ct.y,jt.free(Ct);else{if(kt=0,0<=ot?(Ct=y.s[ot],Gt=ot<x-1?y.s[ot+1]:Ct):(kt=x+ot,Ct=y.s[kt],Gt=0<kt?y.s[kt-1]:Ct),Ct.Xa(Gt)){0<=ot?(xt=0<ot?y.s[ot-1]:Ct,kt=ot<x-2?y.s[ot+2]:Gt):(xt=kt<x-1?y.s[kt+1]:Ct,kt=1<kt?y.s[kt-2]:Gt);var Ot=xt.Bf(Ct),Yt=Gt.Bf(kt);xt=Ot>Yt+10?0<=ot?xt.ab(Ct):Ct.ab(xt):Yt>Ot+10?0<=ot?Gt.ab(kt):kt.ab(Gt):0<=ot?xt.ab(kt):kt.ab(xt)}else xt=0<=ot?Ct.ab(Gt):Gt.ab(Ct);at!==_a&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Ct.x+(Gt.x-Ct.x)*rt,Gt=Ct.y+(Gt.y-Ct.y)*rt}if(vt.ys())tt.location=new jt(ft,Gt);else{vt.Mc()&&(vt=mo),Ct=Gi.alloc(),Ct.reset(),Ct.scale(tt.scale,tt.scale),Ct.rotate(tt.angle,0,0);var $t=tt.naturalBounds;kt=Ke.allocAt(0,0,$t.width,$t.height),Ot=jt.alloc(),Ot.xi(kt,vt),Ct.Ga(Ot),vt=-Ot.x,Yt=-Ot.y;var ne=$t.width,de=$t.height;$t=jt.alloc(),$t.assign(ut);var ke=isNaN(ut.x),An=isNaN(ut.y);if(ke||An){ne=ne/2+3,de=de/2+3;var Yn=45<=xt&&135>=xt,Wn=225<=xt&&315>=xt;at===_a&&(Yn||Wn)?($t.x=An?ne:ut.y,$t.y=ke?de:ut.x,Yn?0<=ot||isNaN(ot)&&.5>rt||!ke||($t.y=-de):Wn&&((0<=ot||isNaN(ot)&&.5>rt)&&ke&&($t.y=-de),An&&($t.x=-ne))):(ke&&($t.x=0<=ot||isNaN(ot)&&.5>rt?ne:-ne),An&&($t.y=-de),$t.rotate(xt))}else $t.rotate(xt);ft+=$t.x,Gt+=$t.y,Ct.pp(kt),vt+=kt.x,Yt+=kt.y,ot=jt.allocAt(ft+vt,Gt+Yt),tt.move(ot),jt.free(ot),jt.free($t),jt.free(Ot),Ke.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),jt.free(E)}};function iS(a,y,x,E){if(Ql(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Fo&&a.type===fn.Link&&a.adornedObject instanceof Yi&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof wn&&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"}Ee(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,vt=new Ke(-rt.left,-rt.top,Math.max(ft.width+at,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(vt),b.assign(vt);for(var xt=ot.geometry,Ct=ot.strokeWidth,kt=xt.flattenedSegments,Gt=xt.flattenedLengths,Ot=xt.flattenedTotalLength,Yt=kt.length,$t=0,ne=0,de=Hn(),ke=0;ke<Yt;ke++){var An=kt[ke],Yn=[];ne=$t=0;for(var Wn=An.length,Sn=0;Sn<Wn;Sn+=2){var tn=An[Sn],Fi=An[Sn+1];if(Sn!==0){var Ei=180*Math.atan2(Fi-ne,tn-$t)/Math.PI;0>Ei&&(Ei+=360),Yn.push(Ei)}$t=tn,ne=Fi}de.push(Yn)}if(a.graduatedIntervals===null){for(var Wo=[],gr=a.O.s,qs=gr.length,na=0;na<qs;na++){var Ha=gr[na],$s=[];if(Wo.push($s),Ha.visible){var jd=Ha.interval;if(!(0>jd)){for(var bs=0;bs<qs;bs++)if(bs!==na){var sh=gr[bs];if(sh.visible&&Ha.constructor===sh.constructor){var Ga=sh.interval;Ga>jd&&$s.push(Ga)}}}}}a.graduatedIntervals=Wo}var zd=a.graduatedIntervals,$l=a.O.s,bu=$l.length,Dl=0,Ml=0,mc=Ot;a.graduatedMarks=[];for(var ah,Ig=0;Ig<bu;Ig++){var Ol=$l[Ig];if(ah=[],Ol.visible&&Ol!==ot){var Wa=Math.abs(Ol.interval),Jp=a.graduatedTickUnit;if(!(2>Jp*Wa*Ot/a.graduatedRange&&Ol.graduatedSkip===null)){var If=Gt[0][0],Ch=0,El=0;Ml=Ot*Ol.graduatedStart-1e-4,mc=Ot*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)*Ot/a.graduatedRange,Dl>Ot&&(Dl=Ot),Ml<=Dl&&Dl<=mc)){for(var Jh=de[Ch][El],Hd=Gt[Ch][El];Ch<Gt.length;){for(;Dl>If&&El<Gt[Ch].length-1;)El++,Jh=de[Ch][El],Hd=Gt[Ch][El],If+=Hd;if(Dl<=If)break;Ch++,El=0,Jh=de[Ch][El],Hd=Gt[Ch][El],If+=Hd}var Ll=kt[Ch],Mh=Ll[2*El],U0=Ll[2*El+1],fd=(Dl-(If-Hd))/Hd,Og=new jt(Mh+(Ll[2*El+2]-Mh)*fd+Ct/2-xt.bounds.x,U0+(Ll[2*El+3]-U0)*fd+Ct/2-xt.bounds.y);Og.scale(ot.scale,ot.scale);t:{var lh=Jh,$c=de[Ch];if(!(.5005>fd&&.4995<fd)){var Eh=lh;if(.5>fd?0<El?Eh=$c[El-1]:pe.$(Ll[0],Ll[Ll.length-2])&&pe.$(Ll[1],Ll[Ll.length-1])&&(Eh=$c[$c.length-1]):.5<fd&&(El+1<$c.length?Eh=$c[El+1]:pe.$(Ll[0],Ll[Ll.length-2])&&pe.$(Ll[1],Ll[Ll.length-1])&&(Eh=$c[0])),lh!==Eh){var Of=Math.abs(lh-Eh);if(180<Of&&(lh<Eh?lh+=360:Eh+=360,Of=Math.abs(lh-Eh)),5e-4>fd||.9995<fd){Jh=(lh+Eh)/2%360;break t}if(10>Of){var Rg=1-Math.abs(.5-fd);Jh=(lh*Rg+Eh*(1-Rg))%360;break t}}}Jh=lh}if(Ol instanceof yr){var Vu="";Ol.graduatedFunction!==null?(Vu=Ol.graduatedFunction(Rl,Ol),Vu=Vu!=null?Vu.toString():""):Vu=(+Rl.toFixed(2)).toString(),Vu!==""&&ah.push({$l:Og,angle:Jh,text:Vu})}else ah.push({$l:Og,angle:Jh})}Rl=_p+Qh*qc}}}a.graduatedMarks.push(ah)}ti(de);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=Ke.allocAt(0,0,jg,ef),bl=jt.alloc();bl.xi(Rf,tf),Ke.free(Rf);for(var pd=-bl.x,uh=-bl.y,pu=new Ke,xc=il.length,zg=0;zg<xc;zg++)for(var wc=il[zg],Y0=wc.$l.x,Hg=wc.$l.y,ds=wc.angle,Yu=0;4>Yu;Yu++){switch(Yu){case 0:bl.h(pd,uh);break;case 1:bl.h(pd+jg,uh);break;case 2:bl.h(pd,uh+ef);break;case 3:bl.h(pd+jg,uh+ef)}bl.rotate(ds+ks.angle),bl.offset(Y0,Hg),zg===0&&Yu===0?pu.h(bl.x,bl.y,0,0):pu.Ye(bl),bl.offset(-Y0,-Hg),bl.rotate(-ds-ks.angle)}jt.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 ku=a,X0=b;ku.temporaryTextBlock===null&&(ku.temporaryTextBlock=new yr);var jl=ku.temporaryTextBlock;yS(jl,ks);var Wd=ks.alignmentFocus;Wd.Mc()&&(Wd=ba);for(var Au=ks.segmentOrientation,Gg=ks.segmentOffset,Pc=new Ke,$p=0,Wg=0,Lh=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,Lh=_h.angle,Cc=nf=ks.angle,Au!==_a&&(Cc=Au===Pp||Au===e0?Lh+ks.angle:Lh,nf=wn.computeAngle(Au,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,hh=Gi.alloc();hh.reset(),hh.translate(-Zd.x,-Zd.y),hh.scale(jl.scale,jl.scale),hh.rotate(Cc,Ud/2,of/2),Au!==Cp&&Au!==Ep||hh.rotate(90,Ud/2,of/2),Au!==Mp&&Au!==Lp||hh.rotate(-90,Ud/2,of/2),Au===n0&&(45<Lh&&135>Lh||225<Lh&&315>Lh)&&hh.rotate(-Lh,Ud/2,of/2);var jf=Ke.allocAt(0,0,Ud,of),Vd=jt.alloc();Vd.xi(jf,Wd),hh.Ga(Vd);var zf=-Vd.x,Wy=-Vd.y,vd=jt.alloc();vd.assign(Gg),isNaN(vd.x)&&(vd.x=Ud/2+3),isNaN(vd.y)&&(vd.y=-(of/2+3)),vd.rotate(Lh),$p+=vd.x+zf,Wg+=vd.y+Wy;var rf=new Ke($p,Wg,Zd.width,Zd.height),tm=new Ke(Zd.x,Zd.y,Zd.width,Zd.height),Ky=new Ke(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),jt.free(vd),jt.free(Vd),Ke.free(jf),Gi.free(hh)}ku.graduatedBounds!==null&&ku.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 vt=rt[ft],xt=at[ft],Ct=xt.length;if(vt.visible&&vt!==z&&xt.length!==0){if(vt instanceof Yi){if(!(2>a.graduatedTickUnit*vt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&vt.graduatedSkip===null)){var kt=vt.measuredBounds,Gt=vt.strokeWidth*vt.scale,Ot=vt.alignmentFocus;Ot.Mc()&&(Ot=ba);for(var Yt=0;Yt<Ct;Yt++){var $t=xt[Yt].$l,ne=xt[Yt].angle,de=Ot,ke=vt.Ab;ke.reset(),ke.translate($t.x+ot.x,$t.y+ot.y),ke.rotate(ne+vt.angle,0,0),ke.translate(-kt.width*de.x+de.offsetX+Gt/2,-kt.height*de.y+de.offsetY+Gt/2),ke.scale(vt.scale,vt.scale),Pu(vt,!1),vt.wh.set(vt.Ab),vt.Kk=vt.scale,lu(vt,!1),vt.gc(y,x),b&&(a.svg.appendChild(vt.svg),vt.svg=null),vt.Ab.reset()}}}else if(vt instanceof yr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new yr),kt=a.temporaryTextBlock,yS(kt,vt),Gt=0;Gt<Ct;Gt++)Ot=xt[Gt],Ot.actualBounds&&Ot.measuredBounds&&Ot.naturalBounds&&(kt.ec=Ot.text||"",kt.Kb=Ot.Sz||0,kt.Gc=Ot.lineCount||0,Yt=Ot.lines,Yt!==void 0&&(kt.Cb=Yt[0],kt.Ih=Yt[1],kt.df=Yt[2],kt.Le=Yt[3],kt.Qc=Yt[4],kt.Qb=Yt[5],kt.ze=Yt[6]),Ot.naturalBounds&&(kt.dc=Ot.naturalBounds),Ot.actualBounds&&(Yt=Ot.actualBounds,kt.arrange(Yt.x,Yt.y,Yt.width,Yt.height)),Yt=Ot.actualBounds,kt.arrange(Yt.x,Yt.y,Yt.width,Yt.height),$t=Ot.measuredBounds,Ot=Ot.naturalBounds,ne=kt.Ab,ne.reset(),ne.translate(Yt.x+ot.x,Yt.y+ot.y),ne.translate(-$t.x,-$t.y),kt.no(ne,Ot.x,Ot.y,Ot.width,Ot.height),Pu(kt,!1),kt.wh.set(kt.Ab),kt.Kk=kt.scale,lu(kt,!1),kt.Ng=vt.part,kt.Me=vt.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 fn(a,y){if(ce.call(this),this.na=null,a===void 0)this.na=fn.Position;else if(typeof a=="string"){var x=Hu.I(a);x!==null&&(this.na=x)}else a instanceof Us?this.na=a:a&&(this.na=fn.Position,y=a);this.na===null&&ie("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===fn.Grid?1048576:0),this.O=new un,this.yb=Js,this.Tm=$e,this.Uf=zi,this.$g=null,this.$e="",this.jg=new Ke(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=qn,this.jn=Ur,this.kn=_o,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ee(fn,ce),fn.prototype.cloneProtected=function(a){ce.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},fn.prototype.Af=function(a){ce.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},fn.prototype.copy=function(){var a=ce.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 Dn&&(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=fn.prototype,Mt.toString=function(){return"Panel("+this.type.name+")#"+Ho(this)},Mt.Pn=function(a){ce.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===fn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===fn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===fn.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===fn.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 vt=at.separatorDashArray;vt===null&&(vt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),vt!==null&&(ft=!0,y.js(vt,0)),y.beginPath(),vt=at.position+ut,x?vt>tt.height&&(ut-=vt-tt.height):vt>tt.width&&(ut-=vt-tt.width),at=at.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(at+=ut.top,vt=tt.width-ut.right,y.moveTo(ut.left,at),y.lineTo(vt,at)):(at+=ut.left,vt=tt.height-ut.bottom,y.moveTo(at,ut.top),y.lineTo(at,vt)),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 vt=x?tt.height:tt.width;if(!(ft.position>vt)){var xt=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),xt-=Ct,Ct=ft.position+Ct,xt+=ft.actual,Ct+xt>vt&&(xt=vt-Ct),0>=xt||(vt=a.yb,as(a,y,ft.background,!0,!1,ot,tt),x?y.fillRect(vt.left,Ct+vt.top,tt.width-(vt.left+vt.right),xt):y.fillRect(Ct+vt.left,vt.top,xt,tt.height-(vt.top+vt.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(!ce.prototype.kk.call(this,a,y,x))return!1;if(this.type===fn.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===fn.Grid||this.na===fn.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 ce.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,vt=ot*(tt.m21*tt.dy-tt.m22*tt.dx),xt=ot*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,pe.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*rt+y*ut+vt,ot=a*at+y*ft+xt,a=x*rt+E*ut+vt,rt=x*at+E*ft+xt,b.h(0,0),x=this.naturalBounds,z=pe.Ff(0,0,x.width,x.height,z,ot,a,rt,b),b.transform(tt),z;z||(rt=1,ut=at=0,ft=1,xt=vt=0),ot=a*rt+y*ut+vt,a=a*at+y*ft+xt,rt=x*rt+E*ut+vt,x=x*at+E*ft+xt,b.h(rt,x),E=(rt-ot)*(rt-ot)+(x-a)*(x-a),at=!1,ft=this.O.s,xt=ft.length,ut=jt.alloc(),vt=null,y=1/0;var Ct=null,kt=this.isClipping&&this.na===fn.Spot;kt&&(Ct=jt.alloc(),vt=this.Pb(),(at=vt.Sj(ot,a,rt,x,Ct))&&(y=(ot-Ct.x)*(ot-Ct.x)+(a-Ct.y)*(a-Ct.y)));for(var Gt=0;Gt<xt;Gt++){var Ot=ft[Gt];Ot.visible&&Ot!==vt&&Ot.Sj(ot,a,rt,x,ut)&&(at=!0,Ot=(ot-ut.x)*(ot-ut.x)+(a-ut.y)*(a-ut.y),Ot<E&&(E=Ot,b.set(ut)))}return kt&&(y>E&&b.set(Ct),jt.free(Ct)),jt.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();ce.prototype.Gj.call(this)},Mt.v=function(a){if(!Ql(this)){ce.prototype.v.call(this,a),a=null,(this.na===fn.Auto||this.na===fn.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 fn||b instanceof yr||z!==on)&&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)){Pu(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=on),a){case on:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case cn: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=jt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(ro(b.set(a),z.transform),z.ca(b)))return jt.free(b),!0}return jt.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 fn){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 fn&&sS(a,z,x)}}function v1(a,y){aS(a,a,y)}function aS(a,y,x){if(x(y),y instanceof fn){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 fn){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 fn){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 fn?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===fn.TableRow||this.type===fn.TableColumn)};function kd(a){return a.type===fn.TableRow||a.type===fn.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(jt.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=jt.alloc(),at=(rt=this.isClipping&&this.na===fn.Spot)?this.Pb():null,rt&&(at.se()?ro(ot.set(a),at.transform):ot.set(a),!at.ca(ot)))return jt.free(ot),z||jt.free(tt),null;for(var ft=ud(this);ut--;){var vt=b[ut];if((vt.visible||vt===ft)&&(vt.se()?ro(ot.set(a),vt.transform):ot.set(a),!rt||vt!==at)){var xt=null;if(vt instanceof fn?xt=vt.ic(ot,y,x):vt.pickable===!0&&vt.ca(ot)&&(xt=vt),xt!==null&&(y!==null&&(xt=y(xt)),xt!==null&&(x===null||x(xt))))return jt.free(ot),z||jt.free(tt),xt}}jt.free(ot)}return this.background===null&&this.areaBackground===null?(z||jt.free(tt),null):(a=As(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||jt.free(tt),a)}return z||jt.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(jt.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=jt.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 vt=ft;ft=ft instanceof fn?ft:null,(ft!==null?ft.ji(at,y,x,E):vt.ca(at))&&vt.pickable!==!1&&(y!==null&&(vt=y(vt)),vt===null||x!==null&&!x(vt)||E.add(vt))}}jt.free(at)}return z||jt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||jt.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,vt=this.naturalBounds;ft.x>vt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof fn?ut:null,vt=Gi.alloc(),vt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,vt):_s(ft,a,E,vt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Gi.free(vt))}}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 fn&&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(jt.allocAt(a.x,a.y),this.transform),at=ot?y:ro(jt.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||(jt.free(rt),jt.free(at)),ft){if(!this.isAtomic){rt=jt.alloc(),at=jt.alloc(),ut=ud(this);for(var vt=this.O.s,xt=vt.length;xt--;){var Ct=vt[xt];if(Ct.visible||Ct===ut){var kt=Ct.actualBounds,Gt=this.naturalBounds;(!ot||!(kt.x>Gt.width||kt.y>Gt.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 fn?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)))}}jt.free(rt),jt.free(at)}return b?ft:tt}return!1};function vv(a){var y=null;return a instanceof Yi&&(y=a.spot1,y===$e&&(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===$e&&(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&&ie("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&ie("Cannot make a Panel contain itself: "+this.toString()),ie("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&ie("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!==fn.Grid||y instanceof Yi||ie("Can only add Shapes to a Grid Panel, not: "+y),this.na!==fn.Graduated||y instanceof Yi||y instanceof yr||ie("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 _n),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 ie("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 fn&&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 Dn&&(x.Te=!0),x.Te&&x instanceof Dn&&(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 Dn&&(E instanceof fn?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&&Cn(a,">= 0",fn,"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&&Cn(a,">= 0",fn,"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&&Cn(a,">= 0",fn,"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&&Cn(a,">= 0",fn,"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!==fn.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!==fn.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 jt(NaN,NaN)),this.type!==fn.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!==fn.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 Mu(a){var y=a.allBindings;if(y===null)a.data!==null&&ie("Template cannot have .data be non-null: "+a),a.allBindings=y=new un;else if(y._isFrozen)return;var x=new un;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 vt=ft.value;vt.mode===Ip&&Sf(ut,!0);var xt=vt.sourceName;xt!==null&&(xt==="/"&&Sv(at,!0),xt=Lx(vt,at,ut),xt!==null&&(x.add(xt),xt.srcBindings===null&&(xt.srcBindings=new un),xt.srcBindings.add(vt))),y.add(vt)}if(ut instanceof fn&&ut.type===fn.Table){if(0<ut.rowCount){for(at=ut.rowDefs,ft=at.length,vt=0;vt<ft;vt++)if(xt=at[vt],xt!==void 0&&xt.be!==null)for(var Ct=xt.be.iterator;Ct.next();){var kt=Ct.value;kt.xd=xt,kt.to=2,kt.wl=xt.index,y.add(kt)}}if(0<ut.columnCount){for(ut=ut.colDefs,at=ut.length,ft=0;ft<at;ft++)if(vt=ut[ft],vt!==void 0&&vt.be!==null)for(xt=vt.be.iterator;xt.next();)Ct=xt.value,Ct.xd=vt,Ct.to=1,Ct.wl=vt.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 un),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 fn&&(tt=ot.substring(0,rt),ot=ot.substr(rt+1),rt=z.fb(tt),rt!==null?(z=rt,b.targetProperty=ot):$n('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Hs?(tt=Ho(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof ce?(tt=Ho(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):ie("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 fn&&(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&&Mu(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 fn))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 fn&&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 fn)||z.data!==y[tt])return!0;b++,tt++}return!1}function cp(a){if(a.type===fn.Spot||a.type===fn.Auto)return Math.min(a.O.length,1);if(a.type===fn.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===fn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof fn&&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 fn){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 Dn&&(y.Te=!0),y.Te&&y instanceof Dn&&(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(Mu(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 _n),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 fn){var b=y,z=x;E.type===fn.TableRow?E.row=b:E.type===fn.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;ie("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,$n('No item template Panel found for category "'+y+'" on '+a),$n(" Using default item template."),a=new fn,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 fn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof fn&&!z.isEnabled||Am(a,z,x)}}}function wh(a,y){y.name=a,Hu.add(a,y)}Wt.Object.defineProperties(fn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===fn.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&&Cn(a,">= 0",fn,"padding"),a=new hi(a)):(0>a.left&&Cn(a.left,">= 0",fn,"padding:value.left"),0>a.right&&Cn(a.right,">= 0",fn,"padding:value.right"),0>a.top&&Cn(a.top,">= 0",fn,"padding:value.top"),0>a.bottom&&Cn(a.bottom,">= 0",fn,"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)||ie("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)||ie("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||ie("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&yh(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()||ie("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&yh(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)&&ie("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)&&ie("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);Mu(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof wn?(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 _n}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ci||a.isPanelMain)&&ie("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 Di&&(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))}}}),Wt.Object.defineProperties(fn,{Position:{get:function(){return Hu.I("Position")}},Horizontal:{get:function(){return Hu.I("Horizontal")}},Vertical:{get:function(){return Hu.I("Vertical")}},Spot:{get:function(){return Hu.I("Spot")}},Auto:{get:function(){return Hu.I("Auto")}},Table:{get:function(){return Hu.I("Table")}},Viewbox:{get:function(){return Hu.I("Viewbox")}},TableRow:{get:function(){return Hu.I("TableRow")}},TableColumn:{get:function(){return Hu.I("TableColumn")}},Link:{get:function(){return Hu.I("Link")}},Grid:{get:function(){return Hu.I("Grid")}},Graduated:{get:function(){return Hu.I("Graduated")}}}),fn.prototype.rebuildItemElements=fn.prototype.mv,fn.prototype.findItemPanelForData=fn.prototype.sx,fn.prototype.updateTargetBindings=fn.prototype.La,fn.prototype.copyTemplate=fn.prototype.Uy,fn.prototype.graduatedValueForPoint=fn.prototype.Gz,fn.prototype.graduatedPointForValue=fn.prototype.Fz,fn.prototype.findColumnForLocalX=fn.prototype.fz,fn.prototype.findRowForLocalY=fn.prototype.nz,fn.prototype.addColumnDefinition=fn.prototype.By,fn.prototype.addRowDefinition=fn.prototype.Hy,fn.prototype.addRowColumnDefinition=fn.prototype.Gy,fn.prototype.removeColumnDefinition=fn.prototype.jA,fn.prototype.getColumnDefinition=fn.prototype.Eb,fn.prototype.removeRowDefinition=fn.prototype.oA,fn.prototype.getRowDefinition=fn.prototype.Fb,fn.prototype.removeAt=fn.prototype.mb,fn.prototype.remove=fn.prototype.remove,fn.prototype.insertAt=fn.prototype.Gb,fn.prototype.elt=fn.prototype.M,fn.prototype.add=fn.prototype.add,fn.prototype.findObject=fn.prototype.fb,fn.prototype.findInVisualTree=fn.prototype.Nl,fn.prototype.walkVisualTreeFrom=fn.prototype.qm,fn.prototype.findMainElement=fn.prototype.Pb;var gS=!1,pS=null,Hu=new _n;fn.className="Panel",fn.definePanelLayout=wh,wh("Position",new mm),wh("Vertical",new ym),wh("Auto",new xm),wh("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=$e,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=zi,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+") #"+Ho(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===fn.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)&&ie("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new un),this.be.add(b),this},Wt.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&&Cn(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&&Cn(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))&&Cn(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&&Cn(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)||ie("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 Ze(Hs,"Default",0),fp=new Ze(Hs,"None",1),Bm=new Ze(Hs,"ProportionalExtra",2);Hs.className="RowColumnDefinition",Hs.Default=Cv,Hs.None=fp,Hs.ProportionalExtra=Bm;function Yi(a,y){ce.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)}Ee(Yi,ce),Yi.prototype.cloneProtected=function(a){ce.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(){ce.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Mt.qb=function(a){a===on||a===qn||a===fo||a===zi?this.geometryStretch=a:ce.prototype.qb.call(this,a)},Mt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Ho(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,vt,xt,Ct,kt=0,Gt=Hn(),Ot=2;Ot<b;Ot+=2)at=x[Ot],ut=x[Ot+1],ft=at-ot,ot=ut-rt,ft===0&&(ft=.001),vt=ot/ft,xt=Math.atan2(ot,ft),Ct=Math.sqrt(ft*ft+ot*ot),Gt.push([ft,xt,vt,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,Ot=0,Ct=Gt[Ot],ft=Ct[0],xt=Ct[1],vt=Ct[2],Ct=Ct[3];for(var Yt=0;.1<=kt;){if(Yt===0&&(ut?(b=x,b-=at,kt-=at,ut=!1):b=x,b===0&&(b=1)),b>kt){ti(Gt);return}b>Ct?(Yt=b-Ct,b=Ct):Yt=0;var $t=Math.sqrt(b*b/(1+vt*vt));if(0>ft&&($t=-$t),ot+=$t,rt+=vt*$t,a.translate(ot,rt),a.rotate(xt),a.translate(-(tt/2),-(z/2)),Yt===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-xt),a.translate(-ot,-rt),kt-=b,Ct-=b,Yt!==0){if(Ot++,Ot===Gt.length){ti(Gt);return}Ct=Gt[Ot],ft=Ct[0],xt=Ct[1],vt=Ct[2],Ct=Ct[3],b=Yt}}ti(Gt)}}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===fn.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===Pn.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===Pn.u){var at=b.startX;rt=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(at,ut);var vt=Math.min(rt,ft);at=Math.abs(ut-at),rt=Math.abs(ft-rt),a.beginPath(),a.rect(b,vt,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===Pn.F)at=b.startX,rt=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-at)/2,vt=Math.abs(ft-rt)/2,at=Math.min(at,ut)+b,rt=Math.min(rt,ft)+vt,a.beginPath(),a.moveTo(at,rt-vt),a.bezierCurveTo(at+pe.wg*b,rt-vt,at+b,rt-pe.wg*vt,at+b,rt),a.bezierCurveTo(at+b,rt+pe.wg*vt,at+pe.wg*b,rt+vt,at,rt+vt),a.bezierCurveTo(at-pe.wg*b,rt+vt,at-b,rt+pe.wg*vt,at-b,rt),a.bezierCurveTo(at-b,rt-pe.wg*vt,at-pe.wg*b,rt-vt,at,rt-vt),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===Pn.o)for(b=b.figures,rt=b.length,vt=0;vt<rt;vt++){at=b.s[vt],a.beginPath(),a.moveTo(at.startX,at.startY),ut=at.segments.s,ft=ut.length;for(var xt=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 Gt=Math.PI/180;a.arc(kt.point1X,kt.point1Y,kt.radiusX,kt.startAngle*Gt,(kt.startAngle+kt.sweepAngle)*Gt,0>kt.sweepAngle,xt!==null?xt.endX:at.startX,xt!==null?xt.endY:at.startY)}else if(xt=rl(kt,at),Gt=xt.length,Gt===0)a.lineTo(kt.centerX,kt.centerY);else for(var Ot=0;Ot<Gt;Ot++){var Yt=xt[Ot];Ot===0&&a.lineTo(Yt[0],Yt[1]),a.bezierCurveTo(Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7])}break;case Gl:if(Ot=Gt=0,xt!==null&&xt.type===ys){if(xt=rl(xt,at),Yt=xt.length,Yt===0){a.lineTo(kt.endX,kt.endY);break}xt=xt[Yt-1]||null,xt!==null&&(Gt=xt[6],Ot=xt[7])}else Gt=xt!==null?xt.endX:at.startX,Ot=xt!==null?xt.endY:at.startY;if(xt=Ua(kt,at,Gt,Ot),Gt=xt.length,Gt===0){a.lineTo(kt.endX,kt.endY);break}for(Ot=0;Ot<Gt;Ot++)Yt=xt[Ot],a.bezierCurveTo(Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7]);break;default:ie("Segment not of valid type: "+kt.type)}kt.isClosed&&a.closePath(),xt=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(vt)}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===Pn.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===Pn.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,vt=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,vt=b;break;case vr:E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break;case aa:pe.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:pe.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),xt=kt.length,xt===0){E.push(Ct.centerX),E.push(Ct.centerY),tt=Ct.centerX,b=Ct.centerY;break}for(Gt=0;Gt<xt;Gt++)Ot=kt[Gt],pe.Qe(tt,b,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,E),tt=Ot[6],b=Ot[7];break;case Gl:if(kt=Ua(Ct,ot,tt,b),xt=kt.length,xt===0){E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break}for(Gt=0;Gt<xt;Gt++)Ot=kt[Gt],pe.Qe(tt,b,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,E),tt=Ot[6],b=Ot[7];break;default:ie("Segment not of valid type: "+Ct.type)}Ct.isClosed&&(E.push(rt),E.push(vt),cg(a,y,E,x))}cg(a,y,E,x)}else if(z.type===Pn.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===Pn.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++)vt=z[rt],pe.Qe(tt,b,vt[2],vt[3],vt[4],vt[5],vt[6],vt[7],.5,E),tt=vt[6],b=vt[7];cg(a,y,E,x)}ti(E),a.restore(),a.Vc(!1)}}}},Mt.kk=function(a,y,x){return!ce.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:ce.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 jt),a instanceof ii){a.Mc()&&ie("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 Ke);var y=this.naturalBounds,x=this.oe;y=Ke.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=jt.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),Ke.free(y),jt.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!==Pn.j||y||(b+=2);var z=Ke.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Ke.free(z),!1;if(E=b+1e-4,x.type===Pn.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:(Ke.free(z),pe.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===Pn.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 Ke.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Ke.free(z),a}if(x.type===Pn.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 Ke.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Ke.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===Pn.o)return Ke.free(z),this.fill===null?ph(x,a.x,a.y,b):Hl(x,a,b,1<this.strokeWidth,y);ie("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=pe.Ze[ot];typeof at=="string"&&(at=pe.Ze[at]),typeof at=="function"?(rt=at(null,100,100),Ev[ot]=rt):ie("Unsupported Figure: "+ot)}tt=rt.bounds}ot=tt.width,rt=tt.height,at=tt.width;var ut=tt.height;switch(ul(this,!0)){case on:E=x=0;break;case cn: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,vt=this.minSize;switch(x=Math.max(x-z,vt.width),E=Math.max(E-z,vt.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 on:break;case cn:ot=at,rt=ut;break;case qn:x=Math.min(at/ot,ut/rt),isFinite(x)||(x=1),ot*=x,rt*=x;break;default:ie(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&&pe.$(this.ua.Sk,a-z)&&pe.$(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(vt.width,at),ut=Math.max(vt.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===zi?cn:y:y===zi?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),vt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*ot+y*at+ft,tt=a*rt+y*ut+vt,ot=x*ot+E*at+ft,rt=x*rt+E*ut+vt,ft=this.ig/2,at=this.ua,at===null&&(this.measure(1/0,1/0),at=this.ua);var xt=at.bounds;if(ut=!1,at.type===Pn.j)if(1.5>=this.strokeWidth)ut=pe.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 jt,pe.Ve(at.startX+E,at.startY+ut,at.endX+E,at.endY+ut,z,tt,ot,rt,a)&&y.push(a),a=new jt,pe.Ve(at.startX-E,at.startY-ut,at.endX-E,at.endY-ut,z,tt,ot,rt,a)&&y.push(a),a=new jt,pe.Ve(at.startX+E,at.startY+ut,at.startX-E,at.startY-ut,z,tt,ot,rt,a)&&y.push(a),a=new jt,pe.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 ti(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);ti(y)}else if(at.type===Pn.u)ut=pe.Ff(xt.x-ft,xt.y-ft,xt.x+xt.width+ft,xt.y+xt.height+ft,z,tt,ot,rt,b);else if(at.type===Pn.F){y=Ke.allocAt(xt.x,xt.y,xt.width,xt.height).Bc(ft,ft);t:if(y.width===0)ut=pe.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,ot,rt,b);else if(y.height===0)ut=pe.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}Ke.free(y)}else if(at.type===Pn.o){vt=jt.alloc();var Ct=ot-z,kt=rt-tt,Gt=Ct*Ct+kt*kt,Ot=z,Yt=tt;if(0<Gt&&xt.contains(Ot,Yt)&&(vt.x=Ot,vt.y=Yt,this.ca(vt)))for(Ct!==0&&.5>Math.abs(Ct)?(kt*=.5/Ct,Ct=.5):kt!==0&&.5>Math.abs(kt)&&(Ct*=.5/kt,kt=.5),Ot-=Ct,Yt-=kt;xt.contains(Ot,Yt);)Ot-=Ct,Yt-=kt;for(b.x=ot,b.y=rt,kt=0;kt<at.figures.count;kt++){var $t=at.figures.s[kt],ne=$t.isFilled?Ot:z,de=$t.isFilled?Yt:tt,ke=$t.segments;xt=$t.startX,Ct=$t.startY;for(var An=xt,Yn=Ct,Wn=0;Wn<ke.count;Wn++){var Sn=ke.s[Wn],tn=Sn.type,Fi=Sn.endX,Ei=Sn.endY,Wo=!1;switch(tn){case Ps:An=Fi,Yn=Ei;break;case vr:Wo=Im(xt,Ct,Fi,Ei,ne,de,ot,rt,vt);break;case aa:Wo=pe.Eo(xt,Ct,Sn.point1X,Sn.point1Y,Sn.point2X,Sn.point2Y,Fi,Ei,ne,de,ot,rt,.6,vt);break;case Al:Wo=pe.Eo(xt,Ct,xt+2/3*(Sn.point1X-xt),Ct+2/3*(Sn.point1Y-Ct),Fi+2/3*(Sn.point1X-Fi),Ei+2/3*(Sn.point1Y-Ei),Fi,Ei,ne,de,ot,rt,.6,vt);break;case ys:case Gl:tn=Sn.type===ys?rl(Sn,$t):Ua(Sn,$t,xt,Ct);var gr=tn.length;if(gr===0){Wo=Im(xt,Ct,Sn.type===ys?Sn.centerX:Sn.endX,Sn.type===ys?Sn.centerY:Sn.endY,ne,de,ot,rt,vt);break}for(Ei=null,Fi=0;Fi<gr;Fi++){if(Ei=tn[Fi],Fi===0&&Im(xt,Ct,Ei[0],Ei[1],ne,de,ot,rt,vt)){var qs=Fm(ne,de,vt,Gt,b);qs<Gt&&(Gt=qs,ut=!0)}pe.Eo(Ei[0],Ei[1],Ei[2],Ei[3],Ei[4],Ei[5],Ei[6],Ei[7],ne,de,ot,rt,.6,vt)&&(qs=Fm(ne,de,vt,Gt,b),qs<Gt&&(Gt=qs,ut=!0))}Fi=Ei[6],Ei=Ei[7];break;default:ie("Unknown Segment type: "+tn)}xt=Fi,Ct=Ei,Wo&&(Wo=Fm(ne,de,vt,Gt,b),Wo<Gt&&(Gt=Wo,ut=!0)),Sn.isClosed&&(Fi=An,Ei=Yn,Im(xt,Ct,Fi,Ei,ne,de,ot,rt,vt)&&(Sn=Fm(ne,de,vt,Gt,b),Sn<Gt&&(Gt=Sn,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,jt.free(vt)}else ie("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(pe.$(a,x)&&pe.$(y,E)||pe.$(b,tt)&&pe.$(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||pe.$(rt.y,a))&&(rt.y<y||pe.$(rt.y,y))&&(at=!0)):(y=a<x?a:x,a=a<x?x:a,(rt.x>y||pe.$(rt.x,y))&&(rt.x<a||pe.$(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=jt.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)))),jt.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=jt.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 jt.free(tt),!0;var ot=jt.alloc(),rt=jt.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)))),jt.free(tt),Gi.free(x),jt.free(ot),jt.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(Gt,Ot){for(var Yt=Gt.length,$t=0;$t<Yt;$t+=2)if(Ot.zd(Gt[$t],Gt[$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===Pn.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===Pn.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===Pn.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=pe.$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===Pn.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?ph(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 vt=Hn();if(pe.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,vt),tt=E(vt,a),ti(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Al:if(vt=Hn(),pe.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,vt),tt=E(vt,a),ti(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ys:case Gl:vt=ft.type===ys?rl(ft,z):Ua(ft,z,tt,ut);var xt=vt.length;if(xt===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<xt;kt++)if(ft=vt[kt],Ct.length=0,pe.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Ct),E(Ct,a))return ti(Ct),!1;ti(Ct),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:ie("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 ii(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=pe.Ze[a.figure],typeof E=="string"&&(E=pe.Ze[E]),E===void 0&&ie("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=pe.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function 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 pe.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=Pn.parse(pe.um[E],!1),Gh[E]=a,x!==E&&(Gh[x]=E),E}}return typeof y=="string"?y:y instanceof Pn?a:null}Wt.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=Pn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=jt.allocAt(-y.x,-y.y),jt.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 Cn(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"?Cn(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"?Cn(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)||ie("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=pe.Ze[a];typeof x=="function"?x=a:(x=pe.Ze[a.toLowerCase()])||ie("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?ie("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?ie("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:$e},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:$e},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:zi},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&&yh(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 _n,y;for(y in pe.Ze)y!==y.toLowerCase()&&a.add(y,pe.Ze[y]);return a.freeze(),a},Yi.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=pe.Ze;E[a]=y,E[x]=a},Yi.getArrowheadGeometries=function(){var a=new _n;for(E in pe.um)if(Gh[E]===void 0){var y=Pn.parse(pe.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 Pn&&a.add(x,E)}return a.freeze(),a},Yi.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Pn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||ie("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=zi,this.gg=this.fg=$e}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 ce.call(this),zm||(hl=os?new Cu(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}Ee(yr,ce),yr.prototype.cloneProtected=function(a){ce.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 Ph(a){a.da===null?a.da=new Fv:a.da.nc&&(a.da=a.da.copy())}Mt=yr.prototype,Mt.th=function(){ce.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:ce.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(){ce.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 vt=y.scale;switch(8>(ft*ft+ut*ut)*vt*vt&&(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 bo: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,vt=(y+tt+ft)*ut,z>vt&&(E=this.verticalAlignment,E=E.y*z-E.y*vt+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(vt=0;vt<ut;vt++){var xt=this.Qc[vt];xt>b&&(xt=b),E+=y,this.Oj(this.Qb[vt],a,0,E,b,tt,xt,x,ot,rt,at),E+=tt+ft}switch(this.flip){case bo: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 vt=a;y.beginPath(),y.lineWidth=vt,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(!ce.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:ce.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,Gu(ot)),ot=at+1}z=tt}else tt=z.indexOf(`
|
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=Gu(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);Gu(at)>y&&1<at.length;)at=at.substr(0,at.length-1);at+=vp,y=Gu(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=Gu(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=Gu(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=Gu(at);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-rt);Gu(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=vp;var ut=Gu(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);Gu(y)>x;){var ft=1;for(at=Gu(y.substr(0,ft)),ut=0;at<=x;)ft++,ut=at,at=Gu(y.substr(0,ft));if(ft===1){var vt=at;z=Math.max(z,at)}else vt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),gp(a,y.substr(0,ft),vt),rt++,y=y.substr(ft),a.Gc+rt>a.maxLines)break}for(ut=fg(a,tt),at=Gu(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=Gu(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=Gu(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 Gu(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=En.alloc();bv(a,z,y,rt),b+=rt.height,En.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}Wt.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"||(Ph(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:on},set:function(a){var y=this.flip;y!==a&&(Ph(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:xo},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ph(this),this.da.Yr=a,Ya(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=En.alloc();bv(this,this.ec,999999,a);var y=a.width;En.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&&(Ph(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&&(Ph(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&&(Ph(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&&(Ph(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&&(Ph(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&&(Ph(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&&(Ph(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&&(Ph(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&&(Ph(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&&Cn(a,"> 0",yr,"maxLines"),Ph(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 Ze(yr,"None",0),wS=new Ze(yr,"WrapFit",1),Av=new Ze(yr,"WrapDesiredSize",2),PS=new Ze(yr,"WrapBreakAll",3),Nv=new Ze(yr,"OverflowClip",0),Rm=new Ze(yr,"OverflowEllipsis",1),mp=new Ze(yr,"FormatTrim",0),CS=new Ze(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=on,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=xo,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 Cu(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){ce.call(this),this.Eg=null,this.qo="",this.Xg=hr,this.Nk=cn,this.Zg=this.Hd=null,this.Mk=mo,this.Xf=on,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;Ee(dl,ce),dl.prototype.cloneProtected=function(a){ce.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===on||a===qn||a===fo?this.imageStretch=a:ce.prototype.qb.call(this,a)},dl.prototype.toString=function(){return"Picture("+this.source+")#"+Ho(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);ti(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,vt=ot,xt=this.Nk,Ct=this.Mk;switch(xt){case on:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)),vt>=E.height&&(tt=tt+Ct.offsetY+(vt*Ct.y-E.height*Ct.y)),rt=Math.min(E.width,ft),ot=Math.min(E.height,vt);break;case cn:ft=E.width,vt=E.height;break;case qn:case fo:xt===qn?(xt=Math.min(E.height/vt,E.width/ft),ft*=xt,vt*=xt):xt===fo&&(xt=Math.max(E.height/vt,E.width/ft),ft*=xt,vt*=xt,ft>=E.width&&(z=(z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)/ft)*rt),vt>=E.height&&(tt=(tt+Ct.offsetY+(vt*Ct.y-E.height*Ct.y)/vt)*ot),rt*=1/(ft/E.width),ot*=1/(vt/E.height),ft=E.width,vt=E.height)}xt=this.Df()*y.scale;var kt=ft*xt*vt*xt,Gt=rt*ot/kt,Ot=x.__goCache;xt=null;var Yt=x1;if(!b){if(x.sq&&Ot!==void 0&&4<kt&&Gt>Yt*Yt)for(Ot.gi===null&&(kS(Ot,4,at,ut,x),kS(Ot,16,at,ut,x)),b=Ot.gi,at=b.length,ut=0;ut<at&&b[ut].ratio*b[ut].ratio<Gt;ut++)xt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Cu(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=vt<E.height?Ct.offsetY+(E.height*Ct.y-vt*Ct.y):0,this.flip){case bo:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case eo:a.translate(0,Math.min(E.height,vt)),a.scale(1,-1);break;case ar:a.translate(Math.min(E.width,ft),Math.min(E.height,vt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ot!==void 0&&xt!==null&&xt.ratio!==1){a.save(),y=xt.ratio;try{a.drawImage(xt.source,z/y,tt/y,Math.min(xt.source.width,rt/y),Math.min(xt.source.height,ot/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,vt)),a instanceof Bl&&(this.bt=[z/y,tt/y,Math.min(xt.source.width,rt/y),Math.min(xt.source.height,ot/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,vt)])}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,vt)),a instanceof Bl&&(this.bt=[z,tt,rt,ot,b,Ct,Math.min(E.width,ft),Math.min(E.height,vt)])}catch($t){this.en=!1}switch(this.flip){case bo: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,vt));break;case ar:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,vt))}}}}},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===cn||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===cn||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)},Wt.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||ie("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 nn),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=Nn("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 Cu(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 Pn,this.mc=null}mg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Pn,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=pe.Ze;E[a]=y,E[x]=a}Fa("Rectangle",function(a,y,x){a="r"+y+","+x;var E=pe.Mf[a];return E!==void 0||(E=new Pn(Pn.u),E.endX=y,E.endY=x,pe.Nf<pe.vm&&(pe.Mf[a]=E,pe.Nf++)),E}),Fa("Square",function(a,y,x){a="s"+y+","+x;var E=pe.Mf[a];return E!==void 0||(E=new Pn(Pn.u),E.endX=y,E.endY=x,E.defaultStretch=qn,pe.Nf<pe.vm&&(pe.Mf[a]=E,pe.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=pe.Mf[E];if(b!==void 0)return b;var z=a*pe.wg;return b=new Pn().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 ii(0,0,z,z),b.spot2=new ii(1,1,-z,-z)),pe.Nf<pe.vm&&(pe.Mf[E]=b,pe.Nf++),b}),Fa("Border","RoundedRectangle"),Fa("Ellipse",function(a,y,x){a="e"+y+","+x;var E=pe.Mf[a];return E!==void 0||(E=new Pn(Pn.F),E.endX=y,E.endY=x,E.spot1=Ts,E.spot2=Ws,pe.Nf<pe.vm&&(pe.Mf[a]=E,pe.Nf++)),E}),Fa("Circle",function(a,y,x){a="c"+y+","+x;var E=pe.Mf[a];return E!==void 0||(E=new Pn(Pn.F),E.endX=y,E.endY=x,E.spot1=Ts,E.spot2=Ws,E.defaultStretch=qn,pe.Nf<pe.vm&&(pe.Mf[a]=E,pe.Nf++)),E}),Fa("TriangleRight",function(a,y,x){return new Pn().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 Pn().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 Pn().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 Pn().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 Pn().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 Pn(Pn.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 Pn(Pn.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 Pn().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 Pn().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 Pn().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 Pn().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 Pn().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 Pn().add(new Ks(0,.75*x,!1).add(new To(vr,.5*y,.25*x)).add(new To(vr,y,.75*x)))}),pe.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function 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=$e,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"?fn.call(this,a):(fn.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 jt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Ke,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ee(ci,fn),ci.prototype.cloneProtected=function(a){fn.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){fn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Mt.toString=function(){var a=Qn(this.constructor)+"#"+Ho(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(){fn.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 fn?Zc(b,function(rt){ay(ot.partManager,rt),Oc(ot,rt)}):$d(ot,b):a===Ds&&y==="elements"&&(b instanceof fn?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(fn.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 fn&&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 _n),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]);ti(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 Di?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Fo))break t;Mu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=fn.Link),x.adornedObject=y)}if(x!==null){x.type===fn.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=Ke.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Ke.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=mo;this.locationSpot.sb()&&(z=this.locationSpot);var tt=jt.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),jt.free(tt)}},ci.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ci.prototype.moveTo=function(a,y,x){a=jt.allocAt(a,y),this.move(a,x),jt.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 _n),y.I(a)!==null)return y.I(a);var x=fn.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 jt),x=x.Mc()?mo: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 Ke),a.assign(this.actualBounds)},ci.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function BS(a){var y=jt.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=Ke.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()||pe.B(y.width,a.width)&&pe.B(y.height,a.height)||0<=this.vw&&this.C(16),Ke.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=Ke.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),Ke.free(b)}!(this.G&65536)&&a.D(y)||RS(this,E,x),x.N(),!a.w()&&!y.w()||gl(a,y)||(this instanceof Dn&&!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 jt(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&&qu(y,a,new jt(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,jt.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||qu(x,a,new jt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new jt(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 Dn&&Cd(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?oc(a)?(Nu(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,$n('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),$n(" Old class: "+Qn(a.constructor)+", new class: "+Qn(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 Dn&&(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 Dn&&(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(){fn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Dn&&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 Dn&&(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 Dn&&(x=y.labeledLink,x!==null)?jS(a,x):y}Mt.Td=function(a){return a instanceof Di?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 Dn&&(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 Di&&Zm(y,!0),y instanceof Dn){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 Dn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Di&&Zm(y,!1),y instanceof Dn&&(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 Dn&&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 Dn&&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 Dn){if(x&&y instanceof Di)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 wn)for(y=y.labelNodes;y.next();)rc(a,y.value,x,E,b,z)}}Wt.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&&xu(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!==fn.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&&(Mu(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&&(Mu(x),x=x.copy(),x===null||x instanceof wn||(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 wn?(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:$e},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&&ie("Cannot make a Group a member of itself: "+this.toString()),ie("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 Di&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof Di&&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 Di){for(x=new nn,rc(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Dn)for(E=E.linksConnected;E.next();)yg(E.value)}if(this instanceof Dn){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&&xu(y,-1,a))}}else ie("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 Dn&&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)}Ee(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 wn&&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 fn){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 fn&&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(){},Wt.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 Dn(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 un,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ee(Dn,ci),Dn.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=Dn.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 nn),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},Dn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Dn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Dn.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},Dn.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)}},Dn.prototype.qx=function(){var a=new nn,y=new nn;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)})}}Dn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Hi(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Mt=Dn.prototype,Mt.Mo=function(a){a===void 0&&(a=null);var y=new Hi(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 Hi(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 nn,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 nn,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 nn,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 nn,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 Hi(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 Hi(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}}}Dn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Mt=Dn.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 _n: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]);ti(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 Dn)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 nn;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 Hi(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 un,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 un,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 nn;return rc(y,this,!1,a,!0),y},Dn.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 nn;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(vt){return function(xt){return xt===vt.uv||!xt.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}Dn.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 nn;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(vt){return function(xt){return xt===vt.vv||!xt.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}Wt.Object.defineProperties(Dn.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))}}}),Dn.prototype.expandTree=Dn.prototype.expandTree,Dn.prototype.collapseTree=Dn.prototype.collapseTree,Dn.prototype.findTreeParts=Dn.prototype.wz,Dn.prototype.findTreeChildrenNodes=Dn.prototype.Ou,Dn.prototype.findTreeChildrenLinks=Dn.prototype.Qo,Dn.prototype.findTreeLevel=Dn.prototype.uz,Dn.prototype.findTreeParentChain=Dn.prototype.vz,Dn.prototype.findTreeParentNode=Dn.prototype.pg,Dn.prototype.findTreeParentLink=Dn.prototype.kh,Dn.prototype.findCommonTreeParent=Dn.prototype.gz,Dn.prototype.findTreeRoot=Dn.prototype.xz,Dn.prototype.isInTreeOf=Dn.prototype.Nz,Dn.prototype.findPort=Dn.prototype.ns,Dn.prototype.findLinksTo=Dn.prototype.kz,Dn.prototype.findLinksBetween=Dn.prototype.jz,Dn.prototype.findNodesInto=Dn.prototype.Oo,Dn.prototype.findNodesOutOf=Dn.prototype.Po,Dn.prototype.findNodesConnected=Dn.prototype.Mu,Dn.prototype.findLinksInto=Dn.prototype.Sd,Dn.prototype.findLinksOutOf=Dn.prototype.Mo,Dn.prototype.findExternalTreeLinksConnected=Dn.prototype.qx,Dn.prototype.invalidateConnectedLinks=Dn.prototype.Bd,Dn.prototype.invalidateLinkBundle=Dn.prototype.Lz;var M1=new Ze(Dn,"SpreadingNone",10),Ym=new Ze(Dn,"SpreadingEvenly",11),Kv=new Ze(Dn,"SpreadingPacked",12);Dn.className="Node",Dn.SpreadingNone=M1,Dn.SpreadingEvenly=Ym,Dn.SpreadingPacked=Kv;function Di(a,y){a===void 0||a instanceof Us||typeof a=="string"?Dn.call(this,a):(Dn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new nn,this.$a=null,this.Sc=new Br,this.Sc.group=this,this.gl=new nn,this.tb=this.$p=null,y&&Object.assign(this,y)}Ee(Di,Dn),Di.prototype.cloneProtected=function(a){Dn.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=Di.prototype,Mt.Af=function(a){Dn.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 Dn)x.Bd(y);else if(x instanceof wn)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&&ie("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof fn){var ot=b.Nl(function(rt){return rt instanceof Ja});ot instanceof Ja&&(this.$a===null?this.$a=ot:this.$a!==ot&&ie("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 fn&&this.$a.rg(E)&&(this.$a=null));Dn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Mt.Xl=function(a,y){Dn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==fn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof fn&&(a=a.Pb()),this.tb===null&&(this.tb=new Ke),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,Dn.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 wn||y.Va()}),Dn.prototype.Va.call(this)},Mt.si=function(){if(!Dn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Dn){if(y.isVisible()&&Xa(y))return!1}else if(y instanceof wn&&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 Di&&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 wn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Uv(a,y){if(a.Gn.remove(y)){y instanceof Di&&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 wn&&!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)}Dn.prototype.Lj.call(this)},Di.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Re(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Di.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Re(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},Di.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=Di.prototype,Mt.Bd=function(a){var y=(this.U&65536)!==0;if(Dn.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 nn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Dn)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 nn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Dn)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 nn;return a(this,y),y},Mt.Rj=function(){var a=new nn;return rc(a,this,!0,0,!0),a.remove(this),a},Mt.Zb=function(a){Dn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Di.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 Di&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,_S(z,y,x,E)),z instanceof Dn)z.Bd(y),x.Aj(z,E);else if(z instanceof wn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}Di.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 Di&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,qS(z,y,x,E)),z instanceof Dn)z.Bd(y),x.Cj(z,E);else if(z instanceof wn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}Di.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=jt.alloc(),Dn.prototype.move.call(this,a,y),a=new nn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof wn&&(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 Dn&&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 wn&&(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());jt.free(z)}},Wt.Object.defineProperties(Di.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&&ie("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)}}}),Di.prototype.expandSubGraph=Di.prototype.expandSubGraph,Di.prototype.collapseSubGraph=Di.prototype.collapseSubGraph,Di.prototype.findSubGraphParts=Di.prototype.Rj,Di.prototype.findContainingGroupChain=Di.prototype.hz,Di.prototype.findExternalNodesConnected=Di.prototype.iz,Di.prototype.findExternalLinksConnected=Di.prototype.Lu,Di.prototype.ensureBounds=Di.prototype.Va,Di.className="Group";function Ja(a){ce.call(this),this.yb=Js,this.ko=new Ke(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ee(Ja,ce),Ja.prototype.cloneProtected=function(a){ce.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 Di||a instanceof Fo)||ie("Placeholder is not inside a Group or Adornment."),a instanceof Di){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=jt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),jt.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!==fn.Link&&(ot=z.ga(a.category==="Selection"?Is:a.locationSpot,jt.alloc()),a.location=ot,jt.free(ot)),isNaN(at)||isNaN(tt)?(a=z.ga(Is,jt.alloc()),at=Ke.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),jt.free(a),Ke.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 Di&&!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=Ke.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof Di&&!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)),Ke.free(x),E&&y instanceof Di&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Di))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 wn&&(!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},Wt.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 wn(a){ci.call(this,fn.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 un().freeze(),this.Tg=this.Mg=null,this.ml=new Ke,this.ua=new Pn,this.u=this.o=this.Sf=this.Wf=null,this.su=new jt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ee(wn,ci),wn.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=wn.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===wn?(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&&ie("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},wn.prototype.computeAngle=function(a,y,x){return wn.computeAngle(y,x)},wn.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=pe.bp(y),90<a&&270>a&&(a-=180);break;case Ep:a=pe.bp(y+90),90<a&&270>a&&(a-=180);break;case Lp:a=pe.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=pe.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return pe.bp(a)};function 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=wn.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 nn),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))},wn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},wn.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=jt.allocAt(x.x+E,x.y+b),ci.prototype.move.call(this,a,!1),jt.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)},wn.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},wn.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},wn.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 pe.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),pe.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},wn.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),pe.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Mt=wn.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 jt(y,x))},Mt.Kz=function(a,y){this.Nb.Gb(a,y)},Mt.m=function(a,y,x){this.Nb.Gb(a,new jt(y,x))},Mt.ne=function(a){this.Nb.add(a)},Mt.yf=function(a,y){this.Nb.add(new jt(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 un,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new jt(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()}}},wn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ef||(Ef=new Dn,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 Dn,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 vt=this.computeAdjusting()===_a||at;if(!ut&&!at&&ot&&rt){if(ot=!1,!vt&&3<=z&&(vt=this.getLinkPoint(a,y,tt,!0,!1,E,b),rt=this.getLinkPoint(E,b,x,!1,!1,a,y),ot=this.adjustPoints(0,vt,z-1,rt))&&(vt=this.getLinkPoint(a,y,tt,!0,!1,E,b),rt=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,vt,z-1,rt)),!ot)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),vt=this.getLinkPoint(E,b,x,!1,!1,a,y),ot=vt.x-z.x,rt=vt.y-z.y,at=this.computeCurviness(),ft=ut=0;var xt=z.x+ot/3,Ct=z.y+rt/3,kt=xt,Gt=Ct;pe.B(rt,0)?Gt=0<ot?Gt-at:Gt+at:(ut=-ot/rt,ft=Math.sqrt(at*at/(ut*ut+1)),0>at&&(ft=-ft),kt=(0>rt?-1:1)*ft+xt,Gt=ut*(kt-xt)+Ct),xt=z.x+2*ot/3,Ct=z.y+2*rt/3;var Ot=xt,Yt=Ct;pe.B(rt,0)?Yt=0<ot?Yt-at:Yt+at:(Ot=(0>rt?-1:1)*ft+xt,Yt=ut*(Ot-xt)+Ct),this.Fj(),this.ne(z),this.yf(kt,Gt),this.yf(Ot,Yt),this.ne(vt),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,vt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,vt),b=this.getLinkPoint(z,vt,x,!1,!1,a,y),this.hasCurviness()?(vt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+vt/2,y=E.y+x/2,z=a,ot=y,pe.B(x,0)?ot=0<vt?ot-tt:ot+tt:(vt=-vt/x,z=Math.sqrt(tt*tt/(vt*vt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,ot=vt*(z-a)+y),this.ne(E),this.yf(z,ot),this.ne(b)):(this.ne(E),this.ne(b),ot=Ke.alloc(),y.mi(ot),rt=ot.ca(b),vt.mi(ot),at=ot.ca(E),(rt||at)&&(tt=y.ga(Jm(tt),new jt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=vt.ga(Jm(x),new jt),this.dd(1,this.getLinkPointFromPoint(z,vt,x,E,!1,x))),Ke.free(ot))}else{ft=this.isAvoiding,vt&&(ut&&ft||at)&&this.Fj();var $t=at?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),xt=kt=Ct=0,(ut||!ot||at)&&(Gt=this.computeEndSegmentLength(a,y,tt,!0),xt=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)&&(xt-=ut?90:30,0>$t&&(xt-=180)),0>xt?xt+=360:360<=xt&&(xt-=360),at&&(Gt+=Math.abs($t)*(ut?1:2)),xt===0?Ct=Gt:xt===90?kt=Gt:xt===180?Ct=-Gt:xt===270?kt=-Gt:(Ct=Gt*Math.cos(xt*Math.PI/180),kt=Gt*Math.sin(xt*Math.PI/180)),tt.Mc()&&at&&(Gt=y.ga(mo,jt.alloc()),Ot=jt.allocAt(Gt.x+1e3*Ct,Gt.y+1e3*kt),this.getLinkPointFromPoint(a,y,Gt,Ot,!0,ft),jt.free(Gt),jt.free(Ot))),Gt=this.getLinkPoint(E,b,x,!1,ut,a,y);var ne=Yt=Ot=0;if(ut||!rt||at){var de=this.computeEndSegmentLength(E,b,x,!1);ne=this.getLinkDirection(E,b,Gt,x,!1,ut,a,y),at&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ne+=ut?0:30,0>$t&&(ne+=180)),0>ne?ne+=360:360<=ne&&(ne-=360),at&&(de+=Math.abs($t)*(ut?1:2)),ne===0?Ot=de:ne===90?Yt=de:ne===180?Ot=-de:ne===270?Yt=-de:(Ot=de*Math.cos(ne*Math.PI/180),Yt=de*Math.sin(ne*Math.PI/180)),x.Mc()&&at&&(x=b.ga(mo,jt.alloc()),tt=jt.allocAt(x.x+1e3*Ot,x.y+1e3*Yt),this.getLinkPointFromPoint(E,b,x,tt,!1,Gt),jt.free(x),jt.free(tt))}x=ft,(ut||!ot||at)&&(x=new jt(ft.x+Ct,ft.y+kt)),tt=Gt,(ut||!rt||at)&&(tt=new jt(Gt.x+Ot,Gt.y+Yt)),!vt&&!ut&&ot&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Gt):!vt&&!ut&&rt&&3<z&&this.adjustPoints(1,x,z-1,Gt)?this.dd(0,ft):!vt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Gt)):(this.Fj(),this.ne(ft),(ut||!ot||at)&&this.ne(x),ut&&this.addOrthoPoints(x,xt,tt,ne,a,E),(ut||!rt||at)&&this.ne(tt),this.ne(Gt))}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}wn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new jt),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)}wn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,ot){if(ot===void 0&&(ot=new jt),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=jt.alloc(),at=jt.alloc();var ut=new Ke(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),jt.free(rt),jt.free(at)}}return ot}}return x=y.ga(Jm(x),jt.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=jt.alloc(),tt=tt.ga(Jm(rt),z),b&&(tt=Vv(x,tt)),jt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,ot),jt.free(x),ot},wn.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(mo,jt.alloc()),this.pointsCount>(z?6:2)?(ot=b?this.i(1):this.i(this.pointsCount-2),ot=z?Vv(rt,ot.copy()):x):(x=jt.alloc(),ot=ot.ga(mo,x),jt.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,jt.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},wn.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)},wn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=mo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===$e?Vr:y)):(a=y||this.toPort,a===null?a=mo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===$e?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:mo}wn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==_a&&4<this.pointsCount?this.computeMidPoint(new jt):(a=y.Zn,a=a!==null?ax(a,this):null,a!==null?a.Zo:y.ga(mo))},wn.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},wn.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,vt=this.naturalBounds;if(!(ft.x>vt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Gi.alloc(),ft.set(tt),ut instanceof fn)ot=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof Yi)if(ot=a,vt=E,ut.pickable===!1)ot=!1;else if(ft.multiply(ut.transform),vt)t:{var xt=ot,Ct=ft;if(ut.fh(xt,Ct))ot=!0;else{if(Ct===void 0&&(Ct=ut.transform,xt.Re(ut.actualBounds))){ot=!0;break t}ot=xt.left,vt=xt.right;var kt=xt.top;xt=xt.bottom;var Gt=jt.alloc(),Ot=jt.alloc(),Yt=jt.alloc(),$t=Gi.alloc();$t.set(Ct),$t.bv(ut.transform),$t.Vj(),Ot.x=vt,Ot.y=kt,Ot.transform($t),Gt.x=ot,Gt.y=kt,Gt.transform($t),Ct=!1,Vc(ut,Gt,Ot,Yt)?Ct=!0:(Gt.x=vt,Gt.y=xt,Gt.transform($t),Vc(ut,Gt,Ot,Yt)?Ct=!0:(Ot.x=ot,Ot.y=xt,Ot.transform($t),Vc(ut,Gt,Ot,Yt)?Ct=!0:(Gt.x=ot,Gt.y=kt,Gt.transform($t),Vc(ut,Gt,Ot,Yt)&&(Ct=!0)))),Gi.free($t),jt.free(Gt),jt.free(Ot),jt.free(Yt),ot=Ct}}else ot=ut.fh(ot,ft)}else ot=_s(ut,a,E,ft);ot&&(vt=ut,y!==null&&(vt=y(ut)),vt&&(x===null||x(vt))&&b.add(vt)),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},wn.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},wn.prototype.computeCorner=function(){if(this.curve===_l)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},wn.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},wn.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(mo).ab(x.ga(mo))/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},wn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===_a&&x.bb()}},wn.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),ti(x)}}return a},wn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},wn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},wn.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(!pe.$(at,0)){if(pe.$(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 vt=E.y-ft;for(rt=Math.sqrt(ot*ot+vt*vt),pe.$(ot,0)?vt=0>vt?-Math.PI/2:Math.PI/2:(vt=Math.atan(vt/Math.abs(ot)),0>ot&&(vt=Math.PI-vt)),at=rt/at,ut=vt-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),pe.$(y,0)||(pe.$(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,vt=E.y;var xt=1;if(rt-ot!==0){var Ct=(vt-ut)/(rt-ot);xt=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,Gt=y.y,Ot=.5;at!==0&&(Ot=((b-kt)*(b-tt)+(z-Gt)*(z-ft))/at);var Yt=b+Ot*(tt-b),$t=z+Ot*(ft-z);y=Math.sqrt((kt-Yt)*(kt-Yt)+(Gt-$t)*(Gt-$t)),Gt<Ct*(kt-Yt)+$t&&(y=-y),0<Ct&&(y=-y),kt=ot+Ot*(rt-ot),Ot=ut+Ot*(vt-ut),Ct!==0?(y=kt+y/xt,this.L(a,y,Ot-(y-kt)/Ct)):this.L(a,kt,Ot+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,pe.B(b.y,z.y)?pe.B(z.x,tt.x)?ut=y.y:pe.B(z.y,tt.y)&&(ot=y.x):pe.B(b.x,z.x)&&(pe.B(z.y,tt.y)?ot=y.x:pe.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,vt=ut,pe.B(b.y,z.y)?pe.B(z.x,tt.x)?ut=E.y:pe.B(z.y,tt.y)&&(ot=E.x):pe.B(b.x,z.x)&&(pe.B(z.y,tt.y)?ot=E.x:pe.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,vt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},wn.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=jt.alloc(),ut=jt.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 vt=this.diagram;if(vt===null||b===z||this.layer.isTemporary||!$f(vt)||ot.ca(ft)&&!z.Td(b)||rt.ca(a)&&!b.Td(z))y=!1;else{var xt=tg(vt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&xt.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))&&xt.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))&&xt.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(vt.isVirtualized){vt=xt.bounds.copy(),vt.Bc(-xt.Ho,-xt.Go);var kt=jt.alloc();wg(xt,a.x,a.y)||(pe.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,a.x,a.y,at.x,at.y,kt)?(x=a=kt.copy(),y=kt.ab(at)):pe.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,at.x,at.y,ut.x,ut.y,kt)?(x=a=kt.copy(),y=kt.ab(ut)):pe.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,ut.x,ut.y,ft.x,ft.y,kt)&&(x=a=kt.copy(),y=kt.ab(ft))),wg(xt,ft.x,ft.y)||(pe.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,ft.x,ft.y,ut.x,ut.y,kt)?(Ct=ft=kt.copy(),E=ut.ab(kt)):pe.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,ut.x,ut.y,at.x,at.y,kt)?(Ct=ft=kt.copy(),E=at.ab(kt)):pe.Ff(vt.x,vt.y,vt.x+vt.width,vt.y+vt.height,at.x,at.y,a.x,a.y,kt)&&(Ct=ft=kt.copy(),E=a.ab(kt))),jt.free(kt)}ot=ot.copy().ed(rt),ot.Bc(xt.Ho*xt.Os,xt.Go*xt.Os),rx(xt,a,y,ft,E,ot,!0),rt=Kh(xt,ft.x,ft.y),!xt.abort&&rt>=Pg&&(ox(xt),ot.Bc(xt.Ho*xt.Hx,xt.Go*xt.Ix),rx(xt,a,y,ft,E,ot,!1),rt=Kh(xt,ft.x,ft.y)),!xt.abort&&rt<Pg&&Kh(xt,ft.x,ft.y)!==Id?(Xv(this,xt,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?pe.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)):pe.B(ot.y,tt.y)?(Math.abs(a.y-ot.y)<=xt.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)&&(pe.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)):pe.B(ot.x,tt.x)?(Math.abs(a.x-ot.x)<=xt.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())),jt.free(at),jt.free(ut)}},wn.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)}wn.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},wn.prototype.qc=function(){this.lk=!1,this.v()},wn.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)}}},wn.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&&!pe.$(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=Pn.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&&!pe.$(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=jt.allocAt(E,rt),x=jt.alloc(),x.assign(this.i(1)),z=jt.allocAt(E,rt),b=jt.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 vt=tt,xt=at,Ct=this.i(Qv(this,at,ft,!1));if((!pe.$(vt.x,xt.x)||!pe.$(xt.x,Ct.x))&&(!pe.$(vt.y,xt.y)||!pe.$(xt.y,Ct.y))){var kt=ut;isNaN(kt)&&(kt=this.smoothness/3);var Gt=vt.x;vt=vt.y;var Ot=xt.x;xt=xt.y;var Yt=Ct.x;Ct=Ct.y;var $t=kt*_m(Gt,vt,Ot,xt);kt*=_m(Ot,xt,Yt,Ct),pe.$(vt,xt)&&pe.$(Ot,Yt)&&(Ot>Gt?Ct>xt?(z.x=Ot-$t,z.y=xt-$t,b.x=Ot+kt,b.y=xt+kt):(z.x=Ot-$t,z.y=xt+$t,b.x=Ot+kt,b.y=xt-kt):Ct>xt?(z.x=Ot+$t,z.y=xt-$t,b.x=Ot-kt,b.y=xt+kt):(z.x=Ot+$t,z.y=xt+$t,b.x=Ot-kt,b.y=xt-kt)),pe.$(Gt,Ot)&&pe.$(xt,Ct)&&(xt>vt?(Yt>Ot?(z.x=Ot-$t,z.y=xt-$t,b.x=Ot+kt):(z.x=Ot+$t,z.y=xt-$t,b.x=Ot-kt),b.y=xt+kt):(Yt>Ot?(z.x=Ot-$t,z.y=xt+$t,b.x=Ot+kt):(z.x=Ot+$t,z.y=xt+$t,b.x=Ot-kt),b.y=xt-kt)),(pe.$(Gt,Ot)&&pe.$(Ot,Yt)||pe.$(vt,xt)&&pe.$(xt,Ct))&&(Gt=.5*(Gt+Yt),vt=.5*(vt+Ct),z.x=Gt,z.y=vt,b.x=Gt,b.y=vt),(ft===1||ft===2&&pe.$(tt.x,this.i(0).x)&&pe.$(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,_o)),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),jt.free(y),jt.free(x),jt.free(z),jt.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,_o)),Ad(ot,z.x-E,z.y-rt,b.x-E,b.y-rt,tt.x-E,tt.y-rt);else{for(z=jt.alloc(),z.assign(this.i(0)),b=jt.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,_o)),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,Gt=-rt,vt=ut,Ot=this.i(at),kt=x,pe.B(z.y,vt.y)&&pe.B(vt.x,Ot.x))if(Ct=Math.min(tt,Math.abs(vt.x-b.x)/2),Ct=$t=Math.min(Ct,Math.abs(Ot.y-vt.y)/2),pe.B(Ct,0))Mf(this,ot,ft,Gt,z,vt,kt),z.assign(vt);else{var ne=vt.x,de=vt.y;xt=ne,Yt=de,vt.x>z.x?ne=vt.x-Ct:ne=vt.x+Ct,Ot.y>vt.y?Yt=vt.y+$t:Yt=vt.y-$t,Ot=jt.allocAt(ne,de),Mf(this,ot,ft,Gt,z,Ot,kt),jt.free(Ot),Gm(ot,vt.x+ft,vt.y+Gt,xt+ft,Yt+Gt),z.h(xt,Yt)}else pe.B(z.x,vt.x)&&pe.B(vt.y,Ot.y)?(Ct=Math.min(tt,Math.abs(vt.y-b.y)/2),Ct=$t=Math.min(Ct,Math.abs(Ot.x-vt.x)/2),pe.B($t,0)?(Mf(this,ot,ft,Gt,z,vt,kt),z.assign(vt)):(ne=vt.x,de=vt.y,xt=ne,Yt=de,vt.y>z.y?de=vt.y-Ct:de=vt.y+Ct,Ot.x>vt.x?xt=vt.x+$t:xt=vt.x-$t,Ot=jt.allocAt(ne,de),Mf(this,ot,ft,Gt,z,Ot,kt),jt.free(Ot),Gm(ot,vt.x+ft,vt.y+Gt,xt+ft,Yt+Gt),z.h(xt,Yt))):(Mf(this,ot,ft,Gt,z,vt,kt),z.assign(vt));b.assign(ut),ft=at}jt.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=Pn.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),pe.$(a,0)?y:pe.$(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;pe.$(y.x,z.x)&&pe.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!pe.$(y.x,z.x)&&!pe.$(y.y,z.y))return x-1;for(var tt=z;pe.$(y.x,z.x)&&pe.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||pe.$(y.y,z.y)&&pe.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}wn.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(pe.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 vt=ft+x,xt=Math.min(ft+tt,z.x);ut<at&&(ft=rt[ut],ft<xt+tt);)ut++,xt=Math.min(ft+ot,z.x);ft=z.y-tt+E,xt+=x;var Ct=z.y+E;a.curve===Fd?vg(y,xt,Ct,!1):Ad(y,vt,ft,xt,ft,xt,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),vt=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,xt=z.y+E,a.curve===Fd?vg(y,ft,xt,!1):Ad(y,vt,ut,ft,ut,ft,xt)}else if(pe.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),vt=ft+E,ft=Math.min(ft+tt,z.y);ut<at&&(xt=rt[ut],xt<ft+tt);)ut++,ft=Math.min(xt+ot,z.y);xt=z.x-tt+x,Ct=z.x+x,ft+=E,a.curve===Fd?vg(y,Ct,ft,!1):Ad(y,xt,vt,xt,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),vt=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,xt=z.x+x,ut+=E,a.curve===Fd?vg(y,xt,ut,!1):Ad(y,ft,vt,ft,ut,xt,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 wn){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=pe.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),ot=jt.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,vt=y.x,xt=y.y,Ct=tt.x;tt=tt.y;var kt=at.x,Gt=at.y;if(pe.B(ut,vt)){if(!pe.B(ft,xt)&&pe.B(tt,Gt)&&Math.min(ft,xt)<tt&&Math.max(ft,xt)>tt&&Math.min(Ct,kt)<ut&&Math.max(Ct,kt)>ut&&!pe.B(Ct,kt)){ot.x=ut,ot.y=tt,ut=!0;break t}}else if(pe.B(ft,xt)&&pe.B(Ct,kt)&&Math.min(ut,vt)<Ct&&Math.max(ut,vt)>Ct&&Math.min(tt,Gt)<ft&&Math.max(tt,Gt)>ft&&!pe.B(tt,Gt)){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}jt.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()))}wn.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 wn&&(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 wn&&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())}}wn.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},wn.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},wn.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)},wn.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()))}wn.prototype.ph=function(){return!0},Wt.Object.defineProperties(wn.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:$e},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&&Cn(a,">= 0",wn,"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:$e},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&&Cn(a,">= 0",wn,"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),pe.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var ot=this.i(z-1),rt=this.i(z);pe.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 jt)}},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);pe.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):pe.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new un,E=0;E<a.length/2;E++)b=new jt(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(!We(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new un,E=0;E<a.length;E++)b=a[E],x.add(new jt(b.x,b.y).freeze())}}else if(a instanceof un)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else ie("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)}}}),wn.prototype.invalidateOtherJumpOvers=wn.prototype.Xo,wn.prototype.findClosestSegment=wn.prototype.ez,wn.prototype.updateRoute=wn.prototype.vg,wn.prototype.invalidateRoute=wn.prototype.bb,wn.prototype.rollbackRoute=wn.prototype.rv,wn.prototype.commitRoute=wn.prototype.zf,wn.prototype.startRoute=wn.prototype.uh,wn.prototype.clearPoints=wn.prototype.Fj,wn.prototype.removePoint=wn.prototype.pv,wn.prototype.addPointAt=wn.prototype.yf,wn.prototype.addPoint=wn.prototype.ne,wn.prototype.insertPointAt=wn.prototype.m,wn.prototype.insertPoint=wn.prototype.Kz,wn.prototype.setPointAt=wn.prototype.L,wn.prototype.setPoint=wn.prototype.dd,wn.prototype.getPoint=wn.prototype.i,wn.prototype.getOtherPort=wn.prototype.Cz,wn.prototype.getOtherNode=wn.prototype.To;var Ef=null,Lf=null,Jv=new Ze(wn,"Normal",1),b1=new Ze(wn,"Orthogonal",2),k1=new Ze(wn,"AvoidsNodes",6),ex=new Ze(wn,"AvoidsNodesStraight",7),_a=new Ze(wn,"None",0),_l=new Ze(wn,"Bezier",9),Fd=new Ze(wn,"JumpGap",10),xg=new Ze(wn,"JumpOver",11),wp=new Ze(wn,"End",17),$m=new Ze(wn,"Scale",18),t0=new Ze(wn,"Stretch",19),Pp=new Ze(wn,"OrientAlong",21),Cp=new Ze(wn,"OrientPlus90",22),Mp=new Ze(wn,"OrientMinus90",23),_v=new Ze(wn,"OrientOpposite",24),e0=new Ze(wn,"OrientUpright",25),Ep=new Ze(wn,"OrientPlus90Upright",26),Lp=new Ze(wn,"OrientMinus90Upright",27),n0=new Ze(wn,"OrientUpright45",28),nx=16,ix=14,bp=8;wn.className="Link",wn.Normal=Jv,wn.Orthogonal=b1,wn.AvoidsNodes=k1,wn.AvoidsNodesStraight=ex,wn.None=_a,wn.Bezier=_l,wn.JumpGap=Fd,wn.JumpOver=xg,wn.End=wp,wn.Scale=$m,wn.Stretch=t0,wn.OrientAlong=Pp,wn.OrientPlus90=Cp,wn.OrientMinus90=Mp,wn.OrientOpposite=_v,wn.OrientUpright=e0,wn.OrientPlus90Upright=Ep,wn.OrientMinus90Upright=Lp,wn.OrientUpright45=n0,wn.EndSegmentStep=8,wn.CurvinessStart=nx,wn.SpacingMin=ix,wn.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 vt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,vt-=a.Od,vt/=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)),vt=Math.min(a.ei,Math.max(0,vt|0)),E=a.ac,ot|=0,rt|=0,at|=0,ut|=0;var xt=x===0||x===90?1:-1;if(x=x===90||x===270,E[ot][rt]===Id?(o0(a,ot,rt,xt,x,z,y,ft,vt),o0(a,ot,rt,1,!x,z,y,ft,vt),o0(a,ot,rt,-1,!x,z,y,ft,vt)):o0(a,ot,rt,xt,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,vt),r0(a,at,ut,1,!(b===90||b===270),z,y,ft,vt),r0(a,at,ut,-1,!(b===90||b===270),z,y,ft,vt)):r0(a,at,ut,xt,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,vt),Zh(a,ot,rt,-1,!1,z,y,ft,vt),Zh(a,ot,rt,1,!0,z,y,ft,vt),Zh(a,ot,rt,-1,!0,z,y,ft,vt);ti(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 vt=ot[ut][ft];if(vt===0||vt===$v)break;rt=ut,at=ft}for(;;){if(ut=E,ft=rt,vt=at,E===0?vt<z?(ut=90,vt++):vt>z&&(ut=270,vt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?vt<z?(ut=90,vt++):vt>z&&(ut=270,vt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=ot[ft][vt],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++}}}Wt.Object.defineProperties(kp.prototype,{bounds:{get:function(){return new Ke(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<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 Di?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,jt.alloc()),rt=a.port.ga(Ca,jt.alloc());for(b=Ke.allocAt(ot.x,ot.y,0,0),b.Ye(rt),jt.free(ot),jt.free(rt),ot=jt.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 vt=ut.part;if(vt!==null){var xt=vt.findVisibleNode();xt!==null&&xt!==vt&&(vt=xt,ut=vt.port),ut=at.computeOtherPoint(vt,ut),vt=ot.ab(ut),vt-=rt,0>vt?vt+=360:360<=vt&&(vt-=360),ft=A1(b,ft,vt,at.isOrthogonal),ft===0?(ft=4,180<vt&&(vt-=360)):ft===90?(ft=8,270<vt&&(vt-=360)):ft===180?ft=2:(ft=1,90>vt&&(vt+=360)),xt=a.pe[z],xt===void 0?(xt=new ty(at,vt,ft),a.pe[z]=xt):(xt.link=at,xt.angle=vt,xt.Nc=ft),xt.hv.set(ut),z++}}}}for(jt.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=jt.alloc(),rt=jt.alloc(),tt=jt.alloc(),at=jt.alloc(),ft.ga(Is,ot),ft.ga(Pa,rt),ft.ga(Ca,tt),ft.ga(Ia,at),xt=vt=ut=ft=0,E===Kv)for(var Ct=0;Ct<z.length;Ct++){var kt=z[Ct];if(kt!==null){var Gt=kt.link.computeThickness();switch(kt.Nc){case 8:vt+=Gt;break;case 2:xt+=Gt;break;case 1:ft+=Gt;break;default:case 4:ut+=Gt}}}var Ot=Ct=0,Yt=1,$t=kt=0;for(Gt=0;Gt<z.length;Gt++){var ne=z[Gt];if(ne!==null){if(Ct!==ne.Nc){switch(Ct=ne.Nc,Ct){case 8:var de=tt;Ot=at;break;case 2:de=at,Ot=ot;break;case 1:de=ot,Ot=rt;break;default:case 4:de=rt,Ot=tt}switch(kt=Ot.x-de.x,$t=Ot.y-de.y,Ct){case 8:vt>Math.abs(kt)?(Yt=Math.abs(kt)/vt,vt=Math.abs(kt)):Yt=1;break;case 2:xt>Math.abs($t)?(Yt=Math.abs($t)/xt,xt=Math.abs($t)):Yt=1;break;case 1:ft>Math.abs(kt)?(Yt=Math.abs(kt)/ft,ft=Math.abs(kt)):Yt=1;break;default:case 4:ut>Math.abs($t)?(Yt=Math.abs($t)/ut,ut=Math.abs($t)):Yt=1}Ot=0}var ke=ne.Zo;if(E===Kv){switch(ne=ne.link.computeThickness(),ne*=Yt,ke.set(de),Ct){case 8:ke.x=de.x+kt/2+vt/2-Ot-ne/2;break;case 2:ke.y=de.y+$t/2+xt/2-Ot-ne/2;break;case 1:ke.x=de.x+kt/2-ft/2+Ot+ne/2;break;default:case 4:ke.y=de.y+$t/2-ut/2+Ot+ne/2}Ot+=ne}else{var An=.5;E===Ym&&(An=(ne.Uo+1)/(ne.Gl+1)),ke.x=de.x+kt*An,ke.y=de.y+$t*An}}}for(jt.free(ot),jt.free(rt),jt.free(tt),jt.free(at),de=a.pe,z=0;z<de.length;z++)E=de[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Ke.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 jt,this.Gl=this.Uo=0,this.Zo=new jt,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 jt(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=Qn(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 be?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Di?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 nn;a instanceof be?(sc(this,y,a.nodes,!0,this.rh,!0,!1,!0),sc(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Di?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 Di&&(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 wn)&&(Ap(ot),this.rh(ot))){var rt=ot.measuredBounds,at=rt.width;rt=rt.height,ot.moveTo(x,E),ot instanceof Di&&(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 Di&&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 Dn?rt.isLinkLabel||(rt instanceof Di&&rt.layout===null?sc(a,y,rt.memberParts,!1,b,z,tt,ot):(Ap(rt),y.add(rt))):tt&&rt instanceof wn?y.add(rt):!ot||!rt.Zc()||rt instanceof Dn||(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 Ke),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Br.prototype.ex=function(a){var y=new nn;return a instanceof be?(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 Di?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},Wt.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 nn,this.ye=new nn,this.Es=new _n,this.zs=new _n}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 nn,this.ye=new nn,this.Es=new _n,this.zs=new _n},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 Dn)return!tt.isLinkLabel;if(tt instanceof wn){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 Dn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof Di&&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 wn&&(!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]);ti(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]);ti(a),ti(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]);ti(y)}Sr.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),N1(this),this.Ko()),a=new un;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 nn,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},Wt.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 Ke(0,0,10,10).freeze(),this.o=new jt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new un,this.mg=new un}Vs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new un,this.mg=new un},Vs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Ho(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;We(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 Di)){x=Ke.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(mo);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Ke.free(x);return}Ke.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}Wt.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=Ke.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),Ke.free(x),!(a instanceof Di)&&(a=a.locationObject.ga(mo),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 nn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new nn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new nn,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 un,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#"+Ho(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},Wt.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 En(NaN,NaN).freeze(),this.tf=new En(10,10).freeze(),this.Jb=Np,this.Rb=a0,this.nd=Tp,this.hd=ux,a&&Object.assign(this,a)}Ee(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===nh?this.arrangement=a:a===Np||a===s0?this.alignment=a:ie("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 Di)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=Ke.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var vt=this.ni(b[ft],at);ut=Math.max(ut,vt.width)}if(ut=Math.max(ut+ot,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(vt=ft=0;vt<b.length;vt++){var xt=this.ni(b[vt],at);ft=Math.max(ft,xt.height)}ft=Math.max(ft+rt,1),vt=this.arrangement;for(var Ct=xt=this.arrangementOrigin.x,kt=this.arrangementOrigin.y,Gt=0,Ot=0,Yt=0;Yt<b.length;Yt++){var $t=b[Yt],ne=this.ni($t,at),de=Math.ceil((ne.width+ot)/ut)*ut,ke=Math.ceil((ne.height+rt)/ft)*ft;switch(vt){case nh:var An=Math.abs(Ct-ne.width);break;default:An=Ct+ne.width}switch((0<z&&Gt>z-1||0<tt&&0<Gt&&An-xt>tt)&&(E.push(new Ke(0,kt,tt+ot,Ot)),Gt=0,Ct=xt,kt+=Ot,Ot=0),Ot=Math.max(Ot,ke),vt){case nh:ne=-ne.width;break;default:ne=0}switch($t.moveTo(Ct+ne,kt),vt){case nh:Ct-=de;break;default:Ct+=de}Gt++}E.push(new Ke(0,kt,tt+ot,Ot)),Ke.free(at);break;case Np:for(rt=tt,ut=z,ft=y,vt=x,tt=Ke.alloc(),xt=Math.max(this.cellSize.width,1),z=kt=at=0,ot=jt.alloc(),Ct=0;Ct<b.length;Ct++)Ot=b[Ct],Gt=this.ni(Ot,tt),Ot=Nd(Ot,Ot.locationObject,Ot.locationSpot,ot),at=Math.max(at,Ot.x),kt=Math.max(kt,Gt.width-Ot.x),z=Math.max(z,Ot.y);switch(Ct=this.arrangement,Ct){case nh:at+=ft;break;default:kt+=ft}xt=isFinite(xt)?Math.max(xt+ft,1):Math.max(at+kt,1);var Yn=Ot=this.arrangementOrigin.x;for(Yt=this.arrangementOrigin.y,kt=0,rt>=at&&(rt-=at),at=$t=0,de=Math.max(this.cellSize.height,1),ne=z=0,ke=!0,Gt=jt.alloc(),An=0;An<b.length;An++){var Wn=b[An],Sn=this.ni(Wn,tt),tn=Nd(Wn,Wn.locationObject,Wn.locationSpot,ot);if(0<kt)switch(Ct){case nh:Yn=(Yn-Ot-(Sn.width-tn.x))/xt,Yn=pe.$(Math.round(Yn),Yn)?Math.round(Yn):Math.floor(Yn),Yn=Yn*xt+Ot;break;default:Yn=(Yn-Ot+tn.x)/xt,Yn=pe.$(Math.round(Yn),Yn)?Math.round(Yn):Math.ceil(Yn),Yn=Yn*xt+Ot}else switch(Ct){case nh:$t=Yn+tn.x+Sn.width;break;default:$t=Yn-tn.x}switch(Ct){case nh:var Fi=-(Yn+tn.x)+$t;break;default:Fi=Yn+Sn.width-tn.x-$t}if(0<ut&&kt>ut-1||0<rt&&0<kt&&Fi>rt){for(E.push(new Ke(0,ke?Yt-z:Yt,rt+ft,ne+z+vt)),Yn=0;Yn<kt&&An!==kt;Yn++){Fi=b[An-kt+Yn];var Ei=Nd(Fi,Fi.locationObject,Fi.locationSpot,Gt);Fi.moveTo(Fi.position.x,Fi.position.y+z-Ei.y)}ne+=vt,Yt=ke?Yt+ne:Yt+(ne+z),kt=ne=z=0,Yn=Ot,ke=!1}switch(Yn===Ot&&(at=Ct===nh?Math.max(at,Sn.width-tn.x):Math.min(at,-tn.x)),z=Math.max(z,tn.y),ne=Math.max(ne,Sn.height-tn.y),isFinite(de)&&(ne=Math.max(ne,Math.max(Sn.height,de)-tn.y)),ke?Wn.moveTo(Yn-tn.x,Yt-tn.y):Wn.moveTo(Yn-tn.x,Yt),Ct){case nh:Yn-=tn.x+ft;break;default:Yn+=Sn.width-tn.x+ft}kt++}if(E.push(new Ke(0,Yt,rt+ft,(ke?ne:ne+z)+vt)),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(jt.free(ot),jt.free(Gt),Ct===nh)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);Ke.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===nh?this.commitLayers(E,new jt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new jt(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}Wt.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!==nh||(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 Ze(ca,"Position",0),Np=new Ze(ca,"Location",1),a0=new Ze(ca,"LeftToRight",2),nh=new Ze(ca,"RightToLeft",3),ry=new Ze(ca,"Forward",4),l0=new Ze(ca,"Reverse",5),Tp=new Ze(ca,"Ascending",6),u0=new Ze(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=nh,ca.Forward=ry,ca.Reverse=l0,ca.Ascending=Tp,ca.Descending=u0;function er(){this.On=new nn,this.Dn=new nn,this.Pa=new nn,this.cf=new _n,this.bf=new _n,this.aj=new _n,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 Dn){if(this.On.add(a),a instanceof Di){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 wn?this.Dn.add(a):a instanceof Fo||this.Pa.add(a);y=a.data,y===null||a instanceof Fo||(a instanceof wn?this.bf.add(y,a):this.cf.add(y,a))},Mt.pc=function(a){if(a.Ej(),a instanceof Dn){if(this.On.remove(a),a instanceof Di){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 wn?this.Dn.remove(a):a instanceof Fo||this.Pa.remove(a);y=a.data,y===null||a instanceof Fo||(a instanceof wn?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 Di)&&ie('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 Di||ie('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 wn||ie('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]);ti(y),ti(x),ti(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&&(Mu(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,$n('No Group template found for category "'+x+'"'),$n(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fx||(fx=!0,$n('No Node template found for category "'+x+'"'),$n(" 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,$n('No Link template found for category "'+a+'"'),$n(" 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 Dn?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 Dn?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 nn;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(We(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 nn;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(We(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(Ye(z)){if(!Ye(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(We(y)&&We(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"&&We(tt)&&hx(this,tt),y.isModified=!0}else if(x===Ds){var ot=a.oldValue;E==="nodeDataArray"&&We(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,vt=ut?a.newValue:a.oldValue,xt=this.aj.I(a.object);if(Array.isArray(xt))for(a=0;a<xt.length;a++){var Ct=xt[a];if(ut)km(Ct,vt,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 nn,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);ti(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ay(a,y){var x=y.Hh;if(Ye(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(Ye(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 _n;if(Ye(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 nn;for(var z=new _n,tt=E.iterator;tt.next();){var ot=tt.value;if(ot instanceof wn)a||ot.fromNode!==null&&ot.toNode!==null||b.add(ot);else if(ot instanceof Dn&&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 _n;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 Dn){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 Di&&z instanceof Di)for(y=y.memberParts;y.next();)tt=h0(a,y.value,x,E,b),tt instanceof wn||tt===null||(tt.containingGroup=z)}else if(y instanceof wn&&z instanceof wn)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 Dn&&(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 wn||(E=b.copyNodeData(E),We(E)&&(b.xf(E),x=y.Lc(E)))}else Mu(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 wn||(b=y.copyNodeData(E)),We(b)&&(x.data=b)));return x},Wt.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)}Ee(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){Mu(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 Dn&&(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 Dn&&(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 vt=a.newValue;typeof vt=="string"&&(ft.toPortId=vt)}}else if(b==="nodeGroupKey"){var xt=this.Lc(a.object);if(xt!==null){var Ct=a.newValue;if(Ct!==void 0){var kt=this.Vb(Ct);kt instanceof Di?xt.containingGroup=kt:xt.containingGroup=null}else xt.containingGroup=null}}else if(b==="linkLabelKeys"){var Gt=this.Kc(a.object);if(Gt!==null){var Ot=a.oldValue,Yt=a.newValue;Array.isArray(Ot)&&Ot.forEach(function(tn){0<=Yt.indexOf(tn)||(tn=y.Vb(tn),tn!==null&&(tn.labeledLink=null))}),Array.isArray(Yt)&&Yt.forEach(function(tn){tn=y.Vb(tn),tn!==null&&(tn.labeledLink=Gt)})}}else if(b==="linkCategory"){var $t=this.Kc(a.object),ne=a.newValue;$t!==null&&typeof ne=="string"&&($t.category=ne)}else b==="linkDataArray"&&(yx(this,a.oldValue),mx(this,a.newValue));x.isModified=!0}else if(E===gs){var de=a.newValue;if(b==="linkDataArray"&&typeof de=="object"&&de!==null)vx(this,de);else if(b==="linkLabelKeys"&&lc(de)){var ke=this.Kc(a.object),An=this.Vb(de);ke!==null&&An!==null&&(An.labeledLink=ke)}x.isModified=!0}else if(E===Ds){var Yn=a.oldValue;if(b==="linkDataArray"&&typeof Yn=="object"&&Yn!==null)this.ip(Yn);else if(b==="linkLabelKeys"&&lc(Yn)){var Wn=this.Vb(Yn);Wn!==null&&(Wn.labeledLink=null)}x.isModified=!0}}else if(E===Or){var Sn=a.propertyName;a.object!==x.model||Sn!=="linkFromKeyProperty"&&Sn!=="linkToKeyProperty"&&Sn!=="linkFromPortIdProperty"&&Sn!=="linkToPortIdProperty"&&Sn!=="linkLabelKeysProperty"&&Sn!=="nodeIsGroupProperty"&&Sn!=="nodeGroupKeyProperty"&&Sn!=="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 nn,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 wn){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 nn().addAll(y);var tt=new nn;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 Di)&&(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 Di&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof Dn&&(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}}oh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Di&&(b.containingGroup=a))}},ea.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Dn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)ih(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&ih(y,x,E.data)),a instanceof Di)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&ih(y,x,E)}}},ea.prototype.copyPartData=function(a,y){var x=er.prototype.copyPartData.call(this,a,y);if(a instanceof wn)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 wn){if(Mu(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 Dn&&(Mu(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 Dn||(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}Ee(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||!ln(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Mu(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 Dn&&(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 Dn&&y.mh(z)===x&&d0(this,b,this.ii(z))}oh(y,x)}a=y.mh(a),a!==void 0&&b instanceof Dn&&(a=this.Vb(a),d0(this,a,b))}},cu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Dn){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)&&ih(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 ri(a,y){this.kl=new nn,this.il=new nn,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 _n,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 _n,this.Lt=new un,this.Wg=!1,this.o=null,this.undoManager=new Gr,a!==void 0&&(Ye(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ri.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},ri.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ri.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ri.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},ri.prototype.xA=function(a){a.change!==sl&&ie("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},ri.prototype.Qv=function(a,y){var x=this,E=!1,b=new nn,z=new nn,tt=new nn,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(vt){x.lb(vt)&&z.add(vt)}):ft.object instanceof ri||x.ri()&&x.Jc(ft.object)||wx(x,ft.object).each(function(vt){z.add(vt)})):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},ri.prototype.cloneDeep=function(a){return Cg(this,a,!0)};function Cg(a,y,x,E,b,z){function tt(ft,vt){ot?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,vt)):(ft=Fr++,E.set(ft,vt),b.set(ft,y))}if(!We(y))return y;z||(z=[]);var ot=Object.isExtensible(y);if(E||(E=new _n),ot){var rt=E.get(y);if(rt)return rt}else for(b||(b=new _n),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 jt||y instanceof En||y instanceof Ke||y instanceof hi||y instanceof ii)rt=y.copy(),tt(y,rt);else{if(y instanceof tr||y instanceof Pn||y instanceof Ze)return y;if(y instanceof un)rt=new un().addAll(Cg(a,y.Fa(),!1,E,b,z)),tt(y,rt);else if(y instanceof nn)rt=new nn().addAll(Cg(a,y.Fa(),!1,E,b,z)),tt(y,rt);else if(y instanceof _n)rt=new _n().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=ri.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,We(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,Ye(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 nn,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new _n,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 nn,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(We(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 nn,z=new nn,tt=new nn,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 ri||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)&&ie("applyIncrementalJson cannot change Model properties"),Sx(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new _n;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&&ie("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:ie("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&ie("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)},ri.constructGraphLinksModel=function(){return new ri},Mt=ri.prototype,Mt.dm=function(a){if(Ye(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(We(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:ie("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(We(a)){for(y in a)if(x=a[y],We(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 un,E=0;E<x.length/2;E++)b.add(new jt(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()):Ye(a)?ac(this,a):We(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 ei;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 jt)y={class:"go.Point",x:qa(x.x),y:qa(x.y)};else if(x instanceof En)y={class:"go.Size",width:qa(x.width),height:qa(x.height)};else if(x instanceof Ke)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 ii)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 Pn?(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===Pn.o&&(y.path=Pn.ia(x))):x instanceof Ze&&(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 un){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 jt($a(a.x),$a(a.y));else if(y==="Size")x=new En($a(a.width),$a(a.height));else if(y==="Rect")x=new Ke($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=kh(a.enum):x=new ii($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 ii&&(x.start=a.start),a.end instanceof ii&&(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,We(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Pn.parse(a.path):x=new Pn,x.type=jn(Pn,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 ii&&(x.spot1=a.spot1),a.spot2 instanceof ii&&(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)}ri.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,We(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&&Zn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Ye(E)&&a.propertyName&&(E=ws(a.object,a.propertyName)),Ye(E)&&typeof x=="number"&&(a=a.newValue,y?fi(E,x):Zn(E,x,a))):ie("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Ds?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,We(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Zn(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)&&!Ye(E)&&a.propertyName&&(E=ws(a.object,a.propertyName)),Ye(E)&&typeof x=="number"&&(a=a.oldValue,y?Zn(E,x,a):fi(E,x))):ie("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==sl&&ie("unknown ChangedEvent: "+a.toString())},ri.prototype.Ea=function(a){return this.undoManager.Ea(a)},ri.prototype.eb=function(a){return this.undoManager.eb(a)},ri.prototype.Kf=function(){return this.undoManager.Kf()},ri.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=ri.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;ie("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&&ie("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&&ie("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Zn(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(Ye(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(Ye(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&&Ye(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 nn&&this.Vf.add(y,a))},Mt.Lv=function(){},Mt.fm=function(){},Mt.em=function(){},Mt.qp=function(){};function ih(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new nn,a.Vf.add(y,E)),E.add(x)}}function oh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof nn&&(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 nn?a:null)}Mt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ri.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),We(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&&We(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 ri||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 jt||y instanceof En||y instanceof Ke||y instanceof ii||y instanceof hi?y.copy():y}ri.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 ce&&(Ex=!0,$n('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),$n(" Is that really your intent?"));var E=ws(a,y);E!==x&&(kr(a,y,x),this.Fs(a,y,E,x))},Mt=ri.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),Zn(a,y,x),Gs(this,"",gs,"",a,null,x,null,y)},Mt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&ie("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;ie("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 ri}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 Wu[a]?Wu[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){}}Wt.Object.defineProperties(ri.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===""&&ie("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&ie("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];We(b)||ie("Model.nodeDataArray must only contain Objects, not: "+b),Er(b)}for(this.Tc=a,E=new un,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"}}}),ri.prototype.setCategoryForNodeData=ri.prototype.jm,ri.prototype.getCategoryForNodeData=ri.prototype.Ro,ri.prototype.removeArrayItem=ri.prototype.ov,ri.prototype.insertArrayItem=ri.prototype.ts,ri.prototype.addArrayItem=ri.prototype.Ay,ri.prototype.assignAllDataProperties=ri.prototype.Do,ri.prototype.set=ri.prototype.set,ri.prototype.clearUnresolvedReferences=ri.prototype.Qy,ri.prototype.mergeNodeDataArray=ri.prototype.$z,ri.prototype.removeNodeDataCollection=ri.prototype.nA,ri.prototype.removeNodeData=ri.prototype.cm,ri.prototype.addNodeDataCollection=ri.prototype.Fy,ri.prototype.addNodeData=ri.prototype.xf,ri.prototype.makeNodeDataKeyUnique=ri.prototype.$u,ri.prototype.findNodeDataForKey=ri.prototype.hc,ri.prototype.containsNodeData=ri.prototype.lb,ri.prototype.setKeyForNodeData=ri.prototype.km,ri.prototype.getKeyForNodeData=ri.prototype.wa,ri.prototype.updateTargetBindings=ri.prototype.La,ri.prototype.commit=ri.prototype.commit,ri.prototype.rollbackTransaction=ri.prototype.Kf,ri.prototype.commitTransaction=ri.prototype.eb,ri.prototype.startTransaction=ri.prototype.Ea,ri.prototype.raiseDataChanged=ri.prototype.Fs,ri.prototype.raiseChanged=ri.prototype.g,ri.prototype.raiseChangedEvent=ri.prototype.cb,ri.prototype.removeChangedListener=ri.prototype.ik,ri.prototype.addChangedListener=ri.prototype.Pe,ri.prototype.writeJsonValue=ri.prototype.sm,ri.prototype.replaceJsonObjects=ri.prototype.dm,ri.prototype.applyIncrementalJSON=ri.prototype.Ky,ri.prototype.applyIncrementalJson=ri.prototype.Zw,ri.prototype.toJSON=ri.prototype.toJSON,ri.prototype.toJson=ri.prototype.np,ri.prototype.toIncrementalJSON=ri.prototype.yA,ri.prototype.toIncrementalJson=ri.prototype.$x,ri.prototype.toIncrementalData=ri.prototype.xA,ri.prototype.clear=ri.prototype.clear;var Ex=!1,Wu={};ri.className="Model",ri.fromJSON=ri.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:ie("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 ri?y=a:ie("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ri.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ri.safePropertyValue=ws,ri.safePropertySet=kr,Wu.Brush=tr,Wu.ChangedEvent=Dr,Wu.Geometry=Pn,Wu.Margin=hi,Wu.Panel=fn,Wu.Point=jt,Wu.Rect=Ke,Wu.Size=En,Wu.Spot=ii,Wu.Transaction=Xs,Wu.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 nn}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==="")$n("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 vt=z(tt,y,rt);if(vt!==void 0&&rt!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var xt=E.itemIndex,Ct=E.panel.itemArray;rt.ov(Ct,xt),rt.ts(Ct,xt,vt)}}}catch(kt){}}finally{this.st.remove(a)}}}},Wt.Object.defineProperties(Ls.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Je(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Je(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Je(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Je(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Je(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Je(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Je(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Je(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 Ze(Ls,"OneWay",1),Ip=new Ze(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 Co(a,y,x){ri.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new nn,this.wb=new _n,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&&(Ye(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ee(Co,ri),Co.constructGraphLinksModel=ri.constructGraphLinksModel,Co.prototype.cloneProtected=function(a){ri.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=Co.prototype,Mt.clear=function(){ri.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===""&&ie("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ri.prototype.Qv.call(this,a,y),E=this,b=new nn,z=new nn,tt=new nn,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 ri||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=ri.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){ri.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=ri.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+ac(this,this.linkDataArray,!0);return a+y},Mt.kv=function(a){ri.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 nn,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===""&&ie("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ri.prototype.Pv.call(this,a,y),E=this,b=new nn,z=new nn,tt=new nn,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 ri||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)&&ie("applyIncrementalJson cannot change Model properties"),ri.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)},Co.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,We(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,We(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}}ri.prototype.changeState.call(this,a,y)}},Mt=Co.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;ie((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&&(oh(a,z,y),kr(y,b,x),a.hc(x)===null&&ih(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++)oh(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&&ih(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&&ih(this,y,a),Gs(this,"linkLabelKeys",gs,x,a,null,y,null,b)))}else ie(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)&&(oh(this,y,a),Gs(this,"linkLabelKeys",Ds,x,a,y,null,b,null)))}else E!==void 0&&ie(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;ie("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&&ie("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&&ie("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),oh(a,x,y),x=ql(a,y,!1),oh(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],oh(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===""&&ie("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Ye(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&&ih(a,x,y),x=ql(a,y,!1),x=a.Vl(x),a.hc(x)===null&&ih(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&&ih(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),We(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;ie("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&&(oh(this,E,a),kr(a,x,y),this.hc(y)===null&&ih(this,y,a),Gs(this,"nodeGroupKey",Or,x,a,E,y),typeof x=="string"&&this.La(a,x))}else kr(a,x,y)}},Co.prototype.copyNodeData=function(a){return a===null?null:(a=ri.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ws(a,this.Je)===void 0||kr(a,this.Je,void 0),a)},Co.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=Co.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){ri.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(){ri.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){ri.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++)oh(this,a,x[y]);ti(x)}},Mt.em=function(a){ri.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&ih(this,y,a)},Mt.qp=function(a){ri.prototype.qp.call(this,a);var y=this.lh(a);oh(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;ie("getCategoryForLinkData found a non-string category for "+a+": "+y)},Co.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Co.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)}},Co.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Mt=Co.prototype,Mt.lm=function(a,y){ri.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},Wt.Object.defineProperties(Co.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];We(b)||ie("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Er(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new un,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 nn,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"}}}),Co.prototype.setCategoryForLinkData=Co.prototype.lp,Co.prototype.getCategoryForLinkData=Co.prototype.ps,Co.prototype.assignAllDataProperties=Co.prototype.Do,Co.prototype.setGroupKeyForNodeData=Co.prototype.mp,Co.prototype.getGroupKeyForNodeData=Co.prototype.lh,Co.prototype.isGroupForNodeData=Co.prototype.Yu,Co.prototype.copyLinkData=Co.prototype.Jo,Co.prototype.mergeLinkDataArray=Co.prototype.Zz,Co.prototype.removeLinkDataCollection=Co.prototype.lA,Co.prototype.removeLinkData=Co.prototype.bm,Co.prototype.addLinkDataCollection=Co.prototype.Ey,Co.prototype.addLinkData=Co.prototype.fi,Co.prototype.containsLinkData=Co.prototype.Jc,Co.prototype.makeLinkDataKeyUnique=Co.prototype.Bs,Co.prototype.findLinkDataForKey=Co.prototype.jh,Co.prototype.setKeyForLinkData=Co.prototype.Ks,Co.prototype.getKeyForLinkData=Co.prototype.Ac,Co.prototype.removeLabelKeyForLinkData=Co.prototype.Qx,Co.prototype.addLabelKeyForLinkData=Co.prototype.Bu,Co.prototype.setLabelKeysForLinkData=Co.prototype.Ls,Co.prototype.getLabelKeysForLinkData=Co.prototype.Ef,Co.prototype.setToPortIdForLinkData=Co.prototype.Cv,Co.prototype.getToPortIdForLinkData=Co.prototype.Cx,Co.prototype.setFromPortIdForLinkData=Co.prototype.xv,Co.prototype.getFromPortIdForLinkData=Co.prototype.zx,Co.prototype.setToKeyForLinkData=Co.prototype.Bv,Co.prototype.getToKeyForLinkData=Co.prototype.Bx,Co.prototype.setFromKeyForLinkData=Co.prototype.wv,Co.prototype.getFromKeyForLinkData=Co.prototype.yx,Co.prototype.clear=Co.prototype.clear;var p0=Object.freeze([]);Co.className="GraphLinksModel",Wu.GraphLinksModel=Co,ri.constructGraphLinksModel=ri.constructGraphLinksModel=function(){return new Co},ri.initDiagramModel=hy=function(){return new Co};function tl(a,y){ri.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Ye(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ee(tl,ri),tl.constructGraphLinksModel=ri.constructGraphLinksModel,tl.prototype.cloneProtected=function(a){ri.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=ri.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){ri.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Mt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&ie("applyIncrementalJson cannot change Model properties"),ri.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;ie("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&&(oh(this,E,a),kr(a,x,y),this.hc(y)===null&&ih(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:(ie("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=ri.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){ri.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){ri.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++)oh(this,a,x[y]);ti(x)}},Mt.em=function(a){ri.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&ih(this,y,a)},Mt.qp=function(a){ri.prototype.qp.call(this,a);var y=this.mh(a);oh(this,y,a)},Mt.lm=function(a,y){ri.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},Wt.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",Wu.TreeModel=tl;function Yr(a){Br.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Ku,this.Ti=0,this.Zv=new jt,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=Ku,this.K=el,this.nd=bg,this.hd=oy,this.tf=6,this.Nn=P0,a&&Object.assign(this,a)}Ee(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===Ku||a===Zu?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 un;y.addAll(a.iterator),a=new un;var x=new un,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 vt=this.sweepAngle;if((!isFinite(vt)||360<vt||1>vt)&&(vt=360),y=this.spacing,isFinite(y)||(y=NaN),ot===Zu&&rt===kf?ot=Ku:ot===Zu&&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===Zu&&a.reverse(),E=new un,E.addAll(a),E.addAll(x)):(this.arrangement===Zu&&x.reverse(),E=new un,E.addAll(x),E.addAll(a))}rt=E.length;for(var xt=z=b=0;xt<E.length;xt++){var Ct=ft+vt*z*(this.direction===el?1:-1)/rt,kt=E.M(xt).diameter;isNaN(kt)&&(kt=dc(E.M(xt),Ct)),360>vt&&(xt===0||xt===E.length-1)&&(kt/=2),b+=kt,z++}if(isNaN(at)||ot===Zu){if(isNaN(y)&&(y=6),ot!==Ku&&ot!==Zu){for(z=-1/0,tt=0;tt<rt;tt++)xt=E.M(tt),b=E.M(tt===rt-1?0:tt+1),isNaN(xt.diameter)&&dc(xt,0),isNaN(b.diameter)&&dc(b,0),z=Math.max(z,(xt.diameter+b.diameter)/2);tt=z+y,ot===Dd?at=(z+y)/(2*Math.PI/rt):at=m0(this,tt*(360<=vt?rt:rt-1),ut,ft*Math.PI/180,vt*Math.PI/180)}else at=m0(this,b+(360<=vt?rt:rt-1)*(ot!==Zu?y:1.6*y),ut,ft*Math.PI/180,vt*Math.PI/180);z=at*ut}else if(z=at*ut,xt=fy(this,at,z,ft*Math.PI/180,vt*Math.PI/180),isNaN(y))(ot===Ku||ot===Zu)&&(y=(xt-b)/(360<=vt?rt:rt-1));else if(ot===Ku||ot===Zu)xt=(xt-b)/(360<=vt?rt:rt-1),xt<y?(at=m0(this,b+y*(360<=vt?rt:rt-1),ut,ft*Math.PI/180,vt*Math.PI/180),z=at*ut):y=xt;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<=vt?rt:rt-1),ut,ft*Math.PI/180,vt*Math.PI/180),b>at?(at=b,z=at*ut):tt=xt/(360<=vt?rt:rt-1)}if(this.kw=ot,this.lc=at,this.Zm=ut,this.lw=ft,this.Wp=vt,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,vt=this.me,rt=this.Jp,this.direction!==Jc&&this.direction!==Lg||E!==Zu)if(this.direction===Jc||this.direction===Lg){switch(tt=0,E){case uc:tt=180*v0(this,ot,vt,at,rt)/Math.PI;break;case Ku: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,vt,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 Ku: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 Ku: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 Ku: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 Ku: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 Ku:Op(this,y,at,this.direction);break;case Dd:Dp(this,y,ut,at,this.direction);break;case Zu: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=jt.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(jt.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 vt=Math.abs(rt-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),xt=Math.abs(at-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(xt)?Math.abs(rt-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<xt?xt:1>Math.abs(vt)?0:vt,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=jt.alloc(),ft=y.Fa(),vt=0;vt<ft.length&&(ft[vt].centerX=rt,ft[vt].centerY=at,!(vt>=ft.length-1));vt++)Dx(a,rt,at,ft,vt,b,ut)||Ox(a,rt,at,ft,vt,b,ut),rt=ut.x,at=ut.y;if(jt.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 jt(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:ie("Invalid sorting type.")}return a};function F1(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new un;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 un;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,vt=-1,xt=[],Ct=0;Ct<x.length;Ct++)0>y[x[Ct]].indexOf(x[Ct===x.length-1?0:Ct+1])&&xt.push(Ct===x.length-1?0:Ct+1);if(xt.length===0)for(Ct=0;Ct<x.length;Ct++)xt.push(Ct);for(Ct=0;Ct<xt.length;Ct++){for(var kt=xt[Ct],Gt=y[at],Ot=0,Yt=0;Yt<tt.length;Yt++){var $t=z[tt[Yt]],ne=z[ot[Yt]];if($t<ne){var de=$t;$t=ne}else de=ne;if(de<kt&&kt<=$t)for(ne=0;ne<Gt.length;ne++){var ke=Gt[ne];0>x.indexOf(ke)||de<z[ke]&&z[ke]<$t||de===z[ke]||$t===z[ke]||Ot++}else for(ne=0;ne<Gt.length;ne++)ke=Gt[ne],0>x.indexOf(ke)||de<z[ke]&&z[ke]<$t&&de!==z[ke]&&$t!==z[ke]&&Ot++}for(Gt=Ot,Yt=Ot=0;Yt<y[at].length;Yt++)de=x.indexOf(y[at][Yt]),0<=de&&(de=Math.abs(kt-(de>=kt?de+1:de)),Ot+=de<x.length+1-de?de:x.length+1-de);for(Yt=0;Yt<tt.length;Yt++)de=z[tt[Yt]],$t=z[ot[Yt]],de>=kt&&de++,$t>=kt&&$t++,de>$t&&(ne=$t,$t=de,de=ne),$t-de<(x.length+2)/2==(de<kt&&kt<=$t)&&Ot++;(Gt<ut||Gt===ut&&Ot<ft)&&(ut=Gt,ft=Ot,vt=kt)}for(x.splice(vt,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(vt=ft=0;vt<y[at].length;vt++)xt=x.indexOf(y[at][vt]),0>xt||xt===ut||(Ct=xt>ut?xt-ut:ut-xt,ft+=xt<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},Wt.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!==Zu&&a!==Ku&&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 Ku=new Ze(Yr,"ConstantSpacing",0),uc=new Ze(Yr,"ConstantDistance",1),Dd=new Ze(Yr,"ConstantAngle",2),Zu=new Ze(Yr,"Packed",3),el=new Ze(Yr,"Clockwise",4),hc=new Ze(Yr,"Counterclockwise",5),Jc=new Ze(Yr,"BidirectionalLeft",6),Lg=new Ze(Yr,"BidirectionalRight",7),y0=new Ze(Yr,"Forwards",8),S0=new Ze(Yr,"Reverse",9),x0=new Ze(Yr,"Ascending",10),w0=new Ze(Yr,"Descending",11),bg=new Ze(Yr,"Optimized",12),P0=new Ze(Yr,"Pythagorean",13),kf=new Ze(Yr,"Circular",14);Yr.className="CircularLayout",Yr.ConstantSpacing=Ku,Yr.ConstantDistance=uc,Yr.ConstantAngle=Dd,Yr.Packed=Zu,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)}Ee(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}Ee(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===Zu)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}Wt.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)}Ee(C0,Il),C0.className="CircularEdge";function wa(a){Br.call(this),this.ah=null,this.An=0,this.$d=new En(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)}Ee(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=Ke.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 jt(ft.x+ft.width+E.width,ft.y),at[1]=new jt(ft.x,ft.y+ft.height+E.height),ot=2;else{var vt=jx(at,ot,b,z,ft.width,ft.height,E),xt=at[vt],Ct=new jt(xt.x+ft.width+E.width,xt.y),kt=new jt(xt.x,xt.y+ft.height+E.height);for(vt+1<ot&&at.splice(vt+1,0,null),at[vt]=Ct,at[vt+1]=kt,ot++,vt=xt.x-ft.x,xt=xt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)Ct=ut.value,Ct.centerX+=vt,Ct.centerY+=xt}for(Ke.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,vt=tt.bounds,2>ot?(b=vt.x+vt.width/2,z=vt.y+vt.height/2,at[0]=new jt(vt.x+vt.width+E.width,vt.y),at[1]=new jt(vt.x,vt.y+vt.height+E.height),ot=2):(rt=jx(at,ot,b,z,vt.width,vt.height,E),ft=at[rt],xt=new jt(ft.x+vt.width+E.width,ft.y),vt=new jt(ft.x,ft.y+vt.height+E.height),rt+1<ot&&at.splice(rt+1,0,null),at[rt]=xt,at[rt+1]=vt,ot++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(ti(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 un),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 un,b.Hj=ot),ot.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(ot=tt.Hj,ot===null&&(ot=new un,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,pe.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),vt=null;for(z=ft.edges.iterator;z.next();){var xt=z.value;if(xt.Ax(ft)===b){vt=xt;break}}vt!==null&&(at+=vt.length,ot+=ft.width*ft.height)}z=b.centerX,rt=b.centerY,ut=b.width,ft=b.height,vt=b.focus,xt=ut*ft,1>xt&&(xt=1),ot=pe.sqrt((ot+xt+at*at*4/(tt*tt))/xt),tt=(ot-1)*ut/2,ot=(ot-1)*ft/2,b.bounds=new Ke(z-vt.x-tt,rt-vt.y-ot,ut+2*tt,ft+2*ot),b.focus=new jt(vt.x+tt,vt.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 Ke(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new jt(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=pe.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(xt,Ct){return xt===null||Ct===null||xt===Ct?0:Ct.width*Ct.height-xt.width*xt.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 vt=rt.height;ft=pe.sqrt(ft*ft+vt*vt)/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,vt=ut.y-E;if(ft=ft*ft+vt*vt,ft<ot){for(vt=at-1;0<=vt;vt--)if(a[vt].y>ut.y&&a[vt].x-ut.x<b+tt.width)continue t;for(vt=at+1;vt<y;vt++)if(a[vt].x>ut.x&&a[vt].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,pe.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,pe.sqrt(E*E+a*a)):tt-(E+b):E>tt+ot?a>y+z?(x=E-tt-ot,a=a-y-z,pe.sqrt(x*x+a*a)):a+x<y?(E=E-tt-ot,a=a+x-y,pe.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,Gt){return kt===null||Gt===null||kt===Gt?0:kt.centerX-Gt.centerX}):y.sort(function(kt,Gt){return kt===null||Gt===null||kt===Gt?0:kt.centerY-Gt.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 vt=y[ft];if(vt!==tt){E=vt.bounds,ot=vt.focus,at=E.x+ot.x;var xt=E.y+ot.y;if(rt-at>x||at-rt>x){if(b)break}else if(ut-xt>x||xt-ut>x){if(!b)break}else{var Ct=zx(tt,vt);1>Ct?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new M0),Ct=E.random(),ot=E.random(),rt>at?(E=Math.abs(vt.bounds.right-tt.bounds.x),E=(1+E)*Ct):rt<at?(E=Math.abs(vt.bounds.x-tt.bounds.right),E=-(1+E)*Ct):(E=Math.max(vt.width,tt.width),E=(1+E)*Ct-E/2),ut>xt?(at=Math.abs(vt.bounds.bottom-tt.bounds.y),at=(1+at)*ot):rt<at?(at=Math.abs(vt.bounds.y-tt.bounds.bottom),at=-(1+at)*ot):(at=Math.max(vt.height,tt.height),at=(1+at)*ot-at/2)):(ot=-(tt.charge*vt.charge)/(Ct*Ct),E=(at-rt)/Ct*ot,at=(xt-ut)/Ct*ot),tt.forceX+=E,tt.forceY+=at,vt.forceX-=E,vt.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=$e,y.toSpot=$e)}},wa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ke.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ke.free(x)}x=Ke.alloc();for(var 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()}Ke.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},Wt.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"&&ie('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)}Ee(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}Ee(Hp,Vs),Wt.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}Ee(Gp,Il),Wt.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 jt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ee(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:ie("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 vt=ot.fromPort;vt!==null&&!vt.Ed();)vt=vt.panel;for(ot=ot.toPort;ot!==null&&!ot.Ed();)ot=ot.panel;if(E.rev){at=ft;var xt=vt;ft=rt,vt=ot,rt=at,ot=xt}var Ct=b.focus;at=z.focus;var kt=E.rev?z.bounds:b.bounds;xt=jt.alloc(),ut!==ft?kt.w()&&ft.isVisible()?ft.actualBounds.w()?(Nd(ft,vt,mo,xt),xt.x+=ft.actualBounds.x-kt.x,xt.y+=ft.actualBounds.y-kt.y):(Nd(ft,vt,mo,xt),xt.w()||xt.assign(Ct)):xt.assign(Ct):kt.w()?(Nd(ft,vt,mo,xt),xt.w()||xt.assign(Ct)):xt.assign(Ct),ft=E.rev?b.bounds:z.bounds,ut=jt.alloc(),tt!==rt?ft.w()&&rt.isVisible()?rt.actualBounds.w()?(Nd(rt,ot,mo,ut),ut.x+=rt.actualBounds.x-ft.x,ut.y+=rt.actualBounds.y-ft.y):(Nd(rt,ot,mo,ut),ut.w()||ut.assign(at)):ut.assign(at):ft.w()?(Nd(rt,ot,mo,ut),ut.w()||ut.assign(at)):ut.assign(at),this.K===90||this.K===270?(tt=Math.round((xt.x-Ct.x)/this.kc),rt=xt.x,ot=Math.round((ut.x-at.x)/this.kc),at=ut.x):(tt=Math.round((xt.y-Ct.y)/this.kc),rt=xt.y,ot=Math.round((ut.y-at.y)/this.kc),at=ut.y),jt.free(xt),jt.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(xt=b.layer,ut=z.layer,ft=0,kt=E.link,kt!==null){var Gt=kt.fromPort,Ot=kt.toPort;if(Gt!==null&&Ot!==null){var Yt=kt.fromNode;if(vt=kt.toNode,Yt!==null&&vt!==null){var $t=k0(this,!0),ne=k0(this,!1),de=this.setsPortSpots?$t:kt.computeSpot(!0,Gt);Ct=this.setsPortSpots?ne:kt.computeSpot(!1,Ot);var ke=kt.isOrthogonal;de.$c()&&de.Hf(ne)&&Ct.$c()&&Ct.Hf($t)?ft=0:($t=kt.getLinkPoint(Yt,Gt,de,!0,ke,vt,Ot,jt.alloc()),ne=kt.getLinkDirection(Yt,Gt,$t,de,!0,ke,vt,Ot),jt.free($t),de.ys()||ne!==Jx(this,E,!0)?this.setsPortSpots&&Yt!==null&&Yt.ports.count===1&&E.rev&&(ft+=1):ft+=1,de=kt.getLinkPoint(vt,Ot,Ct,!1,ke,Yt,Gt,jt.alloc()),kt=kt.getLinkDirection(vt,Ot,de,Ct,!1,ke,Yt,Gt),jt.free(de),Ct.ys()||kt!==Jx(this,E,!1)?this.setsPortSpots&&vt!==null&&vt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(vt=ft,ft=vt===1||vt===3,(vt=vt===2||vt===3)&&(Ct=a.createVertex(),Ct.node=null,Ct.Dj=1,Ct.layer=xt,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--,xt-ut>kt&&0<xt){for(E.valid=!1,Ct=a.createVertex(),Ct.node=null,Ct.Dj=2,Ct.layer=xt-1,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=vt?0:tt,b.portToColOffset=0,b.portFromPos=vt?0:rt,b.portToPos=0,b=Ct,xt--;xt-ut>kt&&0<xt;)Ct=a.createVertex(),Ct.node=null,Ct.Dj=3,Ct.layer=xt-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,xt--;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 vt;if(0<=x)for(rt=E[tt].sourceEdgesArrayAccess,at=0;at<rt.length;at++){var xt=rt[at];if(xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,ut=xt.portToPos,xt=xt.portFromPos,vt=at+1;vt<rt.length;vt++){var Ct=rt[vt];if(Ct.valid&&Ct.fromVertex.layer!==y){var kt=Ct.fromVertex.index,Gt=Ct.portToPos;Ct=Ct.portFromPos,ut<Gt&&(ft>kt||ft===kt&&xt>Ct)&&ot++,Gt<ut&&(kt>ft||kt===ft&&Ct>xt)&&ot++}}}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,at=0;at<rt.length;at++)if(xt=rt[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,ut=xt.portToPos,xt=xt.portFromPos,vt=at+1;vt<rt.length;vt++)Ct=rt[vt],Ct.valid&&Ct.toVertex.layer!==y&&(kt=Ct.toVertex.index,Gt=Ct.portToPos,Ct=Ct.portFromPos,xt<Ct&&(ft>kt||ft===kt&&ut>Gt)&&ot++,Ct<xt&&(kt>ft||kt===ft&&Gt>ut)&&ot++)}for(z[tt*b+tt]=ot,rt=tt+1;rt<b;rt++){var Ot=0,Yt=0;if(0<=x){ot=E[tt].sourceEdgesArrayAccess;var $t=E[rt].sourceEdgesArrayAccess;for(at=0;at<ot.length;at++)if(xt=ot[at],xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,xt=xt.portFromPos,vt=0;vt<$t.length;vt++)Ct=$t[vt],Ct.valid&&Ct.fromVertex.layer!==y&&(kt=Ct.fromVertex.index,Ct=Ct.portFromPos,(ft<kt||ft===kt&&xt<Ct)&&Yt++,(kt<ft||kt===ft&&Ct<xt)&&Ot++)}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,$t=E[rt].destinationEdgesArrayAccess,at=0;at<ot.length;at++)if(xt=ot[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,ut=xt.portToPos,vt=0;vt<$t.length;vt++)Ct=$t[vt],Ct.valid&&Ct.toVertex.layer!==y&&(kt=Ct.toVertex.index,Gt=Ct.portToPos,(ft<kt||ft===kt&&ut<Gt)&&Yt++,(kt<ft||kt===ft&&Gt<ut)&&Ot++)}z[tt*b+rt]=Ot,z[rt*b+tt]=Yt}}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 vt=ft.fromVertex.column+ft.portFromColOffset,xt=ft.toVertex.column+ft.portToColOffset;ot+=(Math.abs(vt-xt)+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,vt=ot.near;if(vt!==null&&vt.layer===ot.layer&&(ut+=vt.column-1,ft++),rt!==null)for(vt=0;vt<rt.length;vt++){ot=rt[vt];var xt=ot.fromVertex;ot.valid&&!ot.rev&&xt.layer!==y&&(ut+=xt.column,ft++)}if(at!==null)for(rt=0;rt<at.length;rt++)ot=at[rt],vt=ot.toVertex,ot.valid&&!ot.rev&&vt.layer!==y&&(ut+=vt.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=[],vt=ot.near;if(vt!==null&&vt.layer===ot.layer&&(ft[ut]=vt.column-1,ut++),ot=void 0,rt!==null)for(vt=0;vt<rt.length;vt++){ot=rt[vt];var xt=ot.fromVertex;ot.valid&&!ot.rev&&xt.layer!==y&&(ft[ut]=xt.column+ot.portFromColOffset,ut++)}if(at!==null)for(rt=0;rt<at.length;rt++)ot=at[rt],vt=ot.toVertex,ot.valid&&!ot.rev&&vt.layer!==y&&(ft[ut]=vt.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,vt=at.sourceEdgesArrayAccess;b=vt.length;for(var xt=0;xt<b;xt++){var Ct=vt[xt],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(vt=at.destinationEdgesArrayAccess,b=vt.length,xt=0;xt<b;xt++)Ct=vt[xt].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,vt=tt.sourceEdgesArrayAccess,ft=vt.length,xt=0;xt<ft;xt++)Ct=vt[xt].fromVertex,at+=1,Ct.component!==1?E+=1:ut=!0;for(vt=tt.destinationEdgesArrayAccess,ft=vt.length,xt=0;xt<ft;xt++)Ct=vt[xt],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),Eu(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),Eu(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),Eu(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=fl(this)),E=this.Ia;0<=E;E--)L0(this,E,0),Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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=Eu(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 Eu(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],vt=0,xt=0,Ct=E[z].column,kt=E[z+1].column,Gt=a.nodeMinColumnSpace(E[z],!0),Ot=a.nodeMinColumnSpace(E[z],!1),Yt=a.nodeMinColumnSpace(E[z+1],!0),$t=a.nodeMinColumnSpace(E[z+1],!1);Gt=Ct-Gt+Yt,Ot=kt-Ot+$t;var ne=E[z].sourceEdges.iterator;for(ne.reset();ne.next();)if(Yt=ne.value,$t=Yt.fromVertex,Yt.valid&&$t.layer===y){for(Yt=0;E[Yt]!==$t;)Yt++;Yt<z&&(vt+=2*(z-Yt),xt+=2*(z+1-Yt)),Yt===z+1&&(vt+=1),Yt>z+1&&(vt+=4*(Yt-z),xt+=4*(Yt-(z+1)))}for(ne=E[z].destinationEdges.iterator,ne.reset();ne.next();)if(Yt=ne.value,$t=Yt.toVertex,Yt.valid&&$t.layer===y){for(Yt=0;E[Yt]!==$t;)Yt++;Yt===z+1&&(xt+=1)}for(ne=E[z+1].sourceEdges.iterator,ne.reset();ne.next();)if(Yt=ne.value,$t=Yt.fromVertex,Yt.valid&&$t.layer===y){for(Yt=0;E[Yt]!==$t;)Yt++;Yt<z&&(vt+=2*(z+1-Yt),xt+=2*(z-Yt)),Yt===z&&(xt+=1),Yt>z+1&&(vt+=4*(Yt-(z+1)),xt+=4*(Yt-z))}for(ne=E[z+1].destinationEdges.iterator,ne.reset();ne.next();)if(Yt=ne.value,$t=Yt.toVertex,Yt.valid&&$t.layer===y){for(Yt=0;E[Yt]!==$t;)Yt++;Yt===z&&(vt+=1)}Yt=$t=0,ne=tt[E[z].index];var de=ot[E[z].index],ke=tt[E[z+1].index],An=ot[E[z+1].index];ne!==-1&&($t+=Math.abs(ne-Ct),Yt+=Math.abs(ne-Ot)),de!==-1&&($t+=Math.abs(de-Ct),Yt+=Math.abs(de-Ot)),ke!==-1&&($t+=Math.abs(ke-kt),Yt+=Math.abs(ke-Gt)),An!==-1&&($t+=Math.abs(An-kt),Yt+=Math.abs(An-Gt)),(xt<vt-.5||xt===vt&&ft<ut-.5||xt===vt&&ft===ut&&Yt<$t-.5)&&(at=rt=!0,E[z].column=Ot,E[z+1].column=Gt,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),vt=a.nodeMinColumnSpace(b[E],!1),xt=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?xt=ut-1:xt=ut,ft=E+1>=z||b[E+1].column-ut-1>vt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Ct=vt=0,kt=0;if(0>=x)for(var Gt=b[E].sourceEdges.iterator;Gt.next();){var Ot=Gt.value,Yt=Ot.fromVertex;if(Ot.valid&&Yt.layer!==y){var $t=gy(Ot),ne=Ot.portFromColOffset;Ot=Ot.portToColOffset,Yt=Yt.column,vt+=(Math.abs(ut+Ot-(Yt+ne))+1)*$t,Ct+=(Math.abs(xt+Ot-(Yt+ne))+1)*$t,kt+=(Math.abs(ft+Ot-(Yt+ne))+1)*$t}}if(0<=x)for(Gt=b[E].destinationEdges.iterator;Gt.next();)Ot=Gt.value,Yt=Ot.toVertex,Ot.valid&&Yt.layer!==y&&($t=gy(Ot),ne=Ot.portFromColOffset,Ot=Ot.portToColOffset,Yt=Yt.column,vt+=(Math.abs(ut+ne-(Yt+Ot))+1)*$t,Ct+=(Math.abs(xt+ne-(Yt+Ot))+1)*$t,kt+=(Math.abs(ft+ne-(Yt+Ot))+1)*$t);Ot=ne=$t=0,Gt=tt[b[E].index],Yt=ot[b[E].index],Gt!==-1&&($t+=Math.abs(Gt-ut),ne+=Math.abs(Gt-xt),Ot+=Math.abs(Gt-ft)),Yt!==-1&&($t+=Math.abs(Yt-ut),ne+=Math.abs(Yt-xt),Ot+=Math.abs(Yt-ft)),Ct<vt||Ct===vt&&ne<$t?(at=rt=!0,b[E].column=xt):(kt<vt||kt===vt&&Ot<$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 nn,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,vt=(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();vt&&(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)),ti(y),a.u(z,tt,ot,rt),a.network.vertexes.each(function(xt){var Ct=Hn();at&&Ct.push(z.get(xt)),ut&&Ct.push(tt.get(xt)),ft&&Ct.push(ot.get(xt)),vt&&Ct.push(rt.get(xt)),Ct.sort(function(Gt,Ot){return Gt-Ot});var kt=Ct.length;kt=(Ct[Math.floor((kt-1)/2)]+Ct[Math.ceil((kt-1)/2)])/2,ti(Ct),xt.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 vt=ir(at.sourceEdgesArrayAccess),xt=vt.next();!xt.done;xt=vt.next())xt=xt.value,xt.valid&&ft.push(xt);at.bo=ft}for(at=ir(at.bo),ft=at.next();!ft.done;ft=at.next())ft=ft.value,vt=ft.fromVertex.index,(vt<b||vt>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,vt){return ft.vi-vt.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,vt=tt?ut.width:ut.height,xt=tt?ft.width:ft.height;if(x){var Ct=F0(ut,ft),kt=Ct.portFromPos,Gt=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&&(Gt=tt?ft.focusX:ft.focusY))}else Ct=F0(ft,ut),kt=Ct.portToPos,Gt=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&&(Gt=tt?ft.focusX:ft.focusY));vt=E?ut.qg+(vt-kt)-(xt-Gt):ut.qg+kt-Gt,ft.qg=vt,at=Math.min(at,vt),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 _n,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&&ie("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)));ti(E),ti(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 jt(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 Ke(0,0,x,Math.abs(this.Ta[0]))):y.push(new Ke(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Ke(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Ke(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Ke(0,0,Math.abs(this.Ta[0]),x)):y.push(new Ke(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Ke(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Ke(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(mo),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(mo),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 vt=!1,xt=!1,Ct=this.ie,kt=y.firstPickIndex+1;if(y.isOrthogonal){xt=!0;var Gt=y.pointsCount;4<Gt&&y.points.removeRange(2,Gt-3)}else if(y.curve===_l)vt=!0,Gt=y.pointsCount,4<Gt&&y.points.removeRange(2,Gt-3),Gt===4&&(kt=2);else{Gt=y.pointsCount;var Ot=at===Vr,Yt=rt===Vr;2<Gt&&Ot&&Yt?y.points.removeRange(1,Gt-2):3<Gt&&Ot&&!Yt?y.points.removeRange(1,Gt-3):3<Gt&&!Ot&&Yt?y.points.removeRange(2,Gt-2):4<Gt&&!Ot&&!Yt&&y.points.removeRange(2,Gt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var $t=Gt=null;for(Ot=ft.sourceEdges.iterator;Ot.next()&&(Yt=Ot.value,Yt.link!==x.link||(Gt=Yt.fromVertex,$t=Yt.toVertex,Gt.node!==null)););if(Gt===null)break;if(Gt!==ut){Ot=y.i(kt-1).x,Yt=y.i(kt-1).y;var ne=Gt.centerX,de=Gt.centerY;if(xt)this.K===180||this.K===0?kt===y.firstPickIndex+1?(y.m(kt++,Ot,Yt),y.m(kt++,Ot,de)):($t!==null?$t.centerY:Yt)!==de&&($t=this.Ta[Gt.layer-1]+this.Rf.x,y.m(kt++,$t,Yt),y.m(kt++,$t,de)):kt===y.firstPickIndex+1?(y.m(kt++,Ot,Yt),y.m(kt++,ne,Yt)):($t!==null?$t.centerX:Ot)!==ne&&($t=this.Ta[Gt.layer-1]+this.Rf.y,y.m(kt++,Ot,$t),y.m(kt++,ne,$t));else if(kt===y.firstPickIndex+1){$t=Math.max(10,this.he[ft.layer]);var ke=Math.max(10,this.Ld[ft.layer]);if(vt)this.K===180?ne<=ft.bounds.x?(ft=ft.bounds.x,y.m(kt++,ft-$t,de),y.m(kt++,ft,de),y.m(kt++,ft+ke,de)):(y.m(kt++,ne-$t,de),y.m(kt++,ne,de),y.m(kt++,ne+ke,de)):this.K===90?de>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(kt++,ne,ft+ke),y.m(kt++,ne,ft),y.m(kt++,ne,ft-$t)):(y.m(kt++,ne,de+ke),y.m(kt++,ne,de),y.m(kt++,ne,de-$t)):this.K===270?de<=ft.bounds.y?(ft=ft.bounds.y,y.m(kt++,ne,ft-$t),y.m(kt++,ne,ft),y.m(kt++,ne,ft+ke)):(y.m(kt++,ne,de-$t),y.m(kt++,ne,de),y.m(kt++,ne,de+ke)):this.K===0&&(ne>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(kt++,ft+ke,de),y.m(kt++,ft,de),y.m(kt++,ft-$t,de)):(y.m(kt++,ne+ke,de),y.m(kt++,ne,de),y.m(kt++,ne-$t,de)));else{y.m(kt++,Ot,Yt);var An=0;this.K===180||this.K===0?((this.K===180?ne>=ft.bounds.right:ne<=ft.bounds.x)&&(An=(this.K===0?-$t:ke)/2),y.m(kt++,Ot+An,de)):((this.K===270?de>=ft.bounds.bottom:de<=ft.bounds.y)&&(An=(this.K===90?-$t:ke)/2),y.m(kt++,ne,Yt+An)),y.m(kt++,ne,de)}}else $t=Math.max(10,this.he[Gt.layer]),ke=Math.max(10,this.Ld[Gt.layer]),vt?this.K===180?(y.m(kt++,ne-$t-Ct,de),y.m(kt++,Math.min(ne-$t+Ct/2,ne),de),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,Math.max(ne+ke-Ct/2,ne),de),y.m(kt++,ne+ke+Ct,de)):this.K===90?(y.m(kt++,ne,de+ke+Ct),y.m(kt++,ne,Math.max(de+ke-Ct/2,de)),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,ne,Math.min(de-$t+Ct/2,de)),y.m(kt++,ne,de-$t-Ct)):this.K===270?(y.m(kt++,ne,de-$t-Ct),y.m(kt++,ne,Math.min(de-$t+Ct/2,de)),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,ne,Math.max(de+ke-Ct/2,de)),y.m(kt++,ne,de+ke+Ct)):(y.m(kt++,ne+ke+Ct,de),y.m(kt++,Math.max(ne+ke-Ct/2,ne),de),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,Math.min(ne-$t+Ct/2,ne),de),y.m(kt++,ne-$t-Ct,de)):y.m(kt++,ne,de)}ft=Gt}(ot===null||at!==Vr||xt)&&(Ot=y.i(kt-1).x,Yt=y.i(kt-1).y,ne=y.i(kt).x,de=y.i(kt).y,xt?(Ct=this.Ld[ut.layer],this.K===180||this.K===0?(xt=Yt,xt>=ut.bounds.y&&xt<=ut.bounds.bottom&&(this.K===180?ne>=ut.bounds.x:ne<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Ct:Ct),xt<ut.bounds.y+ut.bounds.height/2?xt=ut.bounds.y-this.kc/2:xt=ut.bounds.bottom+this.kc/2,y.m(kt++,ft,Yt),y.m(kt++,ft,xt)),y.m(kt++,ne,xt)):(xt=Ot,xt>=ut.bounds.x&&xt<=ut.bounds.right&&(this.K===270?de>=ut.bounds.y:de<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Ct:Ct),xt<ut.bounds.x+ut.bounds.width/2?xt=ut.bounds.x-this.kc/2:xt=ut.bounds.right+this.kc/2,y.m(kt++,Ot,ft),y.m(kt++,xt,ft)),y.m(kt++,xt,de)),y.m(kt++,ne,de)):vt?($t=Math.max(10,this.he[ut.layer]),ke=Math.max(10,this.Ld[ut.layer]),this.K===180&&ne>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(kt-2,ft,Yt),y.L(kt-1,ft+ke,Yt)):this.K===90&&de<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(kt-2,Ot,ft),y.L(kt-1,Ot,ft-$t)):this.K===270&&de>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(kt-2,Ot,ft),y.L(kt-1,Ot,ft+ke)):this.K===0&&ne<=ut.bounds.right&&(ft=ut.bounds.x,y.L(kt-2,ft,Yt),y.L(kt-1,ft-$t,Yt))):($t=Math.max(10,this.he[ut.layer]),ke=Math.max(10,this.Ld[ut.layer]),xt=0,this.K===180||this.K===0?((this.K===180?ne<=ut.bounds.x:ne>=ut.bounds.right)&&(xt=(this.K===0?ke:-$t)/2),y.m(kt++,ne+xt,Yt)):((this.K===270?de<=ut.bounds.y:de>=ut.bounds.bottom)&&(xt=(this.K===90?ke:-$t)/2),y.m(kt++,Ot,de+xt)),y.m(kt++,ne,de)))}else{for(;ut!==null&&ut!==ft;){for($t=Gt=null,ut=ut.destinationEdges.iterator;ut.next()&&(Ot=ut.value,Ot.link!==x.link||(Gt=Ot.toVertex,$t=Ot.fromVertex,$t.node!==null&&($t=null),Gt.node!==null)););if(Gt===null)break;Gt!==ft&&(Ot=y.i(kt-1).x,Yt=y.i(kt-1).y,ne=Gt.centerX,de=Gt.centerY,xt?this.K===180||this.K===0?($t!==null?$t.centerY:Yt)!==de&&($t=this.Ta[Gt.layer]+this.Rf.x,kt===y.firstPickIndex+1&&($t=this.K===0?Math.max($t,Ot):Math.min($t,Ot)),y.m(kt++,$t,Yt),y.m(kt++,$t,de)):($t!==null?$t.centerX:Ot)!==ne&&($t=this.Ta[Gt.layer]+this.Rf.y,kt===y.firstPickIndex+1&&($t=this.K===90?Math.max($t,Yt):Math.min($t,Yt)),y.m(kt++,Ot,$t),y.m(kt++,ne,$t)):($t=Math.max(10,this.he[Gt.layer]),ke=Math.max(10,this.Ld[Gt.layer]),vt?this.K===180?(y.m(kt++,ne+ke+Ct,de),y.m(kt++,Math.max(ne+ke-Ct/2,ne),de),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,Math.min(ne-$t+Ct/2,ne),de),y.m(kt++,ne-$t-Ct,de)):this.K===90?(y.m(kt++,ne,de-$t-Ct),y.m(kt++,ne,Math.min(de-$t+Ct/2,de)),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,ne,Math.max(de+ke-Ct/2,de)),y.m(kt++,ne,de+ke+Ct)):this.K===270?(y.m(kt++,ne,de+ke+Ct),y.m(kt++,ne,Math.max(de+ke-Ct/2,de)),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,ne,Math.min(de-$t+Ct/2,de)),y.m(kt++,ne,de-$t-Ct)):(y.m(kt++,ne-$t-Ct,de),y.m(kt++,Math.min(ne-$t+Ct/2,ne),de),y.m(kt++,ne,de),y.m(kt++,ne,de),y.m(kt++,Math.max(ne+ke-Ct/2,ne),de),y.m(kt++,ne+ke+Ct,de)):this.K===180?(y.m(kt++,ne+ke,de),y.m(kt++,ne-$t,de)):this.K===90?(y.m(kt++,ne,de-$t),y.m(kt++,ne,de+ke)):this.K===270?(y.m(kt++,ne,de+ke),y.m(kt++,ne,de-$t)):(y.m(kt++,ne-$t,de),y.m(kt++,ne+ke,de)))),ut=Gt}xt&&(Ot=y.i(kt-1).x,Yt=y.i(kt-1).y,ne=y.i(kt).x,de=y.i(kt).y,this.K===180||this.K===0?Yt!==de&&($t=this.K===0?Math.min(Math.max((ne+Ot)/2,this.Ta[ft.layer]+this.Rf.x),ne):Math.max(Math.min((ne+Ot)/2,this.Ta[ft.layer]+this.Rf.x),ne),y.m(kt++,$t,Yt),y.m(kt++,$t,de)):Ot!==ne&&($t=this.K===90?Math.min(Math.max((de+Yt)/2,this.Ta[ft.layer]+this.Rf.y),de):Math.max(Math.min((de+Yt)/2,this.Ta[ft.layer]+this.Rf.y),de),y.m(kt++,Ot,$t),y.m(kt++,ne,$t)))}E!==null&&vt&&4<=y.pointsCount&&(tt!==null&&(tt=at===Vr?y.getLinkPointFromPoint(b,tt,tt.ga(mo),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(mo),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 un,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 vt=x[ft];(rt?vt.first:vt.jc)!==ot&&(ut++,ot=rt?vt.first:vt.jc);var xt=vt.link;z=xt.i(vt.index),tt=xt.i(vt.index+1);var Ct=this.linkSpacing*(ut-(at-1)/2);y++,xt.uh(),xt.L(vt.index,z.x,z.y+Ct),xt.L(vt.index+1,tt.x,tt.y+Ct),xt.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++)vt=x[ft],(rt?vt.first:vt.jc)!==ot&&(ut++,ot=rt?vt.first:vt.jc),xt=vt.link,z=xt.i(vt.index),tt=xt.i(vt.index+1),Ct=this.linkSpacing*(ut-(at-1)/2),y++,xt.uh(),xt.L(vt.index,z.x+Ct,z.y),xt.L(vt.index+1,tt.x+Ct,tt.y),xt.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)&&ie("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}Wt.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()):ie("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 Ze(nr,"CycleDepthFirst",0),Sy=new Ze(nr,"CycleGreedy",1),Kp=new Ze(nr,"CycleFromLayers",2),N0=new Ze(nr,"LayerOptimalLinkLength",0),xy=new Ze(nr,"LayerLongestPathSink",1),wy=new Ze(nr,"LayerLongestPathSource",2),T0=new Ze(nr,"InitDepthFirstOut",0),Py=new Ze(nr,"InitDepthFirstIn",1),Cy=new Ze(nr,"InitNaive",2),My=new Ze(nr,"AggressiveNone",0),B0=new Ze(nr,"AggressiveLess",1),Ey=new Ze(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)}Ee(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}Ee(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;ie("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},Wt.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}Ee(Zp,Il),Wt.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 nn,this.Wn=R0,this.ud=Uh,this.vo=z0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new En(10,10).freeze();var y=new Ff(this);this.W=new Lu(y),this.Y=new Lu(y),this.ru=[],a&&Object.assign(this,a)}Ee(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:ie("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 Dn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof wn){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 be?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Di?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 be&&(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 nn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Dn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Lu&&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 Lu&&s1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Lu&&a1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Lu&&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 Lu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new nn,this.isValidLayout=!0};function Q1(a){var y=new nn;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:ie("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:ie("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 un,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 un,E=y.sourceVertexes;E.next();)b=E.value,r1(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:ie("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:ie("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=Ke.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Ke.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=jt.alloc(),vt=0;vt<ut;vt++){var xt=at[vt],Ct=xt.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),xt.move(ft),xt=xt.Sd();xt.next();){var kt=xt.value;kt.fromSpot=dr,kt.toSpot=wr}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+rt),xt.move(ft),xt=xt.Sd();xt.next();)kt=xt.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),xt.move(ft),xt=xt.Sd();xt.next();)kt=xt.value,kt.fromSpot=wr,kt.toSpot=dr;else for(ft.h(a.bounds.x+a.commentMargin-Ct.width,a.bounds.y+rt),xt.move(ft),xt=xt.Sd();xt.next();)kt=xt.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),xt.move(ft),xt=xt.Sd();xt.next();)kt=xt.value,kt.fromSpot=ao,kt.toSpot=Lr;else for(ft.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y-a.commentMargin),xt.move(ft),xt=xt.Sd();xt.next();)kt=xt.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),xt.move(ft),xt=xt.Sd();xt.next();)kt=xt.value,kt.fromSpot=Lr,kt.toSpot=ao;else for(ft.h(a.bounds.x+rt,a.bounds.y+a.commentMargin-Ct.height),xt.move(ft),xt=xt.Sd();xt.next();)kt=xt.value,kt.fromSpot=ao,kt.toSpot=Lr;rt=0<=a.commentSpacing?rt+(Ct.width+a.commentSpacing):rt+(a.commentSpacing-Ct.width)}}if(jt.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=Uu(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 vt=a.nodeSpacing,xt=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 Gt=a.height,Ot=0,Yt=0,$t=0,ne=null,de=null,ke=0,An=0,Yn=0,Wn=0,Sn=0,tn=0,Fi=0,Ei=0;if(ut&&!Up(rt)&&135<b&&tt.reverse(),Up(rt))if(1<ot)for(var Wo=0;Wo<ot;Wo++)Wo%2===0&&Wo!==ot-1&&(Ei=Math.max(Ei,y?tt[Wo].Da.width:tt[Wo].Da.height));else ot===1&&(Ei=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(rt){case Od:Yt=135>b?h1(this,a,tt,Ei,Ot,Yt):d1(this,a,tt,Ei,Ot,Yt),Ei=Yt.x,Ot=Yt.width,Yt=Yt.height;break;case Rd:for(ne=0;ne<ot;ne++)de=tt[ne],ft=de.Da,$t=tn===0?0:Ct,y?(de.S.h(z-ft.width,Wn+$t),Ot=Math.max(Ot,ft.width),Yt=Math.max(Yt,Wn+$t+ft.height),Wn+=$t+ft.height):(de.S.h(Yn+$t,z-ft.height),Ot=Math.max(Ot,Yn+$t+ft.width),Yt=Math.max(Yt,ft.height),Yn+=$t+ft.width),tn++;break;case dd:for(ne=0;ne<ot;ne++)de=tt[ne],z=de.Da,ft=tn===0?0:Ct,y?(de.S.h(vt/2+a.focus.x,Wn+ft),Ot=Math.max(Ot,z.width),Yt=Math.max(Yt,Wn+ft+z.height),Wn+=ft+z.height):(de.S.h(Yn+ft,vt/2+a.focus.y),Ot=Math.max(Ot,Yn+ft+z.width),Yt=Math.max(Yt,z.height),Yn+=ft+z.width),tn++}ne=Cl(this,2),de=Cl(this,2),y?(ne[0].h(0,0),ne[1].h(0,Yt),de[0].h(Ot,0)):(ne[0].h(0,0),ne[1].h(Ot,0),de[0].h(0,Yt)),de[1].h(Ot,Yt)}else for(Wo=0;Wo<ot;Wo++){var gr=tt[Wo],qs=gr.Da;if(y){0<ft&&0<tn&&Yn+vt+qs.width>ft&&(Yn<z&&_c(a,rt,z-Yn,0,Fi,Wo-1),Sn++,tn=0,Fi=Wo,$t=Yt,Yn=0,Wn=135<b?-Yt-Ct:Yt+Ct),D0(this,gr,0,Wn);var na=0;if(tn===0)ne=gr.Yo,de=gr.kp,ke=qs.width,An=qs.height,(ne===null||de===null||b!==Uu(gr))&&(ne=Cl(this,2),de=Cl(this,2),ne[0].h(0,0),ne[1].h(0,An),de[0].h(ke,0),de[1].h(ke,An));else{var Ha=Hn();An=c1(this,a,gr,ne,de,ke,An,Ha),na=An.x,ne=Ha[0],de=Ha[1],ke=An.width,An=An.height,ti(Ha),Yn<qs.width&&0>na&&(Nf(a,-na,0,Fi,Wo-1),O0(ne,-na,0),O0(de,-na,0),na=0)}gr.S.h(na,Wn),Ot=Math.max(Ot,ke),Yt=Math.max(Yt,$t+(Sn===0?0:Ct)+qs.height),Yn=ke}else 0<ft&&0<tn&&Wn+vt+qs.height>ft&&(Wn<z&&_c(a,rt,0,z-Wn,Fi,Wo-1),Sn++,tn=0,Fi=Wo,$t=Ot,Wn=0,Yn=135<b?-Ot-Ct:Ot+Ct),D0(this,gr,Yn,0),na=0,tn===0?(ne=gr.Yo,de=gr.kp,ke=qs.width,An=qs.height,(ne===null||de===null||b!==Uu(gr))&&(ne=Cl(this,2),de=Cl(this,2),ne[0].h(0,0),ne[1].h(ke,0),de[0].h(0,An),de[1].h(ke,An))):(Ha=Hn(),An=c1(this,a,gr,ne,de,ke,An,Ha),na=An.x,ne=Ha[0],de=Ha[1],ke=An.width,An=An.height,ti(Ha),Wn<qs.height&&0>na&&(Nf(a,0,-na,Fi,Wo-1),O0(ne,0,-na),O0(de,0,-na),na=0)),gr.S.h(Yn,na),Yt=Math.max(Yt,An),Ot=Math.max(Ot,$t+(Sn===0?0:Ct)+qs.width),Wn=An;tn++}switch(0<Sn&&(y?(Yt+=Math.max(0,x),Yn<Ot&&_c(a,rt,Ot-Yn,0,Fi,ot-1),0<kt&&(at||Nf(a,kt,0,0,ot-1),Ot+=kt)):(Ot+=Math.max(0,x),Wn<Yt&&_c(a,rt,0,Yt-Wn,Fi,ot-1),0<kt&&(at||Nf(a,0,kt,0,ot-1),Yt+=kt))),kt=at=0,rt){case Bg:y?at+=Ot/2-a.focus.x-xt/2:kt+=Yt/2-a.focus.y-xt/2;break;case Bf:0<Sn?y?at+=Ot/2-a.focus.x-xt/2:kt+=Yt/2-a.focus.y-xt/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-xt/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-xt/2);break;case Vh:y?(at-=xt,Ot+=xt):(kt-=xt,Yt+=xt);break;case Yh:y?(at+=Ot-a.width+xt,Ot+=xt):(kt+=Yt-a.height+xt,Yt+=xt);break;case Od:y?1<ot?at+=Ei+vt/2-a.focus.x:at+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<ot?kt+=Ei+vt/2-a.focus.y:kt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Rd:y?at+=Ot+vt/2-a.focus.x:kt+=Yt+vt/2-a.focus.y;break;case dd:break;default:Yt=this.customAlignment(a,at,kt,Ot,Yt),at=Yt[0],kt=Yt[1],Ot=Yt[2],Yt=Yt[3]}for(xt=0;xt<ot;xt++)Ei=tt[xt],y?Ei.S.h(Ei.S.x+Ei.la.x-at,Ei.S.y+(135<b?(ut?-Yt:-Ei.Da.height)+Ei.la.y-x:Gt+x+Ei.la.y)):Ei.S.h(Ei.S.x+(135<b?(ut?-Ot:-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?(Ot=Ay(a,Ot,at),0>at&&(at=0),135<b&&(kt+=Yt+x),Yt+=Gt+x,rt===dd&&(tt+=vt/2+a.focus.x),ot+=Gt+x):(135<b&&(at+=Ot+x),Ot+=E+x,Yt=Ny(a,Yt,kt),0>kt&&(kt=0),rt===dd&&(ot+=vt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Ot&&(Ot=Ty(rt,E-Ot,0),tt=Ot.x,ot=Ot.y,Ot=E,at=0):Ot=Ay(a,Ot,at),0>at&&(tt-=at,at=0),135<b&&(kt+=Yt+x),Yt=Math.max(Math.max(Yt,Gt),Yt+Gt+x),ot+=Gt+x):(135<b&&(at+=Ot+x),Ot=Math.max(Math.max(Ot,E),Ot+E+x),a.comments===null?Gt>Yt&&(Yt=Ty(rt,0,Gt-Yt),tt=Yt.x,ot=Yt.y,Yt=Gt,kt=0):Yt=Ny(a,Yt,kt),0>kt&&(ot-=kt,kt=0),tt+=E+x),0<Sn)b=Cl(this,4),Sn=Cl(this,4),y?(b[2].h(0,Gt+x),b[3].h(b[2].x,Yt),Sn[2].h(Ot,b[2].y),Sn[3].h(Sn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Ot,b[2].y),Sn[2].h(b[2].x,Yt),Sn[3].h(b[3].x,Sn[2].y));else{for(b=Cl(this,ne.length+2),Sn=Cl(this,de.length+2),rt=0;rt<ne.length;rt++)ut=ne[rt],b[rt+2].h(ut.x+tt,ut.y+ot);for(rt=0;rt<de.length;rt++)ut=de[rt],Sn[rt+2].h(ut.x+tt,ut.y+ot)}y?(b[0].h(at,0),b[1].h(b[0].x,Gt),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])),Sn[0].h(at+E,0),Sn[1].h(Sn[0].x,Gt),Sn[2].y<Sn[1].y&&(Sn[2].x<Sn[0].x?Sn[2].assign(Sn[1]):Sn[1].assign(Sn[2])),Sn[3].y<Sn[2].y&&(Sn[3].x<Sn[0].x?Sn[3].assign(Sn[2]):Sn[2].assign(Sn[3])),b[2].y-=x/2,Sn[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])),Sn[0].h(0,kt+Gt),Sn[1].h(E,Sn[0].y),Sn[2].x<Sn[1].x&&(Sn[2].y<Sn[0].y?Sn[2].assign(Sn[1]):Sn[1].assign(Sn[2])),Sn[3].x<Sn[2].x&&(Sn[3].y<Sn[0].y?Sn[3].assign(Sn[2]):Sn[2].assign(Sn[3])),b[2].x-=x/2,Sn[2].x-=x/2),rh(this,ne),rh(this,de),a.Yo=b,a.kp=Sn,a.la.h(at,kt),a.Da.h(Ot,Yt)}break;default:ie("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=Uu(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 vt=Math.max(0,y.breadthLimit);rt=a.computeLayerSpacing(y);var xt=y.nodeSpacing,Ct=a.computeNodeIndent(y),kt=ut||ft?0:Ct/2,Gt=y.rowSpacing,Ot=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Ot=Math.max(0,y.rowIndent)),ut=y.width;var Yt=y.height,$t=0,ne=0,de=0,ke=0,An=0,Yn=0,Wn=0,Sn=0,tn=0,Fi=0;if(ot&&!Up(at)&&135<E&&b.reverse(),Up(at))if(1<tt)for(var Ei=0;Ei<tt;Ei++){var Wo=b[Ei],gr=Wo.Da;Ei%2===0&&Ei!==tt-1?tn=Math.max(tn,(x?gr.width:gr.height)+a.computeBusNodeSpacing(Wo)-xt):Ei%2!==0&&(Fi=Math.max(Fi,(x?gr.width:gr.height)+a.computeBusNodeSpacing(Wo)-xt))}else tt===1&&(tn=x?b[0].Da.width:b[0].Da.height);if(ot)switch(at){case Od:case Xh:ne=135>E?h1(a,y,b,tn,$t,ne):d1(a,y,b,tn,$t,ne),tn=ne.x,$t=ne.width,ne=ne.height;break;case Rd:for(vt=0;vt<tt;vt++)kt=b[vt],de=kt.Da,Fi=Wn===0?0:Gt,x?(kt.S.h(z-de.width,An+Fi),$t=Math.max($t,de.width),ne=Math.max(ne,An+Fi+de.height),An+=Fi+de.height):(kt.S.h(ke+Fi,z-de.height),$t=Math.max($t,ke+Fi+de.width),ne=Math.max(ne,de.height),ke+=Fi+de.width),Wn++;break;case dd:for(z=0;z<tt;z++)vt=b[z],kt=vt.Da,de=Wn===0?0:Gt,x?(vt.S.h(xt/2+y.focus.x,An+de),$t=Math.max($t,kt.width),ne=Math.max(ne,An+de+kt.height),An+=de+kt.height):(vt.S.h(ke+de,xt/2+y.focus.y),$t=Math.max($t,ke+de+kt.width),ne=Math.max(ne,kt.height),ke+=de+kt.width),Wn++}else for(Fi=0;Fi<tt;Fi++)Ei=b[Fi],Wo=Ei.Da,x?(0<vt&&0<Wn&&ke+xt+Wo.width>vt&&(ke<z&&_c(y,at,z-ke,0,Sn,Fi-1),Yn++,Wn=0,Sn=Fi,de=ne,ke=0,An=135<E?-ne-Gt:ne+Gt),gr=Wn===0?kt:xt,D0(a,Ei,0,An),Ei.S.h(ke+gr,An),$t=Math.max($t,ke+gr+Wo.width),ne=Math.max(ne,de+(Yn===0?0:Gt)+Wo.height),ke+=gr+Wo.width):(0<vt&&0<Wn&&An+xt+Wo.height>vt&&(An<z&&_c(y,at,0,z-An,Sn,Fi-1),Yn++,Wn=0,Sn=Fi,de=$t,An=0,ke=135<E?-$t-Gt:$t+Gt),gr=Wn===0?kt:xt,D0(a,Ei,ke,0),Ei.S.h(ke,An+gr),ne=Math.max(ne,An+gr+Wo.height),$t=Math.max($t,de+(Yn===0?0:Gt)+Wo.width),An+=gr+Wo.height),Wn++;switch(0<Yn&&(x?(ne+=Math.max(0,rt),ke<$t&&_c(y,at,$t-ke,0,Sn,tt-1),0<Ot&&(ft||Nf(y,Ot,0,0,tt-1),$t+=Ot)):($t+=Math.max(0,rt),An<ne&&_c(y,at,0,ne-An,Sn,tt-1),0<Ot&&(ft||Nf(y,0,Ot,0,tt-1),ne+=Ot))),Ot=ft=0,at){case Bg:x?ft+=$t/2-y.focus.x-Ct/2:Ot+=ne/2-y.focus.y-Ct/2;break;case Bf:0<Yn?x?ft+=$t/2-y.focus.x-Ct/2:Ot+=ne/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,Ot+=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):(Ot-=Ct,ne+=Ct);break;case Yh:x?(ft+=$t-y.width+Ct,$t+=Ct):(Ot+=ne-y.height+Ct,ne+=Ct);break;case Od:case Xh:x?1<tt?ft+=tn+xt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Ot+=tn+xt/2-y.focus.y:Ot+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Rd:x?ft+=$t+xt/2-y.focus.x:Ot+=ne+xt/2-y.focus.y;break;case dd:break;default:a=a.customAlignment(y,ft,Ot,$t,ne),ft=a[0],Ot=a[1],$t=a[2],ne=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?-ne:-Ct.Da.height)+Ct.la.y-rt:Yt+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-Ot);x?($t=Ay(y,$t,ft),0>ft&&(ft=0),135<E&&(Ot+=ne+rt),ne=Math.max(Math.max(ne,Yt),ne+Yt+rt)):(135<E&&(ft+=$t+rt),$t=Math.max(Math.max($t,ut),$t+ut+rt),ne=Ny(y,ne,Ot),0>Ot&&(Ot=0)),y.la.h(ft,Ot),y.Da.h($t,ne)}}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 Ke(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Ke(E,0,b,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,at=Uu(y)===90,ut=0,ft=0,vt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Ct=x[xt],kt=Ct.Da,Gt=ut===0?0:rt;if(at){var Ot=a.computeBusNodeSpacing(Ct)-ot;Ct.S.h(E-(kt.width+Ot),vt+Gt),b=Math.max(b,kt.width+Ot),z=Math.max(z,vt+Gt+kt.height),vt+=Gt+kt.height}else Ot=a.computeBusNodeSpacing(Ct)-ot,Ct.S.h(ft+Gt,E-(kt.height+Ot)),z=Math.max(z,kt.height+Ot),b=Math.max(b,ft+Gt+kt.width),ft+=Gt+kt.width;ut++}for(ut=0,Ct=ft,xt=vt,at?(ft=E+ot,vt=0):(ft=0,vt=E+ot),kt=0;kt<tt;kt++)if(kt%2!==0){Gt=x[kt],Ot=Gt.Da;var Yt=ut===0?0:rt;if(at){var $t=a.computeBusNodeSpacing(Gt)-ot;Gt.S.h(ft+$t,vt+Yt),b=Math.max(b,ft+Ot.width+$t),z=Math.max(z,vt+Yt+Ot.height),vt+=Yt+Ot.height}else $t=a.computeBusNodeSpacing(Gt)-ot,Gt.S.h(ft+Yt,vt+$t),b=Math.max(b,ft+Yt+Ot.width),z=Math.max(z,vt+Ot.height+$t),ft+=Yt+Ot.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,at?Math.max(Math.abs(xt),Math.abs(vt)):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(xt,vt)+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),vt=E+ot/2-x.focus.y-x.la.y,z=Math.max(z,vt+tt.height),0>vt&&(z-=vt),0>x.S.y&&(E=I0(y,x.S.y,!0,E,ot)))),new Ke(E,0,b,z)}function d1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ke(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Ke(E,0,b,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,at=Uu(y)===270,ut=0,ft=0,vt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Ct=x[xt],kt=Ct.Da,Gt=ut===0?0:rt;if(at){var Ot=a.computeBusNodeSpacing(Ct)-ot;vt-=Gt+kt.height,Ct.S.h(E-(kt.width+Ot),vt),b=Math.max(b,kt.width+Ot),z=Math.max(z,Math.abs(vt))}else Ot=a.computeBusNodeSpacing(Ct)-ot,ft-=Gt+kt.width,Ct.S.h(ft,E-(kt.height+Ot)),z=Math.max(z,kt.height+Ot),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,Ct=ft,xt=vt,at?(ft=E+ot,vt=0):(ft=0,vt=E+ot),kt=0;kt<tt;kt++)if(kt%2!==0){Gt=x[kt],Ot=Gt.Da;var Yt=ut===0?0:rt;if(at){var $t=a.computeBusNodeSpacing(Gt)-ot;vt-=Yt+Ot.height,Gt.S.h(ft+$t,vt),b=Math.max(b,ft+Ot.width+$t),z=Math.max(z,Math.abs(vt))}else $t=a.computeBusNodeSpacing(Gt)-ot,ft-=Yt+Ot.width,Gt.S.h(ft,vt+$t),z=Math.max(z,vt+Ot.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(xt),Math.abs(vt)):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(xt,vt))+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),vt=E+ot/2-rt.focus.y-rt.la.y,z=Math.max(z,vt+ut.height),0>vt&&(z-=vt),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 Ke(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:ie("Unhandled alignment value "+a.toString())}return new jt(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:ie("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=Uu(y),at=rt===90||rt===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var vt=tt,xt=x.Yo,Ct=x.kp;tt=x.Da;var kt=at?Math.max(vt,tt.height):Math.max(E,tt.width);if((xt===null||rt!==Uu(x))&&(xt=Cl(a,2),Ct=Cl(a,2),at?(xt[0].h(0,0),xt[1].h(0,tt.height),Ct[0].h(tt.width,0),Ct[1].h(Ct[0].x,xt[1].y)):(xt[0].h(0,0),xt[1].h(tt.width,0),Ct[0].h(0,tt.height),Ct[1].h(xt[1].x,Ct[0].y))),at){if(vt=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;){z=ft[x];var Gt=xt[b];rt=Gt.x,at=Gt.y,rt+=E;var Ot=z;x+1<ft.length&&(Ot=ft[x+1]);var Yt=Gt;Gt=Yt.x,Yt=Yt.y,b+1<xt.length&&(Yt=xt[b+1],Gt=Yt.x,Yt=Yt.y,Gt+=E);var $t=vt;z.y===at?$t=rt-z.x:z.y>at&&z.y<Yt?$t=rt+(z.y-at)/(Yt-at)*(Gt-rt)-z.x:at>z.y&&at<Ot.y&&($t=rt-(z.x+(at-z.y)/(Ot.y-z.y)*(Ot.x-z.x))),$t<vt&&(vt=$t),Ot.y<=z.y?x++:Yt<=at?b++:(Ot.y<=Yt&&x++,Yt<=Ot.y&&b++)}if(vt=E-vt,vt+=ut,x=xt,b=vt,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]);rh(a,ut),E=x}if(z=Ct,rt=vt,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;)Ot=ft[x++],ut[b++].h(Ot.x,Ot.y);for(;at<z.length;)Ot=z[at++],ut[b++].h(Ot.x+rt,Ot.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]);rh(a,ut),b=z}return z=Math.max(0,vt)+tt.width,tt=kt,rh(a,y),rh(a,xt),rh(a,ft),rh(a,Ct),ot[0]=E,ot[1]=b,new Ke(vt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;)z=ft[x],Gt=xt[b],rt=Gt.x,at=Gt.y,at+=vt,Ot=z,x+1<ft.length&&(Ot=ft[x+1]),Yt=Gt,Gt=Yt.x,Yt=Yt.y,b+1<xt.length&&(Yt=xt[b+1],Gt=Yt.x,Yt=Yt.y,Yt+=vt),$t=E,z.x===rt?$t=at-z.y:z.x>rt&&z.x<Gt?$t=at+(z.x-rt)/(Gt-rt)*(Yt-at)-z.y:rt>z.x&&rt<Ot.x&&($t=at-(z.y+(rt-z.x)/(Ot.x-z.x)*(Ot.y-z.y))),$t<E&&(E=$t),Ot.x<=z.x?x++:Gt<=rt?b++:(Ot.x<=Gt&&x++,Gt<=Ot.x&&b++);if(vt-=E,vt+=ut,x=xt,b=vt,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]);rh(a,ut),E=x}if(z=Ct,rt=vt,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;)Ot=ft[x++],ut[b++].h(Ot.x,Ot.y);for(;at<z.length;)Ot=z[at++],ut[b++].h(Ot.x,Ot.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]);rh(a,ut),b=z}return z=kt,tt=Math.max(0,vt)+tt.height,rh(a,y),rh(a,xt),rh(a,ft),rh(a,Ct),ot[0]=E,ot[1]=b,new Ke(vt,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 jt;return a}function rh(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 Lu){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 Lu&&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:ie("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:ie("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 jt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new jt(-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 Ke(0,z,x,ot))):this.angle===90?(b.push(new Ke(0,z,x,ot)),z+=ot):this.angle===180?(z-=ot,b.push(new Ke(z,0,ot,x))):(b.push(new Ke(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 Lu&&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=Uu(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=Uu(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 Uu(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=Uu(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=Uu(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)},Wt.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()):ie("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 Ze(oo,"PathDefault",-1),Uh=new Ze(oo,"PathDestination",0),Tf=new Ze(oo,"PathSource",1),Tg=new Ze(oo,"SortingForwards",10),Vp=new Ze(oo,"SortingReverse",11),Yp=new Ze(oo,"SortingAscending",12),Xp=new Ze(oo,"SortingDescending",13),Bg=new Ze(oo,"AlignmentCenterSubtrees",20),Bf=new Ze(oo,"AlignmentCenterChildren",21),Vh=new Ze(oo,"AlignmentStart",22),Yh=new Ze(oo,"AlignmentEnd",23),Od=new Ze(oo,"AlignmentBus",24),Xh=new Ze(oo,"AlignmentBusBranching",25),Rd=new Ze(oo,"AlignmentTopLeftBus",26),dd=new Ze(oo,"AlignmentBottomRightBus",27),j0=new Ze(oo,"CompactionNone",30),Qp=new Ze(oo,"CompactionBlock",31),z0=new Ze(oo,"StyleLayered",40),Fy=new Ze(oo,"StyleLastParents",41),Iy=new Ze(oo,"StyleAlternating",42),Dy=new Ze(oo,"StyleRootOnly",43),H0=new Ze(oo,"ArrangementVertical",50),Oy=new Ze(oo,"ArrangementHorizontal",51),G0=new Ze(oo,"ArrangementFixedRoots",52),Ry=new Ze(oo,"LayerIndividual",60),jy=new Ze(oo,"LayerSiblings",61),W0=new Ze(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)}Ee(Ff,Sr),Ff.prototype.createVertex=function(){return new Lu(this)},Ff.prototype.createEdge=function(){return new Fg(this)},Ff.className="TreeNetwork";function Lu(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 jt(0,0),this.Da=new En(0,0),this.la=new jt(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=$e,this.wr=!0,this.Dp=$e}Ee(Lu,Vs),Lu.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},Wt.Object.defineProperties(Lu.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)}}}),Lu.className="TreeVertex";function Fg(a){Il.call(this,a),this.$t=new jt(0,0)}Ee(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:ie("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=Uu(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),vt=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),vt=a.i(a.pointsCount-1)}var xt=a.i(a.pointsCount-1);z===0?(x.alignment===Yh?(z=E.bottom+b.y,b.y===0&&ft.y>xt.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<xt.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,vt.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,vt.y))):z===90?(x.alignment===Yh?(z=E.right+b.x,b.x===0&&ft.x>xt.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<xt.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,vt.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,vt.x,a.i(ut-1).y))):z===180?(x.alignment===Yh?(z=E.bottom+b.y,b.y===0&&ft.y>xt.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<xt.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,vt.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,vt.y))):z===270?(x.alignment===Yh?(z=E.right+b.x,b.x===0&&ft.x>xt.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<xt.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,vt.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,vt.x,a.i(ut-1).y))):ie("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=Uu(x),y!==Uu(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()))}}},Wt.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 oi,this.mouseDownTools),this.gb("LinkReshaping",new ai,this.mouseDownTools),this.gb("Rotating",new po,this.mouseDownTools),this.gb("Resizing",new Ri,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 Ko,this.mouseUpTools),this.gb("TextEditing",new No,this.mouseUpTools),this.gb("ClickCreating",new io,this.mouseUpTools),this.gb("ClickSelecting",new or,this.mouseUpTools)},wh("Horizontal",new vm),wh("Spot",new Sm),wh("Table",new wm),wh("Viewbox",new Mm),wh("TableRow",new Pm),wh("TableColumn",new Cm),wh("Graduated",new dp),wh("Grid",new hp),ng.add("GraphLinksModel",ea),ng.add("TreeModel",cu);var K0=qt.go,zy={get licenseKey(){return be.licenseKey},set licenseKey(a){be.licenseKey=a},get version(){return be.version},Group:Di,EnumValue:Ze,List:un,Set:nn,Map:_n,Point:jt,Size:En,Rect:Ke,Margin:hi,Spot:ii,Geometry:Pn,PathFigure:Ks,PathSegment:To,InputEvent:Ma,DiagramEvent:$h,ChangedEvent:Dr,Model:ri,GraphLinksModel:Co,TreeModel:tl,Binding:Ls,Transaction:Xs,UndoManager:Gr,CommandHandler:Ht,Tool:Ao,DraggingTool:Wr,DraggingInfo:rd,DraggingOptions:st,LinkingBaseTool:Ne,LinkingTool:Rn,RelinkingTool:oi,LinkReshapingTool:ai,ResizingTool:Ri,RotatingTool:po,ClickSelectingTool:or,ActionTool:Zi,ClickCreatingTool:io,HTMLInfo:to,ContextMenuTool:Ko,DragSelectingTool:Wi,PanningTool:xi,TextEditingTool:No,ToolManager:Ar,Animation:$r,AnimationManager:Jr,AnimationTrigger:Tl,Layer:Rr,Diagram:be,Palette:ct,Overview:pt,Brush:tr,GraphObject:ce,Panel:fn,RowColumnDefinition:Hs,Shape:Yi,TextBlock:yr,Picture:dl,Part:ci,Adornment:Fo,Node:Dn,Link:wn,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:Lu,TreeEdge:Fg};typeof K0=="object"&&K0.version&&$n("WARNING: a `go` object on the root object is already defined. "+("Debug"in K0?"debug ":"")+"version: "+K0.version+", replaced with version: "+zy.version),be.prototype.go=zy,qt.go=zy,typeof dn.exports=="object"&&(dn.exports=typeof bt.g!="undefined"?bt.g.go:self.go)}();var wt=typeof bt.g!="undefined"?bt.g.go:self.go;const ee=typeof bt.g!="undefined"?bt.g.go:self.go,he=ee.Group,Ie=ee.EnumValue,te=ee.List,Pe=ee.Set,Nt=ee.Map,Le=ee.Point,ve=ee.Size,Xt=ee.Rect,fe=ee.Margin,xe=ee.Spot,je=ee.Geometry,Bt=ee.PathFigure,et=ee.PathSegment,nt=ee.InputEvent,ht=ee.DiagramEvent,lt=ee.ChangedEvent,gt=ee.Model,yt=ee.GraphLinksModel,Pt=ee.TreeModel,Tt=ee.Binding,It=ee.Transaction,zt=ee.UndoManager,_t=ee.CommandHandler,se=ee.Tool,Jt=ee.DraggingTool,le=ee.DraggingInfo,Zt=ee.LinkingBaseTool,Fe=ee.LinkingTool,me=ee.RelinkingTool,Ve=ee.LinkReshapingTool,Qe=ee.ResizingTool,qe=ee.RotatingTool,vn=ee.ClickSelectingTool,xn=ee.ActionTool,Se=ee.ClickCreatingTool,Vt=ee.HTMLInfo,Xe=ee.ContextMenuTool,Xn=ee.DragSelectingTool,Bn=ee.PanningTool,Ae=ee.TextEditingTool,hn=ee.ToolManager,bn=ee.Animation,Jn=ee.AnimationManager,mn=ee.AnimationTrigger,ui=ee.Layer,Ce=ee.Diagram,ni=ee.Palette,Pi=ee.Overview,gn=ee.Brush,Tn=ee.GraphObject,pn=ee.Panel,Un=ee.RowColumnDefinition,On=ee.Shape,we=ee.TextBlock,In=ee.TextBlockMetrics,rn=ee.Picture,ge=ee.Part,oe=ee.Adornment,Ft=ee.Node,St=ee.Link,mt=ee.Placeholder,At=ee.Layout,Rt=ee.LayoutNetwork,Lt=ee.LayoutVertex,ae=ee.LayoutEdge,De=ee.GridLayout,Oe=ee.PanelLayout,Be=ee.CircularLayout,yn=ee.CircularNetwork,Gn=ee.CircularVertex,Kn=ee.CircularEdge,Vn=ee.ForceDirectedLayout,gi=ee.ForceDirectedNetwork,Ti=ee.ForceDirectedVertex,Xi=ee.ForceDirectedEdge,Mo=ee.LayeredDigraphLayout,Io=ee.LayeredDigraphNetwork,Oo=ee.LayeredDigraphVertex,co=ee.LayeredDigraphEdge,Do=ee.TreeLayout,Qo=ee.TreeNetwork,Ai=ee.TreeVertex,$o=ee.TreeEdge,jo=ee.version},17115:function(dn,Mn,bt){"use strict";bt.d(Mn,{ZP:function(){return Nt}});var wt=bt(52487),ee=bt(59301),he=bt(47273),Ie=0,te=(0,he.Z)();function Pe(){var Le;return te?(Le=Ie,Ie+=1):Le="TEST_OR_SSR",Le}function Nt(Le){var ve=ee.useState(),Xt=(0,wt.Z)(ve,2),fe=Xt[0],xe=Xt[1];return ee.useEffect(function(){xe("rc_select_".concat(Pe()))},[]),Le||fe}},77861:function(dn,Mn,bt){"use strict";bt.d(Mn,{Ac:function(){return At},Xo:function(){return Xi},Wx:function(){return Io},ZP:function(){return Ue},lk:function(){return Pt}});var wt=bt(72308),ee=bt(80702),he=bt(49618),Ie=bt(77321),te=bt(52487),Pe=bt(74416),Nt=bt(62853),Le=bt(18929),ve=bt(48736),Xt=bt(59301),fe=bt(92310),xe=bt.n(fe),je=bt(34280),Bt=bt(49658),et=bt(10228),nt=bt(8654),ht=function(qt){var ze=qt.className,sn=qt.customizeIcon,Ln=qt.customizeIconProps,Nn=qt.onMouseDown,ie=qt.onClick,Je=qt.children,Cn;return typeof sn=="function"?Cn=sn(Ln):Cn=sn,Xt.createElement("span",{className:ze,onMouseDown:function(We){We.preventDefault(),Nn&&Nn(We)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ie,"aria-hidden":!0},Cn!==void 0?Cn:Xt.createElement("span",{className:xe()(ze.split(/\s+/).map(function($n){return"".concat($n,"-icon")}))},Je))},lt=ht;function gt(ue,qt,ze,sn,Ln){var Nn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ie=arguments.length>6?arguments[6]:void 0,Je=arguments.length>7?arguments[7]:void 0,Cn=Xt.useMemo(function(){if((0,Nt.Z)(sn)==="object")return sn.clearIcon;if(Ln)return Ln},[sn,Ln]),$n=Xt.useMemo(function(){return!!(!Nn&&sn&&(ze.length||ie)&&!(Je==="combobox"&&ie===""))},[sn,Nn,ze.length,ie,Je]);return{allowClear:$n,clearIcon:Xt.createElement(lt,{className:"".concat(ue,"-clear"),onMouseDown:qt,customizeIcon:Cn},"\xD7")}}var yt=Xt.createContext(null);function Pt(){return Xt.useContext(yt)}function Tt(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,qt=Xt.useState(!1),ze=(0,te.Z)(qt,2),sn=ze[0],Ln=ze[1],Nn=Xt.useRef(null),ie=function(){window.clearTimeout(Nn.current)};Xt.useEffect(function(){return ie},[]);var Je=function($n,We){ie(),Nn.current=window.setTimeout(function(){Ln($n),We&&We()},ue)};return[sn,Je,ie]}function It(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,qt=Xt.useRef(null),ze=Xt.useRef(null);Xt.useEffect(function(){return function(){window.clearTimeout(ze.current)}},[]);function sn(Ln){(Ln||qt.current===null)&&(qt.current=Ln),window.clearTimeout(ze.current),ze.current=window.setTimeout(function(){qt.current=null},ue)}return[function(){return qt.current},sn]}function zt(ue,qt,ze,sn){var Ln=Xt.useRef(null);Ln.current={open:qt,triggerOpen:ze,customizedTrigger:sn},Xt.useEffect(function(){function Nn(ie){var Je;if(!((Je=Ln.current)!==null&&Je!==void 0&&Je.customizedTrigger)){var Cn=ie.target;Cn.shadowRoot&&ie.composed&&(Cn=ie.composedPath()[0]||Cn),Ln.current.open&&ue().filter(function($n){return $n}).every(function($n){return!$n.contains(Cn)&&$n!==Cn})&&Ln.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Nn),function(){return window.removeEventListener("mousedown",Nn)}},[])}var _t=bt(26112),se=bt(11780),Jt=function(qt,ze){var sn,Ln,Nn=qt.prefixCls,ie=qt.id,Je=qt.inputElement,Cn=qt.disabled,$n=qt.tabIndex,We=qt.autoFocus,Ye=qt.autoComplete,zn=qt.editable,Zn=qt.activeDescendantId,fi=qt.value,Hn=qt.maxLength,ti=qt.onKeyDown,Qn=qt.onMouseDown,wi=qt.onChange,Qi=qt.onPaste,qi=qt.onCompositionStart,_e=qt.onCompositionEnd,lo=qt.open,Eo=qt.attrs,zo=Je||Xt.createElement("input",null),Ze=zo,jn=Ze.ref,ei=Ze.props,Mi=ei.onKeyDown,vi=ei.onChange,mi=ei.onMouseDown,Ui=ei.onCompositionStart,ki=ei.onCompositionEnd,Hi=ei.style;return(0,ve.Kp)(!("maxLength"in zo.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),zo=Xt.cloneElement(zo,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({type:"search"},ei),{},{id:ie,ref:(0,nt.sQ)(ze,jn),disabled:Cn,tabIndex:$n,autoComplete:Ye||"off",autoFocus:We,className:xe()("".concat(Nn,"-selection-search-input"),(sn=zo)===null||sn===void 0||(Ln=sn.props)===null||Ln===void 0?void 0:Ln.className),role:"combobox","aria-label":"Search","aria-expanded":lo||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ie,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ie,"_list"),"aria-activedescendant":lo?Zn:void 0},Eo),{},{value:zn?fi:"",maxLength:Hn,readOnly:!zn,unselectable:zn?null:"on",style:(0,Ie.Z)((0,Ie.Z)({},Hi),{},{opacity:zn?null:0}),onKeyDown:function(un){ti(un),Mi&&Mi(un)},onMouseDown:function(un){Qn(un),mi&&mi(un)},onChange:function(un){wi(un),vi&&vi(un)},onCompositionStart:function(un){qi(un),Ui&&Ui(un)},onCompositionEnd:function(un){_e(un),ki&&ki(un)},onPaste:Qi})),zo},le=Xt.forwardRef(Jt);le.displayName="Input";var Zt=le;function Fe(ue){return Array.isArray(ue)?ue:ue!==void 0?[ue]:[]}var me=typeof window!="undefined"&&window.document&&window.document.documentElement,Ve=me;function Qe(ue){return ue!=null}function qe(ue){return!ue&&ue!==0}function vn(ue){return["string","number"].includes((0,Nt.Z)(ue))}function xn(ue){var qt=void 0;return ue&&(vn(ue.title)?qt=ue.title.toString():vn(ue.label)&&(qt=ue.label.toString())),qt}function Se(ue,qt){Ve?Xt.useLayoutEffect(ue,qt):Xt.useEffect(ue,qt)}function Vt(ue){var qt;return(qt=ue.key)!==null&&qt!==void 0?qt:ue.value}var Xe=function(qt){qt.preventDefault(),qt.stopPropagation()},Xn=function(qt){var ze=qt.id,sn=qt.prefixCls,Ln=qt.values,Nn=qt.open,ie=qt.searchValue,Je=qt.autoClearSearchValue,Cn=qt.inputRef,$n=qt.placeholder,We=qt.disabled,Ye=qt.mode,zn=qt.showSearch,Zn=qt.autoFocus,fi=qt.autoComplete,Hn=qt.activeDescendantId,ti=qt.tabIndex,Qn=qt.removeIcon,wi=qt.maxTagCount,Qi=qt.maxTagTextLength,qi=qt.maxTagPlaceholder,_e=qi===void 0?function(_o){return"+ ".concat(_o.length," ...")}:qi,lo=qt.tagRender,Eo=qt.onToggleOpen,zo=qt.onRemove,Ze=qt.onInputChange,jn=qt.onInputPaste,ei=qt.onInputKeyDown,Mi=qt.onInputMouseDown,vi=qt.onInputCompositionStart,mi=qt.onInputCompositionEnd,Ui=Xt.useRef(null),ki=(0,Xt.useState)(0),Hi=(0,te.Z)(ki,2),uo=Hi[0],un=Hi[1],Jo=(0,Xt.useState)(!1),nn=(0,te.Z)(Jo,2),ho=nn[0],Er=nn[1],Ho="".concat(sn,"-selection"),Fr=Nn||Ye==="multiple"&&Je===!1||Ye==="tags"?ie:"",mr=Ye==="tags"||Ye==="multiple"&&Je===!1||zn&&(Nn||ho);Se(function(){un(Ui.current.scrollWidth)},[Fr]);function Oi(_o,xr,es,cs,us){return Xt.createElement("span",{className:xe()("".concat(Ho,"-item"),(0,he.Z)({},"".concat(Ho,"-item-disabled"),es)),title:xn(_o)},Xt.createElement("span",{className:"".concat(Ho,"-item-content")},xr),cs&&Xt.createElement(lt,{className:"".concat(Ho,"-item-remove"),onMouseDown:Xe,onClick:us,customizeIcon:Qn},"\xD7"))}function Li(_o,xr,es,cs,us){var no=function(Zo){Xe(Zo),Eo(!Nn)};return Xt.createElement("span",{onMouseDown:no},lo({label:xr,value:_o,disabled:es,closable:cs,onClose:us}))}function So(_o){var xr=_o.disabled,es=_o.label,cs=_o.value,us=!We&&!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 Zo=function(lr){lr&&lr.stopPropagation(),zo(_o)};return typeof lo=="function"?Li(cs,no,xr,us,Zo):Oi(_o,no,xr,us,Zo)}function ko(_o){var xr=typeof _e=="function"?_e(_o):_e;return Oi({title:xr},xr,!1)}var _n=Xt.createElement("div",{className:"".concat(Ho,"-search"),style:{width:uo},onFocus:function(){Er(!0)},onBlur:function(){Er(!1)}},Xt.createElement(Zt,{ref:Cn,open:Nn,prefixCls:sn,id:ze,inputElement:null,disabled:We,autoFocus:Zn,autoComplete:fi,editable:mr,activeDescendantId:Hn,value:Fr,onKeyDown:ei,onMouseDown:Mi,onChange:Ze,onPaste:jn,onCompositionStart:vi,onCompositionEnd:mi,tabIndex:ti,attrs:(0,_t.Z)(qt,!0)}),Xt.createElement("span",{ref:Ui,className:"".concat(Ho,"-search-mirror"),"aria-hidden":!0},Fr,"\xA0")),jt=Xt.createElement(se.Z,{prefixCls:"".concat(Ho,"-overflow"),data:Ln,renderItem:So,renderRest:ko,suffix:_n,itemKey:Vt,maxCount:wi});return Xt.createElement(Xt.Fragment,null,jt,!Ln.length&&!Fr&&Xt.createElement("span",{className:"".concat(Ho,"-placeholder")},$n))},Bn=Xn,Ae=function(qt){var ze=qt.inputElement,sn=qt.prefixCls,Ln=qt.id,Nn=qt.inputRef,ie=qt.disabled,Je=qt.autoFocus,Cn=qt.autoComplete,$n=qt.activeDescendantId,We=qt.mode,Ye=qt.open,zn=qt.values,Zn=qt.placeholder,fi=qt.tabIndex,Hn=qt.showSearch,ti=qt.searchValue,Qn=qt.activeValue,wi=qt.maxLength,Qi=qt.onInputKeyDown,qi=qt.onInputMouseDown,_e=qt.onInputChange,lo=qt.onInputPaste,Eo=qt.onInputCompositionStart,zo=qt.onInputCompositionEnd,Ze=qt.title,jn=Xt.useState(!1),ei=(0,te.Z)(jn,2),Mi=ei[0],vi=ei[1],mi=We==="combobox",Ui=mi||Hn,ki=zn[0],Hi=ti||"";mi&&Qn&&!Mi&&(Hi=Qn),Xt.useEffect(function(){mi&&vi(!1)},[mi,Qn]);var uo=We!=="combobox"&&!Ye&&!Hn?!1:!!Hi,un=Ze===void 0?xn(ki):Ze,Jo=function(){if(ki)return null;var ho=uo?{visibility:"hidden"}:void 0;return Xt.createElement("span",{className:"".concat(sn,"-selection-placeholder"),style:ho},Zn)};return Xt.createElement(Xt.Fragment,null,Xt.createElement("span",{className:"".concat(sn,"-selection-search")},Xt.createElement(Zt,{ref:Nn,prefixCls:sn,id:Ln,open:Ye,inputElement:ze,disabled:ie,autoFocus:Je,autoComplete:Cn,editable:Ui,activeDescendantId:$n,value:Hi,onKeyDown:Qi,onMouseDown:qi,onChange:function(ho){vi(!0),_e(ho)},onPaste:lo,onCompositionStart:Eo,onCompositionEnd:zo,tabIndex:fi,attrs:(0,_t.Z)(qt,!0),maxLength:mi?wi:void 0})),!mi&&ki?Xt.createElement("span",{className:"".concat(sn,"-selection-item"),title:un,style:uo?{visibility:"hidden"}:void 0},ki.label):null,Jo())},hn=Ae;function bn(ue){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(ue)}var Jn=function(qt,ze){var sn=(0,Xt.useRef)(null),Ln=(0,Xt.useRef)(!1),Nn=qt.prefixCls,ie=qt.open,Je=qt.mode,Cn=qt.showSearch,$n=qt.tokenWithEnter,We=qt.autoClearSearchValue,Ye=qt.onSearch,zn=qt.onSearchSubmit,Zn=qt.onToggleOpen,fi=qt.onInputKeyDown,Hn=qt.domRef;Xt.useImperativeHandle(ze,function(){return{focus:function(){sn.current.focus()},blur:function(){sn.current.blur()}}});var ti=It(0),Qn=(0,te.Z)(ti,2),wi=Qn[0],Qi=Qn[1],qi=function(Hi){var uo=Hi.which;(uo===et.Z.UP||uo===et.Z.DOWN)&&Hi.preventDefault(),fi&&fi(Hi),uo===et.Z.ENTER&&Je==="tags"&&!Ln.current&&!ie&&(zn==null||zn(Hi.target.value)),bn(uo)&&Zn(!0)},_e=function(){Qi(!0)},lo=(0,Xt.useRef)(null),Eo=function(Hi){Ye(Hi,!0,Ln.current)!==!1&&Zn(!0)},zo=function(){Ln.current=!0},Ze=function(Hi){Ln.current=!1,Je!=="combobox"&&Eo(Hi.target.value)},jn=function(Hi){var uo=Hi.target.value;if($n&&lo.current&&/[\r\n]/.test(lo.current)){var un=lo.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");uo=uo.replace(un,lo.current)}lo.current=null,Eo(uo)},ei=function(Hi){var uo=Hi.clipboardData,un=uo.getData("text");lo.current=un},Mi=function(Hi){var uo=Hi.target;if(uo!==sn.current){var un=document.body.style.msTouchAction!==void 0;un?setTimeout(function(){sn.current.focus()}):sn.current.focus()}},vi=function(Hi){var uo=wi();Hi.target!==sn.current&&!uo&&Je!=="combobox"&&Hi.preventDefault(),(Je!=="combobox"&&(!Cn||!uo)||!ie)&&(ie&&We!==!1&&Ye("",!0,!1),Zn())},mi={inputRef:sn,onInputKeyDown:qi,onInputMouseDown:_e,onInputChange:jn,onInputPaste:ei,onInputCompositionStart:zo,onInputCompositionEnd:Ze},Ui=Je==="multiple"||Je==="tags"?Xt.createElement(Bn,(0,wt.Z)({},qt,mi)):Xt.createElement(hn,(0,wt.Z)({},qt,mi));return Xt.createElement("div",{ref:Hn,className:"".concat(Nn,"-selector"),onClick:Mi,onMouseDown:vi},Ui)},mn=Xt.forwardRef(Jn);mn.displayName="Selector";var ui=mn,Ce=bt(35593),ni=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Pi=function(qt){var ze=qt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ze,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ze,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ze,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ze,adjustY:1},htmlRegion:"scroll"}}},gn=function(qt,ze){var sn=qt.prefixCls,Ln=qt.disabled,Nn=qt.visible,ie=qt.children,Je=qt.popupElement,Cn=qt.animation,$n=qt.transitionName,We=qt.dropdownStyle,Ye=qt.dropdownClassName,zn=qt.direction,Zn=zn===void 0?"ltr":zn,fi=qt.placement,Hn=qt.builtinPlacements,ti=qt.dropdownMatchSelectWidth,Qn=qt.dropdownRender,wi=qt.dropdownAlign,Qi=qt.getPopupContainer,qi=qt.empty,_e=qt.getTriggerDOMNode,lo=qt.onPopupVisibleChange,Eo=qt.onPopupMouseEnter,zo=(0,Pe.Z)(qt,ni),Ze="".concat(sn,"-dropdown"),jn=Je;Qn&&(jn=Qn(Je));var ei=Xt.useMemo(function(){return Hn||Pi(ti)},[Hn,ti]),Mi=Cn?"".concat(Ze,"-").concat(Cn):$n,vi=typeof ti=="number",mi=Xt.useMemo(function(){return vi?null:ti===!1?"minWidth":"width"},[ti,vi]),Ui=We;vi&&(Ui=(0,Ie.Z)((0,Ie.Z)({},Ui),{},{width:ti}));var ki=Xt.useRef(null);return Xt.useImperativeHandle(ze,function(){return{getPopupElement:function(){return ki.current}}}),Xt.createElement(Ce.Z,(0,wt.Z)({},zo,{showAction:lo?["click"]:[],hideAction:lo?["click"]:[],popupPlacement:fi||(Zn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ei,prefixCls:Ze,popupTransitionName:Mi,popup:Xt.createElement("div",{ref:ki,onMouseEnter:Eo},jn),stretch:mi,popupAlign:wi,popupVisible:Nn,getPopupContainer:Qi,popupClassName:xe()(Ye,(0,he.Z)({},"".concat(Ze,"-empty"),qi)),popupStyle:Ui,getTriggerDOMNode:_e,onPopupVisibleChange:lo}),ie)},Tn=Xt.forwardRef(gn);Tn.displayName="SelectTrigger";var pn=Tn,Un=bt(68413);function On(ue,qt){var ze=ue.key,sn;return"value"in ue&&(sn=ue.value),ze!=null?ze:sn!==void 0?sn:"rc-index-key-".concat(qt)}function we(ue,qt){var ze=ue||{},sn=ze.label,Ln=ze.value,Nn=ze.options,ie=ze.groupLabel,Je=sn||(qt?"children":"label");return{label:Je,value:Ln||"value",options:Nn||"options",groupLabel:ie||Je}}function In(ue){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ze=qt.fieldNames,sn=qt.childrenAsData,Ln=[],Nn=we(ze,!1),ie=Nn.label,Je=Nn.value,Cn=Nn.options,$n=Nn.groupLabel;function We(Ye,zn){Ye.forEach(function(Zn){if(zn||!(Cn in Zn)){var fi=Zn[Je];Ln.push({key:On(Zn,Ln.length),groupOption:zn,data:Zn,label:Zn[ie],value:fi})}else{var Hn=Zn[$n];Hn===void 0&&sn&&(Hn=Zn.label),Ln.push({key:On(Zn,Ln.length),group:!0,data:Zn,label:Hn}),We(Zn[Cn],!0)}})}return We(ue,!1),Ln}function rn(ue){var qt=(0,Ie.Z)({},ue);return"props"in qt||Object.defineProperty(qt,"props",{get:function(){return(0,ve.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),qt}}),qt}function ge(ue,qt){if(!qt||!qt.length)return null;var ze=!1;function sn(Nn,ie){var Je=(0,Un.Z)(ie),Cn=Je[0],$n=Je.slice(1);if(!Cn)return[Nn];var We=Nn.split(Cn);return ze=ze||We.length>1,We.reduce(function(Ye,zn){return[].concat((0,ee.Z)(Ye),(0,ee.Z)(sn(zn,$n)))},[]).filter(function(Ye){return Ye})}var Ln=sn(ue,qt);return ze?Ln:null}var oe=["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"],Ft=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function St(ue){return ue==="tags"||ue==="multiple"}var mt=Xt.forwardRef(function(ue,qt){var ze,sn,Ln=ue.id,Nn=ue.prefixCls,ie=ue.className,Je=ue.showSearch,Cn=ue.tagRender,$n=ue.direction,We=ue.omitDomProps,Ye=ue.displayValues,zn=ue.onDisplayValuesChange,Zn=ue.emptyOptions,fi=ue.notFoundContent,Hn=fi===void 0?"Not Found":fi,ti=ue.onClear,Qn=ue.mode,wi=ue.disabled,Qi=ue.loading,qi=ue.getInputElement,_e=ue.getRawInputElement,lo=ue.open,Eo=ue.defaultOpen,zo=ue.onDropdownVisibleChange,Ze=ue.activeValue,jn=ue.onActiveValueChange,ei=ue.activeDescendantId,Mi=ue.searchValue,vi=ue.autoClearSearchValue,mi=ue.onSearch,Ui=ue.onSearchSplit,ki=ue.tokenSeparators,Hi=ue.allowClear,uo=ue.suffixIcon,un=ue.clearIcon,Jo=ue.OptionList,nn=ue.animation,ho=ue.transitionName,Er=ue.dropdownStyle,Ho=ue.dropdownClassName,Fr=ue.dropdownMatchSelectWidth,mr=ue.dropdownRender,Oi=ue.dropdownAlign,Li=ue.placement,So=ue.builtinPlacements,ko=ue.getPopupContainer,_n=ue.showAction,jt=_n===void 0?[]:_n,_o=ue.onFocus,xr=ue.onBlur,es=ue.onKeyUp,cs=ue.onKeyDown,us=ue.onMouseDown,no=(0,Pe.Z)(ue,oe),$i=St(Qn),Zo=(Je!==void 0?Je:$i)||Qn==="combobox",ro=(0,Ie.Z)({},no);Ft.forEach(function($e){delete ro[$e]}),We==null||We.forEach(function($e){delete ro[$e]});var lr=Xt.useState(!1),ms=(0,te.Z)(lr,2),Ji=ms[0],Bi=ms[1];Xt.useEffect(function(){Bi((0,Bt.Z)())},[]);var En=Xt.useRef(null),Ki=Xt.useRef(null),qo=Xt.useRef(null),jr=Xt.useRef(null),Ir=Xt.useRef(null),Ur=Tt(),hs=(0,te.Z)(Ur,3),ns=hs[0],sa=hs[1],Ys=hs[2];Xt.useImperativeHandle(qt,function(){var $e,Si;return{focus:($e=jr.current)===null||$e===void 0?void 0:$e.focus,blur:(Si=jr.current)===null||Si===void 0?void 0:Si.blur,scrollTo:function(xo){var Go;return(Go=Ir.current)===null||Go===void 0?void 0:Go.scrollTo(xo)}}});var ga=Xt.useMemo(function(){var $e;if(Qn!=="combobox")return Mi;var Si=($e=Ye[0])===null||$e===void 0?void 0:$e.value;return typeof Si=="string"||typeof Si=="number"?String(Si):""},[Mi,Qn,Ye]),Ke=Qn==="combobox"&&typeof qi=="function"&&qi()||null,vs=typeof _e=="function"&&_e(),mu=(0,nt.x1)(Ki,vs==null||(ze=vs.props)===null||ze===void 0?void 0:ze.ref),Ka=Xt.useState(!1),gl=(0,te.Z)(Ka,2),Xr=gl[0],pl=gl[1];(0,je.Z)(function(){pl(!0)},[]);var Nu=(0,Le.Z)(!1,{defaultValue:Eo,value:lo}),Hr=(0,te.Z)(Nu,2),As=Hr[0],kl=Hr[1],so=Xr?As:!1,hr=!Hn&&Zn;(wi||hr&&so&&Qn==="combobox")&&(so=!1);var Uo=hr?!1:so,hi=Xt.useCallback(function($e){var Si=$e!==void 0?$e:!so;wi||(kl(Si),so!==Si&&(zo==null||zo(Si)))},[wi,so,kl,zo]),Ns=Xt.useMemo(function(){return(ki||[]).some(function($e){return[`
|
|
|
`,`\r
|
|
|
`].includes($e)})},[ki]),is=function(Si,vo,xo){var Go=!0,ao=Si;jn==null||jn(null);var dr=xo?null:ge(Si,ki);return Qn!=="combobox"&&dr&&(ao="",Ui==null||Ui(dr),hi(!1),Go=!1),mi&&ga!==ao&&mi(ao,{source:vo?"typing":"effect"}),Go},Js=function(Si){!Si||!Si.trim()||mi(Si,{source:"submit"})};Xt.useEffect(function(){!so&&!$i&&Qn!=="combobox"&&is("",!1,!1)},[so]),Xt.useEffect(function(){As&&wi&&kl(!1),wi&&sa(!1)},[wi]);var ol=It(),ml=(0,te.Z)(ol,2),ii=ml[0],Vr=ml[1],Is=function(Si){var vo=ii(),xo=Si.which;if(xo===et.Z.ENTER&&(Qn!=="combobox"&&Si.preventDefault(),so||hi(!0)),Vr(!!ga),xo===et.Z.BACKSPACE&&!vo&&$i&&!ga&&Ye.length){for(var Go=(0,ee.Z)(Ye),ao=null,dr=Go.length-1;dr>=0;dr-=1){var wr=Go[dr];if(!wr.disabled){Go.splice(dr,1),ao=wr;break}}ao&&zn(Go,{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 vo=arguments.length,xo=new Array(vo>1?vo-1:0),Go=1;Go<vo;Go++)xo[Go-1]=arguments[Go];if(so&&Ir.current){var ao;(ao=Ir.current).onKeyUp.apply(ao,[Si].concat(xo))}es==null||es.apply(void 0,[Si].concat(xo))},Pa=function(Si){var vo=Ye.filter(function(xo){return xo!==Si});zn(vo,{type:"remove",values:[Si]})},vl=Xt.useRef(!1),mo=function(){sa(!0),wi||(_o&&!vl.current&&_o.apply(void 0,arguments),jt.includes("focus")&&hi(!0)),vl.current=!0},Tu=function(){sa(!1,function(){vl.current=!1,hi(!1)}),!wi&&(ga&&(Qn==="tags"?mi(ga,{source:"submit"}):Qn==="multiple"&&mi("",{source:"blur"})),xr&&xr.apply(void 0,arguments))},Ia=[];Xt.useEffect(function(){return function(){Ia.forEach(function($e){return clearTimeout($e)}),Ia.splice(0,Ia.length)}},[]);var Da=function(Si){var vo,xo=Si.target,Go=(vo=qo.current)===null||vo===void 0?void 0:vo.getPopupElement();if(Go&&Go.contains(xo)){var ao=setTimeout(function(){var Ts=Ia.indexOf(ao);if(Ts!==-1&&Ia.splice(Ts,1),Ys(),!Ji&&!Go.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=Xt.useState({}),zl=(0,te.Z)(Ca,2),vu=zl[1];function pa(){vu({})}var Oa;vs&&(Oa=function(Si){hi(Si)}),zt(function(){var $e;return[En.current,($e=qo.current)===null||$e===void 0?void 0:$e.getPopupElement()]},Uo,hi,!!vs);var Bu=Xt.useMemo(function(){return(0,Ie.Z)((0,Ie.Z)({},ue),{},{notFoundContent:Hn,open:so,triggerOpen:Uo,id:Ln,showSearch:Zo,multiple:$i,toggleOpen:hi})},[ue,Hn,Uo,so,Ln,Zo,$i,hi]),bh=!!uo||Qi,dh;bh&&(dh=Xt.createElement(lt,{className:xe()("".concat(Nn,"-arrow"),(0,he.Z)({},"".concat(Nn,"-arrow-loading"),Qi)),customizeIcon:uo,customizeIconProps:{loading:Qi,searchValue:ga,open:so,focused:ns,showSearch:Zo}}));var qh=function(){var Si;ti==null||ti(),(Si=jr.current)===null||Si===void 0||Si.focus(),zn([],{type:"clear",values:Ye}),is("",!1,!1)},ch=gt(Nn,qh,Ye,Hi,un,wi,ga,Qn),yu=ch.allowClear,tu=ch.clearIcon,Za=Xt.createElement(Jo,{ref:Ir}),fh=xe()(Nn,ie,(sn={},(0,he.Z)(sn,"".concat(Nn,"-focused"),ns),(0,he.Z)(sn,"".concat(Nn,"-multiple"),$i),(0,he.Z)(sn,"".concat(Nn,"-single"),!$i),(0,he.Z)(sn,"".concat(Nn,"-allow-clear"),Hi),(0,he.Z)(sn,"".concat(Nn,"-show-arrow"),bh),(0,he.Z)(sn,"".concat(Nn,"-disabled"),wi),(0,he.Z)(sn,"".concat(Nn,"-loading"),Qi),(0,he.Z)(sn,"".concat(Nn,"-open"),so),(0,he.Z)(sn,"".concat(Nn,"-customize-input"),Ke),(0,he.Z)(sn,"".concat(Nn,"-show-search"),Zo),sn)),gh=Xt.createElement(pn,{ref:qo,disabled:wi,prefixCls:Nn,visible:Uo,popupElement:Za,animation:nn,transitionName:ho,dropdownStyle:Er,dropdownClassName:Ho,direction:$n,dropdownMatchSelectWidth:Fr,dropdownRender:mr,dropdownAlign:Oi,placement:Li,builtinPlacements:So,getPopupContainer:ko,empty:Zn,getTriggerDOMNode:function(){return Ki.current},onPopupVisibleChange:Oa,onPopupMouseEnter:pa},vs?Xt.cloneElement(vs,{ref:mu}):Xt.createElement(ui,(0,wt.Z)({},ue,{domRef:Ki,prefixCls:Nn,inputElement:Ke,ref:jr,id:Ln,showSearch:Zo,autoClearSearchValue:vi,mode:Qn,activeDescendantId:ei,tagRender:Cn,values:Ye,open:so,onToggleOpen:hi,activeValue:Ze,searchValue:ga,onSearch:is,onSearchSubmit:Js,onRemove:Pa,tokenWithEnter:Ns}))),Fu;return vs?Fu=gh:Fu=Xt.createElement("div",(0,wt.Z)({className:fh},ro,{ref:En,onMouseDown:Da,onKeyDown:Is,onKeyUp:ba,onFocus:mo,onBlur:Tu}),ns&&!so&&Xt.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Ye.map(function($e){var Si=$e.label,vo=$e.value;return["number","string"].includes((0,Nt.Z)(Si))?Si:vo}).join(", "))),gh,dh,yu&&tu),Xt.createElement(yt.Provider,{value:Bu},Fu)}),At=mt,Rt=function(ue,qt){var ze=Xt.useRef({values:new Map,options:new Map}),sn=Xt.useMemo(function(){var Nn=ze.current,ie=Nn.values,Je=Nn.options,Cn=ue.map(function(Ye){if(Ye.label===void 0){var zn;return(0,Ie.Z)((0,Ie.Z)({},Ye),{},{label:(zn=ie.get(Ye.value))===null||zn===void 0?void 0:zn.label})}return Ye}),$n=new Map,We=new Map;return Cn.forEach(function(Ye){$n.set(Ye.value,Ye),We.set(Ye.value,qt.get(Ye.value)||Je.get(Ye.value))}),ze.current.values=$n,ze.current.options=We,Cn},[ue,qt]),Ln=Xt.useCallback(function(Nn){return qt.get(Nn)||ze.current.options.get(Nn)},[qt]);return[sn,Ln]};function Lt(ue,qt){return Fe(ue).join("").toUpperCase().includes(qt)}var ae=function(ue,qt,ze,sn,Ln){return Xt.useMemo(function(){if(!ze||sn===!1)return ue;var Nn=qt.options,ie=qt.label,Je=qt.value,Cn=[],$n=typeof sn=="function",We=ze.toUpperCase(),Ye=$n?sn:function(Zn,fi){return Ln?Lt(fi[Ln],We):fi[Nn]?Lt(fi[ie!=="children"?ie:"label"],We):Lt(fi[Je],We)},zn=$n?function(Zn){return rn(Zn)}:function(Zn){return Zn};return ue.forEach(function(Zn){if(Zn[Nn]){var fi=Ye(ze,zn(Zn));if(fi)Cn.push(Zn);else{var Hn=Zn[Nn].filter(function(ti){return Ye(ze,zn(ti))});Hn.length&&Cn.push((0,Ie.Z)((0,Ie.Z)({},Zn),{},(0,he.Z)({},Nn,Hn)))}return}Ye(ze,zn(Zn))&&Cn.push(Zn)}),Cn},[ue,sn,Ln,ze,qt])},De=bt(17115),Oe=bt(11592),Be=["children","value"],yn=["children"];function Gn(ue){var qt=ue,ze=qt.key,sn=qt.props,Ln=sn.children,Nn=sn.value,ie=(0,Pe.Z)(sn,Be);return(0,Ie.Z)({key:ze,value:Nn!==void 0?Nn:ze,children:Ln},ie)}function Kn(ue){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Oe.Z)(ue).map(function(ze,sn){if(!Xt.isValidElement(ze)||!ze.type)return null;var Ln=ze,Nn=Ln.type.isSelectOptGroup,ie=Ln.key,Je=Ln.props,Cn=Je.children,$n=(0,Pe.Z)(Je,yn);return qt||!Nn?Gn(ze):(0,Ie.Z)((0,Ie.Z)({key:"__RC_SELECT_GRP__".concat(ie===null?sn:ie,"__"),label:ie},$n),{},{options:Kn(Cn)})}).filter(function(ze){return ze})}function Vn(ue,qt,ze,sn,Ln){return Xt.useMemo(function(){var Nn=ue,ie=!ue;ie&&(Nn=Kn(qt));var Je=new Map,Cn=new Map,$n=function(zn,Zn,fi){fi&&typeof fi=="string"&&zn.set(Zn[fi],Zn)};function We(Ye){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Zn=0;Zn<Ye.length;Zn+=1){var fi=Ye[Zn];!fi[ze.options]||zn?(Je.set(fi[ze.value],fi),$n(Cn,fi,ze.label),$n(Cn,fi,sn),$n(Cn,fi,Ln)):We(fi[ze.options],!0)}}return We(Nn),{options:Nn,valueOptions:Je,labelOptions:Cn}},[ue,qt,ze,sn,Ln])}function gi(ue){var qt=Xt.useRef();qt.current=ue;var ze=Xt.useCallback(function(){return qt.current.apply(qt,arguments)},[]);return ze}var Ti=function(){return null};Ti.isSelectOptGroup=!0;var Xi=Ti,Mo=function(){return null};Mo.isSelectOption=!0;var Io=Mo,Oo=bt(80547),co=bt(2738),Do=bt(45680),Qo=Xt.createContext(null),Ai=Qo;function $o(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var jo=["disabled","title","children","style","className"];function Mt(ue){return typeof ue=="string"||typeof ue=="number"}var cr=function(qt,ze){var sn=Pt(),Ln=sn.prefixCls,Nn=sn.id,ie=sn.open,Je=sn.multiple,Cn=sn.mode,$n=sn.searchValue,We=sn.toggleOpen,Ye=sn.notFoundContent,zn=sn.onPopupScroll,Zn=Xt.useContext(Ai),fi=Zn.flattenOptions,Hn=Zn.onActiveValue,ti=Zn.defaultActiveFirstOption,Qn=Zn.onSelect,wi=Zn.menuItemSelectedIcon,Qi=Zn.rawValues,qi=Zn.fieldNames,_e=Zn.virtual,lo=Zn.direction,Eo=Zn.listHeight,zo=Zn.listItemHeight,Ze="".concat(Ln,"-item"),jn=(0,Oo.Z)(function(){return fi},[ie,fi],function(Oi,Li){return Li[0]&&Oi[1]!==Li[1]}),ei=Xt.useRef(null),Mi=function(Li){Li.preventDefault()},vi=function(Li){ei.current&&ei.current.scrollTo(typeof Li=="number"?{index:Li}:Li)},mi=function(Li){for(var So=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ko=jn.length,_n=0;_n<ko;_n+=1){var jt=(Li+_n*So+ko)%ko,_o=jn[jt],xr=_o.group,es=_o.data;if(!xr&&!es.disabled)return jt}return-1},Ui=Xt.useState(function(){return mi(0)}),ki=(0,te.Z)(Ui,2),Hi=ki[0],uo=ki[1],un=function(Li){var So=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;uo(Li);var ko={source:So?"keyboard":"mouse"},_n=jn[Li];if(!_n){Hn(null,-1,ko);return}Hn(_n.value,Li,ko)};(0,Xt.useEffect)(function(){un(ti!==!1?mi(0):-1)},[jn.length,$n]);var Jo=Xt.useCallback(function(Oi){return Qi.has(Oi)&&Cn!=="combobox"},[Cn,(0,ee.Z)(Qi).toString(),Qi.size]);(0,Xt.useEffect)(function(){var Oi=setTimeout(function(){if(!Je&&ie&&Qi.size===1){var So=Array.from(Qi)[0],ko=jn.findIndex(function(_n){var jt=_n.data;return jt.value===So});ko!==-1&&(un(ko),vi(ko))}});if(ie){var Li;(Li=ei.current)===null||Li===void 0||Li.scrollTo(void 0)}return function(){return clearTimeout(Oi)}},[ie,$n,fi.length]);var nn=function(Li){Li!==void 0&&Qn(Li,{selected:!Qi.has(Li)}),Je||We(!1)};if(Xt.useImperativeHandle(ze,function(){return{onKeyDown:function(Li){var So=Li.which,ko=Li.ctrlKey;switch(So){case et.Z.N:case et.Z.P:case et.Z.UP:case et.Z.DOWN:{var _n=0;if(So===et.Z.UP?_n=-1:So===et.Z.DOWN?_n=1:$o()&&ko&&(So===et.Z.N?_n=1:So===et.Z.P&&(_n=-1)),_n!==0){var jt=mi(Hi+_n,_n);vi(jt),un(jt,!0)}break}case et.Z.ENTER:{var _o=jn[Hi];_o&&!_o.data.disabled?nn(_o.value):nn(void 0),ie&&Li.preventDefault();break}case et.Z.ESC:We(!1),ie&&Li.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Li){vi(Li)}}}),jn.length===0)return Xt.createElement("div",{role:"listbox",id:"".concat(Nn,"_list"),className:"".concat(Ze,"-empty"),onMouseDown:Mi},Ye);var ho=Object.keys(qi).map(function(Oi){return qi[Oi]}),Er=function(Li){return Li.label};function Ho(Oi,Li){var So=Oi.group;return{role:So?"presentation":"option",id:"".concat(Nn,"_list_").concat(Li)}}var Fr=function(Li){var So=jn[Li];if(!So)return null;var ko=So.data||{},_n=ko.value,jt=So.group,_o=(0,_t.Z)(ko,!0),xr=Er(So);return So?Xt.createElement("div",(0,wt.Z)({"aria-label":typeof xr=="string"&&!jt?xr:null},_o,{key:Li},Ho(So,Li),{"aria-selected":Jo(_n)}),_n):null},mr={role:"listbox",id:"".concat(Nn,"_list")};return Xt.createElement(Xt.Fragment,null,_e&&Xt.createElement("div",(0,wt.Z)({},mr,{style:{height:0,width:0,overflow:"hidden"}}),Fr(Hi-1),Fr(Hi),Fr(Hi+1)),Xt.createElement(Do.Z,{itemKey:"key",ref:ei,data:jn,height:Eo,itemHeight:zo,fullHeight:!1,onMouseDown:Mi,onScroll:zn,virtual:_e,direction:lo,innerProps:_e?null:mr},function(Oi,Li){var So,ko=Oi.group,_n=Oi.groupOption,jt=Oi.data,_o=Oi.label,xr=Oi.value,es=jt.key;if(ko){var cs,us=(cs=jt.title)!==null&&cs!==void 0?cs:Mt(_o)?_o.toString():void 0;return Xt.createElement("div",{className:xe()(Ze,"".concat(Ze,"-group")),title:us},_o!==void 0?_o:es)}var no=jt.disabled,$i=jt.title,Zo=jt.children,ro=jt.style,lr=jt.className,ms=(0,Pe.Z)(jt,jo),Ji=(0,co.Z)(ms,ho),Bi=Jo(xr),En="".concat(Ze,"-option"),Ki=xe()(Ze,En,lr,(So={},(0,he.Z)(So,"".concat(En,"-grouped"),_n),(0,he.Z)(So,"".concat(En,"-active"),Hi===Li&&!no),(0,he.Z)(So,"".concat(En,"-disabled"),no),(0,he.Z)(So,"".concat(En,"-selected"),Bi),So)),qo=Er(Oi),jr=!wi||typeof wi=="function"||Bi,Ir=typeof qo=="number"?qo:qo||xr,Ur=Mt(Ir)?Ir.toString():void 0;return $i!==void 0&&(Ur=$i),Xt.createElement("div",(0,wt.Z)({},(0,_t.Z)(Ji),_e?{}:Ho(Oi,Li),{"aria-selected":Bi,className:Ki,title:Ur,onMouseMove:function(){Hi===Li||no||un(Li)},onClick:function(){no||nn(xr)},style:ro}),Xt.createElement("div",{className:"".concat(En,"-content")},Ir),Xt.isValidElement(wi)||Bi,jr&&Xt.createElement(lt,{className:"".concat(Ze,"-option-state"),customizeIcon:wi,customizeIconProps:{isSelected:Bi}},Bi?"\u2713":null))}))},ir=Xt.forwardRef(cr);ir.displayName="OptionList";var pr=ir;function ts(ue){var qt=ue.mode,ze=ue.options,sn=ue.children,Ln=ue.backfill,Nn=ue.allowClear,ie=ue.placeholder,Je=ue.getInputElement,Cn=ue.showSearch,$n=ue.onSearch,We=ue.defaultOpen,Ye=ue.autoFocus,zn=ue.labelInValue,Zn=ue.value,fi=ue.inputValue,Hn=ue.optionLabelProp,ti=isMultiple(qt),Qn=Cn!==void 0?Cn:ti||qt==="combobox",wi=ze||convertChildrenToData(sn);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(Eo){return typeof("value"in Eo?Eo.value:Eo.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"||!Ln,"`backfill` only works with `combobox` mode."),warning(qt==="combobox"||!Je,"`getInputElement` only work with `combobox` mode."),noteOnce(qt!=="combobox"||!Je||!Nn||!ie,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),$n&&!Qn&&qt!=="combobox"&&qt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!We||Ye,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Zn!=null){var qi=toArray(Zn);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(!ti||Array.isArray(Zn),"`value` should be array when `mode` is `multiple` or `tags`")}if(sn){var _e=null;toNodeArray(sn).some(function(lo){if(!React.isValidElement(lo)||!lo.type)return!1;var Eo=lo,zo=Eo.type;if(zo.isSelectOption)return!1;if(zo.isSelectOptGroup){var Ze=toNodeArray(lo.props.children).every(function(jn){return!React.isValidElement(jn)||!lo.type||jn.type.isSelectOption?!0:(_e=jn.type,!1)});return!Ze}return _e=zo,!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(ue,qt){if(ue){var ze=function sn(Ln){for(var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ie=0;ie<Ln.length;ie++){var Je=Ln[ie];if(Je[qt==null?void 0:qt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Nn&&Array.isArray(Je[qt==null?void 0:qt.options])&&sn(Je[qt==null?void 0:qt.options],!0))break}};ze(ue)}}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"],si=["inputValue"];function Te(ue){return!ue||(0,Nt.Z)(ue)!=="object"}var Ee=Xt.forwardRef(function(ue,qt){var ze=ue.id,sn=ue.mode,Ln=ue.prefixCls,Nn=Ln===void 0?"rc-select":Ln,ie=ue.backfill,Je=ue.fieldNames,Cn=ue.inputValue,$n=ue.searchValue,We=ue.onSearch,Ye=ue.autoClearSearchValue,zn=Ye===void 0?!0:Ye,Zn=ue.onSelect,fi=ue.onDeselect,Hn=ue.dropdownMatchSelectWidth,ti=Hn===void 0?!0:Hn,Qn=ue.filterOption,wi=ue.filterSort,Qi=ue.optionFilterProp,qi=ue.optionLabelProp,_e=ue.options,lo=ue.children,Eo=ue.defaultActiveFirstOption,zo=ue.menuItemSelectedIcon,Ze=ue.virtual,jn=ue.direction,ei=ue.listHeight,Mi=ei===void 0?200:ei,vi=ue.listItemHeight,mi=vi===void 0?20:vi,Ui=ue.value,ki=ue.defaultValue,Hi=ue.labelInValue,uo=ue.onChange,un=(0,Pe.Z)(ue,Ci),Jo=(0,De.ZP)(ze),nn=St(sn),ho=!!(!_e&&lo),Er=Xt.useMemo(function(){return Qn===void 0&&sn==="combobox"?!1:Qn},[Qn,sn]),Ho=Xt.useMemo(function(){return we(Je,ho)},[JSON.stringify(Je),ho]),Fr=(0,Le.Z)("",{value:$n!==void 0?$n:Cn,postState:function(hr){return hr||""}}),mr=(0,te.Z)(Fr,2),Oi=mr[0],Li=mr[1],So=Vn(_e,lo,Ho,Qi,qi),ko=So.valueOptions,_n=So.labelOptions,jt=So.options,_o=Xt.useCallback(function(so){var hr=Fe(so);return hr.map(function(Uo){var hi,Ns,is,Js,ol;if(Te(Uo))hi=Uo;else{var ml;is=Uo.key,Ns=Uo.label,hi=(ml=Uo.value)!==null&&ml!==void 0?ml:is}var ii=ko.get(hi);if(ii){var Vr;if(Ns===void 0&&(Ns=ii==null?void 0:ii[qi||Ho.label]),is===void 0&&(is=(Vr=ii==null?void 0:ii.key)!==null&&Vr!==void 0?Vr:hi),Js=ii==null?void 0:ii.disabled,ol=ii==null?void 0:ii.title,0)var Is}return{label:Ns,value:hi,key:is,disabled:Js,title:ol}})},[Ho,qi,ko]),xr=(0,Le.Z)(ki,{value:Ui}),es=(0,te.Z)(xr,2),cs=es[0],us=es[1],no=Xt.useMemo(function(){var so,hr=_o(cs);return sn==="combobox"&&qe((so=hr[0])===null||so===void 0?void 0:so.value)?[]:hr},[cs,_o,sn]),$i=Rt(no,ko),Zo=(0,te.Z)($i,2),ro=Zo[0],lr=Zo[1],ms=Xt.useMemo(function(){if(!sn&&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 Uo;return(0,Ie.Z)((0,Ie.Z)({},hr),{},{label:(Uo=hr.label)!==null&&Uo!==void 0?Uo:hr.value})})},[sn,ro]),Ji=Xt.useMemo(function(){return new Set(ro.map(function(so){return so.value}))},[ro]);Xt.useEffect(function(){if(sn==="combobox"){var so,hr=(so=ro[0])===null||so===void 0?void 0:so.value;Li(Qe(hr)?String(hr):"")}},[ro]);var Bi=gi(function(so,hr){var Uo,hi=hr!=null?hr:so;return Uo={},(0,he.Z)(Uo,Ho.value,so),(0,he.Z)(Uo,Ho.label,hi),Uo}),En=Xt.useMemo(function(){if(sn!=="tags")return jt;var so=(0,ee.Z)(jt),hr=function(hi){return ko.has(hi)};return(0,ee.Z)(ro).sort(function(Uo,hi){return Uo.value<hi.value?-1:1}).forEach(function(Uo){var hi=Uo.value;hr(hi)||so.push(Bi(hi,Uo.label))}),so},[Bi,jt,ko,ro,sn]),Ki=ae(En,Ho,Oi,Er,Qi),qo=Xt.useMemo(function(){return sn!=="tags"||!Oi||Ki.some(function(so){return so[Qi||"value"]===Oi})||Ki.some(function(so){return so[Ho.value]===Oi})?Ki:[Bi(Oi)].concat((0,ee.Z)(Ki))},[Bi,Qi,sn,Ki,Oi,Ho]),jr=Xt.useMemo(function(){return wi?(0,ee.Z)(qo).sort(function(so,hr){return wi(so,hr)}):qo},[qo,wi]),Ir=Xt.useMemo(function(){return In(jr,{fieldNames:Ho,childrenAsData:ho})},[jr,Ho,ho]),Ur=function(hr){var Uo=_o(hr);if(us(Uo),uo&&(Uo.length!==ro.length||Uo.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=Hi?Uo:Uo.map(function(is){return is.value}),Ns=Uo.map(function(is){return rn(lr(is.value))});uo(nn?hi:hi[0],nn?Ns:Ns[0])}},hs=Xt.useState(null),ns=(0,te.Z)(hs,2),sa=ns[0],Ys=ns[1],ga=Xt.useState(0),Ke=(0,te.Z)(ga,2),vs=Ke[0],mu=Ke[1],Ka=Eo!==void 0?Eo:sn!=="combobox",gl=Xt.useCallback(function(so,hr){var Uo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},hi=Uo.source,Ns=hi===void 0?"keyboard":hi;mu(hr),ie&&sn==="combobox"&&so!==null&&Ns==="keyboard"&&Ys(String(so))},[ie,sn]),Xr=function(hr,Uo,hi){var Ns=function(){var vl,mo=lr(hr);return[Hi?{label:mo==null?void 0:mo[Ho.label],value:hr,key:(vl=mo==null?void 0:mo.key)!==null&&vl!==void 0?vl:hr}:hr,rn(mo)]};if(Uo&&Zn){var is=Ns(),Js=(0,te.Z)(is,2),ol=Js[0],ml=Js[1];Zn(ol,ml)}else if(!Uo&&fi&&hi!=="clear"){var ii=Ns(),Vr=(0,te.Z)(ii,2),Is=Vr[0],ba=Vr[1];fi(Is,ba)}},pl=gi(function(so,hr){var Uo,hi=nn?hr.selected:!0;hi?Uo=nn?[].concat((0,ee.Z)(ro),[so]):[so]:Uo=ro.filter(function(Ns){return Ns.value!==so}),Ur(Uo),Xr(so,hi),sn==="combobox"?Ys(""):(!St||zn)&&(Li(""),Ys(""))}),Nu=function(hr,Uo){Ur(hr);var hi=Uo.type,Ns=Uo.values;(hi==="remove"||hi==="clear")&&Ns.forEach(function(is){Xr(is.value,!1,hi)})},Hr=function(hr,Uo){if(Li(hr),Ys(null),Uo.source==="submit"){var hi=(hr||"").trim();if(hi){var Ns=Array.from(new Set([].concat((0,ee.Z)(Ji),[hi])));Ur(Ns),Xr(hi,!0),Li("")}return}Uo.source!=="blur"&&(sn==="combobox"&&Ur(hr),We==null||We(hr))},As=function(hr){var Uo=hr;sn!=="tags"&&(Uo=hr.map(function(Ns){var is=_n.get(Ns);return is==null?void 0:is.value}).filter(function(Ns){return Ns!==void 0}));var hi=Array.from(new Set([].concat((0,ee.Z)(Ji),(0,ee.Z)(Uo))));Ur(hi),hi.forEach(function(Ns){Xr(Ns,!0)})},kl=Xt.useMemo(function(){var so=Ze!==!1&&ti!==!1;return(0,Ie.Z)((0,Ie.Z)({},So),{},{flattenOptions:Ir,onActiveValue:gl,defaultActiveFirstOption:Ka,onSelect:pl,menuItemSelectedIcon:zo,rawValues:Ji,fieldNames:Ho,virtual:so,direction:jn,listHeight:Mi,listItemHeight:mi,childrenAsData:ho})},[So,Ir,gl,Ka,pl,zo,Ji,Ho,Ze,ti,Mi,mi,ho]);return Xt.createElement(Ai.Provider,{value:kl},Xt.createElement(At,(0,wt.Z)({},un,{id:Jo,prefixCls:Nn,ref:qt,omitDomProps:si,mode:sn,displayValues:ms,onDisplayValuesChange:Nu,direction:jn,searchValue:Oi,onSearch:Hr,autoClearSearchValue:zn,onSearchSplit:As,dropdownMatchSelectWidth:ti,OptionList:pr,emptyOptions:!Ir.length,activeValue:sa,activeDescendantId:"".concat(Jo,"_list_").concat(vs)})))}),Wt=Ee;Wt.Option=Io,Wt.OptGroup=Xi;var Ge=Wt,Ue=Ge},39417:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return _t}});var wt=bt(72308),ee=bt(49618),he=bt(74416),Ie=bt(77321),te=bt(96949),Pe=bt(55090),Nt=bt(80237),Le=bt(77205),ve=bt(38793),Xt=bt(92310),fe=bt.n(Xt),xe=bt(26112),je=bt(59301),Bt=bt(39378),et=function(Jt){for(var le=Jt.prefixCls,Zt=Jt.level,Fe=Jt.isStart,me=Jt.isEnd,Ve="".concat(le,"-indent-unit"),Qe=[],qe=0;qe<Zt;qe+=1){var vn;Qe.push(je.createElement("span",{key:qe,className:fe()(Ve,(vn={},(0,ee.Z)(vn,"".concat(Ve,"-start"),Fe[qe]),(0,ee.Z)(vn,"".concat(Ve,"-end"),me[qe]),vn))}))}return je.createElement("span",{"aria-hidden":"true",className:"".concat(le,"-indent")},Qe)},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"],yt="open",Pt="close",Tt="---",It=function(se){(0,Le.Z)(le,se);var Jt=(0,ve.Z)(le);function le(){var Zt;(0,te.Z)(this,le);for(var Fe=arguments.length,me=new Array(Fe),Ve=0;Ve<Fe;Ve++)me[Ve]=arguments[Ve];return Zt=Jt.call.apply(Jt,[this].concat(me)),Zt.state={dragNodeHighlight:!1},Zt.selectHandle=void 0,Zt.cacheIndent=void 0,Zt.onSelectorClick=function(Qe){var qe=Zt.props.context.onNodeClick;qe(Qe,(0,lt.F)(Zt.props)),Zt.isSelectable()?Zt.onSelect(Qe):Zt.onCheck(Qe)},Zt.onSelectorDoubleClick=function(Qe){var qe=Zt.props.context.onNodeDoubleClick;qe(Qe,(0,lt.F)(Zt.props))},Zt.onSelect=function(Qe){if(!Zt.isDisabled()){var qe=Zt.props.context.onNodeSelect;qe(Qe,(0,lt.F)(Zt.props))}},Zt.onCheck=function(Qe){if(!Zt.isDisabled()){var qe=Zt.props,vn=qe.disableCheckbox,xn=qe.checked,Se=Zt.props.context.onNodeCheck;if(!(!Zt.isCheckable()||vn)){var Vt=!xn;Se(Qe,(0,lt.F)(Zt.props),Vt)}}},Zt.onMouseEnter=function(Qe){var qe=Zt.props.context.onNodeMouseEnter;qe(Qe,(0,lt.F)(Zt.props))},Zt.onMouseLeave=function(Qe){var qe=Zt.props.context.onNodeMouseLeave;qe(Qe,(0,lt.F)(Zt.props))},Zt.onContextMenu=function(Qe){var qe=Zt.props.context.onNodeContextMenu;qe(Qe,(0,lt.F)(Zt.props))},Zt.onDragStart=function(Qe){var qe=Zt.props.context.onNodeDragStart;Qe.stopPropagation(),Zt.setState({dragNodeHighlight:!0}),qe(Qe,(0,Nt.Z)(Zt));try{Qe.dataTransfer.setData("text/plain","")}catch(vn){}},Zt.onDragEnter=function(Qe){var qe=Zt.props.context.onNodeDragEnter;Qe.preventDefault(),Qe.stopPropagation(),qe(Qe,(0,Nt.Z)(Zt))},Zt.onDragOver=function(Qe){var qe=Zt.props.context.onNodeDragOver;Qe.preventDefault(),Qe.stopPropagation(),qe(Qe,(0,Nt.Z)(Zt))},Zt.onDragLeave=function(Qe){var qe=Zt.props.context.onNodeDragLeave;Qe.stopPropagation(),qe(Qe,(0,Nt.Z)(Zt))},Zt.onDragEnd=function(Qe){var qe=Zt.props.context.onNodeDragEnd;Qe.stopPropagation(),Zt.setState({dragNodeHighlight:!1}),qe(Qe,(0,Nt.Z)(Zt))},Zt.onDrop=function(Qe){var qe=Zt.props.context.onNodeDrop;Qe.preventDefault(),Qe.stopPropagation(),Zt.setState({dragNodeHighlight:!1}),qe(Qe,(0,Nt.Z)(Zt))},Zt.onExpand=function(Qe){var qe=Zt.props,vn=qe.loading,xn=qe.context.onNodeExpand;vn||xn(Qe,(0,lt.F)(Zt.props))},Zt.setSelectHandle=function(Qe){Zt.selectHandle=Qe},Zt.getNodeState=function(){var Qe=Zt.props.expanded;return Zt.isLeaf()?null:Qe?yt:Pt},Zt.hasChildren=function(){var Qe=Zt.props.eventKey,qe=Zt.props.context.keyEntities,vn=(0,ht.Z)(qe,Qe)||{},xn=vn.children;return!!(xn||[]).length},Zt.isLeaf=function(){var Qe=Zt.props,qe=Qe.isLeaf,vn=Qe.loaded,xn=Zt.props.context.loadData,Se=Zt.hasChildren();return qe===!1?!1:qe||!xn&&!Se||xn&&vn&&!Se},Zt.isDisabled=function(){var Qe=Zt.props.disabled,qe=Zt.props.context.disabled;return!!(qe||Qe)},Zt.isCheckable=function(){var Qe=Zt.props.checkable,qe=Zt.props.context.checkable;return!qe||Qe===!1?!1:qe},Zt.syncLoadData=function(Qe){var qe=Qe.expanded,vn=Qe.loading,xn=Qe.loaded,Se=Zt.props.context,Vt=Se.loadData,Xe=Se.onNodeLoad;vn||Vt&&qe&&!Zt.isLeaf()&&!Zt.hasChildren()&&!xn&&Xe((0,lt.F)(Zt.props))},Zt.isDraggable=function(){var Qe=Zt.props,qe=Qe.data,vn=Qe.context.draggable;return!!(vn&&(!vn.nodeDraggable||vn.nodeDraggable(qe)))},Zt.renderDragHandler=function(){var Qe=Zt.props.context,qe=Qe.draggable,vn=Qe.prefixCls;return qe!=null&&qe.icon?je.createElement("span",{className:"".concat(vn,"-draggable-icon")},qe.icon):null},Zt.renderSwitcherIconDom=function(Qe){var qe=Zt.props.switcherIcon,vn=Zt.props.context.switcherIcon,xn=qe||vn;return typeof xn=="function"?xn((0,Ie.Z)((0,Ie.Z)({},Zt.props),{},{isLeaf:Qe})):xn},Zt.renderSwitcher=function(){var Qe=Zt.props.expanded,qe=Zt.props.context.prefixCls;if(Zt.isLeaf()){var vn=Zt.renderSwitcherIconDom(!0);return vn!==!1?je.createElement("span",{className:fe()("".concat(qe,"-switcher"),"".concat(qe,"-switcher-noop"))},vn):null}var xn=fe()("".concat(qe,"-switcher"),"".concat(qe,"-switcher_").concat(Qe?yt:Pt)),Se=Zt.renderSwitcherIconDom(!1);return Se!==!1?je.createElement("span",{onClick:Zt.onExpand,className:xn},Se):null},Zt.renderCheckbox=function(){var Qe=Zt.props,qe=Qe.checked,vn=Qe.halfChecked,xn=Qe.disableCheckbox,Se=Zt.props.context.prefixCls,Vt=Zt.isDisabled(),Xe=Zt.isCheckable();if(!Xe)return null;var Xn=typeof Xe!="boolean"?Xe:null;return je.createElement("span",{className:fe()("".concat(Se,"-checkbox"),qe&&"".concat(Se,"-checkbox-checked"),!qe&&vn&&"".concat(Se,"-checkbox-indeterminate"),(Vt||xn)&&"".concat(Se,"-checkbox-disabled")),onClick:Zt.onCheck},Xn)},Zt.renderIcon=function(){var Qe=Zt.props.loading,qe=Zt.props.context.prefixCls;return je.createElement("span",{className:fe()("".concat(qe,"-iconEle"),"".concat(qe,"-icon__").concat(Zt.getNodeState()||"docu"),Qe&&"".concat(qe,"-icon_loading"))})},Zt.renderSelector=function(){var Qe=Zt.state.dragNodeHighlight,qe=Zt.props,vn=qe.title,xn=vn===void 0?Tt:vn,Se=qe.selected,Vt=qe.icon,Xe=qe.loading,Xn=qe.data,Bn=Zt.props.context,Ae=Bn.prefixCls,hn=Bn.showIcon,bn=Bn.icon,Jn=Bn.loadData,mn=Bn.titleRender,ui=Zt.isDisabled(),Ce="".concat(Ae,"-node-content-wrapper"),ni;if(hn){var Pi=Vt||bn;ni=Pi?je.createElement("span",{className:fe()("".concat(Ae,"-iconEle"),"".concat(Ae,"-icon__customize"))},typeof Pi=="function"?Pi(Zt.props):Pi):Zt.renderIcon()}else Jn&&Xe&&(ni=Zt.renderIcon());var gn;typeof xn=="function"?gn=xn(Xn):mn?gn=mn(Xn):gn=xn;var Tn=je.createElement("span",{className:"".concat(Ae,"-title")},gn);return je.createElement("span",{ref:Zt.setSelectHandle,title:typeof xn=="string"?xn:"",className:fe()("".concat(Ce),"".concat(Ce,"-").concat(Zt.getNodeState()||"normal"),!ui&&(Se||Qe)&&"".concat(Ae,"-node-selected")),onMouseEnter:Zt.onMouseEnter,onMouseLeave:Zt.onMouseLeave,onContextMenu:Zt.onContextMenu,onClick:Zt.onSelectorClick,onDoubleClick:Zt.onSelectorDoubleClick},ni,Tn,Zt.renderDropIndicator())},Zt.renderDropIndicator=function(){var Qe=Zt.props,qe=Qe.disabled,vn=Qe.eventKey,xn=Zt.props.context,Se=xn.draggable,Vt=xn.dropLevelOffset,Xe=xn.dropPosition,Xn=xn.prefixCls,Bn=xn.indent,Ae=xn.dropIndicatorRender,hn=xn.dragOverNodeKey,bn=xn.direction,Jn=!!Se,mn=!qe&&Jn&&hn===vn,ui=Bn!=null?Bn:Zt.cacheIndent;return Zt.cacheIndent=Bn,mn?Ae({dropPosition:Xe,dropLevelOffset:Vt,indent:ui,prefixCls:Xn,direction:bn}):null},Zt}return(0,Pe.Z)(le,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Fe=this.props.selectable,me=this.props.context.selectable;return typeof Fe=="boolean"?Fe:me}},{key:"render",value:function(){var Fe,me=this.props,Ve=me.eventKey,Qe=me.className,qe=me.style,vn=me.dragOver,xn=me.dragOverGapTop,Se=me.dragOverGapBottom,Vt=me.isLeaf,Xe=me.isStart,Xn=me.isEnd,Bn=me.expanded,Ae=me.selected,hn=me.checked,bn=me.halfChecked,Jn=me.loading,mn=me.domRef,ui=me.active,Ce=me.data,ni=me.onMouseMove,Pi=me.selectable,gn=(0,he.Z)(me,gt),Tn=this.props.context,pn=Tn.prefixCls,Un=Tn.filterTreeNode,On=Tn.keyEntities,we=Tn.dropContainerKey,In=Tn.dropTargetKey,rn=Tn.draggingNodeKey,ge=this.isDisabled(),oe=(0,xe.Z)(gn,{aria:!0,data:!0}),Ft=(0,ht.Z)(On,Ve)||{},St=Ft.level,mt=Xn[Xn.length-1],At=this.isDraggable(),Rt=!ge&&At,Lt=rn===Ve,ae=Pi!==void 0?{"aria-selected":!!Pi}:void 0;return je.createElement("div",(0,wt.Z)({ref:mn,className:fe()(Qe,"".concat(pn,"-treenode"),(Fe={},(0,ee.Z)(Fe,"".concat(pn,"-treenode-disabled"),ge),(0,ee.Z)(Fe,"".concat(pn,"-treenode-switcher-").concat(Bn?"open":"close"),!Vt),(0,ee.Z)(Fe,"".concat(pn,"-treenode-checkbox-checked"),hn),(0,ee.Z)(Fe,"".concat(pn,"-treenode-checkbox-indeterminate"),bn),(0,ee.Z)(Fe,"".concat(pn,"-treenode-selected"),Ae),(0,ee.Z)(Fe,"".concat(pn,"-treenode-loading"),Jn),(0,ee.Z)(Fe,"".concat(pn,"-treenode-active"),ui),(0,ee.Z)(Fe,"".concat(pn,"-treenode-leaf-last"),mt),(0,ee.Z)(Fe,"".concat(pn,"-treenode-draggable"),At),(0,ee.Z)(Fe,"dragging",Lt),(0,ee.Z)(Fe,"drop-target",In===Ve),(0,ee.Z)(Fe,"drop-container",we===Ve),(0,ee.Z)(Fe,"drag-over",!ge&&vn),(0,ee.Z)(Fe,"drag-over-gap-top",!ge&&xn),(0,ee.Z)(Fe,"drag-over-gap-bottom",!ge&&Se),(0,ee.Z)(Fe,"filter-node",Un&&Un((0,lt.F)(this.props))),Fe)),style:qe,draggable:Rt,"aria-grabbed":Lt,onDragStart:Rt?this.onDragStart:void 0,onDragEnter:At?this.onDragEnter:void 0,onDragOver:At?this.onDragOver:void 0,onDragLeave:At?this.onDragLeave:void 0,onDrop:At?this.onDrop:void 0,onDragEnd:At?this.onDragEnd:void 0,onMouseMove:ni},ae,oe),je.createElement(nt,{prefixCls:pn,level:St,isStart:Xe,isEnd:Xn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),le}(je.Component),zt=function(Jt){return je.createElement(Bt.k.Consumer,null,function(le){return je.createElement(It,(0,wt.Z)({},Jt,{context:le}))})};zt.displayName="TreeNode",zt.isTreeNode=1;var _t=zt},39378:function(dn,Mn,bt){"use strict";bt.d(Mn,{k:function(){return ee}});var wt=bt(59301),ee=wt.createContext(null)},54844:function(dn,Mn,bt){"use strict";bt.d(Mn,{O:function(){return _t.Z},Z:function(){return Tn}});var wt=bt(72308),ee=bt(49618),he=bt(62853),Ie=bt(77321),te=bt(80702),Pe=bt(96949),Nt=bt(55090),Le=bt(80237),ve=bt(77205),Xt=bt(38793),fe=bt(92310),xe=bt.n(fe),je=bt(10228),Bt=bt(26112),et=bt(48736),nt=bt(59301),ht=bt(39378);function lt(pn){var Un=pn.dropPosition,On=pn.dropLevelOffset,we=pn.indent,In={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Un){case-1:In.top=0,In.left=-On*we;break;case 1:In.bottom=0,In.left=-On*we;break;case 0:In.bottom=0,In.left=we;break}return nt.createElement("div",{style:In})}function gt(pn){if(pn==null)throw new TypeError("Cannot destructure "+pn)}var yt=bt(52487),Pt=bt(74416),Tt=bt(34280),It=bt(45680),zt=bt(77900),_t=bt(39417);function se(pn,Un){var On=nt.useState(!1),we=(0,yt.Z)(On,2),In=we[0],rn=we[1];nt.useLayoutEffect(function(){if(In)return pn(),function(){Un()}},[In]),nt.useLayoutEffect(function(){return rn(!0),function(){rn(!1)}},[])}var Jt=bt(71430),le=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Zt=function(Un,On){var we=Un.className,In=Un.style,rn=Un.motion,ge=Un.motionNodes,oe=Un.motionType,Ft=Un.onMotionStart,St=Un.onMotionEnd,mt=Un.active,At=Un.treeNodeRequiredProps,Rt=(0,Pt.Z)(Un,le),Lt=nt.useState(!0),ae=(0,yt.Z)(Lt,2),De=ae[0],Oe=ae[1],Be=nt.useContext(ht.k),yn=Be.prefixCls,Gn=ge&&oe!=="hide";(0,Tt.Z)(function(){ge&&Gn!==De&&Oe(Gn)},[ge]);var Kn=function(){ge&&Ft()},Vn=nt.useRef(!1),gi=function(){ge&&!Vn.current&&(Vn.current=!0,St())};se(Kn,gi);var Ti=function(Mo){Gn===Mo&&gi()};return ge?nt.createElement(zt.default,(0,wt.Z)({ref:On,visible:De},rn,{motionAppear:oe==="show",onVisibleChanged:Ti}),function(Xi,Mo){var Io=Xi.className,Oo=Xi.style;return nt.createElement("div",{ref:Mo,className:xe()("".concat(yn,"-treenode-motion"),Io),style:Oo},ge.map(function(co){var Do=(0,wt.Z)({},(gt(co.data),co.data)),Qo=co.title,Ai=co.key,$o=co.isStart,jo=co.isEnd;delete Do.children;var Mt=(0,Jt.H8)(Ai,At);return nt.createElement(_t.Z,(0,wt.Z)({},Do,Mt,{title:Qo,active:mt,data:co.data,key:Ai,isStart:$o,isEnd:jo}))}))}):nt.createElement(_t.Z,(0,wt.Z)({domRef:On,className:we,style:In},Rt,{active:mt}))};Zt.displayName="MotionTreeNode";var Fe=nt.forwardRef(Zt),me=Fe;function Ve(){var pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],On=pn.length,we=Un.length;if(Math.abs(On-we)!==1)return{add:!1,key:null};function In(rn,ge){var oe=new Map;rn.forEach(function(St){oe.set(St,!0)});var Ft=ge.filter(function(St){return!oe.has(St)});return Ft.length===1?Ft[0]:null}return On<we?{add:!0,key:In(pn,Un)}:{add:!1,key:In(Un,pn)}}function Qe(pn,Un,On){var we=pn.findIndex(function(oe){return oe.key===On}),In=pn[we+1],rn=Un.findIndex(function(oe){return oe.key===On});if(In){var ge=Un.findIndex(function(oe){return oe.key===In.key});return Un.slice(rn+1,ge)}return Un.slice(rn+1)}var qe=["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"],vn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},xn=function(){},Se="RC_TREE_MOTION_".concat(Math.random()),Vt={key:Se},Xe={key:Se,level:0,index:0,pos:"0",node:Vt,nodes:[Vt]},Xn={parent:null,children:[],pos:Xe.pos,data:Vt,title:null,key:Se,isStart:[],isEnd:[]};function Bn(pn,Un,On,we){return Un===!1||!On?pn:pn.slice(0,Math.ceil(On/we)+1)}function Ae(pn){var Un=pn.key,On=pn.pos;return(0,Jt.km)(Un,On)}function hn(pn){for(var Un=String(pn.data.key),On=pn;On.parent;)On=On.parent,Un="".concat(On.data.key," > ").concat(Un);return Un}var bn=nt.forwardRef(function(pn,Un){var On=pn.prefixCls,we=pn.data,In=pn.selectable,rn=pn.checkable,ge=pn.expandedKeys,oe=pn.selectedKeys,Ft=pn.checkedKeys,St=pn.loadedKeys,mt=pn.loadingKeys,At=pn.halfCheckedKeys,Rt=pn.keyEntities,Lt=pn.disabled,ae=pn.dragging,De=pn.dragOverNodeKey,Oe=pn.dropPosition,Be=pn.motion,yn=pn.height,Gn=pn.itemHeight,Kn=pn.virtual,Vn=pn.focusable,gi=pn.activeItem,Ti=pn.focused,Xi=pn.tabIndex,Mo=pn.onKeyDown,Io=pn.onFocus,Oo=pn.onBlur,co=pn.onActiveChange,Do=pn.onListChangeStart,Qo=pn.onListChangeEnd,Ai=(0,Pt.Z)(pn,qe),$o=nt.useRef(null),jo=nt.useRef(null);nt.useImperativeHandle(Un,function(){return{scrollTo:function(Ye){$o.current.scrollTo(Ye)},getIndentWidth:function(){return jo.current.offsetWidth}}});var Mt=nt.useState(ge),cr=(0,yt.Z)(Mt,2),ir=cr[0],pr=cr[1],ts=nt.useState(we),rs=(0,yt.Z)(ts,2),ls=rs[0],Ci=rs[1],si=nt.useState(we),Te=(0,yt.Z)(si,2),Ee=Te[0],Wt=Te[1],Ge=nt.useState([]),Ue=(0,yt.Z)(Ge,2),ue=Ue[0],qt=Ue[1],ze=nt.useState(null),sn=(0,yt.Z)(ze,2),Ln=sn[0],Nn=sn[1],ie=nt.useRef(we);ie.current=we;function Je(){var We=ie.current;Ci(We),Wt(We),qt([]),Nn(null),Qo()}(0,Tt.Z)(function(){pr(ge);var We=Ve(ir,ge);if(We.key!==null)if(We.add){var Ye=ls.findIndex(function(Qn){var wi=Qn.key;return wi===We.key}),zn=Bn(Qe(ls,we,We.key),Kn,yn,Gn),Zn=ls.slice();Zn.splice(Ye+1,0,Xn),Wt(Zn),qt(zn),Nn("show")}else{var fi=we.findIndex(function(Qn){var wi=Qn.key;return wi===We.key}),Hn=Bn(Qe(we,ls,We.key),Kn,yn,Gn),ti=we.slice();ti.splice(fi+1,0,Xn),Wt(ti),qt(Hn),Nn("hide")}else ls!==we&&(Ci(we),Wt(we))},[ge,we]),nt.useEffect(function(){ae||Je()},[ae]);var Cn=Be?Ee:we,$n={expandedKeys:ge,selectedKeys:oe,loadedKeys:St,loadingKeys:mt,checkedKeys:Ft,halfCheckedKeys:At,dragOverNodeKey:De,dropPosition:Oe,keyEntities:Rt};return nt.createElement(nt.Fragment,null,Ti&&gi&&nt.createElement("span",{style:vn,"aria-live":"assertive"},hn(gi)),nt.createElement("div",null,nt.createElement("input",{style:vn,disabled:Vn===!1||Lt,tabIndex:Vn!==!1?Xi:null,onKeyDown:Mo,onFocus:Io,onBlur:Oo,value:"",onChange:xn,"aria-label":"for screen reader"})),nt.createElement("div",{className:"".concat(On,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},nt.createElement("div",{className:"".concat(On,"-indent")},nt.createElement("div",{ref:jo,className:"".concat(On,"-indent-unit")}))),nt.createElement(It.Z,(0,wt.Z)({},Ai,{data:Cn,itemKey:Ae,height:yn,fullHeight:!1,virtual:Kn,itemHeight:Gn,prefixCls:"".concat(On,"-list"),ref:$o,onVisibleChange:function(Ye,zn){var Zn=new Set(Ye),fi=zn.filter(function(Hn){return!Zn.has(Hn)});fi.some(function(Hn){return Ae(Hn)===Se})&&Je()}}),function(We){var Ye=We.pos,zn=(0,wt.Z)({},(gt(We.data),We.data)),Zn=We.title,fi=We.key,Hn=We.isStart,ti=We.isEnd,Qn=(0,Jt.km)(fi,Ye);delete zn.key,delete zn.children;var wi=(0,Jt.H8)(Qn,$n);return nt.createElement(me,(0,wt.Z)({},zn,wi,{title:Zn,active:!!gi&&fi===gi.key,pos:Ye,data:We.data,isStart:Hn,isEnd:ti,motion:Be,motionNodes:fi===Se?ue:null,motionType:Ln,onMotionStart:Do,onMotionEnd:Je,treeNodeRequiredProps:$n,onMouseMove:function(){co(null)}}))}))});bn.displayName="NodeList";var Jn=bn,mn=bt(35654),ui=bt(90782),Ce=bt(67841),ni=10,Pi=function(pn){(0,ve.Z)(On,pn);var Un=(0,Xt.Z)(On);function On(){var we;(0,Pe.Z)(this,On);for(var In=arguments.length,rn=new Array(In),ge=0;ge<In;ge++)rn[ge]=arguments[ge];return we=Un.call.apply(Un,[this].concat(rn)),we.destroyed=!1,we.delayedDragEnterLogic=void 0,we.loadingRetryTimes={},we.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,Jt.w$)()},we.dragStartMousePosition=null,we.dragNode=void 0,we.currentMouseOverDroppableNodeKey=null,we.listRef=nt.createRef(),we.onNodeDragStart=function(oe,Ft){var St=we.state,mt=St.expandedKeys,At=St.keyEntities,Rt=we.props.onDragStart,Lt=Ft.props.eventKey;we.dragNode=Ft,we.dragStartMousePosition={x:oe.clientX,y:oe.clientY};var ae=(0,mn._5)(mt,Lt);we.setState({draggingNodeKey:Lt,dragChildrenKeys:(0,mn.wA)(Lt,At),indent:we.listRef.current.getIndentWidth()}),we.setExpandedKeys(ae),window.addEventListener("dragend",we.onWindowDragEnd),Rt==null||Rt({event:oe,node:(0,Jt.F)(Ft.props)})},we.onNodeDragEnter=function(oe,Ft){var St=we.state,mt=St.expandedKeys,At=St.keyEntities,Rt=St.dragChildrenKeys,Lt=St.flattenNodes,ae=St.indent,De=we.props,Oe=De.onDragEnter,Be=De.onExpand,yn=De.allowDrop,Gn=De.direction,Kn=Ft.props,Vn=Kn.pos,gi=Kn.eventKey,Ti=(0,Le.Z)(we),Xi=Ti.dragNode;if(we.currentMouseOverDroppableNodeKey!==gi&&(we.currentMouseOverDroppableNodeKey=gi),!Xi){we.resetDragState();return}var Mo=(0,mn.OM)(oe,Xi,Ft,ae,we.dragStartMousePosition,yn,Lt,At,mt,Gn),Io=Mo.dropPosition,Oo=Mo.dropLevelOffset,co=Mo.dropTargetKey,Do=Mo.dropContainerKey,Qo=Mo.dropTargetPos,Ai=Mo.dropAllowed,$o=Mo.dragOverNodeKey;if(Rt.indexOf(co)!==-1||!Ai){we.resetDragState();return}if(we.delayedDragEnterLogic||(we.delayedDragEnterLogic={}),Object.keys(we.delayedDragEnterLogic).forEach(function(jo){clearTimeout(we.delayedDragEnterLogic[jo])}),Xi.props.eventKey!==Ft.props.eventKey&&(oe.persist(),we.delayedDragEnterLogic[Vn]=window.setTimeout(function(){if(we.state.draggingNodeKey!==null){var jo=(0,te.Z)(mt),Mt=(0,Ce.Z)(At,Ft.props.eventKey);Mt&&(Mt.children||[]).length&&(jo=(0,mn.L0)(mt,Ft.props.eventKey)),"expandedKeys"in we.props||we.setExpandedKeys(jo),Be==null||Be(jo,{node:(0,Jt.F)(Ft.props),expanded:!0,nativeEvent:oe.nativeEvent})}},800)),Xi.props.eventKey===co&&Oo===0){we.resetDragState();return}we.setState({dragOverNodeKey:$o,dropPosition:Io,dropLevelOffset:Oo,dropTargetKey:co,dropContainerKey:Do,dropTargetPos:Qo,dropAllowed:Ai}),Oe==null||Oe({event:oe,node:(0,Jt.F)(Ft.props),expandedKeys:mt})},we.onNodeDragOver=function(oe,Ft){var St=we.state,mt=St.dragChildrenKeys,At=St.flattenNodes,Rt=St.keyEntities,Lt=St.expandedKeys,ae=St.indent,De=we.props,Oe=De.onDragOver,Be=De.allowDrop,yn=De.direction,Gn=(0,Le.Z)(we),Kn=Gn.dragNode;if(Kn){var Vn=(0,mn.OM)(oe,Kn,Ft,ae,we.dragStartMousePosition,Be,At,Rt,Lt,yn),gi=Vn.dropPosition,Ti=Vn.dropLevelOffset,Xi=Vn.dropTargetKey,Mo=Vn.dropContainerKey,Io=Vn.dropAllowed,Oo=Vn.dropTargetPos,co=Vn.dragOverNodeKey;mt.indexOf(Xi)!==-1||!Io||(Kn.props.eventKey===Xi&&Ti===0?we.state.dropPosition===null&&we.state.dropLevelOffset===null&&we.state.dropTargetKey===null&&we.state.dropContainerKey===null&&we.state.dropTargetPos===null&&we.state.dropAllowed===!1&&we.state.dragOverNodeKey===null||we.resetDragState():gi===we.state.dropPosition&&Ti===we.state.dropLevelOffset&&Xi===we.state.dropTargetKey&&Mo===we.state.dropContainerKey&&Oo===we.state.dropTargetPos&&Io===we.state.dropAllowed&&co===we.state.dragOverNodeKey||we.setState({dropPosition:gi,dropLevelOffset:Ti,dropTargetKey:Xi,dropContainerKey:Mo,dropTargetPos:Oo,dropAllowed:Io,dragOverNodeKey:co}),Oe==null||Oe({event:oe,node:(0,Jt.F)(Ft.props)}))}},we.onNodeDragLeave=function(oe,Ft){we.currentMouseOverDroppableNodeKey===Ft.props.eventKey&&!oe.currentTarget.contains(oe.relatedTarget)&&(we.resetDragState(),we.currentMouseOverDroppableNodeKey=null);var St=we.props.onDragLeave;St==null||St({event:oe,node:(0,Jt.F)(Ft.props)})},we.onWindowDragEnd=function(oe){we.onNodeDragEnd(oe,null,!0),window.removeEventListener("dragend",we.onWindowDragEnd)},we.onNodeDragEnd=function(oe,Ft){var St=we.props.onDragEnd;we.setState({dragOverNodeKey:null}),we.cleanDragState(),St==null||St({event:oe,node:(0,Jt.F)(Ft.props)}),we.dragNode=null,window.removeEventListener("dragend",we.onWindowDragEnd)},we.onNodeDrop=function(oe,Ft){var St,mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,At=we.state,Rt=At.dragChildrenKeys,Lt=At.dropPosition,ae=At.dropTargetKey,De=At.dropTargetPos,Oe=At.dropAllowed;if(Oe){var Be=we.props.onDrop;if(we.setState({dragOverNodeKey:null}),we.cleanDragState(),ae!==null){var yn=(0,Ie.Z)((0,Ie.Z)({},(0,Jt.H8)(ae,we.getTreeNodeRequiredProps())),{},{active:((St=we.getActiveItem())===null||St===void 0?void 0:St.key)===ae,data:(0,Ce.Z)(we.state.keyEntities,ae).node}),Gn=Rt.indexOf(ae)!==-1;(0,et.ZP)(!Gn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Kn=(0,mn.yx)(De),Vn={event:oe,node:(0,Jt.F)(yn),dragNode:we.dragNode?(0,Jt.F)(we.dragNode.props):null,dragNodesKeys:[we.dragNode.props.eventKey].concat(Rt),dropToGap:Lt!==0,dropPosition:Lt+Number(Kn[Kn.length-1])};mt||Be==null||Be(Vn),we.dragNode=null}}},we.cleanDragState=function(){var oe=we.state.draggingNodeKey;oe!==null&&we.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),we.dragStartMousePosition=null,we.currentMouseOverDroppableNodeKey=null},we.triggerExpandActionExpand=function(oe,Ft){var St=we.state,mt=St.expandedKeys,At=St.flattenNodes,Rt=Ft.expanded,Lt=Ft.key,ae=Ft.isLeaf;if(!(ae||oe.shiftKey||oe.metaKey||oe.ctrlKey)){var De=At.filter(function(Be){return Be.key===Lt})[0],Oe=(0,Jt.F)((0,Ie.Z)((0,Ie.Z)({},(0,Jt.H8)(Lt,we.getTreeNodeRequiredProps())),{},{data:De.data}));we.setExpandedKeys(Rt?(0,mn._5)(mt,Lt):(0,mn.L0)(mt,Lt)),we.onNodeExpand(oe,Oe)}},we.onNodeClick=function(oe,Ft){var St=we.props,mt=St.onClick,At=St.expandAction;At==="click"&&we.triggerExpandActionExpand(oe,Ft),mt==null||mt(oe,Ft)},we.onNodeDoubleClick=function(oe,Ft){var St=we.props,mt=St.onDoubleClick,At=St.expandAction;At==="doubleClick"&&we.triggerExpandActionExpand(oe,Ft),mt==null||mt(oe,Ft)},we.onNodeSelect=function(oe,Ft){var St=we.state.selectedKeys,mt=we.state,At=mt.keyEntities,Rt=mt.fieldNames,Lt=we.props,ae=Lt.onSelect,De=Lt.multiple,Oe=Ft.selected,Be=Ft[Rt.key],yn=!Oe;yn?De?St=(0,mn.L0)(St,Be):St=[Be]:St=(0,mn._5)(St,Be);var Gn=St.map(function(Kn){var Vn=(0,Ce.Z)(At,Kn);return Vn?Vn.node:null}).filter(function(Kn){return Kn});we.setUncontrolledState({selectedKeys:St}),ae==null||ae(St,{event:"select",selected:yn,node:Ft,selectedNodes:Gn,nativeEvent:oe.nativeEvent})},we.onNodeCheck=function(oe,Ft,St){var mt=we.state,At=mt.keyEntities,Rt=mt.checkedKeys,Lt=mt.halfCheckedKeys,ae=we.props,De=ae.checkStrictly,Oe=ae.onCheck,Be=Ft.key,yn,Gn={event:"check",node:Ft,checked:St,nativeEvent:oe.nativeEvent};if(De){var Kn=St?(0,mn.L0)(Rt,Be):(0,mn._5)(Rt,Be),Vn=(0,mn._5)(Lt,Be);yn={checked:Kn,halfChecked:Vn},Gn.checkedNodes=Kn.map(function(Oo){return(0,Ce.Z)(At,Oo)}).filter(function(Oo){return Oo}).map(function(Oo){return Oo.node}),we.setUncontrolledState({checkedKeys:Kn})}else{var gi=(0,ui.S)([].concat((0,te.Z)(Rt),[Be]),!0,At),Ti=gi.checkedKeys,Xi=gi.halfCheckedKeys;if(!St){var Mo=new Set(Ti);Mo.delete(Be);var Io=(0,ui.S)(Array.from(Mo),{checked:!1,halfCheckedKeys:Xi},At);Ti=Io.checkedKeys,Xi=Io.halfCheckedKeys}yn=Ti,Gn.checkedNodes=[],Gn.checkedNodesPositions=[],Gn.halfCheckedKeys=Xi,Ti.forEach(function(Oo){var co=(0,Ce.Z)(At,Oo);if(co){var Do=co.node,Qo=co.pos;Gn.checkedNodes.push(Do),Gn.checkedNodesPositions.push({node:Do,pos:Qo})}}),we.setUncontrolledState({checkedKeys:Ti},!1,{halfCheckedKeys:Xi})}Oe==null||Oe(yn,Gn)},we.onNodeLoad=function(oe){var Ft=oe.key,St=new Promise(function(mt,At){we.setState(function(Rt){var Lt=Rt.loadedKeys,ae=Lt===void 0?[]:Lt,De=Rt.loadingKeys,Oe=De===void 0?[]:De,Be=we.props,yn=Be.loadData,Gn=Be.onLoad;if(!yn||ae.indexOf(Ft)!==-1||Oe.indexOf(Ft)!==-1)return null;var Kn=yn(oe);return Kn.then(function(){var Vn=we.state.loadedKeys,gi=(0,mn.L0)(Vn,Ft);Gn==null||Gn(gi,{event:"load",node:oe}),we.setUncontrolledState({loadedKeys:gi}),we.setState(function(Ti){return{loadingKeys:(0,mn._5)(Ti.loadingKeys,Ft)}}),mt()}).catch(function(Vn){if(we.setState(function(Ti){return{loadingKeys:(0,mn._5)(Ti.loadingKeys,Ft)}}),we.loadingRetryTimes[Ft]=(we.loadingRetryTimes[Ft]||0)+1,we.loadingRetryTimes[Ft]>=ni){var gi=we.state.loadedKeys;(0,et.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),we.setUncontrolledState({loadedKeys:(0,mn.L0)(gi,Ft)}),mt()}At(Vn)}),{loadingKeys:(0,mn.L0)(Oe,Ft)}})});return St.catch(function(){}),St},we.onNodeMouseEnter=function(oe,Ft){var St=we.props.onMouseEnter;St==null||St({event:oe,node:Ft})},we.onNodeMouseLeave=function(oe,Ft){var St=we.props.onMouseLeave;St==null||St({event:oe,node:Ft})},we.onNodeContextMenu=function(oe,Ft){var St=we.props.onRightClick;St&&(oe.preventDefault(),St({event:oe,node:Ft}))},we.onFocus=function(){var oe=we.props.onFocus;we.setState({focused:!0});for(var Ft=arguments.length,St=new Array(Ft),mt=0;mt<Ft;mt++)St[mt]=arguments[mt];oe==null||oe.apply(void 0,St)},we.onBlur=function(){var oe=we.props.onBlur;we.setState({focused:!1}),we.onActiveChange(null);for(var Ft=arguments.length,St=new Array(Ft),mt=0;mt<Ft;mt++)St[mt]=arguments[mt];oe==null||oe.apply(void 0,St)},we.getTreeNodeRequiredProps=function(){var oe=we.state,Ft=oe.expandedKeys,St=oe.selectedKeys,mt=oe.loadedKeys,At=oe.loadingKeys,Rt=oe.checkedKeys,Lt=oe.halfCheckedKeys,ae=oe.dragOverNodeKey,De=oe.dropPosition,Oe=oe.keyEntities;return{expandedKeys:Ft||[],selectedKeys:St||[],loadedKeys:mt||[],loadingKeys:At||[],checkedKeys:Rt||[],halfCheckedKeys:Lt||[],dragOverNodeKey:ae,dropPosition:De,keyEntities:Oe}},we.setExpandedKeys=function(oe){var Ft=we.state,St=Ft.treeData,mt=Ft.fieldNames,At=(0,Jt.oH)(St,oe,mt);we.setUncontrolledState({expandedKeys:oe,flattenNodes:At},!0)},we.onNodeExpand=function(oe,Ft){var St=we.state.expandedKeys,mt=we.state,At=mt.listChanging,Rt=mt.fieldNames,Lt=we.props,ae=Lt.onExpand,De=Lt.loadData,Oe=Ft.expanded,Be=Ft[Rt.key];if(!At){var yn=St.indexOf(Be),Gn=!Oe;if((0,et.ZP)(Oe&&yn!==-1||!Oe&&yn===-1,"Expand state not sync with index check"),Gn?St=(0,mn.L0)(St,Be):St=(0,mn._5)(St,Be),we.setExpandedKeys(St),ae==null||ae(St,{node:Ft,expanded:Gn,nativeEvent:oe.nativeEvent}),Gn&&De){var Kn=we.onNodeLoad(Ft);Kn&&Kn.then(function(){var Vn=(0,Jt.oH)(we.state.treeData,St,Rt);we.setUncontrolledState({flattenNodes:Vn})}).catch(function(){var Vn=we.state.expandedKeys,gi=(0,mn._5)(Vn,Be);we.setExpandedKeys(gi)})}}},we.onListChangeStart=function(){we.setUncontrolledState({listChanging:!0})},we.onListChangeEnd=function(){setTimeout(function(){we.setUncontrolledState({listChanging:!1})})},we.onActiveChange=function(oe){var Ft=we.state.activeKey,St=we.props.onActiveChange;Ft!==oe&&(we.setState({activeKey:oe}),oe!==null&&we.scrollTo({key:oe}),St==null||St(oe))},we.getActiveItem=function(){var oe=we.state,Ft=oe.activeKey,St=oe.flattenNodes;return Ft===null?null:St.find(function(mt){var At=mt.key;return At===Ft})||null},we.offsetActiveKey=function(oe){var Ft=we.state,St=Ft.flattenNodes,mt=Ft.activeKey,At=St.findIndex(function(ae){var De=ae.key;return De===mt});At===-1&&oe<0&&(At=St.length),At=(At+oe+St.length)%St.length;var Rt=St[At];if(Rt){var Lt=Rt.key;we.onActiveChange(Lt)}else we.onActiveChange(null)},we.onKeyDown=function(oe){var Ft=we.state,St=Ft.activeKey,mt=Ft.expandedKeys,At=Ft.checkedKeys,Rt=Ft.fieldNames,Lt=we.props,ae=Lt.onKeyDown,De=Lt.checkable,Oe=Lt.selectable;switch(oe.which){case je.Z.UP:{we.offsetActiveKey(-1),oe.preventDefault();break}case je.Z.DOWN:{we.offsetActiveKey(1),oe.preventDefault();break}}var Be=we.getActiveItem();if(Be&&Be.data){var yn=we.getTreeNodeRequiredProps(),Gn=Be.data.isLeaf===!1||!!(Be.data[Rt.children]||[]).length,Kn=(0,Jt.F)((0,Ie.Z)((0,Ie.Z)({},(0,Jt.H8)(St,yn)),{},{data:Be.data,active:!0}));switch(oe.which){case je.Z.LEFT:{Gn&&mt.includes(St)?we.onNodeExpand({},Kn):Be.parent&&we.onActiveChange(Be.parent.key),oe.preventDefault();break}case je.Z.RIGHT:{Gn&&!mt.includes(St)?we.onNodeExpand({},Kn):Be.children&&Be.children.length&&we.onActiveChange(Be.children[0].key),oe.preventDefault();break}case je.Z.ENTER:case je.Z.SPACE:{De&&!Kn.disabled&&Kn.checkable!==!1&&!Kn.disableCheckbox?we.onNodeCheck({},Kn,!At.includes(St)):!De&&Oe&&!Kn.disabled&&Kn.selectable!==!1&&we.onNodeSelect({},Kn);break}}}ae==null||ae(oe)},we.setUncontrolledState=function(oe){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!we.destroyed){var mt=!1,At=!0,Rt={};Object.keys(oe).forEach(function(Lt){if(Lt in we.props){At=!1;return}mt=!0,Rt[Lt]=oe[Lt]}),mt&&(!Ft||At)&&we.setState((0,Ie.Z)((0,Ie.Z)({},Rt),St))}},we.scrollTo=function(oe){we.listRef.current.scrollTo(oe)},we}return(0,Nt.Z)(On,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var In=this.props.activeKey;In!==void 0&&In!==this.state.activeKey&&(this.setState({activeKey:In}),In!==null&&this.scrollTo({key:In}))}},{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 In,rn=this.state,ge=rn.focused,oe=rn.flattenNodes,Ft=rn.keyEntities,St=rn.draggingNodeKey,mt=rn.activeKey,At=rn.dropLevelOffset,Rt=rn.dropContainerKey,Lt=rn.dropTargetKey,ae=rn.dropPosition,De=rn.dragOverNodeKey,Oe=rn.indent,Be=this.props,yn=Be.prefixCls,Gn=Be.className,Kn=Be.style,Vn=Be.showLine,gi=Be.focusable,Ti=Be.tabIndex,Xi=Ti===void 0?0:Ti,Mo=Be.selectable,Io=Be.showIcon,Oo=Be.icon,co=Be.switcherIcon,Do=Be.draggable,Qo=Be.checkable,Ai=Be.checkStrictly,$o=Be.disabled,jo=Be.motion,Mt=Be.loadData,cr=Be.filterTreeNode,ir=Be.height,pr=Be.itemHeight,ts=Be.virtual,rs=Be.titleRender,ls=Be.dropIndicatorRender,Ci=Be.onContextMenu,si=Be.onScroll,Te=Be.direction,Ee=Be.rootClassName,Wt=Be.rootStyle,Ge=(0,Bt.Z)(this.props,{aria:!0,data:!0}),Ue;return Do&&((0,he.Z)(Do)==="object"?Ue=Do:typeof Do=="function"?Ue={nodeDraggable:Do}:Ue={}),nt.createElement(ht.k.Provider,{value:{prefixCls:yn,selectable:Mo,showIcon:Io,icon:Oo,switcherIcon:co,draggable:Ue,draggingNodeKey:St,checkable:Qo,checkStrictly:Ai,disabled:$o,keyEntities:Ft,dropLevelOffset:At,dropContainerKey:Rt,dropTargetKey:Lt,dropPosition:ae,dragOverNodeKey:De,indent:Oe,direction:Te,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:xe()(yn,Gn,Ee,(In={},(0,ee.Z)(In,"".concat(yn,"-show-line"),Vn),(0,ee.Z)(In,"".concat(yn,"-focused"),ge),(0,ee.Z)(In,"".concat(yn,"-active-focused"),mt!==null),In)),style:Wt},nt.createElement(Jn,(0,wt.Z)({ref:this.listRef,prefixCls:yn,style:Kn,data:oe,disabled:$o,selectable:Mo,checkable:!!Qo,motion:jo,dragging:St!==null,height:ir,itemHeight:pr,virtual:ts,focusable:gi,focused:ge,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:si},this.getTreeNodeRequiredProps(),Ge))))}}],[{key:"getDerivedStateFromProps",value:function(In,rn){var ge=rn.prevProps,oe={prevProps:In};function Ft(gi){return!ge&&gi in In||ge&&ge[gi]!==In[gi]}var St,mt=rn.fieldNames;if(Ft("fieldNames")&&(mt=(0,Jt.w$)(In.fieldNames),oe.fieldNames=mt),Ft("treeData")?St=In.treeData:Ft("children")&&((0,et.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),St=(0,Jt.zn)(In.children)),St){oe.treeData=St;var At=(0,Jt.I8)(St,{fieldNames:mt});oe.keyEntities=(0,Ie.Z)((0,ee.Z)({},Se,Xe),At.keyEntities)}var Rt=oe.keyEntities||rn.keyEntities;if(Ft("expandedKeys")||ge&&Ft("autoExpandParent"))oe.expandedKeys=In.autoExpandParent||!ge&&In.defaultExpandParent?(0,mn.r7)(In.expandedKeys,Rt):In.expandedKeys;else if(!ge&&In.defaultExpandAll){var Lt=(0,Ie.Z)({},Rt);delete Lt[Se],oe.expandedKeys=Object.keys(Lt).map(function(gi){return Lt[gi].key})}else!ge&&In.defaultExpandedKeys&&(oe.expandedKeys=In.autoExpandParent||In.defaultExpandParent?(0,mn.r7)(In.defaultExpandedKeys,Rt):In.defaultExpandedKeys);if(oe.expandedKeys||delete oe.expandedKeys,St||oe.expandedKeys){var ae=(0,Jt.oH)(St||rn.treeData,oe.expandedKeys||rn.expandedKeys,mt);oe.flattenNodes=ae}if(In.selectable&&(Ft("selectedKeys")?oe.selectedKeys=(0,mn.BT)(In.selectedKeys,In):!ge&&In.defaultSelectedKeys&&(oe.selectedKeys=(0,mn.BT)(In.defaultSelectedKeys,In))),In.checkable){var De;if(Ft("checkedKeys")?De=(0,mn.E6)(In.checkedKeys)||{}:!ge&&In.defaultCheckedKeys?De=(0,mn.E6)(In.defaultCheckedKeys)||{}:St&&(De=(0,mn.E6)(In.checkedKeys)||{checkedKeys:rn.checkedKeys,halfCheckedKeys:rn.halfCheckedKeys}),De){var Oe=De,Be=Oe.checkedKeys,yn=Be===void 0?[]:Be,Gn=Oe.halfCheckedKeys,Kn=Gn===void 0?[]:Gn;if(!In.checkStrictly){var Vn=(0,ui.S)(yn,!0,Rt);yn=Vn.checkedKeys,Kn=Vn.halfCheckedKeys}oe.checkedKeys=yn,oe.halfCheckedKeys=Kn}}return Ft("loadedKeys")&&(oe.loadedKeys=In.loadedKeys),oe}}]),On}(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 gn=Pi,Tn=gn},35654:function(dn,Mn,bt){"use strict";bt.d(Mn,{BT:function(){return nt},E6:function(){return gt},L0:function(){return Xt},OM:function(){return et},_5:function(){return ve},r7:function(){return yt},wA:function(){return xe},yx:function(){return fe}});var wt=bt(80702),ee=bt(62853),he=bt(48736),Ie=bt(59301),te=bt(39417),Pe=bt(67841),Nt=bt(71430),Le=null;function ve(Pt,Tt){if(!Pt)return[];var It=Pt.slice(),zt=It.indexOf(Tt);return zt>=0&&It.splice(zt,1),It}function Xt(Pt,Tt){var It=(Pt||[]).slice();return It.indexOf(Tt)===-1&&It.push(Tt),It}function fe(Pt){return Pt.split("-")}function xe(Pt,Tt){var It=[],zt=(0,Pe.Z)(Tt,Pt);function _t(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];se.forEach(function(Jt){var le=Jt.key,Zt=Jt.children;It.push(le),_t(Zt)})}return _t(zt.children),It}function je(Pt){if(Pt.parent){var Tt=fe(Pt.pos);return Number(Tt[Tt.length-1])===Pt.parent.children.length-1}return!1}function Bt(Pt){var Tt=fe(Pt.pos);return Number(Tt[Tt.length-1])===0}function et(Pt,Tt,It,zt,_t,se,Jt,le,Zt,Fe){var me,Ve=Pt.clientX,Qe=Pt.clientY,qe=Pt.target.getBoundingClientRect(),vn=qe.top,xn=qe.height,Se=(Fe==="rtl"?-1:1)*(((_t==null?void 0:_t.x)||0)-Ve),Vt=(Se-12)/zt,Xe=(0,Pe.Z)(le,It.props.eventKey);if(Qe<vn+xn/2){var Xn=Jt.findIndex(function(Tn){return Tn.key===Xe.key}),Bn=Xn<=0?0:Xn-1,Ae=Jt[Bn].key;Xe=(0,Pe.Z)(le,Ae)}var hn=Xe.key,bn=Xe,Jn=Xe.key,mn=0,ui=0;if(!Zt.includes(hn))for(var Ce=0;Ce<Vt&&je(Xe);Ce+=1)Xe=Xe.parent,ui+=1;var ni=Tt.props.data,Pi=Xe.node,gn=!0;return Bt(Xe)&&Xe.level===0&&Qe<vn+xn/2&&se({dragNode:ni,dropNode:Pi,dropPosition:-1})&&Xe.key===It.props.eventKey?mn=-1:(bn.children||[]).length&&Zt.includes(Jn)?se({dragNode:ni,dropNode:Pi,dropPosition:0})?mn=0:gn=!1:ui===0?Vt>-1.5?se({dragNode:ni,dropNode:Pi,dropPosition:1})?mn=1:gn=!1:se({dragNode:ni,dropNode:Pi,dropPosition:0})?mn=0:se({dragNode:ni,dropNode:Pi,dropPosition:1})?mn=1:gn=!1:se({dragNode:ni,dropNode:Pi,dropPosition:1})?mn=1:gn=!1,{dropPosition:mn,dropLevelOffset:ui,dropTargetKey:Xe.key,dropTargetPos:Xe.pos,dragOverNodeKey:Jn,dropContainerKey:mn===0?null:((me=Xe.parent)===null||me===void 0?void 0:me.key)||null,dropAllowed:gn}}function nt(Pt,Tt){if(Pt){var It=Tt.multiple;return It?Pt.slice():Pt.length?[Pt[0]]:Pt}}var ht=function(Tt){return Tt};function lt(Pt,Tt){if(!Pt)return[];var It=Tt||{},zt=It.processProps,_t=zt===void 0?ht:zt,se=Array.isArray(Pt)?Pt:[Pt];return se.map(function(Jt){var le=Jt.children,Zt=_objectWithoutProperties(Jt,Le),Fe=lt(le,Tt);return React.createElement(TreeNode,_extends({key:Zt.key},_t(Zt)),Fe)})}function gt(Pt){if(!Pt)return null;var Tt;if(Array.isArray(Pt))Tt={checkedKeys:Pt,halfCheckedKeys:void 0};else if((0,ee.Z)(Pt)==="object")Tt={checkedKeys:Pt.checked||void 0,halfCheckedKeys:Pt.halfChecked||void 0};else return(0,he.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Tt}function yt(Pt,Tt){var It=new Set;function zt(_t){if(!It.has(_t)){var se=(0,Pe.Z)(Tt,_t);if(se){It.add(_t);var Jt=se.parent,le=se.node;le.disabled||Jt&&zt(Jt.key)}}}return(Pt||[]).forEach(function(_t){zt(_t)}),(0,wt.Z)(It)}},90782:function(dn,Mn,bt){"use strict";bt.d(Mn,{S:function(){return Nt}});var wt=bt(48736),ee=bt(67841);function he(Le,ve){var Xt=new Set;return Le.forEach(function(fe){ve.has(fe)||Xt.add(fe)}),Xt}function Ie(Le){var ve=Le||{},Xt=ve.disabled,fe=ve.disableCheckbox,xe=ve.checkable;return!!(Xt||fe)||xe===!1}function te(Le,ve,Xt,fe){for(var xe=new Set(Le),je=new Set,Bt=0;Bt<=Xt;Bt+=1){var et=ve.get(Bt)||new Set;et.forEach(function(gt){var yt=gt.key,Pt=gt.node,Tt=gt.children,It=Tt===void 0?[]:Tt;xe.has(yt)&&!fe(Pt)&&It.filter(function(zt){return!fe(zt.node)}).forEach(function(zt){xe.add(zt.key)})})}for(var nt=new Set,ht=Xt;ht>=0;ht-=1){var lt=ve.get(ht)||new Set;lt.forEach(function(gt){var yt=gt.parent,Pt=gt.node;if(!(fe(Pt)||!gt.parent||nt.has(gt.parent.key))){if(fe(gt.parent.node)){nt.add(yt.key);return}var Tt=!0,It=!1;(yt.children||[]).filter(function(zt){return!fe(zt.node)}).forEach(function(zt){var _t=zt.key,se=xe.has(_t);Tt&&!se&&(Tt=!1),!It&&(se||je.has(_t))&&(It=!0)}),Tt&&xe.add(yt.key),It&&je.add(yt.key),nt.add(yt.key)}})}return{checkedKeys:Array.from(xe),halfCheckedKeys:Array.from(he(je,xe))}}function Pe(Le,ve,Xt,fe,xe){for(var je=new Set(Le),Bt=new Set(ve),et=0;et<=fe;et+=1){var nt=Xt.get(et)||new Set;nt.forEach(function(yt){var Pt=yt.key,Tt=yt.node,It=yt.children,zt=It===void 0?[]:It;!je.has(Pt)&&!Bt.has(Pt)&&!xe(Tt)&&zt.filter(function(_t){return!xe(_t.node)}).forEach(function(_t){je.delete(_t.key)})})}Bt=new Set;for(var ht=new Set,lt=fe;lt>=0;lt-=1){var gt=Xt.get(lt)||new Set;gt.forEach(function(yt){var Pt=yt.parent,Tt=yt.node;if(!(xe(Tt)||!yt.parent||ht.has(yt.parent.key))){if(xe(yt.parent.node)){ht.add(Pt.key);return}var It=!0,zt=!1;(Pt.children||[]).filter(function(_t){return!xe(_t.node)}).forEach(function(_t){var se=_t.key,Jt=je.has(se);It&&!Jt&&(It=!1),!zt&&(Jt||Bt.has(se))&&(zt=!0)}),It||je.delete(Pt.key),zt&&Bt.add(Pt.key),ht.add(Pt.key)}})}return{checkedKeys:Array.from(je),halfCheckedKeys:Array.from(he(Bt,je))}}function Nt(Le,ve,Xt,fe){var xe=[],je;fe?je=fe:je=Ie;var Bt=new Set(Le.filter(function(lt){var gt=!!(0,ee.Z)(Xt,lt);return gt||xe.push(lt),gt})),et=new Map,nt=0;Object.keys(Xt).forEach(function(lt){var gt=Xt[lt],yt=gt.level,Pt=et.get(yt);Pt||(Pt=new Set,et.set(yt,Pt)),Pt.add(gt),nt=Math.max(nt,yt)}),(0,wt.ZP)(!xe.length,"Tree missing follow keys: ".concat(xe.slice(0,100).map(function(lt){return"'".concat(lt,"'")}).join(", ")));var ht;return ve===!0?ht=te(Bt,et,nt,je):ht=Pe(Bt,ve.halfCheckedKeys,et,nt,je),ht}},67841:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return wt}});function wt(ee,he){return ee[he]}},71430:function(dn,Mn,bt){"use strict";bt.d(Mn,{F:function(){return yt},H8:function(){return gt},I8:function(){return lt},km:function(){return xe},oH:function(){return nt},w$:function(){return je},zn:function(){return et}});var wt=bt(62853),ee=bt(80702),he=bt(77321),Ie=bt(74416),te=bt(11592),Pe=bt(2738),Nt=bt(48736),Le=bt(67841),ve=["children"];function Xt(Pt,Tt){return"".concat(Pt,"-").concat(Tt)}function fe(Pt){return Pt&&Pt.type&&Pt.type.isTreeNode}function xe(Pt,Tt){return Pt!=null?Pt:Tt}function je(Pt){var Tt=Pt||{},It=Tt.title,zt=Tt._title,_t=Tt.key,se=Tt.children,Jt=It||"title";return{title:Jt,_title:zt||[Jt],key:_t||"key",children:se||"children"}}function Bt(Pt,Tt){var It=new Map;function zt(_t){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(_t||[]).forEach(function(Jt){var le=Jt[Tt.key],Zt=Jt[Tt.children];warning(le!=null,"Tree node must have a certain key: [".concat(se).concat(le,"]"));var Fe=String(le);warning(!It.has(Fe)||le===null||le===void 0,"Same 'key' exist in the Tree: ".concat(Fe)),It.set(Fe,!0),zt(Zt,"".concat(se).concat(Fe," > "))})}zt(Pt)}function et(Pt){function Tt(It){var zt=(0,te.Z)(It);return zt.map(function(_t){if(!fe(_t))return(0,Nt.ZP)(!_t,"Tree/TreeNode can only accept TreeNode as children."),null;var se=_t.key,Jt=_t.props,le=Jt.children,Zt=(0,Ie.Z)(Jt,ve),Fe=(0,he.Z)({key:se},Zt),me=Tt(le);return me.length&&(Fe.children=me),Fe}).filter(function(_t){return _t})}return Tt(Pt)}function nt(Pt,Tt,It){var zt=je(It),_t=zt._title,se=zt.key,Jt=zt.children,le=new Set(Tt===!0?[]:Tt),Zt=[];function Fe(me){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return me.map(function(Qe,qe){for(var vn=Xt(Ve?Ve.pos:"0",qe),xn=xe(Qe[se],vn),Se,Vt=0;Vt<_t.length;Vt+=1){var Xe=_t[Vt];if(Qe[Xe]!==void 0){Se=Qe[Xe];break}}var Xn=(0,he.Z)((0,he.Z)({},(0,Pe.Z)(Qe,[].concat((0,ee.Z)(_t),[se,Jt]))),{},{title:Se,key:xn,parent:Ve,pos:vn,children:null,data:Qe,isStart:[].concat((0,ee.Z)(Ve?Ve.isStart:[]),[qe===0]),isEnd:[].concat((0,ee.Z)(Ve?Ve.isEnd:[]),[qe===me.length-1])});return Zt.push(Xn),Tt===!0||le.has(xn)?Xn.children=Fe(Qe[Jt]||[],Xn):Xn.children=[],Xn})}return Fe(Pt),Zt}function ht(Pt,Tt,It){var zt={};(0,wt.Z)(It)==="object"?zt=It:zt={externalGetKey:It},zt=zt||{};var _t=zt,se=_t.childrenPropName,Jt=_t.externalGetKey,le=_t.fieldNames,Zt=je(le),Fe=Zt.key,me=Zt.children,Ve=se||me,Qe;Jt?typeof Jt=="string"?Qe=function(xn){return xn[Jt]}:typeof Jt=="function"&&(Qe=function(xn){return Jt(xn)}):Qe=function(xn,Se){return xe(xn[Fe],Se)};function qe(vn,xn,Se,Vt){var Xe=vn?vn[Ve]:Pt,Xn=vn?Xt(Se.pos,xn):"0",Bn=vn?[].concat((0,ee.Z)(Vt),[vn]):[];if(vn){var Ae=Qe(vn,Xn),hn={node:vn,index:xn,pos:Xn,key:Ae,parentPos:Se.node?Se.pos:null,level:Se.level+1,nodes:Bn};Tt(hn)}Xe&&Xe.forEach(function(bn,Jn){qe(bn,Jn,{node:vn,pos:Xn,level:Se?Se.level+1:-1},Bn)})}qe(null)}function lt(Pt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},It=Tt.initWrapper,zt=Tt.processEntity,_t=Tt.onProcessFinished,se=Tt.externalGetKey,Jt=Tt.childrenPropName,le=Tt.fieldNames,Zt=arguments.length>2?arguments[2]:void 0,Fe=se||Zt,me={},Ve={},Qe={posEntities:me,keyEntities:Ve};return It&&(Qe=It(Qe)||Qe),ht(Pt,function(qe){var vn=qe.node,xn=qe.index,Se=qe.pos,Vt=qe.key,Xe=qe.parentPos,Xn=qe.level,Bn=qe.nodes,Ae={node:vn,nodes:Bn,index:xn,key:Vt,pos:Se,level:Xn},hn=xe(Vt,Se);me[Se]=Ae,Ve[hn]=Ae,Ae.parent=me[Xe],Ae.parent&&(Ae.parent.children=Ae.parent.children||[],Ae.parent.children.push(Ae)),zt&&zt(Ae,Qe)},{externalGetKey:Fe,childrenPropName:Jt,fieldNames:le}),_t&&_t(Qe),Qe}function gt(Pt,Tt){var It=Tt.expandedKeys,zt=Tt.selectedKeys,_t=Tt.loadedKeys,se=Tt.loadingKeys,Jt=Tt.checkedKeys,le=Tt.halfCheckedKeys,Zt=Tt.dragOverNodeKey,Fe=Tt.dropPosition,me=Tt.keyEntities,Ve=(0,Le.Z)(me,Pt),Qe={eventKey:Pt,expanded:It.indexOf(Pt)!==-1,selected:zt.indexOf(Pt)!==-1,loaded:_t.indexOf(Pt)!==-1,loading:se.indexOf(Pt)!==-1,checked:Jt.indexOf(Pt)!==-1,halfChecked:le.indexOf(Pt)!==-1,pos:String(Ve?Ve.pos:""),dragOver:Zt===Pt&&Fe===0,dragOverGapTop:Zt===Pt&&Fe===-1,dragOverGapBottom:Zt===Pt&&Fe===1};return Qe}function yt(Pt){var Tt=Pt.data,It=Pt.expanded,zt=Pt.selected,_t=Pt.checked,se=Pt.loaded,Jt=Pt.loading,le=Pt.halfChecked,Zt=Pt.dragOver,Fe=Pt.dragOverGapTop,me=Pt.dragOverGapBottom,Ve=Pt.pos,Qe=Pt.active,qe=Pt.eventKey,vn=(0,he.Z)((0,he.Z)({},Tt),{},{expanded:It,selected:zt,checked:_t,loaded:se,loading:Jt,halfChecked:le,dragOver:Zt,dragOverGapTop:Fe,dragOverGapBottom:me,pos:Ve,active:Qe,key:qe});return"props"in vn||Object.defineProperty(vn,"props",{get:function(){return(0,Nt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Pt}}),vn}},24514:function(dn,Mn,bt){"use strict";bt.d(Mn,{G:function(){return Ie}});var wt=bt(47273),ee=function(Pe){if((0,wt.Z)()&&window.document.documentElement){var Nt=Array.isArray(Pe)?Pe:[Pe],Le=window.document.documentElement;return Nt.some(function(ve){return ve in Le.style})}return!1},he=function(Pe,Nt){if(!ee(Pe))return!1;var Le=document.createElement("div"),ve=Le.style[Pe];return Le.style[Pe]=Nt,Le.style[Pe]!==ve};function Ie(te,Pe){return!Array.isArray(te)&&Pe!==void 0?he(te,Pe):ee(te)}},45680:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Pi}});var wt=bt(72308),ee=bt(62853),he=bt(77321),Ie=bt(49618),te=bt(52487),Pe=bt(74416),Nt=bt(92310),Le=bt.n(Nt),ve=bt(29301),Xt=bt(70425),fe=bt(34280),xe=bt(59301),je=bt(4676),Bt=xe.forwardRef(function(gn,Tn){var pn=gn.height,Un=gn.offsetY,On=gn.offsetX,we=gn.children,In=gn.prefixCls,rn=gn.onInnerResize,ge=gn.innerProps,oe=gn.rtl,Ft=gn.extra,St={},mt={display:"flex",flexDirection:"column"};return Un!==void 0&&(St={height:pn,position:"relative",overflow:"hidden"},mt=(0,he.Z)((0,he.Z)({},mt),{},(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({transform:"translateY(".concat(Un,"px)")},oe?"marginRight":"marginLeft",-On),"position","absolute"),"left",0),"right",0),"top",0))),xe.createElement("div",{style:St},xe.createElement(ve.Z,{onResize:function(Rt){var Lt=Rt.offsetHeight;Lt&&rn&&rn()}},xe.createElement("div",(0,wt.Z)({style:mt,className:Le()((0,Ie.Z)({},"".concat(In,"-holder-inner"),In)),ref:Tn},ge),we,Ft)))});Bt.displayName="Filler";var et=Bt;function nt(gn){var Tn=gn.children,pn=gn.setRef,Un=xe.useCallback(function(On){pn(On)},[]);return xe.cloneElement(Tn,{ref:Un})}function ht(gn,Tn,pn,Un,On,we,In,rn){var ge=rn.getKey;return gn.slice(Tn,pn+1).map(function(oe,Ft){var St=Tn+Ft,mt=In(oe,St,{style:{width:Un},offsetX:On}),At=ge(oe);return xe.createElement(nt,{key:At,setRef:function(Lt){return we(oe,Lt)}},mt)})}function lt(gn,Tn,pn,Un){var On=pn-gn,we=Tn-pn,In=Math.min(On,we)*2;if(Un<=In){var rn=Math.floor(Un/2);return Un%2?pn+rn+1:pn-rn}return On>we?pn-(Un-we):pn+(Un-On)}function gt(gn,Tn,pn){var Un=gn.length,On=Tn.length,we,In;if(Un===0&&On===0)return null;Un<On?(we=gn,In=Tn):(we=Tn,In=gn);var rn={__EMPTY_ITEM__:!0};function ge(Rt){return Rt!==void 0?pn(Rt):rn}for(var oe=null,Ft=Math.abs(Un-On)!==1,St=0;St<In.length;St+=1){var mt=ge(we[St]),At=ge(In[St]);if(mt!==At){oe=St,Ft=Ft||mt!==ge(In[St+1]);break}}return oe===null?null:{index:oe,multiple:Ft}}function yt(gn,Tn,pn){var Un=xe.useState(gn),On=(0,te.Z)(Un,2),we=On[0],In=On[1],rn=xe.useState(null),ge=(0,te.Z)(rn,2),oe=ge[0],Ft=ge[1];return xe.useEffect(function(){var St=gt(we||[],gn||[],Tn);(St==null?void 0:St.index)!==void 0&&(pn==null||pn(St.index),Ft(gn[St.index])),In(gn)},[gn]),[oe]}var Pt=bt(16089),Tt=(typeof navigator=="undefined"?"undefined":(0,ee.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),It=Tt,zt=function(gn,Tn,pn,Un){var On=(0,xe.useRef)(!1),we=(0,xe.useRef)(null);function In(){clearTimeout(we.current),On.current=!0,we.current=setTimeout(function(){On.current=!1},50)}var rn=(0,xe.useRef)({top:gn,bottom:Tn,left:pn,right:Un});return rn.current.top=gn,rn.current.bottom=Tn,rn.current.left=pn,rn.current.right=Un,function(ge,oe){var Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,St=ge?oe<0&&rn.current.left||oe>0&&rn.current.right:oe<0&&rn.current.top||oe>0&&rn.current.bottom;return Ft&&St?(clearTimeout(we.current),On.current=!1):(!St||On.current)&&In(),!On.current&&St}};function _t(gn,Tn,pn,Un,On,we,In){var rn=(0,xe.useRef)(0),ge=(0,xe.useRef)(null),oe=(0,xe.useRef)(null),Ft=(0,xe.useRef)(!1),St=zt(Tn,pn,Un,On);function mt(Oe,Be){if(Pt.Z.cancel(ge.current),!St(!1,Be)){var yn=Oe;if(!yn._virtualHandled)yn._virtualHandled=!0;else return;rn.current+=Be,oe.current=Be,It||yn.preventDefault(),ge.current=(0,Pt.Z)(function(){var Gn=Ft.current?10:1;In(rn.current*Gn,!1),rn.current=0})}}function At(Oe,Be){In(Be,!0),It||Oe.preventDefault()}var Rt=(0,xe.useRef)(null),Lt=(0,xe.useRef)(null);function ae(Oe){if(gn){Pt.Z.cancel(Lt.current),Lt.current=(0,Pt.Z)(function(){Rt.current=null},2);var Be=Oe.deltaX,yn=Oe.deltaY,Gn=Oe.shiftKey,Kn=Be,Vn=yn;(Rt.current==="sx"||!Rt.current&&Gn&&yn&&!Be)&&(Kn=yn,Vn=0,Rt.current="sx");var gi=Math.abs(Kn),Ti=Math.abs(Vn);Rt.current===null&&(Rt.current=we&&gi>Ti?"x":"y"),Rt.current==="y"?mt(Oe,Vn):At(Oe,Kn)}}function De(Oe){gn&&(Ft.current=Oe.detail===oe.current)}return[ae,De]}function se(gn,Tn,pn,Un){var On=xe.useMemo(function(){return[new Map,[]]},[gn,pn.id,Un]),we=(0,te.Z)(On,2),In=we[0],rn=we[1],ge=function(Ft){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ft,mt=In.get(Ft),At=In.get(St);if(mt===void 0||At===void 0)for(var Rt=gn.length,Lt=rn.length;Lt<Rt;Lt+=1){var ae,De=gn[Lt],Oe=Tn(De);In.set(Oe,Lt);var Be=(ae=pn.get(Oe))!==null&&ae!==void 0?ae:Un;if(rn[Lt]=(rn[Lt-1]||0)+Be,Oe===Ft&&(mt=Lt),Oe===St&&(At=Lt),mt!==void 0&&At!==void 0)break}return{top:rn[mt-1]||0,bottom:rn[At]}};return ge}var Jt=bt(96949),le=bt(55090),Zt=function(){function gn(){(0,Jt.Z)(this,gn),(0,Ie.Z)(this,"maps",void 0),(0,Ie.Z)(this,"id",0),(0,Ie.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,le.Z)(gn,[{key:"set",value:function(pn,Un){this.maps[pn]=Un,this.id+=1,this.diffKeys.add(pn)}},{key:"get",value:function(pn){return this.maps[pn]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),gn}(),Fe=Zt;function me(gn){var Tn=parseFloat(gn);return isNaN(Tn)?0:Tn}function Ve(gn,Tn,pn){var Un=xe.useState(0),On=(0,te.Z)(Un,2),we=On[0],In=On[1],rn=(0,xe.useRef)(new Map),ge=(0,xe.useRef)(new Fe),oe=(0,xe.useRef)(0);function Ft(){oe.current+=1}function St(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ft();var Rt=function(){var De=!1;rn.current.forEach(function(Oe,Be){if(Oe&&Oe.offsetParent){var yn=Oe.offsetHeight,Gn=getComputedStyle(Oe),Kn=Gn.marginTop,Vn=Gn.marginBottom,gi=me(Kn),Ti=me(Vn),Xi=yn+gi+Ti;ge.current.get(Be)!==Xi&&(ge.current.set(Be,Xi),De=!0)}}),De&&In(function(Oe){return Oe+1})};if(At)Rt();else{oe.current+=1;var Lt=oe.current;Promise.resolve().then(function(){Lt===oe.current&&Rt()})}}function mt(At,Rt){var Lt=gn(At),ae=rn.current.get(Lt);Rt?(rn.current.set(Lt,Rt),St()):rn.current.delete(Lt),!ae!=!Rt&&(Rt?Tn==null||Tn(At):pn==null||pn(At))}return(0,xe.useEffect)(function(){return Ft},[]),[mt,St,ge.current,we]}var Qe=14/15;function qe(gn,Tn,pn){var Un=(0,xe.useRef)(!1),On=(0,xe.useRef)(0),we=(0,xe.useRef)(0),In=(0,xe.useRef)(null),rn=(0,xe.useRef)(null),ge,oe=function(At){if(Un.current){var Rt=Math.ceil(At.touches[0].pageX),Lt=Math.ceil(At.touches[0].pageY),ae=On.current-Rt,De=we.current-Lt,Oe=Math.abs(ae)>Math.abs(De);Oe?On.current=Rt:we.current=Lt;var Be=pn(Oe,Oe?ae:De,!1,At);Be&&At.preventDefault(),clearInterval(rn.current),Be&&(rn.current=setInterval(function(){Oe?ae*=Qe:De*=Qe;var yn=Math.floor(Oe?ae:De);(!pn(Oe,yn,!0)||Math.abs(yn)<=.1)&&clearInterval(rn.current)},16))}},Ft=function(){Un.current=!1,ge()},St=function(At){ge(),At.touches.length===1&&!Un.current&&(Un.current=!0,On.current=Math.ceil(At.touches[0].pageX),we.current=Math.ceil(At.touches[0].pageY),In.current=At.target,In.current.addEventListener("touchmove",oe,{passive:!1}),In.current.addEventListener("touchend",Ft,{passive:!0}))};ge=function(){In.current&&(In.current.removeEventListener("touchmove",oe),In.current.removeEventListener("touchend",Ft))},(0,fe.Z)(function(){return gn&&Tn.current.addEventListener("touchstart",St,{passive:!0}),function(){var mt;(mt=Tn.current)===null||mt===void 0||mt.removeEventListener("touchstart",St),ge(),clearInterval(rn.current)}},[gn])}function vn(gn){return Math.floor(Math.pow(gn,.5))}function xn(gn,Tn){var pn="touches"in gn?gn.touches[0]:gn;return pn[Tn?"pageX":"pageY"]-window[Tn?"scrollX":"scrollY"]}function Se(gn,Tn,pn){xe.useEffect(function(){var Un=Tn.current;if(gn&&Un){var On=!1,we,In,rn=function(){Pt.Z.cancel(we)},ge=function mt(){rn(),we=(0,Pt.Z)(function(){pn(In),mt()})},oe=function(At){if(!(At.target.draggable||At.button!==0)){var Rt=At;Rt._virtualHandled||(Rt._virtualHandled=!0,On=!0)}},Ft=function(){On=!1,rn()},St=function(At){if(On){var Rt=xn(At,!1),Lt=Un.getBoundingClientRect(),ae=Lt.top,De=Lt.bottom;if(Rt<=ae){var Oe=ae-Rt;In=-vn(Oe),ge()}else if(Rt>=De){var Be=Rt-De;In=vn(Be),ge()}else rn()}};return Un.addEventListener("mousedown",oe),Un.ownerDocument.addEventListener("mouseup",Ft),Un.ownerDocument.addEventListener("mousemove",St),function(){Un.removeEventListener("mousedown",oe),Un.ownerDocument.removeEventListener("mouseup",Ft),Un.ownerDocument.removeEventListener("mousemove",St),rn()}}},[gn])}var Vt=10;function Xe(gn,Tn,pn,Un,On,we,In,rn){var ge=xe.useRef(),oe=xe.useState(null),Ft=(0,te.Z)(oe,2),St=Ft[0],mt=Ft[1];return(0,fe.Z)(function(){if(St&&St.times<Vt){if(!gn.current){mt(function(jo){return(0,he.Z)({},jo)});return}we();var At=St.targetAlign,Rt=St.originAlign,Lt=St.index,ae=St.offset,De=gn.current.clientHeight,Oe=!1,Be=At,yn=null;if(De){for(var Gn=At||Rt,Kn=0,Vn=0,gi=0,Ti=Math.min(Tn.length-1,Lt),Xi=0;Xi<=Ti;Xi+=1){var Mo=On(Tn[Xi]);Vn=Kn;var Io=pn.get(Mo);gi=Vn+(Io===void 0?Un:Io),Kn=gi}for(var Oo=Gn==="top"?ae:De-ae,co=Ti;co>=0;co-=1){var Do=On(Tn[co]),Qo=pn.get(Do);if(Qo===void 0){Oe=!0;break}if(Oo-=Qo,Oo<=0)break}switch(Gn){case"top":yn=Vn-ae;break;case"bottom":yn=gi-De+ae;break;default:{var Ai=gn.current.scrollTop,$o=Ai+De;Vn<Ai?Be="top":gi>$o&&(Be="bottom")}}yn!==null&&In(yn),yn!==St.lastTop&&(Oe=!0)}Oe&&mt((0,he.Z)((0,he.Z)({},St),{},{times:St.times+1,targetAlign:Be,lastTop:yn}))}},[St,gn.current]),function(At){if(At==null){rn();return}if(Pt.Z.cancel(ge.current),typeof At=="number")In(At);else if(At&&(0,ee.Z)(At)==="object"){var Rt,Lt=At.align;"index"in At?Rt=At.index:Rt=Tn.findIndex(function(Oe){return On(Oe)===At.key});var ae=At.offset,De=ae===void 0?0:ae;mt({times:0,index:Rt,offset:De,originAlign:Lt})}}}var Xn=xe.forwardRef(function(gn,Tn){var pn=gn.prefixCls,Un=gn.rtl,On=gn.scrollOffset,we=gn.scrollRange,In=gn.onStartMove,rn=gn.onStopMove,ge=gn.onScroll,oe=gn.horizontal,Ft=gn.spinSize,St=gn.containerSize,mt=gn.style,At=gn.thumbStyle,Rt=gn.showScrollBar,Lt=xe.useState(!1),ae=(0,te.Z)(Lt,2),De=ae[0],Oe=ae[1],Be=xe.useState(null),yn=(0,te.Z)(Be,2),Gn=yn[0],Kn=yn[1],Vn=xe.useState(null),gi=(0,te.Z)(Vn,2),Ti=gi[0],Xi=gi[1],Mo=!Un,Io=xe.useRef(),Oo=xe.useRef(),co=xe.useState(Rt),Do=(0,te.Z)(co,2),Qo=Do[0],Ai=Do[1],$o=xe.useRef(),jo=function(){Rt===!0||Rt===!1||(clearTimeout($o.current),Ai(!0),$o.current=setTimeout(function(){Ai(!1)},3e3))},Mt=we-St||0,cr=St-Ft||0,ir=xe.useMemo(function(){if(On===0||Mt===0)return 0;var Wt=On/Mt;return Wt*cr},[On,Mt,cr]),pr=function(Ge){Ge.stopPropagation(),Ge.preventDefault()},ts=xe.useRef({top:ir,dragging:De,pageY:Gn,startTop:Ti});ts.current={top:ir,dragging:De,pageY:Gn,startTop:Ti};var rs=function(Ge){Oe(!0),Kn(xn(Ge,oe)),Xi(ts.current.top),In(),Ge.stopPropagation(),Ge.preventDefault()};xe.useEffect(function(){var Wt=function(qt){qt.preventDefault()},Ge=Io.current,Ue=Oo.current;return Ge.addEventListener("touchstart",Wt,{passive:!1}),Ue.addEventListener("touchstart",rs,{passive:!1}),function(){Ge.removeEventListener("touchstart",Wt),Ue.removeEventListener("touchstart",rs)}},[]);var ls=xe.useRef();ls.current=Mt;var Ci=xe.useRef();Ci.current=cr,xe.useEffect(function(){if(De){var Wt,Ge=function(qt){var ze=ts.current,sn=ze.dragging,Ln=ze.pageY,Nn=ze.startTop;Pt.Z.cancel(Wt);var ie=Io.current.getBoundingClientRect(),Je=St/(oe?ie.width:ie.height);if(sn){var Cn=(xn(qt,oe)-Ln)*Je,$n=Nn;!Mo&&oe?$n-=Cn:$n+=Cn;var We=ls.current,Ye=Ci.current,zn=Ye?$n/Ye:0,Zn=Math.ceil(zn*We);Zn=Math.max(Zn,0),Zn=Math.min(Zn,We),Wt=(0,Pt.Z)(function(){ge(Zn,oe)})}},Ue=function(){Oe(!1),rn()};return window.addEventListener("mousemove",Ge,{passive:!0}),window.addEventListener("touchmove",Ge,{passive:!0}),window.addEventListener("mouseup",Ue,{passive:!0}),window.addEventListener("touchend",Ue,{passive:!0}),function(){window.removeEventListener("mousemove",Ge),window.removeEventListener("touchmove",Ge),window.removeEventListener("mouseup",Ue),window.removeEventListener("touchend",Ue),Pt.Z.cancel(Wt)}}},[De]),xe.useEffect(function(){return jo(),function(){clearTimeout($o.current)}},[On]),xe.useImperativeHandle(Tn,function(){return{delayHidden:jo}});var si="".concat(pn,"-scrollbar"),Te={position:"absolute",visibility:Qo?null:"hidden"},Ee={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return oe?(Te.height=8,Te.left=0,Te.right=0,Te.bottom=0,Ee.height="100%",Ee.width=Ft,Mo?Ee.left=ir:Ee.right=ir):(Te.width=8,Te.top=0,Te.bottom=0,Mo?Te.right=0:Te.left=0,Ee.width="100%",Ee.height=Ft,Ee.top=ir),xe.createElement("div",{ref:Io,className:Le()(si,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(si,"-horizontal"),oe),"".concat(si,"-vertical"),!oe),"".concat(si,"-visible"),Qo)),style:(0,he.Z)((0,he.Z)({},Te),mt),onMouseDown:pr,onMouseMove:jo},xe.createElement("div",{ref:Oo,className:Le()("".concat(si,"-thumb"),(0,Ie.Z)({},"".concat(si,"-thumb-moving"),De)),style:(0,he.Z)((0,he.Z)({},Ee),At),onMouseDown:rs}))}),Bn=Xn,Ae=20;function hn(){var gn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,pn=gn/Tn*gn;return isNaN(pn)&&(pn=0),pn=Math.max(pn,Ae),Math.floor(pn)}var bn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Jn=[],mn={overflowY:"auto",overflowAnchor:"none"};function ui(gn,Tn){var pn=gn.prefixCls,Un=pn===void 0?"rc-virtual-list":pn,On=gn.className,we=gn.height,In=gn.itemHeight,rn=gn.fullHeight,ge=rn===void 0?!0:rn,oe=gn.style,Ft=gn.data,St=gn.children,mt=gn.itemKey,At=gn.virtual,Rt=gn.direction,Lt=gn.scrollWidth,ae=gn.component,De=ae===void 0?"div":ae,Oe=gn.onScroll,Be=gn.onVirtualScroll,yn=gn.onVisibleChange,Gn=gn.innerProps,Kn=gn.extraRender,Vn=gn.styles,gi=gn.showScrollBar,Ti=gi===void 0?"optional":gi,Xi=(0,Pe.Z)(gn,bn),Mo=xe.useCallback(function(no){return typeof mt=="function"?mt(no):no==null?void 0:no[mt]},[mt]),Io=Ve(Mo,null,null),Oo=(0,te.Z)(Io,4),co=Oo[0],Do=Oo[1],Qo=Oo[2],Ai=Oo[3],$o=!!(At!==!1&&we&&In),jo=xe.useMemo(function(){return Object.values(Qo.maps).reduce(function(no,$i){return no+$i},0)},[Qo.id,Qo.maps]),Mt=$o&&Ft&&(Math.max(In*Ft.length,jo)>we||!!Lt),cr=Rt==="rtl",ir=Le()(Un,(0,Ie.Z)({},"".concat(Un,"-rtl"),cr),On),pr=Ft||Jn,ts=(0,xe.useRef)(),rs=(0,xe.useRef)(),ls=(0,xe.useRef)(),Ci=(0,xe.useState)(0),si=(0,te.Z)(Ci,2),Te=si[0],Ee=si[1],Wt=(0,xe.useState)(0),Ge=(0,te.Z)(Wt,2),Ue=Ge[0],ue=Ge[1],qt=(0,xe.useState)(!1),ze=(0,te.Z)(qt,2),sn=ze[0],Ln=ze[1],Nn=function(){Ln(!0)},ie=function(){Ln(!1)},Je={getKey:Mo};function Cn(no){Ee(function($i){var Zo;typeof no=="function"?Zo=no($i):Zo=no;var ro=mi(Zo);return ts.current.scrollTop=ro,ro})}var $n=(0,xe.useRef)({start:0,end:pr.length}),We=(0,xe.useRef)(),Ye=yt(pr,Mo),zn=(0,te.Z)(Ye,1),Zn=zn[0];We.current=Zn;var fi=xe.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,Zo,ro,lr,ms=pr.length,Ji=0;Ji<ms;Ji+=1){var Bi=pr[Ji],En=Mo(Bi),Ki=Qo.get(En),qo=$i+(Ki===void 0?In:Ki);qo>=Te&&Zo===void 0&&(Zo=Ji,ro=$i),qo>Te+we&&lr===void 0&&(lr=Ji),$i=qo}return Zo===void 0&&(Zo=0,ro=0,lr=Math.ceil(we/In)),lr===void 0&&(lr=pr.length-1),lr=Math.min(lr+1,pr.length-1),{scrollHeight:$i,start:Zo,end:lr,offset:ro}},[Mt,$o,Te,pr,Ai,we]),Hn=fi.scrollHeight,ti=fi.start,Qn=fi.end,wi=fi.offset;$n.current.start=ti,$n.current.end=Qn,xe.useLayoutEffect(function(){var no=Qo.getRecord();if(no.size===1){var $i=Array.from(no)[0],Zo=pr[ti];if(Zo){var ro=Mo(Zo);if(ro===$i){var lr=Qo.get($i),ms=lr-In;Cn(function(Ji){return Ji+ms})}}}Qo.resetRecord()},[Hn]);var Qi=xe.useState({width:0,height:we}),qi=(0,te.Z)(Qi,2),_e=qi[0],lo=qi[1],Eo=function($i){lo({width:$i.offsetWidth,height:$i.offsetHeight})},zo=(0,xe.useRef)(),Ze=(0,xe.useRef)(),jn=xe.useMemo(function(){return hn(_e.width,Lt)},[_e.width,Lt]),ei=xe.useMemo(function(){return hn(_e.height,Hn)},[_e.height,Hn]),Mi=Hn-we,vi=(0,xe.useRef)(Mi);vi.current=Mi;function mi(no){var $i=no;return Number.isNaN(vi.current)||($i=Math.min($i,vi.current)),$i=Math.max($i,0),$i}var Ui=Te<=0,ki=Te>=Mi,Hi=Ue<=0,uo=Ue>=Lt,un=zt(Ui,ki,Hi,uo),Jo=function(){return{x:cr?-Ue:Ue,y:Te}},nn=(0,xe.useRef)(Jo()),ho=(0,Xt.useEvent)(function(no){if(Be){var $i=(0,he.Z)((0,he.Z)({},Jo()),no);(nn.current.x!==$i.x||nn.current.y!==$i.y)&&(Be($i),nn.current=$i)}});function Er(no,$i){var Zo=no;$i?((0,je.flushSync)(function(){ue(Zo)}),ho()):Cn(Zo)}function Ho(no){var $i=no.currentTarget.scrollTop;$i!==Te&&Cn($i),Oe==null||Oe(no),ho()}var Fr=function($i){var Zo=$i,ro=Lt?Lt-_e.width:0;return Zo=Math.max(Zo,0),Zo=Math.min(Zo,ro),Zo},mr=(0,Xt.useEvent)(function(no,$i){$i?((0,je.flushSync)(function(){ue(function(Zo){var ro=Zo+(cr?-no:no);return Fr(ro)})}),ho()):Cn(function(Zo){var ro=Zo+no;return ro})}),Oi=_t($o,Ui,ki,Hi,uo,!!Lt,mr),Li=(0,te.Z)(Oi,2),So=Li[0],ko=Li[1];qe($o,ts,function(no,$i,Zo,ro){var lr=ro;return un(no,$i,Zo)?!1:!lr||!lr._virtualHandled?(lr&&(lr._virtualHandled=!0),So({preventDefault:function(){},deltaX:no?$i:0,deltaY:no?0:$i}),!0):!1}),Se(Mt,ts,function(no){Cn(function($i){return $i+no})}),(0,fe.Z)(function(){function no(Zo){var ro=Ui&&Zo.detail<0,lr=ki&&Zo.detail>0;$o&&!ro&&!lr&&Zo.preventDefault()}var $i=ts.current;return $i.addEventListener("wheel",So,{passive:!1}),$i.addEventListener("DOMMouseScroll",ko,{passive:!0}),$i.addEventListener("MozMousePixelScroll",no,{passive:!1}),function(){$i.removeEventListener("wheel",So),$i.removeEventListener("DOMMouseScroll",ko),$i.removeEventListener("MozMousePixelScroll",no)}},[$o,Ui,ki]),(0,fe.Z)(function(){if(Lt){var no=Fr(Ue);ue(no),ho({x:no})}},[_e.width,Lt]);var _n=function(){var $i,Zo;($i=zo.current)===null||$i===void 0||$i.delayHidden(),(Zo=Ze.current)===null||Zo===void 0||Zo.delayHidden()},jt=Xe(ts,pr,Qo,In,Mo,function(){return Do(!0)},Cn,_n);xe.useImperativeHandle(Tn,function(){return{nativeElement:ls.current,getScrollInfo:Jo,scrollTo:function($i){function Zo(ro){return ro&&(0,ee.Z)(ro)==="object"&&("left"in ro||"top"in ro)}Zo($i)?($i.left!==void 0&&ue(Fr($i.left)),jt($i.top)):jt($i)}}}),(0,fe.Z)(function(){if(yn){var no=pr.slice(ti,Qn+1);yn(no,pr)}},[ti,Qn,pr]);var _o=se(pr,Mo,Qo,In),xr=Kn==null?void 0:Kn({start:ti,end:Qn,virtual:Mt,offsetX:Ue,offsetY:wi,rtl:cr,getSize:_o}),es=ht(pr,ti,Qn,Lt,Ue,co,St,Je),cs=null;we&&(cs=(0,he.Z)((0,Ie.Z)({},ge?"height":"maxHeight",we),mn),$o&&(cs.overflowY="hidden",Lt&&(cs.overflowX="hidden"),sn&&(cs.pointerEvents="none")));var us={};return cr&&(us.dir="rtl"),xe.createElement("div",(0,wt.Z)({ref:ls,style:(0,he.Z)((0,he.Z)({},oe),{},{position:"relative"}),className:ir},us,Xi),xe.createElement(ve.Z,{onResize:Eo},xe.createElement(De,{className:"".concat(Un,"-holder"),style:cs,ref:ts,onScroll:Ho,onMouseEnter:_n},xe.createElement(et,{prefixCls:Un,height:Hn,offsetX:Ue,offsetY:wi,scrollWidth:Lt,onInnerResize:Do,ref:rs,innerProps:Gn,rtl:cr,extra:xr},es))),Mt&&Hn>we&&xe.createElement(Bn,{ref:zo,prefixCls:Un,scrollOffset:Te,scrollRange:Hn,rtl:cr,onScroll:Er,onStartMove:Nn,onStopMove:ie,spinSize:ei,containerSize:_e.height,style:Vn==null?void 0:Vn.verticalScrollBar,thumbStyle:Vn==null?void 0:Vn.verticalScrollBarThumb,showScrollBar:Ti}),Mt&&Lt>_e.width&&xe.createElement(Bn,{ref:Ze,prefixCls:Un,scrollOffset:Ue,scrollRange:Lt,rtl:cr,onScroll:Er,onStartMove:Nn,onStopMove:ie,spinSize:jn,containerSize:_e.width,horizontal:!0,style:Vn==null?void 0:Vn.horizontalScrollBar,thumbStyle:Vn==null?void 0:Vn.horizontalScrollBarThumb,showScrollBar:Ti}))}var Ce=xe.forwardRef(ui);Ce.displayName="List";var ni=Ce,Pi=ni},90034:function(dn,Mn,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 ee(Ie){var te=he(Ie);return bt(te)}function he(Ie){if(!bt.o(wt,Ie)){var te=new Error("Cannot find module '"+Ie+"'");throw te.code="MODULE_NOT_FOUND",te}return wt[Ie]}ee.keys=function(){return Object.keys(wt)},ee.resolve=he,dn.exports=ee,ee.id=90034},93314:function(dn){"use strict";dn.exports="data:image/png;base64,iV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onOuo63d02OiCywsLHQsFoprCoVCVg9DdbR7AzffNDChQyusBvLsC7nsUiGT0yGRFUODWatz2OqTw4GDE1wdyApPvKPDgwP9YpH9QJ7LjUkmc5sOiWLm7R0aHBgVi6wH8vfncyNeMbNPh0Sxsv0GHawHAgcO5sb1pYaEKDb2Vw9IJJCDB3P950QmMpLp0UOiuuh7jxd7VsrwwMBAXg+tSiQQwBmtxYKMMxKqB+LobJdRm6d2yyUWCORyud75s7JbX3anHhJVydu7bqV8L4mVoyTRQEqwmiwtyai+elb43oQi6GoxpxN0QofjXSJ7BgcHJiVh/wemziNQhWOwlgAAAABJRU5ErkJggg=="},88745:function(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAFQlJREFUeF7tnXtwFUW+x3+T9/tBCALyBiEkEhJehiAm4RGiF+5a7i6lgCV3191bKMvq6kVx1V1dWW8ZdfXuZYF7d2t1FZeXpYJlQUBAUcI7qIRnAIXEEE7CCQl5J2du9eEezOOcTPec6TndM7+uSuWP6f49vr/+nJkz09NHgQA0h6N2AgTDFFAhQ1XVaQootwcgDMu5PHH2W4iOjKgICQ05HgzK0XFpI5+xXJImJ6SY7A8cjmt/AkVdCgAhZvu2uj8CSOcWGRFeHR4etnJ86sg3rJ47r/xMA8ThqJ2kKrBNAUjilYzd7XYHxKNHbEzUoQnjRk+xuz568jcPkOpaVU+AOIZeAV+AEAtRkRHlkzNSBtNbw55EAVMAcdTUFoIKT6LkfBXoDRCERJ/23AGpqnY+GATKP/SFh6NYFNACBCFhUfNGX+6AOBy160CBBeyh4QhWBWgAQUjYVOUPSHXtCQAYyxYW9tajAC0gCAm9ulwBcTqdCe0dipM+HOzpjwIsgCAkdEpzBcThcOaCouymCwV7+asAKyAIibbiCIi2RtL00AMIQtJ7eREQaaa/dqB6AUFIfGuLgGjPO2l6+AMIQuK9zAiINNNfO1B/AUFIemqMgGjPO2l6GAEIQtK13A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FTqwsALqyZypmalmJWgaIJ6EPiv+6i0A9SGzEkQ/llGgGUB9LWdq5rNmZmQ6ICS5PftLZoOq3B4EkK6CcgeAireBzay6JL4UgAMugIOKAschGA7lTM4oMTv0/wOup6hf9sCvqgAAAABJRU5ErkJggg=="},49321:function(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAFpdJREFUeF7tnQmQFEXWx1/NPQzMAQxyyyXHIDDDJQzqDHLNsrBruIahoCFfrLvfoi6frHjAeqzGqruirhofi/rthrKKq4ChAmEIouDFISKoXOIACowcPdDDDDPM2fXFa7Z1ju7OzKrKqszulxEEEVTmy//7v/zR3dVZ2QZ40Hy+ipGQCGPBhHzTNCcYYFzqgYyYm3Lvt99BRnpaWVJy0u5EML4YNrT/ophL0uWEDJfnA5/v7N/AMG8HgCS35471+RCQ5i09LbU8NTXlkRF5/Z+O9dxl5ecaID5fxWjTgHcNgE6ykon3uK0BCfnRoX277SOHDRwb7/5Yyd89QMorTCsCaQy/A5EAwQjt0tOOjckf3Is/GvVEB1wBxHe6YjGYsIAsl+tANEAIEmveSwfkZLn/pgQw/mVNHo0ScYAFCEEi4uaFvtIB8fkqloMBs8Sl0QhRB3gAIUjEXJUPSHnFXgAYIiaLeltxgBcQgoTfXamA+P3+7MYmw88vh3racUAEEIKEz2mpgPh8/mIwjI18UqiXXQdEASFI2I4TIGyPtOlhBRCCJHp5CRBtlj9bqFVACJLI3hIg7HWnTQ87gBAk4ctMgGiz/NlC7QJCkLT1mABhrzttejgBCEHSstwEiDbLny3UKUAIkp+8JkDY606bHk4CQpBcKDsBos3yZwt1GhCChABhrzqNesgAJN4hoVcQjQBgSZUFSDxDQoCwVp1G12UCEq+QECAaAcCSKhuQeISEAGGtOo2uuwFIvEFCgGgEAEuqW4DEEyQECGvVaXTdTUDiBRICRCMAWFLdBiQeICFAWKtOo+teABLrkBAgGgHAkuoVILEMCQHCWnUa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MtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(dn,Mn,bt){"use strict";bt.d(Mn,{Z:function(){return Le}});const wt=ve=>typeof ve=="object"&&ve!=null&&ve.nodeType===1,ee=(ve,Xt)=>(!Xt||ve!=="hidden")&&ve!=="visible"&&ve!=="clip",he=(ve,Xt)=>{if(ve.clientHeight<ve.scrollHeight||ve.clientWidth<ve.scrollWidth){const fe=getComputedStyle(ve,null);return ee(fe.overflowY,Xt)||ee(fe.overflowX,Xt)||(xe=>{const je=(Bt=>{if(!Bt.ownerDocument||!Bt.ownerDocument.defaultView)return null;try{return Bt.ownerDocument.defaultView.frameElement}catch(et){return null}})(xe);return!!je&&(je.clientHeight<xe.scrollHeight||je.clientWidth<xe.scrollWidth)})(ve)}return!1},Ie=(ve,Xt,fe,xe,je,Bt,et,nt)=>Bt<ve&&et>Xt||Bt>ve&&et<Xt?0:Bt<=ve&&nt<=fe||et>=Xt&&nt>=fe?Bt-ve-xe:et>Xt&&nt<fe||Bt<ve&&nt>fe?et-Xt+je:0,te=ve=>{const Xt=ve.parentElement;return Xt==null?ve.getRootNode().host||null:Xt},Pe=(ve,Xt)=>{var fe,xe,je,Bt;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ht,boundary:lt,skipOverflowHiddenElements:gt}=Xt,yt=typeof lt=="function"?lt:Bn=>Bn!==lt;if(!wt(ve))throw new TypeError("Invalid target");const Pt=document.scrollingElement||document.documentElement,Tt=[];let It=ve;for(;wt(It)&&yt(It);){if(It=te(It),It===Pt){Tt.push(It);break}It!=null&&It===document.body&&he(It)&&!he(document.documentElement)||It!=null&&he(It,gt)&&Tt.push(It)}const zt=(xe=(fe=window.visualViewport)==null?void 0:fe.width)!=null?xe:innerWidth,_t=(Bt=(je=window.visualViewport)==null?void 0:je.height)!=null?Bt:innerHeight,{scrollX:se,scrollY:Jt}=window,{height:le,width:Zt,top:Fe,right:me,bottom:Ve,left:Qe}=ve.getBoundingClientRect(),{top:qe,right:vn,bottom:xn,left:Se}=(Bn=>{const Ae=window.getComputedStyle(Bn);return{top:parseFloat(Ae.scrollMarginTop)||0,right:parseFloat(Ae.scrollMarginRight)||0,bottom:parseFloat(Ae.scrollMarginBottom)||0,left:parseFloat(Ae.scrollMarginLeft)||0}})(ve);let Vt=nt==="start"||nt==="nearest"?Fe-qe:nt==="end"?Ve+xn:Fe+le/2-qe+xn,Xe=ht==="center"?Qe+Zt/2-Se+vn:ht==="end"?me+vn:Qe-Se;const Xn=[];for(let Bn=0;Bn<Tt.length;Bn++){const Ae=Tt[Bn],{height:hn,width:bn,top:Jn,right:mn,bottom:ui,left:Ce}=Ae.getBoundingClientRect();if(et==="if-needed"&&Fe>=0&&Qe>=0&&Ve<=_t&&me<=zt&&(Ae===Pt&&!he(Ae)||Fe>=Jn&&Ve<=ui&&Qe>=Ce&&me<=mn))return Xn;const ni=getComputedStyle(Ae),Pi=parseInt(ni.borderLeftWidth,10),gn=parseInt(ni.borderTopWidth,10),Tn=parseInt(ni.borderRightWidth,10),pn=parseInt(ni.borderBottomWidth,10);let Un=0,On=0;const we="offsetWidth"in Ae?Ae.offsetWidth-Ae.clientWidth-Pi-Tn:0,In="offsetHeight"in Ae?Ae.offsetHeight-Ae.clientHeight-gn-pn:0,rn="offsetWidth"in Ae?Ae.offsetWidth===0?0:bn/Ae.offsetWidth:0,ge="offsetHeight"in Ae?Ae.offsetHeight===0?0:hn/Ae.offsetHeight:0;if(Pt===Ae)Un=nt==="start"?Vt:nt==="end"?Vt-_t:nt==="nearest"?Ie(Jt,Jt+_t,_t,gn,pn,Jt+Vt,Jt+Vt+le,le):Vt-_t/2,On=ht==="start"?Xe:ht==="center"?Xe-zt/2:ht==="end"?Xe-zt:Ie(se,se+zt,zt,Pi,Tn,se+Xe,se+Xe+Zt,Zt),Un=Math.max(0,Un+Jt),On=Math.max(0,On+se);else{Un=nt==="start"?Vt-Jn-gn:nt==="end"?Vt-ui+pn+In:nt==="nearest"?Ie(Jn,ui,hn,gn,pn+In,Vt,Vt+le,le):Vt-(Jn+hn/2)+In/2,On=ht==="start"?Xe-Ce-Pi:ht==="center"?Xe-(Ce+bn/2)+we/2:ht==="end"?Xe-mn+Tn+we:Ie(Ce,mn,bn,Pi,Tn+we,Xe,Xe+Zt,Zt);const{scrollLeft:oe,scrollTop:Ft}=Ae;Un=ge===0?0:Math.max(0,Math.min(Ft+Un/ge,Ae.scrollHeight-hn/ge+In)),On=rn===0?0:Math.max(0,Math.min(oe+On/rn,Ae.scrollWidth-bn/rn+we)),Vt+=Ft-Un,Xe+=oe-On}Xn.push({el:Ae,top:Un,left:On})}return Xn},Nt=ve=>ve===!1?{block:"end",inline:"nearest"}:(Xt=>Xt===Object(Xt)&&Object.keys(Xt).length!==0)(ve)?ve:{block:"start",inline:"nearest"};function Le(ve,Xt){if(!ve.isConnected||!(je=>{let Bt=je;for(;Bt&&Bt.parentNode;){if(Bt.parentNode===document)return!0;Bt=Bt.parentNode instanceof ShadowRoot?Bt.parentNode.host:Bt.parentNode}return!1})(ve))return;const fe=(je=>{const Bt=window.getComputedStyle(je);return{top:parseFloat(Bt.scrollMarginTop)||0,right:parseFloat(Bt.scrollMarginRight)||0,bottom:parseFloat(Bt.scrollMarginBottom)||0,left:parseFloat(Bt.scrollMarginLeft)||0}})(ve);if((je=>typeof je=="object"&&typeof je.behavior=="function")(Xt))return Xt.behavior(Pe(ve,Xt));const xe=typeof Xt=="boolean"||Xt==null?void 0:Xt.behavior;for(const{el:je,top:Bt,left:et}of Pe(ve,Nt(Xt))){const nt=Bt-fe.top+fe.bottom,ht=et-fe.left+fe.right;je.scroll({top:nt,left:ht,behavior:xe})}}}}]);
|