You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Paperlibrary__Random__Pr...

1264 lines
2.1 MiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[337],{10402:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},93343:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={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"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},80205:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={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:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},61441:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},30631:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},16537:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},89378:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},37520:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-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 8h152v152c0 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-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},86902:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={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"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},53878:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},21970:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(Kt,ue){return It.createElement(Ht.Z,(0,mt.Z)({},Kt,{ref:ue,icon:we}))},Rt=It.forwardRef(he),be=Rt},79906:function(){"use strict"},93938:function(xn,vn){"use strict";vn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11037:function(xn,vn){"use strict";vn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},13021:function(xn,vn,Pt){"use strict";var mt=Pt(59301),It=Object.defineProperty,Zt=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,he=(ge,Kt,ue)=>Kt in ge?It(ge,Kt,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ge[Kt]=ue,Rt=(ge,Kt)=>{for(var ue in Kt||(Kt={}))we.call(Kt,ue)&&he(ge,ue,Kt[ue]);if(Zt)for(var ue of Zt(Kt))Ht.call(Kt,ue)&&he(ge,ue,Kt[ue]);return ge};const be=ge=>React.createElement("svg",Rt({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},ge),React.createElement("title",null,"\u7F16\u7EC4 18"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("circle",{fill:"#FCB041",cx:7,cy:7,r:7}),React.createElement("path",{d:"M7.531 9.638a.616.616 0 1 1-1.231 0v-.02a.616.616 0 1 1 1.231 0v.02Zm0-2.25a.616.616 0 1 1-1.231 0V4.117a.616.616 0 1 1 1.231 0v3.273Z",fill:"#FFF",fillRule:"nonzero"})));vn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},37404:function(){"use strict";function xn(At,nt,et,ht){et===void 0&&(et=0),ht===void 0&&(ht=1/0),this._name=At,this._defaultValue=nt,this._minimum=et,this._maximum=ht}Object.defineProperty(xn.prototype,"name",{get:function(){return this._name},set:function(At){if(typeof At!="string"||At==="")throw new Error("Shape name must be a valid string.");this._name=At}}),Object.defineProperty(xn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(At){if(typeof At!="number"||isNaN(At))throw new Error("The default value must be a real number, not: "+At);this._defaultValue=At}}),Object.defineProperty(xn.prototype,"minimum",{get:function(){return this._minimum},set:function(At){if(typeof At!="number"||isNaN(At))throw new Error("Minimum must be a real number, not: "+At);this._minimum=At}}),Object.defineProperty(xn.prototype,"maximum",{get:function(){return this._maximum},set:function(At){if(typeof At!="number"||isNaN(At))throw new Error("Maximum must be a real number, not: "+At);this._maximum=At}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(At,nt){var et=go.Shape._FigureParameters[At];return et?et[nt]:null},go.Shape.setFigureParameter=function(At,nt,et){if(!(et instanceof xn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var ht=go.Shape._FigureParameters[At];ht||(ht=[],go.Shape._FigureParameters[At]=ht),ht[nt]=et};var vn=[];function Pt(At,nt){var et=vn.pop();return et===void 0?new go.Point(At,nt):(et.x=At,et.y=nt,et)}function mt(){var At=vn.pop();return At===void 0?new go.Point:At}function It(At){vn.push(At)}function Zt(At,nt,et,ht,at,ft,vt,Ct,Bt){Bt||(Bt=new go.Point);var Ft=At-et,Ot=at-vt,_t=NaN,te=NaN;if(Ft===0)if(Ot===0)At===et&&(_t=At,te=nt);else{var Xt=(ft-Ct)/Ot,Me=ft-Xt*at;_t=At,te=Xt*_t+Me}else if(Ot===0){var qt=(nt-ht)/Ft,Ne=nt-qt*At;_t=at,te=qt*_t+Ne}else{var qt=(nt-ht)/Ft,Xt=(ft-Ct)/Ot,Ne=nt-qt*At,Me=ft-Xt*at;_t=(Me-Ne)/(qt-Xt),te=qt*_t+Ne}return Bt.x=_t,Bt.y=te,Bt}function we(At,nt,et,ht,at,ft,vt,Ct,Bt,Ft,Ot,_t,te,Xt){var Me=1-Bt,qt=Bt,Ne=At*Me+et*qt,ne=nt*Me+ht*qt,Ce=et*Me+at*qt,Ue=ht*Me+ft*qt,Ze=at*Me+vt*qt,tn=ft*Me+Ct*qt,ln=Ne*Me+Ce*qt,ie=ne*Me+Ue*qt,Gt=Ce*Me+Ze*qt,Ae=Ue*Me+tn*qt,Sn=ln*Me+Gt*qt,gn=ie*Me+Ae*qt;Ft.x=Ne,Ft.y=ne,Ot.x=ln,Ot.y=ie,_t.x=Sn,_t.y=gn,te.x=Gt,te.y=Ae,Xt.x=Ze,Xt.y=tn}var Ht=new go.Spot(.156,.156),he=new go.Spot(.844,.844),Rt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new xn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(At,nt,et){var ht=At?At.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var at=ht*Rt,ft=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-at,0,nt,at)).add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)).add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,et-at,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,ht,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,at,et,0,et-at)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,at,at,0).close()));return at>1&&(ft.spot1=new go.Spot(0,0,at,at),ft.spot2=new go.Spot(1,1,-at,-at)),ft}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(At,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=et/2,ht.endX=nt,ht.endY=et/2,ht}),go.Shape.defineFigureGenerator("LineV",function(At,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt/2,ht.startY=0,ht.endX=nt/2,ht.endY=et,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(At,nt,et){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*nt,(1-ht)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(At,nt,et){var ht=nt/2,at=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return at.spot1=Ht,at.spot2=he,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(At,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Line2",function(At,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt,ht.startY=0,ht.endX=0,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Curve1",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Rt*nt,0,nt,(1-Rt)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,Rt*et,(1-Rt)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,Rt*et,Rt*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-Rt)*nt,0,0,(1-Rt)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new xn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var at=Math.abs(ht)*nt;if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=nt,ft.endY=et,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ft.setSpots(at/nt,0,(nt-at)/nt,1),ft}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)?ht=10:ht<-nt?ht=-nt:ht>nt&&(ht=nt);var at=Math.abs(ht);if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=nt,ft.endY=et,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ft.setSpots(at/nt,0,(nt-at)/nt,1),ft}}),go.Shape.setFigureParameter("Trapezoid1",0,new xn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)?ht=.2:ht<.5?ht=-.5:ht>.5&&(ht=.5);var at=Math.abs(ht)*nt;if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=nt,ft.endY=et,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ft.setSpots(at/nt,0,(nt-at)/nt,1),ft}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new xn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)?ht=20:ht<-nt?ht=-nt/2:ht>nt&&(ht=nt/2);var at=Math.abs(ht);if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=nt,ft.endY=et,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ft.setSpots(at/nt,0,(nt-at)/nt,1),ft}}),go.Shape.setFigureParameter("ManualOperation",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)?ht=10:ht<-nt?ht=-nt/2:ht>nt&&(ht=nt/2);var at=Math.abs(ht);if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=nt,ft.endY=et,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())):ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),at<nt/2&&ft.setSpots(at/nt,0,(nt-at)/nt,1),ft}});var be=[];function ge(){var At=be.pop();return At===void 0?[]:At}function Kt(At){At.length=0,be.push(At)}function ue(At){for(var nt=ge(),et=.5,ht=.5,at=Math.PI*1.5,ft=0,vt=0;vt<At;vt++)ft=2*Math.PI/At*vt+at,nt[vt]=new go.Point(ht+et*Math.cos(ft),ht+et*Math.sin(ft));return nt.push(nt[0]),nt}function de(At){var nt=ve(At),et=ge();et[0]=nt[0];for(var ht=1,at=1;ht<nt.length;ht+=2,at+=3)et[at]=nt[ht],et[at+1]=nt[ht],et[at+2]=nt[ht+1];return Kt(nt),et}function ve(At){for(var nt=ue(At),et=ge(),ht=Math.floor(nt.length/2),at=nt.length-1,ft=At%2===0?2:1,vt=0;vt<at;vt++){var Ct=nt[vt],Bt=nt[vt+1],Ft=nt[(ht+vt-1)%at],Ot=nt[(ht+vt+ft)%at];et[vt*2]=Ct,et[vt*2+1]=Zt(Ct.x,Ct.y,Ft.x,Ft.y,Bt.x,Bt.y,Ot.x,Ot.y,new go.Point)}return et[et.length]=et[0],Kt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(At,nt,et){var ht=ue(5),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<5;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(At,nt,et){var ht=ue(6),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<6;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(At,nt,et){var ht=ue(7),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<7;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(At,nt,et){var ht=ue(8),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<8;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(At,nt,et){var ht=ue(9),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<9;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(At,nt,et){var ht=ue(10),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<10;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(At,nt,et){var ht=ue(12),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<12;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(At,nt,et){var ht=ve(5),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<10;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(At,nt,et){var ht=ve(6),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<12;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(At,nt,et){var ht=ve(7),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<14;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(At,nt,et){var ht=ve(8),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<16;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(At,nt,et){var ht=ve(9),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<18;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(At,nt,et){var ht=ve(10),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<20;vt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*nt,ht[vt].y*et));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*nt,ht[0].y*et).close()),Kt(ht),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(At,nt,et){var ht=de(5),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<ht.length;vt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*nt,ht[vt+2].y*et,ht[vt].x*nt,ht[vt].y*et,ht[vt+1].x*nt,ht[vt+1].y*et));return ft.segments.last().close(),Kt(ht),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(At,nt,et){var ht=de(6),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<ht.length;vt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*nt,ht[vt+2].y*et,ht[vt].x*nt,ht[vt].y*et,ht[vt+1].x*nt,ht[vt+1].y*et));return ft.segments.last().close(),Kt(ht),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(At,nt,et){var ht=de(7),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<ht.length;vt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*nt,ht[vt+2].y*et,ht[vt].x*nt,ht[vt].y*et,ht[vt+1].x*nt,ht[vt+1].y*et));return ft.segments.last().close(),Kt(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(At,nt,et){var ht=de(8),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<ht.length;vt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*nt,ht[vt+2].y*et,ht[vt].x*nt,ht[vt].y*et,ht[vt+1].x*nt,ht[vt+1].y*et));return ft.segments.last().close(),Kt(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(At,nt,et){var ht=de(9),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<ht.length;vt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*nt,ht[vt+2].y*et,ht[vt].x*nt,ht[vt].y*et,ht[vt+1].x*nt,ht[vt+1].y*et));return ft.segments.last().close(),Kt(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(At,nt,et){var ht=de(10),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*nt,ht[0].y*et,!0);at.add(ft);for(var vt=1;vt<ht.length;vt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*nt,ht[vt+2].y*et,ht[vt].x*nt,ht[vt].y*et,ht[vt+1].x*nt,ht[vt+1].y*et));return ft.segments.last().close(),Kt(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new xn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new xn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(At,nt,et){var ht=At?At.parameter1:NaN,at=At?At.parameter2:NaN;isNaN(ht)&&(ht=8),isNaN(at)&&(at=8);var ft=new go.Geometry,vt=new go.PathFigure(0,0,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht<nt/2&&at<et/2&&(vt.add(new go.PathSegment(go.PathSegment.Move,ht,at)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,et-at)),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,et-at)),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,at).close())),ft.setSpots(0,0,1,1,ht,at,-ht,-at),ft}),go.Shape.setFigureParameter("Ring",0,new xn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(At,nt,et){var ht=At?At.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=8);var at=nt/2,ft=new go.Geometry,vt=new go.PathFigure(nt,nt/2,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close());var Ct=Math.max(at-ht,0);return Ct>0&&(vt.add(new go.PathSegment(go.PathSegment.Move,nt/2+Ct,nt/2)),vt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,at,at,Ct,Ct).close())),ft.spot1=Ht,ft.spot2=he,ft.defaultStretch=go.GraphObject.Uniform,ft}),go.Shape.defineFigureGenerator("Cloud",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(At,nt,et){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new xn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new xn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(At,nt,et){var ht=At?At.parameter1:NaN,at=At?At.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(at)&&(at=315);var ft=ht%360;ft<0&&(ft+=360);var vt=at%360,Ct=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(Ct,Ct).add(new go.PathSegment(go.PathSegment.Arc,ft,vt,Ct,Ct,Ct,Ct).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(At,nt,et){var ht=Rt/Math.SQRT2*.5,at=Math.SQRT2/2,ft=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,at*nt,ft*et,nt,(1-ht)*et,(at+ht)*nt,(ft+ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(At,nt,et){var ht=At?At.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var at=Math.min(ht,nt)/2,ft=nt/2,vt=et/2;return new go.Geometry().add(new go.PathFigure(ft-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ft+at,0)).add(new go.PathSegment(go.PathSegment.Line,ft+at,vt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,vt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,vt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,vt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,et)).add(new go.PathSegment(go.PathSegment.Line,ft-at,et)).add(new go.PathSegment(go.PathSegment.Line,ft-at,vt+at)).add(new go.PathSegment(go.PathSegment.Line,0,vt+at)).add(new go.PathSegment(go.PathSegment.Line,0,vt-at)).add(new go.PathSegment(go.PathSegment.Line,ft-at,vt-at).close()))}),go.Shape.setFigureParameter("ThinCross",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(At,nt,et){var ht=At?At.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var at=Math.min(ht,nt)/2,ft=nt/2,vt=et/2;return new go.Geometry().add(new go.PathFigure(ft-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ft+at,0)).add(new go.PathSegment(go.PathSegment.Line,ft+at,vt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,vt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,vt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,vt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,et)).add(new go.PathSegment(go.PathSegment.Line,ft-at,et)).add(new go.PathSegment(go.PathSegment.Line,ft-at,vt+at)).add(new go.PathSegment(go.PathSegment.Line,0,vt+at)).add(new go.PathSegment(go.PathSegment.Line,0,vt-at)).add(new go.PathSegment(go.PathSegment.Line,ft-at,vt-at).close()))}),go.Shape.setFigureParameter("ThickX",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(At,nt,et){var ht=At?At.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),nt===0||et===0){var at=new go.Geometry(go.Geometry.Rectangle);return at.startX=0,at.startY=0,at.endX=nt,at.endY=et,at}else{var ft=nt/2,vt=et/2,Ct=Math.atan2(et,nt),Bt=ht-Math.min(Math.cos(Ct)*ht/2,ft),Ft=ht-Math.min(Math.sin(Ct)*ht/2,vt),at=new go.Geometry,Ot=new go.PathFigure(Bt,0,!0);return at.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,ft,.2*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-Bt,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,Ft)),Ot.add(new go.PathSegment(go.PathSegment.Line,.8*nt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,et-Ft)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-Bt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,ft,.8*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,Bt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et-Ft)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,Ft).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(At,nt,et){var ht=At?At.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var at=new go.Geometry,ft=new go.PathFigure(.1*nt,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),at}),go.Shape.setFigureParameter("SquareIBeam",0,new xn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.2);var at=new go.Geometry,ft=new go.PathFigure(0,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,ht*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,(1-ht)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,(1-ht)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,ht*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close()),at}),go.Shape.setFigureParameter("RoundedIBeam",0,new xn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.5);var at=new go.Geometry,ft=new go.PathFigure(0,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-ht)*nt,.25*et,Math.abs(1-ht)*nt,.75*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),at}),go.Shape.defineFigureGenerator("HalfEllipse",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,Rt*nt,0,nt,(.5-Rt/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+Rt/2)*et,Rt*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.4*nt,.6*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var ft=.2,vt=.3,Ct=0,Bt=ft*Rt;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5+ft+Ct)*et,(.5-ft+vt)*nt,(.5+Bt+Ct)*et,(.5-Bt+vt)*nt,(.5+ft+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ft+vt)*nt,(.5+Ct)*et,(.5+Bt+vt)*nt,(.5+ft+Ct)*et,(.5+ft+vt)*nt,(.5+Bt+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5-ft+Ct)*et,(1-.5+ft+vt)*nt,(.5-Bt+Ct)*et,(.5+Bt+vt)*nt,(.5-ft+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-Bt+vt)*nt,(.5-ft+Ct)*et,(.5-ft+vt+.05)*nt,(.5-Bt+Ct-.02)*et)),ft=.2,vt=0,Ct=-.3,Bt=ft*Rt,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ft+vt)*nt,(.5+Ct)*et,(.5+Bt+vt)*nt,(.5+ft+Ct)*et,(.5+ft+vt)*nt,(.5+Bt+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5-ft+Ct)*et,(1-.5+ft+vt)*nt,(.5-Bt+Ct)*et,(.5+Bt+vt)*nt,(.5-ft+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ft+vt)*nt,(.5+Ct)*et,(.5-Bt+vt)*nt,(.5-ft+Ct)*et,(.5-ft+vt)*nt,(.5-Bt+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Bt+vt)*nt,(.5+ft+Ct)*et,(.5-ft+vt)*nt,(.5+Bt+Ct)*et,(.5-Bt+vt)*nt,(.5+ft+Ct)*et)),ft=.2,vt=-.3,Ct=0,Bt=ft*Rt,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5-ft+Ct)*et,(1-.5+ft+vt-.05)*nt,(.5-Bt+Ct-.02)*et,(.5+Bt+vt)*nt,(.5-ft+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ft+vt)*nt,(.5+Ct)*et,(.5-Bt+vt)*nt,(.5-ft+Ct)*et,(.5-ft+vt)*nt,(.5-Bt+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5+ft+Ct)*et,(.5-ft+vt)*nt,(.5+Bt+Ct)*et,(.5-Bt+vt)*nt,(.5+ft+Ct)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+Bt+vt)*nt,(.5+ft+Ct)*et,(.5+ft+vt)*nt,(.5+Bt+Ct)*et).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*.5,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),at.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var ft=.1,vt=.5,Ct=.25;return at.add(new go.PathSegment(go.PathSegment.Move,(vt+ft)*nt,Ct*et)),at.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*vt,et*Ct,ft*nt,ft*nt).close()),at=new go.PathFigure(nt*.5,0,!1),ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),Ct=.75,at=new go.PathFigure((vt+ft)*nt,Ct*et,!0),ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*vt,et*Ct,ft*nt,ft*nt).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(At,nt,et){var ht=.8535533905932737,at=.5*nt,ft=.5*et;return new go.Geometry().add(new go.PathFigure(at,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,at,ft,at,ft)).add(new go.PathSegment(go.PathSegment.Line,at,et)).add(new go.PathSegment(go.PathSegment.Move,at,ft)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,at,ft)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,ht*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=.5,vt=.5,Ct=.5,Bt=new go.PathFigure(vt*nt,(Ct-ft)*et);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-ft)*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et)),ft=.4,at=Rt*.4;var Ft=mt(),Ot=mt(),_t=mt(),te=mt();we(vt,Ct-ft,vt+at,Ct-ft,vt+ft,Ct-at,vt+ft,Ct,.42,Ft,Ot,_t,te,te);var Xt=mt(),Me=mt(),qt=mt();we(vt,Ct-ft,vt+at,Ct-ft,vt+ft,Ct-at,vt+ft,Ct,.58,te,te,qt,Xt,Me);var Ne=mt(),ne=mt(),Ce=mt();we(vt,Ct+ft,vt-at,Ct+ft,vt-ft,Ct+at,vt-ft,Ct,.42,Ne,ne,Ce,te,te);var Ue=mt(),Ze=mt(),tn=mt();return we(vt,Ct+ft,vt-at,Ct+ft,vt-ft,Ct+at,vt-ft,Ct,.58,te,te,tn,Ue,Ze),Bt.add(new go.PathSegment(go.PathSegment.Move,tn.x*nt,tn.y*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,Ue.x*nt,Ue.y*et,Ze.x*nt,Ze.y*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,_t.x*nt,_t.y*et,Ft.x*nt,Ft.y*et,Ot.x*nt,Ot.y*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,tn.x*nt,tn.y*et).close()),Bt.add(new go.PathSegment(go.PathSegment.Move,Ce.x*nt,Ce.y*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,qt.x*nt,qt.y*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,Xt.x*nt,Xt.y*et,Me.x*nt,Me.y*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,Ce.x*nt,Ce.y*et,Ne.x*nt,Ne.y*et,ne.x*nt,ne.y*et).close()),It(Ft),It(Ot),It(_t),It(te),It(Xt),It(Me),It(qt),It(Ne),It(ne),It(Ce),It(Ue),It(Ze),It(tn),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(At,nt,et){var ht=At?At.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>nt&&(ht=nt);var at=(nt-ht)/2,ft=at+ht;return new go.Geometry().add(new go.PathFigure(ft,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,at,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(At,nt,et){var ht=new go.Geometry,at=Rt*.4,ft=.4,vt=.5,Ct=.5,Bt=mt(),Ft=mt(),Ot=mt(),_t=mt(),te=new go.PathFigure((vt-ft)*nt,Ct*et,!1);ht.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et)),we(vt,Ct-ft,vt+at,Ct-ft,vt+ft,Ct-at,vt+ft,Ct,.44,Ot,_t,Ft,Bt,Bt),te.add(new go.PathSegment(go.PathSegment.Bezier,Ft.x*nt,Ft.y*et,Ot.x*nt,Ot.y*et,_t.x*nt,_t.y*et));var Xt=Pt(Ft.x,Ft.y);we(vt,Ct-ft,vt+at,Ct-ft,vt+ft,Ct-at,vt+ft,Ct,.56,Bt,Bt,Ft,Ot,_t);var Me=Pt(Ft.x,Ft.y);te.add(new go.PathSegment(go.PathSegment.Line,(Xt.x*.1+.95*.9)*nt,Xt.y*.1*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,Xt.y*.1*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),te.add(new go.PathSegment(go.PathSegment.Line,nt,0)),te.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),te.add(new go.PathSegment(go.PathSegment.Line,(Me.x*.1+.9)*nt,.15*et)),te.add(new go.PathSegment(go.PathSegment.Line,(Me.x*.1+.9)*nt,(Me.y*.1+.05*.9)*et)),te.add(new go.PathSegment(go.PathSegment.Line,Me.x*nt,Me.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,Ot.x*nt,Ot.y*et,_t.x*nt,_t.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,(vt-at)*nt,(Ct+ft)*et,(vt-ft)*nt,(Ct+at)*et)),ft=.35,at=Rt*.35;var qt=new go.PathFigure(vt*nt,(Ct-ft)*et,!1);ht.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-ft)*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et));var Ne=new go.PathFigure((vt-ft)*nt,Ct*et,!1);return ht.add(Ne),It(Bt),It(Ft),It(Ot),It(_t),It(Xt),It(Me),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(At,nt,et){var ht=new go.Geometry,at=.375,ft=0,vt=-.125,Ct=at*Rt,Bt=new go.PathFigure((.525+ft)*nt,(.5+at+vt)*et,!1);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ft)*nt,(.5+vt)*et,(.5+Ct+ft)*nt,(.5+at+vt)*et,(.5+at+ft)*nt,(.5+Ct+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ft)*nt,(.5-at+vt)*et,(1-.5+at+ft)*nt,(.5-Ct+vt)*et,(.5+Ct+ft)*nt,(.5-at+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ft)*nt,(.5+vt)*et,(.5-Ct+ft)*nt,(.5-at+vt)*et,(.5-at+ft)*nt,(.5-Ct+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ft)*nt,(.5+at+vt)*et,(.5-at+ft)*nt,(.5+Ct+vt)*et,(.5-Ct+ft)*nt,(.5+at+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),at=.325,ft=0,vt=-.125,Ct=at*Rt;var Bt=new go.PathFigure((1-.5+at+ft)*nt,(.5+vt)*et,!1);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ft)*nt,(.5+at+vt)*et,(.5+at+ft)*nt,(.5+Ct+vt)*et,(.5+Ct+ft)*nt,(.5+at+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ft)*nt,(.5+vt)*et,(.5-Ct+ft)*nt,(.5+at+vt)*et,(.5-at+ft)*nt,(.5+Ct+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ft)*nt,(.5-at+vt)*et,(.5-at+ft)*nt,(.5-Ct+vt)*et,(.5-Ct+ft)*nt,(.5-at+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ft)*nt,(.5+vt)*et,(.5+Ct+ft)*nt,(.5-at+vt)*et,(1-.5+at+ft)*nt,(.5-Ct+vt)*et));var Bt=new go.PathFigure((.525+ft)*nt,(.5+at+vt)*et,!1);return ht.add(Bt),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(At,nt,et){var ht=At?At.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(At,nt,et){var ht=At?At.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(At,nt,et){var ht=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(At,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(At,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new xn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new xn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=At?At.parameter2:NaN;isNaN(at)&&(at=.3);var ft=(1-ht)*nt,vt=(.5-at/2)*et,Ct=(.5+at/2)*et,Bt=new go.Geometry,Ft=new go.PathFigure(0,vt,!0);Bt.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,vt)),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,et)),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,Ct)),Ft.add(new go.PathSegment(go.PathSegment.Line,0,Ct).close()),Bt.spot1=new go.Spot(0,vt/et);var Ot=Zt(0,Ct/et,1,Ct/et,ft/nt,1,1,.5,mt());return Bt.spot2=new go.Spot(Ot.x,Ot.y),It(Ot),Bt}),go.Shape.setFigureParameter("Arrow2",0,new xn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new xn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=30),ht>nt&&(ht=nt);var at=At?At.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,et/2);var ft=nt-ht,vt=(et-at)/2,Ct=vt+at,Bt=new go.Geometry,Ft=new go.PathFigure(0,vt,!0);Bt.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,vt)),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,et)),Ft.add(new go.PathSegment(go.PathSegment.Line,ft,Ct)),Ft.add(new go.PathSegment(go.PathSegment.Line,0,Ct).close()),Bt.spot1=new go.Spot(0,vt/et);var Ot=Zt(0,Ct/et,1,Ct/et,ft/nt,1,1,.5,mt());return Bt.spot2=new go.Spot(Ot.x,Ot.y),It(Ot),Bt}),go.Shape.defineFigureGenerator("Chevron",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new xn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=(.5-ht/2)*et,ft=(.5+ht/2)*et,vt=new go.Geometry,Ct=new go.PathFigure(nt,.5*et,!0);vt.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),Ct.add(new go.PathSegment(go.PathSegment.Line,.3*nt,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var Bt=Zt(0,.5,.3,0,0,at/et,.1,at/et,mt());return vt.spot1=new go.Spot(Bt.x,Bt.y),Bt=Zt(.7,1,1,.5,0,ft/et,1,ft/et,Bt),vt.spot2=new go.Spot(Bt.x,Bt.y),It(Bt),vt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new xn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new xn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=40);var at=At?At.parameter2:NaN;isNaN(at)&&(at=100);var ft=(et-ht)/2,vt=ft+ht,Ct=(et-at)/2,Bt=Ct+at;(ht>et||at>et)&&(at>ht?(ht=ht*et/at,ft=(et-ht)/2,vt=ft+ht,Ct=0,Bt=et):(ft=0,vt=et,Ct=0,Bt=et));var Ft=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Ft.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ft)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ft)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Ct).close());var _t=Zt(0,.5,.3,Ct/et,0,ft/et,1,ft/et,mt());return Ft.spot1=new go.Spot(_t.x,_t.y),_t=Zt(.7,Bt/et,1,.5,0,vt/et,1,vt/et,_t),Ft.spot2=new go.Spot(_t.x,_t.y),It(_t),Ft}),go.Shape.setFigureParameter("IBeamArrow",0,new xn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=(.5-ht/2)*et,ft=(.5+ht/2)*et,vt=new go.Geometry,Ct=new go.PathFigure(nt,.5*et,!0);vt.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),Ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),vt.spot1=new go.Spot(0,at/et);var Bt=Zt(.7,1,1,.5,0,ft/et,1,ft/et,mt());return vt.spot2=new go.Spot(Bt.x,Bt.y),It(Bt),vt}),go.Shape.setFigureParameter("IBeamArrow2",0,new xn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new xn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=40);var at=At?At.parameter2:NaN;isNaN(at)&&(at=100);var ft=(et-ht)/2,vt=ft+ht,Ct=(et-at)/2,Bt=Ct+at;(ht>et||at>et)&&(at>ht?(ht=ht*et/at,ft=(et-ht)/2,vt=ft+ht,Ct=0,Bt=et):(ft=0,vt=et,Ct=0,Bt=et));var Ft=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Ft.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,Bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,Ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ft)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ft)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Ct).close()),Ft.spot1=new go.Spot(0,ft/et);var _t=Zt(.7,Bt/et,1,.5,0,vt/et,1,vt/et,mt());return Ft.spot2=new go.Spot(_t.x,_t.y),It(_t),Ft}),go.Shape.setFigureParameter("Pointer",0,new xn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.1);var at=new go.Geometry,ft=new go.PathFigure(nt,.5*et,!0);at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Line,ht*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),at.spot1=new go.Spot(ht,.35);var vt=Zt(.2,.65,1,.65,0,1,1,.5,mt());return at.spot2=new go.Spot(vt.x,vt.y),It(vt),at}),go.Shape.setFigureParameter("RoundedPointer",0,new xn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=new go.Geometry,ft=new go.PathFigure(nt,.5*et,!0);at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),at.spot1=new go.Spot(ht,.35);var vt=Zt(0,.65,1,.65,0,1,1,.5,mt());return at.spot2=new go.Spot(vt.x,vt.y),It(vt),at}),go.Shape.setFigureParameter("SplitEndArrow",0,new xn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.4);var at=(.5-ht/2)*et,ft=(.5+ht/2)*et,vt=new go.Geometry,Ct=new go.PathFigure(nt,.5*et,!0);vt.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),vt.spot1=new go.Spot(.2,.3);var Bt=Zt(.7,1,1,.5,0,ft/et,1,ft/et,mt());return vt.spot2=new go.Spot(Bt.x,Bt.y),It(Bt),vt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new xn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=50);var at=(et-ht)/2,ft=at+ht;ht>et&&(at=0,ft=et);var vt=new go.Geometry,Ct=new go.PathFigure(nt,.5*et,!0);vt.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),vt.spot1=new go.Spot(.2,at/et);var Bt=Zt(.7,1,1,.5,0,ft/et,1,ft/et,mt());return vt.spot2=new go.Spot(Bt.x,Bt.y),It(Bt),vt}),go.Shape.setFigureParameter("SquareArrow",0,new xn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.7);var at=new go.Geometry,ft=new go.PathFigure(nt,.5*et,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,0)),ft.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(ht,1),at}),go.Shape.defineFigureGenerator("Cone1",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=Rt*.1,vt=new go.PathFigure(0,.9*et,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ft)*et,(.5+at)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ft)*et).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.9*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var ft=new go.PathFigure(0,.9*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var ft=new go.PathFigure(.5*nt,et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.3*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var ft=new go.PathFigure(0,.3*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var at=new go.Geometry,ft=Rt*.5,vt=new go.PathFigure(0,ht,!0);at.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,Rt*ht,(.5-ft)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,ht,(.5+ft)*nt,0,1*nt,Rt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-Rt*ht,(.5+ft)*nt,1*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-ft)*nt,1*et,0,et-Rt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var Ct=new go.PathFigure(nt,ht,!1);return at.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*ht,1*nt,2*ht-Rt*ht,(.5+ft)*nt,2*ht)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-ft)*nt,2*ht,0,2*ht-Rt*ht)),at.spot1=new go.Spot(0,0,0,2*ht),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder2",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var at=new go.Geometry,ft=Rt*.5,vt=new go.PathFigure(0,et-ht,!0);at.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,Rt*ht,(.5-ft)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,(.5+ft)*nt,0,nt,Rt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-Rt*ht,(.5+ft)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-ft)*nt,et,0,et-Rt*ht));var Ct=new go.PathFigure(0,et-ht,!1);return at.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*ht,0,et-ht-Rt*ht,(.5-ft)*nt,et-2*ht)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-ht,(.5+ft)*nt,et-2*ht,nt,et-ht-Rt*ht)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,0,-2*ht),at}),go.Shape.defineFigureGenerator("Cylinder3",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var at=new go.Geometry,ft=Rt*.5,vt=new go.PathFigure(ht,0,!0);at.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-Rt*ht,0,nt,(.5-ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+ft)*et,nt-Rt*ht,et)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,Rt*ht,et,0,(.5+ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-ft)*et,Rt*ht,0));var Ct=new go.PathFigure(ht,0,!1);return at.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*et,ht+Rt*ht,0,2*ht,(.5-ft)*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,ht,et,2*ht,(.5+ft)*et,ht+Rt*ht,et)),at.spot1=new go.Spot(0,0,2*ht,0),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder4",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var at=new go.Geometry,ft=Rt*.5,vt=new go.PathFigure(nt-ht,0,!0);at.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-Rt*ht,0,nt,(.5-ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+ft)*et,nt-Rt*ht,et)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,Rt*ht,et,0,(.5+ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-ft)*et,Rt*ht,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0));var Ct=new go.PathFigure(nt-ht,0,!1);return at.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*ht,.5*et,nt-ht-Rt*ht,0,nt-2*ht,(.5-ft)*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt-2*ht,(.5+ft)*et,nt-ht-Rt*ht,et)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,-2*ht,0),at}),go.Shape.defineFigureGenerator("Prism1",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.25*nt,.25*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ft=new go.PathFigure(.25*nt,.25*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.25*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ft=new go.PathFigure(0,et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ft.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var ft=new go.PathFigure(.5*nt,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var ft=new go.PathFigure(.5*nt,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(At,nt,et){var ht=new go.Geometry,at=.2,ft=.1,vt=Rt*at,Ct=Rt*ft,Bt=.5,Ft=.1,Ot=new go.PathFigure(Bt*nt,(Ft+ft)*et,!0);ht.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-at)*nt,Ft*et,(Bt-vt)*nt,(Ft+ft)*et,(Bt-at)*nt,(Ft+Ct)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-ft)*et,(Bt-at)*nt,(Ft-Ct)*et,(Bt-vt)*nt,(Ft-ft)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+at)*nt,Ft*et,(Bt+vt)*nt,(Ft-ft)*et,(Bt+at)*nt,(Ft-Ct)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft+ft)*et,(Bt+at)*nt,(Ft+Ct)*et,(Bt+vt)*nt,(Ft+ft)*et));var _t=.05,te=Rt*_t;Bt=.05,Ft=.25;var Xt=new go.PathFigure(.5*nt,.2*et,!0);return ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),Bt=.95,Ft=.25,Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+_t)*nt,Ft*et,(Bt+te)*nt,(Ft-_t)*et,(Bt+_t)*nt,(Ft-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),_t=.025,te=Rt*_t,Bt=.825,Ft=.35,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-_t)*et,(Bt+_t)*nt,(Ft-te)*et,(Bt+te)*nt,(Ft-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-_t)*nt,Ft*et,(Bt-te)*nt,(Ft-_t)*et,(Bt-_t)*nt,(Ft-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),_t=.05,te=Rt*_t,Bt=.5,Ft=.7,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-_t)*et,(Bt+_t)*nt,(Ft-te)*et,(Bt+te)*nt,(Ft-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-_t)*nt,Ft*et,(Bt-te)*nt,(Ft-_t)*et,(Bt-_t)*nt,(Ft-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),_t=.025,te=Rt*_t,Bt=.175,Ft=.35,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-_t)*et,(Bt+_t)*nt,(Ft-te)*et,(Bt+te)*nt,(Ft-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-_t)*nt,Ft*et,(Bt-te)*nt,(Ft-_t)*et,(Bt-_t)*nt,(Ft-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),_t=.05,te=Rt*_t,Bt=.05,Ft=.25,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-_t)*et,(Bt-_t)*nt,(Ft-te)*et,(Bt-te)*nt,(Ft-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new xn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(At,nt,et){var ht=At?At.parameter1:NaN;isNaN(ht)&&(ht=.2);var at=new go.Geometry,ft=new go.PathFigure(nt,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,ht*et)),ft.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),at.spot1=new go.Spot(0,ht),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Collate",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,.5*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var ft=new go.PathFigure(.5*nt,.5*et,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(0,at*et,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),ht}),go.Shape.defineFigureGenerator("Database",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=Rt*.1,vt=new go.PathFigure(nt,.1*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ft)*et,(.5+at)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-ft)*et,(.5-at)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ft)*et));var Ct=new go.PathFigure(nt,.1*et,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+ft)*et,(.5+at)*nt,.2*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ft)*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+ft)*et,(.5+at)*nt,.3*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ft)*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+ft)*et,(.5+at)*nt,.4*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-at)*nt,.4*et,0,(.3+ft)*et)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=Rt*.1,vt=new go.PathFigure(nt,.1*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ft)*et,(.5+at)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-ft)*et,(.5-at)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ft)*et));var Ct=new go.PathFigure(nt,.1*et,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+ft)*et,(.5+at)*nt,.2*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ft)*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+ft)*et,(.5+at)*nt,.3*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ft)*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var ft=Rt*.2,vt=new go.PathFigure(0,.2*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-ft)*et,(.2-ft)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+ft)*nt,0,nt,(.2-ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+ft)*et,(.8+ft)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-ft)*nt,et,0,(.8+ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var Ct=new go.PathFigure(0,at*et,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;(isNaN(at)||at<.1)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(0,at*et,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),ht}),go.Shape.defineFigureGenerator("Document",function(At,nt,et){var ht=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(at*nt,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,at*et)),vt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var ft=new go.PathFigure(.1*nt,.4*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ft=new go.PathFigure(.75*nt,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt,.5*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var ft=new go.PathFigure(nt,.5*et,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et));var vt=new go.PathFigure(nt,.5*et,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN,ft=At?At.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ft)&&(ft=.1);var vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var Ct=new go.PathFigure(at*nt,0,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Move,0,ft*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt,ft*et)),ht}),go.Shape.defineFigureGenerator("Junction",function(At,nt,et){var ht=new go.Geometry,at=1/Math.SQRT2,ft=(1-1/Math.SQRT2)/2,vt=Rt*.5,Ct=.5,Bt=new go.PathFigure(nt,Ct*et,!0);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,Ct*nt,et,nt,(Ct+vt)*et,(Ct+vt)*nt,et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,0,Ct*et,(Ct-vt)*nt,et,0,(Ct+vt)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,Ct*nt,0,0,(Ct-vt)*et,(Ct-vt)*nt,0)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,Ct*et,(Ct+vt)*nt,0,nt,(Ct-vt)*et));var Ft=new go.PathFigure((ft+at)*nt,(ft+at)*et,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,ft*nt,ft*et)),Ft.add(new go.PathSegment(go.PathSegment.Move,ft*nt,(ft+at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Line,(ft+at)*nt,ft*et)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(At,nt,et){var ht=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var ft=new go.PathFigure(.1*nt,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=.5,vt=new go.PathFigure(.5*nt,et,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft*et,(ft-at)*nt,et,0,(ft+at)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ft*nt,0,0,(ft-at)*et,(ft-at)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ft*et,(ft+at)*nt,0,nt,(ft-at)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(ft+.1)*nt,.9*et,nt,(ft+at)*et,(ft+at)*nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.7);var ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,at*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.25);var ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,at*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-at)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(At,nt,et){var ht=new go.Geometry;et=et/.8;var at=new go.PathFigure(nt,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var ft=new go.PathFigure(.1*nt,.2*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.1*nt,.1*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var ft=new go.PathFigure(.2*nt,.1*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.1);var ft=1-at,vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var Ct=new go.PathFigure(.5*at*nt,at*et,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,(1-.5*at)*nt,at*et)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=.5,vt=new go.PathFigure(nt,ft*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,ft*nt,et,nt,(ft+at)*et,(ft+at)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft*et,(ft-at)*nt,et,0,(ft+at)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ft*nt,0,0,(ft-at)*et,(ft-at)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ft*et,(ft+at)*nt,0,nt,(ft-at)*et));var Ct=new go.PathFigure(nt,.5*et,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(At,nt,et){var ht=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN,ft=At?At.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ft)&&(ft=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-ft)*nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN,ft=At?At.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ft)&&(ft=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-ft)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-ft)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure((1-at)*nt,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Move,at*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),ht}),go.Shape.defineFigureGenerator("Process",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(at*nt,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var ft=new go.PathFigure(0,.5*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.25);var ft=new go.PathFigure(at*nt,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var vt=new go.PathFigure(at*nt,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),ht.spot1=new go.Spot(at,0),ht.spot2=new go.Spot(1-at,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(At,nt,et){var ht=new go.Geometry,at=At?At.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-at)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ft.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+at)*nt,0,nt,(.5-at)*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+at)*et,(.5+at)*nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=.5,vt=new go.PathFigure(nt,ft*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,ft*nt,et,nt,(ft+at)*et,(ft+at)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft*et,(ft-at)*nt,et,0,(ft+at)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ft*nt,0,0,(ft-at)*et,(ft-at)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ft*et,(ft+at)*nt,0,nt,(ft-at)*et));var Ct=new go.PathFigure(nt,ft*et,!1);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt,ft*et));var Bt=new go.PathFigure(.8*nt,.75*et,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),ht}),go.Shape.defineFigureGenerator("Ground",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),ht}),go.Shape.defineFigureGenerator("Inverter",function(At,nt,et){var ht=new go.Geometry,at=Rt*.1,ft=.1,vt=.9,Ct=.5,Bt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Bt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var Ft=new go.PathFigure((vt+ft)*nt,Ct*et,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,(vt-at)*nt,(Ct+ft)*et,(vt-ft)*nt,(Ct+at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,(vt+at)*nt,(Ct-ft)*et,(vt+ft)*nt,(Ct-at)*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=Rt*.4,vt=Rt*.1,Ct=.1,Bt=.9,Ft=.5,Ot=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+ft)*et,(.4+at)*nt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+at)*nt,0,.8*nt,(.5-ft)*et));var _t=new go.PathFigure((Bt+Ct)*nt,Ft*et,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft+Ct)*et,(Bt+Ct)*nt,(Ft+vt)*et,(Bt+vt)*nt,(Ft+Ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-Ct)*nt,Ft*et,(Bt-vt)*nt,(Ft+Ct)*et,(Bt-Ct)*nt,(Ft+vt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-Ct)*et,(Bt-Ct)*nt,(Ft-vt)*et,(Bt-vt)*nt,(Ft-Ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+Ct)*nt,Ft*et,(Bt+vt)*nt,(Ft-Ct)*et,(Bt+Ct)*nt,(Ft-vt)*et)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=Rt*at,vt=0,Ct=.5,Bt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(vt+ft)*nt,(Ct-at)*et,.7*nt,(Ct-ft)*et)),at=.1,ft=Rt*.1,vt=.9,Ct=.5;var Ft=new go.PathFigure((vt-at)*nt,Ct*et,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+at)*nt,Ct*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-at)*nt,Ct*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=Rt*at,vt=0,Ct=.5,Bt=new go.PathFigure(0,0,!0);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(vt+ft+ft)*nt,(Ct-at)*et,.8*nt,(Ct-ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(Ct+ft)*et,(vt+ft+ft)*nt,(Ct+at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=Rt*at,vt=.2,Ct=.5,Bt=new go.PathFigure(.1*nt,0,!1);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ft=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(vt+ft)*nt,(Ct-at)*et,.7*nt,(Ct-ft)*et)),at=.1,ft=Rt*.1,vt=.9,Ct=.5;var Ot=new go.PathFigure((vt-at)*nt,Ct*et,!0);return ht.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt+at)*nt,Ct*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt-at)*nt,Ct*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=Rt*at,vt=.2,Ct=.5,Bt=new go.PathFigure(.1*nt,0,!1);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ft=new go.PathFigure(.2*nt,0,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(vt+ft)*nt,(Ct-at)*et,.9*nt,(Ct-ft)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Resistor",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.5*et,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Inductor",function(At,nt,et){var ht=new go.Geometry,at=Rt*.1,ft=.1,vt=.1,Ct=.5,Bt=new go.PathFigure((vt-at*.5)*nt,et,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,0,(vt-at)*nt,et,(vt-ft)*nt,0)),vt=.3,Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,et,(vt+ft)*nt,0,(vt+at)*nt,et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,0,(vt-at)*nt,et,(vt-ft)*nt,0)),vt=.5,Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,et,(vt+ft)*nt,0,(vt+at)*nt,et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,0,(vt-at)*nt,et,(vt-ft)*nt,0)),vt=.7,Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,et,(vt+ft)*nt,0,(vt+at)*nt,et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,0,(vt-at)*nt,et,(vt-ft)*nt,0)),vt=.9,Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+at*.5)*nt,et,(vt+ft)*nt,0,(vt+at)*nt,et)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(At,nt,et){var ht=new go.Geometry,at=Rt*.5,ft=.5,vt=.5,Ct=.5,Bt=new go.PathFigure((vt-ft)*nt,Ct*et,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,(vt+at)*nt,(Ct-ft)*et,(vt+ft)*nt,(Ct-at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,(vt-at)*nt,(Ct+ft)*et,(vt-ft)*nt,(Ct+at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Move,(vt-ft+.1)*nt,Ct*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft-.1)*nt,Ct*et,vt*nt,(Ct-ft)*et,vt*nt,(Ct+ft)*et)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Diode",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(At,nt,et){var ht=new go.Geometry,at=nt,ft=et;nt=nt*.38,et=et*.6;var vt=Rt*.8,Ct=.8,Bt=0,Ft=.5,Ot=(at-nt)/2,_t=(ft-et)/2,te=new go.PathFigure(Bt*nt+Ot,(Ft+Ct)*et+_t,!0);ht.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-Ct)*nt+Ot,Ft*et+_t,(Bt-vt)*nt+Ot,(Ft+Ct)*et+_t,(Bt-Ct)*nt+Ot,(Ft+vt)*et+_t)),te.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft-Ct)*et+_t,(Bt-Ct)*nt+Ot,(Ft-vt)*et+_t,(Bt-vt)*nt+Ot,(Ft-Ct)*et+_t)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-Ct+vt*.5)*nt+Ot,Ft*et+_t,Bt*nt+Ot,(Ft-Ct)*et+_t,(Bt-Ct+vt*.5)*nt+Ot,(Ft-vt)*et+_t)),te.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft+Ct)*et+_t,(Bt-Ct+vt*.5)*nt+Ot,(Ft+vt)*et+_t,Bt*nt+Ot,(Ft+Ct)*et+_t).close()),vt=Rt*.4,Ct=.4,Bt=.2,Ft=.5;var Xt=new go.PathFigure(Bt*nt+Ot,(Ft+Ct)*et+_t,!0);ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-Ct)*nt+Ot,Ft*et+_t,(Bt-vt)*nt+Ot,(Ft+Ct)*et+_t,(Bt-Ct)*nt+Ot,(Ft+vt)*et+_t)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft-Ct)*et+_t,(Bt-Ct)*nt+Ot,(Ft-vt)*et+_t,(Bt-vt)*nt+Ot,(Ft-Ct)*et+_t)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-Ct+vt*.5)*nt+Ot,Ft*et+_t,Bt*nt+Ot,(Ft-Ct)*et+_t,(Bt-Ct+vt*.5)*nt+Ot,(Ft-vt)*et+_t)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft+Ct)*et+_t,(Bt-Ct+vt*.5)*nt+Ot,(Ft+vt)*et+_t,Bt*nt+Ot,(Ft+Ct)*et+_t).close()),vt=Rt*.2,Ct=.2,Bt=.5,Ft=.5;var Me=new go.PathFigure((Bt-Ct)*nt+Ot,Ft*et+_t,!0);ht.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft-Ct)*et+_t,(Bt-Ct)*nt+Ot,(Ft-vt)*et+_t,(Bt-vt)*nt+Ot,(Ft-Ct)*et+_t)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+Ct)*nt+Ot,Ft*et+_t,(Bt+vt)*nt+Ot,(Ft-Ct)*et+_t,(Bt+Ct)*nt+Ot,(Ft-vt)*et+_t)),Me.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft+Ct)*et+_t,(Bt+Ct)*nt+Ot,(Ft+vt)*et+_t,(Bt+vt)*nt+Ot,(Ft+Ct)*et+_t)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-Ct)*nt+Ot,Ft*et+_t,(Bt-vt)*nt+Ot,(Ft+Ct)*et+_t,(Bt-Ct)*nt+Ot,(Ft+vt)*et+_t)),vt=Rt*.4,Ct=.4,Bt=.8,Ft=.5;var qt=new go.PathFigure(Bt*nt+Ot,(Ft-Ct)*et+_t,!0);ht.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+Ct)*nt+Ot,Ft*et+_t,(Bt+vt)*nt+Ot,(Ft-Ct)*et+_t,(Bt+Ct)*nt+Ot,(Ft-vt)*et+_t)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft+Ct)*et+_t,(Bt+Ct)*nt+Ot,(Ft+vt)*et+_t,(Bt+vt)*nt+Ot,(Ft+Ct)*et+_t)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+Ct-vt*.5)*nt+Ot,Ft*et+_t,Bt*nt+Ot,(Ft+Ct)*et+_t,(Bt+Ct-vt*.5)*nt+Ot,(Ft+vt)*et+_t)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft-Ct)*et+_t,(Bt+Ct-vt*.5)*nt+Ot,(Ft-vt)*et+_t,Bt*nt+Ot,(Ft-Ct)*et+_t).close()),vt=Rt*.8,Ct=.8,Bt=1,Ft=.5;var Ne=new go.PathFigure(Bt*nt+Ot,(Ft-Ct)*et+_t,!0);return ht.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+Ct)*nt+Ot,Ft*et+_t,(Bt+vt)*nt+Ot,(Ft-Ct)*et+_t,(Bt+Ct)*nt+Ot,(Ft-vt)*et+_t)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft+Ct)*et+_t,(Bt+Ct)*nt+Ot,(Ft+vt)*et+_t,(Bt+vt)*nt+Ot,(Ft+Ct)*et+_t)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+Ct-vt*.5)*nt+Ot,Ft*et+_t,Bt*nt+Ot,(Ft+Ct)*et+_t,(Bt+Ct-vt*.5)*nt+Ot,(Ft+vt)*et+_t)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt+Ot,(Ft-Ct)*et+_t,(Bt+Ct-vt*.5)*nt+Ot,(Ft-vt)*et+_t,Bt*nt+Ot,(Ft-Ct)*et+_t).close()),ht}),go.Shape.defineFigureGenerator("Email",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(0,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ft.add(new go.PathSegment(go.PathSegment.Move,0,et)),ft.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),ft.add(new go.PathSegment(go.PathSegment.Move,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.35*nt,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var ft=new go.PathFigure(.1*nt,et,!0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var vt=new go.PathFigure(.6*nt,et,!0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var Ct=new go.PathFigure(0,.5*et,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Power",function(At,nt,et){var ht=new go.Geometry,at=Rt*.4,ft=.4,vt=.5,Ct=.5,Bt=mt(),Ft=mt(),Ot=mt(),_t=mt();we(vt,Ct-ft,vt+at,Ct-ft,vt+ft,Ct-at,vt+ft,Ct,.5,Bt,Bt,Ft,Ot,_t);var te=Pt(Ft.x,Ft.y),Xt=new go.PathFigure(Ft.x*nt,Ft.y*et,!0);ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,Ot.x*nt,Ot.y*et,_t.x*nt,_t.y*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,(vt-at)*nt,(Ct+ft)*et,(vt-ft)*nt,(Ct+at)*et)),we(vt-ft,Ct,vt-ft,Ct-at,vt-at,Ct-ft,vt,Ct-ft,.5,Ot,_t,Ft,Bt,Bt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ft.x*nt,Ft.y*et,Ot.x*nt,Ot.y*et,_t.x*nt,_t.y*et)),at=Rt*.3,ft=.3,we(vt-ft,Ct,vt-ft,Ct-at,vt-at,Ct-ft,vt,Ct-ft,.5,Ot,_t,Ft,Bt,Bt),Xt.add(new go.PathSegment(go.PathSegment.Line,Ft.x*nt,Ft.y*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-ft)*nt,Ct*et,_t.x*nt,_t.y*et,Ot.x*nt,Ot.y*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+ft)*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+ft)*nt,Ct*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),we(vt,Ct-ft,vt+at,Ct-ft,vt+ft,Ct-at,vt+ft,Ct,.5,Bt,Bt,Ft,Ot,_t),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ft.x*nt,Ft.y*et,_t.x*nt,_t.y*et,Ot.x*nt,Ot.y*et).close());var Xt=new go.PathFigure(.45*nt,0,!0);return ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),It(Bt),It(Ft),It(Ot),It(_t),It(te),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et/2,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function ft(vt,Ct,Bt){vt.add(new go.PathSegment(go.PathSegment.Move,(.3+Ct)*nt,(.8+Bt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(.5+Ct)*nt,(.5+Bt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(.1+Ct)*nt,(.5+Bt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(.3+Ct)*nt,(.8+Bt)*et).close())}return ft(at,0,0),ft(at,.4,0),ft(at,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.2*nt,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.37*nt,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),at.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),at.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.1*nt,et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=0,vt=0,Ct=at*Rt,Bt=.4*Math.SQRT2/2+.5,Ft=.5-.5*Math.SQRT2/2,Ot=1,_t=.5,te=.5,Xt=0,Me=new go.PathFigure(Bt*nt,(1-Ft)*et,!1);return ht.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,_t*et,Ot*nt,.7*et,Ot*nt,_t*et)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(te+ft)*nt,(Xt+ft)*et,(.5+at+ft)*nt,(.5-Ct+ft)*et,(.5+Ct+ft)*nt,(.5-at+ft)*et)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ft)*nt,(.5+vt)*et,(.5-Ct+ft)*nt,(.5-at+vt)*et,(.5-at+ft)*nt,(.5-Ct+vt)*et)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ft)*nt,.9*et,(.5-at+ft)*nt,(.5+Ct+vt)*et,(.5-Ct+ft)*nt,.9*et)),Me.add(new go.PathSegment(go.PathSegment.Move,(.25+ft)*nt,.8*et)),Me.add(new go.PathSegment(go.PathSegment.Line,(.35+ft)*nt,.9*et)),Me.add(new go.PathSegment(go.PathSegment.Line,(.2+ft)*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at);var ft=new go.PathFigure(nt,et,!1);ht.add(ft);var vt=new go.PathFigure(0,.5*et,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var at=new go.PathFigure(0,.2*et,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.7*nt,et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var ft=new go.PathFigure(.45*nt,.73*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at);var ft=new go.PathFigure(.335*nt,(1-.555)*et,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var vt=.5-.285,Ct=.5,Bt=vt,Ft=Math.PI/4,Ot=4*(1-Math.cos(Ft))/(3*Math.sin(Ft)),_t=Ot*.5,te=vt,Xt=vt,Me=Ot*te,qt=Ot*Xt;ft.add(new go.PathSegment(go.PathSegment.Bezier,(Ct-te)*nt,Bt*et,(Ct-(Me+te)/2)*nt,(Bt+(Xt+qt)/2)*et,(Ct-te)*nt,(Bt+qt)*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,Ct*nt,(Bt-Xt)*et,(Ct-te)*nt,(Bt-qt)*et,(Ct-Me)*nt,(Bt-Xt)*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Ct+te)*nt,Bt*et,(Ct+Me)*nt,(Bt-Xt)*et,(Ct+te)*nt,(Bt-qt)*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(Ct+te)*nt,(Bt+qt)*et,(Ct+(Me+te)/2)*nt,(Bt+(Xt+qt)/2)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var Ne=new go.PathFigure(.2*nt,et,!1);ht.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var ne=new go.PathFigure(.8*nt,et,!1);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.1*nt,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var ft=new go.PathFigure(.2*nt,.2*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at);var ft=new go.PathFigure(nt,et,!1);ht.add(ft);var vt=new go.PathFigure(.1*nt,et,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.05*nt,et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var ft=.05;return at.add(new go.PathSegment(go.PathSegment.Move,(.5-ft)*nt,.875*et)),at.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,ft*nt,ft*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),ht}),go.Shape.defineFigureGenerator("Recycle",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.45*nt,.95*et,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),at.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),at.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var ft=new go.PathFigure(.475*nt,.2*et,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var vt=new go.PathFigure(.675*nt,.575*et,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=Rt*.5,vt=new go.PathFigure(nt,at*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,et,nt,(at+ft)*et,(at+ft)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,at*et,(at-ft)*nt,et,0,(at+ft)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,0,0,(at-ft)*et,(at-ft)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,at*et,(at+ft)*nt,0,nt,(at-ft)*et));var Ct=new go.PathFigure(at*nt,0,!1);return ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,at*nt,.15*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,at*nt,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,at*nt,.85*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,0,at*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.15*nt,at*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.85*nt,at*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),Ct.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Package",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.15*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ft=new go.PathFigure(0,.15*et,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(0,.2*et,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var vt=new go.PathFigure(0,.5*et,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Component",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt,et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var ft=new go.PathFigure(0,.2*et,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var vt=new go.PathFigure(0,.6*et,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.15*nt,.6*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var ft=new go.PathFigure(.15*nt,.6*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt,et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(nt,.8*et,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var vt=.1,Ct=Rt*.1,Bt=.2,Ft=.9,Ot=new go.PathFigure((Bt-vt)*nt,Ft*et,!0);ht.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-vt)*et,(Bt-vt)*nt,(Ft-Ct)*et,(Bt-Ct)*nt,(Ft-vt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+vt)*nt,Ft*et,(Bt+Ct)*nt,(Ft-vt)*et,(Bt+vt)*nt,(Ft-Ct)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft+vt)*et,(Bt+vt)*nt,(Ft+Ct)*et,(Bt+Ct)*nt,(Ft+vt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-vt)*nt,Ft*et,(Bt-Ct)*nt,(Ft+vt)*et,(Bt-vt)*nt,(Ft+Ct)*et).close()),vt=.1,Ct=Rt*.1,Bt=.8,Ft=.9;var _t=new go.PathFigure((Bt-vt)*nt,Ft*et,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft-vt)*et,(Bt-vt)*nt,(Ft-Ct)*et,(Bt-Ct)*nt,(Ft-vt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Bt+vt)*nt,Ft*et,(Bt+Ct)*nt,(Ft-vt)*et,(Bt+vt)*nt,(Ft-Ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Bt*nt,(Ft+vt)*et,(Bt+vt)*nt,(Ft+Ct)*et,(Bt+Ct)*nt,(Ft+vt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Bt-vt)*nt,Ft*et,(Bt-Ct)*nt,(Ft+vt)*et,(Bt-vt)*nt,(Ft+Ct)*et).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.2*nt,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),ht}),go.Shape.defineFigureGenerator("Forklift",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0));var ft=new go.PathFigure(0,.5*et,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var vt=new go.PathFigure(.5*nt,.8*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var Ct=new go.PathFigure(.5*nt,.7*et,!1);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var Bt=.1,Ft=Rt*.1,Ot=.1,_t=.9,te=new go.PathFigure((Ot-Bt)*nt,_t*et,!0);ht.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(_t-Bt)*et,(Ot-Bt)*nt,(_t-Ft)*et,(Ot-Ft)*nt,(_t-Bt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+Bt)*nt,_t*et,(Ot+Ft)*nt,(_t-Bt)*et,(Ot+Bt)*nt,(_t-Ft)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(_t+Bt)*et,(Ot+Bt)*nt,(_t+Ft)*et,(Ot+Ft)*nt,(_t+Bt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-Bt)*nt,_t*et,(Ot-Ft)*nt,(_t+Bt)*et,(Ot-Bt)*nt,(_t+Ft)*et)),Bt=.1,Ft=Rt*.1,Ot=.4,_t=.9;var Xt=new go.PathFigure((Ot-Bt)*nt,_t*et,!0);return ht.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(_t-Bt)*et,(Ot-Bt)*nt,(_t-Ft)*et,(Ot-Ft)*nt,(_t-Bt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+Bt)*nt,_t*et,(Ot+Ft)*nt,(_t-Bt)*et,(Ot+Bt)*nt,(_t-Ft)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(_t+Bt)*et,(Ot+Bt)*nt,(_t+Ft)*et,(Ot+Ft)*nt,(_t+Bt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-Bt)*nt,_t*et,(Ot-Ft)*nt,(_t+Bt)*et,(Ot-Bt)*nt,(_t+Ft)*et)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.1*nt,.4*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var ft=new go.PathFigure(.45*nt,.7*et,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var vt=new go.PathFigure(.55*nt,.4*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Ot=.05,_t=Rt*.05,te=.175,Xt=.95,Ct=new go.PathFigure((te-Ot)*nt,Xt*et,!0);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt-Ot)*et,(te-Ot)*nt,(Xt-_t)*et,(te-_t)*nt,(Xt-Ot)*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,(te+Ot)*nt,Xt*et,(te+_t)*nt,(Xt-Ot)*et,(te+Ot)*nt,(Xt-_t)*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt+Ot)*et,(te+Ot)*nt,(Xt+_t)*et,(te+_t)*nt,(Xt+Ot)*et)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,(te-Ot)*nt,Xt*et,(te-_t)*nt,(Xt+Ot)*et,(te-Ot)*nt,(Xt+_t)*et));var Ot=.05,_t=Rt*.05,te=.375,Xt=.95,Bt=new go.PathFigure((te-Ot)*nt,Xt*et,!0);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt-Ot)*et,(te-Ot)*nt,(Xt-_t)*et,(te-_t)*nt,(Xt-Ot)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(te+Ot)*nt,Xt*et,(te+_t)*nt,(Xt-Ot)*et,(te+Ot)*nt,(Xt-_t)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt+Ot)*et,(te+Ot)*nt,(Xt+_t)*et,(te+_t)*nt,(Xt+Ot)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(te-Ot)*nt,Xt*et,(te-_t)*nt,(Xt+Ot)*et,(te-Ot)*nt,(Xt+_t)*et));var Ot=.05,_t=Rt*.05,te=.625,Xt=.95,Ft=new go.PathFigure((te-Ot)*nt,Xt*et,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt-Ot)*et,(te-Ot)*nt,(Xt-_t)*et,(te-_t)*nt,(Xt-Ot)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(te+Ot)*nt,Xt*et,(te+_t)*nt,(Xt-Ot)*et,(te+Ot)*nt,(Xt-_t)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt+Ot)*et,(te+Ot)*nt,(Xt+_t)*et,(te+_t)*nt,(Xt+Ot)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(te-Ot)*nt,Xt*et,(te-_t)*nt,(Xt+Ot)*et,(te-Ot)*nt,(Xt+_t)*et));var Ot=.05,_t=Rt*.05,te=.825,Xt=.95,Me=new go.PathFigure((te-Ot)*nt,Xt*et,!0);ht.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt-Ot)*et,(te-Ot)*nt,(Xt-_t)*et,(te-_t)*nt,(Xt-Ot)*et)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(te+Ot)*nt,Xt*et,(te+_t)*nt,(Xt-Ot)*et,(te+Ot)*nt,(Xt-_t)*et)),Me.add(new go.PathSegment(go.PathSegment.Bezier,te*nt,(Xt+Ot)*et,(te+Ot)*nt,(Xt+_t)*et,(te+_t)*nt,(Xt+Ot)*et)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(te-Ot)*nt,Xt*et,(te-_t)*nt,(Xt+Ot)*et,(te-Ot)*nt,(Xt+_t)*et).close());var qt=new go.PathFigure(0,et,!1);return ht.add(qt),qt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(0,.2*et,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var vt=new go.PathFigure(.15*nt,et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var Ct=.05,Bt=Rt*.05,Ft=.35,Ot=.775,_t=new go.PathFigure((Ft-Ct)*nt,Ot*et,!0);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Ft*nt,(Ot-Ct)*et,(Ft-Ct)*nt,(Ot-Bt)*et,(Ft-Bt)*nt,(Ot-Ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+Ct)*nt,Ot*et,(Ft+Bt)*nt,(Ot-Ct)*et,(Ft+Ct)*nt,(Ot-Bt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Ft*nt,(Ot+Ct)*et,(Ft+Ct)*nt,(Ot+Bt)*et,(Ft+Bt)*nt,(Ot+Ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Ct)*nt,Ot*et,(Ft-Bt)*nt,(Ot+Ct)*et,(Ft-Ct)*nt,(Ot+Bt)*et).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Globe",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),ht}),go.Shape.defineFigureGenerator("Wave",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.25*et,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Operator",function(At,nt,et){var ht=new go.Geometry,at=.3,ft=Rt*.3,vt=.5,Ct=.7,Bt=new go.PathFigure((vt-at)*nt,Ct*et,!0);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+at)*nt,Ct*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-at)*nt,Ct*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et));var Ft=new go.PathFigure(0,.7*et,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var ft=new go.PathFigure(0,.6*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Delete",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=Rt*.5,vt=.5,Ct=.5,Bt=new go.PathFigure((vt-at)*nt,Ct*et,!0);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+at)*nt,Ct*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-at)*nt,Ct*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et));var Ft=new go.PathFigure(.15*nt,.5*et,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Flag",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.1*et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),ht}),go.Shape.defineFigureGenerator("Help",function(At,nt,et){var ht=new go.Geometry,at=.5,ft=Rt*.5,vt=.5,Ct=.5,Bt=new go.PathFigure((vt-at)*nt,Ct*et,!1);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+at)*nt,Ct*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-at)*nt,Ct*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et).close()),at=.05,ft=Rt*.05,vt=.5,Ct=.8;var Ft=new go.PathFigure((vt-at)*nt,Ct*et,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct-at)*et,(vt-at)*nt,(Ct-ft)*et,(vt-ft)*nt,(Ct-at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+at)*nt,Ct*et,(vt+ft)*nt,(Ct-at)*et,(vt+at)*nt,(Ct-ft)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(Ct+at)*et,(vt+at)*nt,(Ct+ft)*et,(vt+ft)*nt,(Ct+at)*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-at)*nt,Ct*et,(vt-ft)*nt,(Ct+at)*et,(vt-at)*nt,(Ct+ft)*et).close()),Ft.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),Ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),ht}),go.Shape.defineFigureGenerator("Location",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var ft=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var ft=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),ht}),go.Shape.defineFigureGenerator("Gear",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),ht}),go.Shape.defineFigureGenerator("Map",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("Eject",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var ft=new go.PathFigure(0,et*.6,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*1,et*1,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var ft=new go.PathFigure(.126*nt,.85*et,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),ft.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var vt=new go.PathFigure(.402*nt,.85*et,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var Ct=new go.PathFigure(.678*nt,.85*et,!1);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),Ct.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var Bt=new go.PathFigure(.5*nt,.1*et,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),Bt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et*1,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,et*1,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var ft=new go.PathFigure(nt*.204,et,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var vt=new go.PathFigure(nt*.408,et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var Ct=new go.PathFigure(nt*.612,et,!0);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var Bt=new go.PathFigure(nt*.816,et,!0);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var ft=new go.PathFigure(nt*.055,.07*et,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var vt=new go.PathFigure(nt*.055,.13*et,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var Ct=new go.PathFigure(nt*.055,.18*et,!0);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var Bt=new go.PathFigure(nt*1,0,!0);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(.55*nt,et,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),ht}),go.Shape.defineFigureGenerator("Key",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*1,et*.5,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),at.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var ft=new go.PathFigure(0,0,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),ft.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var vt=new go.PathFigure(nt*.11,et*.1,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var Ct=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var Bt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(At,nt,et){var ht=new go.Geometry,at=8,ft=at*Rt,vt=new go.PathFigure(at,0,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-ft,nt-ft,et)),vt.add(new go.PathSegment(go.PathSegment.Line,at,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ft,et,0,et-ft)),vt.add(new go.PathSegment(go.PathSegment.Line,0,at)),vt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,ft,ft,0).close());var Ct=new go.PathFigure(nt*.83,0,!1);ht.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var Bt=new go.PathFigure(nt*.83,et*1,!1);ht.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),Bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var Ft=new go.PathFigure(nt*.78,et*.05,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),Ft.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),Ft.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(At,nt,et){var ht=At?At.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var at=ht*Rt,ft=et*.8,vt=new go.Geometry,Ct=new go.PathFigure(ht,0,!0);return vt.add(Ct),Ct.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-at,0,nt,at)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt,ft-ht)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,ft,nt,ft-at,nt-at,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.7,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),Ct.add(new go.PathSegment(go.PathSegment.Line,nt*.55,ft)),Ct.add(new go.PathSegment(go.PathSegment.Line,ht,ft)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,0,ft-ht,at,ft,0,ft-at)),Ct.add(new go.PathSegment(go.PathSegment.Line,0,ht)),Ct.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,at,at,0).close()),at>1?(vt.spot1=new go.Spot(0,0,at,at),vt.spot2=new go.Spot(1,.8,-at,-at)):(vt.spot1=go.Spot.TopLeft,vt.spot2=new go.Spot(1,.8)),vt}),go.Shape.defineFigureGenerator("Repeat",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*0,et*.45,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var ft=new go.PathFigure(nt*1,et*.55,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(At,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*0,et*.1,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var ft=new go.PathFigure(nt*.1,et*.2,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var vt=new go.PathFigure(nt*.28,et*.37,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(At,nt,et){var ht=new go.Geometry,at=15,ft=at*Rt,vt=new go.PathFigure(nt*.62,et*.475,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-ft,nt-ft,et)),vt.add(new go.PathSegment(go.PathSegment.Line,at,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ft,et,0,et-ft)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),ft>1?(ht.spot1=new go.Spot(0,0,ft,ft),ht.spot2=new go.Spot(1,1,-ft,-ft)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);ht.add(at);var ft=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-ft)).close());var vt=new go.PathFigure(nt*.4,et*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);ht.add(at);var ft=.1/.3;return at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-ft)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);ht.add(at);var ft=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-ft)).close());var vt=new go.PathFigure(nt*.5,et*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var ft=new go.PathFigure(nt*.235,et*.28,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),ft.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(At,nt,et){var ht=new go.Geometry,at=new go.PathFigure(nt*.5,et*0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),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")},98598:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var xn={},vn="5.0",Pt={},mt=null,It=!1,Zt=!1,we=null,Ht=!1,he=null,Rt=null,be=0;be<arguments.length;be++){var ge=arguments[be];if(ge!==null)switch(typeof ge){case"number":vn=ge.toFixed(1);break;case"string":ge.match(new RegExp("^[0-9]\\.[0-9]+$"))?vn=ge:we=ge;break;case"object":typeof ge.is3D!="undefined"?mt=ge:Pt=ge;break;case"boolean":It=ge,Zt=!0;break}}mt===null&&(mt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Pt.material_id!==void 0&&!Zt&&(It=!0)),we!==null&&Pt.id===void 0&&(Pt.id=we);var Kt="",ue="",de=!1,ve=null,At=null,nt=null,et=!1,ht=null,at=null,ft=null,vt=null,Ct=null;Pt.height!==void 0&&(Pt.height=Math.round(Pt.height)),Pt.width!==void 0&&(Pt.width=Math.round(Pt.width));var Bt=function(Fe){return parseFloat(Fe)>4?parseFloat(Fe):5};xn.setHTML5Codebase=function(Fe,Ke){Rt=Fe,Ae(Fe,Ke)},xn.setJavaCodebase=xn.setJavaCodebaseVersion=xn.isCompiledInstalled=xn.setPreCompiledScriptPath=xn.setPreCompiledResourcePath=function(){},xn.setHTML5CodebaseVersion=function(Fe,Ke){var rn=parseFloat(Fe);if(rn!==NaN&&rn<5){console.log("The GeoGebra HTML5 codebase version "+rn+" is deprecated. Using version latest instead.");return}he=Fe,Gt(Fe,Ke)},xn.getHTML5CodebaseVersion=function(){return At},xn.getParameters=function(){return Pt},xn.setFontsCSSURL=function(Fe){vt=Fe},xn.setGiacJSURL=function(Fe){},xn.setJNLPFile=function(Fe){Kt=Fe},xn.setJNLPBaseDir=function(Fe){},xn.inject=function(){function Fe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ke="auto",rn=Pt.id,Fn,Pn=!1,We=0;We<arguments.length;We++){var fe=arguments[We];typeof fe=="string"?(fe=fe.toLowerCase(),fe.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ke=fe:rn=arguments[We]):typeof fe=="boolean"?Pn=fe:fe instanceof HTMLElement&&(Fn=fe)}An();function An(){if(!Ht){setTimeout(An,200);return}Ke=ln(Ke);var Hn=Fn||document.getElementById(rn);if(!Hn){console.log("possibly bug on ajax loading? ");return}if(xn.removeExistingApplet(Hn,!1),Pt.width===void 0&&Hn.clientWidth&&(Pt.width=Hn.clientWidth),Pt.height===void 0&&Hn.clientHeight&&(Pt.height=Hn.clientHeight),!(Pt.width&&Pt.height)&&Ke==="html5"&&(delete Pt.width,delete Pt.height),ve=Ke,Ke==="screenshot")ne(Hn,Pt);else{var un=!1;Pt.hasOwnProperty("playButton")&&Pt.playButton||Pt.hasOwnProperty("clickToLoad")&&Pt.clickToLoad?un=!0:Pt.hasOwnProperty("playButtonAutoDecide")&&Pt.playButtonAutoDecide&&(un=(!Ft()||Fe())&&Ot()),un?(ve="screenshot",Ue(Hn,Pt,Pn,Ke)):Ne(Hn,Pt,Pn)}}};function Ft(){try{return window.self!==window.top}catch(Fe){return!0}}function Ot(){return Pt.hasOwnProperty("screenshotGenerator")&&Pt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}xn.getViews=function(){return mt},xn.isJavaInstalled=function(){return!1};var _t=function(Fe){var Ke=function(We){var fe=JSON.parse(We),An=function(De){return De.type=="G"||De.type=="E"},Hn=fe.elements?fe.elements.filter(An)[0]:fe;if(!Hn||!Hn.url){rn();return}Pt.fileName=Hn.url,te(Hn.settings||{}),mt.is3D=!0;var un="https://www.geogebra.org/images/";xn.setPreviewImage(ht||Hn.previewUrl,un+"GeoGebra_loading.png",un+"applet_play.png"),Fe()},rn=function(){Pt.onError&&Pt.onError(),Sn("Error: Fetching material (id "+Pt.material_id+") failed.",Pt)},Fn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Pn="/materials/"+Pt.material_id+"?scope=basic";Xt("https://"+Fn+"/api/proxy.php?path="+encodeURIComponent(Pn),Ke,rn)};function te(Fe){var Ke=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(rn){Fe[rn]=!!Fe[rn]}),Ke.forEach(function(rn){Pt[rn]===void 0&&Fe[rn]!==void 0&&(Pt[rn]=Fe[rn])}),Pt.showToolBarHelp===void 0&&(Pt.showToolBarHelp=Pt.showToolBar)}function Xt(Fe,Ke,rn){var Fn=new XMLHttpRequest;Fn.open("GET",Fe),Fn.onload=function(){Ke(Fn.responseText)},Fn.onerror=rn,Fn.send()}xn.isHTML5Installed=function(){return!0},xn.getLoadedAppletType=function(){return ve},xn.setPreviewImage=function(Fe,Ke,rn){ht=Fe,at=Ke,ft=rn},xn.removeExistingApplet=function(Fe,Ke){var rn;typeof Fe=="string"&&(Fe=document.getElementById(Fe)),ve=null;var Fn=null;for(rn=0;rn<Fe.childNodes.length;rn++){var Pn=Fe.childNodes[rn],We=Pn.className;We==="applet_screenshot"?Ke?(Pn.style.display="block",ve="screenshot"):Pn.style.display="none":We!=="applet_scaler prerender"&&(Fe.removeChild(Pn),Fn=We&&We.indexOf("appletParameters")!=-1?Pn.id:null,rn--)}var fe=Pt.id!==void 0?Pt.id:Fn,An=window[fe];An&&typeof An.getBase64=="function"&&(An.remove(),window[fe]=null)},xn.refreshHitPoints=function(){if(Bt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Fe=xn.getAppletObject();return Fe&&typeof Fe.recalculateEnvironments=="function"?(Fe.recalculateEnvironments(),!0):!1},xn.startAnimation=function(){var Fe=xn.getAppletObject();return Fe&&typeof Fe.startAnimation=="function"?(Fe.startAnimation(),!0):!1},xn.stopAnimation=function(){var Fe=xn.getAppletObject();return Fe&&typeof Fe.stopAnimation=="function"?(Fe.stopAnimation(),!0):!1},xn.getAppletObject=function(){var Fe=Pt.id!==void 0?Pt.id:"ggbApplet";return window[Fe]},xn.resize=function(){};var Me=function(Fe,Ke,rn){var Fn=document.createElement("param");Fn.setAttribute("name",Ke),Fn.setAttribute("value",rn),Fe.appendChild(Fn)},qt=function(Fe){return Fe&&Fe!=="false"},Ne=function(Fe,Ke,rn){Bt(At)<=4.2&&(rn=!0);var Fn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==At||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Fn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Pn=document.createElement("div");Pn.classList.add("appletParameters","notranslate");var We=Ke.width,fe=Ke.height;if(Ke.disableAutoScale=Ke.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ke.disableAutoScale,Ke.width!==void 0)if(Bt(At)<=4.4)qt(Ke.showToolBar)&&(Ke.height-=7),qt(Ke.showAlgebraInput)&&(Ke.height-=37),Ke.width<605&&qt(Ke.showToolBar)&&(Ke.width=605,We=605);else{var An=100;(qt(Ke.showToolBar)||qt(Ke.showMenuBar))&&(Ke.hasOwnProperty("customToolBar")&&(Ke.customToolbar=Ke.customToolBar),An=qt(Ke.showMenuBar)?245:155),We<An&&(Ke.width=An,We=An)}Pn.style.border="none",Pn.style.display="inline-block";for(var Hn in Ke)Ke.hasOwnProperty(Hn)&&Hn!=="appletOnLoad"&&Pn.setAttribute("data-param-"+Hn,Ke[Hn]);vt&&Pn.setAttribute("data-param-fontscssurl",vt),xn.resize=function(){GGBAppletUtils.responsiveResize(Fe,Ke)},window.addEventListener("resize",function(yt){xn.resize()});var un=typeof Ke.appletOnLoad=="function"?Ke.appletOnLoad:function(){};if(!rn&&Ke.width!==void 0){Ke.hasOwnProperty("showSplash")||Pn.setAttribute("data-param-showSplash","false");var De=Fe.querySelector(".applet_scaler.prerender"),He=De!==null;if(He)var Ee=De.querySelector(".ggb_preview");else{var Ee=tn(We,fe,Ke.borderColor,!1);De=document.createElement("div"),De.className="applet_scaler",De.style.position="relative",De.style.display="block",De.style.width=We+"px",De.style.height=fe+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(De,"66%"),Bt(At)>=5?(Ke.appletOnLoad=function(yt){var kt=Fe.querySelector(".ggb_preview");kt&&kt.parentNode.removeChild(kt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(De),window.GGBT_wsf_view&&$(window).trigger("resize"),un(yt)},He||De.appendChild(Ee)):Pn.appendChild(Ee),De.appendChild(Pn),He||Fe.appendChild(De),setTimeout(function(){xn.resize()},1)}else{var Jt=document.createElement("div");Jt.className="applet_scaler",Jt.style.position="relative",Jt.style.display="block",Jt.appendChild(Pn),Fe.appendChild(Jt),Ke.appletOnLoad=function(yt){xn.resize(),un(yt)}}function ye(yt,kt){kt&&typeof kt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(yt,kt.appletOnLoad):renderGGBElement(yt),Sn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",kt)}function Re(yt,kt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:yt,params:kt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(zt){ye(zt.article,zt.params)}),html5AppletsToProcess=null)},Bt(At)<5&&(yt.className+=" geogebraweb")):ye(yt,kt)}if(Fn){scriptLoadStarted=!0;for(var Be=0;Be<Pn.childNodes.length;Be++){var Qt=Pn.childNodes[Be].tagName;Qt==="TABLE"&&(Pn.removeChild(Pn.childNodes[Be]),Be--)}if(ggbHTML5LoadedScript!==null){var ce=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ce!=null&&ce.parentNode.removeChild(ce)}var Tt=document.createElement("script"),xt=function(){Re(Pn,Ke)};Tt.src=ue+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=At,ggbHTML5LoadedScript=Tt.src,Sn("GeoGebra HTML5 codebase loaded: '"+ue+"'.",Ke),!Rt&&(!he||he=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),xt()):ue.requirejs?__webpack_require__.e(7374).then(function(){var yt=[__webpack_require__(97374)];xt.apply(null,yt)}.bind(this)).catch(__webpack_require__.oe):(Tt.onload=xt,Fe.appendChild(Tt))}else Re(Pn,Ke);Ke.height=fe,Ke.width=We},ne=function(Fe,Ke,rn){var Fn=tn(Ke.width,Ke.height,Ke.borderColor,rn),Pn=document.createElement("div");Pn.style.position="relative",Pn.style.display="block",Pn.style.width=Ke.width+"px",Pn.style.height=Ke.height+"px",Pn.className="applet_screenshot applet_scaler"+(rn?" applet_screenshot_play":""),Pn.appendChild(Fn);var We=GGBAppletUtils.getScale(Ke,Fe,rn);rn?(Fe.appendChild(Ze()),window.GGBT_wsf_view||(Fe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Pn,"66%"),Fe.appendChild(Pn),We!==1&&!isNaN(We)&&(GGBAppletUtils.scaleElement(Pn,We),Pn.style.width=Ke.width+"px",Pn.style.height=Ke.height+"px",Pn.parentNode.style.width=Ke.width*We+"px",Pn.parentNode.style.height=Ke.height*We+"px"),xn.resize=function(){Ce(Fe,Fn,Pn,rn)},window.addEventListener("resize",function(fe){xn.resize()}),xn.resize()};function Ce(Fe,Ke,rn,Fn){if(Fe.contains(Ke)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Fe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Fe)}var Pn=GGBAppletUtils.getScale(Pt,Fe,Fn);rn.parentNode!==null&&(!isNaN(Pn)&&Pn!==1?(GGBAppletUtils.scaleElement(rn,Pn),rn.parentNode.style.width=Pt.width*Pn+"px",rn.parentNode.style.height=Pt.height*Pn+"px"):(GGBAppletUtils.scaleElement(rn,1),rn.parentNode.style.width=Pt.width+"px",rn.parentNode.style.height=Pt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Fe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}xn.onExitFullscreen=function(Fe,Ke){Ke.appendChild(Fe)};var Ue=function(Fe,Ke,rn,Fn){ne(Fe,Ke,!0);for(var Pn=function(){var An=[];for(fe=0;fe<Fe.childNodes.length;fe++)An.push(Fe.childNodes[fe]);if(window.GGBT_wsf_view){var Hn=window.GGBT_wsf_view.renderFullScreen(Fe,Ke.id),un=document.getElementById("fullscreencontainer"),De=jQuery(Fe).find(".fullscreencontent");De.length>0?(Hn.remove(),De.attr("id","fullscreencontent").show(),jQuery(un).append(De),window.dispatchEvent(new Event("resize"))):Ne(Hn,Ke,!1),window.GGBT_wsf_view.launchFullScreen(un)}else ve=Fn,Ne(Fe,Ke,!1);if(!window.GGBT_wsf_view)for(fe=0;fe<An.length;fe++)Fe.removeChild(An[fe])},We=Fe.getElementsByClassName("ggb_preview_play"),fe=0;fe<We.length;fe++)We[fe].addEventListener("click",Pn,!1),We[fe].addEventListener("ontouchstart",Pn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Fe),Ot()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ze=function(){var Fe=document.createElement("div");if(Fe.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ke='.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");}',rn=document.createElement("style");rn.styleSheet?rn.styleSheet.cssText=Ke:rn.appendChild(document.createTextNode(Ke)),document.getElementsByTagName("head")[0].appendChild(rn)}return Fe},tn=function(Fe,Ke,rn,Fn){var Pn=document.createElement("div");Pn.className="ggb_preview",Pn.style.position="absolute",Pn.style.zIndex="90",Pn.style.width=Fe-2+"px",Pn.style.height=Ke-2+"px",Pn.style.top="0px",Pn.style.left="0px",Pn.style.overflow="hidden",Pn.style.backgroundColor="white";var We="lightgrey";rn!==void 0&&(rn==="none"?We="transparent":We=rn),Pn.style.border="1px solid "+We;var fe=document.createElement("img");if(fe.style.position="relative",fe.style.zIndex="1000",fe.style.top="-1px",fe.style.left="-1px",ht!==null&&fe.setAttribute("src",ht),fe.style.opacity=.7,at!==null){var An,Hn,un;if(!Fn){An=document.createElement("img"),An.style.position="absolute",An.style.zIndex="1001",An.style.opacity=1,fe.style.opacity=.3,Hn=360,Hn>Fe/4*3&&(Hn=Fe/4*3),un=Hn/5.8,An.setAttribute("src",at),An.setAttribute("width",Hn),An.setAttribute("height",un);var De=(Fe-Hn)/2,He=(Ke-un)/2;An.style.left=De+"px",An.style.top=He+"px",Pn.appendChild(An)}}return Pn.appendChild(fe),Pn},ln=function(Fe){return Fe=Fe.toLowerCase(),Fe==="html5"||Fe==="screenshot"?Fe:"html5"},ie=["web","webSimple","web3d","tablet","tablet3d","phone"],Gt=function(Fe,Ke){if(At=Fe,Ke){Ae(At,!0);return}var rn=!It;if(rn){var Fn=Bt(At);!isNaN(Fn)&&Fn<4.4&&(rn=!1)}var Pn,We;window.location.protocol.substr(0,4)==="http"?Pn=window.location.protocol:Pn="http:";var fe=At.indexOf("//");fe>0?We=At:fe===0?We=Pn+At:We="https://www.geogebra.org/apps/5.2.814.0/";for(var An in ie)if(At.slice(ie[An].length*-1)===ie[An]||At.slice((ie[An].length+1)*-1)===ie[An]+"/"){Ae(We,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&rn&&!mt.is3D&&!mt.AV&&!mt.SV&&!mt.CV&&!mt.EV2&&!mt.CP&&!mt.PC&&!mt.DA&&!mt.FI&&!mt.PV&&!qt(Pt.showToolBar)&&!qt(Pt.showMenuBar)&&!qt(Pt.showAlgebraInput)&&!qt(Pt.enableRightClick)&&(!Pt.appName||Pt.appName=="classic")?We+="webSimple/":We+="web3d/",Ae(We,!1)},Ae=function(Fe,Ke){if(Fe.requirejs){ue=Fe;return}Fe.slice(-1)!=="/"&&(Fe+="/"),ue=Fe,Ke===null&&(Ke=Fe.indexOf("http")===-1),de=Ke,nt="web.nocache.js",et=!1;var rn=ue.split("/");rn.length>1&&(!Ke&&rn[rn.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):ie.indexOf(rn[rn.length-2])>=0&&(nt=rn[rn.length-2]+".nocache.js")),rn=Fe.split("/"),At=rn[rn.length-3],At.substr(0,4)==="test"?At=At.substr(4,1)+"."+At.substr(5,1):(At.substr(0,3)==="war"||At.substr(0,4)==="beta")&&(At="5.0");var Fn=parseFloat(At);Fn!==NaN&&Fn<5&&Fe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Fn+" is deprecated. Using version latest instead."),Gt("5.0",Ke))},Sn=function(Fe,Ke){window.console&&window.console.log&&(!Ke||typeof Ke.showLogging=="undefined"||Ke.showLogging&&Ke.showLogging!=="false")&&console.log(Fe)};Pt.material_id!==void 0?_t(gn):gn();function gn(){var Fe=vn;he!==null?Fe=he:parseFloat(Fe)<5&&(Fe="5.0"),Gt(Fe,!1),Rt!==null&&Ae(Rt,de),Ht=!0}return xn},GGBAppletUtils=function(){"use strict";function xn(){return window.GGBT_wsf_edit!==void 0}function vn(Ht,he){he!=1?(Ht.style.transformOrigin="0% 0% 0px",Ht.style.webkitTransformOrigin="0% 0% 0px",Ht.style.transform="scale("+he+","+he+")",Ht.style.webkitTransform="scale("+he+","+he+")",Ht.style.maxWidth="initial",Ht.querySelector(".ggb_preview")!==null&&(Ht.querySelector(".ggb_preview").style.maxWidth="initial"),Ht.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ht.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ht.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ht.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ht.style.transform="none",Ht.style.webkitTransform="none")}function Pt(Ht,he,Rt,be,ge,Kt){var ue=null;if(Kt!=null&&Kt!="")for(var de=Ht.parentNode;de!=null;)if((" "+de.className+" ").indexOf(" "+Kt+" ")>-1){ue=de;break}else de=de.parentNode;var ve=0,At=0,nt=0,et=0,ht=0,at=0,ft=0;if(ue)ve=ue.offsetWidth,At=Math.max(be?ue.offsetWidth:0,ue.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ve=Math.min(window.innerWidth,document.documentElement.clientWidth),At=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=ve):(ve=window.innerWidth,At=window.innerHeight,nt=window.innerWidth),Ht){var vt=Ht.getBoundingClientRect();vt.left>0&&vt.left<=ve&&(ge===void 0||!ge)&&(document.dir==="rtl"?(ht=ve-vt.width-vt.left,at=nt<=480?10:30):(at=vt.left,ht=nt<=480?10:30),et=at+ht)}if(Ht&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ct=Ht.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,ft=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,ft=40)}}return Ht&&((Rt===void 0||!Rt)&&he>0&&he+et<ve?ve=he:ve-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Rt===void 0||!Rt)&&(At-=ft)),{width:ve,height:At}}function mt(Ht,he,Rt,be,ge){if(Ht.isScreenshoGenerator)return 1;var Kt=be!==void 0&&be,ue=Ht.noScaleMargin!=null&&Ht.noScaleMargin,de=function(Ct){return Ct&&Ct!=="false"},ve=de(Ht.autoHeight),At=Pt(he,Ht.width,Rt,ve,Kt&&window.GGBT_wsf_view||ue,ge),nt=parseInt(At.width),et=Ht.width,ht=Ht.height;if(et===void 0){var at=he.querySelector(".appletParameters");at&&(et=at.offsetWidth,ht=at.offsetHeight)}var ft=nt/et,vt=Kt?1:At.height/ht;return Rt!==void 0&&!Rt&&(ft=Math.min(1,ft),vt=Math.min(1,vt)),Math.min(ft,vt)}function It(Ht,he,Rt){var be=1,ge,Kt=!1;if(Ht.hasOwnProperty("allowUpscale")&&(Kt=Ht.allowUpscale),Ht.hasOwnProperty("scale")&&(be=parseFloat(Ht.scale),(isNaN(be)||be===null||be===0)&&(be=1),be>1&&(Kt=!0)),he&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Kt=!0),!(Ht.hasOwnProperty("disableAutoScale")&&Ht.disableAutoScale))ge=mt(Ht,he,Kt,Rt,Ht.scaleContainerClass);else return be;return Kt&&(!Ht.hasOwnProperty("scale")||be===1)?ge:Math.min(be,ge)}function Zt(Ht){var he=Math.min(window.innerWidth,document.documentElement.clientWidth),Rt=Math.min(window.innerHeight,document.documentElement.clientHeight),be=Ht.getBoundingClientRect(),ge=(he-be.width)/2,Kt=(Rt-be.height)/2;Kt<0&&(Kt=0),Ht.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ge<40?Ht.style.left="40px":Ht.style.left=ge+"px",Ht.style.top=Kt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Kt<40?Ht.style.top="40px":Ht.style.top=Kt+"px",Ht.style.left=ge+"px")}function we(Ht,he){var Rt=Ht.querySelector(".appletParameters");if(Rt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(he.id!==Rt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ht)}if(Rt.parentElement&&/fullscreen/.test(Rt.parentElement.className))return;var be=It(he,Ht);xn()&&Rt.setAttribute("data-param-scale",be);for(var ge=null,Kt=0;Kt<Ht.childNodes.length;Kt++)if(Ht.childNodes[Kt].className!==void 0&&Ht.childNodes[Kt].className.match(/^applet_scaler/)){ge=Ht.childNodes[Kt];break}if(ge!==null&&ge.querySelector(".noscale")!==null)return;var ue=he.id!==void 0?he.id:"ggbApplet",de=window[ue];(de==null||!de.recalculateEnvironments)&&ge!==null&&!ge.className.match(/fullscreen/)&&(ge.parentNode.style.transform="",!isNaN(be)&&be!==1?(ge.parentNode.style.width=he.width*be+"px",ge.parentNode.style.height=he.height*be+"px",vn(ge,be)):(vn(ge,1),ge.parentNode.style.width=he.width+"px",ge.parentNode.style.height=he.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Zt(Ht),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Rt).parents(".content-added-content"))}}return{responsiveResize:we,isFlexibleWorksheetEditor:xn,positionCenter:Zt,getScale:It,scaleElement:vn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var xn=n.location.search;return xn.indexOf(J)!=-1||xn.indexOf(K)!=-1}function q(xn,vn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(xn){var vn=s[L].bindings;s[L].bindings=function(){for(var Pt=vn?vn():{},mt=xn[webModule.__softPermutationId],It=O;It<mt.length;It++){var Zt=mt[It];Pt[Zt[O]]=Zt[P]}return Pt}};var t;function u(){return v(),t}function v(){if(!t){var xn=o.createElement(Q);if(xn.id=L,xn.style.cssText=R+S,xn.tabIndex=-1,o.body.appendChild(xn),t=xn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var vn=document.compatMode==U?V:W;t.write(vn+X),t.close()}}}function w(xn){function vn(mt){function It(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Zt=It();if(Zt){mt();return}function we(){if(!Zt){if(!It())return;Zt=!0,mt(),o.removeEventListener&&o.removeEventListener(Z,we,!1),Ht&&clearInterval(Ht)}}o.addEventListener&&o.addEventListener(Z,we,!1);var Ht=setInterval(function(){we()},$)}function Pt(mt){var It=u(),Zt=It.body,we=It.createElement(_);we.language=ab,we.crossOrigin=W,we.src=mt,webModule.__errFn&&(we.onerror=function(){webModule.__errFn(L,new Error(bb+mt))}),Zt.appendChild(we)}vn(function(){Pt(xn)})}webModule.__startLoadingFragment=function(xn){return C(xn)},webModule.__installRunAsyncCode=function(xn){var vn=u(),Pt=vn.body,mt=vn.createElement(_);mt.language=ab,mt.text=xn,Pt.appendChild(mt),Pt.removeChild(mt)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(xn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(xn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(xn){var vn=c[xn];return vn==null?null:vn},r=d,webModule.__errFn=e}function B(){function xn(Ht){var he=Ht.lastIndexOf(rb);he==-1&&(he=Ht.length);var Rt=Ht.indexOf(sb);Rt==-1&&(Rt=Ht.length);var be=Ht.lastIndexOf(tb,Math.min(Rt,he));return be>=O?Ht.substring(O,be+P):W}function vn(Ht){if(!Ht.match(/^\w+:\/\//)){var he=o.createElement(ub);he.src=Ht+vb,Ht=xn(he.src)}return Ht}function Pt(){var Ht=__gwt_getMetaProperty(wb);return Ht!=null?Ht:W}function mt(){for(var Ht=o.getElementsByTagName(_),he=O;he<Ht.length;++he)if(Ht[he].src.indexOf(xb)!=-1)return xn(Ht[he].src);return W}function It(){var Ht=o.getElementsByTagName(yb);return Ht.length>O?Ht[Ht.length-P].href:W}function Zt(){var Ht=o.location;return Ht.href==Ht.protocol+zb+Ht.host+Ht.pathname+Ht.search+Ht.hash}var we=Pt();return we==W&&(we=mt()),we==W&&(we=It()),we==W&&Zt()&&(we=xn(o.location.href)),we=vn(we),we}function C(xn){return xn.match(/^\//)||xn.match(/^[a-zA-Z]+:\/\//)?xn:webModule.__moduleBase+xn}function D(){var xn=[],vn=O,Pt=[],mt=[];function It(Ht){var he=mt[Ht](),Rt=Pt[Ht];if(he in Rt)return he;var be=[];for(var ge in Rt)be[Rt[ge]]=ge;throw r&&r(Ht,be,he),null}if(__gwt_isKnownPropertyValue=function(Ht,he){return he in Pt[Ht]},webModule.__getPropMap=function(){var Ht={};for(var he in Pt)Pt.hasOwnProperty(he)&&(Ht[he]=It(he));return Ht},webModule.__computePropValue=It,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Zt;try{Zt=Cb;var we=Zt.indexOf(Db);we!=-1&&(vn=parseInt(Zt.substring(we+P),$),Zt=Zt.substring(O,we))}catch(Ht){}return webModule.__softPermutationId=vn,C(Zt+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})()},58788:function(xn,vn,Pt){"use strict";Pt.d(vn,{Ax:function(){return we},Ds:function(){return Ht},KI:function(){return Rt},SI:function(){return Zt},f1:function(){return It}});var mt=Pt(10148);function It(be){let ge=!0;if(be.length>0){for(let Kt=0;Kt<be.length;Kt++)if(be[Kt].compile_success==0||!be[Kt].compile_success){ge=!1;break}}else ge=!1;return ge}function Zt(be,ge=""){let Kt=[];for(let ue=0;ue<be.length;ue++){let de=be[ue],ve=ge?`${ge}/${de.name}`:`${de.name}`;Kt.push({title:de.name,type:de.type,isLeaf:de.type!=="tree",key:ve})}return Kt}function we(be,ge,Kt){for(let ue=0;ue<be.length;ue++){let de=be[ue];if(de.key===ge){de.children=Kt;break}de.children&&we(de.children,ge,Kt)}return be}function Ht(be,ge,Kt){let ue;return function(){let de=this,ve=arguments,At=function(){ue=null,Kt||be.apply(de,ve)},nt=Kt&&!ue;clearTimeout(ue),ue=setTimeout(At,ge),nt&&be.apply(de,ve)}}const he=!0,Rt=mt.Z.API_SERVER},88477:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return At}});var mt=Pt(3113),It=Pt(59301),Zt=Object.defineProperty,we=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,ge=(nt,et,ht)=>et in nt?Zt(nt,et,{enumerable:!0,configurable:!0,writable:!0,value:ht}):nt[et]=ht,Kt=(nt,et)=>{for(var ht in et||(et={}))Rt.call(et,ht)&&ge(nt,ht,et[ht]);if(he)for(var ht of he(et))be.call(et,ht)&&ge(nt,ht,et[ht]);return nt},ue=(nt,et)=>we(nt,Ht(et)),de=(nt,et)=>{var ht={};for(var at in nt)Rt.call(nt,at)&&et.indexOf(at)<0&&(ht[at]=nt[at]);if(nt!=null&&he)for(var at of he(nt))et.indexOf(at)<0&&be.call(nt,at)&&(ht[at]=nt[at]);return ht},ve=(nt,et,ht)=>new Promise((at,ft)=>{var vt=Ft=>{try{Bt(ht.next(Ft))}catch(Ot){ft(Ot)}},Ct=Ft=>{try{Bt(ht.throw(Ft))}catch(Ot){ft(Ot)}},Bt=Ft=>Ft.done?at(Ft.value):Promise.resolve(Ft.value).then(vt,Ct);Bt((ht=ht.apply(nt,et)).next())});const At=nt=>{var et=nt,{children:ht}=et,at=de(et,["children"]);const[ft,vt]=(0,It.useState)(!1);return It.createElement(mt.ZP,ue(Kt({},at),{loading:ft,onClick:Ct=>ve(void 0,null,function*(){try{vt(!0),yield at.onClick(Ct),vt(!1)}catch(Bt){console.error(Bt),vt(!1)}})}),ht)}},86377:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return ge}});var mt=Pt(59301),It=Pt(92832),Zt=Pt(12563),we=Pt(8591),Ht={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},he=Pt(72528);const{TextArea:Rt}=It.default;class be extends mt.Component{constructor(ue){super(ue),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:ue,onAnswerChange:de,addChildAnswer:ve,exerciseIsPublish:At,answers:nt,activeOptionErrorIndex:et,flex:ht="0 0 1000px"}=this.props;console.log("----",nt);let{inputVisible:at,EditInputIndex:ft}=this.state;return mt.createElement("div",{className:Ht.flex},mt.createElement("div",{className:`${Ht.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",ue+1,"):"),mt.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},nt==null?void 0:nt.map((vt,Ct)=>mt.createElement(mt.Fragment,null,ft!==Ct?(vt==null?void 0:vt.length)>0?mt.createElement(Zt.default,{className:"edit-tag",key:vt,closable:!((nt==null?void 0:nt.length)===1&&Ct===0),onClose:Bt=>{Bt.preventDefault(),(nt==null?void 0:nt.length)===1&&Ct===0?this.props.deleteChildAnswermain(ue,Ct):this.props.deleteChildAnswer(ue,Ct)}},mt.createElement("span",{onDoubleClick:Bt=>{this.setState({EditInputIndex:Ct}),Bt.preventDefault()}},vt)):mt.createElement(It.default,{defaultValue:vt,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Bt=>{if(Bt.target.value.replaceAll(" ","").length<=0){we.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}de(ue,Ct,Bt.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):mt.createElement(It.default,{defaultValue:vt,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Bt=>{if(Bt.target.value.replaceAll(" ","").length<=0){we.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}de(ue,Ct,Bt.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!at&&mt.createElement(Zt.default,{className:"site-tag-plus",onClick:()=>{ve(ue),this.setState({inputVisible:!0})}},mt.createElement(he.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var ge=be},49985:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return At}});var mt=Pt(59301),It=Pt(23469),Zt=Object.defineProperty,we=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,ge=(nt,et,ht)=>et in nt?Zt(nt,et,{enumerable:!0,configurable:!0,writable:!0,value:ht}):nt[et]=ht,Kt=(nt,et)=>{for(var ht in et||(et={}))Rt.call(et,ht)&&ge(nt,ht,et[ht]);if(he)for(var ht of he(et))be.call(et,ht)&&ge(nt,ht,et[ht]);return nt},ue=(nt,et)=>we(nt,Ht(et)),de=(nt,et,ht)=>ge(nt,typeof et!="symbol"?et+"":et,ht);const ve="\u2581";class At extends mt.Component{constructor(){super(...arguments),de(this,"getChCountBeforeCursor",(et,ht)=>{const at=ht.line;let ft=0;for(let Ct=0;Ct<at;Ct++)ft+=et.getLine(Ct).split(ve).length-1;const vt=et.getLine(at).substring(0,ht.ch);return ft+=vt.split(ve).length-1,ft}),de(this,"onCMBeforeChange",(et,ht)=>{const at=et.getRange(ht.from,ht.to);let ft=0;if(ht.text.forEach(vt=>{ft+=vt.split(ve).length-1}),at&&at.indexOf(ve)!=-1){const vt=at.split(ve).length-1,Ct=this.getChCountBeforeCursor(et,ht.from);console.log(`\u5220\u9664${vt}\u4E2A\uFF0C \u4E4B\u524D\u6709${Ct}\u4E2A\uFF0C\u65B0\u589E${ft}\u4E2A`),this.props.deleteEmptyDisabled?ht.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(Ct,vt,ft)}else if(ft){const vt=this.getChCountBeforeCursor(et,ht.from);console.log(`\u65B0\u589E${ft}\u4E2A\uFF0C\u4E4B\u524D\u6709${vt}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(vt,0,ft)}})}render(){return mt.createElement(It.Z,ue(Kt({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},65983:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return ce}});var mt=Pt(59301),It={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Zt=Pt(92310),we=Pt.n(Zt),Ht=Pt(71418);var he=function(Tt,xt){return(he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,kt){yt.__proto__=kt}||function(yt,kt){for(var zt in kt)Object.prototype.hasOwnProperty.call(kt,zt)&&(yt[zt]=kt[zt])})(Tt,xt)};function Rt(Tt,xt){function yt(){this.constructor=Tt}he(Tt,xt),Tt.prototype=xt===null?Object.create(xt):(yt.prototype=xt.prototype,new yt)}function be(Tt,xt,yt,kt){return new(yt||(yt=Promise))(function(zt,Mt){function se(sn){try{cn(kt.next(sn))}catch(En){Mt(En)}}function $e(sn){try{cn(kt.throw(sn))}catch(En){Mt(En)}}function cn(sn){var En;sn.done?zt(sn.value):(En=sn.value,En instanceof yt?En:new yt(function(Gn){Gn(En)})).then(se,$e)}cn((kt=kt.apply(Tt,xt||[])).next())})}function ge(Tt,xt){var yt,kt,zt,Mt,se={label:0,sent:function(){if(1&zt[0])throw zt[1];return zt[1]},trys:[],ops:[]};return Mt={next:$e(0),throw:$e(1),return:$e(2)},typeof Symbol=="function"&&(Mt[Symbol.iterator]=function(){return this}),Mt;function $e(cn){return function(sn){return function(En){if(yt)throw new TypeError("Generator is already executing.");for(;se;)try{if(yt=1,kt&&(zt=2&En[0]?kt.return:En[0]?kt.throw||((zt=kt.return)&&zt.call(kt),0):kt.next)&&!(zt=zt.call(kt,En[1])).done)return zt;switch(kt=0,zt&&(En=[2&En[0],zt.value]),En[0]){case 0:case 1:zt=En;break;case 4:return se.label++,{value:En[1],done:!1};case 5:se.label++,kt=En[1],En=[0];continue;case 7:En=se.ops.pop(),se.trys.pop();continue;default:if(zt=se.trys,!((zt=zt.length>0&&zt[zt.length-1])||En[0]!==6&&En[0]!==2)){se=0;continue}if(En[0]===3&&(!zt||En[1]>zt[0]&&En[1]<zt[3])){se.label=En[1];break}if(En[0]===6&&se.label<zt[1]){se.label=zt[1],zt=En;break}if(zt&&se.label<zt[2]){se.label=zt[2],se.ops.push(En);break}zt[2]&&se.ops.pop(),se.trys.pop();continue}En=xt.call(Tt,se)}catch(Gn){En=[6,Gn],kt=0}finally{yt=zt=0}if(5&En[0])throw En[1];return{value:En[0]?En[1]:void 0,done:!0}}([cn,sn])}}}function Kt(){for(var Tt=0,xt=0,yt=arguments.length;xt<yt;xt++)Tt+=arguments[xt].length;var kt=Array(Tt),zt=0;for(xt=0;xt<yt;xt++)for(var Mt=arguments[xt],se=0,$e=Mt.length;se<$e;se++,zt++)kt[zt]=Mt[se];return kt}var ue=function(){function Tt(){}return Tt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Tt.setAttributes=function(xt,yt){for(var kt=0,zt=yt;kt<zt.length;kt++){var Mt=zt[kt],se=Mt[0],$e=Mt[1];xt.setAttribute(se,$e)}},Tt.createRect=function(xt,yt,kt){var zt=document.createElementNS("http://www.w3.org/2000/svg","rect");return zt.setAttribute("width",xt.toString()),zt.setAttribute("height",yt.toString()),kt&&Tt.setAttributes(zt,kt),zt},Tt.createLine=function(xt,yt,kt,zt,Mt){var se=document.createElementNS("http://www.w3.org/2000/svg","line");return se.setAttribute("x1",xt.toString()),se.setAttribute("y1",yt.toString()),se.setAttribute("x2",kt.toString()),se.setAttribute("y2",zt.toString()),Mt&&Tt.setAttributes(se,Mt),se},Tt.createPolygon=function(xt,yt){var kt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return kt.setAttribute("points",xt),yt&&Tt.setAttributes(kt,yt),kt},Tt.createCircle=function(xt,yt){var kt=document.createElementNS("http://www.w3.org/2000/svg","circle");return kt.setAttribute("cx",(xt/2).toString()),kt.setAttribute("cy",(xt/2).toString()),kt.setAttribute("r",xt.toString()),yt&&Tt.setAttributes(kt,yt),kt},Tt.createEllipse=function(xt,yt,kt){var zt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return zt.setAttribute("cx",(xt/2).toString()),zt.setAttribute("cy",(yt/2).toString()),zt.setAttribute("rx",(xt/2).toString()),zt.setAttribute("ry",(yt/2).toString()),kt&&Tt.setAttributes(zt,kt),zt},Tt.createGroup=function(xt){var yt=document.createElementNS("http://www.w3.org/2000/svg","g");return xt&&Tt.setAttributes(yt,xt),yt},Tt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Tt.createMarker=function(xt,yt,kt,zt,Mt,se,$e){var cn=document.createElementNS("http://www.w3.org/2000/svg","marker");return Tt.setAttributes(cn,[["id",xt],["orient",yt],["markerWidth",kt.toString()],["markerHeight",zt.toString()],["refX",Mt.toString()],["refY",se.toString()]]),cn.appendChild($e),cn},Tt.createText=function(xt){var yt=document.createElementNS("http://www.w3.org/2000/svg","text");return yt.setAttribute("x","0"),yt.setAttribute("y","0"),xt&&Tt.setAttributes(yt,xt),yt},Tt.createTSpan=function(xt,yt){var kt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return kt.textContent=xt,yt&&Tt.setAttributes(kt,yt),kt},Tt.createImage=function(xt){var yt=document.createElementNS("http://www.w3.org/2000/svg","image");return xt&&Tt.setAttributes(yt,xt),yt},Tt.createPoint=function(xt,yt){var kt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return kt.x=xt,kt.y=yt,kt},Tt.createPath=function(xt,yt){var kt=document.createElementNS("http://www.w3.org/2000/svg","path");return kt.setAttribute("d",xt),yt&&Tt.setAttributes(kt,yt),kt},Tt}(),de=function(){function Tt(){}return Tt.addKey=function(xt){Tt.key=xt},Object.defineProperty(Tt,"isLicensed",{get:function(){return!!Tt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Tt.key)},enumerable:!1,configurable:!0}),Tt}(),ve=function(){function Tt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Tt.prototype.rasterize=function(xt,yt,kt){var zt=this;return new Promise(function(Mt){var se=kt!==void 0?kt:document.createElement("canvas");xt===null&&(zt.markersOnly=!0,zt.naturalSize=!1);var $e=document.createElementNS("http://www.w3.org/2000/svg","svg");$e.setAttribute("xmlns","http://www.w3.org/2000/svg"),$e.setAttribute("width",yt.width.baseVal.valueAsString),$e.setAttribute("height",yt.height.baseVal.valueAsString),$e.setAttribute("viewBox","0 0 "+yt.viewBox.baseVal.width.toString()+" "+yt.viewBox.baseVal.height.toString()),$e.innerHTML=yt.innerHTML,zt.naturalSize===!0?($e.width.baseVal.value=xt.naturalWidth,$e.height.baseVal.value=xt.naturalHeight):zt.width!==void 0&&zt.height!==void 0&&($e.width.baseVal.value=zt.width,$e.height.baseVal.value=zt.height),se.width=$e.width.baseVal.value,se.height=$e.height.baseVal.value;var cn=$e.outerHTML,sn=se.getContext("2d");zt.markersOnly!==!0&&sn.drawImage(xt,0,0,se.width,se.height);var En=window.URL,Gn=new Image(se.width,se.height);Gn.setAttribute("crossOrigin","anonymous");var zn=new Blob([cn],{type:"image/svg+xml"}),Zn=En.createObjectURL(zn);Gn.onload=function(){sn.drawImage(Gn,0,0),En.revokeObjectURL(Zn);var $n=se.toDataURL(zt.imageType,zt.imageQuality);Mt($n)},Gn.src=Zn})},Tt}(),At=function(){},nt=function(){function Tt(xt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+xt+"_"}return Object.defineProperty(Tt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.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(Tt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Tt.prototype.addClass=function(xt){return this.styleSheet===void 0&&this.addStyleSheet(),xt.name=""+this.classNamePrefix+xt.localName,this.classes.push(xt),this.styleSheet.sheet.insertRule("."+xt.name+" {"+xt.style+"}",this.styleSheet.sheet.cssRules.length),xt},Tt.prototype.addRule=function(xt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(xt),this.styleSheet.sheet.insertRule(xt.selector+" {"+xt.style+"}",this.styleSheet.sheet.cssRules.length)},Tt.prototype.addStyleSheet=function(){var xt;this.styleSheet=document.createElement("style"),((xt=this.styleSheetRoot)!==null&&xt!==void 0?xt:document.head).appendChild(this.styleSheet),this.addRule(new et("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new et("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new et("@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;
`))},Tt.prototype.removeStyleSheet=function(){var xt;this.styleSheet&&(((xt=this.styleSheetRoot)!==null&&xt!==void 0?xt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Tt}(),et=function(Tt,xt){this.selector=Tt,this.style=xt},ht=function(Tt,xt){this.localName=Tt,this.style=xt},at=function(){function Tt(xt,yt,kt,zt,Mt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=xt,this.displayMode=yt,this.markerItems=kt,this.uiStyleSettings=zt,this.styles=Mt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Tt.prototype.show=function(xt){var yt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var kt=document.createElement("div");kt.className=this.toolbarBlockStyleClass.name,kt.style.whiteSpace="nowrap",this.uiContainer.appendChild(kt),this.addActionButton(kt,'<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(kt,'<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(kt,'<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(kt,'<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(kt,'<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(kt,'<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(kt,'<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(kt,'<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(Mt){var se=document.createElement("div");se.className=""+yt.toolbarButtonStyleClass.name,se.setAttribute("data-type-name",Mt.typeName),se.innerHTML=Mt.icon,se.addEventListener("click",function(){yt.markerToolbarButtonClicked(se,Mt)}),yt.buttons.push(se),yt.markerButtons.push(se)}),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 zt=document.createElement("div");zt.className=this.toolbarBlockStyleClass.name,zt.style.whiteSpace="nowrap",zt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(zt),this.addActionButton(zt,'<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(zt,'<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()},Tt.prototype.addButtonClickListener=function(xt){this.buttonClickListeners.push(xt)},Tt.prototype.removeButtonClickListener=function(xt){this.buttonClickListeners.indexOf(xt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(xt),1)},Tt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Tt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var xt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var yt=0;yt<this.markerButtons.length;yt++)yt<xt||yt===xt&&this.markerButtons.length-1===xt?this.markerButtonBlock.appendChild(this.markerButtons[yt]):(yt===xt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[yt]))}},Tt.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")},Tt.prototype.resetButtonStyles=function(){var xt=this;this.buttons.forEach(function(yt){yt.className=yt.className.replace(xt.uiStyleSettings.toolbarButtonStyleColorsClassName?xt.uiStyleSettings.toolbarButtonStyleColorsClassName:xt.toolbarButtonStyleColorsClass.name,"").trim(),yt.className=yt.className.replace(xt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?xt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:xt.toolbarActiveButtonStyleColorsClass.name,"").trim(),yt.className+=" "+(xt.uiStyleSettings.toolbarButtonStyleColorsClassName?xt.uiStyleSettings.toolbarButtonStyleColorsClassName:xt.toolbarButtonStyleColorsClass.name)})},Tt.prototype.addActionButton=function(xt,yt,kt){var zt=this,Mt=document.createElement("div");switch(Mt.className=""+this.toolbarButtonStyleClass.name,Mt.innerHTML=yt,Mt.setAttribute("data-action",kt),Mt.addEventListener("click",function(){zt.actionToolbarButtonClicked(Mt,kt)}),kt){case"select":Mt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Mt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Mt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Mt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Mt.style.fill=this.uiStyleSettings.closeButtonColor}xt.appendChild(Mt),this.buttons.push(Mt)},Tt.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 xt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ht("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px;
padding: `+xt+`px;
box-sizing: content-box;
`)),this.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 et("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new et("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Tt.prototype.markerToolbarButtonClicked=function(xt,yt){this.setActiveButton(xt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(kt){return kt("marker",yt)}),this.markerButtonOverflowBlock.style.display="none"},Tt.prototype.actionToolbarButtonClicked=function(xt,yt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(kt){return kt("action",yt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Tt.prototype.setActiveButton=function(xt){this.resetButtonStyles(),xt.className=xt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),xt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Tt.prototype.setActiveMarkerButton=function(xt){var yt=this.markerButtons.find(function(kt){return kt.getAttribute("data-type-name")===xt});yt&&this.setActiveButton(yt)},Tt.prototype.setCurrentMarker=function(xt){var yt=this;this.currentMarker=xt,this.buttons.filter(function(kt){return/delete|notes/.test(kt.getAttribute("data-action"))}).forEach(function(kt){yt.currentMarker===void 0?(kt.style.fillOpacity="0.4",kt.style.pointerEvents="none"):(kt.style.fillOpacity="1",kt.style.pointerEvents="all")})},Tt}(),ft=function(){function Tt(xt,yt,kt,zt){this.panels=[],this.panelButtons=[],this.markerjsContainer=xt,this.displayMode=yt,this.uiStyleSettings=kt,this.styles=zt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Tt.prototype.addStyles=function(){var xt;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 yt=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: `+((xt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&xt!==void 0?xt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ht("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*yt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*yt)+`px;
padding: `+yt+`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 et("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new et("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Tt.prototype.show=function(xt){var yt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((yt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&yt!==void 0?yt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Tt.prototype.setPanelButtons=function(xt){var yt,kt,zt=this;this.panels=xt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((yt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&yt!==void 0?yt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((kt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&kt!==void 0?kt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Mt){var se;Mt.uiStyleSettings=zt.uiStyleSettings;var $e=document.createElement("div");$e.className=zt.toolboxButtonStyleClass.name+" "+((se=zt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&se!==void 0?se:zt.toolboxButtonStyleColorsClass.name),$e.innerHTML=Mt.icon,$e.title=Mt.title,$e.addEventListener("click",function(){zt.panelButtonClick(Mt)}),zt.panelButtons.push($e),zt.buttonRow.appendChild($e)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Tt.prototype.panelButtonClick=function(xt){var yt=this,kt=-1;if(xt!==this.activePanel){kt=this.panels.indexOf(xt),this.panelRow.innerHTML="";var zt=xt.getUi();zt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(zt),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=xt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){yt.displayMode==="inline"?yt.panelRow.style.display="none":yt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Mt,se){var $e,cn;Mt.className=yt.toolboxButtonStyleClass.name+" "+(se===kt?""+(($e=yt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&$e!==void 0?$e:yt.toolboxActiveButtonStyleColorsClass.name):""+((cn=yt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&cn!==void 0?cn:yt.toolboxButtonStyleColorsClass.name))})},Tt}(),vt=function(Tt,xt){this.title=Tt,this.icon=xt},Ct=function(Tt){function xt(yt,kt,zt,Mt){var se=Tt.call(this,yt,Mt||'<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 se.colors=[],se.addTransparent=!1,se.colorBoxes=[],se.colors=kt,se.currentColor=zt,se.setCurrentColor=se.setCurrentColor.bind(se),se.getColorBox=se.getColorBox.bind(se),se}return Rt(xt,Tt),xt.prototype.getUi=function(){var yt=this,kt=document.createElement("div");return kt.style.overflow="hidden",kt.style.whiteSpace="nowrap",this.colors.forEach(function(zt){var Mt=yt.getColorBox(zt);kt.appendChild(Mt),yt.colorBoxes.push(Mt)}),kt},xt.prototype.getColorBox=function(yt){var kt=this,zt=this.uiStyleSettings.toolbarHeight/4,Mt=this.uiStyleSettings.toolbarHeight-zt,se=document.createElement("div");se.style.display="inline-block",se.style.boxSizing="content-box",se.style.width=Mt-2+"px",se.style.height=Mt-2+"px",se.style.padding="1px",se.style.marginRight="2px",se.style.marginBottom="2px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderRadius=(Mt+2)/2+"px",se.style.borderColor=yt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){kt.setCurrentColor(yt,se)});var $e=document.createElement("div");return $e.style.display="inline-block",$e.style.width=Mt-2+"px",$e.style.height=Mt-2+"px",$e.style.backgroundColor=yt,$e.style.borderRadius=Mt/2+"px",yt==="transparent"&&($e.style.fill=this.uiStyleSettings.toolboxAccentColor,$e.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>`),se.appendChild($e),se},xt.prototype.setCurrentColor=function(yt,kt){var zt=this;this.currentColor=yt,this.colorBoxes.forEach(function(Mt){Mt.style.borderColor=Mt===kt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(yt)},xt}(vt),Bt=function(){function Tt(xt,yt,kt){this._state="new",this._isSelected=!1,this._container=xt,this._overlayContainer=yt,this.globalSettings=kt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Tt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Tt.prototype.ownsTarget=function(xt){return!1},Object.defineProperty(Tt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Tt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Tt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Tt.prototype.pointerDown=function(xt,yt){},Tt.prototype.dblClick=function(xt,yt){},Tt.prototype.manipulate=function(xt){},Tt.prototype.pointerUp=function(xt){this.stateChanged()},Tt.prototype.dispose=function(){},Tt.prototype.addMarkerVisualToContainer=function(xt){this.container.childNodes.length>0?this.container.insertBefore(xt,this.container.childNodes[0]):this.container.appendChild(xt)},Tt.prototype.getState=function(){return{typeName:Tt.typeName,state:this.state,notes:this.notes}},Tt.prototype.restoreState=function(xt){this._state=xt.state,this.notes=xt.notes},Tt.prototype.scale=function(xt,yt){},Tt.prototype.colorChanged=function(xt){this.onColorChanged&&this.onColorChanged(xt),this.stateChanged()},Tt.prototype.fillColorChanged=function(xt){this.onFillColorChanged&&this.onFillColorChanged(xt),this.stateChanged()},Tt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var xt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),xt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(xt)&&this.onStateChanged(this)}},Tt.typeName="MarkerBase",Tt}(),Ft=function(){function Tt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Tt.prototype.findGripByVisual=function(xt){return this.topLeft.ownsTarget(xt)?this.topLeft:this.topCenter.ownsTarget(xt)?this.topCenter:this.topRight.ownsTarget(xt)?this.topRight:this.centerLeft.ownsTarget(xt)?this.centerLeft:this.centerRight.ownsTarget(xt)?this.centerRight:this.bottomLeft.ownsTarget(xt)?this.bottomLeft:this.bottomCenter.ownsTarget(xt)?this.bottomCenter:this.bottomRight.ownsTarget(xt)?this.bottomRight:void 0},Tt}(),Ot=function(){function Tt(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Tt.prototype.ownsTarget=function(xt){return xt===this.visual||xt===this.visual.childNodes[0]||xt===this.visual.childNodes[1]},Tt}(),_t=function(){function Tt(){}return Tt.toITransformMatrix=function(xt){return{a:xt.a,b:xt.b,c:xt.c,d:xt.d,e:xt.e,f:xt.f}},Tt.toSVGMatrix=function(xt,yt){return xt.a=yt.a,xt.b=yt.b,xt.c=yt.c,xt.d=yt.d,xt.e=yt.e,xt.f=yt.f,xt},Tt}(),te=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.left=0,Mt.top=0,Mt.width=0,Mt.height=0,Mt.defaultSize={x:50,y:20},Mt.offsetX=0,Mt.offsetY=0,Mt.rotationAngle=0,Mt.CB_DISTANCE=10,Mt._suppressMarkerCreateEvent=!1,Mt.container.transform.baseVal.appendItem(ue.createTransform()),Mt.setupControlBox(),Mt}return Rt(xt,Tt),Object.defineProperty(xt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"visual",{get:function(){return this._visual},set:function(yt){this._visual=yt;var kt=ue.createTransform();this._visual.transform.baseVal.appendItem(kt)},enumerable:!1,configurable:!0}),xt.prototype.ownsTarget=function(yt){return!!Tt.prototype.ownsTarget.call(this,yt)||!!(this.controlGrips.findGripByVisual(yt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(yt))},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.state==="new"&&(this.left=yt.x,this.top=yt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var zt=this.unrotatePoint(yt);if(this.manipulationStartX=zt.x,this.manipulationStartY=zt.y,this.offsetX=zt.x-this.left,this.offsetY=zt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(kt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(kt)){this.activeGrip=this.rotatorGrip;var Mt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Mt.x-this.width/2,this.top=Mt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var se=this.container.transform.baseVal.getItem(0);se.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(se,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},xt.prototype.pointerUp=function(yt){var kt=this.state;Tt.prototype.pointerUp.call(this,yt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(yt),this._state="select",kt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},xt.prototype.moveVisual=function(yt){this.visual.style.transform="translate("+yt.x+"px, "+yt.y+"px)"},xt.prototype.manipulate=function(yt){var kt=this.unrotatePoint(yt);this.state==="creating"?this.resize(yt):this.state==="move"?(this.left=this.manipulationStartLeft+(kt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(kt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(kt):this.state==="rotate"&&this.rotate(yt)},xt.prototype.resize=function(yt){var kt=this.manipulationStartLeft,zt=this.manipulationStartWidth,Mt=this.manipulationStartTop,se=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:kt=this.manipulationStartLeft+yt.x-this.manipulationStartX,zt=this.manipulationStartWidth+this.manipulationStartLeft-kt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:zt=this.manipulationStartWidth+yt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Mt=this.manipulationStartTop+yt.y-this.manipulationStartY,se=this.manipulationStartHeight+this.manipulationStartTop-Mt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:se=this.manipulationStartHeight+yt.y-this.manipulationStartY}zt>=0?(this.left=kt,this.width=zt):(this.left=kt+zt,this.width=-zt),se>=0?(this.top=Mt,this.height=se):(this.top=Mt+se,this.height=-se),this.setSize()},xt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},xt.prototype.rotate=function(yt){if(Math.abs(yt.x-this.centerX)>.1){var kt=Math.sign(yt.x-this.centerX);this.rotationAngle=180*Math.atan((yt.y-this.centerY)/(yt.x-this.centerX))/Math.PI+90*kt,this.applyRotation()}},xt.prototype.applyRotation=function(){var yt=this.container.transform.baseVal.getItem(0);yt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(yt,0)},xt.prototype.rotatePoint=function(yt){if(this.rotationAngle===0)return yt;var kt=this.container.getCTM(),zt=ue.createPoint(yt.x,yt.y);return{x:(zt=zt.matrixTransform(kt)).x,y:zt.y}},xt.prototype.unrotatePoint=function(yt){if(this.rotationAngle===0)return yt;var kt=this.container.getCTM();kt=kt.inverse();var zt=ue.createPoint(yt.x,yt.y);return{x:(zt=zt.matrixTransform(kt)).x,y:zt.y}},xt.prototype.select=function(){Tt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xt.prototype.deselect=function(){Tt.prototype.deselect.call(this),this.controlBox.style.display="none"},xt.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var yt=ue.createTransform();yt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(yt),this.container.appendChild(this.controlBox),this.controlRect=ue.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ue.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ft,this.addControlGrips(),this.controlBox.style.display="none"},xt.prototype.adjustControlBox=function(){var yt=this.controlBox.transform.baseVal.getItem(0);yt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(yt,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()},xt.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()},xt.prototype.createGrip=function(){var yt=new Ot;return yt.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(yt.visual),yt},xt.prototype.positionGrips=function(){var yt=this.controlGrips.topLeft.GRIP_SIZE,kt=-yt/2,zt=kt,Mt=(this.width+this.CB_DISTANCE)/2-yt/2,se=(this.height+this.CB_DISTANCE)/2-yt/2,$e=this.height+this.CB_DISTANCE-yt/2,cn=this.width+this.CB_DISTANCE-yt/2;this.positionGrip(this.controlGrips.topLeft.visual,kt,zt),this.positionGrip(this.controlGrips.topCenter.visual,Mt,zt),this.positionGrip(this.controlGrips.topRight.visual,cn,zt),this.positionGrip(this.controlGrips.centerLeft.visual,kt,se),this.positionGrip(this.controlGrips.centerRight.visual,cn,se),this.positionGrip(this.controlGrips.bottomLeft.visual,kt,$e),this.positionGrip(this.controlGrips.bottomCenter.visual,Mt,$e),this.positionGrip(this.controlGrips.bottomRight.visual,cn,$e),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Mt,zt-3*this.CB_DISTANCE)},xt.prototype.positionGrip=function(yt,kt,zt){var Mt=yt.transform.baseVal.getItem(0);Mt.setTranslate(kt,zt),yt.transform.baseVal.replaceItem(Mt,0)},xt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},xt.prototype.showControlBox=function(){this.controlBox.style.display=""},xt.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)},Tt.prototype.getState.call(this))},xt.prototype.restoreState=function(yt){Tt.prototype.restoreState.call(this,yt);var kt=yt;this.left=kt.left,this.top=kt.top,this.width=kt.width,this.height=kt.height,this.rotationAngle=kt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(_t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,kt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(_t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,kt.containerTransformMatrix))},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt);var zt=this.rotatePoint({x:this.left,y:this.top}),Mt=this.unrotatePoint({x:zt.x*yt,y:zt.y*kt});this.left=Mt.x,this.top=Mt.y,this.width=this.width*yt,this.height=this.height*kt,this.adjustControlBox()},xt}(Bt),Xt=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.fillColor="transparent",Mt.strokeColor="transparent",Mt.strokeWidth=0,Mt.strokeDasharray="",Mt.opacity=1,Mt.setStrokeColor=Mt.setStrokeColor.bind(Mt),Mt.setFillColor=Mt.setFillColor.bind(Mt),Mt.setStrokeWidth=Mt.setStrokeWidth.bind(Mt),Mt.setStrokeDasharray=Mt.setStrokeDasharray.bind(Mt),Mt.createVisual=Mt.createVisual.bind(Mt),Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.visual)},xt.prototype.createVisual=function(){this.visual=ue.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.state==="new"&&(this.createVisual(),this.moveVisual(yt),this._state="creating")},xt.prototype.manipulate=function(yt){Tt.prototype.manipulate.call(this,yt)},xt.prototype.resize=function(yt){Tt.prototype.resize.call(this,yt),this.setSize()},xt.prototype.setSize=function(){Tt.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},xt.prototype.pointerUp=function(yt){Tt.prototype.pointerUp.call(this,yt),this.setSize()},xt.prototype.setStrokeColor=function(yt){this.strokeColor=yt,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(yt),this.stateChanged()},xt.prototype.setFillColor=function(yt){this.fillColor=yt,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},xt.prototype.setStrokeWidth=function(yt){this.strokeWidth=yt,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xt.prototype.setStrokeDasharray=function(yt){this.strokeDasharray=yt,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Tt.prototype.getState.call(this))},xt.prototype.restoreState=function(yt){var kt=yt;this.fillColor=kt.fillColor,this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.opacity=kt.opacity,this.createVisual(),Tt.prototype.restoreState.call(this,yt),this.setSize()},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt),this.setSize()},xt.title="Rectangle marker",xt}(te),Me=function(Tt){function xt(yt,kt,zt,Mt){var se=Tt.call(this,yt,Mt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return se.widths=[],se.widthBoxes=[],se.widths=kt,se.currentWidth=zt,se.setCurrentWidth=se.setCurrentWidth.bind(se),se}return Rt(xt,Tt),xt.prototype.getUi=function(){var yt=this,kt=document.createElement("div");return kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2",this.widths.forEach(function(zt){var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.flexGrow="2",Mt.style.alignItems="center",Mt.style.justifyContent="space-between",Mt.style.padding="5px",Mt.style.borderWidth="2px",Mt.style.borderStyle="solid",Mt.style.borderColor=zt===yt.currentWidth?yt.uiStyleSettings.toolboxAccentColor:"transparent",Mt.addEventListener("click",function(){yt.setCurrentWidth(zt,Mt)}),kt.appendChild(Mt);var se=document.createElement("div");se.innerText=zt.toString(),se.style.marginRight="5px",Mt.appendChild(se);var $e=document.createElement("div");$e.style.minHeight="20px",$e.style.flexGrow="2",$e.style.display="flex",$e.style.alignItems="center";var cn=document.createElement("hr");cn.style.minWidth="20px",cn.style.border="0px",cn.style.borderTop=zt+"px solid "+yt.uiStyleSettings.toolboxColor,cn.style.flexGrow="2",$e.appendChild(cn),Mt.appendChild($e),yt.widthBoxes.push(Mt)}),kt},xt.prototype.setCurrentWidth=function(yt,kt){var zt=this;this.currentWidth=yt,this.widthBoxes.forEach(function(Mt){Mt.style.borderColor=Mt===kt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},xt}(vt),qt=function(Tt){function xt(yt,kt,zt,Mt){var se=Tt.call(this,yt,Mt||'<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 se.styles=[],se.styleBoxes=[],se.styles=kt,se.currentStyle=zt,se.setCurrentStyle=se.setCurrentStyle.bind(se),se}return Rt(xt,Tt),xt.prototype.getUi=function(){var yt=this,kt=document.createElement("div");return kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2",this.styles.forEach(function(zt){var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.justifyContent="space-between",Mt.style.padding="5px",Mt.style.borderWidth="2px",Mt.style.borderStyle="solid",Mt.style.overflow="hidden",Mt.style.maxWidth=100/yt.styles.length-5+"%",Mt.style.borderColor=zt===yt.currentStyle?yt.uiStyleSettings.toolboxAccentColor:"transparent",Mt.addEventListener("click",function(){yt.setCurrentStyle(zt,Mt)}),kt.appendChild(Mt);var se=document.createElement("div");se.style.minHeight="20px",se.style.flexGrow="2",se.style.overflow="hidden";var $e=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+yt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(zt!==""?'stroke-dasharray="'+zt+'"':"")+` />
</svg>`;se.innerHTML=$e,Mt.appendChild(se),yt.styleBoxes.push(Mt)}),kt},xt.prototype.setCurrentStyle=function(yt,kt){var zt=this;this.currentStyle=yt,this.styleBoxes.forEach(function(Mt){Mt.style.borderColor=Mt===kt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},xt}(vt),Ne=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.strokeColor=zt.defaultColor,Mt.strokeWidth=zt.defaultStrokeWidth,Mt.strokeDasharray=zt.defaultStrokeDasharray,Mt.strokePanel=new Ct("Line color",zt.defaultColorSet,zt.defaultColor),Mt.strokePanel.onColorChanged=Mt.setStrokeColor,Mt.strokeWidthPanel=new Me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Mt.strokeWidthPanel.onWidthChanged=Mt.setStrokeWidth,Mt.strokeStylePanel=new qt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Mt.strokeStylePanel.onStyleChanged=Mt.setStrokeDasharray,Mt}return Rt(xt,Tt),Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Tt.prototype.getState.call(this);return yt.typeName=xt.typeName,yt},xt.typeName="FrameMarker",xt.title="Frame marker",xt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',xt}(Xt),ne=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"},Ce=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.x1=0,Mt.y1=0,Mt.x2=0,Mt.y2=0,Mt.defaultLength=50,Mt.manipulationStartX=0,Mt.manipulationStartY=0,Mt.manipulationStartX1=0,Mt.manipulationStartY1=0,Mt.manipulationStartX2=0,Mt.manipulationStartY2=0,Mt.setupControlBox(),Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!!Tt.prototype.ownsTarget.call(this,yt)||!(!this.grip1.ownsTarget(yt)&&!this.grip2.ownsTarget(yt))},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.manipulationStartX=yt.x,this.manipulationStartY=yt.y,this.state==="new"&&(this.x1=yt.x,this.y1=yt.y,this.x2=yt.x,this.y2=yt.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(kt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(kt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},xt.prototype.pointerUp=function(yt){var kt=this.state;Tt.prototype.pointerUp.call(this,yt),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(yt),this._state="select",kt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},xt.prototype.adjustVisual=function(){},xt.prototype.manipulate=function(yt){this.state==="creating"?this.resize(yt):this.state==="move"?(this.x1=this.manipulationStartX1+yt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+yt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+yt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+yt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(yt)},xt.prototype.resize=function(yt){switch(this.activeGrip){case this.grip1:this.x1=yt.x,this.y1=yt.y;break;case this.grip2:case void 0:this.x2=yt.x,this.y2=yt.y}this.adjustVisual(),this.adjustControlBox()},xt.prototype.select=function(){Tt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xt.prototype.deselect=function(){Tt.prototype.deselect.call(this),this.controlBox.style.display="none"},xt.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},xt.prototype.adjustControlBox=function(){this.positionGrips()},xt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},xt.prototype.createGrip=function(){var yt=new Ot;return yt.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(yt.visual),yt},xt.prototype.positionGrips=function(){var yt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-yt/2,this.y1-yt/2),this.positionGrip(this.grip2.visual,this.x2-yt/2,this.y2-yt/2)},xt.prototype.positionGrip=function(yt,kt,zt){var Mt=yt.transform.baseVal.getItem(0);Mt.setTranslate(kt,zt),yt.transform.baseVal.replaceItem(Mt,0)},xt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Tt.prototype.getState.call(this))},xt.prototype.restoreState=function(yt){Tt.prototype.restoreState.call(this,yt);var kt=yt;this.x1=kt.x1,this.y1=kt.y1,this.x2=kt.x2,this.y2=kt.y2},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt),this.x1=this.x1*yt,this.y1=this.y1*kt,this.x2=this.x2*yt,this.y2=this.y2*kt,this.adjustVisual(),this.adjustControlBox()},xt}(Bt),Ue=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.strokeColor="transparent",Mt.strokeWidth=0,Mt.strokeDasharray="",Mt.setStrokeColor=Mt.setStrokeColor.bind(Mt),Mt.setStrokeWidth=Mt.setStrokeWidth.bind(Mt),Mt.setStrokeDasharray=Mt.setStrokeDasharray.bind(Mt),Mt.strokeColor=zt.defaultColor,Mt.strokeWidth=zt.defaultStrokeWidth,Mt.strokeDasharray=zt.defaultStrokeDasharray,Mt.strokePanel=new Ct("Line color",zt.defaultColorSet,zt.defaultColor),Mt.strokePanel.onColorChanged=Mt.setStrokeColor,Mt.strokeWidthPanel=new Me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Mt.strokeWidthPanel.onWidthChanged=Mt.setStrokeWidth,Mt.strokeStylePanel=new qt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Mt.strokeStylePanel.onStyleChanged=Mt.setStrokeDasharray,Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.visual&&yt!==this.selectorLine&&yt!==this.visibleLine)},xt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},xt.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xt.prototype.setStrokeColor=function(yt){this.strokeColor=yt,this.adjustVisual(),this.colorChanged(yt)},xt.prototype.setStrokeWidth=function(yt){this.strokeWidth=yt,this.adjustVisual()},xt.prototype.setStrokeDasharray=function(yt){this.strokeDasharray=yt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Tt.prototype.getState.call(this));return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){Tt.prototype.restoreState.call(this,yt);var kt=yt;this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.createVisual(),this.adjustVisual()},xt.typeName="LineMarker",xt.title="Line marker",xt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',xt}(Ce),Ze=function(Tt){function xt(yt,kt,zt,Mt){var se=Tt.call(this,yt,Mt||'<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 se.fonts=[],se.fontBoxes=[],se.fonts=kt,se.currentFont=zt,se.setCurrentFont=se.setCurrentFont.bind(se),se}return Rt(xt,Tt),xt.prototype.getUi=function(){var yt=this,kt=document.createElement("div");return kt.style.overflow="hidden",kt.style.flexGrow="2",this.fonts.forEach(function(zt){var Mt=document.createElement("div");Mt.style.display="inline-block",Mt.style.alignItems="center",Mt.style.justifyContent="space-between",Mt.style.padding="5px",Mt.style.borderWidth="2px",Mt.style.borderStyle="solid",Mt.style.overflow="hidden",Mt.style.maxWidth=100/yt.fonts.length-5+"%",Mt.style.borderColor=zt===yt.currentFont?yt.uiStyleSettings.toolboxAccentColor:"transparent",Mt.addEventListener("click",function(){yt.setCurrentFont(zt,Mt)}),kt.appendChild(Mt);var se=document.createElement("div");se.style.display="flex",se.style.minHeight="20px",se.style.flexGrow="2",se.style.fontFamily=zt,se.style.overflow="hidden";var $e=document.createElement("div");$e.style.whiteSpace="nowrap",$e.style.overflow="hidden",$e.style.textOverflow="ellipsis",$e.innerHTML="The quick brown fox jumps over the lazy dog",se.appendChild($e),Mt.appendChild(se),yt.fontBoxes.push(Mt)}),kt},xt.prototype.setCurrentFont=function(yt,kt){var zt=this;this.currentFont=yt,this.fontBoxes.forEach(function(Mt){Mt.style.borderColor=Mt===kt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},xt}(vt),tn=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.color="transparent",Mt.padding=5,Mt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Mt.text=Mt.DEFAULT_TEXT,Mt.isMoved=!1,Mt.color=zt.defaultColor,Mt.fontFamily=zt.defaultFontFamily,Mt.defaultSize={x:100,y:30},Mt.setColor=Mt.setColor.bind(Mt),Mt.setFont=Mt.setFont.bind(Mt),Mt.renderText=Mt.renderText.bind(Mt),Mt.sizeText=Mt.sizeText.bind(Mt),Mt.textEditDivClicked=Mt.textEditDivClicked.bind(Mt),Mt.showTextEditor=Mt.showTextEditor.bind(Mt),Mt.setSize=Mt.setSize.bind(Mt),Mt.positionTextEditor=Mt.positionTextEditor.bind(Mt),Mt.colorPanel=new Ct("Color",zt.defaultColorSet,zt.defaultColor),Mt.colorPanel.onColorChanged=Mt.setColor,Mt.fontFamilyPanel=new Ze("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Mt.fontFamilyPanel.onFontChanged=Mt.setFont,Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){if(Tt.prototype.ownsTarget.call(this,yt)||yt===this.visual||yt===this.textElement||yt===this.bgRectangle)return!0;var kt=!1;return this.textElement.childNodes.forEach(function(zt){zt===yt&&(kt=!0)}),kt},xt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.isMoved=!1,this.pointerDownPoint=yt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(yt),this._state="creating")},xt.prototype.renderText=function(){var yt=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(kt){yt.textElement.appendChild(ue.createTSpan(kt.trim()===""?" ":kt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},xt.prototype.getTextScale=function(){var yt=this.textElement.getBBox(),kt=1;if(yt.width>0&&yt.height>0){var zt=(1*this.width-this.width*this.padding*2/100)/yt.width,Mt=(1*this.height-this.height*this.padding*2/100)/yt.height;kt=Math.min(zt,Mt)}return kt},xt.prototype.getTextPosition=function(yt){var kt=this.textElement.getBBox(),zt=0,Mt=0;return kt.width>0&&kt.height>0&&(zt=(this.width-kt.width*yt)/2,Mt=this.height/2-kt.height*yt/2),{x:zt,y:Mt}},xt.prototype.sizeText=function(){var yt=this.textElement.getBBox(),kt=this.getTextScale(),zt=this.getTextPosition(kt);zt.y-=yt.y*kt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+zt.x+"px, "+zt.y+"px) scale("+kt+", "+kt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(zt.x,zt.y),this.textElement.transform.baseVal.getItem(1).setScale(kt,kt))},xt.prototype.manipulate=function(yt){Tt.prototype.manipulate.call(this,yt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(yt.x-this.pointerDownPoint.x)>5||Math.abs(yt.y-this.pointerDownPoint.y)>5)},xt.prototype.resize=function(yt){Tt.prototype.resize.call(this,yt),this.isMoved=!0,this.setSize(),this.sizeText()},xt.prototype.setSize=function(){Tt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},xt.prototype.pointerUp=function(yt){var kt=this.state;kt==="creating"&&(this._suppressMarkerCreateEvent=!0),Tt.prototype.pointerUp.call(this,yt),this.setSize(),(kt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},xt.prototype.showTextEditor=function(){var yt=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(kt){kt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var kt=Number.parseFloat(yt.textEditor.style.fontSize);yt.textEditor.clientWidth>=Number.parseInt(yt.textEditor.style.maxWidth)&&kt>.9;)kt-=.1,yt.textEditor.style.fontSize=Math.max(kt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(kt){kt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(kt){if(kt.clipboardData){var zt=kt.clipboardData.getData("text"),Mt=window.getSelection();if(!Mt.rangeCount)return!1;Mt.deleteFromDocument(),Mt.getRangeAt(0).insertNode(document.createTextNode(zt)),kt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){yt.textEditDivClicked(yt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},xt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var yt=this.getTextScale(),kt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),zt=this.textElement.getBBox(),Mt={x:zt.width*yt,y:zt.height*yt};kt.x-=Mt.x/2,kt.y-=Mt.y/2,this.textEditor.style.top=kt.y+"px",this.textEditor.style.left=kt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-kt.x+"px",this.textEditor.style.fontSize=Math.max(16*yt,12)+"px",this.textElement.style.display="none"}},xt.prototype.textEditDivClicked=function(yt){this.text=yt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},xt.prototype.select=function(){Tt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},xt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Tt.prototype.deselect.call(this)},xt.prototype.dblClick=function(yt,kt){Tt.prototype.dblClick.call(this,yt,kt),this.showTextEditor()},xt.prototype.setColor=function(yt){this.textElement&&ue.setAttributes(this.textElement,[["fill",yt]]),this.color=yt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(yt)},xt.prototype.setFont=function(yt){this.textElement&&ue.setAttributes(this.textElement,[["font-family",yt]]),this.fontFamily=yt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},xt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},xt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Tt.prototype.getState.call(this));return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){var kt=yt;this.color=kt.color,this.fontFamily=kt.fontFamily,this.padding=kt.padding,this.text=kt.text,this.createVisual(),Tt.prototype.restoreState.call(this,yt),this.setSize()},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt),this.setSize(),this.sizeText(),this.positionTextEditor()},xt.typeName="TextMarker",xt.title="Text marker",xt.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>',xt}(te),ln=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.color="transparent",Mt.lineWidth=3,Mt.drawing=!1,Mt.pixelRatio=1,Mt.color=zt.defaultColor,Mt.lineWidth=zt.defaultStrokeWidth,Mt.pixelRatio=zt.freehandPixelRatio,Mt.setColor=Mt.setColor.bind(Mt),Mt.addCanvas=Mt.addCanvas.bind(Mt),Mt.finishCreation=Mt.finishCreation.bind(Mt),Mt.setLineWidth=Mt.setLineWidth.bind(Mt),Mt.colorPanel=new Ct("Color",zt.defaultColorSet,zt.defaultColor),Mt.colorPanel.onColorChanged=Mt.setColor,Mt.lineWidthPanel=new Me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Mt.lineWidthPanel.onWidthChanged=Mt.setLineWidth,Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.visual&&yt!==this.drawingImage)},xt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var yt=ue.createTransform();this.visual.transform.baseVal.appendItem(yt),this.addMarkerVisualToContainer(this.visual)},xt.prototype.pointerDown=function(yt,kt){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(yt.x,yt.y),this.drawing=!0):Tt.prototype.pointerDown.call(this,yt,kt)},xt.prototype.manipulate=function(yt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(yt.x,yt.y),this.canvasContext.stroke()):Tt.prototype.manipulate.call(this,yt)},xt.prototype.resize=function(yt){Tt.prototype.resize.call(this,yt),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},xt.prototype.pointerUp=function(yt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Tt.prototype.pointerUp.call(this,yt)},xt.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)},xt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Tt.prototype.select.call(this)},xt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Tt.prototype.deselect.call(this)},xt.prototype.finishCreation=function(){for(var yt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),kt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],zt=kt[0],Mt=kt[1],se=kt[2],$e=kt[3],cn=!1,sn=0;sn<this.canvasElement.height;sn++)for(var En=0;En<this.canvasElement.width;En++)yt.data[sn*this.canvasElement.width*4+4*En+3]>0&&(cn=!0,sn<Mt&&(Mt=sn),En<zt&&(zt=En),sn>$e&&($e=sn),En>se&&(se=En));if(cn){this.left=zt/this.pixelRatio,this.top=Mt/this.pixelRatio,this.width=(se-zt)/this.pixelRatio,this.height=($e-Mt)/this.pixelRatio;var Gn=document.createElement("canvas");Gn.width=se-zt,Gn.height=$e-Mt,Gn.getContext("2d").putImageData(this.canvasContext.getImageData(zt,Mt,se-zt,$e-Mt),0,0),this.drawingImgUrl=Gn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},xt.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},xt.prototype.setColor=function(yt){this.color=yt,this.colorChanged(yt)},xt.prototype.setLineWidth=function(yt){this.lineWidth=yt},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Object.assign({drawingImgUrl:this.drawingImgUrl},Tt.prototype.getState.call(this));return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){this.createVisual(),Tt.prototype.restoreState.call(this,yt),this.drawingImgUrl=yt.drawingImgUrl,this.setDrawingImage()},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt),this.setDrawingImage()},xt.typeName="FreehandMarker",xt.title="Freehand marker",xt.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>',xt}(te),ie=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,zt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Mt.typeBoxes=[],Mt.currentType=kt,Mt.setCurrentType=Mt.setCurrentType.bind(Mt),Mt}return Rt(xt,Tt),xt.prototype.getUi=function(){var yt=this,kt=document.createElement("div");kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2";for(var zt=function($e){var cn="both";switch($e){case 0:cn="both";break;case 1:cn="start";break;case 2:cn="end";break;case 3:cn="none"}var sn=document.createElement("div");if(sn.style.display="flex",sn.style.flexGrow="2",sn.style.alignItems="center",sn.style.justifyContent="space-between",sn.style.padding="5px",sn.style.borderWidth="2px",sn.style.borderStyle="solid",sn.style.borderColor=cn===Mt.currentType?Mt.uiStyleSettings.toolboxAccentColor:"transparent",sn.addEventListener("click",function(){yt.setCurrentType(cn,sn)}),kt.appendChild(sn),cn==="both"||cn==="start"){var En=document.createElement("div");En.style.display="flex",En.style.alignItems="center",En.style.minHeight="20px",En.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="`+(Mt.uiStyleSettings!==void 0?Mt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,En.style.marginLeft="5px",sn.appendChild(En)}var Gn=document.createElement("div");Gn.style.display="flex",Gn.style.alignItems="center",Gn.style.minHeight="20px",Gn.style.flexGrow="2";var zn=document.createElement("hr");if(zn.style.minWidth="20px",zn.style.border="0px",zn.style.borderTop="3px solid "+(Mt.uiStyleSettings!==void 0?Mt.uiStyleSettings.toolboxColor:"#eeeeee"),zn.style.flexGrow="2",Gn.appendChild(zn),sn.appendChild(Gn),cn==="both"||cn==="end"){var Zn=document.createElement("div");Zn.style.display="flex",Zn.style.alignItems="center",Zn.style.minHeight="20px",Zn.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="`+(Mt.uiStyleSettings!==void 0?Mt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Zn.style.marginRight="5px",sn.appendChild(Zn)}Mt.typeBoxes.push(sn)},Mt=this,se=0;se<4;se++)zt(se);return kt},xt.prototype.setCurrentType=function(yt,kt){var zt=this;this.currentType=yt,this.typeBoxes.forEach(function(Mt){Mt.style.borderColor=Mt===kt?zt.uiStyleSettings!==void 0?zt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},xt}(vt),Gt=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.arrowType="end",Mt.arrowBaseHeight=10,Mt.arrowBaseWidth=10,Mt.getArrowPoints=Mt.getArrowPoints.bind(Mt),Mt.setArrowType=Mt.setArrowType.bind(Mt),Mt.arrowTypePanel=new ie("Arrow type","end"),Mt.arrowTypePanel.onArrowTypeChanged=Mt.setArrowType,Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.arrow1&&yt!==this.arrow2)},xt.prototype.getArrowPoints=function(yt,kt){var zt=this.arrowBaseWidth+2*this.strokeWidth,Mt=this.arrowBaseHeight+2*this.strokeWidth;return yt-zt/2+","+(kt+Mt/2)+" "+yt+","+(kt-Mt/2)+" "+(yt+zt/2)+","+(kt+Mt/2)},xt.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.state==="creating"&&this.createTips()},xt.prototype.adjustVisual=function(){if(Tt.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var yt=0;Math.abs(this.x1-this.x2)>.1&&(yt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var kt=this.arrow1.transform.baseVal.getItem(0);kt.setRotate(yt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(kt,0);var zt=this.arrow2.transform.baseVal.getItem(0);zt.setRotate(yt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(zt,0)}},xt.prototype.setArrowType=function(yt){this.arrowType=yt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Object.assign({arrowType:this.arrowType},Tt.prototype.getState.call(this));return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){Tt.prototype.restoreState.call(this,yt);var kt=yt;this.arrowType=kt.arrowType,this.createTips(),this.adjustVisual()},xt.typeName="ArrowMarker",xt.title="Arrow marker",xt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',xt}(Ue),Ae=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.fillColor=zt.defaultFillColor,Mt.strokeWidth=0,Mt.fillPanel=new Ct("Color",zt.defaultColorSet,zt.defaultFillColor),Mt.fillPanel.onColorChanged=Mt.setFillColor,Mt}return Rt(xt,Tt),Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Tt.prototype.getState.call(this);return yt.typeName=xt.typeName,yt},xt.typeName="CoverMarker",xt.title="Cover marker",xt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',xt}(Xt),Sn=function(Tt){function xt(yt,kt,zt,Mt){var se=Tt.call(this,yt,Mt||'<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 se.opacities=[],se.opacityBoxes=[],se.opacities=kt,se.currentOpacity=zt,se.setCurrentOpacity=se.setCurrentOpacity.bind(se),se}return Rt(xt,Tt),xt.prototype.getUi=function(){var yt=this,kt=document.createElement("div");return kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2",kt.style.justifyContent="space-between",this.opacities.forEach(function(zt){var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.justifyContent="center",Mt.style.padding="5px",Mt.style.borderWidth="2px",Mt.style.borderStyle="solid",Mt.style.borderColor=zt===yt.currentOpacity?yt.uiStyleSettings.toolboxAccentColor:"transparent",Mt.addEventListener("click",function(){yt.setCurrentOpacity(zt,Mt)}),kt.appendChild(Mt);var se=document.createElement("div");se.innerText=100*zt+"%",Mt.appendChild(se),yt.opacityBoxes.push(Mt)}),kt},xt.prototype.setCurrentOpacity=function(yt,kt){var zt=this;this.currentOpacity=yt,this.opacityBoxes.forEach(function(Mt){Mt.style.borderColor=Mt===kt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},xt}(vt),gn=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.setOpacity=Mt.setOpacity.bind(Mt),Mt.fillColor=zt.defaultHighlightColor,Mt.strokeWidth=0,Mt.opacity=zt.defaultHighlightOpacity,Mt.fillPanel=new Ct("Color",zt.defaultColorSet,Mt.fillColor),Mt.fillPanel.onColorChanged=Mt.setFillColor,Mt.opacityPanel=new Sn("Opacity",zt.defaultOpacitySteps,Mt.opacity),Mt.opacityPanel.onOpacityChanged=Mt.setOpacity,Mt}return Rt(xt,Tt),xt.prototype.setOpacity=function(yt){this.opacity=yt,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Tt.prototype.getState.call(this);return yt.typeName=xt.typeName,yt},xt.typeName="HighlightMarker",xt.title="Highlight marker",xt.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>',xt}(Ae),Fe='<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>',Ke='<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>',rn=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.bgColor="transparent",Mt.tipPosition={x:0,y:0},Mt.tipBase1Position={x:0,y:0},Mt.tipBase2Position={x:0,y:0},Mt.tipMoving=!1,Mt.color=zt.defaultStrokeColor,Mt.bgColor=zt.defaultFillColor,Mt.fontFamily=zt.defaultFontFamily,Mt.defaultSize={x:100,y:30},Mt.setBgColor=Mt.setBgColor.bind(Mt),Mt.getTipPoints=Mt.getTipPoints.bind(Mt),Mt.positionTip=Mt.positionTip.bind(Mt),Mt.setTipPoints=Mt.setTipPoints.bind(Mt),Mt.colorPanel=new Ct("Text color",zt.defaultColorSet,Mt.color,Fe),Mt.colorPanel.onColorChanged=Mt.setColor,Mt.bgColorPanel=new Ct("Fill color",zt.defaultColorSet,Mt.bgColor,Ke),Mt.bgColorPanel.onColorChanged=Mt.setBgColor,Mt.fontFamilyPanel=new Ze("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Mt.fontFamilyPanel.onFontChanged=Mt.setFont,Mt.tipGrip=new Ot,Mt.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),Mt.controlBox.appendChild(Mt.tipGrip.visual),Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return Tt.prototype.ownsTarget.call(this,yt)||this.tipGrip.ownsTarget(yt)||this.tip===yt},xt.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},xt.prototype.pointerDown=function(yt,kt){this.state==="new"&&Tt.prototype.pointerDown.call(this,yt,kt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(kt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Tt.prototype.pointerDown.call(this,yt,kt)},xt.prototype.pointerUp=function(yt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Tt.prototype.pointerUp.call(this,yt);else{var kt=this.state==="creating";Tt.prototype.pointerUp.call(this,yt),this.setTipPoints(kt),this.positionTip()}},xt.prototype.manipulate=function(yt){if(this.tipMoving){var kt=this.unrotatePoint(yt);this.tipPosition={x:kt.x-this.manipulationStartLeft,y:kt.y-this.manipulationStartTop},this.positionTip()}else Tt.prototype.manipulate.call(this,yt)},xt.prototype.setBgColor=function(yt){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",yt]]),ue.setAttributes(this.tip,[["fill",yt]])),this.bgColor=yt,this.fillColorChanged(yt)},xt.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},xt.prototype.setTipPoints=function(yt){yt===void 0&&(yt=!1);var kt=Math.min(this.height/2,15),zt=this.height/5;yt&&(this.tipPosition={x:kt+zt/2,y:this.height+20});var Mt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Mt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(zt=this.width/5,kt=Math.min(this.width/2,15),this.tipBase1Position={x:kt,y:0},this.tipBase2Position={x:kt+zt,y:0}):(this.tipBase1Position={x:0,y:kt},this.tipBase2Position={x:0,y:kt+zt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Mt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(zt=this.width/5,kt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-kt-zt,y:0},this.tipBase2Position={x:this.width-kt,y:0}):(this.tipBase1Position={x:this.width,y:kt},this.tipBase2Position={x:this.width,y:kt+zt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Mt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(zt=this.width/5,kt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-kt-zt,y:this.height},this.tipBase2Position={x:this.width-kt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-kt-zt},this.tipBase2Position={x:this.width,y:this.height-kt}):Mt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(zt=this.width/5,kt=Math.min(this.width/2,15),this.tipBase1Position={x:kt,y:this.height},this.tipBase2Position={x:kt+zt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-kt},this.tipBase2Position={x:0,y:this.height-kt-zt})},xt.prototype.resize=function(yt){Tt.prototype.resize.call(this,yt),this.positionTip()},xt.prototype.positionTip=function(){ue.setAttributes(this.tip,[["points",this.getTipPoints()]]);var yt=this.tipGrip.visual.transform.baseVal.getItem(0);yt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(yt,0)},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xt.prototype.select=function(){this.positionTip(),Tt.prototype.select.call(this)},xt.prototype.getState=function(){var yt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Tt.prototype.getState.call(this));return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){var kt=yt;this.bgColor=kt.bgColor,this.tipPosition=kt.tipPosition,Tt.prototype.restoreState.call(this,yt),this.createTip(),this.setTipPoints()},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt),this.tipPosition={x:this.tipPosition.x*yt,y:this.tipPosition.y*kt},this.positionTip()},xt.typeName="CalloutMarker",xt.title="Callout marker",xt.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>',xt}(tn),Fn=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.fillColor="transparent",Mt.strokeColor="transparent",Mt.strokeWidth=0,Mt.strokeDasharray="",Mt.opacity=1,Mt.strokeColor=zt.defaultColor,Mt.strokeWidth=zt.defaultStrokeWidth,Mt.strokeDasharray=zt.defaultStrokeDasharray,Mt.fillColor=zt.defaultFillColor,Mt.setStrokeColor=Mt.setStrokeColor.bind(Mt),Mt.setFillColor=Mt.setFillColor.bind(Mt),Mt.setStrokeWidth=Mt.setStrokeWidth.bind(Mt),Mt.setStrokeDasharray=Mt.setStrokeDasharray.bind(Mt),Mt.setOpacity=Mt.setOpacity.bind(Mt),Mt.createVisual=Mt.createVisual.bind(Mt),Mt.strokePanel=new Ct("Line color",Kt(zt.defaultColorSet,["transparent"]),zt.defaultColor),Mt.strokePanel.onColorChanged=Mt.setStrokeColor,Mt.fillPanel=new Ct("Fill color",Kt(zt.defaultColorSet,["transparent"]),Mt.fillColor,Ke),Mt.fillPanel.onColorChanged=Mt.setFillColor,Mt.strokeWidthPanel=new Me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Mt.strokeWidthPanel.onWidthChanged=Mt.setStrokeWidth,Mt.strokeStylePanel=new qt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Mt.strokeStylePanel.onStyleChanged=Mt.setStrokeDasharray,Mt.opacityPanel=new Sn("Opacity",zt.defaultOpacitySteps,Mt.opacity),Mt.opacityPanel.onOpacityChanged=Mt.setOpacity,Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.visual)},xt.prototype.createVisual=function(){this.visual=ue.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)},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.state==="new"&&(this.createVisual(),this.moveVisual(yt),this._state="creating")},xt.prototype.manipulate=function(yt){Tt.prototype.manipulate.call(this,yt)},xt.prototype.resize=function(yt){Tt.prototype.resize.call(this,yt),this.setSize()},xt.prototype.setSize=function(){Tt.prototype.setSize.call(this),ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},xt.prototype.pointerUp=function(yt){Tt.prototype.pointerUp.call(this,yt),this.setSize()},xt.prototype.setStrokeColor=function(yt){this.strokeColor=yt,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(yt),this.stateChanged()},xt.prototype.setFillColor=function(yt){this.fillColor=yt,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(yt),this.stateChanged()},xt.prototype.setStrokeWidth=function(yt){this.strokeWidth=yt,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xt.prototype.setStrokeDasharray=function(yt){this.strokeDasharray=yt,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xt.prototype.setOpacity=function(yt){this.opacity=yt,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Tt.prototype.getState.call(this));return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){var kt=yt;this.fillColor=kt.fillColor,this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.opacity=kt.opacity,this.createVisual(),Tt.prototype.restoreState.call(this,yt),this.setSize()},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt),this.setSize()},xt.typeName="EllipseMarker",xt.title="Ellipse marker",xt.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>',xt}(te),Pn=function(Tt){function xt(yt,kt,zt){return Tt.call(this,yt,kt,zt)||this}return Rt(xt,Tt),Object.defineProperty(xt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.tip1&&yt!==this.tip2)},xt.prototype.createTips=function(){this.tip1=ue.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(ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ue.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(ue.createTransform()),this.visual.appendChild(this.tip2)},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.state==="creating"&&this.createTips()},xt.prototype.adjustVisual=function(){if(Tt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ue.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()]]),ue.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 yt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),kt=this.tip1.transform.baseVal.getItem(0);kt.setRotate(yt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(kt,0);var zt=this.tip2.transform.baseVal.getItem(0);zt.setRotate(yt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(zt,0)}},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Tt.prototype.getState.call(this);return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){Tt.prototype.restoreState.call(this,yt),this.createTips(),this.adjustVisual()},xt.typeName="MeasurementMarker",xt.title="Measurement marker",xt.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>',xt}(Ue),We=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.strokePanel.colors=zt.defaultColorSet,Mt.fillColor="transparent",Mt}return Rt(xt,Tt),Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Tt.prototype.getState.call(this);return yt.typeName=xt.typeName,yt},xt.typeName="EllipseFrameMarker",xt.title="Ellipse frame marker",xt.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>',xt}(Fn),fe=function(){function Tt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Tt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Tt.prototype.addUndoStep=function(xt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(xt)||(this.undoStack.push(xt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(xt)&&this.redoStack.splice(0,this.redoStack.length))},Tt.prototype.replaceLastUndoStep=function(xt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=xt)},Tt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Tt.prototype.undo=function(){if(this.undoStack.length>1){var xt=this.undoStack.pop();return xt!==void 0&&this.redoStack.push(xt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Tt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Tt}(),An=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.strokeColor="transparent",Mt.strokeWidth=0,Mt.strokeDasharray="",Mt.curveX=0,Mt.curveY=0,Mt.manipulationStartCurveX=0,Mt.manipulationStartCurveY=0,Mt.setStrokeColor=Mt.setStrokeColor.bind(Mt),Mt.setStrokeWidth=Mt.setStrokeWidth.bind(Mt),Mt.setStrokeDasharray=Mt.setStrokeDasharray.bind(Mt),Mt.positionGrips=Mt.positionGrips.bind(Mt),Mt.addControlGrips=Mt.addControlGrips.bind(Mt),Mt.adjustVisual=Mt.adjustVisual.bind(Mt),Mt.setupControlBox=Mt.setupControlBox.bind(Mt),Mt.resize=Mt.resize.bind(Mt),Mt.strokeColor=zt.defaultColor,Mt.strokeWidth=zt.defaultStrokeWidth,Mt.strokeDasharray=zt.defaultStrokeDasharray,Mt.strokePanel=new Ct("Line color",zt.defaultColorSet,zt.defaultColor),Mt.strokePanel.onColorChanged=Mt.setStrokeColor,Mt.strokeWidthPanel=new Me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Mt.strokeWidthPanel.onWidthChanged=Mt.setStrokeWidth,Mt.strokeStylePanel=new qt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Mt.strokeStylePanel.onStyleChanged=Mt.setStrokeDasharray,Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.visual&&yt!==this.selectorCurve&&yt!==this.visibleCurve&&!this.curveGrip.ownsTarget(yt))},xt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},xt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=yt.x,this.curveY=yt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(kt)&&(this.activeGrip=this.curveGrip,this._state="resize")},xt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xt.prototype.setupControlBox=function(){Tt.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},xt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Tt.prototype.addControlGrips.call(this)},xt.prototype.positionGrips=function(){Tt.prototype.positionGrips.call(this);var yt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-yt/2,this.curveY-yt/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()))},xt.prototype.manipulate=function(yt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+yt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+yt.y-this.manipulationStartY),Tt.prototype.manipulate.call(this,yt)},xt.prototype.resize=function(yt){this.activeGrip===this.curveGrip&&(this.curveX=yt.x,this.curveY=yt.y),Tt.prototype.resize.call(this,yt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},xt.prototype.setStrokeColor=function(yt){this.strokeColor=yt,this.adjustVisual(),this.colorChanged(yt)},xt.prototype.setStrokeWidth=function(yt){this.strokeWidth=yt,this.adjustVisual()},xt.prototype.setStrokeDasharray=function(yt){this.strokeDasharray=yt,this.adjustVisual()},xt.prototype.scale=function(yt,kt){this.curveX=this.curveX*yt,this.curveY=this.curveY*kt,Tt.prototype.scale.call(this,yt,kt)},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Tt.prototype.getState.call(this));return yt.typeName=xt.typeName,yt},xt.prototype.restoreState=function(yt){Tt.prototype.restoreState.call(this,yt);var kt=yt;this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.curveX=kt.curveX,this.curveY=kt.curveY,this.createVisual(),this.adjustVisual()},xt.typeName="CurveMarker",xt.title="Curve marker",xt.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>',xt}(Ce),Hn=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,kt,zt)||this;return Mt.fillColor="transparent",Mt.strokeColor="transparent",Mt.strokeWidth=0,Mt.strokeDasharray="",Mt.textColor="transparent",Mt.fontSize="1rem",Mt.isMoved=!1,Mt.captionText="Caption",Mt.PADDING=5,Mt.captionBoxWidth=0,Mt.captionBoxHeight=0,Mt.strokeColor=zt.defaultColor,Mt.strokeWidth=zt.defaultStrokeWidth,Mt.strokeDasharray=zt.defaultStrokeDasharray,Mt.fillColor=zt.defaultFillColor,Mt.textColor=zt.defaultStrokeColor,Mt.fontFamily=zt.defaultFontFamily,Mt.fontSize=zt.defaultCaptionFontSize,Mt.captionText=zt.defaultCaptionText,Mt.setStrokeColor=Mt.setStrokeColor.bind(Mt),Mt.setFillColor=Mt.setFillColor.bind(Mt),Mt.setStrokeWidth=Mt.setStrokeWidth.bind(Mt),Mt.setStrokeDasharray=Mt.setStrokeDasharray.bind(Mt),Mt.createVisual=Mt.createVisual.bind(Mt),Mt.sizeCaption=Mt.sizeCaption.bind(Mt),Mt.setCaptionText=Mt.setCaptionText.bind(Mt),Mt.showTextEditor=Mt.showTextEditor.bind(Mt),Mt.positionTextEditor=Mt.positionTextEditor.bind(Mt),Mt.finishTextEditing=Mt.finishTextEditing.bind(Mt),Mt.setFont=Mt.setFont.bind(Mt),Mt.setTextColor=Mt.setTextColor.bind(Mt),Mt.strokePanel=new Ct("Line color",Kt(zt.defaultColorSet,["transparent"]),Mt.strokeColor),Mt.strokePanel.onColorChanged=Mt.setStrokeColor,Mt.fillPanel=new Ct("Fill color",Kt(zt.defaultColorSet,["transparent"]),Mt.fillColor,Ke),Mt.fillPanel.onColorChanged=Mt.setFillColor,Mt.strokeWidthPanel=new Me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Mt.strokeWidthPanel.onWidthChanged=Mt.setStrokeWidth,Mt.strokeStylePanel=new qt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Mt.strokeStylePanel.onStyleChanged=Mt.setStrokeDasharray,Mt.fontFamilyPanel=new Ze("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Mt.fontFamilyPanel.onFontChanged=Mt.setFont,Mt.textColorPanel=new Ct("Text color",zt.defaultColorSet,Mt.textColor,Fe),Mt.textColorPanel.onColorChanged=Mt.setTextColor,Mt}return Rt(xt,Tt),xt.prototype.ownsTarget=function(yt){return!(!Tt.prototype.ownsTarget.call(this,yt)&&yt!==this.visual&&yt!==this.frame&&yt!==this.captionBg&&yt!==this.captionElement)},xt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ue.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ue.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=ue.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},xt.prototype.setCaptionText=function(yt){this.captionText=yt,this.captionElement.textContent=this.captionText,this.sizeCaption()},xt.prototype.pointerDown=function(yt,kt){Tt.prototype.pointerDown.call(this,yt,kt),this.isMoved=!1,this.pointerDownPoint=yt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(yt),this._state="creating")},xt.prototype.manipulate=function(yt){Tt.prototype.manipulate.call(this,yt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(yt.x-this.pointerDownPoint.x)>5||Math.abs(yt.y-this.pointerDownPoint.y)>5)},xt.prototype.resize=function(yt){Tt.prototype.resize.call(this,yt),this.setSize()},xt.prototype.sizeCaption=function(){var yt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=yt.width+2*this.PADDING,this.captionBoxHeight=yt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ue.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),ue.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},xt.prototype.showTextEditor=function(){var yt=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(kt){kt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(kt){kt.key==="Enter"&&yt.finishTextEditing(yt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(kt){kt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){yt.finishTextEditing(yt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){yt.finishTextEditing(yt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},xt.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"))},xt.prototype.finishTextEditing=function(yt){this.setCaptionText(yt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},xt.prototype.setFont=function(yt){this.captionElement&&ue.setAttributes(this.captionElement,[["font-family",yt]]),this.fontFamily=yt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},xt.prototype.setTextColor=function(yt){this.captionElement&&ue.setAttributes(this.captionElement,[["fill",yt]]),this.textColor=yt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},xt.prototype.setSize=function(){Tt.prototype.setSize.call(this),ue.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},xt.prototype.pointerUp=function(yt){Tt.prototype.pointerUp.call(this,yt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},xt.prototype.dblClick=function(yt,kt){Tt.prototype.dblClick.call(this,yt,kt),this.showTextEditor()},xt.prototype.setStrokeColor=function(yt){this.strokeColor=yt,this.frame&&ue.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(yt),this.stateChanged()},xt.prototype.setFillColor=function(yt){this.fillColor=yt,this.captionBg&&ue.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(yt),this.stateChanged()},xt.prototype.setStrokeWidth=function(yt){this.strokeWidth=yt,this.frame&&ue.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xt.prototype.setStrokeDasharray=function(yt){this.strokeDasharray=yt,this.frame&&ue.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(xt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),xt.prototype.getState=function(){var yt=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},Tt.prototype.getState.call(this));return yt.typeName=this.typeName,yt},xt.prototype.restoreState=function(yt){var kt=yt;this.fillColor=kt.fillColor,this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.textColor=kt.textColor,this.fontFamily=kt.fontFamily,this.captionText=kt.captionText,this.fontSize=kt.fontSize,this.createVisual(),Tt.prototype.restoreState.call(this,yt),this.setSize()},xt.prototype.scale=function(yt,kt){Tt.prototype.scale.call(this,yt,kt),this.setSize()},xt.typeName="CaptionFrameMarker",xt.title="Caption frame marker",xt.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>',xt}(te),un=function(){function Tt(xt,yt){yt===void 0&&(yt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=xt,this.cancelable=yt}return Object.defineProperty(Tt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Tt.prototype.preventDefault=function(){this._defaultPrevented=!0},Tt}(),De=function(Tt){function xt(yt,kt,zt){var Mt=Tt.call(this,yt,!1)||this;return Mt.dataUrl=kt,Mt.state=zt,Mt}return Rt(xt,Tt),xt}(un),He=function(Tt){function xt(yt,kt,zt){zt===void 0&&(zt=!1);var Mt=Tt.call(this,yt,zt)||this;return Mt.marker=kt,Mt}return Rt(xt,Tt),xt}(un),Ee=function(){function Tt(){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 Tt.prototype.addEventListener=function(xt,yt){this[xt].push(yt)},Tt.prototype.removeEventListener=function(xt,yt){var kt=this[xt].indexOf(yt);kt>-1&&this[xt].splice(kt,1)},Tt}(),Jt=function(){function Tt(xt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ne,this._isOpen=!1,this.undoRedoManager=new fe,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 Ee,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Tt.instanceCounter++,this.styles=new nt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=xt,this.targetRoot=document.body,this.width=xt.clientWidth,this.height=xt.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(Tt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,ln,Gt,tn,We,Fn,gn,rn,Pn,Ae,Ue,An,Hn]},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,ln,Gt,tn,Fn,gn,rn]},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,ln,Gt,tn,gn]},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(xt){var yt=this;this._availableMarkerTypes.splice(0),xt.forEach(function(kt){if(typeof kt=="string"){var zt=yt.ALL_MARKER_TYPES.find(function(Mt){return Mt.typeName===kt});zt!==void 0&&yt._availableMarkerTypes.push(zt)}else yt._availableMarkerTypes.push(kt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(xt){this._zoomLevel=xt,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(Tt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Tt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),de.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Tt.prototype.show=function(){var xt=this;this.styles.styleSheetRoot===void 0&&At.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=At.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(yt){return yt(new un(xt))})},Tt.prototype.render=function(){return be(this,void 0,void 0,function(){var xt;return ge(this,function(yt){switch(yt.label){case 0:return this.setCurrentMarker(),(xt=new ve).naturalSize=this.renderAtNaturalSize,xt.imageType=this.renderImageType,xt.imageQuality=this.renderImageQuality,xt.markersOnly=this.renderMarkersOnly,xt.width=this.renderWidth,xt.height=this.renderHeight,[4,xt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return yt.sent(),[4,xt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,yt.sent()]}})})},Tt.prototype.close=function(xt){var yt=this;if(xt===void 0&&(xt=!1),this.isOpen){var kt=!1;xt||this.eventListeners.beforeclose.forEach(function(zt){var Mt=new un(yt,!0);zt(Mt),Mt.defaultPrevented&&(kt=!0)}),kt||(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(zt){return zt(new un(yt))}),this.detachEvents(),this._isOpen=!1)}},Tt.prototype.addMarkersToToolbar=function(){for(var xt,yt=[],kt=0;kt<arguments.length;kt++)yt[kt]=arguments[kt];(xt=this._availableMarkerTypes).push.apply(xt,yt)},Tt.prototype.addRenderEventListener=function(xt){this.addEventListener("render",function(yt){xt(yt.dataUrl,yt.state)})},Tt.prototype.removeRenderEventListener=function(xt){},Tt.prototype.addCloseEventListener=function(xt){this.addEventListener("close",function(){xt()})},Tt.prototype.removeCloseEventListener=function(xt){},Tt.prototype.setupResizeObserver=function(){var xt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){xt.resize(xt.target.clientWidth,xt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return xt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Tt.prototype.onPopupTargetResize=function(){var xt=1*this.target.clientWidth/this.target.clientHeight,yt=this.editorCanvas.clientWidth/xt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*xt:this.editorCanvas.clientWidth,kt=yt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/xt;this.resize(yt,kt)},Tt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Tt.prototype.resize=function(xt,yt){this._isResizing=!0;var kt=xt/this.imageWidth,zt=yt/this.imageHeight;this.imageWidth=Math.round(xt),this.imageHeight=Math.round(yt),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(kt,zt),this._isResizing=!1},Tt.prototype.scaleMarkers=function(xt,yt){var kt,zt=this;this._currentMarker&&this._currentMarker instanceof tn?this._currentMarker.scale(xt,yt):(kt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Mt){Mt!==zt._currentMarker&&Mt.scale(xt,yt)}),kt!==void 0&&this.setCurrentMarker(kt)},Tt.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"},Tt.prototype.setTopLeft=function(){var xt=this.editingTarget.getBoundingClientRect(),yt=this.editorCanvas.getBoundingClientRect();this.left=xt.left-yt.left,this.top=xt.top-yt.top},Tt.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)},Tt.prototype.addDefs=function(){for(var xt,yt=[],kt=0;kt<arguments.length;kt++)yt[kt]=arguments[kt];this.defs=ue.createDefs(),this.addDefsToImage(),(xt=this.defs).append.apply(xt,yt)},Tt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Tt.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)},Tt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Tt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Tt.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)},Tt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Tt.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)},Tt.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 xt=document.createElement("a");xt.href="https://markerjs.com/",xt.target="_blank",xt.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>',xt.title="Powered by marker.js",xt.style.display="grid",xt.style.alignItems="center",xt.style.justifyItems="center",xt.style.padding="3px",xt.style.width="20px",xt.style.height="20px",this.logoUI.appendChild(xt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Tt.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")},Tt.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"},Tt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Tt.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 xt=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=xt+"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 at(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 ft(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Tt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Tt.prototype.removeMarker=function(xt){this.markerImage.removeChild(xt.container),this.markers.indexOf(xt)>-1&&this.markers.splice(this.markers.indexOf(xt),1),xt.dispose()},Tt.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())},Tt.prototype.toolbarButtonClicked=function(xt,yt){if(xt==="marker"&&yt!==void 0)this.createNewMarker(yt);else if(xt==="action")switch(yt){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()}},Tt.prototype.deleteSelectedMarker=function(){var xt=this;if(this._currentMarker!==void 0){var yt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(zt){var Mt=new He(xt,xt._currentMarker,!0);zt(Mt),Mt.defaultPrevented&&(yt=!0)}),!yt){var kt=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(zt){return zt(new He(xt,kt))})}}},Tt.prototype.clear=function(){var xt=this,yt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(se){var $e=new He(xt,void 0,!0);se($e),$e.defaultPrevented&&(yt=!0)}),!yt)){this.setCurrentMarker();for(var kt=function(se){var $e=zt.markers[se];zt.setCurrentMarker(zt.markers[se]),zt._currentMarker.dispose(),zt.markerImage.removeChild(zt._currentMarker.container),zt.markers.splice(zt.markers.indexOf(zt._currentMarker),1),zt.eventListeners.markerdelete.forEach(function(cn){return cn(new He(xt,$e))})},zt=this,Mt=this.markers.length-1;Mt>=0;Mt--)kt(Mt);this.addUndoStep()}},Object.defineProperty(Tt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Tt.prototype.showNotesEditor=function(){var xt;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=(xt=this._currentMarker.notes)!==null&&xt!==void 0?xt:"",this.overlayContainer.appendChild(this.notesArea))},Tt.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)},Tt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Tt.prototype.addUndoStep=function(){var xt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var yt=this.getState(),kt=this.undoRedoManager.getLastUndoStep();if(!kt||kt.width===yt.width&&kt.height===yt.height){var zt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(yt),zt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Mt){return Mt(new un(xt))})}else this.undoRedoManager.replaceLastUndoStep(yt),this.eventListeners.statechange.forEach(function(Mt){return Mt(new un(xt))})}},Tt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Tt.prototype.undoStep=function(){var xt=this,yt=this.undoRedoManager.undo();yt!==void 0&&(this.restoreState(yt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(kt){return kt(new un(xt))}))},Tt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Tt.prototype.redoStep=function(){var xt=this,yt=this.undoRedoManager.redo();yt!==void 0&&(this.restoreState(yt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(kt){return kt(new un(xt))}))},Tt.prototype.stepZoom=function(){var xt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=xt<this.zoomSteps.length-1?this.zoomSteps[xt+1]:this.zoomSteps[0]},Tt.prototype.panTo=function(xt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-xt.x,top:this.prevPanPoint.y-xt.y}),this.prevPanPoint=xt},Tt.prototype.startRenderAndClose=function(){return be(this,void 0,void 0,function(){var xt,yt,kt=this;return ge(this,function(zt){switch(zt.label){case 0:return[4,this.render()];case 1:return xt=zt.sent(),yt=this.getState(),this.eventListeners.render.forEach(function(Mt){return Mt(new De(kt,xt,yt))}),this.close(!0),[2]}})})},Tt.prototype.getState=function(xt){xt===!0&&this.setCurrentMarker();var yt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(kt){return yt.markers.push(kt.getState())}),yt},Tt.prototype.restoreState=function(xt){var yt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);xt.markers.forEach(function(kt){var zt=yt._availableMarkerTypes.find(function(se){return se.typeName===kt.typeName});if(zt!==void 0){var Mt=yt.addNewMarker(zt);Mt.restoreState(kt),yt.markers.push(Mt)}}),xt.width&&xt.height&&(xt.width!==this.imageWidth||xt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/xt.width,this.imageHeight/xt.height),this.eventListeners.restorestate.forEach(function(kt){return kt(new un(yt))})},Tt.prototype.addNewMarker=function(xt){var yt=ue.createGroup();return this.markerImage.appendChild(yt),new xt(yt,this.overlayContainer,this.settings)},Tt.prototype.createNewMarker=function(xt){var yt,kt=this;(yt=typeof xt=="string"?this._availableMarkerTypes.find(function(zt){return zt.typeName===xt}):xt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(yt),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(yt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(zt){return zt(new He(kt,kt._currentMarker))}))},Tt.prototype.markerCreated=function(xt){var yt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(xt),this.setCurrentMarker(xt),xt instanceof ln&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ln):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(kt){return kt(new He(yt,yt._currentMarker))})},Tt.prototype.colorChanged=function(xt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=xt,this.settings.defaultStrokeColor=xt)},Tt.prototype.fillColorChanged=function(xt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=xt)},Tt.prototype.markerStateChanged=function(xt){var yt=this;this.eventListeners.markerchange.forEach(function(kt){return kt(new He(yt,xt))})},Tt.prototype.setCurrentMarker=function(xt){var yt=this;this._currentMarker!==xt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(kt){return kt(new He(yt,yt._currentMarker))})),this._currentMarker=xt,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(kt){return kt(new He(yt,yt._currentMarker))}))},Tt.prototype.onPointerDown=function(xt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||xt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var yt=this.markers.find(function(kt){return kt.ownsTarget(xt.target)});yt!==void 0?(this.setCurrentMarker(yt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xt.clientX,xt.clientY),xt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:xt.clientX,y:xt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xt.clientX,xt.clientY))},Tt.prototype.onDblClick=function(xt){if(this._isFocused||this.focus(),this.mode==="select"){var yt=this.markers.find(function(kt){return kt.ownsTarget(xt.target)});yt!==void 0&&yt!==this._currentMarker&&this.setCurrentMarker(yt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(xt.clientX,xt.clientY),xt.target):this.setCurrentMarker()}},Tt.prototype.onPointerMove=function(xt){this.touchPoints!==1&&xt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||xt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(xt.clientX,xt.clientY)):this.zoomLevel>1&&this.panTo({x:xt.clientX,y:xt.clientY}))},Tt.prototype.onPointerUp=function(xt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(xt.clientX,xt.clientY)),this.isDragging=!1,this.addUndoStep()},Tt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Tt.prototype.onKeyUp=function(xt){this._currentMarker===void 0||this.notesArea!==void 0||xt.key!=="Delete"&&xt.key!=="Backspace"||this.deleteSelectedMarker()},Tt.prototype.clientToLocalCoordinates=function(xt,yt){var kt=this.markerImage.getBoundingClientRect();return{x:(xt-kt.left)/this.zoomLevel,y:(yt-kt.top)/this.zoomLevel}},Tt.prototype.onWindowResize=function(){this.positionUI()},Tt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var xt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=xt+"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()},Tt.prototype.addLicenseKey=function(xt){de.addKey(xt)},Tt.prototype.addEventListener=function(xt,yt){this.eventListeners.addEventListener(xt,yt)},Tt.prototype.removeEventListener=function(xt,yt){this.eventListeners.removeEventListener(xt,yt)},Tt.prototype.renderState=function(xt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(xt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Tt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Tt.prototype.focus=function(){var xt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(yt){return yt(new un(xt))}))},Tt.prototype.blur=function(){var xt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(yt){return yt(new un(xt))}))},Tt.instanceCounter=0,Tt}(),ye=Pt(70635),Re=Pt(58130),Be=(Tt,xt,yt)=>new Promise((kt,zt)=>{var Mt=cn=>{try{$e(yt.next(cn))}catch(sn){zt(sn)}},se=cn=>{try{$e(yt.throw(cn))}catch(sn){zt(sn)}},$e=cn=>cn.done?kt(cn.value):Promise.resolve(cn.value).then(Mt,se);$e((yt=yt.apply(Tt,xt)).next())}),ce=({data:Tt,className:xt,fullWidth:yt,style:kt={},onClose:zt,onOk:Mt,showFullTools:se,noAssociationId:$e})=>{const cn=(0,mt.useRef)(null),sn=(0,mt.useRef)(null),En=(0,mt.useRef)(null),Gn=(0,mt.useRef)(null),[zn,Zn]=(0,mt.useState)(!1),[$n,ni]=(0,mt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,mt.useEffect)(()=>{En.current||(En.current=document.createElement("style"),document.head.appendChild(En.current)),Tt!=null&&Tt.visible?(document.body.setAttribute("data-custom","y-hidden"),En.current.innerHTML=" html { overflow-y: hidden; }",Tt!=null&&Tt.src&&ei()):(document.body.removeAttribute("data-custom"),En.current&&(document.head.removeChild(En.current),En.current=null))},[Tt==null?void 0:Tt.visible]);const ei=()=>Be(void 0,null,function*(){Zn(!0),ni("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Tn=yield(0,Re.ZJ)(Tt==null?void 0:Tt.src);cn.current.src="",cn.current.src=Tn,cn.current.onload=function(){jn()},Zn(!1),ni("")}),Bi=Tn=>Be(void 0,null,function*(){Zn(!0),ni("\u6B63\u5728\u4FDD\u5B58\u4E2D");const In=yield(0,ye.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Tt.title,file:Tn.dataUrl}});In!=null&&In.id&&!$e?(yield(0,ye.ZP)(`/api/attachments/${Tt.id}/add_subitem.json`,{method:"post",body:{subitem_id:In==null?void 0:In.id,settings:JSON.stringify(Tn.state)}})).status===0&&Mt():In!=null&&In.id&&Mt(In),Zn(!1),ni("")}),Ki=()=>{const Tn=document.querySelector('a[href="https://markerjs.com/"]');Tn&&Tn.parentNode&&(Tn.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(li=>{const gi=document.querySelector(li.name);gi&&gi.setAttribute("title",li.title)})},jn=()=>{sn.current=new Jt(cn.current),sn.current.targetRoot=Gn.current,sn.current.addEventListener("render",Bi),sn.current.addEventListener("beforeclose",zt),se&&(sn.current.availableMarkerTypes=sn.current.ALL_MARKER_TYPES,sn.current.uiStyleSettings.redoButtonVisible=!0,sn.current.uiStyleSettings.notesButtonVisible=!0,sn.current.uiStyleSettings.zoomButtonVisible=!0,sn.current.uiStyleSettings.zoomOutButtonVisible=!0,sn.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=sn.current.uiStyleSettings,sn.current.show(),Tt!=null&&Tt.snapshotData&&sn.current.restoreState(Tt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ki()},300)};return mt.createElement(mt.Fragment,null,(Tt==null?void 0:Tt.visible)&&mt.createElement(Ht.Z,{spinning:zn,tip:$n,style:{position:"absolute"}},mt.createElement("div",{ref:Gn,className:we()(It.imageDimensions,xt,yt?It.fullWidth:""),style:kt},mt.createElement("img",{className:It.img,ref:cn}))))}},34571:function(xn,vn,Pt){"use strict";var mt=Pt(59301),It=Pt(93938),Zt=Pt(48136),we=Pt(75890),Ht=Pt(43418),he=Pt(59301);const Rt=(0,mt.forwardRef)(({callback:be,width:ge,onChange:Kt,disabled:ue,readOnly:de,type:ve="",value:At="",style:nt={}},et)=>{const ht=(0,mt.useRef)(),at=(0,mt.useRef)(),[ft,vt]=(0,mt.useState)(0),[Ct,Bt]=(0,mt.useState)(0),[Ft,Ot]=(0,mt.useState)(!1),_t=()=>{var qt=document.createElement("div");qt.innerHTML=ht.current.getValue();var Ne=qt.innerText;return be&&be(Ne),Ne};(0,mt.useImperativeHandle)(et,()=>({getData:_t}));const te=qt=>{qt.preventDefault();const Ne=qt.clientX-ft,ne=qt.clientY-Ct;document.body.onmousemove=Ce=>{let Ue=Ce.clientX-Ne,Ze=Ce.clientY-ne;const tn=document.getElementsByClassName("markdown-popup-form")[0],ln=window.innerWidth-tn.offsetWidth,ie=window.innerHeight-tn.offsetHeight;Ue=Math.max(0,Math.min(Ue,ln)),Ze=Math.max(0,Math.min(Ze,ie)),Xt(Ce.clientX,Ce.clientY,Ne,ne)&&(vt(Ue),Bt(Ze))},document.body.onmouseup=function(){document.body.onmousemove=null}},Xt=(qt,Ne,ne,Ce)=>{const Ue=document.body.clientHeight,Ze=document.body.clientWidth;return qt<20&&ne>qt||qt>Ze-20&&ne<qt||Ne<20&&Ce>Ne||Ne>Ue-20&&Ce<Ne?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,mt.useEffect)(()=>{Ft&&setTimeout(()=>{const qt=document.getElementsByClassName("markdown-popup-form")[0],Ne=window.innerWidth/2-qt.offsetWidth/2,ne=window.innerHeight/2-qt.offsetHeight/2;vt(Ne),Bt(ne)},0)},[Ft]);const Me=()=>{ue||de||Ot(!0)};return he.createElement("div",{style:nt},he.createElement("div",{style:{width:ge||"100%",position:"relative"},className:`${It.Z.mathFillWrap} ${ue||de?"cursorDefault":""}`,onClick:()=>Me()},he.createElement("math-field",{disabled:ue,locale:"zh_cn",class:`${It.Z.mathField} ${ve}`,readOnly:de,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ht,style:{width:"100%",fontSize:At?18:14},value:At||""})),he.createElement(Ht.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:ft,top:Ct},title:he.createElement("div",{style:{cursor:"move"},onMouseDown:te},"\u8F93\u5165\u516C\u5F0F"),open:Ft,onOk:()=>{const qt=at.current.getData();ht.current.setValue(qt),Kt(qt),Ot(!1)},onCancel:()=>{Ot(!1)},destroyOnClose:!0,className:"markdown-popup-form"},he.createElement(we.Z,{value:At,ref:at,onChange:Kt,showSaveButton:!1})))});vn.Z=Rt},75890:function(xn,vn,Pt){"use strict";var mt=Pt(59301),It=Pt(95237),Zt=Pt(43604),we=Pt(99313),Ht=Pt(3113),he=Pt(25711),Rt=Pt(93938),be=Pt(48136),ge=Pt(59301);const Kt=(0,mt.forwardRef)(({callback:ue,showSaveButton:de,value:ve=""},At)=>{const nt=(0,mt.useRef)(),et=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],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}`}]}]}],at=Ct=>{nt.current.setValue(nt.current.getValue()+" "+Ct.value+" ")},ft=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ge.createElement(It.Z,{className:Rt.Z.lists,gutter:[10,10]},et.map((Ct,Bt)=>ge.createElement(Zt.Z,{flex:"110px",className:Rt.Z.item},ge.createElement("div",null,ge.createElement(he.Z,{value:`$$${Ct.value}$$`}),Ct.name),ge.createElement("div",{className:Rt.Z.children},Ct.children.map((Ft,Ot)=>ge.createElement("div",{key:Ot},ge.createElement("h1",null,Ft.name),ge.createElement(It.Z,{gutter:[10,10]},Ft.data.map((_t,te)=>ge.createElement(Zt.Z,{key:te,onClick:()=>at(_t),className:Rt.Z.diamond},ge.createElement(he.Z,{value:"`$$"+_t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ge.createElement(It.Z,{className:Rt.Z.lists,gutter:[10,10]},ht.map((Ct,Bt)=>ge.createElement(Zt.Z,{flex:"110px",className:Rt.Z.item},ge.createElement("div",null,ge.createElement(he.Z,{value:"`$$"+Ct.value+"$$`"}),Ct.name),ge.createElement("div",{className:Rt.Z.children},Ct.children.map((Ft,Ot)=>ge.createElement("div",{key:Ot},Ft.name&&ge.createElement("h1",null,Ft.name),ge.createElement(It.Z,{gutter:[10,10]},Ft.data.map((_t,te)=>ge.createElement(Zt.Z,{key:te,onClick:()=>at(_t),className:Rt.Z.diamond},ge.createElement(he.Z,{value:"`$$"+_t.value+"$$`"}))))))))))}],vt=()=>{var Ct=document.createElement("div");Ct.innerHTML=nt.current.getValue();var Bt=Ct.innerText;return ue&&ue(Bt),Bt};return(0,mt.useImperativeHandle)(At,()=>({getData:vt})),ge.createElement("div",{className:Rt.Z.mathWrap},ge.createElement(we.default,{defaultActiveKey:"1",items:ft}),ge.createElement("math-field",{locale:"zh_cn",className:Rt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},ve||""),de&&ge.createElement("div",{className:Rt.Z.button},ge.createElement(Ht.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});vn.Z=Kt},97267:function(xn,vn,Pt){"use strict";var mt=Pt(59301),It=Pt(93314),Zt=Pt(3113),we=Object.defineProperty,Ht=Object.defineProperties,he=Object.getOwnPropertyDescriptors,Rt=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,Kt=(At,nt,et)=>nt in At?we(At,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):At[nt]=et,ue=(At,nt)=>{for(var et in nt||(nt={}))be.call(nt,et)&&Kt(At,et,nt[et]);if(Rt)for(var et of Rt(nt))ge.call(nt,et)&&Kt(At,et,nt[et]);return At},de=(At,nt)=>Ht(At,he(nt));const ve=({img:At,buttonProps:nt={},styles:et={},customText:ht,ButtonText:at,ButtonClick:ft,Buttonclass:vt,ButtonTwo:Ct,imgStyles:Bt,loading:Ft=!1})=>mt.createElement("section",{className:"tc animated fadeIn",style:ue(ue({},{color:"#999",margin:"100px auto",visibility:Ft?"hidden":"visible"}),et)},mt.createElement("img",{src:At||It,style:de(ue({},Bt),{pointerEvents:"none",userSelect:"none"})}),mt.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&mt.createElement(Zt.ZP,ue({className:vt,onClick:ft},nt),at),Ct&&Ct);vn.Z=ve},79646:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return vt}});var mt=Pt(59301),It={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Zt=Pt(3113),we=Pt(63093),Ht=Pt(48551),he=Pt(6848),Rt=Pt(58130),be=Pt(79124),ge=Pt(97267),Kt=Pt(10148),ue=Pt(63486),de=Pt(59301),ve=Object.defineProperty,At=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ht=(Ct,Bt,Ft)=>Bt in Ct?ve(Ct,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):Ct[Bt]=Ft,at=(Ct,Bt)=>{for(var Ft in Bt||(Bt={}))nt.call(Bt,Ft)&&ht(Ct,Ft,Bt[Ft]);if(At)for(var Ft of At(Bt))et.call(Bt,Ft)&&ht(Ct,Ft,Bt[Ft]);return Ct},ft=(Ct,Bt,Ft)=>new Promise((Ot,_t)=>{var te=qt=>{try{Me(Ft.next(qt))}catch(Ne){_t(Ne)}},Xt=qt=>{try{Me(Ft.throw(qt))}catch(Ne){_t(Ne)}},Me=qt=>qt.done?Ot(qt.value):Promise.resolve(qt.value).then(te,Xt);Me((Ft=Ft.apply(Ct,Bt)).next())}),vt=({editOffice:Ct="view",data:Bt,theme:Ft,type:Ot,filename:_t,monacoEditor:te,className:Xt,style:Me,close:qt,onClose:Ne,hasMask:ne,disabledDownload:Ce,onImgDimensions:Ue,showNodata:Ze,recordInfo:tn})=>{const[ln,ie]=(0,mt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Gt,Ae]=(0,mt.useState)(""),[Sn,gn]=(0,mt.useState)(),Fe=window.ENV==="build"?"/react/build":"",Ke=location.host.startsWith("localhost")?Kt.Z.PROXY_SERVER:Kt.Z.API_SERVER,Fn=10*(1024*1024),Pn=(0,mt.useRef)();Bt!=null&&Bt.startsWith("/api")&&Ot!=="txt"&&(Bt=Kt.Z.API_SERVER+Bt);const We=un=>un.substring(un.lastIndexOf("/")+1).split(".").pop();_t&&te&&(te.filename=_t),(0,mt.useEffect)(()=>{var un,De;const He=(De=(un=document.cookie)==null?void 0:un.replace(/\s/g,""))==null?void 0:De.split(";");He==null||He.map(Ee=>{let Jt=Ee.split("=");Jt[0]==="_educoder_session"&&Ae(Jt[1])})},[]),(0,mt.useEffect)(()=>{Ot==="office"&&(Bt.indexOf("bigfilescdn.")>-1||Bt.indexOf("bigfiles1")>-1?gn({url:Bt,fileType:We(Bt),model:Bt.indexOf("model=edit")?"edit":"view"}):fe())},[Ot,Bt]);const fe=()=>ft(void 0,null,function*(){console.log("data:",Bt);let un=Bt;Bt.startsWith("http")||(un=location.origin+un);let De=new URL(un).pathname.split("/").pop();const He=yield(0,be.gJ)({attachment_id:De});He.url=Ke+He.url,gn(He)}),An=()=>{if(Bt.startsWith("http")||Bt.startsWith("blob:")){Hn();return}(0,Rt.Sv)(_t||"educoder",Bt,_t)},Hn=()=>{tn&&(0,ue.fc)({id:tn==null?void 0:tn.id,watch_type:1,course_id:tn==null?void 0:tn.course_id}),(0,Rt.Nd)(_t||"educoder",decodeURIComponent(Bt))};return de.createElement("div",{style:at({},Me||{}),className:`${ne&&It.bgBlack} ${Ot?It.wrp:"hide"}`},qt&&de.createElement("div",{className:It.close,ref:Pn},!!Ue&&de.createElement(he.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Pn.current},de.createElement("span",{onClick:()=>{Ne(),Ue()}},de.createElement("i",{className:"icon-yulanpizhu"}))),!Ce&&de.createElement(he.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Pn.current},de.createElement("span",{onClick:Hn},de.createElement("i",{className:"icon-quxiaozhiding"}))),de.createElement(he.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Pn.current},de.createElement("span",{className:"",onClick:Ne},de.createElement("i",{className:"icon-guanbi1"})))),de.createElement("div",{className:`${It[Xt]} ${Xt} ${It.monaco} ${Ot==="txt"?"show":"hide"}`},Ot==="txt"&&de.createElement(de.Fragment,null,de.createElement(Ht.ZP,at({},te)))),Ot==="audio"&&de.createElement("audio",{src:`${(Bt==null?void 0:Bt.indexOf("http://"))>-1||(Bt==null?void 0:Bt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Bt}`,autoPlay:!0}),Ot==="video"&&de.createElement(de.Fragment,null,(Bt==null?void 0:Bt.indexOf("http"))>-1?de.createElement("video",{controls:!0,src:`${Bt}`,autoPlay:!0}):de.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Bt}`,autoPlay:!0})),Ot==="office"&&Sn&&de.createElement("iframe",{src:`${Fe}/office.html?key=${Sn.key}&url=${btoa(Sn.url)}&callbackUrl=${Ke+(Sn.callbackUrl||"")}&fileType=${Sn.fileType}&title=${Sn.title||""}&model=${Ct}&officeServer=${Kt.Z.ONLYOFFICE}&disabledDownload=${!!Ce}`}),Ot==="html"&&de.createElement("iframe",{src:Bt+"&disposition=inline"}),Ot==="pdf"&&de.createElement("iframe",{src:`${Fe}/js/pdfview/index.html?filename=${_t||"educoder.pdf"}&url=${encodeURIComponent(Bt)}&disabledDownload=${!!Ce}`}),Ot==="image"&&de.createElement("img",{src:`${(Bt==null?void 0:Bt.indexOf("http://"))>-1||(Bt==null?void 0:Bt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Bt}`}),(Ot==="other"||Ot==="download")&&de.createElement(de.Fragment,null,Ze?de.createElement(ge.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:de.createElement(Zt.ZP,{icon:de.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:An,disabled:Ce},"\u4E0B\u8F7D")}):de.createElement(Zt.ZP,{type:"primary",size:"middle",onClick:An,disabled:Ce},de.createElement(we.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},35890:function(xn,vn,Pt){"use strict";Pt.d(vn,{t:function(){return He}});var mt=Pt(59301),It=Pt(92832),Zt=Pt(78241),we=Pt(43418),Ht=Pt(95237),he=Pt(43604),Rt=Pt(88897),be=Pt(57809),ge=Pt(5112),Kt=Pt(64542),ue=Pt(42203),de=Pt(11037),ve=Pt(8591),At=Pt(3113),nt=Pt(71418),et=Pt(24334),ht={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},at=Pt(70635),ft=Pt(22267),vt=Pt(23469),Ct=Pt(56102),Bt=Pt(38600),Ft=Pt(59301),Ot=Object.defineProperty,_t=Object.defineProperties,te=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Ne=(Ee,Jt,ye)=>Jt in Ee?Ot(Ee,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[Jt]=ye,ne=(Ee,Jt)=>{for(var ye in Jt||(Jt={}))Me.call(Jt,ye)&&Ne(Ee,ye,Jt[ye]);if(Xt)for(var ye of Xt(Jt))qt.call(Jt,ye)&&Ne(Ee,ye,Jt[ye]);return Ee},Ce=(Ee,Jt)=>_t(Ee,te(Jt)),Ue=(Ee,Jt,ye)=>new Promise((Re,Be)=>{var Qt=xt=>{try{Tt(ye.next(xt))}catch(yt){Be(yt)}},ce=xt=>{try{Tt(ye.throw(xt))}catch(yt){Be(yt)}},Tt=xt=>xt.done?Re(xt.value):Promise.resolve(xt.value).then(Qt,ce);Tt((ye=ye.apply(Ee,Jt)).next())}),tn=({buttonProps:Ee,buttonText:Jt,form:ye,hackIdentifier:Re="",answerKey:Be,data:Qt})=>{const[ce,Tt]=(0,mt.useState)(!1),[xt,yt]=(0,mt.useState)(!1),[kt,zt]=(0,mt.useState)(!1),[Mt,se]=(0,mt.useState)({}),[$e,cn]=(0,mt.useState)(""),[sn,En]=(0,mt.useState)(""),Gn=(0,mt.useRef)(Re),zn=(0,mt.useRef)(""),Zn=(0,mt.useRef)(!1);(0,mt.useEffect)(()=>{kt&&Bi()},[kt]),(0,mt.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const $n=()=>new Date().getTime(),ni=Qt==null?void 0:Qt.code,ei=()=>{var Tn,In;let li=ni?Qt==null?void 0:Qt.code:(Tn=ye.getFieldValue("hack_codes"))==null?void 0:Tn.code,gi=ni?Qt==null?void 0:Qt.answer_content:ye.getFieldValue(Be),Yi=ni?Qt==null?void 0:Qt.input:(In=ye.getFieldValue("hack_sets"))==null?void 0:In.input;gi==null||gi.forEach(Ci=>{const bt=Ci.value||Ci.answer_text||"";li=li.replace(/(@▁@|@▁▁@)/,bt)}),En(Yi),cn(li),se({}),zt(!0)},Bi=()=>Ue(void 0,null,function*(){var Tn,In,li,gi;const Yi=$n(),Ci=ni?Qt==null?void 0:Qt.time_limit:(Tn=ye.getFieldsValue())==null?void 0:Tn.hack.time_limit,bt=ni?(In=Qt==null?void 0:Qt.answer_content)==null?void 0:In.length:(gi=(li=ye.getFieldsValue())==null?void 0:li.standard_answers)==null?void 0:gi.length;Tt(!0),yield(0,ft.bM)(zn.current,{test_hack_code:$e,test_input:sn});function _i(){return Ue(this,null,function*(){const{status:Fi,data:co}=yield(0,ft.rX)(zn.current,"submit"),Go=$n()-Yi>(Ci+3)*1e3*bt;if(Zn.current){if(Go){ve.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Tt(!1);return}if(Fi===0){Tt(!1),se(Ce(ne({},co),{showText:!0}));return}setTimeout(_i,1e3)}})}_i()}),Ki=()=>Ue(void 0,null,function*(){var Tn,In,li,gi,Yi,Ci,bt;if(!Qt){try{yield ye.validateFields()}catch(xo){(li=(In=(Tn=xo==null?void 0:xo.errorFields)==null?void 0:Tn[0])==null?void 0:In.name)!=null&&li.includes("standard_answers")?ve.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):ve.ZP.error(xo.errorFields[0].errors[0]),ye.scrollToField(xo.errorFields[0].name,{behavior:"smooth",block:"center"});return}yt(!0);let Fi="";const co=ye.getFieldsValue();Gn.current?Fi=yield(0,at.ZP)(`/api/problems/${Gn.current}.json`,{method:"put",body:Ce(ne({},co),{hack:Ce(ne({},co==null?void 0:co.hack),{sub_discipline_id:(bt=(Ci=co==null?void 0:co.hack)==null?void 0:Ci.sub_discipline_id)==null?void 0:bt[1],difficult:co.difficulty,item_banks_group_id:co.item_banks_group_id}),hack_codes:Ce(ne({},co.hack_codes),{code:et.Base64.encode(co.hack_codes.code)}),update_hack_sets:[ne({},co.hack_sets)],is_blank:!0})}):(Fi=yield(0,at.ZP)("/api/problems.json",{method:"post",body:Ce(ne({},co),{hack:Ce(ne({},co==null?void 0:co.hack),{sub_discipline_id:(Yi=(gi=co==null?void 0:co.hack)==null?void 0:gi.sub_discipline_id)==null?void 0:Yi[1],difficult:co.difficulty,item_banks_group_id:co.item_banks_group_id}),hack_codes:Ce(ne({},co.hack_codes),{code:et.Base64.encode(co.hack_codes.code)}),hack_sets:[ne({},co.hack_sets)],is_blank:!0})}),Gn.current=Fi==null?void 0:Fi.identifier,sessionStorage.projectFill=Fi==null?void 0:Fi.identifier)}const _i=yield(0,at.ZP)(`/api/problems/${Gn.current}/start.json`,{method:"get"});if((_i==null?void 0:_i.status)===0){zn.current=_i==null?void 0:_i.identifier,Zn.current=!0,yt(!1),ei();return}yt(!1)}),jn=Tn=>{const{status:In,error_msg:li,execute_time:gi,output:Yi,input:Ci,expected_output:bt}=Tn;let _i=null;switch(In){case Bt.h.OK:_i=Ft.createElement(Ft.Fragment,null,Ft.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",gi/1e3,"\u79D2"),Ft.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Bt.h.NOMATCH:_i=Ft.createElement(Ft.Fragment,null,Ft.createElement("div",null,"\u8F93\u5165\uFF1A"),Ft.createElement("pre",{style:{fontFamily:"initial"}},Ci),Ft.createElement("div",null,"\u8F93\u51FA\uFF1A"),Ft.createElement("pre",{style:{fontFamily:"initial"}},Yi&&et.Base64.decode(Yi)),Ft.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Ft.createElement("pre",{style:{fontFamily:"initial"}},bt&&et.Base64.decode(bt)));break;case Bt.h.EXECUTEFAILURE:_i=Ft.createElement(Ft.Fragment,null,Ft.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Ft.createElement("pre",null,Ci)),Ft.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Ft.createElement("pre",{className:"error"},et.Base64.decode(li)));break;case Bt.h.COMPILEFAILURE:_i=Ft.createElement(Ft.Fragment,null,Ft.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Ft.createElement("pre",null,Ci)),Ft.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Ft.createElement("pre",{className:"error"},et.Base64.decode(li)));break;case Bt.h.PODFAILURE:_i=Ft.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Bt.h.TIMEOUT:_i=Ft.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Ft.createElement(Ft.Fragment,null," ",_i," ")};return Ft.createElement("div",null,Ft.createElement(At.ZP,Ce(ne({loading:xt},Ee),{onClick:Ki}),Jt),Ft.createElement(we.default,{open:kt,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:ce,cancelButtonProps:{style:{display:"none"}},onOk:()=>Bi(),onCancel:()=>{Zn.current=!1,zt(!1)}},Ft.createElement("div",{className:ht.result},Ft.createElement("div",{className:ht.left},Ft.createElement("div",{className:"mb20"},Ft.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!Qt&&Ft.createElement(Ct.CopyToClipboard,{text:$e,onCopy:()=>ve.ZP.success("\u590D\u5236\u6210\u529F")},Ft.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Ft.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Ft.createElement(vt.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:$e,onChange:Tn=>cn(Tn)})),Ft.createElement("div",{className:ht.right},Ft.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Ft.createElement("div",{className:ht.box},Ft.createElement("div",{className:ht.li},Ft.createElement(It.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:sn,onChange:Tn=>En(Tn.target.value),bordered:!1,style:{height:180}}))),Ft.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Ft.createElement("div",{className:ht.box},Ft.createElement(nt.Z,{spinning:ce,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Ft.createElement("div",{className:ht.li,style:{height:196,overflow:"auto",padding:10}},jn(Mt))))))))},ln=Pt(80205),ie=Pt(59301),Gt=Object.defineProperty,Ae=Object.defineProperties,Sn=Object.getOwnPropertyDescriptors,gn=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,rn=(Ee,Jt,ye)=>Jt in Ee?Gt(Ee,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ee[Jt]=ye,Fn=(Ee,Jt)=>{for(var ye in Jt||(Jt={}))Fe.call(Jt,ye)&&rn(Ee,ye,Jt[ye]);if(gn)for(var ye of gn(Jt))Ke.call(Jt,ye)&&rn(Ee,ye,Jt[ye]);return Ee},Pn=(Ee,Jt)=>Ae(Ee,Sn(Jt)),We=(Ee,Jt)=>{var ye={};for(var Re in Ee)Fe.call(Ee,Re)&&Jt.indexOf(Re)<0&&(ye[Re]=Ee[Re]);if(Ee!=null&&gn)for(var Re of gn(Ee))Jt.indexOf(Re)<0&&Ke.call(Ee,Re)&&(ye[Re]=Ee[Re]);return ye};const{TextArea:fe}=It.default,An=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Hn=({value:Ee,onChange:Jt})=>ie.createElement(Switch,{checked:Ee,onChange:ye=>{Jt(ye)}}),un="@\u2581@",De="@\u2581\u2581@",He=({questionTitlePlaceholder:Ee,form:Jt,scoreByBlank:ye=!1,hackidentifier:Re,answerKey:Be})=>{const[Qt,ce]=(0,mt.useState)(!1),[Tt,xt]=(0,mt.useState)(!1),kt=(0,ue.useParams)().type==="edit",zt=(zn,Zn)=>{const $n=Zn.line;let ni=0;for(let Bi=0;Bi<$n;Bi++)ni+=zn.getLine(Bi).split(un).length-1;for(let Bi=0;Bi<$n;Bi++)ni+=zn.getLine(Bi).split(De).length-1;const ei=zn.getLine($n).substring(0,Zn.ch);return ni+=ei.split(un).length-1,ni+=ei.split(De).length-1,ni},Mt=(zn,Zn,$n,ni)=>{const ei=zn.getRange(Zn.from,Zn.to);let Bi=0;if(Zn.text.forEach(Ki=>{Bi+=Ki.split(un).length-1}),Zn.text.forEach(Ki=>{Bi+=Ki.split(De).length-1}),Zn.origin!=="setValue"){if(ei&&(ei.indexOf(un)!==-1||ei.indexOf(De)!==-1)){const Ki=ei.split(un).length-1+ei.split(De).length-1,jn=zt(zn,Zn.from);if(console.log(`\u5220\u9664${Ki}\u4E2A\uFF0C \u524D\u9762\u6709${jn}\u4E2A\uFF0C\u65B0\u589E${Bi}\u4E2A`),Ki>1){const Tn=Array.from({length:Ki},(In,li)=>jn+li);ni(Tn)}else ni(jn)}else if(Bi>0){const Ki=zt(zn,Zn.from);console.log(`\u65B0\u589E${Bi}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ki}\u4E2A`),$n(Bi,Ki)}}},se=()=>{const zn=Jt.getFieldValue(Be);Jt.setFieldsValue({[Be]:zn==null?void 0:zn.map((Zn,$n)=>Pn(Fn({},Zn),{position:$n+1}))})},$e=(0,mt.useRef)(),cn=(zn,Zn)=>{for(let $n=0;$n<zn;$n++)$e.current({position:null,answer_text:""},Zn+$n);se()},sn=(0,mt.useRef)(),En=zn=>{sn.current(zn),se()},Gn=Zt.default.useWatch(Be,Jt);return ie.createElement("div",{className:de.Z.wrap},ie.createElement(Zt.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},ie.createElement(Kt.h,{scrollId:"name",watch:!0,height:140})),ie.createElement("div",{className:de.Z.questionTitleEditorWrap},ie.createElement(Zt.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},ie.createElement(Kt.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(zn,Zn)=>{const $n=Jt.getFieldValue(Be);console.log("--preAnswerData",$n,Zn),Jt.setFieldsValue({[Be]:$n==null?void 0:$n.map((ni,ei)=>{var Bi;return Pn(Fn({},ni),{position:ei+1,multi_line:(Bi=Zn==null?void 0:Zn[ei])==null?void 0:Bi.multiLine})})})},placeholder:Ee,onCMBeforeChange:(zn,Zn)=>{Mt(zn,Zn,cn,En)}}))),ie.createElement(Zt.default.List,{name:Be,rules:[{validator(zn,Zn){if(!(Zn!=null&&Zn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const $n of Zn){const{answer_text:ni}=$n||{};if((ni==null?void 0:ni.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(zn,{add:Zn,remove:$n},{errors:ni})=>($e.current=Zn,sn.current=$n,ie.createElement(ie.Fragment,null,ie.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},ie.createElement(Zt.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),ie.createElement("div",{onClick:()=>{we.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:ie.createElement("div",null,ie.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",ie.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),ie.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},ie.createElement(ln.Z,{style:{marginRight:3,color:"#3061D0"}}),ie.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),zn.map((ei,Bi)=>{var Ki=ei,{key:jn,name:Tn}=Ki,In=We(Ki,["key","name"]),li,gi;return ie.createElement(Ht.Z,{className:"mb20",key:jn,align:"middle",wrap:!1},ie.createElement(he.Z,{flex:"0 0 auto",className:`${de.Z.blankIndex}`},"\u586B\u7A7A\u9879",Bi+1),ie.createElement(he.Z,{flex:1},ie.createElement(Ht.Z,{align:"top",justify:"space-between",wrap:!1},ie.createElement(he.Z,null,ie.createElement(Zt.default.Item,Pn(Fn({},In),{name:[Tn,"answer_text"],noStyle:!0}),(li=Gn==null?void 0:Gn[Tn])!=null&&li.multi_line||(gi=Gn==null?void 0:Gn[Tn])!=null&&gi.multiLine?ie.createElement(fe,{spellCheck:!1,style:{marginLeft:10,width:550}}):ie.createElement(It.default,{style:{marginLeft:10,width:550},className:de.Z.blankInput,size:"large",maxLength:1e3,onBlur:Yi=>{}}))),ye&&ie.createElement(he.Z,{flex:"224px"},ie.createElement(Zt.default.Item,Pn(Fn({},In),{name:[Tn,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),ie.createElement(Rt.Z,{size:"large",className:de.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),ie.createElement("div",{onClick:()=>ce(!0)},ie.createElement(Zt.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ie.createElement(Kt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Qt}))),ie.createElement(Zt.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},ie.createElement(be.default,{size:"large"},An.map(zn=>ie.createElement(be.default.Option,{key:zn.title,value:zn.key}," ",zn.title)))),ie.createElement(Zt.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},ie.createElement(Zt.default.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},ie.createElement(Rt.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),ie.createElement("span",{className:"ml10 font14"},"\u79D2")),ie.createElement(Zt.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},ie.createElement(ge.ZP.Group,{style:{marginTop:-10}},ie.createElement(ge.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),ie.createElement(ge.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),ie.createElement(ge.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),ie.createElement(Zt.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),ie.createElement("div",{style:{background:"#F6F7F9",padding:15}},ie.createElement(Zt.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},ie.createElement(fe,{rows:4})),ie.createElement(Zt.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ie.createElement(fe,{rows:4}))),ie.createElement(tn,{form:Jt,answerKey:Be,hackIdentifier:Re,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:ie.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},74830:function(xn,vn,Pt){"use strict";Pt.d(vn,{u:function(){return Ft}});var mt=Pt(59301),It=Pt(95237),Zt=Pt(43604),we=Pt(6848),Ht=Pt(78241),he=Pt(11037),Rt=Pt(37520),be=Pt(89378),ge=Pt(64542),Kt=Pt(59301),ue=Object.defineProperty,de=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ht=(Ot,_t,te)=>_t in Ot?ue(Ot,_t,{enumerable:!0,configurable:!0,writable:!0,value:te}):Ot[_t]=te,at=(Ot,_t)=>{for(var te in _t||(_t={}))nt.call(_t,te)&&ht(Ot,te,_t[te]);if(At)for(var te of At(_t))et.call(_t,te)&&ht(Ot,te,_t[te]);return Ot},ft=(Ot,_t)=>de(Ot,ve(_t)),vt=(Ot,_t)=>{var te={};for(var Xt in Ot)nt.call(Ot,Xt)&&_t.indexOf(Xt)<0&&(te[Xt]=Ot[Xt]);if(Ot!=null&&At)for(var Xt of At(Ot))_t.indexOf(Xt)<0&&et.call(Ot,Xt)&&(te[Xt]=Ot[Xt]);return te};const Ct=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Bt=({value:Ot,onChange:_t,choiceTextKey:te,answerKey:Xt,index:Me,isEdit:qt,setInputActive:Ne,form:ne,choiceOptionsPath:Ce,allowChangeMode:Ue,showAddIcon:Ze,addItem:tn,deleteItem:ln})=>{console.log(Ot,"value");const ie=(Ot==null?void 0:Ot[Xt])===1,Gt=()=>{const Sn=ne.getFieldValue(Ce);ne.setFieldValue(Ce,Sn.map(gn=>ft(at({},gn),{[Xt]:0})))},Ae=()=>{ie?_t(ft(at({},Ot),{[Xt]:0})):(Ue||Gt(),_t(ft(at({},Ot),{[Xt]:1})))};return Kt.createElement(It.Z,{className:he.Z.choiceWrap,align:"middle",wrap:!1},Kt.createElement(Zt.Z,{onClick:Ae,className:`${he.Z.choiceIndex} ${ie?he.Z.activeAnswer:""}`},Ct[Me]),Kt.createElement(Zt.Z,{flex:1,className:`${he.Z.editorWrap} ml15`,onClick:Ne},Kt.createElement(ge.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:qt,value:Ot==null?void 0:Ot[te],onChange:Sn=>{_t(ft(at({},Ot),{[te]:Sn}))}})),Kt.createElement(Zt.Z,{flex:"0 0 auto",className:"ml15"},Kt.createElement("div",{onClick:Ae,className:`${he.Z.setAnswerBtn} ${ie?he.Z.activeAnswer:""}`},ie?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Kt.createElement(Zt.Z,{className:he.Z.actionWrapper},Kt.createElement(we.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Kt.createElement(Rt.Z,{className:he.Z.addIcon,onClick:tn,style:{visibility:Ze?"visible":"hidden"}})),Kt.createElement(we.Z,{title:"\u5220\u9664"},Kt.createElement(be.Z,{className:he.Z.deleteIcon,onClick:ln,style:{visibility:Me>1?"visible":"hidden"}}))))},Ft=({questionTitlePlaceholder:Ot,titleKey:_t,choiceKey:te,analysisKey:Xt,choiceTextKey:Me,answerKey:qt,choiceOptionsPath:Ne,allowChangeMode:ne=!0,form:Ce,showAnalysis:Ue=!0})=>{const[Ze,tn]=(0,mt.useState)(),[ln,ie]=(0,mt.useState)(!1);return Kt.createElement("div",{className:he.Z.wrap},Kt.createElement("div",{className:he.Z.questionTitleEditorWrap},Kt.createElement(Ht.default.Item,{label:"\u9898\u5E72",name:_t,labelCol:{span:24},rules:[{required:!0}]},Kt.createElement(ge.h,{scrollId:Array.isArray(_t)?_t.join("_"):`${_t}`,watch:!0,height:140,placeholder:Ot}))),Kt.createElement(Ht.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Kt.createElement(Ht.default.List,{name:te,rules:[{validator(Gt,Ae){const Sn=Ae.some(Fe=>Fe[qt]===1),gn=Ae.findIndex(Fe=>{var Ke;return((Ke=Fe[Me])==null?void 0:Ke.length)<=0});return gn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ct[gn]}\u9009\u9879\u7684\u5185\u5BB9`)):Sn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Gt,{add:Ae,remove:Sn})=>Kt.createElement("div",{id:Array.isArray(Ne)?Ne.join("_"):`${Ne}`},Gt.map((gn,Fe)=>{var Ke=gn,{key:rn,name:Fn}=Ke,Pn=vt(Ke,["key","name"]);const We=Ze===rn,fe=()=>{tn(rn)},An=Fe<7&&Fe===Gt.length-1,Hn=()=>Ae({[Me]:"",[qt]:0}),un=()=>Sn(Fn);return Kt.createElement(Ht.default.Item,ft(at({},Pn),{key:rn,name:Fn,className:he.Z.choiceListWrap,rules:[{validator(De,He){return He!=null&&He.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ct[Fe]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Kt.createElement(Bt,{choiceTextKey:Me,answerKey:qt,index:Fe,isEdit:We,setInputActive:fe,form:Ce,choiceOptionsPath:Ne,allowChangeMode:ne,showAddIcon:An,addItem:Hn,deleteItem:un}))}),Gt.length<8&&Kt.createElement("div",{className:`${he.Z.addBtn} mb30`,onClick:()=>Ae({[Me]:"",[qt]:0})},"\u6DFB\u52A0\u9009\u9879"))),Ue&&Kt.createElement("div",{onClick:()=>ie(!0)},Kt.createElement(Ht.default.Item,{name:Xt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Kt.createElement(ge.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ln}))))}},26778:function(xn,vn,Pt){"use strict";Pt.d(vn,{u:function(){return ne}});var mt=Pt(59301),It=Pt(43418),Zt=Pt(95237),we=Pt(43604),Ht=Pt(92832),he=Pt(6848),Rt=Pt(78673),be=Pt(78241),ge=Pt(5112),Kt=Pt(88897),ue=Pt(64542),de=Pt(89378),ve=Pt(86902),At=Pt(11037),nt=Pt(34571),et=Pt(59301),ht=Object.defineProperty,at=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Ft=(Ce,Ue,Ze)=>Ue in Ce?ht(Ce,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Ce[Ue]=Ze,Ot=(Ce,Ue)=>{for(var Ze in Ue||(Ue={}))Ct.call(Ue,Ze)&&Ft(Ce,Ze,Ue[Ze]);if(vt)for(var Ze of vt(Ue))Bt.call(Ue,Ze)&&Ft(Ce,Ze,Ue[Ze]);return Ce},_t=(Ce,Ue)=>at(Ce,ft(Ue)),te=(Ce,Ue)=>{var Ze={};for(var tn in Ce)Ct.call(Ce,tn)&&Ue.indexOf(tn)<0&&(Ze[tn]=Ce[tn]);if(Ce!=null&&vt)for(var tn of vt(Ce))Ue.indexOf(tn)<0&&Bt.call(Ce,tn)&&(Ze[tn]=Ce[tn]);return Ze};const Xt=({value:Ce,onChange:Ue})=>{const Ze=ln=>{It.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:At.Z.modal,onOk:()=>{const ie=[...Ce];ie.splice(ln,1),Ue(ie)}})},tn=()=>{const ln=[...Ce];ln.push(""),Ue(ln)};return et.createElement(Zt.Z,{className:"ml20"},et.createElement(we.Z,{flex:1},Ce==null?void 0:Ce.map((ln,ie)=>et.createElement(Zt.Z,{key:`${ln}_${ie}`,className:"mb20"},et.createElement(Ht.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:ln,autoSize:{maxRows:3},maxLength:1e3,onBlur:Gt=>{const Ae=[...Ce],Sn=Gt.target.value.trim();Ae[ie]=Sn,Ue(Ae)}}),et.createElement(he.Z,{title:"\u5220\u9664"},et.createElement(de.Z,{className:At.Z.deleteIcon,style:{marginLeft:15,visibility:ie>0?"visible":"hidden"},onClick:()=>Ze(ie)}))))),et.createElement(we.Z,null,et.createElement("div",{className:`${At.Z.addBtn}`,onClick:()=>{tn()}},"\u65B0\u589E\u7B54\u6848")))},Me=({value:Ce,onChange:Ue})=>{const Ze=ln=>{It.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:At.Z.modal,onOk:()=>{const ie=[...Ce];ie.splice(ln,1),Ue(ie)}})},tn=()=>{const ln=[...Ce];ln.push(""),Ue(ln)};return et.createElement(Zt.Z,{className:"ml20"},et.createElement(we.Z,{flex:1},Ce==null?void 0:Ce.map((ln,ie)=>et.createElement(Zt.Z,{key:`${ln}_${ie}`,align:"middle",className:"mb20"},et.createElement(nt.Z,{value:ln,style:{flex:1},onChange:Gt=>{const Ae=[...Ce];Ae[ie]=Gt,Ue(Ae)}}),et.createElement(he.Z,{title:"\u5220\u9664"},et.createElement(de.Z,{className:At.Z.deleteIcon,style:{marginLeft:15,visibility:ie>0?"visible":"hidden"},onClick:()=>Ze(ie)}))))),et.createElement(we.Z,null,et.createElement("div",{className:`${At.Z.addBtn}`,onClick:()=>{tn()}},"\u65B0\u589E\u7B54\u6848")))},qt=({value:Ce=!0,onChange:Ue})=>et.createElement(Rt.Z,{checked:!Ce,onChange:Ze=>{Ue(!Ze)}}),Ne="\u2581",ne=({questionTitlePlaceholder:Ce,form:Ue,scoreByBlank:Ze=!1,answerKey:tn})=>{const[ln,ie]=(0,mt.useState)(!1),Gt=(Pn,We)=>{const fe=We.line;let An=0;for(let un=0;un<fe;un++)An+=Pn.getLine(un).split(Ne).length-1;const Hn=Pn.getLine(fe).substring(0,We.ch);return An+=Hn.split(Ne).length-1,An},Ae=(Pn,We,fe,An)=>{const Hn=Pn.getRange(We.from,We.to);let un=0;if(We.text.forEach(De=>{un+=De.split(Ne).length-1}),We.origin!=="setValue"){if(Hn&&Hn.indexOf(Ne)!==-1){const De=Hn.split(Ne).length-1,He=Gt(Pn,We.from);if(console.log(`\u5220\u9664${De}\u4E2A\uFF0C \u524D\u9762\u6709${He}\u4E2A\uFF0C\u65B0\u589E${un}\u4E2A`),De>1){const Ee=Array.from({length:De},(Jt,ye)=>He+ye);An(Ee)}else An(He)}else if(un>0){const De=Gt(Pn,We.from);console.log(`\u65B0\u589E${un}\u4E2A\uFF0C\u4E4B\u524D\u6709${De}\u4E2A`),fe(un,De)}}},Sn=()=>{const Pn=Ue.getFieldValue(tn);Ue.setFieldsValue({[tn]:Pn.map((We,fe)=>_t(Ot({},We),{position:fe+1}))})},gn=(0,mt.useRef)(),Fe=(Pn,We)=>{for(let fe=0;fe<Pn;fe++)gn.current({position:null,answer_text:[""],model:1},We+fe);Sn()},Ke=(0,mt.useRef)(),rn=Pn=>{Ke.current(Pn),Sn()},Fn=be.default.useWatch(tn,Ue);return et.createElement("div",{className:At.Z.wrap},et.createElement("div",{className:At.Z.questionTitleEditorWrap},et.createElement(be.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},et.createElement(ue.h,{scrollId:"name",watch:!0,height:140,placeholder:Ce,showNullButton:!0,onCMBeforeChange:(Pn,We)=>{Ae(Pn,We,Fe,rn)}}))),et.createElement(be.default.List,{name:tn,rules:[{validator(Pn,We){if(!(We!=null&&We.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const fe of We){const{answer_text:An}=fe||{};if(An!=null&&An.some(Hn=>(Hn==null?void 0:Hn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Pn,{add:We,remove:fe},{errors:An})=>(gn.current=We,Ke.current=fe,et.createElement(et.Fragment,null,et.createElement(be.default.Item,{label:et.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(Pn!=null&&Pn.length)&&et.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),Pn.map((Hn,un)=>{var De=Hn,{key:He,name:Ee}=De,Jt=te(De,["key","name"]),ye,Re;return et.createElement("div",{style:{marginBottom:10},key:He},et.createElement(Zt.Z,{className:"mb20",align:"middle",wrap:!1},et.createElement(we.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${At.Z.blankIndex}`},"\u586B\u7A7A\u9879",un+1),et.createElement(be.default.Item,_t(Ot({},Jt),{name:[Ee,"model"],noStyle:!0}),et.createElement(ge.ZP.Group,{onChange:()=>{const Be=Ue.getFieldValue(tn);Ue.setFieldsValue({[tn]:Be.map((Qt,ce)=>_t(Ot({},Qt),{answer_text:Ee===ce?[""]:Qt.answer_text}))})}},et.createElement(ge.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",et.createElement(he.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},et.createElement(ve.Z,null))),et.createElement(ge.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",et.createElement(he.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},et.createElement(ve.Z,null)))))),et.createElement(Zt.Z,{style:{marginLeft:20},align:"middle",wrap:!1},et.createElement(we.Z,{flex:1},et.createElement(Zt.Z,{align:"top",justify:"space-between",wrap:!1},et.createElement(we.Z,{flex:1},et.createElement(be.default.Item,_t(Ot({},Jt),{name:[Ee,"answer_text"],noStyle:!0}),((Re=(ye=Ue.getFieldValue(tn))==null?void 0:ye[Ee])==null?void 0:Re.model)===1?et.createElement(Xt,null):et.createElement(Me,null))),Ze&&et.createElement(we.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},et.createElement(be.default.Item,_t(Ot({},Jt),{name:[Ee,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:At.Z.blankInputNumberWrapper}),et.createElement(Kt.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),et.createElement(be.default.Item,_t(Ot({},Jt),{name:[Ee,"position"],noStyle:!0}),et.createElement(Ht.default,{type:"hidden"})))))})))),et.createElement(Zt.Z,{align:"middle"},et.createElement(be.default.Item,{name:"downcase",valuePropName:"checked"},et.createElement(Rt.Z,null)),et.createElement(we.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),et.createElement(Zt.Z,{align:"middle"},et.createElement(be.default.Item,{name:"no_space",valuePropName:"checked"},et.createElement(Rt.Z,null)),et.createElement(we.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Fn==null?void 0:Fn.length)>1&&et.createElement(Zt.Z,{align:"middle",className:(Fn==null?void 0:Fn.length)>1?"mb30":`${At.Z.hide}`},et.createElement(be.default.Item,{name:"is_ordered"},et.createElement(qt,null)),et.createElement(we.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),et.createElement("div",{onClick:()=>ie(!0)},et.createElement(be.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},et.createElement(ue.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ln}))))}},41673:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return vt}});var mt=Pt(59301),It=Pt(95237),Zt=Pt(43604),we=Pt(78241),Ht=Pt(11037),he=Pt(64542),Rt=Pt(59301),be=Object.defineProperty,ge=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,At=(Ct,Bt,Ft)=>Bt in Ct?be(Ct,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):Ct[Bt]=Ft,nt=(Ct,Bt)=>{for(var Ft in Bt||(Bt={}))de.call(Bt,Ft)&&At(Ct,Ft,Bt[Ft]);if(ue)for(var Ft of ue(Bt))ve.call(Bt,Ft)&&At(Ct,Ft,Bt[Ft]);return Ct},et=(Ct,Bt)=>ge(Ct,Kt(Bt)),ht=(Ct,Bt)=>{var Ft={};for(var Ot in Ct)de.call(Ct,Ot)&&Bt.indexOf(Ot)<0&&(Ft[Ot]=Ct[Ot]);if(Ct!=null&&ue)for(var Ot of ue(Ct))Bt.indexOf(Ot)<0&&ve.call(Ct,Ot)&&(Ft[Ot]=Ct[Ot]);return Ft};const at={\u6B63\u786E:"T",\u9519\u8BEF:"F"},ft=({value:Ct,onChange:Bt,form:Ft})=>{const Ot=(Ct==null?void 0:Ct.is_answer)===1,_t=Ct==null?void 0:Ct.choice_text,te=()=>{const Xt=Ft.getFieldsValue().choices.map(Me=>({choice_text:Me.choice_text,is_answer:0}));Ft.setFieldsValue({choices:Xt}),Bt(et(nt({},Ct),{is_answer:1}))};return Rt.createElement(It.Z,{className:Ht.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Rt.createElement(Zt.Z,{onClick:te,className:`${Ht.Z.choiceIndex} ${Ht.Z.judgementIndex} ${Ot?Ht.Z.activeAnswer:""}`},at[_t]),Rt.createElement(Zt.Z,{flex:1,className:`${Ht.Z.editorWrap} ml15`},Rt.createElement("div",{className:`${Ht.Z.inputBorder} ${Ht.Z.placeholder} ${Ot?Ht.Z.activeJudgementAnswer:""}`},_t)),Rt.createElement(Zt.Z,{flex:"0 0 auto",className:"ml15"},Rt.createElement("div",{onClick:te,className:`${Ht.Z.setAnswerBtn} ${Ot?Ht.Z.activeAnswer:""}`},Ot?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},vt=({questionTitlePlaceholder:Ct,choiceKey:Bt,form:Ft})=>{const[Ot,_t]=(0,mt.useState)(!1);return Rt.createElement("div",{className:Ht.Z.wrap},Rt.createElement("div",{className:Ht.Z.questionTitleEditorWrap},Rt.createElement(we.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Rt.createElement(he.h,{scrollId:"name",watch:!0,height:140,placeholder:Ct}))),Rt.createElement(we.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Rt.createElement(we.default.List,{name:"choices",rules:[{validator(te,Xt){return Xt.some(qt=>(qt==null?void 0:qt.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},te=>Rt.createElement("div",{id:"choices"},te.map(Xt=>{var Me=Xt,{key:qt,name:Ne}=Me,ne=ht(Me,["key","name"]);return Rt.createElement(we.default.Item,et(nt({},ne),{key:qt,name:Ne,noStyle:!0}),Rt.createElement(ft,{form:Ft}))})))),Rt.createElement("div",{onClick:()=>_t(!0)},Rt.createElement(we.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Rt.createElement(he.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ot}))))}},64542:function(xn,vn,Pt){"use strict";Pt.d(vn,{h:function(){return nt},x:function(){return et}});var mt=Pt(23469),It=Pt(11037),Zt=Pt(25711),we=Pt(59301),Ht=Object.defineProperty,he=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,ue=(ht,at,ft)=>at in ht?Ht(ht,at,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ht[at]=ft,de=(ht,at)=>{for(var ft in at||(at={}))ge.call(at,ft)&&ue(ht,ft,at[ft]);if(be)for(var ft of be(at))Kt.call(at,ft)&&ue(ht,ft,at[ft]);return ht},ve=(ht,at)=>he(ht,Rt(at)),At=(ht,at)=>{var ft={};for(var vt in ht)ge.call(ht,vt)&&at.indexOf(vt)<0&&(ft[vt]=ht[vt]);if(ht!=null&&be)for(var vt of be(ht))at.indexOf(vt)<0&&Kt.call(ht,vt)&&(ft[vt]=ht[vt]);return ft};const nt=ht=>{var at=ht,{value:ft,onChange:vt,scrollId:Ct}=at,Bt=At(at,["value","onChange","scrollId"]);return we.createElement("div",{id:Ct||""},we.createElement(mt.Z,ve(de({},Bt),{defaultValue:ft,onChange:(Ft,Ot)=>{console.log("a:",Ft,Ot),Ot!=null&&Ot.length?vt(Ft,Ot):vt(Ft)}})))},et=({value:ht,onChange:at,placeholder:ft,height:vt=140,isEdit:Ct,miniToolbar:Bt,watch:Ft=!0})=>Ct?we.createElement(mt.Z,{watch:Ft,isFocus:!0,height:vt||void 0,placeholder:ft,defaultValue:ht,onChange:at,miniToolbar:Bt}):we.createElement("div",{style:{cursor:"pointer"}},ht?we.createElement(Zt.Z,{className:It.Z.inputBorder,value:ht}):we.createElement("div",{className:`${It.Z.inputBorder} ${It.Z.placeholder} inputBorderError`},ft))},6507:function(xn,vn,Pt){"use strict";Pt.d(vn,{W:function(){return Me}});var mt=Pt(59301),It=Pt(8591),Zt=Pt(12563),we=Pt(78241),Ht=Pt(78673),he=Pt(95237),Rt=Pt(43604),be=Pt(6848),ge=Pt(92832),Kt=Pt(88897),ue=Pt(11037),de=Pt(64542),ve=Pt(23469),At=Pt(86902),nt=Object.defineProperty,et=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Ct=(qt,Ne,ne)=>Ne in qt?nt(qt,Ne,{enumerable:!0,configurable:!0,writable:!0,value:ne}):qt[Ne]=ne,Bt=(qt,Ne)=>{for(var ne in Ne||(Ne={}))ft.call(Ne,ne)&&Ct(qt,ne,Ne[ne]);if(at)for(var ne of at(Ne))vt.call(Ne,ne)&&Ct(qt,ne,Ne[ne]);return qt},Ft=(qt,Ne)=>et(qt,ht(Ne)),Ot=(qt,Ne)=>{var ne={};for(var Ce in qt)ft.call(qt,Ce)&&Ne.indexOf(Ce)<0&&(ne[Ce]=qt[Ce]);if(qt!=null&&at)for(var Ce of at(qt))Ne.indexOf(Ce)<0&&vt.call(qt,Ce)&&(ne[Ce]=qt[Ce]);return ne};const _t=qt=>{var Ne=qt,{value:ne,onChange:Ce}=Ne,Ue=Ot(Ne,["value","onChange"]);const Ze=tn=>{Ce([tn])};return mt.createElement(ve.Z,Ft(Bt({},Ue),{defaultValue:ne==null?void 0:ne[0],onChange:Ze}))},te=qt=>{if(!qt)return!1;if(/^s*$/.test(qt)||qt.trim()===""){It.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Ne=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return qt==="|"?(It.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Xt=({value:qt=[],onClose:Ne})=>mt.createElement(Zt.default,{closable:!0,onClose:Ne,className:ue.Z.keywordTag},mt.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},qt.join(" \u6216 "))),Me=({questionTitlePlaceholder:qt,form:Ne,showKeywords:ne,isMustKeyWords:Ce=ne})=>{const[Ue,Ze]=(0,mt.useState)(!1),[tn,ln]=(0,mt.useState)(""),ie=we.default.useWatch("use_keywords",Ne),Gt=we.default.useWatch("question_score",Ne);return mt.createElement("div",{className:ue.Z.wrap},mt.createElement("div",{className:ue.Z.questionTitleEditorWrap},mt.createElement(we.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},mt.createElement(de.h,{scrollId:"name",watch:!0,height:140,placeholder:qt}))),mt.createElement(we.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},mt.createElement(_t,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),ne&&!Ce&&mt.createElement(we.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},mt.createElement(Ht.Z,{defaultChecked:!0})),ne&&Ce&&mt.createElement(he.Z,{align:"middle",className:"mb30"},mt.createElement(we.default.Item,{name:"use_keywords",valuePropName:"checked"},mt.createElement(Ht.Z,null)),mt.createElement(Rt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),mt.createElement(Rt.Z,null,mt.createElement(be.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},mt.createElement(At.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(ie||!Ce)&&mt.createElement(we.default.List,{name:"keywords",rules:[{validator(Ae,Sn){return Ce?Sn!=null&&Sn.length?(Sn==null?void 0:Sn.reduce((Fe,Ke)=>Fe+Ke.score,0))>parseFloat(Gt)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Ae,{add:Sn,remove:gn})=>mt.createElement(mt.Fragment,null,mt.createElement("div",{className:`${ue.Z.title} mb10`},Ce?"\u5173\u952E\u8BCD":mt.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),mt.createElement(he.Z,{align:"middle",className:"font14 mb30"},mt.createElement(Rt.Z,{flex:1},mt.createElement(ge.default,{value:tn,onChange:Fe=>{ln(Fe.target.value)},maxLength:50,allowClear:!0,onPressEnter:Fe=>{var Ke,rn,Fn,Pn;const We=`${(Ke=Fe.target)==null?void 0:Ke.value}`,fe=(Fn=(rn=We==null?void 0:We.split("|"))==null?void 0:rn.filter(un=>!!un))==null?void 0:Fn.map(un=>un==null?void 0:un.trim()),An=Ne.getFieldValue("keywords"),Hn=((Pn=An==null?void 0:An.map(un=>un==null?void 0:un.keyword))==null?void 0:Pn.flat())||[];for(const un of fe)if(Hn.includes(un)){It.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}te(We)&&(Sn({keyword:fe,score:1}),ln(""))},className:ue.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),mt.createElement(Rt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ae.map(Fe=>{var Ke=Fe,{key:rn,name:Fn}=Ke,Pn=Ot(Ke,["key","name"]);return mt.createElement(he.Z,{key:rn,className:"mb20",style:{marginRight:148}},mt.createElement(Rt.Z,{flex:1},mt.createElement(he.Z,{align:"middle",justify:"space-between"},mt.createElement(we.default.Item,Ft(Bt({},Pn),{name:[Fn,"keyword"]}),mt.createElement(Xt,{onClose:()=>gn(Fn)})),Ce&&mt.createElement(we.default.Item,Ft(Bt({},Pn),{name:[Fn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:ue.Z.blankInputNumberWrapper}),mt.createElement(Kt.Z,{className:ue.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),mt.createElement("div",{onClick:()=>Ze(!0)},mt.createElement(we.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},mt.createElement(de.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ue}))))}},26696:function(xn,vn,Pt){"use strict";Pt.d(vn,{tc:function(){return Ki.t},uh:function(){return mt.u},rL:function(){return Bi},u8:function(){return Zt.u},ZZ:function(){return It.Z},Wk:function(){return we.W}});var mt=Pt(74830),It=Pt(41673),Zt=Pt(26778),we=Pt(6507),Ht=Pt(59301),he=Pt(36381),Rt=Pt(78241),be=Pt(95237),ge=Pt(43604),Kt=Pt(88897),ue=Pt(6848),de=Pt(38854),ve=Pt(11037),At=Pt(89378),nt=Pt(64542),et=Pt(43418),ht=Pt(92832),at=Pt(78673),ft=Pt(59301),vt=Object.defineProperty,Ct=Object.defineProperties,Bt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,te=(jn,Tn,In)=>Tn in jn?vt(jn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:In}):jn[Tn]=In,Xt=(jn,Tn)=>{for(var In in Tn||(Tn={}))Ot.call(Tn,In)&&te(jn,In,Tn[In]);if(Ft)for(var In of Ft(Tn))_t.call(Tn,In)&&te(jn,In,Tn[In]);return jn},Me=(jn,Tn)=>Ct(jn,Bt(Tn)),qt=(jn,Tn)=>{var In={};for(var li in jn)Ot.call(jn,li)&&Tn.indexOf(li)<0&&(In[li]=jn[li]);if(jn!=null&&Ft)for(var li of Ft(jn))Tn.indexOf(li)<0&&_t.call(jn,li)&&(In[li]=jn[li]);return In};const Ne=({value:jn,onChange:Tn})=>{const In=gi=>{et.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:ve.Z.modal,onOk:()=>{const Yi=[...jn];Yi.splice(gi,1),Tn(Yi)}})},li=()=>{const gi=[...jn];gi.push(""),Tn(gi)};return ft.createElement(be.Z,{className:"ml20"},ft.createElement(ge.Z,{flex:1},jn==null?void 0:jn.map((gi,Yi)=>ft.createElement(be.Z,{key:`${gi}_${Yi}`,align:"middle",className:"mb20"},ft.createElement(ht.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:gi,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ci=>{const bt=[...jn],_i=Ci.target.value.trim();bt[Yi]=_i,Tn(bt)}}),ft.createElement(ue.Z,{title:"\u5220\u9664"},ft.createElement(At.Z,{className:ve.Z.deleteIcon,style:{marginLeft:15,visibility:Yi>0?"visible":"hidden"},onClick:()=>In(Yi)}))))),ft.createElement(ge.Z,null,ft.createElement("div",{className:`${ve.Z.addBtn}`,onClick:()=>{li()}},"\u65B0\u589E\u7B54\u6848")))},ne=({value:jn=!0,onChange:Tn})=>ft.createElement(at.Z,{checked:!jn,onChange:In=>{Tn(!In)}}),Ce="\u2581",Ue=({questionTitlePlaceholder:jn,form:Tn,name:In,scoreByBlank:li=!1,answerKey:gi,titleKey:Yi="name",analysisKey:Ci="analysis",isOrdered:bt="is_ordered"})=>{var _i,Fi;const[co,xo]=(0,Ht.useState)(!1),Go=(Qe,pe)=>{const Yt=pe.line;let Ve=0;for(let Bn=0;Bn<Yt;Bn++)Ve+=Qe.getLine(Bn).split(Ce).length-1;const en=Qe.getLine(Yt).substring(0,pe.ch);return Ve+=en.split(Ce).length-1,Ve},io=(Qe,pe,Yt,Ve)=>{const en=Qe.getRange(pe.from,pe.to);let Bn=0;if(pe.text.forEach(qe=>{Bn+=qe.split(Ce).length-1}),pe.origin!=="setValue"){if(en&&en.indexOf(Ce)!==-1){const qe=en.split(Ce).length-1,xe=Go(Qe,pe.from);if(console.log(`\u5220\u9664${qe}\u4E2A\uFF0C \u524D\u9762\u6709${xe}\u4E2A\uFF0C\u65B0\u589E${Bn}\u4E2A`),qe>1){const an=Array.from({length:qe},(Mn,Vn)=>xe+Vn);Ve(an)}else Ve(xe)}else if(Bn>0){const qe=Go(Qe,pe.from);console.log(`\u65B0\u589E${Bn}\u4E2A\uFF0C\u4E4B\u524D\u6709${qe}\u4E2A`),Yt(Bn,qe)}}},ii=()=>{const Qe=Tn.getFieldValue(["sub_item_banks",...gi]);Tn.setFieldValue(["sub_item_banks",...gi],Qe==null?void 0:Qe.map((pe,Yt)=>Me(Xt({},pe),{position:Yt+1})))},ke=(0,Ht.useRef)(),Te=(Qe,pe)=>{for(let Yt=0;Yt<Qe;Yt++)ke.current({position:null,answer_text:[""]},pe+Yt);ii()},Le=(0,Ht.useRef)(),re=Qe=>{Le.current(Qe),ii()},nn=(Fi=(_i=Tn.getFieldValue("sub_item_banks"))==null?void 0:_i[gi==null?void 0:gi[0]])==null?void 0:Fi[gi==null?void 0:gi[1]];return(0,Ht.useEffect)(()=>{console.log("========",Tn.getFieldsValue())},[Tn]),ft.createElement("div",{className:ve.Z.wrap},ft.createElement("div",{className:ve.Z.questionTitleEditorWrap},ft.createElement(Rt.default.Item,{label:"\u9898\u5E72",name:Yi,labelCol:{span:24},rules:[{required:!0}]},ft.createElement(nt.h,{scrollId:"name",watch:!0,height:140,placeholder:jn,showNullButton:!0,onCMBeforeChange:(Qe,pe)=>{io(Qe,pe,Te,re)}}))),ft.createElement(Rt.default.List,{name:gi,rules:[{validator(Qe,pe){if((pe==null?void 0:pe.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const Yt of pe){const{answer_text:Ve}=Yt||{};if(Ve!=null&&Ve.some(en=>(en==null?void 0:en.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Qe,{add:pe,remove:Yt},{errors:Ve})=>(ke.current=pe,Le.current=Yt,ft.createElement(ft.Fragment,null,ft.createElement(Rt.default.Item,{label:ft.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(Qe!=null&&Qe.length)&&ft.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),Qe.map((en,Bn)=>{var qe=en,{key:xe,name:an}=qe,Mn=qt(qe,["key","name"]);return ft.createElement(be.Z,{align:"top",key:xe},ft.createElement(ge.Z,{className:`${ve.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",Bn+1),ft.createElement(ge.Z,{flex:1},ft.createElement(be.Z,{align:"top",justify:"space-between"},ft.createElement(ge.Z,{flex:1},ft.createElement(Rt.default.Item,Me(Xt({},Mn),{name:[an,"answer_text"],noStyle:!0}),ft.createElement(Ne,null))),li&&ft.createElement(ge.Z,{flex:"224px"},ft.createElement(Rt.default.Item,Me(Xt({},Mn),{name:[an,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:ve.Z.blankInputNumberWrapper}),ft.createElement(Kt.Z,{className:ve.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),ft.createElement(Rt.default.Item,Me(Xt({},Mn),{name:[an,"position"],noStyle:!0}),ft.createElement(ht.default,{type:"hidden"}))))})))),ft.createElement(be.Z,{align:"middle"},ft.createElement(Rt.default.Item,{name:[In,"downcase"],valuePropName:"checked"},ft.createElement(at.Z,null)),ft.createElement(ge.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ft.createElement(be.Z,{align:"middle"},ft.createElement(Rt.default.Item,{name:[In,"no_space"],valuePropName:"checked"},ft.createElement(at.Z,null)),ft.createElement(ge.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(nn==null?void 0:nn.length)>1&&ft.createElement(be.Z,{align:"middle",className:(nn==null?void 0:nn.length)>1?"mb30":`${ve.Z.hide}`},ft.createElement(Rt.default.Item,{name:bt},ft.createElement(ne,null)),ft.createElement(ge.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),ft.createElement("div",{className:"mt30",onClick:()=>xo(!0)},ft.createElement(Rt.default.Item,{name:Ci,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ft.createElement(nt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:co}))))};var Ze=Pt(59301),tn=Object.defineProperty,ln=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable,gn=(jn,Tn,In)=>Tn in jn?tn(jn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:In}):jn[Tn]=In,Fe=(jn,Tn)=>{for(var In in Tn||(Tn={}))Ae.call(Tn,In)&&gn(jn,In,Tn[In]);if(Gt)for(var In of Gt(Tn))Sn.call(Tn,In)&&gn(jn,In,Tn[In]);return jn},Ke=(jn,Tn)=>ln(jn,ie(Tn)),rn=(jn,Tn)=>{var In={};for(var li in jn)Ae.call(jn,li)&&Tn.indexOf(li)<0&&(In[li]=jn[li]);if(jn!=null&&Gt)for(var li of Gt(jn))Tn.indexOf(li)<0&&Sn.call(jn,li)&&(In[li]=jn[li]);return In};const Fn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Pn=({value:jn,onChange:Tn,form:In,choiceKey:li})=>{const gi=(jn==null?void 0:jn.is_answer)===1,Yi=jn==null?void 0:jn.choice_text,Ci=()=>{var bt;const _i=(bt=In==null?void 0:In.getFieldValue(["sub_item_banks",...li]))==null?void 0:bt.map(Fi=>({choice_text:Fi.choice_text,is_answer:0}));In==null||In.setFieldValue(["sub_item_banks",...li],_i),Tn(Ke(Fe({},jn),{is_answer:1}))};return Ze.createElement(be.Z,{className:ve.Z.choiceWrap,align:"middle",wrap:!1},Ze.createElement(ge.Z,{onClick:Ci,className:`${ve.Z.choiceIndex} ${ve.Z.judgementIndex} ${gi?ve.Z.activeAnswer:""}`},Fn[Yi]),Ze.createElement(ge.Z,{flex:1,className:`${ve.Z.editorWrap} ml15`},Ze.createElement("div",{className:`${ve.Z.inputBorder} ${ve.Z.placeholder} ${gi?ve.Z.activeJudgementAnswer:""}`},Yi)),Ze.createElement(ge.Z,{flex:"0 0 auto",className:"ml15"},Ze.createElement("div",{onClick:Ci,className:`${ve.Z.setAnswerBtn} ${gi?ve.Z.activeAnswer:""}`},gi?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},We=({questionTitlePlaceholder:jn,choiceKey:Tn="choices",form:In,titleKey:li="name",analysisKey:gi="analysis"})=>{const[Yi,Ci]=(0,Ht.useState)(!1);return Ze.createElement("div",{className:ve.Z.wrap},Ze.createElement("div",{className:ve.Z.questionTitleEditorWrap},Ze.createElement(Rt.default.Item,{label:"\u9898\u5E72",name:li,labelCol:{span:24},rules:[{required:!0}]},Ze.createElement(nt.h,{scrollId:"name",watch:!0,height:140,placeholder:jn}))),Ze.createElement(Rt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Ze.createElement(Rt.default.List,{name:Tn,rules:[{validator(bt,_i){return _i.some(co=>(co==null?void 0:co.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},bt=>Ze.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},bt.map(_i=>{var Fi=_i,{key:co,name:xo}=Fi,Go=rn(Fi,["key","name"]);return Ze.createElement(Rt.default.Item,Ke(Fe({},Go),{key:co,name:xo,noStyle:!0}),Ze.createElement(Pn,{form:In,choiceKey:Tn}))})))),Ze.createElement("div",{className:"mt30",onClick:()=>Ci(!0)},Ze.createElement(Rt.default.Item,{name:gi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ze.createElement(nt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Yi}))))};var fe=Pt(8591),An=Pt(12563),Hn=Pt(23469),un=Pt(86902),De=Object.defineProperty,He=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Be=(jn,Tn,In)=>Tn in jn?De(jn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:In}):jn[Tn]=In,Qt=(jn,Tn)=>{for(var In in Tn||(Tn={}))ye.call(Tn,In)&&Be(jn,In,Tn[In]);if(Jt)for(var In of Jt(Tn))Re.call(Tn,In)&&Be(jn,In,Tn[In]);return jn},ce=(jn,Tn)=>He(jn,Ee(Tn)),Tt=(jn,Tn)=>{var In={};for(var li in jn)ye.call(jn,li)&&Tn.indexOf(li)<0&&(In[li]=jn[li]);if(jn!=null&&Jt)for(var li of Jt(jn))Tn.indexOf(li)<0&&Re.call(jn,li)&&(In[li]=jn[li]);return In};const xt=jn=>{var Tn=jn,{value:In,onChange:li}=Tn,gi=Tt(Tn,["value","onChange"]);const Yi=Ci=>{li([Ci])};return Ht.createElement(Hn.Z,ce(Qt({},gi),{defaultValue:In==null?void 0:In[0],onChange:Yi}))},yt=jn=>{if(!jn)return!1;let Tn=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return jn==="|"?(fe.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},kt=({value:jn=[],onClose:Tn})=>Ht.createElement(An.default,{closable:!0,onClose:Tn,className:ve.Z.keywordTag},Ht.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},jn.join(" \u6216 "))),zt=({questionTitlePlaceholder:jn,form:Tn,showKeywords:In,isMustKeyWords:li=In,titleKey:gi="name",analysisKey:Yi="analysis",answerTexts:Ci="answer_texts",keywords:bt="keywords",useKeywords:_i="use_keywords",indexs:Fi})=>{const[co,xo]=(0,Ht.useState)(!1),[Go,io]=(0,Ht.useState)(""),[ii,ke]=(0,Ht.useState)(!1),Te=Rt.default.useWatch("question_score",Tn);return Ht.createElement("div",{className:ve.Z.wrap},Ht.createElement("div",{className:ve.Z.questionTitleEditorWrap},Ht.createElement(Rt.default.Item,{label:"\u9898\u5E72",name:gi,labelCol:{span:24},rules:[{required:!0}]},Ht.createElement(nt.h,{scrollId:"name",watch:!0,height:140,placeholder:jn}))),Ht.createElement(Rt.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:Ci,labelCol:{span:24}},Ht.createElement(xt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),In&&!li&&Ht.createElement(Rt.default.Item,{hidden:!0,name:_i,valuePropName:"checked"},Ht.createElement(at.Z,{defaultChecked:!0})),In&&li&&Ht.createElement(be.Z,{align:"middle",className:"mb30"},Ht.createElement(Rt.default.Item,{name:_i,valuePropName:"checked"},Ht.createElement(at.Z,{onChange:()=>{var Le,re,nn,Qe,pe,Yt;console.log(Tn.getFieldsValue()),ke((nn=(re=(Le=Tn.getFieldsValue())==null?void 0:Le.sub_item_banks)==null?void 0:re[Fi])==null?void 0:nn.use_keywords),console.log((Yt=(pe=(Qe=Tn.getFieldsValue())==null?void 0:Qe.sub_item_banks)==null?void 0:pe[Fi])==null?void 0:Yt.use_keywords),console.log(ii)}})),Ht.createElement(ge.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Ht.createElement(ge.Z,null,Ht.createElement(ue.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},Ht.createElement(un.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(ii||!li)&&Ht.createElement(Rt.default.List,{name:bt,rules:[{validator(Le,re){return li?re!=null&&re.length?(re==null?void 0:re.reduce((Qe,pe)=>Qe+pe.score,0))>parseFloat(Te)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Le,{add:re,remove:nn})=>Ht.createElement(Ht.Fragment,null,Ht.createElement("div",{className:`${ve.Z.title} mb10`},li?"\u5173\u952E\u8BCD":Ht.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),Ht.createElement(be.Z,{align:"middle",className:"font14 mb30"},Ht.createElement(ge.Z,{flex:1},Ht.createElement(ht.default,{value:Go,onChange:Qe=>{io(Qe.target.value)},maxLength:50,allowClear:!0,onPressEnter:Qe=>{var pe,Yt,Ve,en;const Bn=`${(pe=Qe.target)==null?void 0:pe.value}`,qe=(Ve=(Yt=Bn==null?void 0:Bn.split("|"))==null?void 0:Yt.filter(Mn=>!!Mn))==null?void 0:Ve.map(Mn=>Mn==null?void 0:Mn.trim()),xe=Tn.getFieldValue(["sub_item_banks",...bt]),an=((en=xe==null?void 0:xe.map(Mn=>Mn==null?void 0:Mn.keyword))==null?void 0:en.flat())||[];for(const Mn of qe)if(an.includes(Mn)){fe.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yt(Bn)&&(re({keyword:qe,score:1}),io(""))},className:ve.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),Ht.createElement(ge.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Le.map(Qe=>{var pe=Qe,{key:Yt,name:Ve}=pe,en=Tt(pe,["key","name"]);return Ht.createElement(be.Z,{key:Yt,className:"mb20",style:{marginRight:148}},Ht.createElement(ge.Z,{flex:1},Ht.createElement(be.Z,{align:"middle",justify:"space-between"},Ht.createElement(Rt.default.Item,ce(Qt({},en),{name:[Ve,"keyword"]}),Ht.createElement(kt,{onClose:()=>nn(Ve)})),li&&Ht.createElement(Rt.default.Item,ce(Qt({},en),{name:[Ve,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:ve.Z.blankInputNumberWrapper}),Ht.createElement(Kt.Z,{className:ve.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),Ht.createElement("div",{onClick:()=>xo(!0)},Ht.createElement(Rt.default.Item,{name:Yi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ht.createElement(nt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:co}))))};var Mt=Pt(59301),se=Object.defineProperty,$e=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,zn=(jn,Tn,In)=>Tn in jn?se(jn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:In}):jn[Tn]=In,Zn=(jn,Tn)=>{for(var In in Tn||(Tn={}))En.call(Tn,In)&&zn(jn,In,Tn[In]);if(sn)for(var In of sn(Tn))Gn.call(Tn,In)&&zn(jn,In,Tn[In]);return jn},$n=(jn,Tn)=>$e(jn,cn(Tn)),ni=(jn,Tn)=>{var In={};for(var li in jn)En.call(jn,li)&&Tn.indexOf(li)<0&&(In[li]=jn[li]);if(jn!=null&&sn)for(var li of sn(jn))Tn.indexOf(li)<0&&Gn.call(jn,li)&&(In[li]=jn[li]);return In};const{Panel:ei}=he.default,Bi=({questionTitlePlaceholder:jn,choiceKey:Tn,form:In,withScore:li})=>{const[gi,Yi]=(0,Ht.useState)([]),Ci=bt=>{Yi(bt)};return Mt.createElement("div",{className:ve.Z.wrap},Mt.createElement("div",{className:ve.Z.questionTitleEditorWrap},Mt.createElement(Rt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Mt.createElement(nt.h,{scrollId:"name",watch:!0,height:140,placeholder:jn}))),Mt.createElement(Rt.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),Mt.createElement(Rt.default.List,{name:"sub_item_banks",rules:[{validator(bt,_i){return _i?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(bt,{add:_i,remove:Fi,move:co})=>{const xo=In.getFieldValue("sub_item_banks");return Mt.createElement(Mt.Fragment,null,Mt.createElement(he.default,{className:bt.length>0?ve.Z.collapseWrapper:"",bordered:!1,activeKey:gi,onChange:Ci,expandIcon:({isActive:Go})=>Mt.createElement("i",{className:`iconfont icon-weizhankai ${Go?ve.Z.open:ve.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},bt.map((Go,io)=>{var ii=Go,{key:ke,name:Te}=ii,Le=ni(ii,["key","name"]),re,nn,Qe,pe,Yt,Ve,en,Bn,qe,xe;return Mt.createElement(ei,{className:ve.Z.panel,forceRender:!0,header:Mt.createElement("div",{className:ve.Z.panelHeader},"\u7B2C",io+1,"\u5C0F\u9898",Mt.createElement("span",null,"\uFF08",((re=xo==null?void 0:xo[Te])==null?void 0:re.item_type)=="SINGLE"?"\u5355\u9009\u9898":((nn=xo==null?void 0:xo[Te])==null?void 0:nn.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((Qe=xo==null?void 0:xo[Te])==null?void 0:Qe.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((pe=xo==null?void 0:xo[Te])==null?void 0:pe.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Te,extra:Mt.createElement(be.Z,{align:"middle",onClick:an=>an.stopPropagation()},li&&Mt.createElement(ge.Z,null,Mt.createElement(Rt.default.Item,$n(Zn({},Le),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Te,"question_score"],className:ve.Z.blankInputNumberWrapper}),Mt.createElement(Kt.Z,{className:ve.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),Mt.createElement(ge.Z,null,Mt.createElement(be.Z,{align:"middle",className:"pl40",justify:"end"},io!==0&&Mt.createElement("div",{onClick:()=>{var an;co(io,io-1);const Mn=(an=In.getFieldValue("sub_item_banks"))==null?void 0:an.map((Vn,_e)=>(bt.map((Je,hi)=>{_e===hi&&(Vn.q_position=Number(Je.name)+1)}),Vn));In.setFieldValue("sub_item_banks",Mn)}},Mt.createElement(ue.Z,{title:"\u4E0A\u79FB"},Mt.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),io<bt.length-1&&Mt.createElement("div",{onClick:()=>{var an;co(io,io+1);const Mn=(an=In.getFieldValue("sub_item_banks"))==null?void 0:an.map((Vn,_e)=>(bt.map((Je,hi)=>{_e===hi&&(Vn.q_position=Number(Je.name)+1)}),Vn));In.setFieldValue("sub_item_banks",Mn)},className:io===0?"":"ml15"},Mt.createElement(ue.Z,{title:"\u4E0B\u79FB"},Mt.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),Mt.createElement(ge.Z,null,Mt.createElement(ue.Z,{title:"\u5220\u9664"},Mt.createElement(At.Z,{className:`${ve.Z.deleteIcon} ml15`,onClick:()=>Fi(Te)}))))},Mt.createElement(Rt.default.Item,$n(Zn({},Le),{name:Te}),(((Yt=xo==null?void 0:xo[Te])==null?void 0:Yt.item_type)=="SINGLE"||((Ve=xo==null?void 0:xo[Te])==null?void 0:Ve.item_type)=="MULTIPLE")&&Mt.createElement(mt.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((en=xo==null?void 0:xo[Te])==null?void 0:en.item_type)=="MULTIPLE",form:In,choiceKey:[Te,"choices"],titleKey:[Te,"name"],analysisKey:[Te,"analysis"],choiceOptionsPath:["sub_item_banks",Te,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((Bn=xo==null?void 0:xo[Te])==null?void 0:Bn.item_type)=="COMPLETION"&&Mt.createElement(Ue,{form:In,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:Te,titleKey:[Te,"name"],analysisKey:[Te,"analysis"],isOrdered:[Te,"is_ordered"],answerKey:[Te,"standard_answers"]}),((qe=xo==null?void 0:xo[Te])==null?void 0:qe.item_type)=="JUDGMENT"&&Mt.createElement(We,{form:In,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Te,"name"],analysisKey:[Te,"analysis"],choiceKey:[Te,"choices"]}),((xe=xo==null?void 0:xo[Te])==null?void 0:xe.item_type)=="SUBJECTIVE"&&Mt.createElement(zt,{showKeywords:!0,isMustKeyWords:!1,form:In,titleKey:[Te,"name"],analysisKey:[Te,"analysis"],answerTexts:[Te,"answer_texts"],useKeywords:[Te,"use_keywords"],keywords:[Te,"keywords"],indexs:Te,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),bt.length<20&&Mt.createElement(de.Z,{menu:{items:[{label:Mt.createElement("div",{onClick:()=>{_i({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),Yi([bt==null?void 0:bt.length,...gi])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:Mt.createElement("div",{onClick:()=>{_i({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),Yi([bt==null?void 0:bt.length,...gi])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:Mt.createElement("div",{onClick:()=>{_i({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),Yi([bt==null?void 0:bt.length,...gi])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:Mt.createElement("div",{onClick:()=>{_i({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),Yi([bt==null?void 0:bt.length,...gi])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:Mt.createElement("div",{onClick:()=>{_i({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),Yi([bt==null?void 0:bt.length,...gi])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(Go=>Go.show).map(Go=>({label:Go.label,key:Go.key}))}},Mt.createElement("div",{className:`${ve.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var Ki=Pt(35890)},25711:function(xn,vn,Pt){"use strict";Pt.d(vn,{z:function(){return Ot},Z:function(){return _t}});var mt=Pt(59301),It=Pt(1751),Zt=Pt(31087),we=Pt(64018),Ht=Pt(37312),he=Pt(10148),Rt=Pt(58130),be=Pt(15342),ge=Pt(1012),Kt=Pt(79646),ue=Pt(59301),ve=({html:te})=>{const Xt=(0,mt.useRef)(null),Me=(0,mt.useRef)(null),qt=`.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,mt.useEffect)(()=>{const Ne=Xt.current.attachShadow({mode:"open"});Me.current=document.createElement("div"),Me.current.className="markdown-body",Me.current.innerHTML=te,Ne.appendChild(Me.current);const ne=document.createElement("style");return ne.textContent=qt,Ne.appendChild(ne),()=>{Ne.innerHTML=""}},[]),(0,mt.useEffect)(()=>{Me.current&&(Me.current.innerHTML=te)},[te]),ue.createElement("div",{ref:Xt})},At=Object.defineProperty,nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,at=(te,Xt,Me)=>Xt in te?At(te,Xt,{enumerable:!0,configurable:!0,writable:!0,value:Me}):te[Xt]=Me,ft=(te,Xt)=>{for(var Me in Xt||(Xt={}))et.call(Xt,Me)&&at(te,Me,Xt[Me]);if(nt)for(var Me of nt(Xt))ht.call(Xt,Me)&&at(te,Me,Xt[Me]);return te};const vt="@\u2581\u2581@",Ct="@\u2581@",Bt=/<pre[^>]*>/g;function Ft(te){let Xt=document.createElement("div");return Xt.innerHTML=te,Xt.childNodes.length===0?"":Xt.childNodes[0].nodeValue}const Ot=(te,Xt)=>{te=te||"";const Me=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,qt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ne=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ne=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Xt?te.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Me,(Ce,Ue,Ze,tn,ln,ie,Gt)=>{const Ae=Ue||tn||ie,Sn=Ze||ln||Gt||"?";return he.Z.API_SERVER+"/api/attachments/"+Ae+Sn+"&t="+(0,Rt.Jn)(Ae,Date.now())+(Ce.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(te=te.replace(ne,(Ce,Ue,Ze,tn,ln,ie,Gt)=>{const Ae=Ue||tn||ie,Sn=Ze||ln||Gt||"?";return he.Z.API_SERVER+"/attachments/download/"+Ae+Sn+"&t="+(0,Rt.Jn)(Ae,Date.now())+(Ce.indexOf(")")>-1?")":"&")}).replace(Me,(Ce,Ue,Ze,tn,ln,ie,Gt)=>{const Ae=Ue||tn||ie,Sn=Ze||ln||Gt||"?";return he.Z.API_SERVER+"/api/attachments/"+Ae+Sn+"&t="+(0,Rt.Jn)(Ae,Date.now())+(Ce.indexOf(")")>-1?")":"&")}).replace(qt,(Ce,Ue,Ze,tn,ln)=>{const ie=Ue||tn,Gt=Ze||ln||"";return'"'+he.Z.API_SERVER+"/api/attachments/"+ie+Gt+ie+Gt+"&t="+(0,Rt.Jn)(ie,Date.now())}).replace(Ne,(Ce,Ue,Ze,tn,ln)=>{const ie=Ue||tn,Gt=Ze||ln||"";return"("+he.Z.API_SERVER+"/files/uploads/"+ie+Gt+ie+Gt+"&t="+(0,Rt.Jn)(ie,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,`
`),te)};var _t=({value:te="",className:Xt,showTextOnly:Me,showLines:qt,style:Ne={},stylesPrev:ne={},highlightKeywords:Ce,showProgramFill:Ue,isProgramFill:Ze,disabledFill:tn=!1,programFillValue:ln,onFillChange:ie=Sn=>{},onFillBlur:Gt=()=>{},onFillFocus:Ae=()=>{}})=>{let Sn=String(te);const[gn,Fe]=(0,mt.useState)(""),[Ke,rn]=(0,mt.useState)("office"),[Fn,Pn]=(0,mt.useState)([]),We=(0,mt.useRef)("a"+(0,ge.Z)()),fe={},An=(Tt,xt,yt)=>{const kt=document.createElement(Tt===Ct?"input":"textarea");kt.style.width="100%",kt.style.height=Tt===Ct?"40px":"151px",kt.rows=5,kt.spellcheck=!1,kt.name="edu-program-fill",kt.placeholder="\u8BF7\u8F93\u5165",kt.dataset.id=xt;const zt=Object.keys(fe).length;return fe[zt]=kt,`<span class="edu-program-fill-wrap ${Tt===Ct?"":"show"}" style="width:${Tt===Ct?"400px":"100%"}" title=${yt||""}><span>${kt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Hn(Tt){return Tt=Tt.replace(/!\[.*?\]\(.*?\)/g,""),Tt=Tt.replace(/\[.*?\]\(.*?\)/g,""),Tt=Tt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Tt=Tt.replace(/<embed.*?>/g,""),Tt=Tt.replace(/<img.*?>/g,""),Tt=Tt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Tt=Tt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Tt=Tt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Tt=Tt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Tt}const un=Tt=>Tt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(xt,yt){let kt=yt.replace(/(\n|\r)/g,"").split("}"),zt=[];return kt.map(Mt=>{Mt!=""&&zt.push(`.${We.current} ${Mt}`)}),`<style>${zt.join("}")}</style>`}),De=(0,mt.useMemo)(()=>{try{const kt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,zt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Mt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,se=/\(\/attachments\/download\//g;Sn=Sn.replace(se,"("+he.Z.API_SERVER+"/attachments/download/").replace(kt,"("+he.Z.API_SERVER+"/api/attachments/").replace(zt,'"'+he.Z.API_SERVER+"/api/attachments/").replace(Mt,'"'+he.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(kt){}if(Ue){let kt=-1;return Sn=Sn.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(zt,Mt,se){var $e;return++kt,An(zt,kt,($e=ln==null?void 0:ln[kt])==null?void 0:$e.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${un(Sn||"")}</pre>`}let Tt=un(Sn);Tt=(0,Zt.ZP)(Tt);const xt=(0,Zt.ez)();Sn.match(/\[TOC\]/)&&(Tt=Tt.replace("<p>[TOC]</p>",(0,Zt.Qv)()),(0,Zt.Iy)()),Tt=Tt.replace(/(__special_katext_id_\d+__)/g,(kt,zt)=>{const{type:Mt,expression:se}=xt[zt];return(0,be.renderToString)(Ft(se)||"",{displayMode:Mt==="block",throwOnError:!1,output:"html"})}),Tt=Tt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Zt.AL)();const yt=document.createElement("div");if(yt.innerHTML=Tt,Me)return yt.innerText;if(Ce){const kt=Ce.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ye(yt,kt),yt.innerHTML}return setTimeout(()=>Qt(),500),yt.innerHTML},[Sn,Ce]);(0,mt.useEffect)(()=>{Re.current&&Re.current.querySelectorAll(["input","textarea"]).forEach(xt=>{xt.oninput=He,xt.onblur=Ee,xt.onfocus=Jt})},[Fn]),(0,mt.useEffect)(()=>{var Tt,xt,yt,kt,zt;if(ln!=null&&ln.length)try{const Mt=Re.current.querySelectorAll(".edu-program-fill-score"),se=Re.current.querySelectorAll('[name="edu-program-fill"]');for(const[$e,cn]of se.entries())cn.value=((Tt=ln==null?void 0:ln[$e])==null?void 0:Tt.value)||"",((xt=ln==null?void 0:ln[$e])==null?void 0:xt.type)==="warning"?cn.className="program-fill-warning":((yt=ln==null?void 0:ln[$e])==null?void 0:yt.type)==="success"?cn.className="program-fill-success":cn.className="";for(const[$e,cn]of Mt.entries())cn.innerHTML=(kt=ln==null?void 0:ln[$e])!=null&&kt.score?`${(zt=ln==null?void 0:ln[$e])==null?void 0:zt.score}\u5206`:"";Pn(ln)}catch(Mt){console.log(Mt,"error")}},[ln]);const He=Tt=>{Fn[Tt.target.dataset.id]=Fn[Tt.target.dataset.id]||{},Fn[Tt.target.dataset.id].value=Tt.target.value,Pn([...Fn]),ie(Fn,Tt.target.dataset.id)},Ee=Tt=>{Fn[Tt.target.dataset.id]=Fn[Tt.target.dataset.id]||{},Fn[Tt.target.dataset.id].value=Tt.target.value,Pn([...Fn]),Gt(Fn,Tt.target.dataset.id)},Jt=Tt=>{Fn[Tt.target.dataset.id]=Fn[Tt.target.dataset.id]||{},Fn[Tt.target.dataset.id].value=Tt.target.value,Pn([...Fn]),Ae(Fn,Tt.target.dataset.id)};function ye(Tt,xt){return Tt.childNodes.forEach(yt=>{var kt;if(yt.childNodes.length>0)ye(yt,xt);else if(yt.nodeName!=="IMG")if(yt.innerHTML)yt.innerHTML=(kt=yt.innerHTML)==null?void 0:kt.replace(new RegExp(xt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const zt=document.createElement("span");zt.innerHTML=yt.textContent.replace(new RegExp(xt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),yt.replaceWith(zt)}})}const Re=(0,mt.useRef)();Zt.jb.WebkitLineClamp=qt,qt&&(Ne=ft(ft({},Ne),Zt.jb));function Be(Tt){let xt=Tt.target;if(xt.tagName.toUpperCase()==="A"){let yt=xt.getAttribute("href");if(yt.indexOf("office")>-1)Tt.preventDefault(),Fe(yt),rn("office");else if(yt.indexOf("application/pdf")>-1)Tt.preventDefault(),Fe(yt),rn("pdf");else if(yt.indexOf("text/html")>-1)Tt.preventDefault(),Fe(yt),rn("html");else if(yt.startsWith("#")){Tt.preventDefault();let kt=document.getElementById(yt.replace("#",""));kt&&kt.scrollIntoView(!0)}}}const Qt=()=>{var Tt;const xt=(Tt=Re.current)==null?void 0:Tt.querySelectorAll("video");xt==null||xt.forEach(yt=>{if(yt.oncontextmenu=()=>!1,yt.src.indexOf(".m3u8")>-1&&!yt.canPlayType("application/vnd.apple.mpegurl")){if(Ht.ZP.isSupported()){var kt=new Ht.ZP;kt.loadSource(yt.src),kt.attachMedia(yt)}}})};(0,mt.useEffect)(()=>{if(Re.current&&De&&De.match(Bt)&&window.PR.prettyPrint(),Re.current)return Re.current.addEventListener("click",Be),()=>{var Tt;(Tt=Re.current)==null||Tt.removeEventListener("click",Be),(0,Zt.AL)(),(0,Zt.Iy)()}},[De,Re.current,Be]),(0,mt.useEffect)(()=>{var Tt;const xt=yt=>{yt.preventDefault(),yt.clipboardData.setData("text",window.getSelection().toString())};return(Tt=Re.current)==null||Tt.addEventListener("copy",xt),()=>{var yt;(yt=Re.current)==null||yt.removeEventListener("copy",xt)}},[Re.current]);const ce=Tt=>/<style[\s\S]*?>/i.test(Tt||"");return mt.createElement(mt.Fragment,null,Me&&mt.createElement("div",{ref:Re},De),!Me&&!ce(De)&&mt.createElement("div",{ref:Re,style:ft({},Ne),className:`${Xt||""} ${tn?"disabled-fill":""} markdown-body ${We.current}`,dangerouslySetInnerHTML:{__html:De}}),!Me&&ce(De)&&mt.createElement(ve,{html:De}),mt.createElement(Kt.Z,{close:!0,data:gn,type:gn!=null&&gn.length?Ke:"",style:ft({},ne),onClose:()=>Fe("")}))}},48498:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return he}});var mt=Pt(59301),It={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},Zt=Pt(92310),we=Pt.n(Zt),he=({className:Rt,style:be,state:ge,onClick:Kt})=>{var ue,de;return mt.createElement("div",{onClick:Kt,className:we()(ge?(ue=It)==null?void 0:ue.redBtn:(de=It)==null?void 0:de.btn,Rt),style:be},ge?mt.createElement(mt.Fragment,null,mt.createElement("i",{className:"iconfont icon-biaoji1"}),mt.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):mt.createElement(mt.Fragment,null,mt.createElement("i",{className:"iconfont icon-biaojigaiti"}),mt.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},36866:function(xn,vn,Pt){"use strict";Pt.d(vn,{h:function(){return Ct},Z:function(){return vt}});var mt=Pt(59301),It=Pt(57809),Zt=Pt(78241),we=Pt(3113),Ht=Pt(89780),he=Pt.n(Ht),Rt=Pt(79906),be=Object.defineProperty,ge=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,At=(Bt,Ft,Ot)=>Ft in Bt?be(Bt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):Bt[Ft]=Ot,nt=(Bt,Ft)=>{for(var Ot in Ft||(Ft={}))de.call(Ft,Ot)&&At(Bt,Ot,Ft[Ot]);if(ue)for(var Ot of ue(Ft))ve.call(Ft,Ot)&&At(Bt,Ot,Ft[Ot]);return Bt},et=(Bt,Ft)=>ge(Bt,Kt(Ft));const ht=It.default.Option,at={labelCol:{span:4},wrapperCol:{span:20}},ft={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 vt=({callback:Bt,onCancel:Ft})=>{const[Ot,_t]=(0,mt.useState)("python");function te(Me){_t(ft[Me][1])}function Xt(Me){Bt(Me)}return mt.createElement(Zt.default,et(nt({},at),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Xt,style:{width:500}}),mt.createElement(Zt.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},mt.createElement(It.default,{getPopupContainer:Me=>Me.parentNode,onChange:te},Object.keys(ft).map(Me=>mt.createElement(ht,{key:Me,value:Me},ft[Me][0])))),mt.createElement(Zt.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},mt.createElement(Ct,{mode:Ot})),mt.createElement("div",{className:"flex-container flex-end"},mt.createElement(we.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),mt.createElement(we.ZP,{type:"ghost",onClick:Ft},"\u53D6\u6D88")))};function Ct({value:Bt,onChange:Ft,mode:Ot,options:_t={}}){const te=(0,mt.useRef)(),[Xt,Me]=(0,mt.useState)();return(0,mt.useEffect)(()=>{if(Xt){let qt=function(Ne){const ne=Ne.getValue();Ft&&Ft(ne)};return Xt.on("change",qt),()=>{Xt.off("change",qt)}}},[Xt,Ft]),(0,mt.useEffect)(()=>{Xt&&Xt.setOption("mode",Ot)},[Xt,Ot]),(0,mt.useEffect)(()=>{Xt&&(Bt!==Xt.getValue()||Bt==="")&&setTimeout(()=>{Xt.setValue(Bt||"")},300)},[Xt,Bt]),(0,mt.useEffect)(()=>{if(te.current&&!Xt){const qt=he().fromTextArea(te.current,nt({mode:Ot,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_t));Me(qt)}},[te.current,Xt]),mt.createElement("div",{className:"my-codemirror-container"},mt.createElement("textarea",{ref:te}))}},23469:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return ii}});var mt=Pt(59301),It=Pt(89780),Zt=Pt.n(It),we=Pt(76374),Ht=Pt(79906),he=Pt(6313),Rt=Pt(25717),be=Pt(99498),ge=Pt(25419),Kt=Pt(67549),ue=Pt(25711),de=({value:ke="",className:Te,showTextOnly:Le,showLines:re,style:nn={}})=>{const Qe=(0,mt.useMemo)(()=>"",[ke]);return mt.createElement(mt.Fragment,null,mt.createElement("div",{dangerouslySetInnerHTML:{__html:Qe}}))},ve=Pt(59301),At=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,vt=(ke,Te,Le)=>Te in ke?At(ke,Te,{enumerable:!0,configurable:!0,writable:!0,value:Le}):ke[Te]=Le,Ct=(ke,Te)=>{for(var Le in Te||(Te={}))at.call(Te,Le)&&vt(ke,Le,Te[Le]);if(ht)for(var Le of ht(Te))ft.call(Te,Le)&&vt(ke,Le,Te[Le]);return ke},Bt=(ke,Te)=>nt(ke,et(Te));let Ft=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ot({onActionCallback:ke,title:Te,icon:Le,actionName:re,className:nn="",children:Qe}){function pe(){ke(re)}return ve.createElement("a",{title:Te,className:nn,onClick:pe},ve.createElement("i",{className:`${Le}`}),Qe)}var _t=({watch:ke,showNullButton:Te,showNullProgramButton:Le,onActionCallback:re,fullScreen:nn,insertTemp:Qe,hidetoolBar:pe,extraUse:Yt})=>{const Ve=[...Ft,{title:`${ke?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${ke?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ve.createElement("ul",{className:"markdown-toolbar-container"},!pe&&Ve.map((en,Bn)=>ve.createElement("li",{key:Bn},en.actionName?ve.createElement(Ot,Bt(Ct({},en),{onActionCallback:re})):ve.createElement("span",{className:"v-line"}))),Te?ve.createElement("li",null,ve.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:re},ve.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Le?ve.createElement(ve.Fragment,null,ve.createElement("li",null,ve.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:re},ve.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),ve.createElement("li",null,ve.createElement(Ot,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:re},ve.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Qe&&ve.createElement("li",null,ve.createElement(Ot,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Qe}`,onActionCallback:re},ve.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Yt&&ve.createElement("li",null,Yt),ve.createElement("li",{className:"btn-full-screen"},ve.createElement(Ot,{icon:`${nn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:nn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:re})))},te=Pt(50474),Xt=Pt(78241),Me=Pt(92832),qt=Pt(3113),Ne=Object.defineProperty,ne=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,ln=(ke,Te,Le)=>Te in ke?Ne(ke,Te,{enumerable:!0,configurable:!0,writable:!0,value:Le}):ke[Te]=Le,ie=(ke,Te)=>{for(var Le in Te||(Te={}))Ze.call(Te,Le)&&ln(ke,Le,Te[Le]);if(Ue)for(var Le of Ue(Te))tn.call(Te,Le)&&ln(ke,Le,Te[Le]);return ke},Gt=(ke,Te)=>ne(ke,Ce(Te));const Ae={labelCol:{span:4},wrapperCol:{span:20}};var Sn=({callback:ke,onCancel:Te})=>{function Le(re){ke(re)}return mt.createElement(Xt.default,Gt(ie({},Ae),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Le,style:{width:500}}),mt.createElement(Xt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},mt.createElement(Me.default,null)),mt.createElement(Xt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},mt.createElement(Me.default,null)),mt.createElement("div",{className:"flex-container flex-end"},mt.createElement(qt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),mt.createElement(qt.ZP,{type:"ghost",onClick:Te},"\u53D6\u6D88")))},gn=Pt(36866),Fe=Pt(56701),Ke=Pt(43418),rn=Pt(95237),Fn=Pt(65983),Pn=Pt(59301),We=({callback:ke,onCancel:Te})=>{const Le=document.createElement("canvas"),re=Le.getContext("2d");Le.width=1e3,Le.height=800,re.fillStyle="#ffffff",re.fillRect(0,0,Le.width,Le.height);const nn=Le.toDataURL("image/png");return Pn.createElement(Ke.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Pn.createElement(rn.Z,{style:{height:"100vh"}},Pn.createElement(Fn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:nn,visible:!0,title:String(Date.now())},onOk:Qe=>{ke({src:Qe.url})},onClose:Te})))},fe=Pt(12378);function An(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(An,go.CommandHandler),An.prototype.canAlignSelection=function(){var ke=this.diagram;return!(ke===null||ke.isReadOnly||ke.isModelReadOnly||ke.selection.count<2)},An.prototype.alignLeft=function(){var ke=this.diagram;ke.startTransaction("aligning left");var Te=1/0;ke.selection.each(function(Le){Le instanceof go.Link||(Te=Math.min(Le.position.x,Te))}),ke.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Te,Le.position.y))}),ke.commitTransaction("aligning left")},An.prototype.alignRight=function(){var ke=this.diagram;ke.startTransaction("aligning right");var Te=-1/0;ke.selection.each(function(Le){if(!(Le instanceof go.Link)){var re=Le.actualBounds.x+Le.actualBounds.width;Te=Math.max(re,Te)}}),ke.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Te-Le.actualBounds.width,Le.position.y))}),ke.commitTransaction("aligning right")},An.prototype.alignTop=function(){var ke=this.diagram;ke.startTransaction("alignTop");var Te=1/0;ke.selection.each(function(Le){Le instanceof go.Link||(Te=Math.min(Le.position.y,Te))}),ke.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Le.position.x,Te))}),ke.commitTransaction("alignTop")},An.prototype.alignBottom=function(){var ke=this.diagram;ke.startTransaction("aligning bottom");var Te=-1/0;ke.selection.each(function(Le){if(!(Le instanceof go.Link)){var re=Le.actualBounds.y+Le.actualBounds.height;Te=Math.max(re,Te)}}),ke.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Le.actualBounds.x,Te-Le.actualBounds.height))}),ke.commitTransaction("aligning bottom")},An.prototype.alignCenterX=function(){var ke=this.diagram,Te=ke.selection.first();if(Te){ke.startTransaction("aligning Center X");var Le=Te.actualBounds.x+Te.actualBounds.width/2;ke.selection.each(function(re){re instanceof go.Link||re.move(new go.Point(Le-re.actualBounds.width/2,re.actualBounds.y))}),ke.commitTransaction("aligning Center X")}},An.prototype.alignCenterY=function(){var ke=this.diagram,Te=ke.selection.first();if(Te){ke.startTransaction("aligning Center Y");var Le=Te.actualBounds.y+Te.actualBounds.height/2;ke.selection.each(function(re){re instanceof go.Link||re.move(new go.Point(re.actualBounds.x,Le-re.actualBounds.height/2))}),ke.commitTransaction("aligning Center Y")}},An.prototype.alignColumn=function(ke){var Te=this.diagram;Te.startTransaction("align Column"),ke===void 0&&(ke=0),ke=parseFloat(ke);var Le=new Array;Te.selection.each(function(Yt){Yt instanceof go.Link||Le.push(Yt)});for(var re=0;re<Le.length-1;re++){var nn=Le[re],Qe=nn.actualBounds.y+nn.actualBounds.height+ke,pe=Le[re+1];pe.move(new go.Point(nn.actualBounds.x,Qe))}Te.commitTransaction("align Column")},An.prototype.alignRow=function(ke){ke===void 0&&(ke=0),ke=parseFloat(ke);var Te=this.diagram;Te.startTransaction("align Row");var Le=new Array;Te.selection.each(function(Yt){Yt instanceof go.Link||Le.push(Yt)});for(var re=0;re<Le.length-1;re++){var nn=Le[re],Qe=nn.actualBounds.x+nn.actualBounds.width+ke,pe=Le[re+1];pe.move(new go.Point(Qe,nn.actualBounds.y))}Te.commitTransaction("align Row")},An.prototype.canRotate=function(ke){var Te=this.diagram;return!(Te===null||Te.isReadOnly||Te.isModelReadOnly||Te.selection.count<1)},An.prototype.rotate=function(ke){ke===void 0&&(ke=90);var Te=this.diagram;Te.startTransaction("rotate "+ke.toString());var Te=this.diagram;Te.selection.each(function(Le){Le instanceof go.Link||Le instanceof go.Group||(Le.angle+=ke)}),Te.commitTransaction("rotate "+ke.toString())},An.prototype.pullToFront=function(){var ke=this.diagram;ke.startTransaction("pullToFront");var Te=new go.Map;ke.selection.each(function(Le){Te.set(Le.layer,0)}),Te.iteratorKeys.each(function(Le){var re=0;Le.parts.each(function(nn){if(!nn.isSelected){var Qe=nn.zOrder;isNaN(Qe)?nn.zOrder=0:re=Math.max(re,Qe)}}),Te.set(Le,re)}),ke.selection.each(function(Le){An._assignZOrder(Le,Te.get(Le.layer)+1)}),ke.commitTransaction("pullToFront")},An.prototype.pushToBack=function(){var ke=this.diagram;ke.startTransaction("pushToBack");var Te=new go.Map;ke.selection.each(function(Le){Te.set(Le.layer,0)}),Te.iteratorKeys.each(function(Le){var re=0;Le.parts.each(function(nn){if(!nn.isSelected){var Qe=nn.zOrder;isNaN(Qe)?nn.zOrder=0:re=Math.min(re,Qe)}}),Te.set(Le,re)}),ke.selection.each(function(Le){An._assignZOrder(Le,Te.get(Le.layer)-1-An._findGroupDepth(Le))}),ke.commitTransaction("pushToBack")},An._assignZOrder=function(ke,Te,Le){Le===void 0&&(Le=ke),ke.layer===Le.layer&&(ke.zOrder=Te),ke instanceof go.Group&&ke.memberParts.each(function(re){An._assignZOrder(re,Te+1,Le)})},An._findGroupDepth=function(ke){if(ke instanceof go.Group){var Te=0;return ke.memberParts.each(function(Le){Te=Math.max(Te,An._findGroupDepth(Le))}),Te+1}else return 0},An.prototype.doKeyDown=function(){var ke=this.diagram;if(ke!==null){var Te=ke.lastInput;if(Te.key==="Up"||Te.key==="Down"||Te.key==="Left"||Te.key==="Right"){var Le=this.arrowKeyBehavior;if(Le==="none")return;if(Le==="select"){this._arrowKeySelect();return}else if(Le==="move"){this._arrowKeyMove();return}else if(Le==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},An.prototype._getAllParts=function(){var ke=new Array;return this.diagram.nodes.each(function(Te){ke.push(Te)}),this.diagram.parts.each(function(Te){ke.push(Te)}),ke},An.prototype._arrowKeyMove=function(){var ke=this.diagram,Te=ke.lastInput,Le=0,re=0;if(Te.control||Te.meta)Le=1,re=1;else if(ke.grid!==null){var nn=ke.grid.gridCellSize;re=nn.width,Le=nn.height}ke.startTransaction("arrowKeyMove"),ke.selection.each(function(Qe){Te.key==="Up"?Qe.move(new go.Point(Qe.actualBounds.x,Qe.actualBounds.y-Le)):Te.key==="Down"?Qe.move(new go.Point(Qe.actualBounds.x,Qe.actualBounds.y+Le)):Te.key==="Left"?Qe.move(new go.Point(Qe.actualBounds.x-re,Qe.actualBounds.y)):Te.key==="Right"&&Qe.move(new go.Point(Qe.actualBounds.x+re,Qe.actualBounds.y))}),ke.commitTransaction("arrowKeyMove")},An.prototype._arrowKeySelect=function(){var ke=this.diagram,Te=ke.lastInput,Le=null;Te.key==="Up"?Le=this._findNearestPartTowards(270):Te.key==="Down"?Le=this._findNearestPartTowards(90):Te.key==="Left"?Le=this._findNearestPartTowards(180):Te.key==="Right"&&(Le=this._findNearestPartTowards(0)),Le!==null&&(Te.shift?Le.isSelected=!0:Te.control||Te.meta?Le.isSelected=!Le.isSelected:ke.select(Le))},An.prototype._findNearestPartTowards=function(ke){var Te=this.diagram.selection.first();if(Te===null)return null;for(var Le=Te.actualBounds.center,re=this._getAllParts(),nn=1/0,Qe=Te,pe=0;pe<re.length;pe++){var Yt=re[pe];if(Yt!==Te&&Yt.canSelect()){var Ve=Yt.actualBounds.center,en=Le.directionPoint(Ve),Bn=this._angleCloseness(en,ke);if(Bn<=45){var qe=Le.distanceSquaredPoint(Ve);qe*=1+Math.sin(Bn*Math.PI/180),qe<nn&&(nn=qe,Qe=Yt)}}}return Qe},An.prototype._angleCloseness=function(ke,Te){return Math.min(Math.abs(Te-ke),Math.min(Math.abs(Te+360-ke),Math.abs(Te-360-ke)))},An.prototype._arrowKeyTree=function(){var ke=this.diagram,Te=ke.selection.first();if(Te instanceof go.Node){var Le=ke.lastInput;if(Le.key==="Right"){if(!Te.isTreeLeaf)if(!Te.isTreeExpanded)ke.commandHandler.canExpandTree(Te)&&ke.commandHandler.expandTree(Te);else{var re=this._sortTreeChildrenByY(Te).first();re!==null&&ke.select(re)}}else if(Le.key==="Left")if(!Te.isTreeLeaf&&Te.isTreeExpanded)ke.commandHandler.canCollapseTree(Te)&&ke.commandHandler.collapseTree(Te);else{var nn=Te.findTreeParentNode();nn!==null&&ke.select(nn)}else if(Le.key==="Up"){var nn=Te.findTreeParentNode();if(nn!==null){var Qe=this._sortTreeChildrenByY(nn),pe=Qe.indexOf(Te);if(pe>0){for(var Yt=Qe.elt(pe-1);Yt!==null&&Yt.isTreeExpanded&&!Yt.isTreeLeaf;){var Ve=this._sortTreeChildrenByY(Yt);Yt=Ve.last()}Yt!==null&&ke.select(Yt)}else ke.select(nn)}}else if(Le.key==="Down")if(Te.isTreeExpanded&&!Te.isTreeLeaf){var re=this._sortTreeChildrenByY(Te).first();re!==null&&ke.select(re)}else for(;Te!==null;){var nn=Te.findTreeParentNode();if(nn===null)break;var Qe=this._sortTreeChildrenByY(nn),pe=Qe.indexOf(Te);if(pe<Qe.length-1){ke.select(Qe.elt(pe+1));break}else Te=nn}var en=ke.selection.first();en!==null&&ke.scrollToRect(en.actualBounds)}},An.prototype._sortTreeChildrenByY=function(ke){var Te=new go.List().addAll(ke.findTreeChildrenNodes());return Te.sort(function(Le,re){var nn=Le.location,Qe=re.location;return nn.y<Qe.y?-1:nn.y>Qe.y?1:nn.x<Qe.x?-1:nn.x>Qe.x?1:0}),Te},An.prototype.copyToClipboard=function(ke){go.CommandHandler.prototype.copyToClipboard.call(this,ke),this._lastPasteOffset.set(this.pasteOffset)},An.prototype.pasteFromClipboard=function(){var ke=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(ke,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),ke},Object.defineProperty(An.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(ke){if(ke!=="move"&&ke!=="select"&&ke!=="scroll"&&ke!=="tree"&&ke!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+ke);this._arrowKeyBehavior=ke}}),Object.defineProperty(An.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(ke){if(!(ke instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+ke);this._pasteOffset.set(ke)}});var Hn=An,un=Pt(37404),De=Pt(43604),He=Pt(70635),Ee={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Jt=Pt(59301),ye=(ke,Te,Le)=>new Promise((re,nn)=>{var Qe=Ve=>{try{Yt(Le.next(Ve))}catch(en){nn(en)}},pe=Ve=>{try{Yt(Le.throw(Ve))}catch(en){nn(en)}},Yt=Ve=>Ve.done?re(Ve.value):Promise.resolve(Ve.value).then(Qe,pe);Yt((Le=Le.apply(ke,Te)).next())});function Re({onCancel:ke,callback:Te}){let Le=(0,mt.useRef)(),re=(0,mt.useRef)(),nn=(0,mt.useRef)(),Qe=(0,mt.useRef)(!1);const pe=(0,mt.useRef)(!1),[Yt,Ve]=(0,mt.useState)(0);function en(){const qe=fe.bx.make,xe={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"};Le.current=new fe.S0(re.current,{padding:20,grid:qe(fe.s_,"Grid",qe(fe.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),qe(fe.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Oe=>{var Wn=Oe.diagram.commandHandler.addTopLevelParts(Oe.diagram.selection,!0);Wn||Oe.diagram.currentTool.doCancel()},commandHandler:qe(Hn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Oe=>{var Wn=Oe.subject;Wn.location=Wn.location.copy().snapToGridPoint(Oe.diagram.grid.gridOrigin,Oe.diagram.grid.gridCellSize),setTimeout(()=>{Oe.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Oe=>{var Wn=Oe.subject;setTimeout(()=>{Oe.diagram.commandHandler.editTextBlock()})},LinkRelinked:Oe=>{var Wn=Oe.parameter.part;Wn.invalidateConnectedLinks();var yi=Oe.subject;Oe.diagram.toolManager.linkingTool.isForwards?yi.toNode.invalidateConnectedLinks():yi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Le.current.nodeTemplate=qe(fe.NB,"Auto",{locationSpot:fe.z6.Center,locationObjectName:"SHAPE",desiredSize:new fe.$u(120,60),minSize:new fe.$u(40,40),resizable:!0,resizeCellSize:new fe.$u(10,10),rotatable:!0},new fe.KX("location","loc",fe.E9.parse).makeTwoWay(fe.E9.stringify),new fe.KX("desiredSize","size",fe.$u.parse).makeTwoWay(fe.$u.stringify),qe(fe.bn,{name:"SHAPE",fill:xe.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:fe.z6.AllSides,toSpot:fe.z6.AllSides},new fe.KX("figure"),new fe.KX("fill"),new fe.KX("stroke","borderColor"),new fe.KX("strokeWidth","thickness"),new fe.KX("strokeDashArray","dash")),qe(fe.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),qe(fe.al,{margin:1,textAlign:"center",overflow:fe.al.OverflowEllipsis,editable:!0},new fe.KX("text").makeTwoWay(),new fe.KX("stroke","color"))),Le.current.nodeTemplate.toolTip=qe("ToolTip",qe(fe.s_,"Vertical",{maxSize:new fe.$u(200,NaN)},qe(fe.al,{font:"bold 10pt sans-serif",textAlign:"center"},new fe.KX("text")),qe(fe.al,{font:"10pt sans-serif",textAlign:"center"},new fe.KX("text","details"))));function an(Oe,Wn){var yi=(di,no)=>{di.handled=!0,di.diagram.model.commit(ji=>{var fo=no.part.adornedPart,Hi=new fe.E9().setRectSpot(fo.actualBounds,Oe);Hi.subtract(fo.location),Hi.scale(2,2),Hi.x+=Math.sign(Hi.x)*130,Hi.y+=Math.sign(Hi.y)*130,Hi.add(fo.location),Hi.snapToGridPoint(di.diagram.grid.gridOrigin,di.diagram.grid.gridCellSize);var Ti=ji.copyNodeData(fo.data);ji.setGroupKeyForNodeData(Ti,ji.getGroupKeyForNodeData(fo.data)),ji.addNodeData(Ti);var Po={from:fo.key,to:ji.getKeyForNodeData(Ti)};ji.addLinkData(Po);var pn=di.diagram.findNodeForData(Ti);pn.location=Hi,di.diagram.select(pn),setTimeout(()=>{di.diagram.commandHandler.editTextBlock()},20)})};return qe(fe.bn,{figure:Wn,alignment:Oe,alignmentFocus:Oe.opposite(),width:Oe.equals(fe.z6.Top)||Oe.equals(fe.z6.Bottom)?25:18,height:Oe.equals(fe.z6.Top)||Oe.equals(fe.z6.Bottom)?18:25,fill:"orange",stroke:xe.white,strokeWidth:4,mouseEnter:(di,no)=>no.fill="dodgerblue",mouseLeave:(di,no)=>no.fill="orange",isActionable:!0,click:yi,contextClick:yi})}function Mn(Oe){return qe(fe.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(Wn,yi)=>yi.fill="dodgerblue",mouseLeave:(Wn,yi)=>yi.fill="orange",click:(Wn,yi)=>{Wn.diagram.commandHandler.showContextMenu(yi.part.adornedPart)}},Oe||{})}Le.current.nodeTemplate.selectionAdornmentTemplate=qe(fe.uz,"Spot",qe(fe.Vm,{padding:10}),an(fe.z6.Top,"TriangleUp"),an(fe.z6.Left,"TriangleLeft"),an(fe.z6.Right,"TriangleRight"),an(fe.z6.Bottom,"TriangleDown"),Mn({alignment:new fe.z6(.75,0)}));function Vn(Oe,Wn){return(yi,di)=>{yi.handled=!0,yi.diagram.model.commit(no=>{no.set(di.part.adornedPart.data,Oe,Wn)})}}function _e(Oe,Wn){return Wn||(Wn="color"),qe(fe.bn,{width:16,height:16,stroke:"lightgray",fill:Oe,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.stroke="dodgerblue",mouseLeave:(yi,di)=>di.stroke="lightgray",click:Vn(Wn,Oe),contextClick:Vn(Wn,Oe)})}function Je(){return[qe("ContextMenuButton",qe(fe.s_,"Horizontal",_e(xe.white,"fill"),_e(xe.beige,"fill"),_e(xe.extralightblue,"fill"),_e(xe.extralightred,"fill"))),qe("ContextMenuButton",qe(fe.s_,"Horizontal",_e(xe.lightgray,"fill"),_e(xe.lightgreen,"fill"),_e(xe.lightblue,"fill"),_e(xe.lightred,"fill")))]}function hi(){return[qe("ContextMenuButton",qe(fe.s_,"Horizontal",_e(xe.black),_e(xe.green),_e(xe.blue),_e(xe.red))),qe("ContextMenuButton",qe(fe.s_,"Horizontal",_e(xe.white),_e(xe.magenta),_e(xe.purple),_e(xe.orange)))]}function qn(Oe,Wn){return Wn||(Wn="thickness"),qe(fe.bn,"LineH",{width:16,height:16,strokeWidth:Oe,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:Vn(Wn,Oe),contextClick:Vn(Wn,Oe)})}function vi(Oe,Wn){return Wn||(Wn="dash"),qe(fe.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Oe,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:Vn(Wn,Oe),contextClick:Vn(Wn,Oe)})}function Kn(){return[qe("ContextMenuButton",qe(fe.s_,"Horizontal",qn(1),qn(2),qn(3),qn(4))),qe("ContextMenuButton",qe(fe.s_,"Horizontal",vi(null),vi([2,4]),vi([4,4])))]}function oi(Oe,Wn){return Wn||(Wn="figure"),qe(fe.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Oe,margin:1,background:"transparent",mouseEnter:(yi,di)=>di.fill="dodgerblue",mouseLeave:(yi,di)=>di.fill="lightgray",click:Vn(Wn,Oe),contextClick:Vn(Wn,Oe)})}Le.current.nodeTemplate.contextMenu=qe("ContextMenu",qe("ContextMenuButton",qe(fe.s_,"Horizontal",oi("Rectangle"),oi("RoundedRectangle"),oi("Ellipse"),oi("Diamond"))),qe("ContextMenuButton",qe(fe.s_,"Horizontal",oi("Parallelogram2"),oi("ManualOperation"),oi("Procedure"),oi("Cylinder1"))),qe("ContextMenuButton",qe(fe.s_,"Horizontal",oi("Terminator"),oi("CreateRequest"),oi("Document"),oi("TriangleDown"))),Je(),hi(),Kn()),Le.current.groupTemplate=qe(fe.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:fe.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Oe,Wn)=>{var yi=Wn.addMembers(Wn.diagram.selection,!0);yi||Wn.diagram.currentTool.doCancel()},avoidable:!1},new fe.KX("location","loc",fe.E9.parse).makeTwoWay(fe.E9.stringify),qe(fe.s_,"Auto",{name:"BODY"},qe(fe.bn,{parameter1:10,fill:xe.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:fe.z6.AllSides,toSpot:fe.z6.AllSides},new fe.KX("fill"),new fe.KX("stroke","color"),new fe.KX("strokeWidth","thickness"),new fe.KX("strokeDashArray","dash")),qe(fe.Vm,{background:"transparent",margin:20})),qe(fe.al,{alignment:fe.z6.Top,alignmentFocus:fe.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new fe.KX("text"),new fe.KX("stroke","color"))),Le.current.groupTemplate.selectionAdornmentTemplate=qe(fe.uz,"Spot",qe(fe.s_,"Auto",qe(fe.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),qe(fe.Vm,{margin:1.5})),Mn({alignment:fe.z6.TopRight,alignmentFocus:fe.z6.BottomRight})),Le.current.groupTemplate.contextMenu=qe("ContextMenu",Je(),hi(),Kn()),Le.current.linkTemplate=qe(fe.rU,{layerName:"Foreground",routing:fe.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new fe.KX("fromSpot","fromSpot",fe.z6.parse),new fe.KX("toSpot","toSpot",fe.z6.parse),new fe.KX("fromShortLength","dir",Oe=>Oe>=1?10:0),new fe.KX("toShortLength","dir",Oe=>Oe>=1?10:0),new fe.KX("points").makeTwoWay(),qe(fe.bn,{strokeWidth:2},new fe.KX("stroke","color"),new fe.KX("strokeWidth","thickness"),new fe.KX("strokeDashArray","dash")),qe(fe.bn,{segmentIndex:0,segmentOffset:new fe.E9(15,0),segmentOrientation:fe.rU.OrientAlong,alignmentFocus:fe.z6.Right,figure:"circle",width:10,strokeWidth:0},new fe.KX("fill","color"),new fe.KX("visible","dir",Oe=>Oe===1)),qe(fe.bn,{segmentIndex:-1,segmentOffset:new fe.E9(-10,6),segmentOrientation:fe.rU.OrientPlus90,alignmentFocus:fe.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new fe.KX("fill","color"),new fe.KX("visible","dir",Oe=>Oe>=1),new fe.KX("width","thickness",Oe=>7+3*Oe),new fe.KX("height","thickness",Oe=>7+3*Oe),new fe.KX("segmentOffset","thickness",Oe=>new fe.E9(-15,4+1.5*Oe))),qe(fe.bn,{segmentIndex:0,segmentOffset:new fe.E9(15,-6),segmentOrientation:fe.rU.OrientMinus90,alignmentFocus:fe.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new fe.KX("fill","color"),new fe.KX("visible","dir",Oe=>Oe===2),new fe.KX("width","thickness",Oe=>7+3*Oe),new fe.KX("height","thickness",Oe=>7+3*Oe),new fe.KX("segmentOffset","thickness",Oe=>new fe.E9(-15,4+1.5*Oe))),qe(fe.al,{alignmentFocus:new fe.z6(0,1,-4,0),editable:!0},new fe.KX("text").makeTwoWay(),new fe.KX("stroke","color"))),Le.current.linkTemplate.selectionAdornmentTemplate=qe(fe.uz,qe(fe.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:ui(2)},new fe.KX("pathPattern","thickness",ui)),Mn({alignmentFocus:new fe.z6(0,0,-6,-4)}));function ui(Oe){return qe(fe.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Oe+4).toString()+" H3"})}function xi(Oe){var Wn="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Oe===0?Wn="M0 0 M16 16 M0 8 L16 8":Oe===2&&(Wn="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),qe(fe.bn,{geometryString:Wn,margin:2,background:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:Vn("dir",Oe),contextClick:Vn("dir",Oe)})}function to(Oe){var Wn=(yi,di)=>{yi.handled=!0,yi.diagram.model.commit(no=>{var ji=di.part.adornedPart;no.set(ji.data,Oe?"toSpot":"fromSpot",fe.z6.stringify(fe.z6.AllSides)),(Oe?ji.toNode:ji.fromNode).invalidateConnectedLinks()})};return qe(fe.bn,{width:12,height:12,fill:"transparent",mouseEnter:(yi,di)=>di.background="dodgerblue",mouseLeave:(yi,di)=>di.background="transparent",click:Wn,contextClick:Wn})}function On(Oe,Wn){var yi=0,di=fe.z6.RightSide;Oe.equals(fe.z6.Top)?(yi=270,di=fe.z6.TopSide):Oe.equals(fe.z6.Left)?(yi=180,di=fe.z6.LeftSide):Oe.equals(fe.z6.Bottom)&&(yi=90,di=fe.z6.BottomSide),Wn||(yi-=180);var no=(ji,fo)=>{ji.handled=!0,ji.diagram.model.commit(Hi=>{var Ti=fo.part.adornedPart;Hi.set(Ti.data,Wn?"toSpot":"fromSpot",fe.z6.stringify(di)),(Wn?Ti.toNode:Ti.fromNode).invalidateConnectedLinks()})};return qe(fe.bn,{alignment:Oe,alignmentFocus:Oe.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:yi,background:"transparent",mouseEnter:(ji,fo)=>fo.background="dodgerblue",mouseLeave:(ji,fo)=>fo.background="transparent",click:no,contextClick:no})}Le.current.linkTemplate.contextMenu=qe("ContextMenu",hi(),Kn(),qe("ContextMenuButton",qe(fe.s_,"Horizontal",xi(0),xi(1),xi(2))),qe("ContextMenuButton",qe(fe.s_,"Horizontal",qe(fe.s_,"Spot",to(!1),On(fe.z6.Top,!1),On(fe.z6.Left,!1),On(fe.z6.Right,!1),On(fe.z6.Bottom,!1)),qe(fe.s_,"Spot",{margin:new fe.Zt(0,0,0,2)},to(!0),On(fe.z6.Top,!0),On(fe.z6.Left,!0),On(fe.z6.Right,!0),On(fe.z6.Bottom,!0)))));const ri=`{ "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 lo=["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 Ao(Oe){return console.log("shapeName:",Oe),lo.indexOf(Oe)>=0}var Ii=new fe.YI(nn.current,{maxSelectionCount:1,linkTemplate:qe(fe.rU,{locationSpot:fe.z6.Center,selectionAdornmentTemplate:qe(fe.uz,"Link",{locationSpot:fe.z6.Center},qe(fe.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),qe(fe.bn,{toArrow:"Standard",stroke:null}))},{routing:fe.rU.AvoidsNodes,curve:fe.rU.JumpOver,corner:5,toShortLength:4},new fe.KX("points"),qe(fe.bn,{isPanelMain:!0,strokeWidth:2}),qe(fe.bn,{toArrow:"Standard",stroke:null})),model:new fe.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...fe.bn.getFigureGenerators().toArray().map(Oe=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Oe.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Le.current.addDiagramListener("TextEdited",function(Oe){var Wn;const yi=Oe.subject.part;var di=(Wn=document.activeElement)==null?void 0:Wn.value;typeof di=="string"&&di.trim()===""&&Le.current.model.commit(function(no){no.set(yi.data,"text","\u672A\u547D\u540D"),Le.current.commandHandler.stopCommand()},"increment")}),Ii.nodeTemplate=qe(fe.NB,"Auto",{locationSpot:fe.z6.Center},new fe.KX("location","location",fe.E9.parse).makeTwoWay(fe.E9.stringify),qe(fe.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new fe.KX("stroke").makeTwoWay(),new fe.KX("fill").makeTwoWay(),new fe.KX("figure")),qe(fe.al,{margin:new fe.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new fe.$u(16,16),maxSize:new fe.$u(10,NaN),textAlign:"center",editable:!0},new fe.KX("key").makeTwoWay())),setTimeout(()=>{Le.current.grid=qe(fe.s_,"Grid",qe(fe.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),qe(fe.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Le.current.grid.visible=!0,Le.current.grid.gridCellStroke="darkgray",Le.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Le.current,Le.current}const Bn=()=>ye(this,null,function*(){var qe=Le.current.makeImage();const xe=yield(0,He.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:qe.src}});Te({src:xe.url})});return(0,mt.useEffect)(()=>(setTimeout(()=>{en()},500),Ve(Yt+1),()=>{Le.current=null}),[]),Jt.createElement("div",{ref:pe,className:Qe.current?`${Ee.maxH60} body-overflow-initial`:"body-overflow-initial"},Jt.createElement(Ke.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Yt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Jt.createElement(rn.Z,null,Jt.createElement(De.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Jt.createElement(De.Z,{onClick:()=>{var qe,xe,an=Le.current.selection.first();if(Qe.current=!Qe.current,document.activeElement&&an){let Mn=(xe=(qe=document.activeElement)==null?void 0:qe.value)==null?void 0:xe.trim();typeof Mn=="string"&&Le.current.model.commit(function(Vn){Vn.set(an.data,"text",Mn||"\u672A\u547D\u540D"),Le.current.commandHandler.stopCommand()},"increment")}Ve(Yt+1)}},Jt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:ke},Jt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ee.flowChartWrp},Jt.createElement("div",{style:{display:"flex",height:"100%"}},Jt.createElement("div",{style:{width:"300px",height:"100%"}},Jt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Jt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ee.myPaletteDiv,ref:nn})),Jt.createElement("div",{style:{flex:1,position:"relative"}},Jt.createElement("div",{ref:re,style:{height:"80vh"}}))),Jt.createElement("div",{className:"tr"},Jt.createElement(qt.ZP,{size:"large",onClick:Bn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Be=Re,Qt=Pt(5112),ce=Pt(88897);const Tt=Qt.ZP.Group,xt={margin:"0 8px"};var yt=({callback:ke,onCancel:Te})=>{function Le(re){ke(re)}return mt.createElement(Xt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Le},mt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},mt.createElement("span",{style:xt},"\u5355\u5143\u683C\u6570\uFF1A"),mt.createElement("span",{style:xt},"\u884C\u6570"),mt.createElement(Xt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},mt.createElement(ce.Z,null)),mt.createElement("span",{style:xt},"\u5217\u6570"),mt.createElement(Xt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},mt.createElement(ce.Z,null))),mt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},mt.createElement("span",{style:xt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),mt.createElement(Xt.default.Item,{name:"align"},mt.createElement(Tt,null,mt.createElement(Qt.ZP,{value:"default"},mt.createElement("i",{className:"fa fa-align-justify"})),mt.createElement(Qt.ZP,{value:"left"},mt.createElement("i",{className:"fa fa-align-left"})),mt.createElement(Qt.ZP,{value:"center"},mt.createElement("i",{className:"fa fa-align-center"})),mt.createElement(Qt.ZP,{value:"right"},mt.createElement("i",{className:"fa fa-align-right"}))))),mt.createElement("div",{className:"flex-container flex-end"},mt.createElement(qt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),mt.createElement(qt.ZP,{type:"ghost",onClick:Te},"\u53D6\u6D88")))},kt=Pt(78673),zt=Pt(98598),Mt=Pt.n(zt),$e=(0,mt.forwardRef)(({use3d:ke,width:Te,height:Le,callback:re,showSaveButton:nn},Qe)=>{const pe=(0,mt.useRef)(),Yt=(0,mt.useRef)(),[Ve,en]=(0,mt.useState)(!1),Bn=(0,mt.useRef)({id:pe,appName:"graphing",width:Te||1e3,height:Le||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,mt.useEffect)(()=>{Yt.current=new(Mt())(Bn.current,!0),window.onload=function(){Yt.current.inject("applet_container")}},[]);const qe=()=>{var xe=window.ggbApplet.getPNGBase64(1,!0,72);return re&&re(xe),xe};return(0,mt.useEffect)(()=>{Bn.current.appName=Ve?"3D":"graphing",Yt.current.inject("applet_container")},[Ve]),(0,mt.useEffect)(()=>{en(ke)},[ke]),(0,mt.useImperativeHandle)(Qe,()=>({getImgData:qe})),mt.createElement(mt.Fragment,null,mt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:pe}),mt.createElement(rn.Z,{align:"middle"},mt.createElement(De.Z,{flex:1},mt.createElement(kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ve,onChange:xe=>en(xe)})),mt.createElement(De.Z,null,mt.createElement(qt.ZP,{size:"large",onClick:qe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),cn=Pt(75890),sn=Pt(8591);const En="link",Gn="upload-image",zn="add-flowchart",Zn="draw-image",$n="add-flowchart",ni="code-block",ei="add-table",Bi="------------",Ki={default:Bi,left:`:${Bi}`,center:`:${Bi}:`,right:`${Bi}:`};var jn=Pt(91300);function Tn(){}let In=0;const li=1e4,gi="\u2581",Yi="@\u2581\u2581@",Ci="@\u2581@",bt=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,_i=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function Fi(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}const xo=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Go={[xo+"-B"]:"bold",[xo+"-I"]:"italic"},io={[En]:"\u6DFB\u52A0\u94FE\u63A5",[ni]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Gn]:"\u6DFB\u52A0\u56FE\u7247",[Zn]:"\u6DFB\u52A0\u753B\u56FE",[zn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ei]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var ii=({defaultValue:ke="",onChange:Te,width:Le="100%",height:re=400,miniToolbar:nn=!1,isFocus:Qe=!1,watch:pe,insertTemp:Yt,mode:Ve="markdown",id:en="markdown-editor-id",showResizeBar:Bn=!1,noStorage:qe=!1,showNullButton:xe=!1,showNullProgramButton:an=!1,hidetoolBar:Mn=!1,fullScreen:Vn=!1,onBlur:_e,onCMBeforeChange:Je,onFullScreen:hi,className:qn="",disablePaste:vi=!1,disabled:Kn=!1,disabledFill:oi=!1,placeholder:ui="",values:xi="",extraUse:to})=>{const[On,ri]=(0,mt.useState)(null),[lo,Ao]=(0,mt.useState)(ke),[Ii,Oe]=(0,mt.useState)(pe),[Wn,yi]=(0,mt.useState)(Vn),[di,no]=(0,mt.useState)(""),[ji,fo]=(0,mt.useState)(0),[Hi,Ti]=(0,mt.useState)(re),[Po,pn]=(0,mt.useState)(!1),[Vo,mn]=(0,mt.useState)(0),[po,vr]=(0,mt.useState)(0),Si=(0,mt.useRef)(),Dr=(0,mt.useRef)(),hr=(0,mt.useRef)(),ki=(0,mt.useRef)();(0,mt.useEffect)(()=>{const Vi=window.scrollY||window.pageYOffset;Ao(xi),On==null||On.setValue(xi),window.scrollTo(0,Vi)},[xi]),(0,mt.useEffect)(()=>{hi==null||hi(Wn)},[Wn]),(0,mt.useEffect)(()=>{if(Si.current){let Vi=function(Ji,Nn){var Ro;if(vi){Nn.preventDefault();return}const or=Nn.clipboardData;if(or){const Ir=or.types.toString(),pr=or.items;if(Ir==="Files"||or.types.indexOf("Files")>-1){if(Nn.preventDefault(),Ve=="stex")return;try{let Br=pr[1];((Ro=pr[0])==null?void 0:Ro.kind)==="file"&&(Br=pr[0]);const ts=Br.getAsFile(),Ns=ts.name.split(".").pop();(0,Fe.I)(ts,ks=>{var ca,Ts,on;ks.id?((ca=ts==null?void 0:ts.type)==null?void 0:ca.indexOf("image"))>-1?Ni.replaceSelection(`![,](/api/attachments/${ks.id}?type=${ks.content_type})`):((Ts=ts==null?void 0:ts.type)==null?void 0:Ts.indexOf("video"))>-1?Ni.replaceSelection(`<video width="100%" controls src="/api/attachments/${ks.id}"></video>`):((on=ts==null?void 0:ts.type)==null?void 0:on.indexOf("pdf"))>-1?Ni.replaceSelection(`<a href="/api/attachments/${ks.id}?type=${ts.type}&disposition=inline" target="_blank">${ts.name}</a>`):_i.includes(Ns)?Ni.replaceSelection(`<a href="/api/attachments/${ks.id}?type=office&disposition=inline" target="_blank">${ts.name}</a>`):Ni.replaceSelection(`[${ts.name}](/api/attachments/${ks.id}?type=${ks.content_type})`):(ks==null?void 0:ks.status)===401&&(document.location.href="/user/login")})}catch(Br){sn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ni=Zt().fromTextArea(Si.current,{mode:Ve,lineNumbers:!nn,lineWrapping:!0,value:ke,autoCloseTags:!0,autoCloseBrackets:!0});return Ni.on("keyup",function(Ji,Nn){Nn.keyCode===8&&(Ji.getValue()==""?Ni.setOption("placeholder",ui):Ni.setOption("placeholder",null))}),Ni.on("keydown",function(Ji,Nn){if(Nn.keyCode===8){var Ro=bo(Ji);Ro&&Nn.preventDefault()}}),Qe&&Ni.focus(),Ni.on("paste",Vi),Kn&&Ni.on("beforeChange",function(Ji,Nn){(Nn.origin==="paste"||Nn.origin==="+input")&&Nn.cancel()}),ri(Ni),()=>{Ni.off("paste",Vi)}}},[]);const Oi=(0,mt.useCallback)(()=>{if(Dr.current)try{}catch(Vi){console.log(Vi,"---- to set md editor body height")}},[Hi,Dr,Wn]);(0,mt.useEffect)(()=>{function Vi(){let Ni=new we.Z(Ji=>{for(let Nn of Ji)(Nn.target.offsetHeight>0||Nn.target.offsetWidth>0)&&(Oi(),On.setSize("100%","100%"),On.refresh())});return Ni.observe(Si.current.parentElement),Ni}if(On){const Ni=Vi();return()=>{var Ji,Nn;(Ji=Si.current)!=null&&Ji.parentElement&&Ni.unobserve((Nn=Si.current)==null?void 0:Nn.parentElement)}}},[On,Oi]),(0,mt.useEffect)(()=>{if(On){let Vi=[];for(const[Ni,Ji]of Object.entries(Go)){let Nn={[Ni]:()=>{Oo(Ji)}};Vi.push(Nn),On.addKeyMap(Nn)}return()=>{for(let Ni of Vi)On.removeKeyMap(Ni)}}},[On]),(0,mt.useEffect)(()=>{Vn!==Wn&&yi(Vn)},[Vn]),(0,jn.Z)(()=>{if(!qe&&ji>0){let Vi=new Date().getTime(),Ni=window.sessionStorage.getItem(en);Vi>=ji+li&&(!Ni||Ni!==lo)&&(window.sessionStorage.setItem(en,lo),pn(!0))}},li),(0,mt.useEffect)(()=>{Oe(pe)},[On,pe]),(0,mt.useEffect)(()=>{On&&Qe&&On.focus()},[On,Qe]),(0,mt.useEffect)(()=>{if(Ii&&On){let Vi=function(Ji){let Nn=Ji.target;if(ki.current){let Ro=Nn.scrollTop/Nn.scrollHeight;ki.current.scrollTop=ki.current.scrollHeight*Ro}};const Ni=On.getScrollerElement();return Ni.addEventListener("scroll",Vi),()=>{Ni.removeEventListener("scroll",Vi)}}},[On,Ii]),(0,mt.useEffect)(()=>{if(On&&Je){let Vi=function(Ni,Ji){Je(Ni,Ji)};return On.on("beforeChange",Vi),()=>{On.off("beforeChange",Vi)}}},[On,Je]),(0,mt.useEffect)(()=>{if(On&&_e){let Vi=function(){_e(On.getValue())};return On.on("blur",Vi),()=>{On.off("blur",Vi)}}},[On,_e]);function bo(Vi,Ni){var Ji=Vi.getDoc(),Nn=Ji.getCursor(),Ro=Ji.getLine(Nn.line),or=Ro.charAt(Nn.ch-1),Ir=Ro.lastIndexOf("@\u2581@",Nn.ch),pr=Ro.lastIndexOf("@\u2581\u2581@",Nn.ch),Br=Ir>pr?Ir:pr,ts=Ir>pr?3:4;if(Yi.indexOf(or)===-1)return null;if(console.log("change1:",Ni,Vi,Ro,Nn,Br,Ir,pr,or),Br>=0&&Nn.ch-Br<5){var Ns=Br+ts;return Ji.replaceRange("",{line:Nn.line,ch:Br},{line:Nn.line,ch:Ns}),{line:Nn.line,ch:Ns}}return null}(0,mt.useEffect)(()=>{if(On){let Vi=function(Ni,Ji){const Nn=Ni.getValue();Ao(Nn),fo(new Date().getTime()),Ni.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Te&&(an?Te(Nn,$i(Nn)):Te(Nn))};return On.on("change",Vi),()=>{On.off("change",Vi)}}},[On,Te]),(0,mt.useEffect)(()=>{if(On)if(ke==null)On.setValue(""),Ao("");else{const Vi=window.scrollY||window.pageYOffset;ke!==On.getValue()&&(On.setValue(ke),Ao(ke),On.setCursor(Kn?1:On.lineCount(),0),window.scrollTo(0,Vi))}},[On,ke]);const Oo=(0,mt.useCallback)(Vi=>{const Ni=On.getCursor(),Ji=On.getSelection();let Nn=Ji.split(`
`);switch(Vi){case"bold":return On.replaceSelection("**"+Ji+"**"),Ji===""&&On.setCursor(Ni.line,Ni.ch+2),On.focus();case"italic":return On.replaceSelection("*"+Ji+"*"),Ji===""&&On.setCursor(Ni.line,Ni.ch+1),On.focus();case"code":return On.replaceSelection("`"+Ji+"`"),Ji===""&&On.setCursor(Ni.line,Ni.ch+1),On.focus();case"inline-latex":return no("inline-latex"),On.focus();case"latex":return On.replaceSelection("```latex\n"+Ji+"\n```"),On.setCursor(Ni.line+1,Ji.length+1),On.focus();case"line-break":return On.replaceSelection(`<br/>
`),On.focus();case"list-ul":return Ji===""?On.replaceSelection("- "+Ji):On.replaceSelection(Nn.map(Ro=>Ro===""?"":`- ${Ro}`).join(`
`)),On.focus();case"list-ol":return Ji===""?On.replaceSelection("1. "+Ji):On.replaceSelection(Nn.map((Ro,or)=>Ro===""?"":`${or+1}. ${Ro}`).join(`
`)),On.focus();case"add-null-ch":return Ji===""&&On.setCursor(Ni.line,Ni.ch),On.replaceSelection(gi),On.focus();case"add-signal":return Ji===""&&On.setCursor(Ni.line,Ni.ch),On.replaceSelection(Ci),On.focus();case"add-multiple":return Ji===""&&On.setCursor(Ni.line,Ni.ch),On.replaceSelection(Yi),On.focus();case"inster-template-1":return Ji===""&&On.setCursor(Ni.line,Ni.ch),On.replaceSelection(bt),On.focus();case"eraser":return On.setValue(""),On.focus();case"trigger-watch":return Oe(!Ii),On.focus();case"trigger-full-screen":return yi(!Wn),On.focus();case En:no(En);return;case ni:no(ni);return;case Gn:no(Gn);return;case Zn:no(Zn);return;case"maths-latex":no("maths-latex");return;case zn:no(zn);return;case ei:no(ei);return;default:throw new Error}},[On,Ii,Wn]),Yn=(0,mt.useCallback)((Vi,Ni)=>{var Ji,Nn,Ro,or,Ir,pr;switch(no(""),di){case En:const{title:ca,link:Ts}=Vi;return On.replaceSelection(`[${ca}](${Ts})`),On.focus();case ni:const{language:on,content:ds}=Vi;return On.replaceSelection(["```"+on,ds,"```"].join(`
`)),On.focus();case"maths-latex":for(var Br=atob(Vi),ts=new Uint8Array(Br.length),Ns=0;Ns<Br.length;Ns++)ts[Ns]=Br.charCodeAt(Ns);var ks=new Blob([ts],{type:"image/png"});(0,Fe.I)(ks,_s=>{_s.id?On.replaceSelection(`![,](/api/attachments/${_s.id}?type=${_s.content_type})`):(_s==null?void 0:_s.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":On.replaceSelection("`$$"+Vi+"$$`");break;case Gn:case Zn:case $n:const{src:ka,alt:el}=Vi,cs=Ni,Za=(Ro=(Nn=(Ji=cs==null?void 0:cs.name)==null?void 0:Ji.split("."))==null?void 0:Nn.pop)==null?void 0:Ro.call(Nn);return((or=cs==null?void 0:cs.type)==null?void 0:or.indexOf("image"))>-1||!(cs!=null&&cs.type)?el?On.replaceSelection(`![ ${el} ]( ${ka} "${el}" )`):On.replaceSelection(`![,](${ka})`):((Ir=cs==null?void 0:cs.type)==null?void 0:Ir.indexOf("video"))>-1?On.replaceSelection(`<video width="100%" controls src="${ka}"></video>`):((pr=cs==null?void 0:cs.type)==null?void 0:pr.indexOf("pdf"))>-1?On.replaceSelection(`<a href="${ka}?type=${cs.type}&disposition=inline" target="_blank">${cs.name}</a>`):_i.includes(Za)?On.replaceSelection(`<a href="${ka}?type=office&disposition=inline" target="_blank">${cs.name}</a>`):On.replaceSelection(`[${cs.name}](${ka})`),On.focus();case ei:const{row:nu,col:Zl,align:Mr}=Vi;let _o=`
`;for(let _s=0;_s<nu;_s++){let Mo=[],Ko=[];for(let To=0;To<Zl;To++)_s===1&&Ko.push(Ki[Mr]),Mo.push(" ");_s===1&&(_o+=`| ${Ko.join(" | ")} |
`),_o+=`| ${Mo.join(Zl===1?"":" | ")} |
`}return On.replaceSelection(_o+`
`),On.focus();default:throw new Error}},[On,di]),Wt=(0,mt.useMemo)(()=>{switch(di){case En:return mt.createElement(Sn,{callback:Yn,onCancel:Fo});case ni:return mt.createElement(gn.Z,{callback:Yn,onCancel:Fo});case Gn:return mt.createElement(Fe.Z,{callback:Yn,onCancel:Fo});case zn:return mt.createElement(Be,{callback:Yn,onCancel:Fo});case ei:return mt.createElement(yt,{callback:Yn,onCancel:Fo});case"maths-latex":return mt.createElement($e,{showSaveButton:!0,callback:Yn});case"inline-latex":return mt.createElement(cn.Z,{showSaveButton:!0,callback:Yn});default:return null}},[di]);function Fo(){no("")}(0,mt.useEffect)(()=>{if(hr.current){let Vi=function(Ir){Ro=!0,or=Ir.pageY},Ni=function(){Ro=!1},Ji=function(Ir){if(Ro){let pr=Ir.pageY-or;pr<0&&(pr=0),pr>300&&(pr=300);let Br=re+pr+"px";Ti(Br)}},Nn=hr.current,Ro=!1,or=0;return Nn.addEventListener("mousedown",Vi),document.addEventListener("mousemove",Ji),document.addEventListener("mouseup",Ni),()=>{Nn.removeEventListener("mousedown",Vi),document.removeEventListener("mousemove",Ji),document.removeEventListener("mouseup",Ni)}}},[On,hr]),(0,mt.useEffect)(()=>{Ti(re)},[re]);const br=Fi(Le),Fr=Fi(Hi),qr={width:br,height:Fr},eo=(0,mt.useMemo)(()=>{if(ji){let Vi=new Date(ji),Ni=Vi.getHours(),Ji=Vi.getMinutes(),Nn=Vi.getSeconds();return Ni=Ni<10?"0"+Ni:Ni,Ji=Ji<10?"0"+Ji:Ji,Nn=Nn<10?"0"+Nn:Nn,`${Ni}:${Ji}:${Nn}`}return 0},[ji]),$i=Vi=>{const Ni=[];if(an){let Ji=-1;Vi=Vi.replace(/(@▁▁@|@▁@)/g,function(Nn,Ro,or){Ni.push({multiLine:Nn!==Ci})})}return Ni};function Do(){window.sessionStorage.removeItem(en),pn(!1),fo(0)}function ir(){pn(!1),fo(0),On.setValue(window.sessionStorage.getItem(en))}(0,mt.useEffect)(()=>{io[di]&&di!==Zn&&di!==zn&&setTimeout(()=>{const Vi=document.getElementsByClassName("markdown-popup-form")[0],Ni=window.innerWidth/2-Vi.offsetWidth/2,Ji=window.innerHeight/2-Vi.offsetHeight/2;mn(Ni),vr(Ji)},0)},[di]);const uo=Vi=>{Vi.preventDefault();const Ni=Vi.clientX-Vo,Ji=Vi.clientY-po;document.body.onmousemove=Nn=>{let Ro=Nn.clientX-Ni,or=Nn.clientY-Ji;const Ir=document.getElementsByClassName("markdown-popup-form")[0],pr=window.innerWidth-Ir.offsetWidth,Br=window.innerHeight-Ir.offsetHeight;Ro=Math.max(0,Math.min(Ro,pr)),or=Math.max(0,Math.min(or,Br)),yr(Nn.clientX,Nn.clientY,Ni,Ji)&&(mn(Ro),vr(or))},document.body.onmouseup=function(){document.body.onmousemove=null}},yr=(Vi,Ni,Ji,Nn)=>{const Ro=document.body.clientHeight,or=document.body.clientWidth;return Vi<20&&Ji>Vi||Vi>or-20&&Ji<Vi||Ni<20&&Nn>Ni||Ni>Ro-20&&Nn<Ni?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return mt.createElement(mt.Fragment,null,mt.createElement("div",{className:"markdown-editor-wrapper",ref:Dr},mt.createElement("div",{className:`markdown-editor-container ${qn} ${Ii?"on-preview":""} ${nn?"mini":""} ${Wn?"full-screen":""}`,style:qr},mt.createElement(_t,{insertTemp:Yt,watch:Ii,fullScreen:Wn,showNullButton:xe,showNullProgramButton:an,onActionCallback:Oo,hidetoolBar:Mn,extraUse:to}),mt.createElement("div",{className:"markdown-editor-body"},mt.createElement("div",{className:"codemirror-container"},mt.createElement("textarea",{ref:Si,placeholder:ui})),Ii?mt.createElement("div",{ref:ki,className:"preview-container"},Ve==="stex"&&mt.createElement(de,{value:lo}),Ve!=="stex"&&mt.createElement(ue.Z,{disabledFill:oi,showProgramFill:an,value:lo})):null))),Bn?mt.createElement("a",{ref:hr,className:"editor-resize"}):null,di===Zn&&mt.createElement(We,{callback:Yn,onCancel:Fo}),di===zn&&mt.createElement(Be,{callback:Yn,onCancel:Fo}),mt.createElement(te.Z,null,io[di]&&di!==Zn&&di!==zn?mt.createElement(Ke.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Vo,top:po},title:mt.createElement("div",{style:{cursor:"move"},onMouseDown:uo},io[di]),open:!0,onCancel:Fo,footer:null,destroyOnClose:!0,width:di===zn?"1200px":null,height:di===zn?"80vh":null,className:"markdown-popup-form"},Wt):null))}},56701:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return vt},I:function(){return Bt}});var mt=Pt(78241),It=Pt(8591),Zt=Pt(92832),we=Pt(3113),Ht=Pt(58788),he=Pt(59301),Rt=Pt(59301),be=Object.defineProperty,ge=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,At=(Ft,Ot,_t)=>Ot in Ft?be(Ft,Ot,{enumerable:!0,configurable:!0,writable:!0,value:_t}):Ft[Ot]=_t,nt=(Ft,Ot)=>{for(var _t in Ot||(Ot={}))de.call(Ot,_t)&&At(Ft,_t,Ot[_t]);if(ue)for(var _t of ue(Ot))ve.call(Ot,_t)&&At(Ft,_t,Ot[_t]);return Ft},et=(Ft,Ot)=>ge(Ft,Kt(Ot));const{useForm:ht}=mt.default,at={width:280,marginRight:10},ft={labelCol:{span:5},wrapperCol:{span:19}};var vt=({callback:Ft,onCancel:Ot})=>{const[_t]=ht();let te=(0,he.useRef)();function Xt(Ne){Ft(Ne,te.current)}function Me(Ne,ne){if(Ne.status===-1){It.ZP.error(Ne.message);return}_t.setFieldsValue({src:`/api/attachments/${Ne.id}`,type:ne.type})}function qt(Ne){let ne=Ne.target.files[0];te.current=ne,Bt(ne,Me)}return Rt.createElement(mt.default,et(nt({form:_t},ft),{className:"upload-image-panel",onFinish:Xt,style:{width:470,overflow:"hidden"}}),Rt.createElement(mt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Rt.createElement("div",{className:"flex-container"},Rt.createElement(mt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Rt.createElement(Zt.default,{style:at})),Rt.createElement(Ct,{onFileChange:qt}))),Rt.createElement(mt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Rt.createElement(Zt.default,{style:{width:264}})),Rt.createElement(mt.default.Item,{style:{textAlign:"right"}},Rt.createElement(we.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Rt.createElement(we.ZP,{type:"default",onClick:Ot},"\u53D6\u6D88")))};function Ct({onFileChange:Ft}){return Rt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Rt.createElement("input",{type:"file",onChange:Ft}))}function Bt(Ft,Ot){if(!Ft)throw new String("\u6CA1\u6709\u6587\u4EF6");let _t=new FormData;_t.append("editormd-image-file",Ft),_t.append("file_param_name","editormd-image-file"),_t.append("byxhr","true");var te=new window.XMLHttpRequest;te.withCredentials=!0,te.addEventListener("load",function(Xt){Ot(JSON.parse(Xt.target.responseText),Ft)},!1),te.addEventListener("error",function(Xt){console.error(Xt)},!1),te.open("POST",`${Ht.KI}/api/attachments.json`),te.send(_t)}},50474:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return Zt}});var mt=Pt(59301),It=Pt(4676);class Zt extends mt.Component{constructor(Ht){super(Ht);const he=window.document;this.node=he.createElement("div"),he.body.appendChild(this.node)}render(){const{children:Ht}=this.props;return(0,It.createPortal)(Ht,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},48551:function(xn,vn,Pt){"use strict";Pt.d(vn,{SV:function(){return Re},ZP:function(){return ye}});var mt=Pt(59301),It=Pt(76374);const Zt={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"]},we={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"]},Ht={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(`
`)}]},he={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(`
`)}]},Rt={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var be=Pt(86061),ge=Pt.n(be),Kt=Object.defineProperty,ue=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,et=(Be,Qt,ce)=>Qt in Be?Kt(Be,Qt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):Be[Qt]=ce,ht=(Be,Qt)=>{for(var ce in Qt||(Qt={}))At.call(Qt,ce)&&et(Be,ce,Qt[ce]);if(ve)for(var ce of ve(Qt))nt.call(Qt,ce)&&et(Be,ce,Qt[ce]);return Be},at=(Be,Qt)=>ue(Be,de(Qt)),ft=(Be,Qt,ce)=>new Promise((Tt,xt)=>{var yt=Mt=>{try{zt(ce.next(Mt))}catch(se){xt(se)}},kt=Mt=>{try{zt(ce.throw(Mt))}catch(se){xt(se)}},zt=Mt=>Mt.done?Tt(Mt.value):Promise.resolve(Mt.value).then(yt,kt);zt((ce=ce.apply(Be,Qt)).next())});const vt={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},Ct=(Be,Qt)=>Qt.map(ce=>({label:ce,kind:Be.languages.CompletionItemKind.Keyword,insertText:ce})),Bt=Be=>Object.keys(vt.tables).map(Qt=>({label:Qt,kind:Be.languages.CompletionItemKind.Variable,insertText:Qt})),Ft=(Be,Qt)=>{const ce=vt.tables[Be];return ce?ce.map(Tt=>({label:Tt,kind:Qt.languages.CompletionItemKind.Field,insertText:Tt})):[]};function Ot(Be,Qt,ce,Tt,xt){let yt=Qt.getWordUntilPosition(ce),kt={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:yt.startColumn,endColumn:yt.endColumn},zt=Tt.map(Mt=>({label:Mt,kind:Be.languages.CompletionItemKind.Keyword,insertText:Mt,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kt}));return xt.map(Mt=>{zt.push(at(ht({},Mt),{range:kt}))}),zt}var _t=Be=>{vt.languages.map(xt=>(Be.languages.registerDocumentFormattingEditProvider(xt,{provideDocumentFormattingEdits(yt,kt,zt){return ft(this,null,function*(){const Mt=ge()(yt.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:yt.getFullModelRange(),text:Mt}]})}}),xt));const Qt=Ht.quickKey.map(xt=>({label:xt.label,kind:Be.languages.CompletionItemKind.Method,insertText:xt.content,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ce=he.quickKey.map(xt=>({label:xt.label,kind:Be.languages.CompletionItemKind.Method,insertText:xt.content,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Tt=we.quickKey.map(xt=>({label:xt.label,kind:Be.languages.CompletionItemKind.Method,insertText:xt.content,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Be.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(xt,yt){var kt=xt.getWordUntilPosition(yt),zt={startLineNumber:yt.lineNumber,endLineNumber:yt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Mt=xt.getLineContent(yt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...Ht.keywords.map(se=>({label:se,kind:Be.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...Ht.quickKey.map(se=>({label:se.label,kind:Be.languages.CompletionItemKind.Function,documentation:se.content,insertText:Mt.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Be.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(xt,yt){var kt=xt.getWordUntilPosition(yt),zt={startLineNumber:yt.lineNumber,endLineNumber:yt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn};return{suggestions:[...Zt.keywords.map(Mt=>({label:Mt,kind:Be.languages.CompletionItemKind.Function,documentation:Mt,insertText:Mt,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Be.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(xt,yt){var kt=xt.getWordUntilPosition(yt),zt={startLineNumber:yt.lineNumber,endLineNumber:yt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Mt=xt.getLineContent(yt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...we.keywords.map(se=>({label:se,kind:Be.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...we.quickKey.map(se=>({label:se.label,kind:Be.languages.CompletionItemKind.Function,documentation:se.content,insertText:Mt.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Be.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(xt,yt){var kt=xt.getWordUntilPosition(yt),zt={startLineNumber:yt.lineNumber,endLineNumber:yt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Mt=xt.getLineContent(yt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...Rt.keywords.map(se=>({label:se,kind:Be.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...Rt.quickKey.map(se=>({label:se.label,kind:Be.languages.CompletionItemKind.Function,documentation:se.content,insertText:Mt.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Be.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(xt,yt){var kt=xt.getWordUntilPosition(yt),zt={startLineNumber:yt.lineNumber,endLineNumber:yt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Mt=xt.getLineContent(yt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...he.keywords.map(se=>({label:se,kind:Be.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...he.quickKey.map(se=>({label:se.label,kind:Be.languages.CompletionItemKind.Function,documentation:se.content,insertText:Mt.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:Be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}})};const te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Xt=Object.defineProperty,Me=(Be,Qt,ce)=>Qt in Be?Xt(Be,Qt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):Be[Qt]=ce,qt=(Be,Qt,ce)=>Me(Be,typeof Qt!="symbol"?Qt+"":Qt,ce);const Ne=class px{constructor(Qt,ce,Tt){this.placeholder=Qt,this.editor=ce,this.monaco=Tt,ce.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};qt(Ne,"ID","editor.widget.placeholderHint");var Ce=Ne,Ue=Pt(96236),Ze=Pt(8591),tn=Pt(6848),ln=Pt(89392),ie=Pt(86766),Gt=Pt(56102),Ae=Object.defineProperty,Sn=Object.defineProperties,gn=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,Fn=(Be,Qt,ce)=>Qt in Be?Ae(Be,Qt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):Be[Qt]=ce,Pn=(Be,Qt)=>{for(var ce in Qt||(Qt={}))Ke.call(Qt,ce)&&Fn(Be,ce,Qt[ce]);if(Fe)for(var ce of Fe(Qt))rn.call(Qt,ce)&&Fn(Be,ce,Qt[ce]);return Be},We=(Be,Qt)=>Sn(Be,gn(Qt)),fe=(Be,Qt)=>{var ce={};for(var Tt in Be)Ke.call(Be,Tt)&&Qt.indexOf(Tt)<0&&(ce[Tt]=Be[Tt]);if(Be!=null&&Fe)for(var Tt of Fe(Be))Qt.indexOf(Tt)<0&&rn.call(Be,Tt)&&(ce[Tt]=Be[Tt]);return ce},An=(Be,Qt,ce)=>new Promise((Tt,xt)=>{var yt=Mt=>{try{zt(ce.next(Mt))}catch(se){xt(se)}},kt=Mt=>{try{zt(ce.throw(Mt))}catch(se){xt(se)}},zt=Mt=>Mt.done?Tt(Mt.value):Promise.resolve(Mt.value).then(yt,kt);zt((ce=ce.apply(Be,Qt)).next())});function Hn(Be){return/^\d+$/.test(Be)?`${Be}px`:Be}function un(){}let De=!1;const He={"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 Ee(Be=[]){let Qt=Be;if(Array.isArray(Be)){for(let ce=0;ce<Be.length;ce++){let Tt=He[Be[ce]];if(Tt)return Tt}return Qt[0]}return He[Qt]||Qt}let Jt=null;var ye=Be=>{var Qt=Be,{width:ce="100%",height:Tt="100%",value:xt,language:yt="javascript",style:kt={},options:zt={},overrideServices:Mt={},theme:se="vs-dark",onEditBlur:$e,isCopy:cn=!1,onSave:sn,autoHeight:En=!1,forbidCopy:Gn=!1,onChange:zn=un,editorDidMount:Zn=un,onFocus:$n=un,onBreakPoint:ni=un,breakPointValue:ei=[],filename:Bi="educoder.txt",errorLine:Ki,errorContent:jn="",highlightLine:Tn,openBreakPoint:In=!1,placeholder:li=""}=Qt,gi=fe(Qt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const Yi=(0,mt.useRef)(),Ci=(0,mt.useRef)({}),bt=(0,mt.useRef)(),_i=(0,mt.useRef)(),Fi=(0,mt.useRef)([]),co=(0,mt.useRef)(!1),xo=(0,mt.useRef)(),Go=(0,mt.useRef)(),io=(0,mt.useRef)(!1),[ii,ke]=(0,mt.useState)(!1);function Te(){let _e;return Yi.current&&(_e=new It.Z(Je=>{for(let hi of Je)(hi.target.offsetHeight>0||hi.target.offsetWidth>0)&&Ci.current.instance.layout()}),_e.observe(Yi.current)),_e}function Le(){Ze.ZP.warning({content:decodeURIComponent(te),key:"monaco-editor-tip"})}const re=()=>{let _e=Ci.current.instance;if(xt!=null&&_e&&ii){const Je=_e.getModel();Je&&xt!==Je.getValue()&&(De=!0,Je.setValue(xt),_e.layout(),De=!1)}};(0,mt.useEffect)(()=>{const _e=ie.Z.subscribe("formatDocument",Je=>{var hi;let qn=Ci.current.instance;(hi=qn==null?void 0:qn.getAction)==null||hi.call(qn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Je=>{zn(Je)},_e},[]),(0,mt.useEffect)(()=>{var _e;let Je=Ci.current.instance;_i.current&&clearTimeout(_i.current),_i.current=setTimeout(()=>{re()},500),xt&&(xt!=null&&xt.length)&&((_e=Je==null?void 0:Je.updateOptions)==null||_e.call(Je,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(xt.split(/\r\n|\r|\n/g).length))+3,5)}))},[xt,ii,Ci.current]),(0,mt.useEffect)(()=>{if(Ki&&Ci.current&&Ci.current.instance){let Je=Ci.current.instance;Je.changeViewZones(function(hi){var qn=document.createElement("div");qn.style.padding="10px 20px",qn.style.width="calc(100% - 20px)",qn.className="my-error-line-wrp",qn.innerHTML=jn,hi.addZone({afterLineNumber:Ki||11,heightInLines:3,domNode:qn})});var _e={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}};Je.addOverlayWidget(_e),Je.revealPositionInCenter({lineNumber:20,column:1})}},[Ki,Ci.current,ii]);const nn=(_e="",Je)=>{if(!_e||_e.trim()==="")return!0;const qn=Ci.current.instance.getModel().getLineTokens(Je);let vi=!1;for(let Kn=0;Kn<2;Kn++)qn.getStandardTokenType(Kn)===1&&(vi=!0);return vi};(0,mt.useEffect)(()=>{var _e;const Je=(_e=Ci.current)==null?void 0:_e.instance;if(Je&&ii&&Gn){const hi=Je.onDidBlurEditorWidget(()=>{io.current=!1}),qn=Je.onDidFocusEditorText(()=>{io.current=!0});return()=>{hi.dispose(),qn.dispose()}}},[Ci.current,ii,Gn]),(0,mt.useEffect)(()=>{var _e;if((_e=Ci.current)!=null&&_e.instance&&ii&&In){let Je=Ci.current.instance,hi=Je.getModel();if(!hi)return;(()=>{var Ii;let Oe=[],Wn=[];const yi=hi.getAllDecorations();for(let no of yi)no.options.className==="highlighted-line"&&(Oe.push((Ii=no==null?void 0:no.range)==null?void 0:Ii.startLineNumber),Wn.push(no==null?void 0:no.id));if(Tn===Oe[0])return;hi.deltaDecorations(Wn,[]);const di=hi.getLineCount();Tn&&Tn<=di&&(Je.deltaDecorations([],[{range:new Jt.Range(Tn,1,Tn,hi.getLineMaxColumn(Tn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Je.revealLineInCenter(Tn))})();const vi=(Ii=!1)=>{var Oe;let Wn=[],yi=[];const di=hi.getAllDecorations();for(let no of di)no.options.linesDecorationsClassName==="breakpoints-select"&&(Wn.push((Oe=no==null?void 0:no.range)==null?void 0:Oe.startLineNumber),yi.push(no==null?void 0:no.id));if(Ii)return{lines:Wn,ids:yi};ni(Wn)},Kn=Ii=>An(void 0,null,function*(){let Oe={range:new Jt.Range(Ii,1,Ii,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield hi.deltaDecorations([],[Oe]),vi()}),oi=Ii=>An(void 0,null,function*(){let Oe=[];const Wn=Je.getLineDecorations(Ii);for(let yi of Wn)yi.options.linesDecorationsClassName==="breakpoints-select"&&Oe.push(yi.id);yield hi.deltaDecorations(Oe,[]),vi()}),ui=Ii=>{let Oe=Je.getLineDecorations(Ii);for(let Wn of Oe)if(Wn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ln.isEqual)(ei,vi(!0).lines)){hi.deltaDecorations(vi(!0).ids,[]);const Ii=ei.map(Oe=>({range:new Jt.Range(Oe,1,Oe,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));hi.deltaDecorations([],Ii)}const xi=Je.onDidChangeModelContent(Ii=>{let Oe=Je.getPosition();if(Oe){let Wn=Oe.lineNumber;clearTimeout(Go.current),Go.current=setTimeout(()=>{nn(hi.getLineContent(Wn),Wn)?oi(Wn):ui(Wn)?(oi(Wn),Kn(Wn)):vi()},100)}}),to=Je.onMouseDown(Ii=>{var Oe,Wn,yi;if(Ii.target.detail&&((yi=(Wn=(Oe=Ii.target)==null?void 0:Oe.element)==null?void 0:Wn.className)!=null&&yi.includes("line-numbers"))){let di=Ii.target.position.lineNumber;if(nn(hi.getLineContent(di),di))return;ui(di)?oi(di):Kn(di)}}),On=Ii=>{let Oe={range:new Jt.Range(Ii,1,Ii,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Fi.current=Je.deltaDecorations(Fi.current,[Oe])},ri=()=>{Fi.current=Je.deltaDecorations(Fi.current,[])},lo=Je.onMouseMove(Ii=>{var Oe,Wn,yi;if(ri(),Ii.target.detail&&((yi=(Wn=(Oe=Ii.target)==null?void 0:Oe.element)==null?void 0:Wn.className)!=null&&yi.includes("line-numbers"))){let di=Ii.target.position.lineNumber;if(nn(hi.getLineContent(di),di))return;On(di)}}),Ao=Je.onMouseLeave(()=>{ri()});return()=>{xi.dispose(),to.dispose(),lo.dispose(),Ao.dispose()}}},[Ci.current,ii,ei,Tn,In,yt]),(0,mt.useEffect)(()=>{var _e;(_e=Ci.current)!=null&&_e.instance&&In&&Ci.current.instance.setPosition({lineNumber:0,column:0})},[Tn]);function Qe(){let _e=Ci.current.instance;if(_e){const Je=_e.getSelection(),hi=Ci.current.pastePos||{},qn=new Jt.Range(hi.startLineNumber||Je.endLineNumber,hi.startColumn||Je.endColumn,hi.endLineNumber||Je.endLineNumber,hi.endColumn||Je.endColumn);setTimeout(()=>{_e.executeEdits("",[{range:qn,text:""}])},300)}}function pe(_e){(window.navigator.platform.match("Mac")?_e.metaKey:_e.ctrlKey)&&_e.keyCode==83&&(_e.preventDefault(),sn())}const Yt=()=>{if(En&&Ci.current.instance){const _e=Ci.current.instance.getContentHeight();Mn(_e<Tt?Tt:_e)}else Mn(Tt)};function Ve(_e){var Je=document.createEvent("MouseEvents");Je.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_e.dispatchEvent(Je)}const en=_e=>{if(!io.current)return;const{keyCode:Je,ctrlKey:hi,metaKey:qn,target:vi,type:Kn}=_e;return(Kn==="paste"||(Je===67||Je===86)&&(qn||hi))&&vi.nodeName==="TEXTAREA"&&(Le(),_e.preventDefault()),!1};function Bn(_e,Je){var hi=window.URL||window.webkitURL||window,qn=new Blob([Je]),vi=document.createElementNS("http://www.w3.org/1999/xhtml","a");vi.href=hi.createObjectURL(qn),vi.download=_e,Ve(vi)}(0,mt.useEffect)(()=>{Yt()},[Yt]),(0,mt.useEffect)(()=>{Yi.current&&!ii&&Promise.all([Pt.e(8909),Pt.e(1810)]).then(Pt.bind(Pt,71448)).then(_e=>{try{Jt=_e,Ci.current.instance=Jt.editor.create(Yi.current,{value:xt,language:Ee(yt),theme:se,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Mt);const Je=Ci.current.instance;let vi=[...Ue.BH._menuItems].find(xi=>xi[0]._debugName=="EditorContext")[1],Kn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],oi=(xi,to)=>{var On,ri;let lo=xi._first;do to.includes((ri=(On=lo.element)==null?void 0:On.command)==null?void 0:ri.id)&&xi._remove(lo);while(lo=lo.next)};if(Zn(Je,Jt),setTimeout(()=>{Yt(),Ci.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Bn(Bi||"educoder.txt",Je.getValue())}})},500),Ci.current.subscription=Je.onDidChangeModelContent(xi=>{co.current?clearTimeout(xo.current):(Yt(),zn(Je.getValue(),xi)),xo.current=setTimeout(()=>{co.current=!1},500)}),window.Monaco||_t(Jt,Ee(yt)),Gn&&(oi(vi,Kn),Yi.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",en),window.removeEventListener("paste",en),window.addEventListener("keydown",en),window.addEventListener("paste",en)),window.Monaco=Jt,$e&&Je.onDidBlurEditorWidget(()=>{$e(Je.getValue())}),$n&&Je.onDidFocusEditorText(()=>{$n(Je.getValue())}),Gn)try{Je.onDidPaste(xi=>{const to=Je.getSelection(),On=Ci.current.pastePos||{},ri=new Jt.Range(On.startLineNumber||to.endLineNumber,On.startColumn||to.endColumn,On.endLineNumber||to.endLineNumber,On.endColumn||to.endColumn);Je.executeEdits("",[{range:xi.range,text:""}])})}catch(xi){}let ui=Te();return li&&typeof li=="string"&&new Ce(li,Je,Jt),ke(!0),()=>{const xi=Ci.current.instance;xi.dispose();const to=xi.getModel();to&&to.dispose(),Ci.current.subscription&&Ci.current.subscription.dispose(),ui.unobserve(Yi.current)}}catch(Je){}})},[]),(0,mt.useEffect)(()=>{if(Ci.current.instance&&ii)return document.addEventListener("keydown",pe,!1),()=>{document.removeEventListener("keydown",pe)}},[sn,ii]),(0,mt.useEffect)(()=>{let _e=Ci.current.instance;if(_e&&ii){let Je=Ee(yt);Jt.editor.setModelLanguage(_e.getModel(),Je)}},[yt,ii]),(0,mt.useEffect)(()=>{Ci.current.instance&&ii&&Jt.editor.setTheme(se)},[se,ii]),(0,mt.useEffect)(()=>{let _e=Ci.current.instance;bt.current=zt,_e&&ii&&(_e.updateOptions(Pn({},zt)),setTimeout(()=>{_e.getModel().updateOptions(Pn({},zt))},200))},[JSON.stringify(zt),ii]),(0,mt.useEffect)(()=>{let _e=Ci.current.instance;_e&&ii&&_e.layout()},[ce,Tt,ii]);const[qe,xe]=(0,mt.useState)(Hn(ce)),[an,Mn]=(0,mt.useState)(Hn(Tt)),Vn=We(Pn({},kt),{width:qe,height:an,position:"relative"});return mt.createElement("div",{className:"my-monaco-editor",ref:Yi,style:Vn},cn&&mt.createElement(Gt.CopyToClipboard,{text:xt,onCopy:()=>Ze.ZP.success("\u590D\u5236\u6210\u529F")},mt.createElement(tn.Z,{title:"\u590D\u5236\u4EE3\u7801"},mt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},mt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Re({width:Be="100%",height:Qt="100%",original:ce,modified:Tt,language:xt,options:yt={}}){const kt=(0,mt.useRef)(),[zt,Mt]=(0,mt.useState)(null);function se(En){let Gn;return kt.current&&(Gn=new It.Z(zn=>{for(let Zn of zn)(Zn.target.offsetHeight>0||Zn.target.offsetWidth>0)&&En.layout()}),Gn.observe(kt.current)),Gn}(0,mt.useEffect)(()=>(kt.current&&Promise.all([Pt.e(8909),Pt.e(9404)]).then(Pt.bind(Pt,2550)).then(En=>{Jt=En;const Gn=Jt.editor.createDiffEditor(kt.current,We(Pn({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},yt),{wordWrap:!0}));Mt(Gn);let zn=se(Gn);return()=>{Gn.dispose();const Zn=Gn.getModel();Zn&&Zn.dispose(),zn.unobserve(kt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,mt.useEffect)(()=>{zt&&zt.setModel({original:Jt.editor.createModel(ce,xt),modified:Jt.editor.createModel(Tt,xt)})},[ce,Tt,xt,zt]);const $e=Hn(Be),cn=Hn(Qt),sn={width:$e,height:cn};return mt.createElement("div",{className:"my-diff-editor",ref:kt,style:sn})}},94606:function(xn,vn,Pt){"use strict";Pt.d(vn,{jL:function(){return Ht},w9:function(){return Ke},QD:function(){return zn},cQ:function(){return Gt},op:function(){return se},O5:function(){return io},_b:function(){return Ki},t7:function(){return at},Gi:function(){return An},YG:function(){return We},qp:function(){return ue},vr:function(){return ni},qE:function(){return sn},Je:function(){return Ct},wb:function(){return Ue},cq:function(){return Jt},tp:function(){return At}});var mt=Pt(59301),It={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"},Zt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",Ht=({dataSource:ii=[],img:ke,imgWidth:Te=346,title:Le,sunTitle:re,bannerExtraContent:nn})=>mt.createElement("div",{className:It.banner},mt.createElement("div",{className:It.content},mt.createElement("aside",null,mt.createElement("p",null,mt.createElement("b",null,Le),mt.createElement("span",null,re)),ii.length>0&&mt.createElement("div",{className:It.btns},ii.map((Qe,pe)=>mt.createElement("div",{key:pe,onClick:Qe.click},Qe.name,Qe.sign?mt.createElement("img",{src:Zt,width:39}):null))),nn),ke&&mt.createElement("img",{style:{marginTop:33,marginRight:38},src:ke,width:Te}))),he={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"},Rt=Pt(92310),be=Pt.n(Rt),ge=Pt(89392),ue=({dataSource:ii=[],value:ke,onChange:Te,onTitleChange:Le,className:re,title:nn,titleWidth:Qe=41,style:pe={},fontColor:Yt="#6A7283",showCount:Ve})=>{const[en,Bn]=(0,mt.useState)(0),[qe,xe]=(0,mt.useState)(!1),an=(0,mt.useRef)(null),Mn=(0,mt.useRef)(null);return(0,mt.useEffect)(()=>{var Vn;ii.length!==0&&(((Vn=an==null?void 0:an.current)==null?void 0:Vn.clientHeight)>97?Bn(1):Bn(0)),ii.length===0&&Bn(0),xe(!1)},[ii]),mt.createElement("div",{className:be()(he.row,re),style:pe},mt.createElement("div",{onClick:(0,ge.throttle)(()=>Le==null?void 0:Le(),2e3),style:{width:Qe,marginTop:qe?12:4},className:`${he.title} ${Le?"current":""}`},nn),mt.createElement("div",{className:qe?`${he.tagsWrap} ${he.tagsBorderWrap}`:he.tagsWrap},mt.createElement("div",{className:he.bar,ref:Mn,style:en>0?{height:en===1?97:"auto",overflow:en===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},mt.createElement("div",{className:he.tag,ref:an},ii==null?void 0:ii.map(Vn=>mt.createElement("span",{onClick:()=>Te(Vn.id),key:Vn.id,style:{color:Yt},className:ke===Vn.id?he.active:""},mt.createElement("span",{title:Vn.name,className:he.name},Vn.name),!!Ve&&mt.createElement("span",{className:he.num},Vn.count))))),!!en&&mt.createElement(mt.Fragment,null,en===1?mt.createElement("div",{onClick:()=>{var Vn;Bn(2),((Vn=an==null?void 0:an.current)==null?void 0:Vn.clientHeight)>245?xe(!0):xe(!1)},className:he.action},"\u5C55\u5F00",mt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):mt.createElement("div",{onClick:()=>{Mn.current.scrollTop=0,Bn(1),xe(!1)},className:he.action},"\u6536\u8D77",mt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},de={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},At=({dataSource:ii=[],value:ke,onChange:Te,className:Le,style:re={}})=>mt.createElement("div",{style:re,className:be()(de.tabs,Le)},ii.map(nn=>mt.createElement("span",{onClick:()=>Te(nn.id),className:ke===nn.id?de.active:"",key:nn.id},nn.name))),nt={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},et=Pt(92832),at=({dataSource:ii=[],value:ke="",onChange:Te,onInputChange:Le=()=>{},className:re,style:nn={},placeholder:Qe,allowClear:pe=!1})=>{var Yt;const[Ve,en]=(0,mt.useState)(""),[Bn,qe]=(0,mt.useState)("");(0,mt.useEffect)(()=>{var Mn;let Vn=ke;(Mn=JSON.stringify(ke))!=null&&Mn.includes("{")&&(en(ke.id),Vn=ke.value||"");try{qe(decodeURIComponent(Vn||""))}catch(_e){qe(decodeURIComponent(Vn||""))}},[ke]);const xe=()=>{Te(encodeURIComponent(Bn),Ve||null)},an=Mn=>{Mn!==Ve&&(en(Mn),Te(encodeURIComponent(Bn),Mn))};return mt.createElement("div",{className:be()(nt.input,re),style:nn},!!ii.length&&mt.createElement("div",{className:nt.dropdown},mt.createElement("div",{className:nt.text},(Yt=ii.find(Mn=>Mn.id===Ve))==null?void 0:Yt.name,mt.createElement("i",{className:"iconfont icon-zhankai4"}),mt.createElement("b",{className:nt.b1}),mt.createElement("b",{className:nt.b2})),mt.createElement("div",{className:nt.menu},ii.map((Mn,Vn)=>mt.createElement("div",{key:Vn,onClick:()=>an(Mn.id)},Mn.name)))),mt.createElement(et.default,{onPressEnter:xe,value:Bn,onChange:Mn=>{qe(Mn.target.value),Le(encodeURIComponent(Mn.target.value),Ve||null)},bordered:!1,placeholder:Qe}),mt.createElement("i",{onClick:xe,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ft={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"},Ct=({value:ii,onChange:ke,className:Te,total:Le,pageSize:re,style:nn={}})=>{const Qe=ii<2,pe=ii>=Math.ceil(Le/re);return Le<=re?mt.createElement(mt.Fragment,null):mt.createElement("div",{className:be()(ft.quickPager,Te),style:nn},mt.createElement("div",{onClick:()=>{Qe||ke(ii-1,"prev")},className:Qe?ft.disabled:""},"\u4E0A\u4E00\u9875"),mt.createElement("div",{onClick:()=>{pe||ke(ii+1,"next")},className:pe?ft.disabled:""},"\u4E0B\u4E00\u9875"))},Bt={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Ft=Pt(71418),Ot=Pt(6848),_t=Pt(39978),te=Pt(10148),Xt=Pt(58130),Me=Pt(96908),qt=Pt(57177),Ne=Pt(81378),ne=Pt(97267),Ue=({className:ii,dataSource:ke=[],col:Te=4,right:Le,bottom:re=23,precision:nn=0,wrapWidth:Qe=1200,trackEventItems:pe,loading:Yt})=>{const Ve=Math.floor((Qe-(Te-1)*Le)/Te);return mt.createElement(Ft.Z,{spinning:Yt},mt.createElement("div",{className:be()(Bt.list,ii)},!!ke.length&&ke.map((en,Bn)=>{const{name:qe,id:xe,identifier:an,power:Mn,cover_image_id:Vn,pic:_e}=en;return mt.createElement("div",{className:Bt.wrap,key:xe,style:{width:Ve,marginRight:(1+Bn)%Te===0?0:Le+nn,marginBottom:re}},mt.createElement("a",{target:"_blank",href:`/shixuns/${an}/challenges`,className:Bt.li,onClick:Je=>{Je.preventDefault(),pe&&(0,Xt.L9)([pe]),Mn&&(0,Xt.xg)(`/shixuns/${an}/challenges`)}},mt.createElement("div",{className:Bt.img},mt.createElement("img",{className:Bt.cover,src:`${_e}`}),en.is_jupyter&&mt.createElement("img",{className:Bt.sign,src:Me}),en.is_jupyter_lab&&mt.createElement("img",{className:Bt.sign,src:qt}),en.is_unity_3d&&mt.createElement("img",{className:Bt.sign,src:Ne})),mt.createElement("div",{className:Bt.name},mt.createElement(Ot.Z,{title:qe||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},mt.createElement("span",{className:Bt.e},qe||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),mt.createElement("div",{className:Bt.tags},mt.createElement(Ot.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},mt.createElement("span",null,mt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),mt.createElement("span",null,en.challenges_count))),!!en.myshixuns_count&&mt.createElement(Ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},mt.createElement("span",null,mt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),mt.createElement("span",null,en.myshixuns_count))),mt.createElement(Ot.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},mt.createElement("span",null,mt.createElement("span",null,en.level))),mt.createElement("div",{className:Bt.rate},mt.createElement(_t.Z,{allowHalf:!0,disabled:!0,defaultValue:en.score_info}),mt.createElement("span",null,"\xA0",en.score_info?`${en.score_info}\u5206`:"5\u5206")))),!Mn&&mt.createElement("div",{className:Bt.lockWrap},mt.createElement("img",{src:`${te.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),mt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!ke.length&&mt.createElement(ne.Z,null)))},Ze={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"},tn=Pt(2119),ln=Pt(59301),Gt=({className:ii,dataSource:ke=[],col:Te=4,right:Le,bottom:re=23,precision:nn=0,wrapWidth:Qe=1200,trackEventItems:pe,loading:Yt,onRemove:Ve=()=>{},isCurrent:en=!0,showAlias:Bn=!1})=>{const qe=Math.floor((Qe-(Te-1)*Le)/Te),xe=[{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 ln.createElement(Ft.Z,{spinning:Yt},ln.createElement("div",{className:be()(Ze.list,ii)},!!(ke!=null&&ke.length)&&(ke==null?void 0:ke.map((an,Mn)=>{var Vn;const{name:_e,id:Je,identifier:hi,featured:qn,school_name:vi,image_url:Kn,excellent:oi,is_plan:ui}=an;return ln.createElement("div",{key:Je,className:Ze.wrap,style:{width:qe,marginRight:(1+Mn)%Te===0?0:Le+nn,marginBottom:re}},ln.createElement("a",{className:Ze.li,onClick:xi=>{xi.preventDefault(),xi.stopPropagation(),pe&&(0,Xt.L9)([pe]),(0,Xt.xg)(`/paths/${hi}`)}},ln.createElement("div",{className:Ze.img},ln.createElement("img",{className:Ze.cover,src:`${Kn}`}),en&&(0,tn.bg)()&&(an==null?void 0:an.studying)&&ln.createElement("div",{className:`${Ze.movebq} user-path-items`,onClick:xi=>{xi.stopPropagation(),Ve(an)}},ln.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ln.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Vn=an==null?void 0:an.subject_tags)==null?void 0:Vn.map((xi,to)=>{var On,ri;if(to===0){const Ao=(On=xe.find(Ii=>Ii.name==xi))==null?void 0:On.swimg;return ln.createElement("img",{className:Ze.sign,src:Ao,style:{left:"-4px"}})}const lo=(ri=xe.find(Ao=>Ao.name==xi))==null?void 0:ri.ptimg;return ln.createElement("img",{className:Ze.sign,src:lo,style:{left:`${48+52*(to-1)+2*to}px`}})}),ln.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(an==null?void 0:an.excellent)&&ln.createElement("div",{className:Ze.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ln.createElement("div",{className:Ze.name},ln.createElement(Ot.Z,{title:Bn&&(an!=null&&an.excellent_alias_name)?ln.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${_e}`,ln.createElement("br",null),ln.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${an==null?void 0:an.excellent_alias_name}`)):_e},ln.createElement("span",{className:Ze.e},Bn&&(an==null?void 0:an.excellent_alias_name)||_e))),ln.createElement(Ot.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${vi}`},ln.createElement("div",{className:Ze.unit},ln.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),vi)),ln.createElement("div",{className:Ze.tags},ln.createElement("div",null,ln.createElement(Ot.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ln.createElement("span",null,an.stages_count))),ln.createElement(Ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ln.createElement("span",null,an.members_count)))))))})),!ke.length&&ln.createElement(ne.Z,null)))},Ae={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"},Sn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",gn=Pt(59301),Ke=({className:ii,dataSource:ke=[],col:Te=4,right:Le,bottom:re=23,precision:nn=0,wrapWidth:Qe=1200,trackEventItems:pe,loading:Yt})=>{const Ve=Math.floor((Qe-(Te-1)*Le)/Te);return gn.createElement(Ft.Z,{spinning:Yt},gn.createElement("div",{className:be()(Ae.list,ii)},!!ke.length&&ke.map((en,Bn)=>{const{subject_identifier:qe,id:xe,identifier:an,power:Mn}=en,Vn=en.is_public!=0&&en.is_public;return gn.createElement("div",{className:Ae.wrap,key:xe,style:{width:Ve,marginRight:(1+Bn)%Te===0?0:Le+nn,marginBottom:re}},gn.createElement("a",{className:Ae.li,onClick:_e=>{_e.preventDefault(),pe&&(0,Xt.L9)([pe]),(0,Xt.xg)(en.first_category_url)}},gn.createElement("div",{className:Ae.top},gn.createElement(Ot.Z,{title:en.name},gn.createElement("div",{className:Ae.name},en.name)),gn.createElement("img",{className:Ae.img,src:te.Z.IMG_SERVER+"/images/"+en.avatar_url}),gn.createElement("div",{className:Ae.text,title:en.creator},en.creator),qe&&gn.createElement("div",{className:Ae.btns},gn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),gn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Vn&&gn.createElement("div",{className:Ae.sign},"\u516C\u5F00")),gn.createElement("div",{className:Ae.bottom},en.visits>0&&gn.createElement(Ot.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},gn.createElement("span",null,gn.createElement("i",{className:"iconfont icon-liulanyan"}),gn.createElement("span",null,en.visits))),en.course_members_count>0&&gn.createElement(Ot.Z,{title:"\u6210\u5458",placement:"bottom"},gn.createElement("span",null,gn.createElement("i",{className:"iconfont icon-chengyuan"}),en.course_members_count)),en.tasks_count>0&&gn.createElement(Ot.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},gn.createElement("span",null,gn.createElement("i",{className:"iconfont icon-zuoye"}),en.tasks_count)),en.is_end?gn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):gn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!en.is_accessible&&gn.createElement("div",{className:Ae.lockWrap},gn.createElement("img",{src:`${te.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),gn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!ke.length&&gn.createElement(ne.Z,null)))},rn={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"},Fn=Pt(42203),We=({dataSource:ii=[],value:ke,onChange:Te,className:Le,style:re={},tabBarExtraContent:nn})=>mt.createElement("div",{className:be()(rn.tabs,Le),style:re},mt.createElement("div",{className:rn.tabsWrap},ii.map((Qe,pe)=>mt.createElement("aside",{className:rn.tab,onClick:()=>{Te(Qe.id),Qe.link&&Fn.history.push(Qe.link)},key:pe},mt.createElement("div",{className:ke===Qe.id?rn.active:""},Qe.name),(Qe==null?void 0:Qe.resetCount)==null&&(Qe==null?void 0:Qe.total)!==void 0&&mt.createElement("span",null,"\uFF08",Qe==null?void 0:Qe.total,"\uFF09"),(Qe==null?void 0:Qe.resetCount)!==void 0&&(Qe==null?void 0:Qe.total)!==void 0&&mt.createElement(Ot.Z,{title:(Qe==null?void 0:Qe.tip)!=null?Qe==null?void 0:Qe.tip:""},mt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",mt.createElement("span",{style:{color:"#000"}},Qe==null?void 0:Qe.resetCount),"/",mt.createElement("span",null,Qe==null?void 0:Qe.total),"\uFF09"))))),mt.createElement("div",{className:rn.tabBar},nn)),An=({className:ii,style:ke={},children:Te})=>mt.createElement("div",{className:be()(ii),style:ke},Te),Hn={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"},un=Pt(38854),De=Pt(20834);const He=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Jt=({sortValue:ii,dropValue:ke,className:Te,onSort:Le,onDrop:re,dataSource:nn=He})=>{var Qe;return mt.createElement("div",{className:be()(Hn.orderWrap,Te)},mt.createElement(un.Z,{dropdownRender:()=>mt.createElement(De.default,null,nn.map((pe,Yt)=>mt.createElement(De.default.Item,{key:Yt,onClick:()=>re(pe.id)},pe.name)))},mt.createElement("span",{className:Hn.orderTextWrap},(Qe=nn.find(pe=>ke===pe.id))==null?void 0:Qe.name)),mt.createElement("span",{className:Hn.orderIconWrap},mt.createElement("span",{className:Hn.orderAsc},mt.createElement("i",{className:ii==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Hn.cursorPointer} ${Hn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Hn.cursorPointer}`,onClick:()=>Le(ii==="asc"?"desc":"asc")})),mt.createElement("span",{className:Hn.orderDesc},mt.createElement("i",{className:ii==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Hn.cursorPointer} ${Hn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Hn.cursorPointer}`,onClick:()=>Le(ii==="asc"?"desc":"asc")}))))},ye={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"},Re=Pt(3113),Be=Object.defineProperty,Qt=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,xt=(ii,ke,Te)=>ke in ii?Be(ii,ke,{enumerable:!0,configurable:!0,writable:!0,value:Te}):ii[ke]=Te,yt=(ii,ke)=>{for(var Te in ke||(ke={}))ce.call(ke,Te)&&xt(ii,Te,ke[Te]);if(Qt)for(var Te of Qt(ke))Tt.call(ke,Te)&&xt(ii,Te,ke[Te]);return ii},kt=(ii,ke)=>{var Te={};for(var Le in ii)ce.call(ii,Le)&&ke.indexOf(Le)<0&&(Te[Le]=ii[Le]);if(ii!=null&&Qt)for(var Le of Qt(ii))ke.indexOf(Le)<0&&Tt.call(ii,Le)&&(Te[Le]=ii[Le]);return Te},zt=(ii,ke,Te)=>new Promise((Le,re)=>{var nn=Yt=>{try{pe(Te.next(Yt))}catch(Ve){re(Ve)}},Qe=Yt=>{try{pe(Te.throw(Yt))}catch(Ve){re(Ve)}},pe=Yt=>Yt.done?Le(Yt.value):Promise.resolve(Yt.value).then(nn,Qe);pe((Te=Te.apply(ii,ke)).next())}),se=ii=>{var ke=ii,{className:Te,style:Le,children:re,loading:nn=!1,openLoading:Qe,onClick:pe=()=>{},size:Yt="middle",shape:Ve="round"}=ke,en=kt(ke,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Bn,qe]=(0,mt.useState)(!1);return mt.createElement(Re.ZP,yt({onClick:(0,ge.throttle)(xe=>zt(void 0,null,function*(){Qe&&qe(!0);try{yield pe(xe)}catch(an){console.log("error",an)}Qe&&qe(!1)}),2e3,{leading:!0,trailing:!1}),className:be()(ye.btn,ye[`${Yt}-${Ve}`],Te),style:Le,size:Yt,shape:Ve,loading:Bn||nn},en),re)},$e={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"},sn=({className:ii,style:ke,children:Te=null,onClick:Le,title:re})=>mt.createElement("div",{className:be()($e.head,ii),style:ke},mt.createElement("span",{className:"primary-hover",onClick:Le},mt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),mt.createElement("b",{title:re},re),mt.createElement("div",{className:$e.node},Te)),En={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"},zn=({confirmShow:ii=!0,confirmTitle:ke,confirmClick:Te,cancelShow:Le=!0,cancelTitle:re,cancelClick:nn,className:Qe,style:pe,confirmLoading:Yt=!1})=>mt.createElement("div",{className:be()(En.btns,Qe),style:pe},ii&&mt.createElement(Re.ZP,{loading:Yt,onClick:Te,type:"primary",className:En.confirm},ke),Le&&mt.createElement(Re.ZP,{onClick:nn,className:En.cancel},re)),Zn={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"},ni=({className:ii,style:ke={},LeftContent:Te,children:Le,RightContent:re})=>mt.createElement("div",{className:be()(Zn.fixedBottom,ii),style:ke},mt.createElement("div",{className:Zn.wrap},mt.createElement("div",{className:Zn.left},Te),mt.createElement("div",{className:Zn.center},Le),mt.createElement("div",{className:Zn.right},re))),ei={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Ki=({className:ii,style:ke={},dataSource:Te=[]})=>mt.createElement("div",{className:be()(ei.crumbs,ii),style:ke},Te.map((Le,re)=>re<Te.length-1?mt.createElement(mt.Fragment,{key:re},Le.path||Le.onClick?mt.createElement("span",{className:ei.hover,onClick:Le!=null&&Le.onClick?Le.onClick:()=>Fn.history.push(Le.path)},Le.name):mt.createElement("span",null,Le.name),mt.createElement("span",null,"\xA0",">","\xA0")):mt.createElement("span",{key:re,style:{color:"#5F6368"}},Le.name))),jn=Pt(31797),Tn=Object.defineProperty,In=Object.defineProperties,li=Object.getOwnPropertyDescriptors,gi=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Ci=Object.prototype.propertyIsEnumerable,bt=(ii,ke,Te)=>ke in ii?Tn(ii,ke,{enumerable:!0,configurable:!0,writable:!0,value:Te}):ii[ke]=Te,_i=(ii,ke)=>{for(var Te in ke||(ke={}))Yi.call(ke,Te)&&bt(ii,Te,ke[Te]);if(gi)for(var Te of gi(ke))Ci.call(ke,Te)&&bt(ii,Te,ke[Te]);return ii},Fi=(ii,ke)=>In(ii,li(ke)),co=(ii,ke)=>{var Te={};for(var Le in ii)Yi.call(ii,Le)&&ke.indexOf(Le)<0&&(Te[Le]=ii[Le]);if(ii!=null&&gi)for(var Le of gi(ii))ke.indexOf(Le)<0&&Ci.call(ii,Le)&&(Te[Le]=ii[Le]);return Te};const{Countdown:xo}=jn.default;var io=ii=>{var ke=ii,{onChange:Te}=ke,Le=co(ke,["onChange"]);const[re,nn]=(0,mt.useState)(null);(0,mt.useEffect)(()=>{typeof re=="number"&&re>=0&&Te(re)},[re]);const Qe=pe=>{const Yt=Math.floor(pe/1e3);nn(Yt)};return mt.createElement(xo,Fi(_i({},Le),{onChange:Qe}))}},91300:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return It}});var mt=Pt(59301);function It(Zt,we){const Ht=(0,mt.useRef)();(0,mt.useEffect)(()=>{Ht.current=Zt}),(0,mt.useEffect)(()=>{function he(){Ht.current()}if(we!==null){let Rt=setInterval(he,we);return()=>clearInterval(Rt)}},[we])}},38600:function(xn,vn,Pt){"use strict";Pt.d(vn,{h:function(){return mt}});var mt=(It=>(It[It.NOMATCH=-1]="NOMATCH",It[It.OK=0]="OK",It[It.TIMEOUT=2]="TIMEOUT",It[It.PODFAILURE=3]="PODFAILURE",It[It.COMPILEFAILURE=4]="COMPILEFAILURE",It[It.EXECUTEFAILURE=5]="EXECUTEFAILURE",It[It.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",It))(mt||{})},22267:function(xn,vn,Pt){"use strict";Pt.d(vn,{H7:function(){return nt},MK:function(){return At},MU:function(){return Kt},X6:function(){return de},bM:function(){return ge},fi:function(){return et},fu:function(){return be},n4:function(){return ht},rX:function(){return ve},vl:function(){return at},zO:function(){return ue}});var mt=Pt(70635),It=Object.defineProperty,Zt=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,he=(ft,vt,Ct)=>vt in ft?It(ft,vt,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):ft[vt]=Ct,Rt=(ft,vt)=>{for(var Ct in vt||(vt={}))we.call(vt,Ct)&&he(ft,Ct,vt[Ct]);if(Zt)for(var Ct of Zt(vt))Ht.call(vt,Ct)&&he(ft,Ct,vt[Ct]);return ft};function be(ft,vt){return(0,mt.U2)(`myproblems/${ft}.json`,Rt({hidePopLogin:!0},vt||{}))}function ge(ft,vt){return(0,mt.v_)(`myproblems/${ft}/code_submit.json`,vt)}function Kt(ft,vt){return(0,mt.v_)(`myproblems/${ft}/code_debug.json`,vt)}function ue(ft,vt){return vt.language&&(vt.language=encodeURIComponent(vt.language)),(0,mt.U2)(`myproblems/${ft}/submit_records.json`,vt)}function de(ft){return(0,mt.U2)("myproblems/record_detail.json",{id:ft})}function ve(ft,vt){return(0,mt.U2)(`myproblems/${ft}/result.json`,{mode:vt})}function At(ft,vt){return(0,mt.v_)(`myproblems/${ft}/add_notes.json`,vt)}function nt(ft,vt){return(0,mt.v_)(`myproblems/${ft}/restore_initial_code.json`,vt)}function et(ft){return(0,mt.v_)(`myproblems/${ft}/sync_code.json`)}function ht(ft,vt){return(0,mt.v_)(`myproblems/${ft}/update_code.json`,vt)}function at(ft,vt){return(0,mt.v_)(`discusses/${ft}/plus.json`,vt)}},54675:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return rh}});var mt=Pt(59301),It={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI"},Zt=Pt(78241),we=Pt(6848),Ht=Pt(43418),he=Pt(88897),Rt=Pt(8591),be=Pt(92832),ge=Pt(28103),Kt=Pt(3113),ue=Pt(25700),de=Pt(95237),ve=Pt(60324),At=Object.defineProperty,nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,at=(Ie,Xe,Ge)=>Xe in Ie?At(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,ft=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))et.call(Xe,Ge)&&at(Ie,Ge,Xe[Ge]);if(nt)for(var Ge of nt(Xe))ht.call(Xe,Ge)&&at(Ie,Ge,Xe[Ge]);return Ie};const vt=Ie=>React.createElement("svg",ft({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Ie),React.createElement("title",null,"\u7F16\u7EC4 6"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E4E6FD",width:34,height:34,rx:10}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M13.808 11.448a.558.558 0 0 1 0 .788l-1.564 1.565a.558.558 0 1 1-.789-.79l1.564-1.563a.558.558 0 0 1 .79 0Zm9.882 2.462a.558.558 0 0 1-.789 0l-1.564-1.563a.558.558 0 1 1 .789-.789l1.564 1.564a.556.556 0 0 1 0 .788Z",fill:"#6678EB"}),React.createElement("path",{d:"M21.753 21.707a5.937 5.937 0 1 0-8.58.015l-.937.936a.558.558 0 1 0 .789.788l.995-.994a5.91 5.91 0 0 0 3.436 1.095c1.287 0 2.48-.41 3.452-1.106l.992.992a.558.558 0 1 0 .789-.789l-.936-.937Z",fill:"#6678EB"}),React.createElement("path",{d:"m20.858 18.95-3.024-1.745v-2.054a.558.558 0 1 0-1.117 0v2.351c0 .064.011.126.031.184a.551.551 0 0 0 .258.33l3.293 1.9a.557.557 0 0 0 .559-.966Z",fill:"#FFF"}))));var Ct="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",Bt=Pt(25711),Ft=Pt(42203),Ot=Pt(58130),_t=Pt(70635),te=Object.defineProperty,Xt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Ne=(Ie,Xe,Ge)=>Xe in Ie?te(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,ne=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))Me.call(Xe,Ge)&&Ne(Ie,Ge,Xe[Ge]);if(Xt)for(var Ge of Xt(Xe))qt.call(Xe,Ge)&&Ne(Ie,Ge,Xe[Ge]);return Ie};const Ce=Ie=>React.createElement("svg",ne({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Ie),React.createElement("title",null,"\u7F16\u7EC4 12"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{width:34,height:34,rx:10,fill:"#EAF3F4"}),React.createElement("path",{d:"M25.905 15.37a.775.775 0 0 0-.626-.529l-4.814-.7-2.152-4.362a.776.776 0 0 0-1.392 0l-2.153 4.363-4.814.699a.775.775 0 0 0-.43 1.323l3.484 3.396-.823 4.794a.777.777 0 0 0 1.126.818l4.306-2.264 4.305 2.264a.778.778 0 0 0 .817-.059.777.777 0 0 0 .31-.759l-.823-4.794 3.483-3.396a.777.777 0 0 0 .196-.795Z",fill:"#21C0A6",fillRule:"nonzero"})));var Ue="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Ze=Object.defineProperty,tn=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,Gt=(Ie,Xe,Ge)=>Xe in Ie?Ze(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,Ae=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))ln.call(Xe,Ge)&&Gt(Ie,Ge,Xe[Ge]);if(tn)for(var Ge of tn(Xe))ie.call(Xe,Ge)&&Gt(Ie,Ge,Xe[Ge]);return Ie};const Sn=Ie=>React.createElement("svg",Ae({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Ie),React.createElement("title",null,"\u9898\u76EE"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E7F3FF",width:34,height:34,rx:10}),React.createElement("g",{fill:"#4C6FFF",fillRule:"nonzero"},React.createElement("path",{d:"m23.719 13.325-4.098-3.94c-.097-.13-.225-.162-.355-.162-.129 0-.258.064-.387.161l-7.55 7.753c-.065.065-.098.162-.13.227l-1.032 5.427c-.033.194.032.323.16.484.13.13.227.162.389.162h.096l4.776-1.099c.097-.032.194-.064.258-.161l7.841-8.108c.194-.162.194-.517.033-.744h-.001Zm-8.1 8.044a.534.534 0 0 1-.386.162.56.56 0 0 1-.388-.162l-3-2.81c-.226-.194-.226-.517-.033-.743.194-.227.517-.227.743-.033l3 2.811c.259.226.291.55.065.776ZM17 22.92h6.844v1.055H17z"}))));var gn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",Fe=Pt(13021),Ke=Pt(24905),rn=Pt(23469),Fn=Pt(49985),Pn=Pt(86377),We={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H",inputBorder:"inputBorder___ix67O",keywordTag:"keywordTag___iGx08",scoreByBlankRadio:"scoreByBlankRadio___Kwu7q"},fe=Pt(59301),An=Object.defineProperty,Hn=Object.defineProperties,un=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Jt=(Ie,Xe,Ge)=>Xe in Ie?An(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,ye=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))He.call(Xe,Ge)&&Jt(Ie,Ge,Xe[Ge]);if(De)for(var Ge of De(Xe))Ee.call(Xe,Ge)&&Jt(Ie,Ge,Xe[Ge]);return Ie},Re=(Ie,Xe)=>Hn(Ie,un(Xe)),Be=(Ie,Xe)=>{var Ge={};for(var fn in Ie)He.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&De)for(var fn of De(Ie))Xe.indexOf(fn)<0&&Ee.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const Qt=null,ce=(Ie,Xe)=>{var Ge=Ie,{globalSetting:fn,loading:oo,dispatch:Ui,isEdit:mo,editData:Ri}=Ge,Gi=Be(Ge,["globalSetting","loading","dispatch","isEdit","editData"]);const[Bo,Qi]=(0,mt.useState)(""),[Uo,dr]=(0,mt.useState)(""),[vo,ko]=(0,mt.useState)([]),[Xo,xr]=(0,mt.useState)(""),[fi,Ho]=(0,mt.useState)(),[me,hn]=(0,mt.useState)(!1),[so,Co]=(0,mt.useState)({}),[Li,Wi]=(0,mt.useState)([]);(0,mt.useEffect)(()=>{!Ri||!mo||(Qi(Ri==null?void 0:Ri.name),dr(Ri==null?void 0:Ri.analysis),Ho(Ri==null?void 0:Ri.is_ordered),Co(Ri),hn(!0))},[Ri]),(0,mt.useEffect)(()=>{if(!me)return;const yo=Ri==null?void 0:Ri.standard_answer.map(Wo=>Wo==null?void 0:Wo.answer_text);ko(yo);const Xi=Ri==null?void 0:Ri.standard_answer.map(Wo=>Wo==null?void 0:Wo.score);Wi(Xi),hn(!1)},[me]),(0,mt.useImperativeHandle)(Xe,()=>({onSave:rr,Clear:jr}));const rr=()=>{let yo=[],Xi=!1;return Bo?(vo.forEach((Wo,cr)=>{yo.push({position:cr+1,answer_text:[],score:Li[cr]}),Wo==null||Wo.forEach((er,Os)=>{yo[cr].answer_text.push(er),(!er||!(0,Ot.eR)(er,1e4))&&(xr(`${cr}-${Os}`),Rt.ZP.info(er?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Xi=!0)})}),Xi?!1:(yo==null?void 0:yo.length)>20?(Rt.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Bo,analysis:Uo,standard_answers:yo,is_ordered:fi,downcase:so==null?void 0:so.downcase,no_space:so==null?void 0:so.no_space,use_blank_score:so==null?void 0:so.use_blank_score}):(Rt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},jr=()=>{Qi(""),dr(""),ko([]),Ho(!1)},Vr=(yo,Xi,Wo)=>{const cr=vo.slice();if(Xi&&cr.splice(yo,Xi),Wo)for(let er=0;er<Wo;er++)cr.splice(yo+er,0,[""]);ko(cr)},tr=(yo,Xi,Wo)=>{xr("");let cr=vo.slice();cr[yo][Xi]=Wo,ko(cr)},si=yo=>{let Xi=vo.slice();Xi[yo]=[...Xi[yo],""],ko(Xi)},Ar=(yo,Xi)=>{let Wo=vo.slice();if(!Wo[yo][Xi]){Wo[yo]=Wo[yo].filter((cr,er)=>er!==Xi),ko(Wo);return}Ht.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:We.modal,onOk:()=>{Wo[yo]=Wo[yo].filter((cr,er)=>er!==Xi),ko(Wo)}})},Cs=yo=>{Ht.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:We.modal,onOk:()=>{let Xi=vo.slice();Xi=vo.filter((Wo,cr)=>yo!==cr),ko(Xi)}})};return fe.createElement("section",{className:We.wrap},fe.createElement("p",{className:We.titleWrap},fe.createElement("span",{className:We.required},"*"),fe.createElement("span",{className:We.title},"\u9898\u5E72\uFF1A")),fe.createElement("div",null,fe.createElement(Fn.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Bo,onChange:yo=>Qi(yo),showNullButton:!0,onPlaceholderChange:Vr})),fe.createElement("div",{className:"mt20"},vo.map((yo,Xi)=>fe.createElement("div",{style:{display:"flex"}},fe.createElement("div",{style:{flex:1}},fe.createElement(Pn.Z,{key:Xi,answers:yo,index:Xi,flex:1,is_md:!0,activeOptionErrorIndex:Xo,onAnswerChange:tr,addChildAnswer:si,deleteChildAnswer:Ar,deleteChildAnswermain:Cs})),so.use_blank_score&&fe.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},fe.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",fe.createElement(he.Z,{style:{width:"100px"},size:"large",defaultValue:Li[Xi],onBlur:Wo=>{Li[Xi]=Wo.target.value,Wi([...Li])}}))))),fe.createElement("div",null,fe.createElement(Ke.default,{className:`${We.color333} font14 mt20`,checked:so.use_blank_score,onChange:yo=>Co(Re(ye({},so),{use_blank_score:yo.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),fe.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\uFF08\u9009\u4E2D\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u6BCF\u7A7A\u5206\u503C\uFF0C\u5B66\u751F\u7B54\u6848\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206\uFF09")),fe.createElement("div",null,fe.createElement(Ke.default,{className:`${We.color333} font14 mt20`,checked:so.downcase,onChange:yo=>Co(Re(ye({},so),{downcase:yo.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),fe.createElement("div",null,fe.createElement(Ke.default,{className:`${We.color333} font14 mt20`,checked:so.no_space,onChange:yo=>Co(Re(ye({},so),{no_space:yo.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),fe.createElement("div",{className:"mt20"},(vo==null?void 0:vo.length)>1&&fe.createElement("span",null,fe.createElement(Ke.default,{checked:fi,onChange:yo=>Ho(yo.target.checked),className:`${We.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),fe.createElement("span",{className:`${We.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),fe.createElement("p",{className:We.titleWrap},fe.createElement("span",{className:We.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),fe.createElement(rn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Uo,onChange:yo=>dr(yo)}))};var Tt=(0,Ft.connect)(({loading:Ie,globalSetting:Xe})=>({globalSetting:Xe,loading:Ie.effects}),null,null,{forwardRef:!0})((0,mt.forwardRef)(ce)),xt=Pt(5112),yt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,Mt=(Ie,Xe)=>{var Ge={};for(var fn in Ie)kt.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&yt)for(var fn of yt(Ie))Xe.indexOf(fn)<0&&zt.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const se=null,$e=(Ie,Xe)=>{var Ge=Ie,{globalSetting:fn,loading:oo,editData:Ui,dispatch:mo,onRef:Ri=()=>{},isEdit:Gi}=Ge,Bo=Mt(Ge,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Qi,Uo]=(0,mt.useState)(),[dr,vo]=(0,mt.useState)(""),[ko,Xo]=(0,mt.useState)("");(0,mt.useEffect)(()=>{if(!Ui||!Gi)return;vo(Ui==null?void 0:Ui.name),Xo(Ui==null?void 0:Ui.analysis);const Ho=Ui==null?void 0:Ui.choices.find(me=>me.is_answer);Uo(Ho.choice_text==="\u6B63\u786E"?"0":"1")},[Ui]),(0,mt.useImperativeHandle)(Xe,()=>({onSave:xr,Clear:fi}));const xr=()=>dr?Qi?{name:dr,choices:[{choice_text:"\u6B63\u786E",is_answer:Qi==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Qi==="1"?1:0}],analysis:ko}:(Rt.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(Rt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),fi=()=>{vo(""),Xo(""),Uo("")};return mt.createElement("section",{className:We.wrap},mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u9898\u5E72\uFF1A")),mt.createElement(rn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:dr,onChange:Ho=>vo(Ho)}),mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u7B54\u6848\u9009\u9879\uFF1A",mt.createElement("span",{className:We.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),mt.createElement(xt.ZP.Group,{buttonStyle:"solid",value:Qi,onChange:Ho=>Uo(Ho.target.value)},mt.createElement(xt.ZP.Button,{value:"0",className:`${We.radio} mr40`},"\u6B63\u786E"),mt.createElement(xt.ZP.Button,{value:"1",className:We.radio},"\u9519\u8BEF")),mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),mt.createElement(rn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:ko,onChange:Ho=>Xo(Ho)}))};var cn=(0,Ft.connect)(({loading:Ie,globalSetting:Xe})=>({globalSetting:Xe,loading:Ie.effects}),null,null,{forwardRef:!0})((0,mt.forwardRef)($e)),sn=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,zn=(Ie,Xe)=>{var Ge={};for(var fn in Ie)En.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&sn)for(var fn of sn(Ie))Xe.indexOf(fn)<0&&Gn.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const Zn=null,$n=(Ie,Xe)=>{var Ge=Ie,{globalSetting:fn,loading:oo,editData:Ui,dispatch:mo,onRef:Ri=()=>{},isEdit:Gi}=Ge,Bo=zn(Ge,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Qi,Uo]=(0,mt.useState)([]);(0,mt.useEffect)(()=>{var Xo;if(!Ui||!Gi)return;const xr=(Xo=Ui==null?void 0:Ui.shixun)==null?void 0:Xo.challenges.map(fi=>({id:fi==null?void 0:fi.id,score:fi.score}));Uo(xr)},[Ui]),(0,mt.useImperativeHandle)(Xe,()=>({onSave:dr,Clear:vo}));const dr=()=>({challenges:[...Qi]}),vo=()=>{Uo([])};console.log("editData--",Ui);const ko=Xo=>{var xr,fi;return mt.createElement("div",null,(fi=(xr=Xo==null?void 0:Xo.shixun)==null?void 0:xr.challenges)==null?void 0:fi.map((Ho,me)=>{var hn;return mt.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},mt.createElement("div",null,mt.createElement("span",{className:"mr5"},"\u7B2C",me+1,"\u5173"),mt.createElement(we.Z,{key:me,title:Ho==null?void 0:Ho.challenge_name},mt.createElement("span",null,(0,Ot.Pq)(Ho==null?void 0:Ho.challenge_name,44)))),mt.createElement("p",{style:{marginBottom:0}},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u5206\u503C\uFF1A"),mt.createElement(he.Z,{precision:1,min:1,max:100,className:We.baseFormItem,style:{width:176},value:(hn=Qi.find(so=>so.id===Ho.id))==null?void 0:hn.score,onChange:so=>{Qi.find(Co=>Co.id===Ho.id).score=so,Uo([...Qi])}})))}),mt.createElement("div",{style:{clear:"both"}}))};return mt.createElement("section",{className:We.wrap},mt.createElement(Bt.Z,{style:{paddingRight:10},className:We.titleHtml,value:`${Ui==null?void 0:Ui.position}\u3001${Ui==null?void 0:Ui.name}`}),mt.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u5173\u5361")),ko(Ui))};var ni=(0,Ft.connect)(({loading:Ie,globalSetting:Xe})=>({globalSetting:Xe,loading:Ie.effects}),null,null,{forwardRef:!0})((0,mt.forwardRef)($n)),ei=Object.getOwnPropertySymbols,Bi=Object.prototype.hasOwnProperty,Ki=Object.prototype.propertyIsEnumerable,jn=(Ie,Xe)=>{var Ge={};for(var fn in Ie)Bi.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&ei)for(var fn of ei(Ie))Xe.indexOf(fn)<0&&Ki.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const Tn=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],In=(Ie,Xe)=>{var Ge=Ie,{editData:fn,globalSetting:oo,loading:Ui,dispatch:mo,onRef:Ri=()=>{},isEdit:Gi}=Ge,Bo=jn(Ge,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Qi,Uo]=(0,mt.useState)([]),[dr,vo]=(0,mt.useState)(),[ko,Xo]=(0,mt.useState)([]),[xr,fi]=(0,mt.useState)(""),[Ho,me]=(0,mt.useState)("");(0,mt.useEffect)(()=>{Uo(["","","",""])},[]),(0,mt.useEffect)(()=>{if(!fn||!Gi)return;fi(fn==null?void 0:fn.name),me(fn==null?void 0:fn.analysis),Uo(fn==null?void 0:fn.choices.map(Li=>Li.choice_text));const Co=[];fn==null||fn.choices.map((Li,Wi)=>{Li.is_answer&&Co.push(Wi)}),Xo(Co)},[fn]),(0,mt.useImperativeHandle)(Xe,()=>({onSave:hn,Clear:so}));const hn=()=>{if(!xr)return Rt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Co=Qi.findIndex(Wi=>!Wi);if(Co>-1)return Rt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Tn[Co]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!ko.length)return Rt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(ko.length<2)return Rt.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const Li=Qi.map((Wi,rr)=>({choice_text:Wi,is_answer:ko.includes(rr)?1:0}));return{name:xr,choices:Li,analysis:Ho}},so=()=>{Uo(["","","",""]),fi(""),me(""),Xo("")};return mt.createElement("section",{className:We.wrap},mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u9898\u5E72\uFF1A")),mt.createElement(rn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:xr,onChange:Co=>fi(Co)}),mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u7B54\u6848\u9009\u9879\uFF1A",mt.createElement("span",{className:We.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Qi.map((Co,Li)=>mt.createElement("div",{className:We.choiceWrap,key:Li},mt.createElement(we.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},mt.createElement("div",{className:`${We.answer} ${ko.includes(Li)?We.activeAnswer:""}`,onClick:()=>{ko.includes(Li)?Xo(ko.filter(Wi=>Wi!==Li)):Xo([...ko,Li])}},Tn[Li])),mt.createElement("div",{className:We.editorWrap},dr===Li?mt.createElement(rn.Z,{id:`single-question-option-${Li}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Co,onChange:Wi=>{Qi[Li]=Wi,Uo(Qi)}}):mt.createElement("div",{className:We.htmlWrap,onClick:()=>vo(Li)},mt.createElement(Bt.Z,{value:Co}))),Li>1&&mt.createElement(we.Z,{title:"\u5220\u9664"},mt.createElement("i",{className:`${We.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Uo(Qi.filter((Wi,rr)=>rr!==Li)),ko.includes(Li)?Xo(ko.filter(Wi=>Wi!==Li)):Xo([...ko,Li])}})),Li<7&&Li===Qi.length-1&&mt.createElement(we.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},mt.createElement("i",{className:`${We.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Uo([...Qi,""])})))),mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),mt.createElement(rn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ho,onChange:Co=>me(Co)}))};var li=(0,Ft.connect)(({loading:Ie,globalSetting:Xe})=>({globalSetting:Xe,loading:Ie.effects}),null,null,{forwardRef:!0})((0,mt.forwardRef)(In)),gi=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Ci=Object.prototype.propertyIsEnumerable,bt=(Ie,Xe)=>{var Ge={};for(var fn in Ie)Yi.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&gi)for(var fn of gi(Ie))Xe.indexOf(fn)<0&&Ci.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const _i=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Fi=(Ie,Xe)=>{var Ge=Ie,{editData:fn,globalSetting:oo,loading:Ui,dispatch:mo,onRef:Ri=()=>{},isEdit:Gi}=Ge,Bo=bt(Ge,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Qi,Uo]=(0,mt.useState)([]),[dr,vo]=(0,mt.useState)(),[ko,Xo]=(0,mt.useState)(),[xr,fi]=(0,mt.useState)(""),[Ho,me]=(0,mt.useState)("");(0,mt.useEffect)(()=>{Uo(["","","",""])},[]),(0,mt.useEffect)(()=>{!fn||!Gi||(fi(fn==null?void 0:fn.name),me(fn==null?void 0:fn.analysis),Uo(fn==null?void 0:fn.choices.map(Co=>Co.choice_text)),Xo(fn==null?void 0:fn.choices.findIndex(Co=>Co.is_answer)))},[fn]),(0,mt.useImperativeHandle)(Xe,()=>({onSave:hn,Clear:so}));const hn=()=>{if(!xr)return Rt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Co=Qi.findIndex(Wi=>!Wi);if(Co>-1)return Rt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${_i[Co]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(console.log("activeAnswer: ",ko),typeof ko!="number")return Rt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;const Li=Qi.map((Wi,rr)=>({choice_text:Wi,is_answer:ko===rr?1:0}));return{name:xr,choices:Li,analysis:Ho}},so=()=>{Uo(["","","",""]),fi(""),me(""),Xo("")};return mt.createElement("section",{className:We.wrap},mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u9898\u5E72\uFF1A")),mt.createElement(rn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:xr,onChange:Co=>fi(Co)}),mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.required},"*"),mt.createElement("span",{className:We.title},"\u7B54\u6848\u9009\u9879\uFF1A",mt.createElement("span",{className:We.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Qi.map((Co,Li)=>mt.createElement("div",{className:We.choiceWrap,key:Li},mt.createElement(we.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},mt.createElement("div",{className:`${We.answer} ${ko===Li?We.activeAnswer:""}`,onClick:()=>Xo(Li)},_i[Li])),mt.createElement("div",{className:We.editorWrap},dr===Li?mt.createElement(rn.Z,{id:`single-question-option-${Li}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Co,onChange:Wi=>{Qi[Li]=Wi,Uo(Qi)}}):mt.createElement("div",{className:We.htmlWrap,onClick:()=>vo(Li)},mt.createElement(Bt.Z,{value:Co}))),Li>1&&mt.createElement(we.Z,{title:"\u5220\u9664"},mt.createElement("i",{className:`${We.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Uo(Qi.filter((Wi,rr)=>rr!==Li)),Li===ko&&Xo(null)}})),Li<7&&Li===Qi.length-1&&mt.createElement(we.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},mt.createElement("i",{className:`${We.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Uo([...Qi,""])})))),mt.createElement("p",{className:We.titleWrap},mt.createElement("span",{className:We.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),mt.createElement(rn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ho,onChange:Co=>me(Co)}))};var co=(0,Ft.connect)(({loading:Ie,globalSetting:Xe})=>({globalSetting:Xe,loading:Ie.effects}),null,null,{forwardRef:!0})((0,mt.forwardRef)(Fi)),xo=Pt(12563),Go=Pt(78673),io=Pt(43604),ii=Pt(86902),ke=Pt(59301),Te=Object.defineProperty,Le=Object.defineProperties,re=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,Yt=(Ie,Xe,Ge)=>Xe in Ie?Te(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,Ve=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))Qe.call(Xe,Ge)&&Yt(Ie,Ge,Xe[Ge]);if(nn)for(var Ge of nn(Xe))pe.call(Xe,Ge)&&Yt(Ie,Ge,Xe[Ge]);return Ie},en=(Ie,Xe)=>Le(Ie,re(Xe)),Bn=(Ie,Xe)=>{var Ge={};for(var fn in Ie)Qe.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&nn)for(var fn of nn(Ie))Xe.indexOf(fn)<0&&pe.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge},qe=(Ie,Xe,Ge)=>new Promise((fn,oo)=>{var Ui=Gi=>{try{Ri(Ge.next(Gi))}catch(Bo){oo(Bo)}},mo=Gi=>{try{Ri(Ge.throw(Gi))}catch(Bo){oo(Bo)}},Ri=Gi=>Gi.done?fn(Gi.value):Promise.resolve(Gi.value).then(Ui,mo);Ri((Ge=Ge.apply(Ie,Xe)).next())});const xe=Ie=>{if(!Ie)return!1;if(/^s*$/.test(Ie)||Ie.trim()===""){Rt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Xe=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Ie==="|"?(Rt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},an=({value:Ie=[],onClose:Xe})=>ke.createElement(xo.default,{closable:!0,onClose:Xe,className:We.keywordTag},ke.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Ie.join(" \u6216 "))),Mn=(Ie,Xe)=>{var Ge=Ie,{editData:fn,globalSetting:oo,loading:Ui,dispatch:mo,onRef:Ri=()=>{},isEdit:Gi}=Ge,Bo=Bn(Ge,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Qi,Uo]=(0,mt.useState)(""),[dr,vo]=(0,mt.useState)(""),[ko,Xo]=(0,mt.useState)(""),[xr,fi]=(0,mt.useState)(""),[Ho]=Zt.default.useForm(),me=Zt.default.useWatch("use_keywords",Ho);(0,mt.useEffect)(()=>{var Li;!fn||!Gi||(Uo(fn==null?void 0:fn.name),vo(fn==null?void 0:fn.analysis),Xo((Li=fn==null?void 0:fn.answer_texts)==null?void 0:Li[0]),Ho.setFieldsValue(Ve({},fn)))},[fn]),(0,mt.useImperativeHandle)(Xe,()=>({onSave:hn,Clear:so}));const hn=()=>qe(void 0,null,function*(){if(!Qi)return Rt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Ho.validateFields()}catch(Wi){Rt.ZP.error(Wi.errorFields[0].errors[0]);return}const Li=Ho.getFieldsValue();return console.log(Li,"values"),Ve({name:Qi,answer_texts:[ko],analysis:dr},Li)}),so=()=>{Uo(""),vo(""),Xo(""),Ho.resetFields()},Co=fn==null?void 0:fn.score;return ke.createElement("section",{className:We.wrap},ke.createElement("p",{className:We.titleWrap},ke.createElement("span",{className:We.required},"*"),ke.createElement("span",{className:We.title},"\u9898\u5E72\uFF1A")),ke.createElement(rn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Qi,onChange:Li=>Uo(Li)}),ke.createElement("p",{className:We.titleWrap},ke.createElement("span",{className:We.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),ke.createElement(rn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:ko,onChange:Li=>Xo(Li)}),ke.createElement("p",{className:We.titleWrap},ke.createElement("span",{className:We.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ke.createElement(rn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:dr,onChange:Li=>vo(Li)}),ke.createElement(Zt.default,{form:Ho,size:"large",onFinishFailed:Li=>qe(void 0,null,function*(){var Wi,rr;Rt.ZP.error(Li.errorFields[0].errors[0]),Ho.scrollToField((rr=(Wi=Li==null?void 0:Li.errorFields)==null?void 0:Wi[0])==null?void 0:rr.name,{behavior:"smooth",block:"center"})})},ke.createElement(de.Z,{align:"middle",className:"mb30 mt20"},ke.createElement(Zt.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},ke.createElement(Go.Z,null)),ke.createElement(io.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ke.createElement(io.Z,null,ke.createElement(we.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ke.createElement(ii.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),me&&ke.createElement(Zt.default.List,{name:"keywords",rules:[{validator(Li,Wi){return Wi!=null&&Wi.length?(Wi==null?void 0:Wi.reduce((jr,Vr)=>jr+Vr.score,0))>parseFloat(Co)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD"))}}]},(Li,{add:Wi,remove:rr})=>ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),ke.createElement(de.Z,{align:"middle",className:"font14 mb30"},ke.createElement(io.Z,{flex:1},ke.createElement(be.default,{value:xr,onChange:jr=>{fi(jr.target.value)},maxLength:50,allowClear:!0,onPressEnter:jr=>{var Vr,tr,si,Ar;const Cs=`${(Vr=jr.target)==null?void 0:Vr.value}`,yo=(si=(tr=Cs==null?void 0:Cs.split("|"))==null?void 0:tr.filter(cr=>!!cr))==null?void 0:si.map(cr=>cr==null?void 0:cr.trim()),Xi=Ho.getFieldValue("keywords"),Wo=((Ar=Xi==null?void 0:Xi.map(cr=>cr==null?void 0:cr.keyword))==null?void 0:Ar.flat())||[];for(const cr of yo)if(Wo.includes(cr)){Rt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}xe(Cs)&&(Wi({keyword:yo,score:1}),fi(""))},className:We.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ke.createElement(io.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Li.map(jr=>{var Vr=jr,{key:tr,name:si}=Vr,Ar=Bn(Vr,["key","name"]);return ke.createElement(de.Z,{key:tr,style:{marginRight:148}},ke.createElement(io.Z,{flex:1},ke.createElement(de.Z,{align:"middle",justify:"space-between"},ke.createElement(Zt.default.Item,en(Ve({},Ar),{name:[si,"keyword"]}),ke.createElement(an,{onClose:()=>rr(si)})),ke.createElement(Zt.default.Item,en(Ve({},Ar),{name:[si,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),ke.createElement(he.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var Vn=(0,Ft.connect)(({loading:Ie,globalSetting:Xe})=>({globalSetting:Xe,loading:Ie.effects}),null,null,{forwardRef:!0})((0,mt.forwardRef)(Mn)),_e=Pt(36381),Je={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},hi=Pt(37520),qn=Pt(89378),vi=Object.defineProperty,Kn=Object.defineProperties,oi=Object.getOwnPropertyDescriptors,ui=Object.getOwnPropertySymbols,xi=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable,On=(Ie,Xe,Ge)=>Xe in Ie?vi(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,ri=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))xi.call(Xe,Ge)&&On(Ie,Ge,Xe[Ge]);if(ui)for(var Ge of ui(Xe))to.call(Xe,Ge)&&On(Ie,Ge,Xe[Ge]);return Ie},lo=(Ie,Xe)=>Kn(Ie,oi(Xe)),Ao=(Ie,Xe)=>{var Ge={};for(var fn in Ie)xi.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&ui)for(var fn of ui(Ie))Xe.indexOf(fn)<0&&to.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const Ii=Ie=>{var Xe=Ie,{value:Ge,onChange:fn,scrollId:oo}=Xe,Ui=Ao(Xe,["value","onChange","scrollId"]);return mt.createElement("div",{id:oo||""},mt.createElement(rn.Z,lo(ri({},Ui),{defaultValue:Ge,onChange:(mo,Ri)=>{Ri!=null&&Ri.length?fn(mo,Ri):fn(mo)}})))},Oe=({value:Ie,onChange:Xe,placeholder:Ge,height:fn=140,isEdit:oo})=>oo?mt.createElement(rn.Z,{watch:!0,isFocus:!0,height:fn,placeholder:Ge,defaultValue:Ie,onChange:Xe}):mt.createElement("div",{style:{cursor:"pointer"}},Ie?mt.createElement(Bt.Z,{className:Je.inputBorder,value:Ie}):mt.createElement("div",{className:`${Je.inputBorder} ${Je.placeholder}`},Ge));var Wn=Pt(59301),yi=Object.defineProperty,di=Object.defineProperties,no=Object.getOwnPropertyDescriptors,ji=Object.getOwnPropertySymbols,fo=Object.prototype.hasOwnProperty,Hi=Object.prototype.propertyIsEnumerable,Ti=(Ie,Xe,Ge)=>Xe in Ie?yi(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,Po=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))fo.call(Xe,Ge)&&Ti(Ie,Ge,Xe[Ge]);if(ji)for(var Ge of ji(Xe))Hi.call(Xe,Ge)&&Ti(Ie,Ge,Xe[Ge]);return Ie},pn=(Ie,Xe)=>di(Ie,no(Xe)),Vo=(Ie,Xe)=>{var Ge={};for(var fn in Ie)fo.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&ji)for(var fn of ji(Ie))Xe.indexOf(fn)<0&&Hi.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const mn=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],po=({value:Ie,onChange:Xe,choiceTextKey:Ge,answerKey:fn,index:oo,isEdit:Ui,setInputActive:mo,form:Ri,choiceOptionsPath:Gi,allowChangeMode:Bo,showAddIcon:Qi,addItem:Uo,deleteItem:dr})=>{const vo=(Ie==null?void 0:Ie[fn])===!0,ko=()=>{const xr=Ri.getFieldValue(Gi);Ri.setFieldValue(Gi,xr.map(fi=>pn(Po({},fi),{[fn]:!1})))},Xo=()=>{vo?Xe(pn(Po({},Ie),{[fn]:!1})):(Bo||ko(),Xe(pn(Po({},Ie),{[fn]:!0})))};return Wn.createElement(de.Z,{className:Je.choiceWrap,align:"middle",wrap:!1},Wn.createElement(io.Z,{onClick:Xo,className:`${Je.choiceIndex} ${vo?Je.activeAnswer:""}`},mn[oo]),Wn.createElement(io.Z,{flex:1,className:`${Je.editorWrap} ml15`,onClick:mo},Wn.createElement(Oe,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Ui,value:Ie==null?void 0:Ie[Ge],onChange:xr=>{Xe(pn(Po({},Ie),{[Ge]:xr}))}})),Wn.createElement(io.Z,{flex:"0 0 auto",className:"ml15"},Wn.createElement("div",{onClick:Xo,className:`${Je.setAnswerBtn} ${vo?Je.activeAnswer:""}`},vo?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Wn.createElement(io.Z,{className:Je.actionWrapper},Wn.createElement(we.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Wn.createElement(hi.Z,{className:Je.addIcon,onClick:Uo,style:{visibility:Qi?"visible":"hidden"}})),Wn.createElement(we.Z,{title:"\u5220\u9664"},Wn.createElement(qn.Z,{className:Je.deleteIcon,onClick:dr,style:{visibility:oo>1?"visible":"hidden"}}))))},vr=({questionTitlePlaceholder:Ie,titleKey:Xe,choiceKey:Ge,analysisKey:fn,choiceTextKey:oo,answerKey:Ui,choiceOptionsPath:mo,allowChangeMode:Ri=!0,form:Gi,showAnalysis:Bo=!0})=>{const[Qi,Uo]=(0,mt.useState)(),[dr,vo]=(0,mt.useState)(!1);return Wn.createElement("div",{className:Je.wrap},Wn.createElement("div",{className:Je.questionTitleEditorWrap},Wn.createElement(Zt.default.Item,{label:"\u9898\u5E72",name:Xe,labelCol:{span:24},rules:[{required:!0}]},Wn.createElement(Ii,{scrollId:Array.isArray(Xe)?Xe.join("_"):`${Xe}`,watch:!0,height:140,placeholder:Ie}))),Wn.createElement(Zt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Wn.createElement(Zt.default.List,{name:Ge,rules:[{validator(ko,Xo){const xr=Xo.some(Ho=>Ho[Ui]),fi=Xo.findIndex(Ho=>{var me;return((me=Ho[oo])==null?void 0:me.length)<=0});return fi!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${mn[fi]}\u9009\u9879\u7684\u5185\u5BB9`)):xr?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(ko,{add:Xo,remove:xr})=>Wn.createElement("div",{id:Array.isArray(mo)?mo.join("_"):`${mo}`},ko.map((fi,Ho)=>{var me=fi,{key:hn,name:so}=me,Co=Vo(me,["key","name"]);const Li=Qi===hn,Wi=()=>{Uo(hn)},rr=Ho<7&&Ho===ko.length-1,jr=()=>Xo({[oo]:"",[Ui]:0}),Vr=()=>xr(so);return Wn.createElement(Zt.default.Item,pn(Po({},Co),{key:hn,name:so,noStyle:!0}),Wn.createElement(po,{choiceTextKey:oo,answerKey:Ui,index:Ho,isEdit:Li,setInputActive:Wi,form:Gi,choiceOptionsPath:mo,allowChangeMode:Ri,showAddIcon:rr,addItem:jr,deleteItem:Vr}))}),ko.length<8&&Wn.createElement("div",{className:`${Je.addBtn} mb30`,onClick:()=>Xo({[oo]:"",[Ui]:0})},"\u6DFB\u52A0\u9009\u9879"))),Bo&&Wn.createElement("div",{onClick:()=>vo(!0)},Wn.createElement(Zt.default.Item,{name:fn,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Wn.createElement(Oe,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:dr}))))};var Si=Pt(59301),Dr=Object.defineProperty,hr=Object.defineProperties,ki=Object.getOwnPropertyDescriptors,Oi=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable,Yn=(Ie,Xe,Ge)=>Xe in Ie?Dr(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,Wt=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))bo.call(Xe,Ge)&&Yn(Ie,Ge,Xe[Ge]);if(Oi)for(var Ge of Oi(Xe))Oo.call(Xe,Ge)&&Yn(Ie,Ge,Xe[Ge]);return Ie},Fo=(Ie,Xe)=>hr(Ie,ki(Xe)),br=(Ie,Xe)=>{var Ge={};for(var fn in Ie)bo.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&Oi)for(var fn of Oi(Ie))Xe.indexOf(fn)<0&&Oo.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const Fr=({value:Ie,onChange:Xe})=>{const Ge=oo=>{Ht.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Je.modal,onOk:()=>{const Ui=[...Ie];Ui.splice(oo,1),Xe(Ui)}})},fn=()=>{const oo=[...Ie];oo.push(""),Xe(oo)};return Si.createElement(de.Z,{align:"middle",className:"ml20",gutter:[40,20]},Ie==null?void 0:Ie.map((oo,Ui)=>Si.createElement(io.Z,{key:`${oo}_${Ui}`,className:Je.blankWrapper},Si.createElement(be.default,{className:Je.blankInput,defaultValue:oo,maxLength:1e3,onBlur:mo=>{const Ri=[...Ie],Gi=mo.target.value.trim();Ri[Ui]=Gi,Xe(Ri)}}),Si.createElement(we.Z,{title:"\u5220\u9664"},Si.createElement(qn.Z,{className:Je.deleteIcon,style:{marginLeft:15,visibility:Ui>0?"visible":"hidden"},onClick:()=>Ge(Ui)})))),Si.createElement(io.Z,null,Si.createElement("div",{className:`${Je.addBtn}`,onClick:()=>{fn()}},"\u65B0\u589E\u7B54\u6848")))},qr=({value:Ie=!0,onChange:Xe})=>Si.createElement(Go.Z,{checked:!Ie,onChange:Ge=>{Xe(!Ge)}}),eo="\u2581",$i=({questionTitlePlaceholder:Ie,form:Xe,name:Ge,scoreByBlank:fn="use_blank_score",answerKey:oo,titleKey:Ui="name",analysisKey:mo="analysis",isOrdered:Ri="is_ordered"})=>{var Gi,Bo;const[Qi,Uo]=(0,mt.useState)(!1),dr=(hn,so)=>{const Co=so.line;let Li=0;for(let rr=0;rr<Co;rr++)Li+=hn.getLine(rr).split(eo).length-1;const Wi=hn.getLine(Co).substring(0,so.ch);return Li+=Wi.split(eo).length-1,Li},vo=(hn,so,Co,Li)=>{const Wi=hn.getRange(so.from,so.to);let rr=0;if(so.text.forEach(jr=>{rr+=jr.split(eo).length-1}),so.origin!=="setValue"){if(Wi&&Wi.indexOf(eo)!==-1){const jr=Wi.split(eo).length-1,Vr=dr(hn,so.from);if(console.log(`\u5220\u9664${jr}\u4E2A\uFF0C \u524D\u9762\u6709${Vr}\u4E2A\uFF0C\u65B0\u589E${rr}\u4E2A`),jr>1){const tr=Array.from({length:jr},(si,Ar)=>Vr+Ar);Li(tr)}else Li(Vr)}else if(rr>0){const jr=dr(hn,so.from);console.log(`\u65B0\u589E${rr}\u4E2A\uFF0C\u4E4B\u524D\u6709${jr}\u4E2A`),Co(rr,jr)}}},ko=()=>{const hn=Xe.getFieldValue(["sub_item_banks",...oo]);Xe.setFieldValue(["sub_item_banks",...oo],hn==null?void 0:hn.map((so,Co)=>Fo(Wt({},so),{position:Co+1})))},Xo=(0,mt.useRef)(),xr=(hn,so)=>{for(let Co=0;Co<hn;Co++)Xo.current({position:null,answer_text:[""]},so+Co);ko()},fi=(0,mt.useRef)(),Ho=hn=>{fi.current(hn),ko()},me=(Bo=(Gi=Xe.getFieldValue("sub_item_banks"))==null?void 0:Gi[oo==null?void 0:oo[0]])==null?void 0:Bo[oo==null?void 0:oo[1]];return Si.createElement("div",{className:Je.wrap},Si.createElement("div",{className:Je.questionTitleEditorWrap},Si.createElement(Zt.default.Item,{label:"\u9898\u5E72",name:Ui,labelCol:{span:24},rules:[{required:!0}]},Si.createElement(Ii,{scrollId:"name",watch:!0,height:140,placeholder:Ie,showNullButton:!0,onCMBeforeChange:(hn,so)=>{vo(hn,so,xr,Ho)}}))),Si.createElement(Zt.default.List,{name:oo,rules:[{validator(hn,so){if((so==null?void 0:so.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Co of so){const{answer_text:Li}=Co||{};if(Li!=null&&Li.some(Wi=>(Wi==null?void 0:Wi.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(hn,{add:so,remove:Co},{errors:Li})=>(Xo.current=so,fi.current=Co,Si.createElement(Si.Fragment,null,Si.createElement(Zt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),hn.map((Wi,rr)=>{var jr=Wi,{key:Vr,name:tr}=jr,si=br(jr,["key","name"]);return Si.createElement(de.Z,{className:"mb20",key:Vr,align:"middle",wrap:!1},Si.createElement(io.Z,{flex:"0 0 auto",className:`${Je.blankIndex}`},"\u586B\u7A7A\u9879",rr+1),Si.createElement(io.Z,{flex:1},Si.createElement(de.Z,{align:"top",justify:"space-between",wrap:!1},Si.createElement(io.Z,null,Si.createElement(Zt.default.Item,Fo(Wt({},si),{name:[tr,"answer_text"],noStyle:!0}),Si.createElement(Fr,null))),(Xe==null?void 0:Xe.getFieldValue(["sub_item_banks",...fn]))&&Si.createElement(io.Z,{flex:"224px"},Si.createElement(Zt.default.Item,Fo(Wt({},si),{name:[tr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Je.blankInputNumberWrapper}),Si.createElement(he.Z,{className:Je.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),Si.createElement(Zt.default.Item,Fo(Wt({},si),{name:[tr,"position"],noStyle:!0}),Si.createElement(be.default,{type:"hidden"}))))})))),Si.createElement(de.Z,{align:"middle"},Si.createElement(Zt.default.Item,{name:[Ge,"downcase"],valuePropName:"checked"},Si.createElement(Go.Z,null)),Si.createElement(io.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Si.createElement(de.Z,{align:"middle"},Si.createElement(Zt.default.Item,{name:[Ge,"no_space"],valuePropName:"checked"},Si.createElement(Go.Z,null)),Si.createElement(io.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(me==null?void 0:me.length)>1&&Si.createElement(de.Z,{align:"middle",className:(me==null?void 0:me.length)>1?"mb30":`${Je.hide}`},Si.createElement(Zt.default.Item,{name:Ri},Si.createElement(qr,null)),Si.createElement(io.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),Si.createElement("div",{onClick:()=>Uo(!0)},Si.createElement(Zt.default.Item,{name:mo,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Si.createElement(Oe,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Qi}))))};var Do=Object.defineProperty,ir=Object.defineProperties,uo=Object.getOwnPropertyDescriptors,yr=Object.getOwnPropertySymbols,Vi=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable,Ji=(Ie,Xe,Ge)=>Xe in Ie?Do(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,Nn=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))Vi.call(Xe,Ge)&&Ji(Ie,Ge,Xe[Ge]);if(yr)for(var Ge of yr(Xe))Ni.call(Xe,Ge)&&Ji(Ie,Ge,Xe[Ge]);return Ie},Ro=(Ie,Xe)=>ir(Ie,uo(Xe)),or=(Ie,Xe)=>{var Ge={};for(var fn in Ie)Vi.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&yr)for(var fn of yr(Ie))Xe.indexOf(fn)<0&&Ni.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const Ir={\u6B63\u786E:"T",\u9519\u8BEF:"F"},pr=({value:Ie,onChange:Xe,form:Ge,choiceKey:fn})=>{const oo=(Ie==null?void 0:Ie.is_answer)===!0,Ui=Ie==null?void 0:Ie.choice_text,mo=()=>{var Ri;const Gi=(Ri=Ge==null?void 0:Ge.getFieldValue(["sub_item_banks",...fn]))==null?void 0:Ri.map(Bo=>({choice_text:Bo==null?void 0:Bo.choice_text,is_answer:!1}));Ge==null||Ge.setFieldValue(["sub_item_banks",...fn],Gi),Xe(Ro(Nn({},Ie),{is_answer:!0}))};return mt.createElement(de.Z,{className:Je.choiceWrap,align:"middle",wrap:!1},mt.createElement(io.Z,{onClick:mo,className:`${Je.choiceIndex} ${Je.judgementIndex} ${oo?Je.activeAnswer:""}`},Ir[Ui]),mt.createElement(io.Z,{flex:1,className:`${Je.editorWrap} ml15`},mt.createElement("div",{className:`${Je.inputBorder} ${Je.placeholder} ${oo?Je.activeJudgementAnswer:""}`},Ui)),mt.createElement(io.Z,{flex:"0 0 auto",className:"ml15"},mt.createElement("div",{onClick:mo,className:`${Je.setAnswerBtn} ${oo?Je.activeAnswer:""}`},oo?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},Br=({questionTitlePlaceholder:Ie,choiceKey:Xe="choices",form:Ge,titleKey:fn="name",analysisKey:oo="analysis"})=>{const[Ui,mo]=(0,mt.useState)(!1);return mt.createElement("div",{className:Je.wrap},mt.createElement("div",{className:Je.questionTitleEditorWrap},mt.createElement(Zt.default.Item,{label:"\u9898\u5E72",name:fn,labelCol:{span:24},rules:[{required:!0}]},mt.createElement(Ii,{scrollId:"name",watch:!0,height:140,placeholder:Ie}))),mt.createElement(Zt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},mt.createElement(Zt.default.List,{name:Xe,rules:[{validator(Ri,Gi){return Gi.some(Qi=>(Qi==null?void 0:Qi.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Ri=>mt.createElement("div",{id:"choices"},Ri.map(Gi=>{var Bo=Gi,{key:Qi,name:Uo}=Bo,dr=or(Bo,["key","name"]);return mt.createElement(Zt.default.Item,Ro(Nn({},dr),{key:Qi,name:Uo,noStyle:!0}),mt.createElement(pr,{form:Ge,choiceKey:Xe}))})))),mt.createElement("div",{onClick:()=>mo(!0)},mt.createElement(Zt.default.Item,{name:oo,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},mt.createElement(Oe,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ui}))))};var ts=Object.defineProperty,Ns=Object.defineProperties,ks=Object.getOwnPropertyDescriptors,ca=Object.getOwnPropertySymbols,Ts=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable,ds=(Ie,Xe,Ge)=>Xe in Ie?ts(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,ka=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))Ts.call(Xe,Ge)&&ds(Ie,Ge,Xe[Ge]);if(ca)for(var Ge of ca(Xe))on.call(Xe,Ge)&&ds(Ie,Ge,Xe[Ge]);return Ie},el=(Ie,Xe)=>Ns(Ie,ks(Xe)),cs=(Ie,Xe)=>{var Ge={};for(var fn in Ie)Ts.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&ca)for(var fn of ca(Ie))Xe.indexOf(fn)<0&&on.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge};const Za=Ie=>{var Xe=Ie,{value:Ge,onChange:fn}=Xe,oo=cs(Xe,["value","onChange"]);const Ui=mo=>{fn([mo])};return mt.createElement(rn.Z,el(ka({},oo),{defaultValue:Ge==null?void 0:Ge[0],onChange:Ui}))},nu=Ie=>{if(!Ie)return!1;let Xe=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Ie==="|"?(Rt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Zl=({value:Ie=[],onClose:Xe})=>mt.createElement(xo.default,{closable:!0,onClose:Xe,className:Je.keywordTag},Ie==null?void 0:Ie.join(" \u6216 ")),Mr=({questionTitlePlaceholder:Ie,form:Xe,showKeywords:Ge,isMustKeyWords:fn=Ge,titleKey:oo="name",analysisKey:Ui="analysis",answerTexts:mo="answer_texts",keywords:Ri="keywords",useKeywords:Gi="use_keywords",indexs:Bo})=>{const[Qi,Uo]=(0,mt.useState)(!1),[dr,vo]=(0,mt.useState)(""),ko=Zt.default.useWatch("sub_item_banks",Xe),{use_keywords:Xo,score:xr}=(ko==null?void 0:ko[Bo])||{};return console.log(Xo,xr,"itemValues"),mt.createElement("div",{className:Je.wrap},mt.createElement("div",{className:Je.questionTitleEditorWrap},mt.createElement(Zt.default.Item,{label:"\u9898\u5E72",name:oo,labelCol:{span:24},rules:[{required:!0}]},mt.createElement(Ii,{scrollId:"name",watch:!0,height:140,placeholder:Ie}))),mt.createElement(Zt.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:mo,labelCol:{span:24}},mt.createElement(Za,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Ge&&!fn&&mt.createElement(Zt.default.Item,{hidden:!0,name:Gi,valuePropName:"checked"},mt.createElement(Go.Z,{defaultChecked:!0})),Ge&&fn&&mt.createElement(de.Z,{align:"middle",className:"mb30"},mt.createElement(Zt.default.Item,{name:Gi,valuePropName:"checked"},mt.createElement(Go.Z,null)),mt.createElement(io.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),mt.createElement(io.Z,null,mt.createElement(we.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},mt.createElement(ii.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Xo||!fn)&&mt.createElement(Zt.default.List,{name:Ri,rules:[{validator(fi,Ho){return fn?Ho!=null&&Ho.length?(Ho==null?void 0:Ho.reduce((hn,so)=>hn+so.score,0))>parseFloat(xr)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(fi,{add:Ho,remove:me})=>mt.createElement(mt.Fragment,null,mt.createElement("div",{className:`${Je.title} mb10`},fn?"\u5173\u952E\u8BCD":mt.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),mt.createElement(de.Z,{align:"middle",className:"font14 mb30"},mt.createElement(io.Z,{flex:1},mt.createElement(be.default,{value:dr,onChange:hn=>{vo(hn.target.value)},maxLength:50,allowClear:!0,onPressEnter:hn=>{var so,Co,Li,Wi;const rr=`${(so=hn.target)==null?void 0:so.value}`,jr=(Li=(Co=rr==null?void 0:rr.split("|"))==null?void 0:Co.filter(si=>!!si))==null?void 0:Li.map(si=>si==null?void 0:si.trim()),Vr=Xe.getFieldValue(["sub_item_banks",...Ri]),tr=((Wi=Vr==null?void 0:Vr.map(si=>si==null?void 0:si.keyword))==null?void 0:Wi.flat())||[];for(const si of jr)if(tr.includes(si)){Rt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}nu(rr)&&(Ho({keyword:jr,score:1}),vo(""))},className:Je.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),mt.createElement(io.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),fi.map(hn=>{var so=hn,{key:Co,name:Li}=so,Wi=cs(so,["key","name"]);return mt.createElement(de.Z,{key:Co,className:"mb20",style:{marginRight:148}},mt.createElement(io.Z,{flex:1},mt.createElement(de.Z,{align:"middle",justify:"space-between"},mt.createElement(Zt.default.Item,el(ka({},Wi),{name:[Li,"keyword"]}),mt.createElement(Zl,{onClose:()=>me(Li)})),fn&&mt.createElement(Zt.default.Item,el(ka({},Wi),{name:[Li,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Je.blankInputNumberWrapper}),mt.createElement(he.Z,{className:Je.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),mt.createElement("div",{onClick:()=>Uo(!0)},mt.createElement(Zt.default.Item,{name:Ui,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},mt.createElement(Oe,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Qi}))))};var _o=Pt(59301),_s=Object.defineProperty,Mo=Object.defineProperties,Ko=Object.getOwnPropertyDescriptors,To=Object.getOwnPropertySymbols,ci=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,$r=(Ie,Xe,Ge)=>Xe in Ie?_s(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,ws=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))ci.call(Xe,Ge)&&$r(Ie,Ge,Xe[Ge]);if(To)for(var Ge of To(Xe))Ur.call(Xe,Ge)&&$r(Ie,Ge,Xe[Ge]);return Ie},Aa=(Ie,Xe)=>Mo(Ie,Ko(Xe)),nl=(Ie,Xe)=>{var Ge={};for(var fn in Ie)ci.call(Ie,fn)&&Xe.indexOf(fn)<0&&(Ge[fn]=Ie[fn]);if(Ie!=null&&To)for(var fn of To(Ie))Xe.indexOf(fn)<0&&Ur.call(Ie,fn)&&(Ge[fn]=Ie[fn]);return Ge},Qn=(Ie,Xe,Ge)=>new Promise((fn,oo)=>{var Ui=Gi=>{try{Ri(Ge.next(Gi))}catch(Bo){oo(Bo)}},mo=Gi=>{try{Ri(Ge.throw(Gi))}catch(Bo){oo(Bo)}},Ri=Gi=>Gi.done?fn(Gi.value):Promise.resolve(Gi.value).then(Ui,mo);Ri((Ge=Ge.apply(Ie,Xe)).next())});const{Panel:kr}=_e.default,is=null,Ta=(Ie,Xe)=>{var Ge=Ie,{globalSetting:fn,loading:oo,dispatch:Ui,editData:mo,onRef:Ri=()=>{},isEdit:Gi}=Ge,Bo=nl(Ge,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[Qi,Uo]=(0,mt.useState)(""),[dr,vo]=(0,mt.useState)([]),[ko]=Zt.default.useForm();(0,mt.useEffect)(()=>{!mo||!Gi||(Uo(mo==null?void 0:mo.name),vo(mo==null?void 0:mo.sub_item_banks),ko.setFieldsValue(ws({},mo)))},[mo]),(0,mt.useEffect)(()=>{vo(ko.getFieldValue("sub_item_banks"))},[Zt.default.useWatch("sub_item_banks",ko)]),(0,mt.useImperativeHandle)(Xe,()=>({onSave:Xo,Clear:xr}));const Xo=()=>Qn(void 0,null,function*(){if(!Qi)return Rt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield ko.validateFields()}catch(Co){return console.log(Co,"errInfo"),Rt.ZP.error(Co.errorFields[0].errors[0]),!1}const so=dr.map(Co=>ws({id:Co.id>1?Co.id:null},Co));return{name:Qi,sub_item_banks:so}}),xr=()=>{Uo(""),vo([])},fi={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Ho=({value:so})=>_o.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},so),[me,hn]=(0,mt.useState)();return _o.createElement("section",{className:We.wrap},_o.createElement("p",{className:We.titleWrap},_o.createElement("span",{className:We.required},"*"),_o.createElement("span",{className:We.title},"\u9898\u5E72\uFF1A")),_o.createElement(rn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Qi,onChange:so=>Uo(so)}),_o.createElement(Zt.default,{form:ko,autoComplete:"off"},_o.createElement(Zt.default.List,{name:"sub_item_banks",rules:[{validator(so,Co){return Co?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(so,{add:Co,remove:Li})=>{const Wi=ko.getFieldValue("sub_item_banks");return _o.createElement(_o.Fragment,null,_o.createElement(_e.default,{className:so.length>0?We.collapseWrapper:"",bordered:!1,expandIcon:({isActive:rr})=>_o.createElement("i",{className:`iconfont icon-weizhankai ${rr?We.open:We.close}`,style:{fontSize:14,transition:"all .2s"}})},so.map((rr,jr)=>{var Vr=rr,{key:tr,name:si}=Vr,Ar=nl(Vr,["key","name"]),Cs,yo,Xi,Wo,cr,er,Os,fs,Nl,sr,Ds,ar;return _o.createElement(kr,{className:We.panel,forceRender:!0,header:_o.createElement("div",{className:We.panelHeader},"\u7B2C",jr+1,"\u5C0F\u9898",_o.createElement("span",null,"\uFF08",fi[(Cs=Wi==null?void 0:Wi[si])==null?void 0:Cs.item_type],"\uFF09")),extra:_o.createElement(de.Z,{align:"middle",onClick:wr=>wr.stopPropagation(),style:{display:"flex",alignItems:"center"}},((yo=Wi==null?void 0:Wi[si])==null?void 0:yo.item_type)=="completion"&&_o.createElement(Zt.default.Item,Aa(ws({},Ar),{name:[si,"score"],className:We.blankInputNumberWrapper,style:{marginBottom:0}}),((Xi=Wi==null?void 0:Wi[si])==null?void 0:Xi.item_type)=="completion"&&_o.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",_o.createElement(Ho,{value:(Wo=Wi==null?void 0:Wi[si])==null?void 0:Wo.score}),"\u5206")),((cr=Wi==null?void 0:Wi[si])==null?void 0:cr.item_type)=="completion"&&_o.createElement(_o.Fragment,null,_o.createElement(xt.ZP.Group,{defaultValue:(er=Wi==null?void 0:Wi[si])==null?void 0:er.use_blank_score,className:We.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:wr=>{var Rr;console.log(ko.getFieldsValue()),ko==null||ko.setFieldValue(["sub_item_banks",si,"use_blank_score"],(Rr=wr==null?void 0:wr.target)==null?void 0:Rr.value),hn(new Date)}}),_o.createElement(we.Z,{overlayInnerStyle:{width:460},title:_o.createElement("div",null,"\u6309\u7A7A\u7ED9\u5206\uFF1A\u9700\u8981\u5206\u522B\u8BBE\u7F6E\u6BCF\u4E2A\u586B\u7A7A\u9879\u7684\u5206\u503C\uFF0C\u586B\u7A7A\u9879\u7B54\u5BF9\u4E4B\u540E\u5219\u83B7\u5F97\u5BF9\u5E94\u7684\u5206\u503C\u3002",_o.createElement("br",null),"\u6309\u9898\u7ED9\u5206\uFF1A\u7B54\u5BF9\u5168\u90E8\u586B\u7A7A\u9879\u4E4B\u540E\u624D\u80FD\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\u3002")},_o.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:tr},_o.createElement(Zt.default.Item,Aa(ws({},Ar),{name:si}),(((Os=Wi==null?void 0:Wi[si])==null?void 0:Os.item_type)=="single"||((fs=Wi==null?void 0:Wi[si])==null?void 0:fs.item_type)=="multiple")&&_o.createElement(vr,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Nl=Wi==null?void 0:Wi[si])==null?void 0:Nl.item_type)!="single",form:ko,choiceKey:[si,"choices"],titleKey:[si,"name"],analysisKey:[si,"analysis"],choiceOptionsPath:["sub_item_banks",si,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((sr=Wi==null?void 0:Wi[si])==null?void 0:sr.item_type)=="completion"&&_o.createElement($i,{form:ko,name:si,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[si,"use_blank_score"],titleKey:[si,"name"],analysisKey:[si,"analysis"],isOrdered:[si,"is_ordered"],answerKey:[si,"standard_answer"],key:me}),((Ds=Wi==null?void 0:Wi[si])==null?void 0:Ds.item_type)=="judgement"&&_o.createElement(Br,{form:ko,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[si,"name"],analysisKey:[si,"analysis"],choiceKey:[si,"choices"]}),((ar=Wi==null?void 0:Wi[si])==null?void 0:ar.item_type)=="subjective"&&_o.createElement(Mr,{showKeywords:!0,form:ko,titleKey:[si,"name"],analysisKey:[si,"analysis"],answerTexts:[si,"answer_texts"],useKeywords:[si,"use_keywords"],keywords:[si,"keywords"],indexs:si,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var iu=(0,Ft.connect)(({loading:Ie,globalSetting:Xe})=>({globalSetting:Xe,loading:Ie.effects}),null,null,{forwardRef:!0})((0,mt.forwardRef)(Ta)),Va=Pt(88477),Ru=({visible:Ie,onCancel:Xe,onRandomExchange:Ge,selectFromProblemSet:fn,questionParams:oo})=>mt.createElement(Ht.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:Ie,onCancel:Xe,centered:!0,maskClosable:!0,footer:null},mt.createElement(de.Z,{justify:"center",className:"pb20"},mt.createElement(Va.Z,{onClick:Ge},"\u968F\u673A\u66F4\u6362"),(oo==null?void 0:oo.type)!=="PRACTICAL"&&mt.createElement(Kt.ZP,{style:{marginLeft:24},onClick:fn},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"))),bs=Pt(94606),fa=Pt(26696),Hs=Pt(24334),Bl=Pt(48498),ou=Object.defineProperty,ga=Object.defineProperties,Oa=Object.getOwnPropertyDescriptors,yu=Object.getOwnPropertySymbols,ih=Object.prototype.hasOwnProperty,ju=Object.prototype.propertyIsEnumerable,oh=(Ie,Xe,Ge)=>Xe in Ie?ou(Ie,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Xe]=Ge,Ca=(Ie,Xe)=>{for(var Ge in Xe||(Xe={}))ih.call(Xe,Ge)&&oh(Ie,Ge,Xe[Ge]);if(yu)for(var Ge of yu(Xe))ju.call(Xe,Ge)&&oh(Ie,Ge,Xe[Ge]);return Ie},vl=(Ie,Xe)=>ga(Ie,Oa(Xe)),Ks=(Ie,Xe,Ge)=>new Promise((fn,oo)=>{var Ui=Gi=>{try{Ri(Ge.next(Gi))}catch(Bo){oo(Bo)}},mo=Gi=>{try{Ri(Ge.throw(Gi))}catch(Bo){oo(Bo)}},Ri=Gi=>Gi.done?fn(Gi.value):Promise.resolve(Gi.value).then(Ui,mo);Ri((Ge=Ge.apply(Ie,Xe)).next())}),rh=({data:Ie,submit:Xe,goBack:Ge,loading:fn,onTypeScore:oo,editPreview:Ui=!1,onSkipExamination:mo,selectValue:Ri,onExchange:Gi,handleMarkWrongQuestion:Bo})=>{var Qi,Uo,dr,vo,ko,Xo,xr,fi,Ho,me,hn;const so=(0,mt.useRef)(),[Co,Li]=(0,mt.useState)(null),[Wi,rr]=(0,mt.useState)(!1),[jr,Vr]=(0,mt.useState)(!1),tr=(0,mt.useRef)(),[si]=Zt.default.useForm(),Ar=(0,Ft.useParams)(),[Cs,yo]=(0,mt.useState)(!1);(0,mt.useEffect)(()=>{rr(!0)},[]),(0,mt.useEffect)(()=>{Ui||(0,Ot.Dk)("\u8BD5\u5377\u9884\u89C8")},[Ui]);const Xi=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Wo=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],cr={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898"},er={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Os=kn=>{var Di;const Jo=[];return mt.createElement(mt.Fragment,null,mt.createElement("aside",{className:It.single},(Di=kn==null?void 0:kn.choices)==null?void 0:Di.map((wi,pi)=>(wi.is_answer&&Jo.push(Wo[pi]),mt.createElement("ul",{key:pi},mt.createElement("li",null,Wo[pi],"\u3001"),mt.createElement("li",null,mt.createElement(Bt.Z,{value:wi.choice_text})))))),mt.createElement("div",{className:It.analysis},mt.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Jo.join(""),mt.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Xi[kn.difficulty])),mt.createElement("aside",null,mt.createElement("span",{className:It.text},"\u89E3\u6790:"),mt.createElement(Bt.Z,{value:kn.analysis?kn.analysis:"\u6682\u65E0\u89E3\u6790"})),mt.createElement("ul",null,mt.createElement("li",null,mt.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(kn==null?void 0:kn.discipline_name)||"--"}/${kn==null?void 0:kn.sub_discipline_name}`),mt.createElement(we.Z,{title:kn==null?void 0:kn.tag_discipline_name},mt.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},mt.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),kn==null?void 0:kn.tag_discipline_name)))))},fs=(kn,Di)=>{var Jo;const wi=(Jo=kn==null?void 0:kn.standard_answer)==null?void 0:Jo.map((pi,Cr)=>{var Kr;return mt.createElement("div",{key:Cr},`\u7B54\u6848\uFF08\u586B\u7A7A${pi==null?void 0:pi.position}\uFF09\uFF1A${(Kr=pi==null?void 0:pi.answer_text)==null?void 0:Kr.join("\u3001")}`)});return mt.createElement(mt.Fragment,null,mt.createElement("div",{className:It.analysis},mt.createElement("div",{style:{display:"flex"}},mt.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),mt.createElement("div",null,wi)),mt.createElement("aside",null,mt.createElement("span",{className:It.text},"\u89E3\u6790:"),mt.createElement(Bt.Z,{value:kn.analysis?kn.analysis:"\u6682\u65E0\u89E3\u6790"})),mt.createElement("ul",null,mt.createElement("li",null,mt.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Di?`${(Di==null?void 0:Di.discipline_name)||"--"}/${Di==null?void 0:Di.sub_discipline_name}`:`${(kn==null?void 0:kn.discipline_name)||"--"}/${kn==null?void 0:kn.sub_discipline_name}`),mt.createElement(we.Z,{title:Di?Di==null?void 0:Di.tag_discipline_name:kn==null?void 0:kn.tag_discipline_name},mt.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},mt.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Di?Di==null?void 0:Di.tag_discipline_name:kn==null?void 0:kn.tag_discipline_name)))))},Nl=kn=>{var Di;const Jo=(Di=kn==null?void 0:kn.standard_answer)==null?void 0:Di.map((wi,pi)=>mt.createElement("div",{key:pi},`\u7B54\u6848\uFF08\u586B\u7A7A${(wi==null?void 0:wi.position)||(wi==null?void 0:wi.exercise_choice_id)}\uFF09\uFF1A${wi==null?void 0:wi.answer_text}`));return mt.createElement(mt.Fragment,null,mt.createElement("div",{className:It.analysis},mt.createElement("div",{style:{display:"flex"}},mt.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),mt.createElement("div",null,Jo)),mt.createElement("aside",null,mt.createElement("span",{className:It.text},"\u89E3\u6790:"),mt.createElement(Bt.Z,{value:kn.analysis?kn.analysis:"\u6682\u65E0\u89E3\u6790"})),mt.createElement("ul",null,mt.createElement("li",null,mt.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(kn==null?void 0:kn.discipline_name)||"--"}/${kn==null?void 0:kn.sub_discipline_name}`),mt.createElement(we.Z,{title:kn==null?void 0:kn.tag_discipline_name},mt.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},mt.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),kn==null?void 0:kn.tag_discipline_name)))))},sr=(kn,Di)=>{var Jo;return mt.createElement("div",{className:It.analysis},mt.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Jo=kn==null?void 0:kn.answer_texts)==null?void 0:Jo[0]),mt.createElement("aside",null,mt.createElement("span",{className:It.text},"\u89E3\u6790:"),mt.createElement(Bt.Z,{value:kn.analysis?kn.analysis:"\u6682\u65E0\u89E3\u6790"})),mt.createElement("ul",null,mt.createElement("li",null,mt.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Di?`${(Di==null?void 0:Di.discipline_name)||"--"}/${Di==null?void 0:Di.sub_discipline_name}`:`${(kn==null?void 0:kn.discipline_name)||"--"}/${kn==null?void 0:kn.sub_discipline_name}`),mt.createElement(we.Z,{title:Di?Di==null?void 0:Di.tag_discipline_name:kn==null?void 0:kn.tag_discipline_name},mt.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},mt.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Di?Di==null?void 0:Di.tag_discipline_name:kn==null?void 0:kn.tag_discipline_name))))},Ds=kn=>{var Di,Jo;return mt.createElement("div",{className:It.analysis},mt.createElement("aside",null,mt.createElement("span",{className:It.text},"\u9884\u671F\u8F93\u51FA:"),mt.createElement(Bt.Z,{value:(Di=kn==null?void 0:kn.program_attr)==null?void 0:Di.description})),mt.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Jo=kn==null?void 0:kn.program_attr)==null?void 0:Jo.answer_text)||"--"),mt.createElement("aside",null,mt.createElement("span",{className:It.text},"\u89E3\u6790:"),mt.createElement(Bt.Z,{value:kn.analysis?kn.analysis:"\u6682\u65E0\u89E3\u6790"})),mt.createElement("ul",null,mt.createElement("li",null,mt.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(kn==null?void 0:kn.discipline_name)||"--"}/${kn==null?void 0:kn.sub_discipline_name}`),mt.createElement(we.Z,{title:kn==null?void 0:kn.tag_discipline_name},mt.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},mt.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),kn==null?void 0:kn.tag_discipline_name))))},ar=(kn,Di)=>{var Jo;return mt.createElement("div",null,(Jo=kn==null?void 0:kn.sub_item_banks)==null?void 0:Jo.map((wi,pi)=>{var Cr,Kr;const gs=[];return mt.createElement(mt.Fragment,null,mt.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},Di+1+"."+(pi+1),"\uFF08",cr[wi.item_type]||er[wi.item_type],"\uFF09",wi.name),(wi.item_type=="SINGLE"||wi.item_type=="MULTIPLE"||wi.item_type=="JUDGMENT"||wi.item_type=="single"||wi.item_type=="multiple"||wi.item_type=="judgement")&&mt.createElement(mt.Fragment,null,mt.createElement("aside",{className:It.single},(Cr=wi==null?void 0:wi.choices)==null?void 0:Cr.map(($o,ls)=>($o.is_answer&&gs.push(Wo[ls]),mt.createElement("ul",{key:ls},mt.createElement("li",null,Wo[ls],"\u3001"),mt.createElement("li",null,mt.createElement(Bt.Z,{value:$o.choice_text})))))),mt.createElement("div",{className:It.analysis},mt.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",gs.join(""),mt.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Xi[wi.difficulty])),mt.createElement("aside",null,mt.createElement("span",{className:It.text},"\u89E3\u6790:"),mt.createElement(Bt.Z,{value:wi.analysis?wi.analysis:"\u6682\u65E0\u89E3\u6790"})),mt.createElement("ul",null,mt.createElement("li",null,mt.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(kn==null?void 0:kn.discipline_name)||"--"}/${kn==null?void 0:kn.sub_discipline_name}`),mt.createElement(we.Z,{title:kn==null?void 0:kn.tag_discipline_name},mt.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},mt.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),kn==null?void 0:kn.tag_discipline_name))))),(wi.item_type=="COMPLETION"||wi.item_type=="completion")&&fs(wi,kn),(wi.item_type=="SUBJECTIVE"||wi.item_type=="subjective")&&sr(wi,kn),((Kr=Ie==null?void 0:Ie.exam)==null?void 0:Kr.exercise_status)===3&&mt.createElement(Bl.Z,{className:"mt20",state:wi==null?void 0:wi.is_wrong,onClick:()=>{Bo==null||Bo({value:vl(Ca({},wi),{question_id:wi==null?void 0:wi.id,question_score:wi==null?void 0:wi.score})})}}))}))},wr=kn=>{var Di,Jo,wi;return mt.createElement("div",{style:{marginTop:"12px"}},(Jo=(Di=kn==null?void 0:kn.shixun)==null?void 0:Di.challenges)==null?void 0:Jo.map((pi,Cr)=>mt.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},mt.createElement("div",null,mt.createElement("span",{className:"mr5"},"\u7B2C",Cr+1,"\u5173"),mt.createElement(we.Z,{key:Cr,title:pi==null?void 0:pi.challenge_name},mt.createElement("span",null,(0,Ot.Pq)(pi==null?void 0:pi.challenge_name,44)))),Ui&&mt.createElement("div",null,"\u5206\u503C\uFF1A",pi.score,"\u5206"))),mt.createElement(Ft.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(wi=kn==null?void 0:kn.shixun)==null?void 0:wi.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),mt.createElement("div",{style:{clear:"both"}}))},Rr=kn=>{let Di=kn.questions_score/kn.questions_count;Ht.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:mt.createElement("div",{className:It.modalColumn},mt.createElement("div",{className:It.modalRow,style:{justifyContent:"flex-start"}},mt.createElement("sup",{className:It.sup},"*"),mt.createElement("span",null,kn==null?void 0:kn.name,"\uFF1A"),mt.createElement(he.Z,{min:0,precision:1,defaultValue:Di,onChange:Jo=>{Di=Jo}}),mt.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ks(void 0,null,function*(){var Jo;if(!Di)return Rt.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const wi={type:kn==null?void 0:kn.type,score:Di,scoreTotal:Number((Jo=Di*kn.questions_count)==null?void 0:Jo.toFixed(1))};oo(wi)})})},os=()=>{let kn="";Ht.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:mt.createElement("div",{className:It.modalColumn},mt.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},mt.createElement("img",{style:{marginRight:5},src:Fe.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),mt.createElement("div",{className:It.modalRow,style:{marginTop:20}},mt.createElement("sup",{className:It.sup},"*"),mt.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),mt.createElement(be.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:kn,onChange:Di=>{kn=Di.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ks(void 0,null,function*(){var Di;if(!kn)return Rt.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Jo=[],wi=[],pi=[],Cr=[];(Di=Ie==null?void 0:Ie.questionList)==null||Di.forEach(gs=>{var $o;($o=gs.questions)==null||$o.forEach(ls=>{let Er=gs.questions_score/gs.questions_count;Er=Er&&Er.toFixed(1),gs.type==="COMBINATION"&&pi.push({id:ls.id,sub_item_bank_ids:ls.sub_item_banks.map(pa=>pa.id)}),gs.type==="PRACTICAL"?Cr.push(ls.id):(Jo.push(ls.id),wi.push(Er))})}),console.log("-----",pi),yield Xe({item_bank_ids:Jo,item_bank_scores:wi,name:kn,combination_item_banks:pi,shixun_ids:Cr})})})},Sr=(kn,Di,Jo,wi)=>{var pi;const Cr=`${location.pathname}${location.search}`,Kr=(pi=wi.questions)==null?void 0:pi.map(gs=>gs==null?void 0:gs.id);if(Cr.includes("exercise"))tr.current={id:kn,ids:Kr,type:Di,index:Jo},Vr(!0);else{let gs=Ht.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ks(void 0,null,function*(){gs.update({cancelButtonProps:{disabled:!0}}),yield Gi({single_question_id:kn,seleted_item_bank_ids:Kr},{type:Di,index:Jo}),gs.update({cancelButtonProps:{disabled:!1}}),Rt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},zu=kn=>{var Di;const Jo=(Di=kn.questions)==null?void 0:Di.map(Cr=>Cr==null?void 0:Cr.id),wi=kn.name;let pi=Ht.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${wi}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ks(void 0,null,function*(){pi.update({cancelButtonProps:{disabled:!0}}),yield Gi({seleted_item_bank_ids:Jo},{type:kn.type}),pi.update({cancelButtonProps:{disabled:!1}}),Rt.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${wi}\u8BD5\u9898`)})})},So=()=>{let kn=Ht.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ks(void 0,null,function*(){kn.update({cancelButtonProps:{disabled:!0}}),yield Gi(),kn.update({cancelButtonProps:{disabled:!1}}),Rt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},Ld=kn=>{console.log(kn,"key"),mo(kn-1)},fr=(kn,Di)=>{var Jo,wi;if(Di==="SINGLE")return mt.createElement(mt.Fragment,null,mt.createElement(co,{ref:so,editData:kn,isEdit:!0}),mt.createElement(ge.Z,null));if(Di==="MULTIPLE")return mt.createElement(mt.Fragment,null,mt.createElement(li,{ref:so,editData:kn,isEdit:!0}),mt.createElement(ge.Z,null));if(Di==="JUDGMENT")return mt.createElement(mt.Fragment,null,mt.createElement(cn,{ref:so,editData:kn,isEdit:!0}),mt.createElement(ge.Z,null));if(Di==="COMPLETION")return mt.createElement(mt.Fragment,null,mt.createElement(Tt,{ref:so,editData:kn,isEdit:!0}),mt.createElement(ge.Z,null));if(Di==="SUBJECTIVE")return mt.createElement(mt.Fragment,null,mt.createElement(Vn,{ref:so,editData:kn,isEdit:!0}),mt.createElement(ge.Z,null));if(Di==="COMBINATION")return mt.createElement(mt.Fragment,null,mt.createElement(iu,{ref:so,editData:kn,isEdit:!0}),mt.createElement(ge.Z,null));if(Di==="BPROGRAM")return mt.createElement(mt.Fragment,null,mt.createElement(Zt.default,{form:si,style:{marginTop:20},onFinishFailed:pi=>{var Cr,Kr;pi.errorFields[0].name.includes("standard_answers")?Rt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):Rt.ZP.error(pi.errorFields[0].errors[0]),si.scrollToField((Kr=(Cr=pi==null?void 0:pi.errorFields)==null?void 0:Cr[0])==null?void 0:Kr.name,{behavior:"smooth",block:"center"})},onFinish:pi=>Ks(void 0,null,function*(){var Cr;let Kr=vl(Ca({question_score:kn.score},pi),{question_type:8,hack:vl(Ca({},pi.hack),{difficult:kn.program_attr.difficult}),hack_codes:vl(Ca({},pi.hack_codes),{code:Hs.Base64.encode((Cr=pi.hack_codes)==null?void 0:Cr.code)})});Cs&&(Kr.is_cover=1);const gs=yield(0,_t.ZP)(`/api/exercise_questions/${kn.id}.json`,{method:"put",body:Kr});(gs==null?void 0:gs.status)===0&&(Rt.ZP.success("\u7F16\u8F91\u6210\u529F"),Ld(Ri+1)),Li(null)})},mt.createElement(fa.tc,{form:si,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Jo=kn==null?void 0:kn.program_attr)==null?void 0:Jo.identifier,answerKey:"standard_answers"}),mt.createElement(ge.Z,null)));if(Di==="PROGRAM"&&Ft.history.push(`/problems/${(wi=kn==null?void 0:kn.program_attr)==null?void 0:wi.identifier}/edit?type=exercises&express_id=${Ar.categoryId}&question_id=${kn==null?void 0:kn.id}&score=${kn==null?void 0:kn.score}&callback_url=${location.pathname}&select=${Ri}&exercise=true`),Di==="PRACTICAL")return mt.createElement(mt.Fragment,null,mt.createElement(ni,{ref:so,editData:kn,isEdit:!0}),mt.createElement(ge.Z,null))},tf=(kn,Di)=>Ks(void 0,null,function*(){var Jo,wi,pi,Cr,Kr,gs;const $o=yield(Jo=so.current)==null?void 0:Jo.onSave();if(!$o)return;const ls=Lo=>{const Ua=Lo.map(Ys=>Ys.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(Ua).size!==Ua.length},Er={question_score:Di.score,analysis:$o.analysis};if(kn==="SINGLE"||kn==="MULTIPLE"||kn==="JUDGMENT"){if(kn!=="JUDGMENT"&&ls($o==null?void 0:$o.choices)){Rt.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Lo=[],Ua=[];Er.question_type=kn==="JUDGMENT"?2:1,Er.question_title=$o==null?void 0:$o.name,(wi=$o==null?void 0:$o.choices)==null||wi.forEach((ol,Ys)=>{Lo.push(ol.choice_text),ol!=null&&ol.is_answer&&Ua.push(Ys+1)}),Er.question_choices=Lo,Er.standard_answers=Ua}if(kn==="COMPLETION"){let Lo=(pi=$o==null?void 0:$o.standard_answers)==null?void 0:pi.map((Ys,Da)=>(Ys==null?void 0:Ys.score)<=0?Da+1:null).filter(Ys=>Ys!==null);if((Lo==null?void 0:Lo.length)>0)return Rt.ZP.warning(`\u7B2C${Lo.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let Ua=(Cr=$o==null?void 0:$o.standard_answers)==null?void 0:Cr.reduce((Ys,Da)=>Ys+(Number(Da==null?void 0:Da.score)||0),0);if(parseFloat(Ua.toFixed(2))!=(Er==null?void 0:Er.question_score))return Rt.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;Er.is_ordered=$o.is_ordered,Er.question_title=$o==null?void 0:$o.name,Er.use_blank_score=$o==null?void 0:$o.use_blank_score,Er.question_type=3;const ol=[];(Kr=$o==null?void 0:$o.standard_answers)==null||Kr.forEach((Ys,Da)=>{ol.push({choice_id:Ys.position,answer_text:Ys.answer_text,score:Ys.score})}),Er.standard_answers=ol,Er.downcase=$o==null?void 0:$o.downcase,Er.no_space=$o==null?void 0:$o.no_space}if(kn==="SUBJECTIVE"&&(console.log("editorData"),console.log($o),Er.question_title=$o==null?void 0:$o.name,Er.question_type=4,Er.answer_texts=$o==null?void 0:$o.answer_texts,Er.use_keywords=$o==null?void 0:$o.use_keywords,Er.keywords=$o==null?void 0:$o.keywords),kn==="COMBINATION"){Er.question_title=$o==null?void 0:$o.name,Er.question_type=7;try{Er.sub_questions=(gs=$o==null?void 0:$o.sub_item_banks)==null?void 0:gs.map((Lo,Ua)=>{var ol,Ys,Da;if((Lo==null?void 0:Lo.item_type)=="single"||(Lo==null?void 0:Lo.item_type)=="multiple"){if(ls(Lo==null?void 0:Lo.choices))throw new Error(`\u7B2C${Ua+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const kl=[],Gh=[];return(ol=Lo==null?void 0:Lo.choices)==null||ol.forEach((su,Wh)=>{kl.push(su.choice_text),su!=null&&su.is_answer&&Gh.push(Wh+1)}),{id:Lo.id,question_id:Lo.id,question_title:Lo.name,difficulty:Lo.difficulty,question_type:(Lo==null?void 0:Lo.item_type)=="single"?0:(Lo==null?void 0:Lo.item_type)=="multiple"?1:2,question_choices:kl,standard_answers:Gh,analysis:Lo.analysis,question_score:Lo==null?void 0:Lo.score}}else if((Lo==null?void 0:Lo.item_type)=="completion"){let kl=(Ys=Lo==null?void 0:Lo.standard_answer)==null?void 0:Ys.reduce((su,Wh)=>su+(Number(Wh==null?void 0:Wh.score)||0),0);if(parseFloat(kl.toFixed(2))!=(Lo==null?void 0:Lo.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const Gh=[];return(Da=Lo==null?void 0:Lo.standard_answer)==null||Da.forEach((su,Wh)=>{Gh.push({choice_id:su.position,answer_text:su.answer_text,score:su.score})}),{id:Lo.id,question_id:Lo.id,is_ordered:Lo.is_ordered,question_title:Lo.name,difficulty:Lo.difficulty,question_type:3,standard_answers:Gh,use_blank_score:Lo.use_blank_score,analysis:Lo.analysis,downcase:Lo==null?void 0:Lo.downcase,no_space:Lo==null?void 0:Lo.no_space,question_score:Lo==null?void 0:Lo.score}}else if((Lo==null?void 0:Lo.item_type)=="subjective")return{id:Lo.id,question_id:Lo.id,question_title:Lo.name,question_type:4,difficulty:Lo.difficulty,answer_texts:Lo==null?void 0:Lo.answer_texts,analysis:Lo.analysis,question_score:Lo==null?void 0:Lo.score,use_keywords:Lo.use_keywords,keywords:Lo==null?void 0:Lo.keywords}})}catch(Lo){Rt.ZP.warning(Lo.message);return}delete Er.analysis}let pa=!1;(Di==null?void 0:Di.is_my)===1&&(pa=yield new Promise((Ua,ol)=>{Ht.default.confirm({title:"\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u4E8E\u8BD5\u9898\u5E93\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u9898\u76EE\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",keyboard:!1,onOk:()=>{Ua(!0)},onCancel:()=>{Ua(!1)}})})),pa&&(Er.is_cover=1);const ru=kn!=="PRACTICAL"?yield(0,_t.ZP)(`/api/exercise_questions/${Di.id}.json`,{method:"put",body:Er}):yield(0,_t.ZP)(`/api/exercise_questions/${Di.id}/update_shixun_score.json`,{method:"post",body:Ca({},$o)});(ru==null?void 0:ru.status)===0&&(Rt.ZP.success("\u7F16\u8F91\u6210\u529F"),Ld(Ri+1),Li(null))}),sh=()=>Ks(void 0,null,function*(){(0,Ft.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,_t.ZP)(`/api/exercises/${Ar.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield mo(Ri),Rt.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,Ft.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),ah=(Qi=Ie==null?void 0:Ie.questionList)==null?void 0:Qi.reduce((kn,Di)=>kn+Number(Di.questions_score),0),Fd=Ui&&((Uo=Ie==null?void 0:Ie.exam)==null?void 0:Uo.exercise_status)!==1;return mt.createElement("section",{className:It.wrap},mt.createElement("div",{id:"id_left_preview",className:It.left,onMouseEnter:kn=>{const Di=document.getElementById("id_left_preview");Di.style.overflowY="auto"},onMouseLeave:kn=>{const Di=document.getElementById("id_left_preview");Di.style.overflowY="hidden"}},mt.createElement("div",{className:It.title},mt.createElement("div",{className:"body-overflow-initial"},mt.createElement("b",null),mt.createElement("span",null,"\u7B54\u9898\u5361"))),mt.createElement("div",{className:It.total},mt.createElement("div",null,mt.createElement("img",{src:Ue}),mt.createElement("span",null,"\u9898\u6570(\u9053)"),mt.createElement("aside",null,Ie==null?void 0:Ie.all_questions_count)),mt.createElement("div",{className:"mr30 ml30"},mt.createElement("img",{src:gn}),mt.createElement("span",null,"\u603B\u5206(\u5206)"),mt.createElement("aside",null,ah&&ah.toFixed(1))),mt.createElement("div",null,mt.createElement("img",{src:Ct}),mt.createElement("span",null,"\u65F6\u957F(\u5206)"),mt.createElement("aside",null,((dr=Ie==null?void 0:Ie.exam)==null?void 0:dr.time)===-1||((vo=Ie==null?void 0:Ie.exam)==null?void 0:vo.time)===null?"\u4E0D\u9650":(ko=Ie==null?void 0:Ie.exam)==null?void 0:ko.time))),(Xo=Ie==null?void 0:Ie.questionList)==null?void 0:Xo.map((kn,Di)=>{var Jo;return mt.createElement("div",{className:It.list,key:Di},mt.createElement("div",{className:It.name},mt.createElement("b",null),mt.createElement("span",null,kn.name)),mt.createElement("aside",null,mt.createElement("div",null,"\u5171",mt.createElement("span",{className:It.b},kn.questions_count),"\u9898 ",mt.createElement("span",{className:It.l},"|"),"\u5171",mt.createElement("span",{className:It.r},kn.questions_score),"\u5206"),mt.createElement("div",{className:It.answerSheet},(Jo=kn==null?void 0:kn.questions)==null?void 0:Jo.map((wi,pi)=>mt.createElement("div",{onClick:()=>{const Cr=`Anchor_${wi==null?void 0:wi.id}`;let Kr=document.getElementById(Cr);Kr&&setTimeout(()=>Kr.scrollIntoView({block:"center",behavior:"smooth"}))},key:wi==null?void 0:wi.id,className:It.tag},pi+1)))))})),mt.createElement("div",{className:It.right},mt.createElement("div",{className:It.examName,id:"examName"},mt.createElement("div",{className:It.name},mt.createElement(we.Z,{title:(xr=Ie==null?void 0:Ie.exam)==null?void 0:xr.name,getPopupContainer:kn=>kn.parentNode},mt.createElement("span",{className:It.t},(fi=Ie==null?void 0:Ie.exam)==null?void 0:fi.name))),Ui&&((Ho=Ie==null?void 0:Ie.exam)==null?void 0:Ho.exercise_status)===1&&mt.createElement(bs.op,{openLoading:!0,shape:"default",onClick:()=>{Ht.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u6839\u636E\u6700\u65B0\u7684\u968F\u673A\u7EC4\u5377\u62BD\u9898\u89C4\u5219\u91CD\u65B0\u751F\u6210\u8BD5\u5377\u5417\uFF1F",onOk:()=>{sh()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!Ui&&mt.createElement(Kt.ZP,{onClick:So,type:"primary"},"\u968F\u673A\u66F4\u6362")),mt.createElement("div",{className:It.topWarp},(me=Ie==null?void 0:Ie.questionList)==null?void 0:me.map((kn,Di)=>{var Jo,wi;return mt.createElement(mt.Fragment,{key:Di},mt.createElement("div",{className:It.head,style:Di===0?{border:0,marginTop:-16}:{}},mt.createElement("div",{className:It.name},mt.createElement("b",null),mt.createElement("span",null,kn.name)),mt.createElement("div",{className:It.so},"\u5171",mt.createElement("span",{className:It.b},kn.questions_count," "),"\u9898 ",kn.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Jo=kn==null?void 0:kn.questions)==null?void 0:Jo.map(pi=>{var Cr;return(Cr=pi==null?void 0:pi.sub_item_banks)==null?void 0:Cr.length}).reduce((pi,Cr)=>pi+Cr)}\u5C0F\u9898\uFF09`,mt.createElement("span",{className:It.l},"|"),"\u5171",mt.createElement("span",{className:It.r},kn.questions_score),"\u5206"),!Ui&&mt.createElement("div",{className:It.btn},mt.createElement(Kt.ZP,{onClick:()=>{Rr(kn)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),mt.createElement(Kt.ZP,{onClick:()=>zu(kn),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(wi=kn==null?void 0:kn.questions)==null?void 0:wi.map((pi,Cr)=>{var Kr,gs,$o;return Co===(pi==null?void 0:pi.id)?mt.createElement("div",{id:`Anchor_${pi==null?void 0:pi.id}`,className:It.content,style:{padding:0,marginTop:24},key:pi==null?void 0:pi.id},mt.createElement("div",{style:{float:"right",marginTop:`${(kn==null?void 0:kn.type)==="PRACTICAL"?"-2px":"-6px"}`}},mt.createElement(Kt.ZP,{onClick:()=>Li(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),mt.createElement(Kt.ZP,{onClick:()=>{tf(kn==null?void 0:kn.type,pi)},type:"primary"},"\u4FDD\u5B58")),fr(pi,kn.type)):mt.createElement("div",{id:`Anchor_${pi==null?void 0:pi.id}`,className:It.content,key:pi==null?void 0:pi.id},mt.createElement("div",{className:It.titleWrap},(pi==null?void 0:pi.item_type)==="bprogram"?mt.createElement(Bt.Z,{style:{paddingRight:10},value:Cr+1+"\u3001"+((Kr=pi==null?void 0:pi.program_attr)==null?void 0:Kr.description)}):mt.createElement(Bt.Z,{style:{paddingRight:10},className:It.titleHtml,value:Cr+1+`\u3001${(pi==null?void 0:pi.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(pi==null?void 0:pi.name)}),Ui&&mt.createElement(Kt.ZP,{onClick:()=>{var ls,Er,pa;if(Co){Rt.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}si.setFieldsValue({standard_answers:pi==null?void 0:pi.standard_answer,hack:Ca(Ca({},pi),pi==null?void 0:pi.program_attr),hack_codes:vl(Ca({},pi==null?void 0:pi.program_attr),{code:Hs.Base64.decode(((ls=pi==null?void 0:pi.program_attr)==null?void 0:ls.code)||"")}),hack_sets:Ca({},(Er=pi==null?void 0:pi.hack_sets)==null?void 0:Er[0])}),(pi==null?void 0:pi.item_type)=="program"?Ft.history.push(`/problems/newedit/${(pa=pi==null?void 0:pi.program_attr)==null?void 0:pa.identifier}?type=exercises&express_id=${Ar.categoryId}&question_id=${pi==null?void 0:pi.id}&score=${pi==null?void 0:pi.score}&exercise=true&callback_url=/classrooms/${Ar.coursesId}/exercise/${Ar.categoryId}/detail?random=true`):Li(pi==null?void 0:pi.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!Fd&&mt.createElement(Kt.ZP,{disabled:Fd,className:"ml20",onClick:()=>Sr(pi==null?void 0:pi.id,kn.type,Cr,kn),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(pi==null?void 0:pi.item_type)==="bprogram"&&mt.createElement(Bt.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:It.titleHtml,value:Hs.Base64.decode(((gs=pi==null?void 0:pi.program_attr)==null?void 0:gs.code)||"")}),(kn.type==="SINGLE"||kn.type==="JUDGMENT"||kn.type==="MULTIPLE")&&Os(pi),kn.type==="COMPLETION"&&fs(pi),kn.type==="SUBJECTIVE"&&sr(pi),kn.type==="PROGRAM"&&Ds(pi),kn.type==="BPROGRAM"&&Nl(pi),kn.type==="COMBINATION"&&ar(pi,Cr),kn.type==="PRACTICAL"&&wr(pi),(($o=Ie==null?void 0:Ie.exam)==null?void 0:$o.exercise_status)===3&&!["COMBINATION"].includes(kn.type)&&mt.createElement(Bl.Z,{className:"mt20",state:pi==null?void 0:pi.is_wrong,onClick:()=>{Bo==null||Bo({value:vl(Ca({},pi),{question_id:pi==null?void 0:pi.id,question_score:pi==null?void 0:pi.score})})}}))}))}))),Ui?mt.createElement(bs.vr,null,mt.createElement(ue.Z,{showTotal:Ot.rU,total:(hn=Ie==null?void 0:Ie.exam)==null?void 0:hn.total_num,pageSize:1,current:Ri+1,showSizeChanger:!1,onChange:Ld,showQuickJumper:!1,hideOnSinglePage:!1})):mt.createElement(bs.vr,{LeftContent:mt.createElement(bs.op,{onClick:Ge,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:mt.createElement(de.Z,{align:"middle"},mt.createElement(ve.Z,{color:"#55575D",overlayClassName:It.popover,open:Wi,getPopupContainer:kn=>kn==null?void 0:kn.parentNode,content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},mt.createElement(bs.op,{onMouseEnter:()=>rr(!0),onMouseLeave:()=>rr(!1),onClick:()=>os(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),mt.createElement(bs.op,{shape:"default",type:"primary",onClick:()=>Xe(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),mt.createElement(Ru,{visible:jr,questionParams:tr.current,onRandomExchange:()=>Ks(void 0,null,function*(){const kn=tr.current;yield Gi({single_question_id:kn.id,seleted_item_bank_ids:kn.ids},{type:kn.type,index:kn.index}),Vr(!1)}),selectFromProblemSet:()=>{const kn=tr.current,Di=`${location.pathname}${location.search}`;Di.includes("exercise")&&Ft.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${kn.id}&qtype=${kn.type}&exerciseid=${Ar.categoryId}&from=${Di}`)},onCancel:()=>{Vr(!1)}}))}},80440:function(xn,vn,Pt){"use strict";Pt.r(vn),Pt.d(vn,{default:function(){return at}});var mt=Pt(59301),It=Pt(42203),Zt={flex_box_center:"flex_box_center___kQBcj",flex_space_between:"flex_space_between___Znlbo",flex_box_vertical_center:"flex_box_vertical_center___CPD50",flex_box_center_end:"flex_box_center_end___jzPvK",flex_box_column:"flex_box_column___cvIBS",wrap:"wrap___lab8O",crumbs:"crumbs___qvTza"},we=Pt(54675),Ht=Pt(8591),he=Pt(78485),Rt=Pt(70635),be=Pt(58130),ge=Pt(59301),Kt=Object.defineProperty,ue=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,At=(ft,vt,Ct)=>vt in ft?Kt(ft,vt,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):ft[vt]=Ct,nt=(ft,vt)=>{for(var Ct in vt||(vt={}))de.call(vt,Ct)&&At(ft,Ct,vt[Ct]);if(ue)for(var Ct of ue(vt))ve.call(vt,Ct)&&At(ft,Ct,vt[Ct]);return ft},et=(ft,vt,Ct)=>new Promise((Bt,Ft)=>{var Ot=Xt=>{try{te(Ct.next(Xt))}catch(Me){Ft(Me)}},_t=Xt=>{try{te(Ct.throw(Xt))}catch(Me){Ft(Me)}},te=Xt=>Xt.done?Bt(Xt.value):Promise.resolve(Xt.value).then(Ot,_t);te((Ct=Ct.apply(ft,vt)).next())});const ht=({paperlibrary:ft,user:vt,globalSetting:Ct,dispatch:Bt,location:Ft})=>{var Ot,_t,te,Xt;const[Me]=(0,It.useSearchParams)(),qt=Me.get("select")||0,[Ne,ne]=(0,mt.useState)(!1),[Ce,Ue]=(0,mt.useState)(!0),[Ze,tn]=(0,mt.useState)(Number(qt)),[ln,ie]=(0,mt.useState)({}),Gt=(0,It.useParams)(),{userInfo:Ae}=vt,{actionTabs:Sn}=ft;(0,mt.useEffect)(()=>(Bt({type:"globalSetting/footerToggle",payload:!1}),()=>{Bt({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,mt.useEffect)(()=>(Bt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Bt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),Bt({type:"exercise/getWorkSetting",payload:nt({},Gt)}),()=>{Bt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Bt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}),[]),(0,mt.useEffect)(()=>{gn(Ze)},[]),(0,mt.useEffect)(()=>{var We;(We=Sn==null?void 0:Sn.params)!=null&&We.isUpdateData&&gn(Ze)},[(Ot=Sn==null?void 0:Sn.params)==null?void 0:Ot.isUpdateData]);const gn=(We=0)=>et(void 0,null,function*(){console.log(Gt),Ue(!0);const fe=yield(0,Rt.ZP)(`/api/exercises/${Gt.categoryId}/preview_random_exercise.json`,{method:"get",params:{num:We}});Bt({type:"paperlibrary/setActionTabs",payload:{params:{isUpdateData:!1}}}),Ue(!1),ie((0,be.PF)(fe))}),Fe=()=>{It.history.push(`/classrooms/${Gt.coursesId}/exercise`)},Ke=()=>{alert("\u4FDD\u5B58")},rn=(We,fe)=>et(void 0,null,function*(){const An=yield(0,Rt.ZP)(`/api/exercises/${Gt.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:We==null?void 0:We.single_question_id}});An!=null&&An.question&&(Ht.ZP.info("\u6362\u9898\u6210\u529F"),gn(Ze))}),Fn=We=>et(void 0,null,function*(){document.body.scrollIntoView(),tn(We),yield gn(We)}),Pn=We=>{Bt({type:"exercise/setActionTabs",payload:{key:"\u6807\u8BB0\u9519\u9898",params:We}})};return console.log((0,It.useLocation)(),"location333"),ge.createElement("section",{className:Zt.wrap},ge.createElement(he.Z,{loading:Ce,active:!0,paragraph:{rows:5}},((te=(_t=(0,It.useLocation)())==null?void 0:_t.pathname)==null?void 0:te.includes("preview"))&&ge.createElement("div",{className:Zt.crumbs},ge.createElement("b",null),ge.createElement("span",{className:"current",onClick:()=>It.history.push(`/classrooms/${Gt.coursesId}/exercise`)},`${(Xt=Ae==null?void 0:Ae.course)==null?void 0:Xt.course_name}>`),ge.createElement("span",{className:"current",onClick:()=>It.history.push(`/classrooms/${Gt.coursesId}/exercise`)},"\u8BD5\u5377\u5217\u8868>"),ge.createElement("span",{style:{color:"#bebebe"}},"\u9884\u89C8")),ge.createElement(we.Z,{loading:Ne,submit:Ke,goBack:Fe,data:ln,selectValue:Ze,editPreview:!0,onExchange:rn,onSkipExamination:Fn,handleMarkWrongQuestion:Pn})))};var at=(0,It.connect)(({paperlibrary:ft,user:vt,globalSetting:Ct})=>({paperlibrary:ft,user:vt,globalSetting:Ct}))(ht)},31087:function(xn,vn,Pt){"use strict";Pt.d(vn,{AL:function(){return Ct},Iy:function(){return ue},Qv:function(){return At},ez:function(){return vt},jb:function(){return de}});var mt=Pt(32834),It=Pt.n(mt),Zt=Pt(11690),we=Pt.n(Zt);let Ht=1;function he(te,Xt){const Me=te.match(/^(\s+)(?:```)/);if(Me===null)return Xt;const qt=Me[1];return Xt.split(`
`).map(Ne=>{const ne=Ne.match(/^\s+/);if(ne===null)return Ne;const[Ce]=ne;return Ce.length>=qt.length?Ne.slice(qt.length):Ne}).join(`
`)}let Rt=[],be=["<ul>"];const ge=new(It()).Renderer,Kt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ue(){Rt.length=0,be=["<ul>"]}const de={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ve(te,Xt,Me,qt){if(Xt>=te.length||te[Xt].level<=Me)return Xt;var Ne=te[Xt];qt.push("<li><a href='#"+Ht+Ne.anchor+"'>"+Ne.text+"</a>"),Xt++;var ne=[];return Xt=ve(te,Xt,Ne.level,ne),ne.length>0&&(qt.push("<ul>"),ne.forEach(function(Ce){qt.push(Ce)}),qt.push("</ul>")),qt.push("</li>"),Xt=ve(te,Xt,Me,qt),Xt}function At(){return ve(Rt,0,0,be),be.push("</ul>"),be.join("")}const nt={heading(te){const Xt=Kt.exec(te);if(Ht+=1,Xt)return{type:"heading",raw:Xt[0],depth:Xt[1].length,text:Xt[2]}},fences(te){const Xt=this.rules.block.fences.exec(te);if(Xt){const Me=Xt[0];let qt=he(Me,Xt[3]||"");const Ne=Xt[2]?Xt[2].trim():Xt[2];if(["latex","katex","math"].indexOf(Ne)>=0){const ne=at(),Ce=qt;qt=ne,ft[ne]={type:"block",expression:Ce}}return{type:"code",raw:Me,lang:Ne,text:qt}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const at=()=>`__special_katext_id_${ht++}__`;let ft={};function vt(){return ft}function Ct(){ht=0,ft={}}function Bt(te){return te=te.replace(et,(Xt,Me)=>{const qt=at();return ft[qt]={type:"inline",expression:Me},qt}),te}const Ft=ge.listitem;ge.listitem=function(te){return Ft(Bt(te))};const Ot=ge.paragraph;ge.paragraph=function(te){return Ot(Bt(te))};const _t=ge.tablecell;ge.tablecell=function(te,Xt){return _t(Bt(te),Xt)},ge.code=function(te,Xt,Me){const qt=(Xt||"").match(/\S*/)[0];return qt?["latex","katex","math"].indexOf(qt)>=0?`<p class='editormd-tex'>${te}</p>`:`<pre class="prettyprint linenums"><code class="language-${Xt}">${Me?te:(0,Zt.escape)(te,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Me?te:(0,Zt.escape)(te,!0))+"</code></pre>"},ge.heading=function(te,Xt,Me){let qt=this.options.headerPrefix+Me.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Rt.push({anchor:qt,level:Xt,text:te}),"<h"+Xt+' id="'+Ht+qt+'">'+te+"</h"+Xt+">"},It().setOptions({silent:!0,gfm:!0,pedantic:!1}),It().use({tokenizer:nt,renderer:ge}),vn.ZP=It()},77578:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return mt}});const mt=It=>It?typeof It=="function"?It():It:null},56762:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return It}});var mt=Pt(59301);function It(){const[,Zt]=mt.useReducer(we=>we+1,0);return Zt}},24905:function(xn,vn,Pt){"use strict";Pt.d(vn,{default:function(){return Ot}});var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(5630),we=Pt(59301),Ht=Pt(36355),he=Pt(1684),Rt=Pt(32441),ge=we.createContext(null),Kt=Pt(98447),ue=Pt(14088),de=Pt(4572),ve=function(_t,te){var Xt={};for(var Me in _t)Object.prototype.hasOwnProperty.call(_t,Me)&&te.indexOf(Me)<0&&(Xt[Me]=_t[Me]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,Me=Object.getOwnPropertySymbols(_t);qt<Me.length;qt++)te.indexOf(Me[qt])<0&&Object.prototype.propertyIsEnumerable.call(_t,Me[qt])&&(Xt[Me[qt]]=_t[Me[qt]]);return Xt};const At=(_t,te)=>{var Xt;const{prefixCls:Me,className:qt,rootClassName:Ne,children:ne,indeterminate:Ce=!1,style:Ue,onMouseEnter:Ze,onMouseLeave:tn,skipGroup:ln=!1,disabled:ie}=_t,Gt=ve(_t,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Ae,direction:Sn,checkbox:gn}=we.useContext(Ht.E_),Fe=we.useContext(ge),{isFormItemInput:Ke}=we.useContext(Rt.aM),rn=we.useContext(he.Z),Fn=(Xt=(Fe==null?void 0:Fe.disabled)||ie)!==null&&Xt!==void 0?Xt:rn,Pn=we.useRef(Gt.value);we.useEffect(()=>{Fe==null||Fe.registerValue(Gt.value)},[]),we.useEffect(()=>{if(!ln)return Gt.value!==Pn.current&&(Fe==null||Fe.cancelValue(Pn.current),Fe==null||Fe.registerValue(Gt.value),Pn.current=Gt.value),()=>Fe==null?void 0:Fe.cancelValue(Gt.value)},[Gt.value]);const We=Ae("checkbox",Me),[fe,An]=(0,Kt.ZP)(We),Hn=Object.assign({},Gt);Fe&&!ln&&(Hn.onChange=function(){Gt.onChange&&Gt.onChange.apply(Gt,arguments),Fe.toggleOption&&Fe.toggleOption({label:ne,value:Gt.value})},Hn.name=Fe.name,Hn.checked=Fe.value.includes(Gt.value));const un=It()(`${We}-wrapper`,{[`${We}-rtl`]:Sn==="rtl",[`${We}-wrapper-checked`]:Hn.checked,[`${We}-wrapper-disabled`]:Fn,[`${We}-wrapper-in-form-item`]:Ke},gn==null?void 0:gn.className,qt,Ne,An),De=It()({[`${We}-indeterminate`]:Ce},de.A,An),He=Ce?"mixed":void 0;return fe(we.createElement(ue.Z,{component:"Checkbox",disabled:Fn},we.createElement("label",{className:un,style:Object.assign(Object.assign({},gn==null?void 0:gn.style),Ue),onMouseEnter:Ze,onMouseLeave:tn},we.createElement(Zt.Z,Object.assign({"aria-checked":He},Hn,{prefixCls:We,className:De,disabled:Fn,ref:te})),ne!==void 0&&we.createElement("span",null,ne))))};var et=we.forwardRef(At),ht=Pt(26390),at=Pt(64002),ft=function(_t,te){var Xt={};for(var Me in _t)Object.prototype.hasOwnProperty.call(_t,Me)&&te.indexOf(Me)<0&&(Xt[Me]=_t[Me]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,Me=Object.getOwnPropertySymbols(_t);qt<Me.length;qt++)te.indexOf(Me[qt])<0&&Object.prototype.propertyIsEnumerable.call(_t,Me[qt])&&(Xt[Me[qt]]=_t[Me[qt]]);return Xt};const vt=(_t,te)=>{const{defaultValue:Xt,children:Me,options:qt=[],prefixCls:Ne,className:ne,rootClassName:Ce,style:Ue,onChange:Ze}=_t,tn=ft(_t,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:ln,direction:ie}=we.useContext(Ht.E_),[Gt,Ae]=we.useState(tn.value||Xt||[]),[Sn,gn]=we.useState([]);we.useEffect(()=>{"value"in tn&&Ae(tn.value||[])},[tn.value]);const Fe=we.useMemo(()=>qt.map(Ee=>typeof Ee=="string"||typeof Ee=="number"?{label:Ee,value:Ee}:Ee),[qt]),Ke=Ee=>{gn(Jt=>Jt.filter(ye=>ye!==Ee))},rn=Ee=>{gn(Jt=>[].concat((0,ht.Z)(Jt),[Ee]))},Fn=Ee=>{const Jt=Gt.indexOf(Ee.value),ye=(0,ht.Z)(Gt);Jt===-1?ye.push(Ee.value):ye.splice(Jt,1),"value"in tn||Ae(ye),Ze==null||Ze(ye.filter(Re=>Sn.includes(Re)).sort((Re,Be)=>{const Qt=Fe.findIndex(Tt=>Tt.value===Re),ce=Fe.findIndex(Tt=>Tt.value===Be);return Qt-ce}))},Pn=ln("checkbox",Ne),We=`${Pn}-group`,[fe,An]=(0,Kt.ZP)(Pn),Hn=(0,at.Z)(tn,["value","disabled"]),un=qt.length?Fe.map(Ee=>we.createElement(et,{prefixCls:Pn,key:Ee.value.toString(),disabled:"disabled"in Ee?Ee.disabled:tn.disabled,value:Ee.value,checked:Gt.includes(Ee.value),onChange:Ee.onChange,className:`${We}-item`,style:Ee.style,title:Ee.title},Ee.label)):Me,De={toggleOption:Fn,value:Gt,disabled:tn.disabled,name:tn.name,registerValue:rn,cancelValue:Ke},He=It()(We,{[`${We}-rtl`]:ie==="rtl"},ne,Ce,An);return fe(we.createElement("div",Object.assign({className:He,style:Ue},Hn,{ref:te}),we.createElement(ge.Provider,{value:De},un)))},Ct=we.forwardRef(vt);var Bt=we.memo(Ct);const Ft=et;Ft.Group=Bt,Ft.__ANT_CHECKBOX=!0;var Ot=Ft},98447:function(xn,vn,Pt){"use strict";Pt.d(vn,{C2:function(){return Ht}});var mt=Pt(17313),It=Pt(37613),Zt=Pt(83116);const we=he=>{const{checkboxCls:Rt}=he,be=`${Rt}-wrapper`;return[{[`${Rt}-group`]:Object.assign(Object.assign({},(0,mt.Wf)(he)),{display:"inline-flex",flexWrap:"wrap",columnGap:he.marginXS,[`> ${he.antCls}-row`]:{flex:1}}),[be]:Object.assign(Object.assign({},(0,mt.Wf)(he)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${be}`]:{marginInlineStart:0},[`&${be}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Rt]:Object.assign(Object.assign({},(0,mt.Wf)(he)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:he.borderRadiusSM,alignSelf:"center",[`${Rt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Rt}-inner`]:Object.assign({},(0,mt.oN)(he))},[`${Rt}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:he.checkboxSize,height:he.checkboxSize,direction:"ltr",backgroundColor:he.colorBgContainer,border:`${he.lineWidth}px ${he.lineType} ${he.colorBorder}`,borderRadius:he.borderRadiusSM,borderCollapse:"separate",transition:`all ${he.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:he.checkboxSize/14*5,height:he.checkboxSize/14*8,border:`${he.lineWidthBold}px solid ${he.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${he.motionDurationFast} ${he.motionEaseInBack}, opacity ${he.motionDurationFast}`}},"& + span":{paddingInlineStart:he.paddingXS,paddingInlineEnd:he.paddingXS}})},{[`
${be}:not(${be}-disabled),
${Rt}:not(${Rt}-disabled)
`]:{[`&:hover ${Rt}-inner`]:{borderColor:he.colorPrimary}},[`${be}:not(${be}-disabled)`]:{[`&:hover ${Rt}-checked:not(${Rt}-disabled) ${Rt}-inner`]:{backgroundColor:he.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Rt}-checked:not(${Rt}-disabled):after`]:{borderColor:he.colorPrimaryHover}}},{[`${Rt}-checked`]:{[`${Rt}-inner`]:{backgroundColor:he.colorPrimary,borderColor:he.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${he.motionDurationMid} ${he.motionEaseOutBack} ${he.motionDurationFast}`}}},[`
${be}-checked:not(${be}-disabled),
${Rt}-checked:not(${Rt}-disabled)
`]:{[`&:hover ${Rt}-inner`]:{backgroundColor:he.colorPrimaryHover,borderColor:"transparent"}}},{[Rt]:{"&-indeterminate":{[`${Rt}-inner`]:{backgroundColor:he.colorBgContainer,borderColor:he.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:he.fontSizeLG/2,height:he.fontSizeLG/2,backgroundColor:he.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${be}-disabled`]:{cursor:"not-allowed"},[`${Rt}-disabled`]:{[`&, ${Rt}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Rt}-inner`]:{background:he.colorBgContainerDisabled,borderColor:he.colorBorder,"&:after":{borderColor:he.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:he.colorTextDisabled},[`&${Rt}-indeterminate ${Rt}-inner::after`]:{background:he.colorTextDisabled}}}]};function Ht(he,Rt){const be=(0,It.TS)(Rt,{checkboxCls:`.${he}`,checkboxSize:Rt.controlInteractiveSize});return[we(be)]}vn.ZP=(0,Zt.Z)("Checkbox",(he,Rt)=>{let{prefixCls:be}=Rt;return[Ht(be,he)]})},36381:function(xn,vn,Pt){"use strict";Pt.d(vn,{default:function(){return Hn}});var mt=Pt(53878),It=Pt(92310),Zt=Pt.n(It),we=Pt(5891),Ht=Pt(26390),he=Pt(29043),Rt=Pt(80665),be=Pt(35788),ge=Pt(51395),Kt=Pt(59301),ue=Pt(19149),de=Pt(38298),ve=Pt(80962),At=Pt(43469),nt=Pt(85108),et=Kt.forwardRef(function(un,De){var He=un.prefixCls,Ee=un.forceRender,Jt=un.className,ye=un.style,Re=un.children,Be=un.isActive,Qt=un.role,ce=Kt.useState(Be||Ee),Tt=(0,he.Z)(ce,2),xt=Tt[0],yt=Tt[1];return Kt.useEffect(function(){(Ee||Be)&&yt(!0)},[Ee,Be]),xt?Kt.createElement("div",{ref:De,className:Zt()("".concat(He,"-content"),(0,ve.Z)((0,ve.Z)({},"".concat(He,"-content-active"),Be),"".concat(He,"-content-inactive"),!Be),Jt),style:ye,role:Qt},Kt.createElement("div",{className:"".concat(He,"-content-box")},Re)):null});et.displayName="PanelContent";var ht=et,at=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],ft=Kt.forwardRef(function(un,De){var He=un.showArrow,Ee=He===void 0?!0:He,Jt=un.headerClass,ye=un.isActive,Re=un.onItemClick,Be=un.forceRender,Qt=un.className,ce=un.prefixCls,Tt=un.collapsible,xt=un.accordion,yt=un.panelKey,kt=un.extra,zt=un.header,Mt=un.expandIcon,se=un.openMotion,$e=un.destroyInactivePanel,cn=un.children,sn=(0,ue.Z)(un,at),En=Tt==="disabled",Gn=Tt==="header",zn=Tt==="icon",Zn=kt!=null&&typeof kt!="boolean",$n=function(){Re==null||Re(yt)},ni=function(In){(In.key==="Enter"||In.keyCode===nt.Z.ENTER||In.which===nt.Z.ENTER)&&$n()},ei=typeof Mt=="function"?Mt(un):Kt.createElement("i",{className:"arrow"});ei&&(ei=Kt.createElement("div",{className:"".concat(ce,"-expand-icon"),onClick:["header","icon"].includes(Tt)?$n:void 0},ei));var Bi=Zt()((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(ce,"-item"),!0),"".concat(ce,"-item-active"),ye),"".concat(ce,"-item-disabled"),En),Qt),Ki=Zt()(Jt,(0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(ce,"-header"),!0),"".concat(ce,"-header-collapsible-only"),Gn),"".concat(ce,"-icon-collapsible-only"),zn)),jn={className:Ki,"aria-expanded":ye,"aria-disabled":En,onKeyDown:ni};return!Gn&&!zn&&(jn.onClick=$n,jn.role=xt?"tab":"button",jn.tabIndex=En?-1:0),Kt.createElement("div",(0,we.Z)({},sn,{ref:De,className:Bi}),Kt.createElement("div",jn,Ee&&ei,Kt.createElement("span",{className:"".concat(ce,"-header-text"),onClick:Tt==="header"?$n:void 0},zt),Zn&&Kt.createElement("div",{className:"".concat(ce,"-extra")},kt)),Kt.createElement(At.default,(0,we.Z)({visible:ye,leavedClassName:"".concat(ce,"-content-hidden")},se,{forceRender:Be,removeOnLeave:$e}),function(Tn,In){var li=Tn.className,gi=Tn.style;return Kt.createElement(ht,{ref:In,prefixCls:ce,className:li,style:gi,isActive:ye,forceRender:Be,role:xt?"tabpanel":void 0},cn)}))}),vt=ft,Ct=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Bt=function(De,He){var Ee=He.prefixCls,Jt=He.accordion,ye=He.collapsible,Re=He.destroyInactivePanel,Be=He.onItemClick,Qt=He.activeKey,ce=He.openMotion,Tt=He.expandIcon;return De.map(function(xt,yt){var kt=xt.children,zt=xt.label,Mt=xt.key,se=xt.collapsible,$e=xt.onItemClick,cn=xt.destroyInactivePanel,sn=(0,ue.Z)(xt,Ct),En=String(Mt!=null?Mt:yt),Gn=se!=null?se:ye,zn=cn!=null?cn:Re,Zn=function(ei){Gn!=="disabled"&&(Be(ei),$e==null||$e(ei))},$n=!1;return Jt?$n=Qt[0]===En:$n=Qt.indexOf(En)>-1,Kt.createElement(vt,(0,we.Z)({},sn,{prefixCls:Ee,key:En,panelKey:En,isActive:$n,accordion:Jt,openMotion:ce,expandIcon:Tt,header:zt,collapsible:Gn,onItemClick:Zn,destroyInactivePanel:zn}),kt)})},Ft=function(De,He,Ee){if(!De)return null;var Jt=Ee.prefixCls,ye=Ee.accordion,Re=Ee.collapsible,Be=Ee.destroyInactivePanel,Qt=Ee.onItemClick,ce=Ee.activeKey,Tt=Ee.openMotion,xt=Ee.expandIcon,yt=De.key||String(He),kt=De.props,zt=kt.header,Mt=kt.headerClass,se=kt.destroyInactivePanel,$e=kt.collapsible,cn=kt.onItemClick,sn=!1;ye?sn=ce[0]===yt:sn=ce.indexOf(yt)>-1;var En=$e!=null?$e:Re,Gn=function($n){En!=="disabled"&&(Qt($n),cn==null||cn($n))},zn={key:yt,panelKey:yt,header:zt,headerClass:Mt,isActive:sn,prefixCls:Jt,destroyInactivePanel:se!=null?se:Be,openMotion:Tt,accordion:ye,children:De.props.children,onItemClick:Gn,expandIcon:xt,collapsible:En};return typeof De.type=="string"?De:(Object.keys(zn).forEach(function(Zn){typeof zn[Zn]=="undefined"&&delete zn[Zn]}),Kt.cloneElement(De,zn))};function Ot(un,De,He){return Array.isArray(un)?Bt(un,He):(0,de.Z)(De).map(function(Ee,Jt){return Ft(Ee,Jt,He)})}var _t=Ot,te=Pt(36994);function Xt(un){var De=un;if(!Array.isArray(De)){var He=(0,Rt.Z)(De);De=He==="number"||He==="string"?[De]:[]}return De.map(function(Ee){return String(Ee)})}var Me=Kt.forwardRef(function(un,De){var He=un.prefixCls,Ee=He===void 0?"rc-collapse":He,Jt=un.destroyInactivePanel,ye=Jt===void 0?!1:Jt,Re=un.style,Be=un.accordion,Qt=un.className,ce=un.children,Tt=un.collapsible,xt=un.openMotion,yt=un.expandIcon,kt=un.activeKey,zt=un.defaultActiveKey,Mt=un.onChange,se=un.items,$e=Zt()(Ee,Qt),cn=(0,be.Z)([],{value:kt,onChange:function(ni){return Mt==null?void 0:Mt(ni)},defaultValue:zt,postState:Xt}),sn=(0,he.Z)(cn,2),En=sn[0],Gn=sn[1],zn=function(ni){return Gn(function(){if(Be)return En[0]===ni?[]:[ni];var ei=En.indexOf(ni),Bi=ei>-1;return Bi?En.filter(function(Ki){return Ki!==ni}):[].concat((0,Ht.Z)(En),[ni])})};(0,ge.ZP)(!ce,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Zn=_t(se,ce,{prefixCls:Ee,accordion:Be,openMotion:xt,expandIcon:yt,collapsible:Tt,destroyInactivePanel:ye,onItemClick:zn,activeKey:En});return Kt.createElement("div",(0,we.Z)({ref:De,className:$e,style:Re,role:Be?"tablist":void 0},(0,te.Z)(un,{aria:!0,data:!0})),Zn)}),qt=Object.assign(Me,{Panel:vt}),Ne=qt,ne=qt.Panel,Ce=Pt(64002),Ue=Pt(62892),Ze=Pt(92343),tn=Pt(36355),ln=Pt(19716),Gt=Kt.forwardRef((un,De)=>{const{getPrefixCls:He}=Kt.useContext(tn.E_),{prefixCls:Ee,className:Jt,showArrow:ye=!0}=un,Re=He("collapse",Ee),Be=Zt()({[`${Re}-no-arrow`]:!ye},Jt);return Kt.createElement(Ne.Panel,Object.assign({ref:De},un,{prefixCls:Re,className:Be}))}),Ae=Pt(17313),Sn=Pt(8378),gn=Pt(83116),Fe=Pt(37613);const Ke=un=>{const{componentCls:De,contentBg:He,padding:Ee,headerBg:Jt,headerPadding:ye,collapseHeaderPaddingSM:Re,collapseHeaderPaddingLG:Be,collapsePanelBorderRadius:Qt,lineWidth:ce,lineType:Tt,colorBorder:xt,colorText:yt,colorTextHeading:kt,colorTextDisabled:zt,fontSize:Mt,fontSizeLG:se,lineHeight:$e,marginSM:cn,paddingSM:sn,paddingLG:En,paddingXS:Gn,motionDurationSlow:zn,fontSizeIcon:Zn,contentPadding:$n}=un,ni=`${ce}px ${Tt} ${xt}`;return{[De]:Object.assign(Object.assign({},(0,Ae.Wf)(un)),{backgroundColor:Jt,border:ni,borderBottom:0,borderRadius:`${Qt}px`,"&-rtl":{direction:"rtl"},[`& > ${De}-item`]:{borderBottom:ni,"&:last-child":{[`
&,
& > ${De}-header`]:{borderRadius:`0 0 ${Qt}px ${Qt}px`}},[`> ${De}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:ye,color:kt,lineHeight:$e,cursor:"pointer",transition:`all ${zn}, visibility 0s`,[`> ${De}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${De}-expand-icon`]:{height:Mt*$e,display:"flex",alignItems:"center",paddingInlineEnd:cn},[`${De}-arrow`]:Object.assign(Object.assign({},(0,Ae.Ro)()),{fontSize:Zn,svg:{transition:`transform ${zn}`}}),[`${De}-header-text`]:{marginInlineEnd:"auto"}},[`${De}-header-collapsible-only`]:{cursor:"default",[`${De}-header-text`]:{flex:"none",cursor:"pointer"}},[`${De}-icon-collapsible-only`]:{cursor:"default",[`${De}-expand-icon`]:{cursor:"pointer"}}},[`${De}-content`]:{color:yt,backgroundColor:He,borderTop:ni,[`& > ${De}-content-box`]:{padding:$n},"&-hidden":{display:"none"}},"&-small":{[`> ${De}-item`]:{[`> ${De}-header`]:{padding:Re,paddingInlineStart:Gn,[`> ${De}-expand-icon`]:{marginInlineStart:sn-Gn}},[`> ${De}-content > ${De}-content-box`]:{padding:sn}}},"&-large":{[`> ${De}-item`]:{fontSize:se,[`> ${De}-header`]:{padding:Be,paddingInlineStart:Ee,[`> ${De}-expand-icon`]:{height:se*$e,marginInlineStart:En-Ee}},[`> ${De}-content > ${De}-content-box`]:{padding:En}}},[`${De}-item:last-child`]:{[`> ${De}-content`]:{borderRadius:`0 0 ${Qt}px ${Qt}px`}},[`& ${De}-item-disabled > ${De}-header`]:{"\n &,\n & > .arrow\n ":{color:zt,cursor:"not-allowed"}},[`&${De}-icon-position-end`]:{[`& > ${De}-item`]:{[`> ${De}-header`]:{[`${De}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:cn}}}}})}},rn=un=>{const{componentCls:De}=un,He=`> ${De}-item > ${De}-header ${De}-arrow svg`;return{[`${De}-rtl`]:{[He]:{transform:"rotate(180deg)"}}}},Fn=un=>{const{componentCls:De,headerBg:He,paddingXXS:Ee,colorBorder:Jt}=un;return{[`${De}-borderless`]:{backgroundColor:He,border:0,[`> ${De}-item`]:{borderBottom:`1px solid ${Jt}`},[`
> ${De}-item:last-child,
> ${De}-item:last-child ${De}-header
`]:{borderRadius:0},[`> ${De}-item:last-child`]:{borderBottom:0},[`> ${De}-item > ${De}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${De}-item > ${De}-content > ${De}-content-box`]:{paddingTop:Ee}}}},Pn=un=>{const{componentCls:De,paddingSM:He}=un;return{[`${De}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${De}-item`]:{borderBottom:0,[`> ${De}-content`]:{backgroundColor:"transparent",border:0,[`> ${De}-content-box`]:{paddingBlock:He}}}}}};var We=(0,gn.Z)("Collapse",un=>{const De=(0,Fe.TS)(un,{collapseHeaderPaddingSM:`${un.paddingXS}px ${un.paddingSM}px`,collapseHeaderPaddingLG:`${un.padding}px ${un.paddingLG}px`,collapsePanelBorderRadius:un.borderRadiusLG});return[Ke(De),Fn(De),Pn(De),rn(De),(0,Sn.Z)(De)]},un=>({headerPadding:`${un.paddingSM}px ${un.padding}px`,headerBg:un.colorFillAlter,contentPadding:`${un.padding}px 16px`,contentBg:un.colorBgContainer})),An=Object.assign(Kt.forwardRef((un,De)=>{const{getPrefixCls:He,direction:Ee,collapse:Jt}=Kt.useContext(tn.E_),{prefixCls:ye,className:Re,rootClassName:Be,style:Qt,bordered:ce=!0,ghost:Tt,size:xt,expandIconPosition:yt="start",children:kt,expandIcon:zt}=un,Mt=(0,ln.Z)(ni=>{var ei;return(ei=xt!=null?xt:ni)!==null&&ei!==void 0?ei:"middle"}),se=He("collapse",ye),$e=He(),[cn,sn]=We(se),En=Kt.useMemo(()=>yt==="left"?"start":yt==="right"?"end":yt,[yt]),Gn=function(){let ni=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const ei=zt?zt(ni):Kt.createElement(mt.Z,{rotate:ni.isActive?90:void 0});return(0,Ze.Tm)(ei,()=>({className:Zt()(ei.props.className,`${se}-arrow`)}))},zn=Zt()(`${se}-icon-position-${En}`,{[`${se}-borderless`]:!ce,[`${se}-rtl`]:Ee==="rtl",[`${se}-ghost`]:!!Tt,[`${se}-${Mt}`]:Mt!=="middle"},Jt==null?void 0:Jt.className,Re,Be,sn),Zn=Object.assign(Object.assign({},(0,Ue.Z)($e)),{motionAppear:!1,leavedClassName:`${se}-content-hidden`}),$n=Kt.useMemo(()=>kt?(0,de.Z)(kt).map((ni,ei)=>{var Bi,Ki;if(!((Bi=ni.props)===null||Bi===void 0)&&Bi.disabled){const jn=(Ki=ni.key)!==null&&Ki!==void 0?Ki:String(ei),{disabled:Tn,collapsible:In}=ni.props,li=Object.assign(Object.assign({},(0,Ce.Z)(ni.props,["disabled"])),{key:jn,collapsible:In!=null?In:Tn?"disabled":void 0});return(0,Ze.Tm)(ni,li)}return ni}):null,[kt]);return cn(Kt.createElement(Ne,Object.assign({ref:De,openMotion:Zn},(0,Ce.Z)(un,["rootClassName"]),{expandIcon:Gn,prefixCls:se,className:zn,style:Object.assign(Object.assign({},Jt==null?void 0:Jt.style),Qt)}),$n))}),{Panel:Gt}),Hn=An},93891:function(xn,vn,Pt){"use strict";var mt=Pt(59301),It=Pt(36355),Zt=Pt(64165);const we=Ht=>{const{componentName:he}=Ht,{getPrefixCls:Rt}=(0,mt.useContext)(It.E_),be=Rt("empty");switch(he){case"Table":case"List":return mt.createElement(Zt.Z,{image:Zt.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return mt.createElement(Zt.Z,{image:Zt.Z.PRESENTED_IMAGE_SIMPLE,className:`${be}-small`});default:return mt.createElement(Zt.Z,null)}};vn.Z=we},28103:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return de}});var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(59301),we=Pt(36355),Ht=Pt(17313),he=Pt(83116),Rt=Pt(37613);const be=ve=>{const{componentCls:At,sizePaddingEdgeHorizontal:nt,colorSplit:et,lineWidth:ht,textPaddingInline:at,orientationMargin:ft,verticalMarginInline:vt}=ve;return{[At]:Object.assign(Object.assign({},(0,Ht.Wf)(ve)),{borderBlockStart:`${ht}px solid ${et}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:vt,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ht}px solid ${et}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ve.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${At}-with-text`]:{display:"flex",alignItems:"center",margin:`${ve.dividerHorizontalWithTextGutterMargin}px 0`,color:ve.colorTextHeading,fontWeight:500,fontSize:ve.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${et}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${ht}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${At}-with-text-left`]:{"&::before":{width:`${ft*100}%`},"&::after":{width:`${100-ft*100}%`}},[`&-horizontal${At}-with-text-right`]:{"&::before":{width:`${100-ft*100}%`},"&::after":{width:`${ft*100}%`}},[`${At}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:at},"&-dashed":{background:"none",borderColor:et,borderStyle:"dashed",borderWidth:`${ht}px 0 0`},[`&-horizontal${At}-with-text${At}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${At}-dashed`]:{borderInlineStartWidth:ht,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${At}-with-text`]:{color:ve.colorText,fontWeight:"normal",fontSize:ve.fontSize},[`&-horizontal${At}-with-text-left${At}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${At}-inner-text`]:{paddingInlineStart:nt}},[`&-horizontal${At}-with-text-right${At}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${At}-inner-text`]:{paddingInlineEnd:nt}}})}};var ge=(0,he.Z)("Divider",ve=>{const At=(0,Rt.TS)(ve,{dividerHorizontalWithTextGutterMargin:ve.margin,dividerHorizontalGutterMargin:ve.marginLG,sizePaddingEdgeHorizontal:0});return[be(At)]},ve=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:ve.marginXS})),Kt=function(ve,At){var nt={};for(var et in ve)Object.prototype.hasOwnProperty.call(ve,et)&&At.indexOf(et)<0&&(nt[et]=ve[et]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,et=Object.getOwnPropertySymbols(ve);ht<et.length;ht++)At.indexOf(et[ht])<0&&Object.prototype.propertyIsEnumerable.call(ve,et[ht])&&(nt[et[ht]]=ve[et[ht]]);return nt},de=ve=>{const{getPrefixCls:At,direction:nt,divider:et}=Zt.useContext(we.E_),{prefixCls:ht,type:at="horizontal",orientation:ft="center",orientationMargin:vt,className:Ct,rootClassName:Bt,children:Ft,dashed:Ot,plain:_t,style:te}=ve,Xt=Kt(ve,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),Me=At("divider",ht),[qt,Ne]=ge(Me),ne=ft.length>0?`-${ft}`:ft,Ce=!!Ft,Ue=ft==="left"&&vt!=null,Ze=ft==="right"&&vt!=null,tn=It()(Me,et==null?void 0:et.className,Ne,`${Me}-${at}`,{[`${Me}-with-text`]:Ce,[`${Me}-with-text${ne}`]:Ce,[`${Me}-dashed`]:!!Ot,[`${Me}-plain`]:!!_t,[`${Me}-rtl`]:nt==="rtl",[`${Me}-no-default-orientation-margin-left`]:Ue,[`${Me}-no-default-orientation-margin-right`]:Ze},Ct,Bt),ln=Zt.useMemo(()=>typeof vt=="number"?vt:/^\d+$/.test(vt)?Number(vt):vt,[vt]),ie=Object.assign(Object.assign({},Ue&&{marginLeft:ln}),Ze&&{marginRight:ln});return qt(Zt.createElement("div",Object.assign({className:tn,style:Object.assign(Object.assign({},et==null?void 0:et.style),te)},Xt,{role:"separator"}),Ft&&at!=="vertical"&&Zt.createElement("span",{className:`${Me}-inner-text`,style:ie},Ft)))}},91857:function(xn,vn,Pt){"use strict";var mt=Pt(59301),It=Pt(53878),Zt=Pt(92310),we=Pt.n(Zt),Ht=Pt(31561),he=Pt(80764),Rt=Pt(35788),be=Pt(64002),ge=Pt(79676),Kt=Pt(53487),ue=Pt(92343),de=Pt(36355),ve=Pt(20834),At=Pt(40875),nt=Pt(88088),et=Pt(47211);const ht=null,at=Bt=>{const{menu:Ft,arrow:Ot,prefixCls:_t,children:te,trigger:Xt,disabled:Me,dropdownRender:qt,getPopupContainer:Ne,overlayClassName:ne,rootClassName:Ce,open:Ue,onOpenChange:Ze,visible:tn,onVisibleChange:ln,mouseEnterDelay:ie=.15,mouseLeaveDelay:Gt=.1,autoAdjustOverflow:Ae=!0,placement:Sn="",overlay:gn,transitionName:Fe}=Bt,{getPopupContainer:Ke,getPrefixCls:rn,direction:Fn}=mt.useContext(de.E_),Pn=mt.useMemo(()=>{const yt=rn();return Fe!==void 0?Fe:Sn.includes("top")?`${yt}-slide-down`:`${yt}-slide-up`},[rn,Sn,Fe]),We=mt.useMemo(()=>Sn?Sn.includes("Center")?Sn.slice(0,Sn.indexOf("Center")):Sn:Fn==="rtl"?"bottomRight":"bottomLeft",[Sn,Fn]),fe=rn("dropdown",_t),[An,Hn]=(0,et.Z)(fe),[,un]=(0,nt.Z)(),De=mt.Children.only(te),He=(0,ue.Tm)(De,{className:we()(`${fe}-trigger`,{[`${fe}-rtl`]:Fn==="rtl"},De.props.className),disabled:Me}),Ee=Me?[]:Xt;let Jt;Ee&&Ee.includes("contextMenu")&&(Jt=!0);const[ye,Re]=(0,Rt.Z)(!1,{value:Ue!=null?Ue:tn}),Be=(0,he.useEvent)(yt=>{Ze==null||Ze(yt),ln==null||ln(yt),Re(yt)}),Qt=we()(ne,Ce,Hn,{[`${fe}-rtl`]:Fn==="rtl"}),ce=(0,ge.Z)({arrowPointAtCenter:typeof Ot=="object"&&Ot.pointAtCenter,autoAdjustOverflow:Ae,offset:un.marginXXS,arrowWidth:Ot?un.sizePopupArrow:0,borderRadius:un.borderRadius}),Tt=mt.useCallback(()=>{Re(!1)},[]),xt=()=>{let yt;return Ft!=null&&Ft.items?yt=mt.createElement(ve.default,Object.assign({},Ft)):typeof gn=="function"?yt=gn():yt=gn,qt&&(yt=qt(yt)),yt=mt.Children.only(typeof yt=="string"?mt.createElement("span",null,yt):yt),mt.createElement(At.J,{prefixCls:`${fe}-menu`,expandIcon:mt.createElement("span",{className:`${fe}-menu-submenu-arrow`},mt.createElement(It.Z,{className:`${fe}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Tt,validator:kt=>{let{mode:zt}=kt}},yt)};return An(mt.createElement(Ht.Z,Object.assign({alignPoint:Jt},(0,be.Z)(Bt,["rootClassName"]),{mouseEnterDelay:ie,mouseLeaveDelay:Gt,visible:ye,builtinPlacements:ce,arrow:!!Ot,overlayClassName:Qt,prefixCls:fe,getPopupContainer:Ne||Ke,transitionName:Pn,trigger:Ee,overlay:xt,placement:We,onVisibleChange:Be}),He))};function ft(Bt){return Object.assign(Object.assign({},Bt),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const vt=(0,Kt.Z)(at,"dropdown",Bt=>Bt,ft),Ct=Bt=>mt.createElement(vt,Object.assign({},Bt),mt.createElement("span",null));at._InternalPanelDoNotUseOrYouWillBeFired=Ct,vn.Z=at},38854:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return nt}});var mt=Pt(91857),It=Pt(92310),Zt=Pt.n(It),we=Pt(59301),Ht=Pt(19362),he=Pt(3113),Rt=Pt(36355),be=Pt(81327),ge=Pt(33234),Kt=Pt(47211),ue=function(et,ht){var at={};for(var ft in et)Object.prototype.hasOwnProperty.call(et,ft)&&ht.indexOf(ft)<0&&(at[ft]=et[ft]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,ft=Object.getOwnPropertySymbols(et);vt<ft.length;vt++)ht.indexOf(ft[vt])<0&&Object.prototype.propertyIsEnumerable.call(et,ft[vt])&&(at[ft[vt]]=et[ft[vt]]);return at};const de=et=>{const{getPopupContainer:ht,getPrefixCls:at,direction:ft}=we.useContext(Rt.E_),{prefixCls:vt,type:Ct="default",danger:Bt,disabled:Ft,loading:Ot,onClick:_t,htmlType:te,children:Xt,className:Me,menu:qt,arrow:Ne,autoFocus:ne,overlay:Ce,trigger:Ue,align:Ze,open:tn,onOpenChange:ln,placement:ie,getPopupContainer:Gt,href:Ae,icon:Sn=we.createElement(Ht.Z,null),title:gn,buttonsRender:Fe=xt=>xt,mouseEnterDelay:Ke,mouseLeaveDelay:rn,overlayClassName:Fn,overlayStyle:Pn,destroyPopupOnHide:We,dropdownRender:fe}=et,An=ue(et,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),Hn=at("dropdown",vt),un=`${Hn}-button`,[De,He]=(0,Kt.Z)(Hn),Ee={menu:qt,arrow:Ne,autoFocus:ne,align:Ze,disabled:Ft,trigger:Ft?[]:Ue,onOpenChange:ln,getPopupContainer:Gt||ht,mouseEnterDelay:Ke,mouseLeaveDelay:rn,overlayClassName:Fn,overlayStyle:Pn,destroyPopupOnHide:We,dropdownRender:fe},{compactSize:Jt,compactItemClassnames:ye}=(0,ge.ri)(Hn,ft),Re=Zt()(un,ye,Me,He);"overlay"in et&&(Ee.overlay=Ce),"open"in et&&(Ee.open=tn),"placement"in et?Ee.placement=ie:Ee.placement=ft==="rtl"?"bottomLeft":"bottomRight";const Be=we.createElement(he.ZP,{type:Ct,danger:Bt,disabled:Ft,loading:Ot,onClick:_t,htmlType:te,href:Ae,title:gn},Xt),Qt=we.createElement(he.ZP,{type:Ct,danger:Bt,icon:Sn}),[ce,Tt]=Fe([Be,Qt]);return De(we.createElement(be.Z.Compact,Object.assign({className:Re,size:Jt,block:!0},An),ce,we.createElement(mt.Z,Object.assign({},Ee),Tt)))};de.__ANT_BUTTON=!0;var ve=de;const At=mt.Z;At.Button=ve;var nt=At},47211:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return ue}});var mt=Pt(17313),It=Pt(13826),Zt=Pt(92899),we=Pt(29878),Ht=Pt(19447),he=Pt(83116),Rt=Pt(37613),ge=de=>{const{componentCls:ve,menuCls:At,colorError:nt,colorTextLightSolid:et}=de,ht=`${At}-item`;return{[`${ve}, ${ve}-menu-submenu`]:{[`${At} ${ht}`]:{[`&${ht}-danger:not(${ht}-disabled)`]:{color:nt,"&:hover":{color:et,backgroundColor:nt}}}}}};const Kt=de=>{const{componentCls:ve,menuCls:At,zIndexPopup:nt,dropdownArrowDistance:et,sizePopupArrow:ht,antCls:at,iconCls:ft,motionDurationMid:vt,dropdownPaddingVertical:Ct,fontSize:Bt,dropdownEdgeChildPadding:Ft,colorTextDisabled:Ot,fontSizeIcon:_t,controlPaddingHorizontal:te,colorBgElevated:Xt}=de;return[{[ve]:Object.assign(Object.assign({},(0,mt.Wf)(de)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:nt,display:"block","&::before":{position:"absolute",insetBlock:-et+ht/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${at}-btn`]:{[`& > ${ft}-down, & > ${at}-btn-icon > ${ft}-down`]:{fontSize:_t}},[`${ve}-wrap`]:{position:"relative",[`${at}-btn > ${ft}-down`]:{fontSize:_t},[`${ft}-down::before`]:{transition:`transform ${vt}`}},[`${ve}-wrap-open`]:{[`${ft}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${at}-slide-down-enter${at}-slide-down-enter-active${ve}-placement-bottomLeft,
&${at}-slide-down-appear${at}-slide-down-appear-active${ve}-placement-bottomLeft,
&${at}-slide-down-enter${at}-slide-down-enter-active${ve}-placement-bottom,
&${at}-slide-down-appear${at}-slide-down-appear-active${ve}-placement-bottom,
&${at}-slide-down-enter${at}-slide-down-enter-active${ve}-placement-bottomRight,
&${at}-slide-down-appear${at}-slide-down-appear-active${ve}-placement-bottomRight`]:{animationName:It.fJ},[`&${at}-slide-up-enter${at}-slide-up-enter-active${ve}-placement-topLeft,
&${at}-slide-up-appear${at}-slide-up-appear-active${ve}-placement-topLeft,
&${at}-slide-up-enter${at}-slide-up-enter-active${ve}-placement-top,
&${at}-slide-up-appear${at}-slide-up-appear-active${ve}-placement-top,
&${at}-slide-up-enter${at}-slide-up-enter-active${ve}-placement-topRight,
&${at}-slide-up-appear${at}-slide-up-appear-active${ve}-placement-topRight`]:{animationName:It.Qt},[`&${at}-slide-down-leave${at}-slide-down-leave-active${ve}-placement-bottomLeft,
&${at}-slide-down-leave${at}-slide-down-leave-active${ve}-placement-bottom,
&${at}-slide-down-leave${at}-slide-down-leave-active${ve}-placement-bottomRight`]:{animationName:It.Uw},[`&${at}-slide-up-leave${at}-slide-up-leave-active${ve}-placement-topLeft,
&${at}-slide-up-leave${at}-slide-up-leave-active${ve}-placement-top,
&${at}-slide-up-leave${at}-slide-up-leave-active${ve}-placement-topRight`]:{animationName:It.ly}})},(0,Ht.ZP)(de,{colorBg:Xt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${ve} ${At}`]:{position:"relative",margin:0},[`${At}-submenu-popup`]:{position:"absolute",zIndex:nt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${ve}, ${ve}-menu-submenu`]:{[At]:Object.assign(Object.assign({padding:Ft,listStyleType:"none",backgroundColor:Xt,backgroundClip:"padding-box",borderRadius:de.borderRadiusLG,outline:"none",boxShadow:de.boxShadowSecondary},(0,mt.Qy)(de)),{[`${At}-item-group-title`]:{padding:`${Ct}px ${te}px`,color:de.colorTextDescription,transition:`all ${vt}`},[`${At}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${At}-item-icon`]:{minWidth:Bt,marginInlineEnd:de.marginXS,fontSize:de.fontSizeSM},[`${At}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${vt}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${At}-item, ${At}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Ct}px ${te}px`,color:de.colorText,fontWeight:"normal",fontSize:Bt,lineHeight:de.lineHeight,cursor:"pointer",transition:`all ${vt}`,borderRadius:de.borderRadiusSM,"&:hover, &-active":{backgroundColor:de.controlItemBgHover}},(0,mt.Qy)(de)),{"&-selected":{color:de.colorPrimary,backgroundColor:de.controlItemBgActive,"&:hover, &-active":{backgroundColor:de.controlItemBgActiveHover}},"&-disabled":{color:Ot,cursor:"not-allowed","&:hover":{color:Ot,backgroundColor:Xt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${de.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:de.colorSplit},[`${ve}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:de.paddingXS,[`${ve}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:de.colorTextDescription,fontSize:_t,fontStyle:"normal"}}}),[`${At}-item-group-list`]:{margin:`0 ${de.marginXS}px`,padding:0,listStyle:"none"},[`${At}-submenu-title`]:{paddingInlineEnd:te+de.fontSizeSM},[`${At}-submenu-vertical`]:{position:"relative"},[`${At}-submenu${At}-submenu-disabled ${ve}-menu-submenu-title`]:{[`&, ${ve}-menu-submenu-arrow-icon`]:{color:Ot,backgroundColor:Xt,cursor:"not-allowed"}},[`${At}-submenu-selected ${ve}-menu-submenu-title`]:{color:de.colorPrimary}})}},[(0,It.oN)(de,"slide-up"),(0,It.oN)(de,"slide-down"),(0,Zt.Fm)(de,"move-up"),(0,Zt.Fm)(de,"move-down"),(0,we._y)(de,"zoom-big")]]};var ue=(0,he.Z)("Dropdown",(de,ve)=>{let{rootPrefixCls:At}=ve;const{marginXXS:nt,sizePopupArrow:et,controlHeight:ht,fontSize:at,lineHeight:ft,paddingXXS:vt,componentCls:Ct,borderRadiusLG:Bt}=de,Ft=(ht-at*ft)/2,{dropdownArrowOffset:Ot}=(0,Ht.fS)({contentRadius:Bt}),_t=(0,Rt.TS)(de,{menuCls:`${Ct}-menu`,rootPrefixCls:At,dropdownArrowDistance:et/2+nt,dropdownArrowOffset:Ot,dropdownPaddingVertical:Ft,dropdownEdgeChildPadding:vt});return[Kt(_t),ge(_t)]},de=>({zIndexPopup:de.zIndexPopupBase+50}))},64165:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return vt}});var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(59301),we=Pt(36355),Ht=Pt(9763),he=Pt(64993),Rt=Pt(88088),ge=()=>{const[,Ct]=(0,Rt.Z)(),Ft=new he.C(Ct.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Zt.createElement("svg",{style:Ft,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Zt.createElement("g",{fill:"none",fillRule:"evenodd"},Zt.createElement("g",{transform:"translate(24 31.67)"},Zt.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Zt.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),Zt.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),Zt.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),Zt.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),Zt.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),Zt.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Zt.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Zt.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ue=()=>{const[,Ct]=(0,Rt.Z)(),{colorFill:Bt,colorFillTertiary:Ft,colorFillQuaternary:Ot,colorBgContainer:_t}=Ct,{borderColor:te,shadowColor:Xt,contentColor:Me}=(0,Zt.useMemo)(()=>({borderColor:new he.C(Bt).onBackground(_t).toHexShortString(),shadowColor:new he.C(Ft).onBackground(_t).toHexShortString(),contentColor:new he.C(Ot).onBackground(_t).toHexShortString()}),[Bt,Ft,Ot,_t]);return Zt.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Zt.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Zt.createElement("ellipse",{fill:Xt,cx:"32",cy:"33",rx:"32",ry:"7"}),Zt.createElement("g",{fillRule:"nonzero",stroke:te},Zt.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),Zt.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:Me}))))},de=Pt(83116),ve=Pt(37613);const At=Ct=>{const{componentCls:Bt,margin:Ft,marginXS:Ot,marginXL:_t,fontSize:te,lineHeight:Xt}=Ct;return{[Bt]:{marginInline:Ot,fontSize:te,lineHeight:Xt,textAlign:"center",[`${Bt}-image`]:{height:Ct.emptyImgHeight,marginBottom:Ot,opacity:Ct.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Bt}-description`]:{color:Ct.colorText},[`${Bt}-footer`]:{marginTop:Ft},"&-normal":{marginBlock:_t,color:Ct.colorTextDisabled,[`${Bt}-description`]:{color:Ct.colorTextDisabled},[`${Bt}-image`]:{height:Ct.emptyImgHeightMD}},"&-small":{marginBlock:Ot,color:Ct.colorTextDisabled,[`${Bt}-image`]:{height:Ct.emptyImgHeightSM}}}}};var nt=(0,de.Z)("Empty",Ct=>{const{componentCls:Bt,controlHeightLG:Ft}=Ct,Ot=(0,ve.TS)(Ct,{emptyImgCls:`${Bt}-img`,emptyImgHeight:Ft*2.5,emptyImgHeightMD:Ft,emptyImgHeightSM:Ft*.875});return[At(Ot)]}),et=function(Ct,Bt){var Ft={};for(var Ot in Ct)Object.prototype.hasOwnProperty.call(Ct,Ot)&&Bt.indexOf(Ot)<0&&(Ft[Ot]=Ct[Ot]);if(Ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Ot=Object.getOwnPropertySymbols(Ct);_t<Ot.length;_t++)Bt.indexOf(Ot[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ct,Ot[_t])&&(Ft[Ot[_t]]=Ct[Ot[_t]]);return Ft};const ht=Zt.createElement(ge,null),at=Zt.createElement(ue,null),ft=Ct=>{var{className:Bt,rootClassName:Ft,prefixCls:Ot,image:_t=ht,description:te,children:Xt,imageStyle:Me,style:qt}=Ct,Ne=et(Ct,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ne,direction:Ce,empty:Ue}=Zt.useContext(we.E_),Ze=ne("empty",Ot),[tn,ln]=nt(Ze),[ie]=(0,Ht.Z)("Empty"),Gt=typeof te!="undefined"?te:ie==null?void 0:ie.description,Ae=typeof Gt=="string"?Gt:"empty";let Sn=null;return typeof _t=="string"?Sn=Zt.createElement("img",{alt:Ae,src:_t}):Sn=_t,tn(Zt.createElement("div",Object.assign({className:It()(ln,Ze,Ue==null?void 0:Ue.className,{[`${Ze}-normal`]:_t===at,[`${Ze}-rtl`]:Ce==="rtl"},Bt,Ft),style:Object.assign(Object.assign({},Ue==null?void 0:Ue.style),qt)},Ne),Zt.createElement("div",{className:`${Ze}-image`,style:Me},Sn),Gt&&Zt.createElement("div",{className:`${Ze}-description`},Gt),Xt&&Zt.createElement("div",{className:`${Ze}-footer`},Xt)))};ft.PRESENTED_IMAGE_DEFAULT=ht,ft.PRESENTED_IMAGE_SIMPLE=at;var vt=ft},78241:function(xn,vn,Pt){"use strict";Pt.d(vn,{default:function(){return Le}});var mt=Pt(26390),It=Pt(92310),Zt=Pt.n(It),we=Pt(43469),Ht=Pt(59301),he=Pt(62892),Rt=Pt(32441);function be(re){const[nn,Qe]=Ht.useState(re);return Ht.useEffect(()=>{const pe=setTimeout(()=>{Qe(re)},re.length?0:10);return()=>{clearTimeout(pe)}},[re]),nn}var ge=Pt(17313),Kt=Pt(29878),ue=Pt(8378),de=Pt(37613),ve=Pt(83116),nt=re=>{const{componentCls:nn}=re,Qe=`${nn}-show-help`,pe=`${nn}-show-help-item`;return{[Qe]:{transition:`opacity ${re.motionDurationSlow} ${re.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[pe]:{overflow:"hidden",transition:`height ${re.motionDurationSlow} ${re.motionEaseInOut},
opacity ${re.motionDurationSlow} ${re.motionEaseInOut},
transform ${re.motionDurationSlow} ${re.motionEaseInOut} !important`,[`&${pe}-appear, &${pe}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${pe}-leave-active`]:{transform:"translateY(-5px)"}}}}};const et=re=>({legend:{display:"block",width:"100%",marginBottom:re.marginLG,padding:0,color:re.colorTextDescription,fontSize:re.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${re.lineWidth}px ${re.lineType} ${re.colorBorder}`},label:{fontSize:re.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 ${re.controlOutlineWidth}px ${re.controlOutline}`},output:{display:"block",paddingTop:15,color:re.colorText,fontSize:re.fontSize,lineHeight:re.lineHeight}}),ht=(re,nn)=>{const{formItemCls:Qe}=re;return{[Qe]:{[`${Qe}-label > label`]:{height:nn},[`${Qe}-control-input`]:{minHeight:nn}}}},at=re=>{const{componentCls:nn}=re;return{[re.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ge.Wf)(re)),et(re)),{[`${nn}-text`]:{display:"inline-block",paddingInlineEnd:re.paddingSM},"&-small":Object.assign({},ht(re,re.controlHeightSM)),"&-large":Object.assign({},ht(re,re.controlHeightLG))})}},ft=re=>{const{formItemCls:nn,iconCls:Qe,componentCls:pe,rootPrefixCls:Yt,labelRequiredMarkColor:Ve,labelColor:en,labelFontSize:Bn,labelHeight:qe,labelColonMarginInlineStart:xe,labelColonMarginInlineEnd:an,itemMarginBottom:Mn}=re;return{[nn]:Object.assign(Object.assign({},(0,ge.Wf)(re)),{marginBottom:Mn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${Yt}-row`]:{display:"none"},"&-has-warning":{[`${nn}-split`]:{color:re.colorError}},"&-has-error":{[`${nn}-split`]:{color:re.colorWarning}},[`${nn}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${re.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:qe,color:en,fontSize:Bn,[`> ${Qe}`]:{fontSize:re.fontSize,verticalAlign:"top"},[`&${nn}-required:not(${nn}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:re.marginXXS,color:Ve,fontSize:re.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${pe}-hide-required-mark &`]:{display:"none"}},[`${nn}-optional`]:{display:"inline-block",marginInlineStart:re.marginXXS,color:re.colorTextDescription,[`${pe}-hide-required-mark &`]:{display:"none"}},[`${nn}-tooltip`]:{color:re.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:re.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:xe,marginInlineEnd:an},[`&${nn}-no-colon::after`]:{content:'"\\a0"'}}},[`${nn}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Yt}-col-'"]):not([class*="' ${Yt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:re.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[nn]:{"&-explain, &-extra":{clear:"both",color:re.colorTextDescription,fontSize:re.fontSize,lineHeight:re.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:re.controlHeightSM,transition:`color ${re.motionDurationMid} ${re.motionEaseOut}`},"&-explain":{"&-error":{color:re.colorError},"&-warning":{color:re.colorWarning}}},[`&-with-help ${nn}-explain`]:{height:"auto",opacity:1},[`${nn}-feedback-icon`]:{fontSize:re.fontSize,textAlign:"center",visibility:"visible",animationName:Kt.kr,animationDuration:re.motionDurationMid,animationTimingFunction:re.motionEaseOutBack,pointerEvents:"none","&-success":{color:re.colorSuccess},"&-error":{color:re.colorError},"&-warning":{color:re.colorWarning},"&-validating":{color:re.colorPrimary}}})}},vt=re=>{const{componentCls:nn,formItemCls:Qe}=re;return{[`${nn}-horizontal`]:{[`${Qe}-label`]:{flexGrow:0},[`${Qe}-control`]:{flex:"1 1 0",minWidth:0},[`${Qe}-label[class$='-24'], ${Qe}-label[class*='-24 ']`]:{[`& + ${Qe}-control`]:{minWidth:"unset"}}}}},Ct=re=>{const{componentCls:nn,formItemCls:Qe}=re;return{[`${nn}-inline`]:{display:"flex",flexWrap:"wrap",[Qe]:{flex:"none",marginInlineEnd:re.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Qe}-label,
> ${Qe}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Qe}-label`]:{flex:"none"},[`${nn}-text`]:{display:"inline-block"},[`${Qe}-has-feedback`]:{display:"inline-block"}}}}},Bt=re=>({padding:re.verticalLabelPadding,margin:re.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Ft=re=>{const{componentCls:nn,formItemCls:Qe,rootPrefixCls:pe}=re;return{[`${Qe} ${Qe}-label`]:Bt(re),[nn]:{[Qe]:{flexWrap:"wrap",[`${Qe}-label, ${Qe}-control`]:{[`&:not([class*=" ${pe}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ot=re=>{const{componentCls:nn,formItemCls:Qe,rootPrefixCls:pe}=re;return{[`${nn}-vertical`]:{[Qe]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${nn}-item-control`]:{width:"100%"}}},[`${nn}-vertical ${Qe}-label,
.${pe}-col-24${Qe}-label,
.${pe}-col-xl-24${Qe}-label`]:Bt(re),[`@media (max-width: ${re.screenXSMax}px)`]:[Ft(re),{[nn]:{[`.${pe}-col-xs-24${Qe}-label`]:Bt(re)}}],[`@media (max-width: ${re.screenSMMax}px)`]:{[nn]:{[`.${pe}-col-sm-24${Qe}-label`]:Bt(re)}},[`@media (max-width: ${re.screenMDMax}px)`]:{[nn]:{[`.${pe}-col-md-24${Qe}-label`]:Bt(re)}},[`@media (max-width: ${re.screenLGMax}px)`]:{[nn]:{[`.${pe}-col-lg-24${Qe}-label`]:Bt(re)}}}},_t=(re,nn)=>(0,de.TS)(re,{formItemCls:`${re.componentCls}-item`,rootPrefixCls:nn});var te=(0,ve.Z)("Form",(re,nn)=>{let{rootPrefixCls:Qe}=nn;const pe=_t(re,Qe);return[at(pe),ft(pe),nt(pe),vt(pe),Ct(pe),Ot(pe),(0,ue.Z)(pe),Kt.kr]},re=>({labelRequiredMarkColor:re.colorError,labelColor:re.colorTextHeading,labelFontSize:re.fontSize,labelHeight:re.controlHeight,labelColonMarginInlineStart:re.marginXXS/2,labelColonMarginInlineEnd:re.marginXS,itemMarginBottom:re.marginLG,verticalLabelPadding:`0 0 ${re.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Xt=[];function Me(re,nn,Qe){let pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof re=="string"?re:`${nn}-${pe}`,error:re,errorStatus:Qe}}var Ne=re=>{let{help:nn,helpStatus:Qe,errors:pe=Xt,warnings:Yt=Xt,className:Ve,fieldId:en,onVisibleChanged:Bn}=re;const{prefixCls:qe}=Ht.useContext(Rt.Rk),xe=`${qe}-item-explain`,[,an]=te(qe),Mn=(0,Ht.useMemo)(()=>(0,he.Z)(qe),[qe]),Vn=be(pe),_e=be(Yt),Je=Ht.useMemo(()=>nn!=null?[Me(nn,"help",Qe)]:[].concat((0,mt.Z)(Vn.map((qn,vi)=>Me(qn,"error","error",vi))),(0,mt.Z)(_e.map((qn,vi)=>Me(qn,"warning","warning",vi)))),[nn,Qe,Vn,_e]),hi={};return en&&(hi.id=`${en}_help`),Ht.createElement(we.default,{motionDeadline:Mn.motionDeadline,motionName:`${qe}-show-help`,visible:!!Je.length,onVisibleChanged:Bn},qn=>{const{className:vi,style:Kn}=qn;return Ht.createElement("div",Object.assign({},hi,{className:Zt()(xe,vi,Ve,an),style:Kn,role:"alert"}),Ht.createElement(we.CSSMotionList,Object.assign({keys:Je},(0,he.Z)(qe),{motionName:`${qe}-show-help-item`,component:!1}),oi=>{const{key:ui,error:xi,errorStatus:to,className:On,style:ri}=oi;return Ht.createElement("div",{key:ui,className:Zt()(On,{[`${xe}-${to}`]:to}),style:ri},xi)}))})},ne=Pt(95013),Ce=Pt(36355),Ue=Pt(1684),Ze=Pt(52946),tn=Pt(19716),ln=Pt(16722);const ie=["parentNode"],Gt="form_item";function Ae(re){return re===void 0||re===!1?[]:Array.isArray(re)?re:[re]}function Sn(re,nn){if(!re.length)return;const Qe=re.join("_");return nn?`${nn}_${Qe}`:ie.includes(Qe)?`${Gt}_${Qe}`:Qe}function gn(re,nn,Qe,pe,Yt,Ve){let en=pe;return Ve!==void 0?en=Ve:Qe.validating?en="validating":re.length?en="error":nn.length?en="warning":(Qe.touched||Yt&&Qe.validated)&&(en="success"),en}function Fe(re){return Ae(re).join("_")}function Ke(re){const[nn]=(0,ne.useForm)(),Qe=Ht.useRef({}),pe=Ht.useMemo(()=>re!=null?re:Object.assign(Object.assign({},nn),{__INTERNAL__:{itemRef:Yt=>Ve=>{const en=Fe(Yt);Ve?Qe.current[en]=Ve:delete Qe.current[en]}},scrollToField:function(Yt){let Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const en=Ae(Yt),Bn=Sn(en,pe.__INTERNAL__.name),qe=Bn?document.getElementById(Bn):null;qe&&(0,ln.Z)(qe,Object.assign({scrollMode:"if-needed",block:"nearest"},Ve))},getFieldInstance:Yt=>{const Ve=Fe(Yt);return Qe.current[Ve]}}),[re,nn]);return[pe]}var rn=Pt(28726),Fn=function(re,nn){var Qe={};for(var pe in re)Object.prototype.hasOwnProperty.call(re,pe)&&nn.indexOf(pe)<0&&(Qe[pe]=re[pe]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,pe=Object.getOwnPropertySymbols(re);Yt<pe.length;Yt++)nn.indexOf(pe[Yt])<0&&Object.prototype.propertyIsEnumerable.call(re,pe[Yt])&&(Qe[pe[Yt]]=re[pe[Yt]]);return Qe};const Pn=(re,nn)=>{const Qe=Ht.useContext(Ue.Z),{getPrefixCls:pe,direction:Yt,form:Ve}=Ht.useContext(Ce.E_),{prefixCls:en,className:Bn,rootClassName:qe,size:xe,disabled:an=Qe,form:Mn,colon:Vn,labelAlign:_e,labelWrap:Je,labelCol:hi,wrapperCol:qn,hideRequiredMark:vi,layout:Kn="horizontal",scrollToFirstError:oi,requiredMark:ui,onFinishFailed:xi,name:to,style:On,feedbackIcons:ri}=re,lo=Fn(re,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ao=(0,tn.Z)(xe),Ii=Ht.useContext(rn.Z),Oe=(0,Ht.useMemo)(()=>ui!==void 0?ui:Ve&&Ve.requiredMark!==void 0?Ve.requiredMark:!vi,[vi,ui,Ve]),Wn=Vn!=null?Vn:Ve==null?void 0:Ve.colon,yi=pe("form",en),[di,no]=te(yi),ji=Zt()(yi,`${yi}-${Kn}`,{[`${yi}-hide-required-mark`]:Oe===!1,[`${yi}-rtl`]:Yt==="rtl",[`${yi}-${Ao}`]:Ao},no,Ve==null?void 0:Ve.className,Bn,qe),[fo]=Ke(Mn),{__INTERNAL__:Hi}=fo;Hi.name=to;const Ti=(0,Ht.useMemo)(()=>({name:to,labelAlign:_e,labelCol:hi,labelWrap:Je,wrapperCol:qn,vertical:Kn==="vertical",colon:Wn,requiredMark:Oe,itemRef:Hi.itemRef,form:fo,feedbackIcons:ri}),[to,_e,hi,qn,Kn,Wn,Oe,fo,ri]);Ht.useImperativeHandle(nn,()=>fo);const Po=(Vo,mn)=>{if(Vo){let po={block:"nearest"};typeof Vo=="object"&&(po=Vo),fo.scrollToField(mn,po)}},pn=Vo=>{if(xi==null||xi(Vo),Vo.errorFields.length){const mn=Vo.errorFields[0].name;if(oi!==void 0){Po(oi,mn);return}Ve&&Ve.scrollToFirstError!==void 0&&Po(Ve.scrollToFirstError,mn)}};return di(Ht.createElement(Ue.n,{disabled:an},Ht.createElement(Ze.q,{size:Ao},Ht.createElement(Rt.RV,Object.assign({},{validateMessages:Ii}),Ht.createElement(Rt.q3.Provider,{value:Ti},Ht.createElement(ne.default,Object.assign({id:to},lo,{name:to,onFinishFailed:pn,form:fo,style:Object.assign(Object.assign({},Ve==null?void 0:Ve.style),On),className:ji})))))))};var fe=Ht.forwardRef(Pn),An=Pt(12383),Hn=Pt(20475),un=Pt(92343),De=Pt(38298);function He(re){if(typeof re=="function")return re;const nn=(0,De.Z)(re);return nn.length<=1?nn[0]:nn}const Ee=()=>{const{status:re,errors:nn=[],warnings:Qe=[]}=(0,Ht.useContext)(Rt.aM);return{status:re,errors:nn,warnings:Qe}};Ee.Context=Rt.aM;var Jt=Ee,ye=Pt(23073);function Re(re){const[nn,Qe]=Ht.useState(re),pe=(0,Ht.useRef)(null),Yt=(0,Ht.useRef)([]),Ve=(0,Ht.useRef)(!1);Ht.useEffect(()=>(Ve.current=!1,()=>{Ve.current=!0,ye.Z.cancel(pe.current),pe.current=null}),[]);function en(Bn){Ve.current||(pe.current===null&&(Yt.current=[],pe.current=(0,ye.Z)(()=>{pe.current=null,Qe(qe=>{let xe=qe;return Yt.current.forEach(an=>{xe=an(xe)}),xe})})),Yt.current.push(Bn))}return[nn,en]}function Be(){const{itemRef:re}=Ht.useContext(Rt.q3),nn=Ht.useRef({});function Qe(pe,Yt){const Ve=Yt&&typeof Yt=="object"&&Yt.ref,en=pe.join("_");return(nn.current.name!==en||nn.current.originRef!==Ve)&&(nn.current.name=en,nn.current.originRef=Ve,nn.current.ref=(0,Hn.sQ)(re(pe),Ve)),nn.current.ref}return Qe}var Qt=Pt(48886),ce=Pt(28800),Tt=Pt(64002),xt=Pt(27382),yt=Pt(37028);const kt=re=>{const{formItemCls:nn}=re;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${nn}-control`]:{display:"flex"}}}};var zt=(0,ve.b)(["Form","item-item"],(re,nn)=>{let{rootPrefixCls:Qe}=nn;const pe=_t(re,Qe);return[kt(pe)]}),se=re=>{const{prefixCls:nn,status:Qe,wrapperCol:pe,children:Yt,errors:Ve,warnings:en,_internalItemRender:Bn,extra:qe,help:xe,fieldId:an,marginBottom:Mn,onErrorVisibleChanged:Vn}=re,_e=`${nn}-item`,Je=Ht.useContext(Rt.q3),hi=pe||Je.wrapperCol||{},qn=Zt()(`${_e}-control`,hi.className),vi=Ht.useMemo(()=>Object.assign({},Je),[Je]);delete vi.labelCol,delete vi.wrapperCol;const Kn=Ht.createElement("div",{className:`${_e}-control-input`},Ht.createElement("div",{className:`${_e}-control-input-content`},Yt)),oi=Ht.useMemo(()=>({prefixCls:nn,status:Qe}),[nn,Qe]),ui=Mn!==null||Ve.length||en.length?Ht.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ht.createElement(Rt.Rk.Provider,{value:oi},Ht.createElement(Ne,{fieldId:an,errors:Ve,warnings:en,help:xe,helpStatus:Qe,className:`${_e}-explain-connected`,onVisibleChanged:Vn})),!!Mn&&Ht.createElement("div",{style:{width:0,height:Mn}})):null,xi={};an&&(xi.id=`${an}_extra`);const to=qe?Ht.createElement("div",Object.assign({},xi,{className:`${_e}-extra`}),qe):null,On=Bn&&Bn.mark==="pro_table_render"&&Bn.render?Bn.render(re,{input:Kn,errorList:ui,extra:to}):Ht.createElement(Ht.Fragment,null,Kn,ui,to);return Ht.createElement(Rt.q3.Provider,{value:vi},Ht.createElement(yt.Z,Object.assign({},hi,{className:qn}),On),Ht.createElement(zt,{prefixCls:nn}))},$e=Pt(86902),cn=Pt(31724),sn=Pt(9763),En=Pt(6848),Gn=function(re,nn){var Qe={};for(var pe in re)Object.prototype.hasOwnProperty.call(re,pe)&&nn.indexOf(pe)<0&&(Qe[pe]=re[pe]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,pe=Object.getOwnPropertySymbols(re);Yt<pe.length;Yt++)nn.indexOf(pe[Yt])<0&&Object.prototype.propertyIsEnumerable.call(re,pe[Yt])&&(Qe[pe[Yt]]=re[pe[Yt]]);return Qe};function zn(re){return re?typeof re=="object"&&!Ht.isValidElement(re)?re:{title:re}:null}var $n=re=>{let{prefixCls:nn,label:Qe,htmlFor:pe,labelCol:Yt,labelAlign:Ve,colon:en,required:Bn,requiredMark:qe,tooltip:xe}=re;var an;const[Mn]=(0,sn.Z)("Form"),{vertical:Vn,labelAlign:_e,labelCol:Je,labelWrap:hi,colon:qn}=Ht.useContext(Rt.q3);if(!Qe)return null;const vi=Yt||Je||{},Kn=Ve||_e,oi=`${nn}-item-label`,ui=Zt()(oi,Kn==="left"&&`${oi}-left`,vi.className,{[`${oi}-wrap`]:!!hi});let xi=Qe;const to=en===!0||qn!==!1&&en!==!1;to&&!Vn&&typeof Qe=="string"&&Qe.trim()!==""&&(xi=Qe.replace(/[:|]\s*$/,""));const ri=zn(xe);if(ri){const{icon:Oe=Ht.createElement($e.Z,null)}=ri,Wn=Gn(ri,["icon"]),yi=Ht.createElement(En.Z,Object.assign({},Wn),Ht.cloneElement(Oe,{className:`${nn}-item-tooltip`,title:""}));xi=Ht.createElement(Ht.Fragment,null,xi,yi)}const lo=qe==="optional",Ao=typeof qe=="function";Ao?xi=qe(xi,{required:!!Bn}):lo&&!Bn&&(xi=Ht.createElement(Ht.Fragment,null,xi,Ht.createElement("span",{className:`${nn}-item-optional`,title:""},(Mn==null?void 0:Mn.optional)||((an=cn.Z.Form)===null||an===void 0?void 0:an.optional))));const Ii=Zt()({[`${nn}-item-required`]:Bn,[`${nn}-item-required-mark-optional`]:lo||Ao,[`${nn}-item-no-colon`]:!to});return Ht.createElement(yt.Z,Object.assign({},vi,{className:ui}),Ht.createElement("label",{htmlFor:pe,className:Ii,title:typeof Qe=="string"?Qe:""},xi))},ni=Pt(79999),ei=Pt(33130),Bi=Pt(85404),Ki=Pt(50023);const jn={success:ni.Z,warning:Bi.Z,error:ei.Z,validating:Ki.Z};function Tn(re){let{children:nn,errors:Qe,warnings:pe,hasFeedback:Yt,validateStatus:Ve,prefixCls:en,meta:Bn,noStyle:qe}=re;const xe=`${en}-item`,{feedbackIcons:an}=Ht.useContext(Rt.q3),Mn=gn(Qe,pe,Bn,null,!!Yt,Ve),{isFormItemInput:Vn,status:_e}=Ht.useContext(Rt.aM),Je=Ht.useMemo(()=>{var hi;let qn;if(Yt){const oi=Yt!==!0&&Yt.icons||an,ui=Mn&&((hi=oi==null?void 0:oi({status:Mn,errors:Qe,warnings:pe}))===null||hi===void 0?void 0:hi[Mn]),xi=Mn&&jn[Mn];qn=ui!==!1&&xi?Ht.createElement("span",{className:Zt()(`${xe}-feedback-icon`,`${xe}-feedback-icon-${Mn}`)},ui||Ht.createElement(xi,null)):null}let vi=!0,Kn=Mn||"";return qe&&(vi=Vn,Kn=(Mn!=null?Mn:_e)||""),{status:Kn,errors:Qe,warnings:pe,hasFeedback:!!Yt,feedbackIcon:qn,isFormItemInput:vi}},[Mn,Yt,qe,Vn,_e]);return Ht.createElement(Rt.aM.Provider,{value:Je},nn)}var In=function(re,nn){var Qe={};for(var pe in re)Object.prototype.hasOwnProperty.call(re,pe)&&nn.indexOf(pe)<0&&(Qe[pe]=re[pe]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,pe=Object.getOwnPropertySymbols(re);Yt<pe.length;Yt++)nn.indexOf(pe[Yt])<0&&Object.prototype.propertyIsEnumerable.call(re,pe[Yt])&&(Qe[pe[Yt]]=re[pe[Yt]]);return Qe};function li(re){const{prefixCls:nn,className:Qe,rootClassName:pe,style:Yt,help:Ve,errors:en,warnings:Bn,validateStatus:qe,meta:xe,hasFeedback:an,hidden:Mn,children:Vn,fieldId:_e,required:Je,isRequired:hi,onSubItemMetaChange:qn}=re,vi=In(re,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Kn=`${nn}-item`,{requiredMark:oi}=Ht.useContext(Rt.q3),ui=Ht.useRef(null),xi=be(en),to=be(Bn),On=Ve!=null,ri=!!(On||en.length||Bn.length),lo=!!ui.current&&(0,Qt.Z)(ui.current),[Ao,Ii]=Ht.useState(null);(0,ce.Z)(()=>{if(ri&&ui.current){const no=getComputedStyle(ui.current);Ii(parseInt(no.marginBottom,10))}},[ri,lo]);const Oe=no=>{no||Ii(null)},yi=function(){let no=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const ji=no?xi:xe.errors,fo=no?to:xe.warnings;return gn(ji,fo,xe,"",!!an,qe)}(),di=Zt()(Kn,Qe,pe,{[`${Kn}-with-help`]:On||xi.length||to.length,[`${Kn}-has-feedback`]:yi&&an,[`${Kn}-has-success`]:yi==="success",[`${Kn}-has-warning`]:yi==="warning",[`${Kn}-has-error`]:yi==="error",[`${Kn}-is-validating`]:yi==="validating",[`${Kn}-hidden`]:Mn});return Ht.createElement("div",{className:di,style:Yt,ref:ui},Ht.createElement(xt.Z,Object.assign({className:`${Kn}-row`},(0,Tt.Z)(vi,["_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"])),Ht.createElement($n,Object.assign({htmlFor:_e},re,{requiredMark:oi,required:Je!=null?Je:hi,prefixCls:nn})),Ht.createElement(se,Object.assign({},re,xe,{errors:xi,warnings:to,prefixCls:nn,status:yi,help:Ve,marginBottom:Ao,onErrorVisibleChanged:Oe}),Ht.createElement(Rt.qI.Provider,{value:qn},Ht.createElement(Tn,{prefixCls:nn,meta:xe,errors:xe.errors,warnings:xe.warnings,hasFeedback:an,validateStatus:yi},Vn)))),!!Ao&&Ht.createElement("div",{className:`${Kn}-margin-offset`,style:{marginBottom:-Ao}}))}const gi="__SPLIT__",Yi=null,Ci=Ht.memo(re=>{let{children:nn}=re;return nn},(re,nn)=>re.value===nn.value&&re.update===nn.update&&re.childProps.length===nn.childProps.length&&re.childProps.every((Qe,pe)=>Qe===nn.childProps[pe]));function bt(re){return re!=null}function _i(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Fi(re){const{name:nn,noStyle:Qe,className:pe,dependencies:Yt,prefixCls:Ve,shouldUpdate:en,rules:Bn,children:qe,required:xe,label:an,messageVariables:Mn,trigger:Vn="onChange",validateTrigger:_e,hidden:Je,help:hi}=re,{getPrefixCls:qn}=Ht.useContext(Ce.E_),{name:vi}=Ht.useContext(Rt.q3),Kn=He(qe),oi=typeof Kn=="function",ui=Ht.useContext(Rt.qI),{validateTrigger:xi}=Ht.useContext(ne.FieldContext),to=_e!==void 0?_e:xi,On=bt(nn),ri=qn("form",Ve),[lo,Ao]=te(ri),Ii=Ht.useContext(ne.ListContext),Oe=Ht.useRef(),[Wn,yi]=Re({}),[di,no]=(0,An.Z)(()=>_i()),ji=mn=>{const po=Ii==null?void 0:Ii.getKey(mn.name);if(no(mn.destroy?_i():mn,!0),Qe&&hi!==!1&&ui){let vr=mn.name;if(mn.destroy)vr=Oe.current||vr;else if(po!==void 0){const[Si,Dr]=po;vr=[Si].concat((0,mt.Z)(Dr)),Oe.current=vr}ui(mn,vr)}},fo=(mn,po)=>{yi(vr=>{const Si=Object.assign({},vr),hr=[].concat((0,mt.Z)(mn.name.slice(0,-1)),(0,mt.Z)(po)).join(gi);return mn.destroy?delete Si[hr]:Si[hr]=mn,Si})},[Hi,Ti]=Ht.useMemo(()=>{const mn=(0,mt.Z)(di.errors),po=(0,mt.Z)(di.warnings);return Object.values(Wn).forEach(vr=>{mn.push.apply(mn,(0,mt.Z)(vr.errors||[])),po.push.apply(po,(0,mt.Z)(vr.warnings||[]))}),[mn,po]},[Wn,di.errors,di.warnings]),Po=Be();function pn(mn,po,vr){return Qe&&!Je?Ht.createElement(Tn,{prefixCls:ri,hasFeedback:re.hasFeedback,validateStatus:re.validateStatus,meta:di,errors:Hi,warnings:Ti,noStyle:!0},mn):Ht.createElement(li,Object.assign({key:"row"},re,{className:Zt()(pe,Ao),prefixCls:ri,fieldId:po,isRequired:vr,errors:Hi,warnings:Ti,meta:di,onSubItemMetaChange:fo}),mn)}if(!On&&!oi&&!Yt)return lo(pn(Kn));let Vo={};return typeof an=="string"?Vo.label=an:nn&&(Vo.label=String(nn)),Mn&&(Vo=Object.assign(Object.assign({},Vo),Mn)),lo(Ht.createElement(ne.Field,Object.assign({},re,{messageVariables:Vo,trigger:Vn,validateTrigger:to,onMetaChange:ji}),(mn,po,vr)=>{const Si=Ae(nn).length&&po?po.name:[],Dr=Sn(Si,vi),hr=xe!==void 0?xe:!!(Bn&&Bn.some(bo=>{if(bo&&typeof bo=="object"&&bo.required&&!bo.warningOnly)return!0;if(typeof bo=="function"){const Oo=bo(vr);return Oo&&Oo.required&&!Oo.warningOnly}return!1})),ki=Object.assign({},mn);let Oi=null;if(Array.isArray(Kn)&&On)Oi=Kn;else if(!(oi&&(!(en||Yt)||On))){if(!(Yt&&!oi&&!On))if((0,un.l$)(Kn)){const bo=Object.assign(Object.assign({},Kn.props),ki);if(bo.id||(bo.id=Dr),hi||Hi.length>0||Ti.length>0||re.extra){const Wt=[];(hi||Hi.length>0)&&Wt.push(`${Dr}_help`),re.extra&&Wt.push(`${Dr}_extra`),bo["aria-describedby"]=Wt.join(" ")}Hi.length>0&&(bo["aria-invalid"]="true"),hr&&(bo["aria-required"]="true"),(0,Hn.Yr)(Kn)&&(bo.ref=Po(Si,Kn)),new Set([].concat((0,mt.Z)(Ae(Vn)),(0,mt.Z)(Ae(to)))).forEach(Wt=>{bo[Wt]=function(){for(var Fo,br,Fr,qr,eo,$i=arguments.length,Do=new Array($i),ir=0;ir<$i;ir++)Do[ir]=arguments[ir];(Fr=ki[Wt])===null||Fr===void 0||(Fo=Fr).call.apply(Fo,[ki].concat(Do)),(eo=(qr=Kn.props)[Wt])===null||eo===void 0||(br=eo).call.apply(br,[qr].concat(Do))}});const Yn=[bo["aria-required"],bo["aria-invalid"],bo["aria-describedby"]];Oi=Ht.createElement(Ci,{value:ki[re.valuePropName||"value"],update:Kn,childProps:Yn},(0,un.Tm)(Kn,bo))}else oi&&(en||Yt)&&!On?Oi=Kn(vr):Oi=Kn}return pn(Oi,Dr,hr)}))}const co=Fi;co.useStatus=Jt;var xo=co,Go=function(re,nn){var Qe={};for(var pe in re)Object.prototype.hasOwnProperty.call(re,pe)&&nn.indexOf(pe)<0&&(Qe[pe]=re[pe]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,pe=Object.getOwnPropertySymbols(re);Yt<pe.length;Yt++)nn.indexOf(pe[Yt])<0&&Object.prototype.propertyIsEnumerable.call(re,pe[Yt])&&(Qe[pe[Yt]]=re[pe[Yt]]);return Qe},ii=re=>{var{prefixCls:nn,children:Qe}=re,pe=Go(re,["prefixCls","children"]);const{getPrefixCls:Yt}=Ht.useContext(Ce.E_),Ve=Yt("form",nn),en=Ht.useMemo(()=>({prefixCls:Ve,status:"error"}),[Ve]);return Ht.createElement(ne.List,Object.assign({},pe),(Bn,qe,xe)=>Ht.createElement(Rt.Rk.Provider,{value:en},Qe(Bn.map(an=>Object.assign(Object.assign({},an),{fieldKey:an.key})),qe,{errors:xe.errors,warnings:xe.warnings})))};function ke(){const{form:re}=(0,Ht.useContext)(Rt.q3);return re}const Te=fe;Te.Item=xo,Te.List=ii,Te.ErrorList=Ne,Te.useForm=Ke,Te.useFormInstance=ke,Te.useWatch=ne.useWatch,Te.Provider=Rt.RV,Te.create=()=>{};var Le=Te},8628:function(xn,vn,Pt){"use strict";var mt=Pt(59301),It=Pt(28800),Zt=Pt(56762),we=Pt(69507);function Ht(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Rt=(0,mt.useRef)({}),be=(0,Zt.Z)(),ge=(0,we.ZP)();return(0,It.Z)(()=>{const Kt=ge.subscribe(ue=>{Rt.current=ue,he&&be()});return()=>ge.unsubscribe(Kt)},[]),Rt.current}vn.Z=Ht},9432:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return ft},n:function(){return ht}});var mt=Pt(33130),It=Pt(92310),Zt=Pt.n(It),we=Pt(93681),Ht=Pt(20475),he=Pt(59301),Rt=Pt(19080),be=Pt(36355),ge=Pt(1684),Kt=Pt(19716),ue=Pt(32441),de=Pt(33234),ve=Pt(59412),At=Pt(9937);function nt(vt){return!!(vt.prefix||vt.suffix||vt.allowClear)}var et=function(vt,Ct){var Bt={};for(var Ft in vt)Object.prototype.hasOwnProperty.call(vt,Ft)&&Ct.indexOf(Ft)<0&&(Bt[Ft]=vt[Ft]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ot=0,Ft=Object.getOwnPropertySymbols(vt);Ot<Ft.length;Ot++)Ct.indexOf(Ft[Ot])<0&&Object.prototype.propertyIsEnumerable.call(vt,Ft[Ot])&&(Bt[Ft[Ot]]=vt[Ft[Ot]]);return Bt};function ht(vt,Ct){if(!vt)return;vt.focus(Ct);const{cursor:Bt}=Ct||{};if(Bt){const Ft=vt.value.length;switch(Bt){case"start":vt.setSelectionRange(0,0);break;case"end":vt.setSelectionRange(Ft,Ft);break;default:vt.setSelectionRange(0,Ft);break}}}var ft=(0,he.forwardRef)((vt,Ct)=>{var Bt;const{prefixCls:Ft,bordered:Ot=!0,status:_t,size:te,disabled:Xt,onBlur:Me,onFocus:qt,suffix:Ne,allowClear:ne,addonAfter:Ce,addonBefore:Ue,className:Ze,style:tn,styles:ln,rootClassName:ie,onChange:Gt,classNames:Ae}=vt,Sn=et(vt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:gn,direction:Fe,input:Ke}=he.useContext(be.E_),rn=gn("input",Ft),Fn=(0,he.useRef)(null),[Pn,We]=(0,At.ZP)(rn),{compactSize:fe,compactItemClassnames:An}=(0,de.ri)(rn,Fe),Hn=(0,Kt.Z)(zt=>{var Mt;return(Mt=te!=null?te:fe)!==null&&Mt!==void 0?Mt:zt}),un=he.useContext(ge.Z),De=Xt!=null?Xt:un,{status:He,hasFeedback:Ee,feedbackIcon:Jt}=(0,he.useContext)(ue.aM),ye=(0,Rt.F)(He,_t),Re=nt(vt)||!!Ee,Be=(0,he.useRef)(Re);(0,he.useEffect)(()=>{var zt;Re&&Be.current,Be.current=Re},[Re]);const Qt=(0,ve.Z)(Fn,!0),ce=zt=>{Qt(),Me==null||Me(zt)},Tt=zt=>{Qt(),qt==null||qt(zt)},xt=zt=>{Qt(),Gt==null||Gt(zt)},yt=(Ee||Ne)&&he.createElement(he.Fragment,null,Ne,Ee&&Jt);let kt;return typeof ne=="object"&&(ne!=null&&ne.clearIcon)?kt=ne:ne&&(kt={clearIcon:he.createElement(mt.Z,null)}),Pn(he.createElement(we.default,Object.assign({ref:(0,Ht.sQ)(Ct,Fn),prefixCls:rn,autoComplete:Ke==null?void 0:Ke.autoComplete},Sn,{disabled:De,onBlur:ce,onFocus:Tt,style:Object.assign(Object.assign({},Ke==null?void 0:Ke.style),tn),styles:Object.assign(Object.assign({},Ke==null?void 0:Ke.styles),ln),suffix:yt,allowClear:kt,className:Zt()(Ze,ie,An,Ke==null?void 0:Ke.className),onChange:xt,addonAfter:Ce&&he.createElement(de.BR,null,he.createElement(ue.Ux,{override:!0,status:!0},Ce)),addonBefore:Ue&&he.createElement(de.BR,null,he.createElement(ue.Ux,{override:!0,status:!0},Ue)),classNames:Object.assign(Object.assign(Object.assign({},Ae),Ke==null?void 0:Ke.classNames),{input:Zt()({[`${rn}-sm`]:Hn==="small",[`${rn}-lg`]:Hn==="large",[`${rn}-rtl`]:Fe==="rtl",[`${rn}-borderless`]:!Ot},!Re&&(0,Rt.Z)(rn,ye),Ae==null?void 0:Ae.input,(Bt=Ke==null?void 0:Ke.classNames)===null||Bt===void 0?void 0:Bt.input,We)}),classes:{affixWrapper:Zt()({[`${rn}-affix-wrapper-sm`]:Hn==="small",[`${rn}-affix-wrapper-lg`]:Hn==="large",[`${rn}-affix-wrapper-rtl`]:Fe==="rtl",[`${rn}-affix-wrapper-borderless`]:!Ot},(0,Rt.Z)(`${rn}-affix-wrapper`,ye,Ee),We),wrapper:Zt()({[`${rn}-group-rtl`]:Fe==="rtl"},We),group:Zt()({[`${rn}-group-wrapper-sm`]:Hn==="small",[`${rn}-group-wrapper-lg`]:Hn==="large",[`${rn}-group-wrapper-rtl`]:Fe==="rtl",[`${rn}-group-wrapper-disabled`]:De},(0,Rt.Z)(`${rn}-group-wrapper`,ye,Ee),We)}})))})},1643:function(xn,vn,Pt){"use strict";var mt=Pt(33130),It=Pt(92310),Zt=Pt.n(It),we=Pt(9296),Ht=Pt(59301),he=Pt(19080),Rt=Pt(36355),be=Pt(1684),ge=Pt(19716),Kt=Pt(32441),ue=Pt(9432),de=Pt(9937),ve=function(nt,et){var ht={};for(var at in nt)Object.prototype.hasOwnProperty.call(nt,at)&&et.indexOf(at)<0&&(ht[at]=nt[at]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,at=Object.getOwnPropertySymbols(nt);ft<at.length;ft++)et.indexOf(at[ft])<0&&Object.prototype.propertyIsEnumerable.call(nt,at[ft])&&(ht[at[ft]]=nt[at[ft]]);return ht};const At=(0,Ht.forwardRef)((nt,et)=>{const{prefixCls:ht,bordered:at=!0,size:ft,disabled:vt,status:Ct,allowClear:Bt,showCount:Ft,classNames:Ot,rootClassName:_t,className:te}=nt,Xt=ve(nt,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Me,direction:qt}=Ht.useContext(Rt.E_),Ne=(0,ge.Z)(ft),ne=Ht.useContext(be.Z),Ce=vt!=null?vt:ne,{status:Ue,hasFeedback:Ze,feedbackIcon:tn}=Ht.useContext(Kt.aM),ln=(0,he.F)(Ue,Ct),ie=Ht.useRef(null);Ht.useImperativeHandle(et,()=>{var Fe;return{resizableTextArea:(Fe=ie.current)===null||Fe===void 0?void 0:Fe.resizableTextArea,focus:Ke=>{var rn,Fn;(0,ue.n)((Fn=(rn=ie.current)===null||rn===void 0?void 0:rn.resizableTextArea)===null||Fn===void 0?void 0:Fn.textArea,Ke)},blur:()=>{var Ke;return(Ke=ie.current)===null||Ke===void 0?void 0:Ke.blur()}}});const Gt=Me("input",ht);let Ae;typeof Bt=="object"&&(Bt!=null&&Bt.clearIcon)?Ae=Bt:Bt&&(Ae={clearIcon:Ht.createElement(mt.Z,null)});const[Sn,gn]=(0,de.ZP)(Gt);return Sn(Ht.createElement(we.default,Object.assign({},Xt,{disabled:Ce,allowClear:Ae,className:Zt()(te,_t),classes:{affixWrapper:Zt()(`${Gt}-textarea-affix-wrapper`,{[`${Gt}-affix-wrapper-rtl`]:qt==="rtl",[`${Gt}-affix-wrapper-borderless`]:!at,[`${Gt}-affix-wrapper-sm`]:Ne==="small",[`${Gt}-affix-wrapper-lg`]:Ne==="large",[`${Gt}-textarea-show-count`]:Ft},(0,he.Z)(`${Gt}-affix-wrapper`,ln),gn)},classNames:Object.assign(Object.assign({},Ot),{textarea:Zt()({[`${Gt}-borderless`]:!at,[`${Gt}-sm`]:Ne==="small",[`${Gt}-lg`]:Ne==="large"},(0,he.Z)(Gt,ln),gn,Ot==null?void 0:Ot.textarea)}),prefixCls:Gt,suffix:Ze&&Ht.createElement("span",{className:`${Gt}-textarea-suffix`},tn),showCount:Ft,ref:ie})))});vn.Z=At},59412:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return It}});var mt=Pt(59301);function It(Zt,we){const Ht=(0,mt.useRef)([]),he=()=>{Ht.current.push(setTimeout(()=>{var Rt,be,ge,Kt;!((Rt=Zt.current)===null||Rt===void 0)&&Rt.input&&((be=Zt.current)===null||be===void 0?void 0:be.input.getAttribute("type"))==="password"&&(!((ge=Zt.current)===null||ge===void 0)&&ge.input.hasAttribute("value"))&&((Kt=Zt.current)===null||Kt===void 0||Kt.input.removeAttribute("value"))}))};return(0,mt.useEffect)(()=>(we&&he(),()=>Ht.current.forEach(Rt=>{Rt&&clearTimeout(Rt)})),[]),he}},92832:function(xn,vn,Pt){"use strict";Pt.d(vn,{default:function(){return Ne}});var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(59301),we=Pt(36355),Ht=Pt(32441),he=Pt(9937),be=ne=>{const{getPrefixCls:Ce,direction:Ue}=(0,Zt.useContext)(we.E_),{prefixCls:Ze,className:tn}=ne,ln=Ce("input-group",Ze),ie=Ce("input"),[Gt,Ae]=(0,he.ZP)(ie),Sn=It()(ln,{[`${ln}-lg`]:ne.size==="large",[`${ln}-sm`]:ne.size==="small",[`${ln}-compact`]:ne.compact,[`${ln}-rtl`]:Ue==="rtl"},Ae,tn),gn=(0,Zt.useContext)(Ht.aM),Fe=(0,Zt.useMemo)(()=>Object.assign(Object.assign({},gn),{isFormItemInput:!1}),[gn]);return Gt(Zt.createElement("span",{className:Sn,style:ne.style,onMouseEnter:ne.onMouseEnter,onMouseLeave:ne.onMouseLeave,onFocus:ne.onFocus,onBlur:ne.onBlur},Zt.createElement(Ht.aM.Provider,{value:Fe},ne.children)))},ge=Pt(9432),Kt=Pt(61441),ue=Pt(30631),de=Pt(64002),ve=Pt(20475),At=Pt(59412),nt=function(ne,Ce){var Ue={};for(var Ze in ne)Object.prototype.hasOwnProperty.call(ne,Ze)&&Ce.indexOf(Ze)<0&&(Ue[Ze]=ne[Ze]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tn=0,Ze=Object.getOwnPropertySymbols(ne);tn<Ze.length;tn++)Ce.indexOf(Ze[tn])<0&&Object.prototype.propertyIsEnumerable.call(ne,Ze[tn])&&(Ue[Ze[tn]]=ne[Ze[tn]]);return Ue};const et=ne=>ne?Zt.createElement(ue.Z,null):Zt.createElement(Kt.Z,null),ht={click:"onClick",hover:"onMouseOver"};var ft=Zt.forwardRef((ne,Ce)=>{const{visibilityToggle:Ue=!0}=ne,Ze=typeof Ue=="object"&&Ue.visible!==void 0,[tn,ln]=(0,Zt.useState)(()=>Ze?Ue.visible:!1),ie=(0,Zt.useRef)(null);Zt.useEffect(()=>{Ze&&ln(Ue.visible)},[Ze,Ue]);const Gt=(0,At.Z)(ie),Ae=()=>{const{disabled:De}=ne;De||(tn&&Gt(),ln(He=>{var Ee;const Jt=!He;return typeof Ue=="object"&&((Ee=Ue.onVisibleChange)===null||Ee===void 0||Ee.call(Ue,Jt)),Jt}))},Sn=De=>{const{action:He="click",iconRender:Ee=et}=ne,Jt=ht[He]||"",ye=Ee(tn),Re={[Jt]:Ae,className:`${De}-icon`,key:"passwordIcon",onMouseDown:Be=>{Be.preventDefault()},onMouseUp:Be=>{Be.preventDefault()}};return Zt.cloneElement(Zt.isValidElement(ye)?ye:Zt.createElement("span",null,ye),Re)},{className:gn,prefixCls:Fe,inputPrefixCls:Ke,size:rn}=ne,Fn=nt(ne,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Pn}=Zt.useContext(we.E_),We=Pn("input",Ke),fe=Pn("input-password",Fe),An=Ue&&Sn(fe),Hn=It()(fe,gn,{[`${fe}-${rn}`]:!!rn}),un=Object.assign(Object.assign({},(0,de.Z)(Fn,["suffix","iconRender","visibilityToggle"])),{type:tn?"text":"password",className:Hn,prefixCls:We,suffix:An});return rn&&(un.size=rn),Zt.createElement(ge.Z,Object.assign({ref:(0,ve.sQ)(Ce,ie)},un))}),vt=Pt(21970),Ct=Pt(92343),Bt=Pt(3113),Ft=Pt(19716),Ot=Pt(33234),_t=function(ne,Ce){var Ue={};for(var Ze in ne)Object.prototype.hasOwnProperty.call(ne,Ze)&&Ce.indexOf(Ze)<0&&(Ue[Ze]=ne[Ze]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tn=0,Ze=Object.getOwnPropertySymbols(ne);tn<Ze.length;tn++)Ce.indexOf(Ze[tn])<0&&Object.prototype.propertyIsEnumerable.call(ne,Ze[tn])&&(Ue[Ze[tn]]=ne[Ze[tn]]);return Ue},Xt=Zt.forwardRef((ne,Ce)=>{const{prefixCls:Ue,inputPrefixCls:Ze,className:tn,size:ln,suffix:ie,enterButton:Gt=!1,addonAfter:Ae,loading:Sn,disabled:gn,onSearch:Fe,onChange:Ke,onCompositionStart:rn,onCompositionEnd:Fn}=ne,Pn=_t(ne,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:We,direction:fe}=Zt.useContext(we.E_),An=Zt.useRef(!1),Hn=We("input-search",Ue),un=We("input",Ze),{compactSize:De}=(0,Ot.ri)(Hn,fe),He=(0,Ft.Z)(se=>{var $e;return($e=ln!=null?ln:De)!==null&&$e!==void 0?$e:se}),Ee=Zt.useRef(null),Jt=se=>{se&&se.target&&se.type==="click"&&Fe&&Fe(se.target.value,se,{source:"clear"}),Ke&&Ke(se)},ye=se=>{var $e;document.activeElement===(($e=Ee.current)===null||$e===void 0?void 0:$e.input)&&se.preventDefault()},Re=se=>{var $e,cn;Fe&&Fe((cn=($e=Ee.current)===null||$e===void 0?void 0:$e.input)===null||cn===void 0?void 0:cn.value,se,{source:"input"})},Be=se=>{An.current||Sn||Re(se)},Qt=typeof Gt=="boolean"?Zt.createElement(vt.Z,null):null,ce=`${Hn}-button`;let Tt;const xt=Gt||{},yt=xt.type&&xt.type.__ANT_BUTTON===!0;yt||xt.type==="button"?Tt=(0,Ct.Tm)(xt,Object.assign({onMouseDown:ye,onClick:se=>{var $e,cn;(cn=($e=xt==null?void 0:xt.props)===null||$e===void 0?void 0:$e.onClick)===null||cn===void 0||cn.call($e,se),Re(se)},key:"enterButton"},yt?{className:ce,size:He}:{})):Tt=Zt.createElement(Bt.ZP,{className:ce,type:Gt?"primary":void 0,size:He,disabled:gn,key:"enterButton",onMouseDown:ye,onClick:Re,loading:Sn,icon:Qt},Gt),Ae&&(Tt=[Tt,(0,Ct.Tm)(Ae,{key:"addonAfter"})]);const kt=It()(Hn,{[`${Hn}-rtl`]:fe==="rtl",[`${Hn}-${He}`]:!!He,[`${Hn}-with-button`]:!!Gt},tn),zt=se=>{An.current=!0,rn==null||rn(se)},Mt=se=>{An.current=!1,Fn==null||Fn(se)};return Zt.createElement(ge.Z,Object.assign({ref:(0,ve.sQ)(Ee,Ce),onPressEnter:Be},Pn,{size:He,onCompositionStart:zt,onCompositionEnd:Mt,prefixCls:un,addonAfter:Tt,suffix:ie,onChange:Jt,className:kt,disabled:gn}))}),Me=Pt(1643);const qt=ge.Z;qt.Group=be,qt.Search=Xt,qt.TextArea=Me.Z,qt.Password=ft;var Ne=qt},99580:function(xn,vn,Pt){"use strict";Pt.d(vn,{D:function(){return vt},Z:function(){return Ft}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},we=Zt,Ht=Pt(88853),he=function(_t,te){return It.createElement(Ht.Z,(0,mt.Z)({},_t,{ref:te,icon:we}))},Rt=It.forwardRef(he),be=Rt,ge=Pt(16537),Kt=Pt(53878),ue=Pt(92310),de=Pt.n(ue),ve=Pt(64002),nt=Ot=>!isNaN(parseFloat(Ot))&&isFinite(Ot),et=Pt(36355),ht=Pt(84966),at=function(Ot,_t){var te={};for(var Xt in Ot)Object.prototype.hasOwnProperty.call(Ot,Xt)&&_t.indexOf(Xt)<0&&(te[Xt]=Ot[Xt]);if(Ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,Xt=Object.getOwnPropertySymbols(Ot);Me<Xt.length;Me++)_t.indexOf(Xt[Me])<0&&Object.prototype.propertyIsEnumerable.call(Ot,Xt[Me])&&(te[Xt[Me]]=Ot[Xt[Me]]);return te};const ft={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},vt=It.createContext({}),Ct=(()=>{let Ot=0;return function(){let _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ot+=1,`${_t}${Ot}`}})();var Ft=It.forwardRef((Ot,_t)=>{const{prefixCls:te,className:Xt,trigger:Me,children:qt,defaultCollapsed:Ne=!1,theme:ne="dark",style:Ce={},collapsible:Ue=!1,reverseArrow:Ze=!1,width:tn=200,collapsedWidth:ln=80,zeroWidthTriggerStyle:ie,breakpoint:Gt,onCollapse:Ae,onBreakpoint:Sn}=Ot,gn=at(Ot,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Fe}=(0,It.useContext)(ht.Gs),[Ke,rn]=(0,It.useState)("collapsed"in Ot?Ot.collapsed:Ne),[Fn,Pn]=(0,It.useState)(!1);(0,It.useEffect)(()=>{"collapsed"in Ot&&rn(Ot.collapsed)},[Ot.collapsed]);const We=(He,Ee)=>{"collapsed"in Ot||rn(He),Ae==null||Ae(He,Ee)},fe=(0,It.useRef)();fe.current=He=>{Pn(He.matches),Sn==null||Sn(He.matches),Ke!==He.matches&&We(He.matches,"responsive")},(0,It.useEffect)(()=>{function He(Jt){return fe.current(Jt)}let Ee;if(typeof window!="undefined"){const{matchMedia:Jt}=window;if(Jt&&Gt&&Gt in ft){Ee=Jt(`(max-width: ${ft[Gt]})`);try{Ee.addEventListener("change",He)}catch(ye){Ee.addListener(He)}He(Ee)}}return()=>{try{Ee==null||Ee.removeEventListener("change",He)}catch(Jt){Ee==null||Ee.removeListener(He)}}},[Gt]),(0,It.useEffect)(()=>{const He=Ct("ant-sider-");return Fe.addSider(He),()=>Fe.removeSider(He)},[]);const An=()=>{We(!Ke,"clickTrigger")},{getPrefixCls:Hn}=(0,It.useContext)(et.E_),un=()=>{const He=Hn("layout-sider",te),Ee=(0,ve.Z)(gn,["collapsed"]),Jt=Ke?ln:tn,ye=nt(Jt)?`${Jt}px`:String(Jt),Re=parseFloat(String(ln||0))===0?It.createElement("span",{onClick:An,className:de()(`${He}-zero-width-trigger`,`${He}-zero-width-trigger-${Ze?"right":"left"}`),style:ie},Me||It.createElement(be,null)):null,ce={expanded:Ze?It.createElement(Kt.Z,null):It.createElement(ge.Z,null),collapsed:Ze?It.createElement(ge.Z,null):It.createElement(Kt.Z,null)}[Ke?"collapsed":"expanded"],Tt=Me!==null?Re||It.createElement("div",{className:`${He}-trigger`,onClick:An,style:{width:ye}},Me||ce):null,xt=Object.assign(Object.assign({},Ce),{flex:`0 0 ${ye}`,maxWidth:ye,minWidth:ye,width:ye}),yt=de()(He,`${He}-${ne}`,{[`${He}-collapsed`]:!!Ke,[`${He}-has-trigger`]:Ue&&Me!==null&&!Re,[`${He}-below`]:!!Fn,[`${He}-zero-width`]:parseFloat(ye)===0},Xt);return It.createElement("aside",Object.assign({className:yt},Ee,{style:xt,ref:_t}),It.createElement("div",{className:`${He}-children`},qt),Ue||Fn&&Re?Tt:null)},De=It.useMemo(()=>({siderCollapsed:Ke}),[Ke]);return It.createElement(vt.Provider,{value:De},un())})},84966:function(xn,vn,Pt){"use strict";Pt.d(vn,{VY:function(){return vt},$_:function(){return ft},h4:function(){return at},Gs:function(){return ve},ZP:function(){return Ct}});var mt=Pt(26390),It=Pt(92310),Zt=Pt.n(It),we=Pt(64002),Ht=Pt(59301),he=Pt(36355),Rt=Pt(83116),ge=Bt=>{const{componentCls:Ft,bodyBg:Ot,lightSiderBg:_t,lightTriggerBg:te,lightTriggerColor:Xt}=Bt;return{[`${Ft}-sider-light`]:{background:_t,[`${Ft}-sider-trigger`]:{color:Xt,background:te},[`${Ft}-sider-zero-width-trigger`]:{color:Xt,background:te,border:`1px solid ${Ot}`,borderInlineStart:0}}}};const Kt=Bt=>{const{antCls:Ft,componentCls:Ot,colorText:_t,triggerColor:te,footerBg:Xt,triggerBg:Me,headerHeight:qt,headerPadding:Ne,headerColor:ne,footerPadding:Ce,triggerHeight:Ue,zeroTriggerHeight:Ze,zeroTriggerWidth:tn,motionDurationMid:ln,motionDurationSlow:ie,fontSize:Gt,borderRadius:Ae,bodyBg:Sn,headerBg:gn,siderBg:Fe}=Bt;return{[Ot]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Sn,"&, *":{boxSizing:"border-box"},[`&${Ot}-has-sider`]:{flexDirection:"row",[`> ${Ot}, > ${Ot}-content`]:{width:0}},[`${Ot}-header, &${Ot}-footer`]:{flex:"0 0 auto"},[`${Ot}-sider`]:{position:"relative",minWidth:0,background:Fe,transition:`all ${ln}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Ft}-menu${Ft}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Ue},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Ue,color:te,lineHeight:`${Ue}px`,textAlign:"center",background:Me,cursor:"pointer",transition:`all ${ln}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:qt,insetInlineEnd:-tn,zIndex:1,width:tn,height:Ze,color:te,fontSize:Bt.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Fe,borderStartStartRadius:0,borderStartEndRadius:Ae,borderEndEndRadius:Ae,borderEndStartRadius:0,cursor:"pointer",transition:`background ${ie} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${ie}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-tn,borderStartStartRadius:Ae,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ae}}}}},ge(Bt)),{"&-rtl":{direction:"rtl"}}),[`${Ot}-header`]:{height:qt,padding:Ne,color:ne,lineHeight:`${qt}px`,background:gn,[`${Ft}-menu`]:{lineHeight:"inherit"}},[`${Ot}-footer`]:{padding:Ce,color:_t,fontSize:Gt,background:Xt},[`${Ot}-content`]:{flex:"auto",minHeight:0}}};var ue=(0,Rt.Z)("Layout",Bt=>[Kt(Bt)],Bt=>{const{colorBgLayout:Ft,controlHeight:Ot,controlHeightLG:_t,colorText:te,controlHeightSM:Xt,marginXXS:Me,colorTextLightSolid:qt,colorBgContainer:Ne}=Bt,ne=_t*1.25;return{colorBgHeader:"#001529",colorBgBody:Ft,colorBgTrigger:"#002140",bodyBg:Ft,headerBg:"#001529",headerHeight:Ot*2,headerPadding:`0 ${ne}px`,headerColor:te,footerPadding:`${Xt}px ${ne}px`,footerBg:Ft,siderBg:"#001529",triggerHeight:_t+Me*2,triggerBg:"#002140",triggerColor:qt,zeroTriggerWidth:_t,zeroTriggerHeight:_t,lightSiderBg:Ne,lightTriggerBg:Ne,lightTriggerColor:te}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),de=function(Bt,Ft){var Ot={};for(var _t in Bt)Object.prototype.hasOwnProperty.call(Bt,_t)&&Ft.indexOf(_t)<0&&(Ot[_t]=Bt[_t]);if(Bt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var te=0,_t=Object.getOwnPropertySymbols(Bt);te<_t.length;te++)Ft.indexOf(_t[te])<0&&Object.prototype.propertyIsEnumerable.call(Bt,_t[te])&&(Ot[_t[te]]=Bt[_t[te]]);return Ot};const ve=Ht.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function At(Bt){let{suffixCls:Ft,tagName:Ot,displayName:_t}=Bt;return te=>Ht.forwardRef((Me,qt)=>Ht.createElement(te,Object.assign({ref:qt,suffixCls:Ft,tagName:Ot},Me)))}const nt=Ht.forwardRef((Bt,Ft)=>{const{prefixCls:Ot,suffixCls:_t,className:te,tagName:Xt}=Bt,Me=de(Bt,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:qt}=Ht.useContext(he.E_),Ne=qt("layout",Ot),[ne,Ce]=ue(Ne),Ue=_t?`${Ne}-${_t}`:Ne;return ne(Ht.createElement(Xt,Object.assign({className:Zt()(Ot||Ue,te,Ce),ref:Ft},Me)))}),et=Ht.forwardRef((Bt,Ft)=>{const{direction:Ot}=Ht.useContext(he.E_),[_t,te]=Ht.useState([]),{prefixCls:Xt,className:Me,rootClassName:qt,children:Ne,hasSider:ne,tagName:Ce,style:Ue}=Bt,Ze=de(Bt,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),tn=(0,we.Z)(Ze,["suffixCls"]),{getPrefixCls:ln,layout:ie}=Ht.useContext(he.E_),Gt=ln("layout",Xt),[Ae,Sn]=ue(Gt),gn=Zt()(Gt,{[`${Gt}-has-sider`]:typeof ne=="boolean"?ne:_t.length>0,[`${Gt}-rtl`]:Ot==="rtl"},ie==null?void 0:ie.className,Me,qt,Sn),Fe=Ht.useMemo(()=>({siderHook:{addSider:Ke=>{te(rn=>[].concat((0,mt.Z)(rn),[Ke]))},removeSider:Ke=>{te(rn=>rn.filter(Fn=>Fn!==Ke))}}}),[]);return Ae(Ht.createElement(ve.Provider,{value:Fe},Ht.createElement(Ce,Object.assign({ref:Ft,className:gn,style:Object.assign(Object.assign({},ie==null?void 0:ie.style),Ue)},tn),Ne)))}),ht=At({tagName:"div",displayName:"Layout"})(et),at=At({suffixCls:"header",tagName:"header",displayName:"Header"})(nt),ft=At({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(nt),vt=At({suffixCls:"content",tagName:"main",displayName:"Content"})(nt);var Ct=ht},40875:function(xn,vn,Pt){"use strict";Pt.d(vn,{J:function(){return he}});var mt=Pt(59301),It=Pt(33234),Zt=Pt(80764),we=function(Rt,be){var ge={};for(var Kt in Rt)Object.prototype.hasOwnProperty.call(Rt,Kt)&&be.indexOf(Kt)<0&&(ge[Kt]=Rt[Kt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,Kt=Object.getOwnPropertySymbols(Rt);ue<Kt.length;ue++)be.indexOf(Kt[ue])<0&&Object.prototype.propertyIsEnumerable.call(Rt,Kt[ue])&&(ge[Kt[ue]]=Rt[Kt[ue]]);return ge};const Ht=mt.createContext(null),he=mt.forwardRef((Rt,be)=>{const{children:ge}=Rt,Kt=we(Rt,["children"]),ue=mt.useContext(Ht),de=mt.useMemo(()=>Object.assign(Object.assign({},ue),Kt),[ue,Kt.prefixCls,Kt.mode,Kt.selectable]);return mt.createElement(Ht.Provider,{value:de},mt.createElement(It.BR,null,(0,Zt.supportNodeRef)(ge)?mt.cloneElement(ge,{ref:be}):ge))});vn.Z=Ht},20834:function(xn,vn,Pt){"use strict";Pt.d(vn,{default:function(){return De}});var mt=Pt(22798),It=Pt(59301),Zt=Pt(99580),we=Pt(92310),Ht=Pt.n(we),he=Pt(36355),Rt=function(He,Ee){var Jt={};for(var ye in He)Object.prototype.hasOwnProperty.call(He,ye)&&Ee.indexOf(ye)<0&&(Jt[ye]=He[ye]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,ye=Object.getOwnPropertySymbols(He);Re<ye.length;Re++)Ee.indexOf(ye[Re])<0&&Object.prototype.propertyIsEnumerable.call(He,ye[Re])&&(Jt[ye[Re]]=He[ye[Re]]);return Jt},ge=He=>{const{prefixCls:Ee,className:Jt,dashed:ye}=He,Re=Rt(He,["prefixCls","className","dashed"]),{getPrefixCls:Be}=It.useContext(he.E_),Qt=Be("menu",Ee),ce=Ht()({[`${Qt}-item-divider-dashed`]:!!ye},Jt);return It.createElement(mt.iz,Object.assign({className:ce},Re))},Kt=Pt(38298),ue=Pt(64002),de=Pt(6848),ve=Pt(92343),nt=(0,It.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ht=He=>{var Ee;const{className:Jt,children:ye,icon:Re,title:Be,danger:Qt}=He,{prefixCls:ce,firstLevel:Tt,direction:xt,disableMenuItemTitleTooltip:yt,inlineCollapsed:kt}=It.useContext(nt),zt=En=>{const Gn=It.createElement("span",{className:`${ce}-title-content`},ye);return(!Re||(0,ve.l$)(ye)&&ye.type==="span")&&ye&&En&&Tt&&typeof ye=="string"?It.createElement("div",{className:`${ce}-inline-collapsed-noicon`},ye.charAt(0)):Gn},{siderCollapsed:Mt}=It.useContext(Zt.D);let se=Be;typeof Be=="undefined"?se=Tt?ye:"":Be===!1&&(se="");const $e={title:se};!Mt&&!kt&&($e.title=null,$e.open=!1);const cn=(0,Kt.Z)(ye).length;let sn=It.createElement(mt.ck,Object.assign({},(0,ue.Z)(He,["title","icon","danger"]),{className:Ht()({[`${ce}-item-danger`]:Qt,[`${ce}-item-only-child`]:(Re?cn+1:cn)===1},Jt),title:typeof Be=="string"?Be:void 0}),(0,ve.Tm)(Re,{className:Ht()((0,ve.l$)(Re)?(Ee=Re.props)===null||Ee===void 0?void 0:Ee.className:"",`${ce}-item-icon`)}),zt(kt));return yt||(sn=It.createElement(de.Z,Object.assign({},$e,{placement:xt==="rtl"?"left":"right",overlayClassName:`${ce}-inline-collapsed-tooltip`}),sn)),sn},ft=He=>{var Ee;const{popupClassName:Jt,icon:ye,title:Re,theme:Be}=He,Qt=It.useContext(nt),{prefixCls:ce,inlineCollapsed:Tt,theme:xt}=Qt,yt=(0,mt.Xl)();let kt;if(!ye)kt=Tt&&!yt.length&&Re&&typeof Re=="string"?It.createElement("div",{className:`${ce}-inline-collapsed-noicon`},Re.charAt(0)):It.createElement("span",{className:`${ce}-title-content`},Re);else{const Mt=(0,ve.l$)(Re)&&Re.type==="span";kt=It.createElement(It.Fragment,null,(0,ve.Tm)(ye,{className:Ht()((0,ve.l$)(ye)?(Ee=ye.props)===null||Ee===void 0?void 0:Ee.className:"",`${ce}-item-icon`)}),Mt?Re:It.createElement("span",{className:`${ce}-title-content`},Re))}const zt=It.useMemo(()=>Object.assign(Object.assign({},Qt),{firstLevel:!1}),[Qt]);return It.createElement(nt.Provider,{value:zt},It.createElement(mt.Wd,Object.assign({},(0,ue.Z)(He,["icon"]),{title:kt,popupClassName:Ht()(ce,Jt,`${ce}-${Be||xt}`)})))},vt=Pt(19362),Ct=Pt(80764),Bt=Pt(62892),Ft=Pt(40875),Ot=function(He,Ee){var Jt={};for(var ye in He)Object.prototype.hasOwnProperty.call(He,ye)&&Ee.indexOf(ye)<0&&(Jt[ye]=He[ye]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,ye=Object.getOwnPropertySymbols(He);Re<ye.length;Re++)Ee.indexOf(ye[Re])<0&&Object.prototype.propertyIsEnumerable.call(He,ye[Re])&&(Jt[ye[Re]]=He[ye[Re]]);return Jt};function _t(He){return(He||[]).map((Ee,Jt)=>{if(Ee&&typeof Ee=="object"){const ye=Ee,{label:Re,children:Be,key:Qt,type:ce}=ye,Tt=Ot(ye,["label","children","key","type"]),xt=Qt!=null?Qt:`tmp-${Jt}`;return Be||ce==="group"?ce==="group"?It.createElement(mt.BW,Object.assign({key:xt},Tt,{title:Re}),_t(Be)):It.createElement(ft,Object.assign({key:xt},Tt,{title:Re}),_t(Be)):ce==="divider"?It.createElement(ge,Object.assign({key:xt},Tt)):It.createElement(ht,Object.assign({key:xt},Tt),Re)}return null}).filter(Ee=>Ee)}function te(He){return It.useMemo(()=>He&&_t(He),[He])}var Xt=Pt(64993),Me=Pt(17313),qt=Pt(8378),Ne=Pt(13826),ne=Pt(29878),Ce=Pt(83116),Ue=Pt(37613),tn=He=>{const{componentCls:Ee,motionDurationSlow:Jt,horizontalLineHeight:ye,colorSplit:Re,lineWidth:Be,lineType:Qt,itemPaddingInline:ce}=He;return{[`${Ee}-horizontal`]:{lineHeight:ye,border:0,borderBottom:`${Be}px ${Qt} ${Re}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ee}-item, ${Ee}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:ce},[`> ${Ee}-item:hover,
> ${Ee}-item-active,
> ${Ee}-submenu ${Ee}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ee}-item, ${Ee}-submenu-title`]:{transition:[`border-color ${Jt}`,`background ${Jt}`].join(",")},[`${Ee}-submenu-arrow`]:{display:"none"}}}},ie=He=>{let{componentCls:Ee,menuArrowOffset:Jt}=He;return{[`${Ee}-rtl`]:{direction:"rtl"},[`${Ee}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ee}-rtl${Ee}-vertical,
${Ee}-submenu-rtl ${Ee}-vertical`]:{[`${Ee}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Jt})`},"&::after":{transform:`rotate(45deg) translateY(${Jt})`}}}}};const Gt=He=>Object.assign({},(0,Me.oN)(He));var Sn=(He,Ee)=>{const{componentCls:Jt,itemColor:ye,itemSelectedColor:Re,groupTitleColor:Be,itemBg:Qt,subMenuItemBg:ce,itemSelectedBg:Tt,activeBarHeight:xt,activeBarWidth:yt,activeBarBorderWidth:kt,motionDurationSlow:zt,motionEaseInOut:Mt,motionEaseOut:se,itemPaddingInline:$e,motionDurationMid:cn,itemHoverColor:sn,lineType:En,colorSplit:Gn,itemDisabledColor:zn,dangerItemColor:Zn,dangerItemHoverColor:$n,dangerItemSelectedColor:ni,dangerItemActiveBg:ei,dangerItemSelectedBg:Bi,itemHoverBg:Ki,itemActiveBg:jn,menuSubMenuBg:Tn,horizontalItemSelectedColor:In,horizontalItemSelectedBg:li,horizontalItemBorderRadius:gi,horizontalItemHoverBg:Yi,popupBg:Ci}=He;return{[`${Jt}-${Ee}, ${Jt}-${Ee} > ${Jt}`]:{color:ye,background:Qt,[`&${Jt}-root:focus-visible`]:Object.assign({},Gt(He)),[`${Jt}-item-group-title`]:{color:Be},[`${Jt}-submenu-selected`]:{[`> ${Jt}-submenu-title`]:{color:Re}},[`${Jt}-item-disabled, ${Jt}-submenu-disabled`]:{color:`${zn} !important`},[`${Jt}-item:not(${Jt}-item-selected):not(${Jt}-submenu-selected)`]:{[`&:hover, > ${Jt}-submenu-title:hover`]:{color:sn}},[`&:not(${Jt}-horizontal)`]:{[`${Jt}-item:not(${Jt}-item-selected)`]:{"&:hover":{backgroundColor:Ki},"&:active":{backgroundColor:jn}},[`${Jt}-submenu-title`]:{"&:hover":{backgroundColor:Ki},"&:active":{backgroundColor:jn}}},[`${Jt}-item-danger`]:{color:Zn,[`&${Jt}-item:hover`]:{[`&:not(${Jt}-item-selected):not(${Jt}-submenu-selected)`]:{color:$n}},[`&${Jt}-item:active`]:{background:ei}},[`${Jt}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Jt}-item-selected`]:{color:Re,[`&${Jt}-item-danger`]:{color:ni},"a, a:hover":{color:"inherit"}},[`& ${Jt}-item-selected`]:{backgroundColor:Tt,[`&${Jt}-item-danger`]:{backgroundColor:Bi}},[`${Jt}-item, ${Jt}-submenu-title`]:{[`&:not(${Jt}-item-disabled):focus-visible`]:Object.assign({},Gt(He))},[`&${Jt}-submenu > ${Jt}`]:{backgroundColor:Tn},[`&${Jt}-popup > ${Jt}`]:{backgroundColor:Ci},[`&${Jt}-horizontal`]:Object.assign(Object.assign({},Ee==="dark"?{borderBottom:0}:{}),{[`> ${Jt}-item, > ${Jt}-submenu`]:{top:kt,marginTop:-kt,marginBottom:0,borderRadius:gi,"&::after":{position:"absolute",insetInline:$e,bottom:0,borderBottom:`${xt}px solid transparent`,transition:`border-color ${zt} ${Mt}`,content:'""'},"&:hover, &-active, &-open":{background:Yi,"&::after":{borderBottomWidth:xt,borderBottomColor:In}},"&-selected":{color:In,backgroundColor:li,"&:hover":{backgroundColor:li},"&::after":{borderBottomWidth:xt,borderBottomColor:In}}}}),[`&${Jt}-root`]:{[`&${Jt}-inline, &${Jt}-vertical`]:{borderInlineEnd:`${kt}px ${En} ${Gn}`}},[`&${Jt}-inline`]:{[`${Jt}-sub${Jt}-inline`]:{background:ce},[`${Jt}-item, ${Jt}-submenu-title`]:kt&&yt?{width:`calc(100% + ${kt}px)`}:{},[`${Jt}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${yt}px solid ${Re}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${cn} ${se}`,`opacity ${cn} ${se}`].join(","),content:'""'},[`&${Jt}-item-danger`]:{"&::after":{borderInlineEndColor:ni}}},[`${Jt}-selected, ${Jt}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${cn} ${Mt}`,`opacity ${cn} ${Mt}`].join(",")}}}}}};const gn=He=>{const{componentCls:Ee,itemHeight:Jt,itemMarginInline:ye,padding:Re,menuArrowSize:Be,marginXS:Qt,itemMarginBlock:ce}=He,Tt=Re+Be+Qt;return{[`${Ee}-item`]:{position:"relative",overflow:"hidden"},[`${Ee}-item, ${Ee}-submenu-title`]:{height:Jt,lineHeight:`${Jt}px`,paddingInline:Re,overflow:"hidden",textOverflow:"ellipsis",marginInline:ye,marginBlock:ce,width:`calc(100% - ${ye*2}px)`},[`> ${Ee}-item,
> ${Ee}-submenu > ${Ee}-submenu-title`]:{height:Jt,lineHeight:`${Jt}px`},[`${Ee}-item-group-list ${Ee}-submenu-title,
${Ee}-submenu-title`]:{paddingInlineEnd:Tt}}};var Ke=He=>{const{componentCls:Ee,iconCls:Jt,itemHeight:ye,colorTextLightSolid:Re,dropdownWidth:Be,controlHeightLG:Qt,motionDurationMid:ce,motionEaseOut:Tt,paddingXL:xt,itemMarginInline:yt,fontSizeLG:kt,motionDurationSlow:zt,paddingXS:Mt,boxShadowSecondary:se,collapsedWidth:$e,collapsedIconSize:cn}=He,sn={height:ye,lineHeight:`${ye}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Ee]:{"&-inline, &-vertical":Object.assign({[`&${Ee}-root`]:{boxShadow:"none"}},gn(He))},[`${Ee}-submenu-popup`]:{[`${Ee}-vertical`]:Object.assign(Object.assign({},gn(He)),{boxShadow:se})}},{[`${Ee}-submenu-popup ${Ee}-vertical${Ee}-sub`]:{minWidth:Be,maxHeight:`calc(100vh - ${Qt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ee}-inline`]:{width:"100%",[`&${Ee}-root`]:{[`${Ee}-item, ${Ee}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${zt}`,`background ${zt}`,`padding ${ce} ${Tt}`].join(","),[`> ${Ee}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ee}-sub${Ee}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ee}-submenu > ${Ee}-submenu-title`]:sn,[`& ${Ee}-item-group-title`]:{paddingInlineStart:xt}},[`${Ee}-item`]:sn}},{[`${Ee}-inline-collapsed`]:{width:$e,[`&${Ee}-root`]:{[`${Ee}-item, ${Ee}-submenu ${Ee}-submenu-title`]:{[`> ${Ee}-inline-collapsed-noicon`]:{fontSize:kt,textAlign:"center"}}},[`> ${Ee}-item,
> ${Ee}-item-group > ${Ee}-item-group-list > ${Ee}-item,
> ${Ee}-item-group > ${Ee}-item-group-list > ${Ee}-submenu > ${Ee}-submenu-title,
> ${Ee}-submenu > ${Ee}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${kt/2}px - ${yt}px)`,textOverflow:"clip",[`
${Ee}-submenu-arrow,
${Ee}-submenu-expand-icon
`]:{opacity:0},[`${Ee}-item-icon, ${Jt}`]:{margin:0,fontSize:cn,lineHeight:`${ye}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Ee}-item-icon, ${Jt}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ee}-item-icon, ${Jt}`]:{display:"none"},"a, a:hover":{color:Re}},[`${Ee}-item-group-title`]:Object.assign(Object.assign({},Me.vS),{paddingInline:Mt})}}]};const rn=He=>{const{componentCls:Ee,motionDurationSlow:Jt,motionDurationMid:ye,motionEaseInOut:Re,motionEaseOut:Be,iconCls:Qt,iconSize:ce,iconMarginInlineEnd:Tt}=He;return{[`${Ee}-item, ${Ee}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Jt}`,`background ${Jt}`,`padding ${Jt} ${Re}`].join(","),[`${Ee}-item-icon, ${Qt}`]:{minWidth:ce,fontSize:ce,transition:[`font-size ${ye} ${Be}`,`margin ${Jt} ${Re}`,`color ${Jt}`].join(","),"+ span":{marginInlineStart:Tt,opacity:1,transition:[`opacity ${Jt} ${Re}`,`margin ${Jt}`,`color ${Jt}`].join(",")}},[`${Ee}-item-icon`]:Object.assign({},(0,Me.Ro)()),[`&${Ee}-item-only-child`]:{[`> ${Qt}, > ${Ee}-item-icon`]:{marginInlineEnd:0}}},[`${Ee}-item-disabled, ${Ee}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Ee}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Fn=He=>{const{componentCls:Ee,motionDurationSlow:Jt,motionEaseInOut:ye,borderRadius:Re,menuArrowSize:Be,menuArrowOffset:Qt}=He;return{[`${Ee}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:He.margin,width:Be,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Jt} ${ye}, opacity ${Jt}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Be*.6,height:Be*.15,backgroundColor:"currentcolor",borderRadius:Re,transition:[`background ${Jt} ${ye}`,`transform ${Jt} ${ye}`,`top ${Jt} ${ye}`,`color ${Jt} ${ye}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Qt})`},"&::after":{transform:`rotate(-45deg) translateY(${Qt})`}}}}},Pn=He=>{const{antCls:Ee,componentCls:Jt,fontSize:ye,motionDurationSlow:Re,motionDurationMid:Be,motionEaseInOut:Qt,paddingXS:ce,padding:Tt,colorSplit:xt,lineWidth:yt,zIndexPopup:kt,borderRadiusLG:zt,subMenuItemBorderRadius:Mt,menuArrowSize:se,menuArrowOffset:$e,lineType:cn,menuPanelMaskInset:sn,groupTitleLineHeight:En,groupTitleFontSize:Gn}=He;return[{"":{[`${Jt}`]:Object.assign(Object.assign({},(0,Me.dF)()),{"&-hidden":{display:"none"}})},[`${Jt}-submenu-hidden`]:{display:"none"}},{[Jt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Me.Wf)(He)),(0,Me.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:ye,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Re} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Jt}-item`]:{flex:"none"}},[`${Jt}-item, ${Jt}-submenu, ${Jt}-submenu-title`]:{borderRadius:He.itemBorderRadius},[`${Jt}-item-group-title`]:{padding:`${ce}px ${Tt}px`,fontSize:Gn,lineHeight:En,transition:`all ${Re}`},[`&-horizontal ${Jt}-submenu`]:{transition:[`border-color ${Re} ${Qt}`,`background ${Re} ${Qt}`].join(",")},[`${Jt}-submenu, ${Jt}-submenu-inline`]:{transition:[`border-color ${Re} ${Qt}`,`background ${Re} ${Qt}`,`padding ${Be} ${Qt}`].join(",")},[`${Jt}-submenu ${Jt}-sub`]:{cursor:"initial",transition:[`background ${Re} ${Qt}`,`padding ${Re} ${Qt}`].join(",")},[`${Jt}-title-content`]:{transition:`color ${Re}`},[`${Jt}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Jt}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:xt,borderStyle:cn,borderWidth:0,borderTopWidth:yt,marginBlock:yt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),rn(He)),{[`${Jt}-item-group`]:{[`${Jt}-item-group-list`]:{margin:0,padding:0,[`${Jt}-item, ${Jt}-submenu-title`]:{paddingInline:`${ye*2}px ${Tt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:kt,borderRadius:zt,boxShadow:"none",transformOrigin:"0 0",[`&${Jt}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${sn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:sn},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:He.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:He.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:He.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:He.paddingXS},[`> ${Jt}`]:Object.assign(Object.assign(Object.assign({borderRadius:zt},rn(He)),Fn(He)),{[`${Jt}-item, ${Jt}-submenu > ${Jt}-submenu-title`]:{borderRadius:Mt},[`${Jt}-submenu-title::after`]:{transition:`transform ${Re} ${Qt}`}})}}),Fn(He)),{[`&-inline-collapsed ${Jt}-submenu-arrow,
&-inline ${Jt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${$e})`},"&::after":{transform:`rotate(45deg) translateX(-${$e})`}},[`${Jt}-submenu-open${Jt}-submenu-inline > ${Jt}-submenu-title > ${Jt}-submenu-arrow`]:{transform:`translateY(-${se*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${$e})`},"&::before":{transform:`rotate(45deg) translateX(${$e})`}}})},{[`${Ee}-layout-header`]:{[Jt]:{lineHeight:"inherit"}}}]};var We=(He,Ee)=>(0,Ce.Z)("Menu",ye=>{if(Ee===!1)return[];const{colorBgElevated:Re,colorPrimary:Be,colorTextLightSolid:Qt,controlHeightLG:ce,fontSize:Tt,darkItemColor:xt,darkDangerItemColor:yt,darkItemBg:kt,darkSubMenuItemBg:zt,darkItemSelectedColor:Mt,darkItemSelectedBg:se,darkDangerItemSelectedBg:$e,darkItemHoverBg:cn,darkGroupTitleColor:sn,darkItemHoverColor:En,darkItemDisabledColor:Gn,darkDangerItemHoverColor:zn,darkDangerItemSelectedColor:Zn,darkDangerItemActiveBg:$n}=ye,ni=Tt/7*5,ei=(0,Ue.TS)(ye,{menuArrowSize:ni,menuHorizontalHeight:ce*1.15,menuArrowOffset:`${ni*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Re}),Bi=(0,Ue.TS)(ei,{itemColor:xt,itemHoverColor:En,groupTitleColor:sn,itemSelectedColor:Mt,itemBg:kt,popupBg:kt,subMenuItemBg:zt,itemActiveBg:"transparent",itemSelectedBg:se,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:cn,itemDisabledColor:Gn,dangerItemColor:yt,dangerItemHoverColor:zn,dangerItemSelectedColor:Zn,dangerItemActiveBg:$n,dangerItemSelectedBg:$e,menuSubMenuBg:zt,horizontalItemSelectedColor:Qt,horizontalItemSelectedBg:Be});return[Pn(ei),tn(ei),Ke(ei),Sn(ei,"light"),Sn(Bi,"dark"),ie(ei),(0,qt.Z)(ei),(0,Ne.oN)(ei,"slide-up"),(0,Ne.oN)(ei,"slide-down"),(0,ne._y)(ei,"zoom-big")]},ye=>{const{colorPrimary:Re,colorError:Be,colorTextDisabled:Qt,colorErrorBg:ce,colorText:Tt,colorTextDescription:xt,colorBgContainer:yt,colorFillAlter:kt,colorFillContent:zt,lineWidth:Mt,lineWidthBold:se,controlItemBgActive:$e,colorBgTextHover:cn,controlHeightLG:sn,lineHeight:En,colorBgElevated:Gn,marginXXS:zn,padding:Zn,fontSize:$n,controlHeightSM:ni,fontSizeLG:ei,colorTextLightSolid:Bi,colorErrorHover:Ki}=ye,jn=new Xt.C(Bi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:ye.zIndexPopupBase+50,radiusItem:ye.borderRadiusLG,itemBorderRadius:ye.borderRadiusLG,radiusSubMenuItem:ye.borderRadiusSM,subMenuItemBorderRadius:ye.borderRadiusSM,colorItemText:Tt,itemColor:Tt,colorItemTextHover:Tt,itemHoverColor:Tt,colorItemTextHoverHorizontal:Re,horizontalItemHoverColor:Re,colorGroupTitle:xt,groupTitleColor:xt,colorItemTextSelected:Re,itemSelectedColor:Re,colorItemTextSelectedHorizontal:Re,horizontalItemSelectedColor:Re,colorItemBg:yt,itemBg:yt,colorItemBgHover:cn,itemHoverBg:cn,colorItemBgActive:zt,itemActiveBg:$e,colorSubItemBg:kt,subMenuItemBg:kt,colorItemBgSelected:$e,itemSelectedBg:$e,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:se,activeBarHeight:se,colorActiveBarBorderSize:Mt,activeBarBorderWidth:Mt,colorItemTextDisabled:Qt,itemDisabledColor:Qt,colorDangerItemText:Be,dangerItemColor:Be,colorDangerItemTextHover:Be,dangerItemHoverColor:Be,colorDangerItemTextSelected:Be,dangerItemSelectedColor:Be,colorDangerItemBgActive:ce,dangerItemActiveBg:ce,colorDangerItemBgSelected:ce,dangerItemSelectedBg:ce,itemMarginInline:ye.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:sn,groupTitleLineHeight:En,collapsedWidth:sn*2,popupBg:Gn,itemMarginBlock:zn,itemPaddingInline:Zn,horizontalLineHeight:`${sn*1.15}px`,iconSize:$n,iconMarginInlineEnd:ni-$n,collapsedIconSize:ei,groupTitleFontSize:$n,darkItemDisabledColor:new Xt.C(Bi).setAlpha(.25).toRgbString(),darkItemColor:jn,darkDangerItemColor:Be,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Bi,darkItemSelectedBg:Re,darkDangerItemSelectedBg:Be,darkItemHoverBg:"transparent",darkGroupTitleColor:jn,darkItemHoverColor:Bi,darkDangerItemHoverColor:Ki,darkDangerItemSelectedColor:Bi,darkDangerItemActiveBg:Be}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(He),fe=function(He,Ee){var Jt={};for(var ye in He)Object.prototype.hasOwnProperty.call(He,ye)&&Ee.indexOf(ye)<0&&(Jt[ye]=He[ye]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,ye=Object.getOwnPropertySymbols(He);Re<ye.length;Re++)Ee.indexOf(ye[Re])<0&&Object.prototype.propertyIsEnumerable.call(He,ye[Re])&&(Jt[ye[Re]]=He[ye[Re]]);return Jt},Hn=(0,It.forwardRef)((He,Ee)=>{var Jt,ye;const Re=It.useContext(Ft.Z),Be=Re||{},{getPrefixCls:Qt,getPopupContainer:ce,direction:Tt,menu:xt}=It.useContext(he.E_),yt=Qt(),{prefixCls:kt,className:zt,style:Mt,theme:se="light",expandIcon:$e,_internalDisableMenuItemTitleTooltip:cn,inlineCollapsed:sn,siderCollapsed:En,items:Gn,children:zn,rootClassName:Zn,mode:$n,selectable:ni,onClick:ei,overflowedIndicatorPopupClassName:Bi}=He,Ki=fe(He,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),jn=(0,ue.Z)(Ki,["collapsedWidth"]),Tn=te(Gn)||zn;(Jt=Be.validator)===null||Jt===void 0||Jt.call(Be,{mode:$n});const In=(0,Ct.useEvent)(function(){var io;ei==null||ei.apply(void 0,arguments),(io=Be.onClick)===null||io===void 0||io.call(Be)}),li=Be.mode||$n,gi=ni!=null?ni:Be.selectable,Yi=It.useMemo(()=>En!==void 0?En:sn,[sn,En]),Ci={horizontal:{motionName:`${yt}-slide-up`},inline:(0,Bt.Z)(yt),other:{motionName:`${yt}-zoom-big`}},bt=Qt("menu",kt||Be.prefixCls),[_i,Fi]=We(bt,!Re),co=Ht()(`${bt}-${se}`,xt==null?void 0:xt.className,zt);let xo;if(typeof $e=="function")xo=$e;else if($e===null||$e===!1)xo=null;else if(Be.expandIcon===null||Be.expandIcon===!1)xo=null;else{const io=$e!=null?$e:Be.expandIcon;xo=(0,ve.Tm)(io,{className:Ht()(`${bt}-submenu-expand-icon`,(0,ve.l$)(io)?(ye=io.props)===null||ye===void 0?void 0:ye.className:"")})}const Go=It.useMemo(()=>({prefixCls:bt,inlineCollapsed:Yi||!1,direction:Tt,firstLevel:!0,theme:se,mode:li,disableMenuItemTitleTooltip:cn}),[bt,Yi,Tt,cn,se]);return _i(It.createElement(Ft.Z.Provider,{value:null},It.createElement(nt.Provider,{value:Go},It.createElement(mt.ZP,Object.assign({getPopupContainer:ce,overflowedIndicator:It.createElement(vt.Z,null),overflowedIndicatorPopupClassName:Ht()(bt,`${bt}-${se}`,Bi),mode:li,selectable:gi,onClick:In},jn,{inlineCollapsed:Yi,style:Object.assign(Object.assign({},xt==null?void 0:xt.style),Mt),className:co,prefixCls:bt,direction:Tt,defaultMotions:Ci,expandIcon:xo,ref:Ee,rootClassName:Ht()(Zn,Fi)}),Tn))))});const un=(0,It.forwardRef)((He,Ee)=>{const Jt=(0,It.useRef)(null),ye=It.useContext(Zt.D);return(0,It.useImperativeHandle)(Ee,()=>({menu:Jt.current,focus:Re=>{var Be;(Be=Jt.current)===null||Be===void 0||Be.focus(Re)}})),It.createElement(Hn,Object.assign({ref:Jt},He,ye))});un.Item=ht,un.SubMenu=ft,un.Divider=ge,un.ItemGroup=mt.BW;var De=un},25700:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return Be}});var mt=Pt(5891),It=Pt(59301),Zt={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"},we=Zt,Ht=Pt(88853),he=function(ce,Tt){return It.createElement(Ht.Z,(0,mt.Z)({},ce,{ref:Tt,icon:we}))},Rt=It.forwardRef(he),be=Rt,ge=Pt(93343),Kt=Pt(16537),ue=Pt(53878),de=Pt(92310),ve=Pt.n(de),At=Pt(80962),nt=Pt(57259),et=Pt(79545),ht=Pt(68550),at=Pt(17928),ft=Pt(7711),vt=Pt(36994),Ct={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Bt=Ct,Ft=Pt(91735),Ot=function(Qt){(0,at.Z)(Tt,Qt);var ce=(0,ft.Z)(Tt);function Tt(){var xt;(0,et.Z)(this,Tt);for(var yt=arguments.length,kt=new Array(yt),zt=0;zt<yt;zt++)kt[zt]=arguments[zt];return xt=ce.call.apply(ce,[this].concat(kt)),xt.state={goInputText:""},xt.getValidValue=function(){var Mt=xt.state.goInputText;return!Mt||Number.isNaN(Mt)?void 0:Number(Mt)},xt.buildOptionText=function(Mt){return"".concat(Mt," ").concat(xt.props.locale.items_per_page)},xt.changeSize=function(Mt){xt.props.changeSize(Number(Mt))},xt.handleChange=function(Mt){xt.setState({goInputText:Mt.target.value})},xt.handleBlur=function(Mt){var se=xt.props,$e=se.goButton,cn=se.quickGo,sn=se.rootPrefixCls,En=xt.state.goInputText;$e||En===""||(xt.setState({goInputText:""}),!(Mt.relatedTarget&&(Mt.relatedTarget.className.indexOf("".concat(sn,"-item-link"))>=0||Mt.relatedTarget.className.indexOf("".concat(sn,"-item"))>=0))&&cn(xt.getValidValue()))},xt.go=function(Mt){var se=xt.state.goInputText;se!==""&&(Mt.keyCode===Bt.ENTER||Mt.type==="click")&&(xt.setState({goInputText:""}),xt.props.quickGo(xt.getValidValue()))},xt}return(0,ht.Z)(Tt,[{key:"getPageSizeOptions",value:function(){var yt=this.props,kt=yt.pageSize,zt=yt.pageSizeOptions;return zt.some(function(Mt){return Mt.toString()===kt.toString()})?zt:zt.concat([kt.toString()]).sort(function(Mt,se){var $e=Number.isNaN(Number(Mt))?0:Number(Mt),cn=Number.isNaN(Number(se))?0:Number(se);return $e-cn})}},{key:"render",value:function(){var yt=this,kt=this.props,zt=kt.pageSize,Mt=kt.locale,se=kt.rootPrefixCls,$e=kt.changeSize,cn=kt.quickGo,sn=kt.goButton,En=kt.selectComponentClass,Gn=kt.buildOptionText,zn=kt.selectPrefixCls,Zn=kt.disabled,$n=this.state.goInputText,ni="".concat(se,"-options"),ei=En,Bi=null,Ki=null,jn=null;if(!$e&&!cn)return null;var Tn=this.getPageSizeOptions();if($e&&ei){var In=Tn.map(function(li,gi){return It.createElement(ei.Option,{key:gi,value:li.toString()},(Gn||yt.buildOptionText)(li))});Bi=It.createElement(ei,{disabled:Zn,prefixCls:zn,showSearch:!1,className:"".concat(ni,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(zt||Tn[0]).toString(),onChange:this.changeSize,getPopupContainer:function(gi){return gi.parentNode},"aria-label":Mt.page_size,defaultOpen:!1},In)}return cn&&(sn&&(jn=typeof sn=="boolean"?It.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Zn,className:"".concat(ni,"-quick-jumper-button")},Mt.jump_to_confirm):It.createElement("span",{onClick:this.go,onKeyUp:this.go},sn)),Ki=It.createElement("div",{className:"".concat(ni,"-quick-jumper")},Mt.jump_to,It.createElement("input",{disabled:Zn,type:"text",value:$n,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Mt.page}),Mt.page,jn)),It.createElement("li",{className:"".concat(ni)},Bi,Ki)}}]),Tt}(It.Component);Ot.defaultProps={pageSizeOptions:["10","20","50","100"]};var _t=Ot,te=function(ce){var Tt,xt=ce.rootPrefixCls,yt=ce.page,kt=ce.active,zt=ce.className,Mt=ce.showTitle,se=ce.onClick,$e=ce.onKeyPress,cn=ce.itemRender,sn="".concat(xt,"-item"),En=ve()(sn,"".concat(sn,"-").concat(yt),(Tt={},(0,At.Z)(Tt,"".concat(sn,"-active"),kt),(0,At.Z)(Tt,"".concat(sn,"-disabled"),!yt),(0,At.Z)(Tt,ce.className,zt),Tt)),Gn=function(){se(yt)},zn=function(ni){$e(ni,se,yt)},Zn=cn(yt,"page",It.createElement("a",{rel:"nofollow"},yt));return Zn?It.createElement("li",{title:Mt?yt.toString():null,className:En,onClick:Gn,onKeyPress:zn,tabIndex:0},Zn):null},Xt=te;function Me(){}function qt(Qt){var ce=Number(Qt);return typeof ce=="number"&&!Number.isNaN(ce)&&isFinite(ce)&&Math.floor(ce)===ce}var Ne=function(ce,Tt,xt){return xt};function ne(Qt,ce,Tt){var xt=typeof Qt=="undefined"?ce.pageSize:Qt;return Math.floor((Tt.total-1)/xt)+1}var Ce=function(Qt){(0,at.Z)(Tt,Qt);var ce=(0,ft.Z)(Tt);function Tt(xt){var yt;(0,et.Z)(this,Tt),yt=ce.call(this,xt),yt.paginationNode=It.createRef(),yt.getJumpPrevPage=function(){return Math.max(1,yt.state.current-(yt.props.showLessItems?3:5))},yt.getJumpNextPage=function(){return Math.min(ne(void 0,yt.state,yt.props),yt.state.current+(yt.props.showLessItems?3:5))},yt.getItemIcon=function($e,cn){var sn=yt.props.prefixCls,En=$e||It.createElement("button",{type:"button","aria-label":cn,className:"".concat(sn,"-item-link")});return typeof $e=="function"&&(En=It.createElement($e,(0,nt.Z)({},yt.props))),En},yt.isValid=function($e){var cn=yt.props.total;return qt($e)&&$e!==yt.state.current&&qt(cn)&&cn>0},yt.shouldDisplayQuickJumper=function(){var $e=yt.props,cn=$e.showQuickJumper,sn=$e.total,En=yt.state.pageSize;return sn<=En?!1:cn},yt.handleKeyDown=function($e){($e.keyCode===Bt.ARROW_UP||$e.keyCode===Bt.ARROW_DOWN)&&$e.preventDefault()},yt.handleKeyUp=function($e){var cn=yt.getValidValue($e),sn=yt.state.currentInputValue;cn!==sn&&yt.setState({currentInputValue:cn}),$e.keyCode===Bt.ENTER?yt.handleChange(cn):$e.keyCode===Bt.ARROW_UP?yt.handleChange(cn-1):$e.keyCode===Bt.ARROW_DOWN&&yt.handleChange(cn+1)},yt.handleBlur=function($e){var cn=yt.getValidValue($e);yt.handleChange(cn)},yt.changePageSize=function($e){var cn=yt.state.current,sn=ne($e,yt.state,yt.props);cn=cn>sn?sn:cn,sn===0&&(cn=yt.state.current),typeof $e=="number"&&("pageSize"in yt.props||yt.setState({pageSize:$e}),"current"in yt.props||yt.setState({current:cn,currentInputValue:cn})),yt.props.onShowSizeChange(cn,$e),"onChange"in yt.props&&yt.props.onChange&&yt.props.onChange(cn,$e)},yt.handleChange=function($e){var cn=yt.props,sn=cn.disabled,En=cn.onChange,Gn=yt.state,zn=Gn.pageSize,Zn=Gn.current,$n=Gn.currentInputValue;if(yt.isValid($e)&&!sn){var ni=ne(void 0,yt.state,yt.props),ei=$e;return $e>ni?ei=ni:$e<1&&(ei=1),"current"in yt.props||yt.setState({current:ei}),ei!==$n&&yt.setState({currentInputValue:ei}),En(ei,zn),ei}return Zn},yt.prev=function(){yt.hasPrev()&&yt.handleChange(yt.state.current-1)},yt.next=function(){yt.hasNext()&&yt.handleChange(yt.state.current+1)},yt.jumpPrev=function(){yt.handleChange(yt.getJumpPrevPage())},yt.jumpNext=function(){yt.handleChange(yt.getJumpNextPage())},yt.hasPrev=function(){return yt.state.current>1},yt.hasNext=function(){return yt.state.current<ne(void 0,yt.state,yt.props)},yt.runIfEnter=function($e,cn){if($e.key==="Enter"||$e.charCode===13){for(var sn=arguments.length,En=new Array(sn>2?sn-2:0),Gn=2;Gn<sn;Gn++)En[Gn-2]=arguments[Gn];cn.apply(void 0,En)}},yt.runIfEnterPrev=function($e){yt.runIfEnter($e,yt.prev)},yt.runIfEnterNext=function($e){yt.runIfEnter($e,yt.next)},yt.runIfEnterJumpPrev=function($e){yt.runIfEnter($e,yt.jumpPrev)},yt.runIfEnterJumpNext=function($e){yt.runIfEnter($e,yt.jumpNext)},yt.handleGoTO=function($e){($e.keyCode===Bt.ENTER||$e.type==="click")&&yt.handleChange(yt.state.currentInputValue)},yt.renderPrev=function($e){var cn=yt.props,sn=cn.prevIcon,En=cn.itemRender,Gn=En($e,"prev",yt.getItemIcon(sn,"prev page")),zn=!yt.hasPrev();return(0,It.isValidElement)(Gn)?(0,It.cloneElement)(Gn,{disabled:zn}):Gn},yt.renderNext=function($e){var cn=yt.props,sn=cn.nextIcon,En=cn.itemRender,Gn=En($e,"next",yt.getItemIcon(sn,"next page")),zn=!yt.hasNext();return(0,It.isValidElement)(Gn)?(0,It.cloneElement)(Gn,{disabled:zn}):Gn};var kt=xt.onChange!==Me,zt="current"in xt;zt&&!kt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Mt=xt.defaultCurrent;"current"in xt&&(Mt=xt.current);var se=xt.defaultPageSize;return"pageSize"in xt&&(se=xt.pageSize),Mt=Math.min(Mt,ne(se,void 0,xt)),yt.state={current:Mt,currentInputValue:Mt,pageSize:se},yt}return(0,ht.Z)(Tt,[{key:"componentDidUpdate",value:function(yt,kt){var zt=this.props.prefixCls;if(kt.current!==this.state.current&&this.paginationNode.current){var Mt=this.paginationNode.current.querySelector(".".concat(zt,"-item-").concat(kt.current));if(Mt&&document.activeElement===Mt){var se;Mt==null||(se=Mt.blur)===null||se===void 0||se.call(Mt)}}}},{key:"getValidValue",value:function(yt){var kt=yt.target.value,zt=ne(void 0,this.state,this.props),Mt=this.state.currentInputValue,se;return kt===""?se=kt:Number.isNaN(Number(kt))?se=Mt:kt>=zt?se=zt:se=Number(kt),se}},{key:"getShowSizeChanger",value:function(){var yt=this.props,kt=yt.showSizeChanger,zt=yt.total,Mt=yt.totalBoundaryShowSizeChanger;return typeof kt!="undefined"?kt:zt>Mt}},{key:"render",value:function(){var yt=this.props,kt=yt.prefixCls,zt=yt.className,Mt=yt.style,se=yt.disabled,$e=yt.hideOnSinglePage,cn=yt.total,sn=yt.locale,En=yt.showQuickJumper,Gn=yt.showLessItems,zn=yt.showTitle,Zn=yt.showTotal,$n=yt.simple,ni=yt.itemRender,ei=yt.showPrevNextJumpers,Bi=yt.jumpPrevIcon,Ki=yt.jumpNextIcon,jn=yt.selectComponentClass,Tn=yt.selectPrefixCls,In=yt.pageSizeOptions,li=this.state,gi=li.current,Yi=li.pageSize,Ci=li.currentInputValue;if($e===!0&&cn<=Yi)return null;var bt=ne(void 0,this.state,this.props),_i=[],Fi=null,co=null,xo=null,Go=null,io=null,ii=En&&En.goButton,ke=Gn?1:2,Te=gi-1>0?gi-1:0,Le=gi+1<bt?gi+1:bt,re=(0,vt.Z)(this.props,{aria:!0,data:!0}),nn=Zn&&It.createElement("li",{className:"".concat(kt,"-total-text")},Zn(cn,[cn===0?0:(gi-1)*Yi+1,gi*Yi>cn?cn:gi*Yi]));if($n){ii&&(typeof ii=="boolean"?io=It.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},sn.jump_to_confirm):io=It.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ii),io=It.createElement("li",{title:zn?"".concat(sn.jump_to).concat(gi,"/").concat(bt):null,className:"".concat(kt,"-simple-pager")},io));var Qe=this.renderPrev(Te);return It.createElement("ul",(0,mt.Z)({className:ve()(kt,"".concat(kt,"-simple"),(0,At.Z)({},"".concat(kt,"-disabled"),se),zt),style:Mt,ref:this.paginationNode},re),nn,Qe?It.createElement("li",{title:zn?sn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:ve()("".concat(kt,"-prev"),(0,At.Z)({},"".concat(kt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Qe):null,It.createElement("li",{title:zn?"".concat(gi,"/").concat(bt):null,className:"".concat(kt,"-simple-pager")},It.createElement("input",{type:"text",value:Ci,disabled:se,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),It.createElement("span",{className:"".concat(kt,"-slash")},"/"),bt),It.createElement("li",{title:zn?sn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:ve()("".concat(kt,"-next"),(0,At.Z)({},"".concat(kt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Le)),io)}if(bt<=3+ke*2){var pe={locale:sn,rootPrefixCls:kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:zn,itemRender:ni};bt||_i.push(It.createElement(Xt,(0,mt.Z)({},pe,{key:"noPager",page:1,className:"".concat(kt,"-item-disabled")})));for(var Yt=1;Yt<=bt;Yt+=1){var Ve=gi===Yt;_i.push(It.createElement(Xt,(0,mt.Z)({},pe,{key:Yt,page:Yt,active:Ve})))}}else{var en=Gn?sn.prev_3:sn.prev_5,Bn=Gn?sn.next_3:sn.next_5,qe=ni(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Bi,"prev page")),xe=ni(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ki,"next page"));ei&&(Fi=qe?It.createElement("li",{title:zn?en:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:ve()("".concat(kt,"-jump-prev"),(0,At.Z)({},"".concat(kt,"-jump-prev-custom-icon"),!!Bi))},qe):null,co=xe?It.createElement("li",{title:zn?Bn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:ve()("".concat(kt,"-jump-next"),(0,At.Z)({},"".concat(kt,"-jump-next-custom-icon"),!!Ki))},xe):null),Go=It.createElement(Xt,{locale:sn,last:!0,rootPrefixCls:kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:bt,page:bt,active:!1,showTitle:zn,itemRender:ni}),xo=It.createElement(Xt,{locale:sn,rootPrefixCls:kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:zn,itemRender:ni});var an=Math.max(1,gi-ke),Mn=Math.min(gi+ke,bt);gi-1<=ke&&(Mn=1+ke*2),bt-gi<=ke&&(an=bt-ke*2);for(var Vn=an;Vn<=Mn;Vn+=1){var _e=gi===Vn;_i.push(It.createElement(Xt,{locale:sn,rootPrefixCls:kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Vn,page:Vn,active:_e,showTitle:zn,itemRender:ni}))}gi-1>=ke*2&&gi!==3&&(_i[0]=(0,It.cloneElement)(_i[0],{className:"".concat(kt,"-item-after-jump-prev")}),_i.unshift(Fi)),bt-gi>=ke*2&&gi!==bt-2&&(_i[_i.length-1]=(0,It.cloneElement)(_i[_i.length-1],{className:"".concat(kt,"-item-before-jump-next")}),_i.push(co)),an!==1&&_i.unshift(xo),Mn!==bt&&_i.push(Go)}var Je=!this.hasPrev()||!bt,hi=!this.hasNext()||!bt,qn=this.renderPrev(Te),vi=this.renderNext(Le);return It.createElement("ul",(0,mt.Z)({className:ve()(kt,zt,(0,At.Z)({},"".concat(kt,"-disabled"),se)),style:Mt,ref:this.paginationNode},re),nn,qn?It.createElement("li",{title:zn?sn.prev_page:null,onClick:this.prev,tabIndex:Je?null:0,onKeyPress:this.runIfEnterPrev,className:ve()("".concat(kt,"-prev"),(0,At.Z)({},"".concat(kt,"-disabled"),Je)),"aria-disabled":Je},qn):null,_i,vi?It.createElement("li",{title:zn?sn.next_page:null,onClick:this.next,tabIndex:hi?null:0,onKeyPress:this.runIfEnterNext,className:ve()("".concat(kt,"-next"),(0,At.Z)({},"".concat(kt,"-disabled"),hi)),"aria-disabled":hi},vi):null,It.createElement(_t,{disabled:se,locale:sn,rootPrefixCls:kt,selectComponentClass:jn,selectPrefixCls:Tn,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:gi,pageSize:Yi,pageSizeOptions:In,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ii}))}}],[{key:"getDerivedStateFromProps",value:function(yt,kt){var zt={};if("current"in yt&&(zt.current=yt.current,yt.current!==kt.current&&(zt.currentInputValue=zt.current)),"pageSize"in yt&&yt.pageSize!==kt.pageSize){var Mt=kt.current,se=ne(yt.pageSize,kt,yt);Mt=Mt>se?se:Mt,"current"in yt||(zt.current=Mt,zt.currentInputValue=Mt),zt.pageSize=yt.pageSize}return zt}}]),Tt}(It.Component);Ce.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Me,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Me,locale:Ft.Z,style:{},itemRender:Ne,totalBoundaryShowSizeChanger:50};var Ue=Ce,Ze=Pt(22075),tn=Pt(36355),ln=Pt(19716),ie=Pt(8628),Gt=Pt(9763),Ae=Pt(57809);const Sn=Qt=>It.createElement(Ae.default,Object.assign({},Qt,{showSearch:!0,size:"small"})),gn=Qt=>It.createElement(Ae.default,Object.assign({},Qt,{showSearch:!0,size:"middle"}));Sn.Option=Ae.default.Option,gn.Option=Ae.default.Option;var Fe=Pt(9937),Ke=Pt(17313),rn=Pt(83116),Fn=Pt(37613);const Pn=Qt=>{const{componentCls:ce}=Qt;return{[`${ce}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${ce}-item-link`]:{color:Qt.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${ce}-item-link`]:{color:Qt.colorTextDisabled,cursor:"not-allowed"}}},[`&${ce}-disabled`]:{cursor:"not-allowed",[`${ce}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Qt.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Qt.colorBorder,backgroundColor:Qt.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Qt.itemActiveBgDisabled},a:{color:Qt.itemActiveColorDisabled}}},[`${ce}-item-link`]:{color:Qt.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${ce}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${ce}-simple-pager`]:{color:Qt.colorTextDisabled},[`${ce}-jump-prev, ${ce}-jump-next`]:{[`${ce}-item-link-icon`]:{opacity:0},[`${ce}-item-ellipsis`]:{opacity:1}}},[`&${ce}-simple`]:{[`${ce}-prev, ${ce}-next`]:{[`&${ce}-disabled ${ce}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},We=Qt=>{const{componentCls:ce}=Qt;return{[`&${ce}-mini ${ce}-total-text, &${ce}-mini ${ce}-simple-pager`]:{height:Qt.itemSizeSM,lineHeight:`${Qt.itemSizeSM}px`},[`&${ce}-mini ${ce}-item`]:{minWidth:Qt.itemSizeSM,height:Qt.itemSizeSM,margin:0,lineHeight:`${Qt.itemSizeSM-2}px`},[`&${ce}-mini:not(${ce}-disabled) ${ce}-item:not(${ce}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Qt.colorBgTextHover},"&:active":{backgroundColor:Qt.colorBgTextActive}},[`&${ce}-mini ${ce}-prev, &${ce}-mini ${ce}-next`]:{minWidth:Qt.itemSizeSM,height:Qt.itemSizeSM,margin:0,lineHeight:`${Qt.itemSizeSM}px`},[`&${ce}-mini:not(${ce}-disabled)`]:{[`${ce}-prev, ${ce}-next`]:{[`&:hover ${ce}-item-link`]:{backgroundColor:Qt.colorBgTextHover},[`&:active ${ce}-item-link`]:{backgroundColor:Qt.colorBgTextActive},[`&${ce}-disabled:hover ${ce}-item-link`]:{backgroundColor:"transparent"}}},[`
&${ce}-mini ${ce}-prev ${ce}-item-link,
&${ce}-mini ${ce}-next ${ce}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Qt.itemSizeSM,lineHeight:`${Qt.itemSizeSM}px`}},[`&${ce}-mini ${ce}-jump-prev, &${ce}-mini ${ce}-jump-next`]:{height:Qt.itemSizeSM,marginInlineEnd:0,lineHeight:`${Qt.itemSizeSM}px`},[`&${ce}-mini ${ce}-options`]:{marginInlineStart:Qt.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Qt.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Qt.itemSizeSM,lineHeight:`${Qt.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Fe.x0)(Qt)),{width:Qt.paginationMiniQuickJumperInputWidth,height:Qt.controlHeightSM})}}}},fe=Qt=>{const{componentCls:ce}=Qt;return{[`
&${ce}-simple ${ce}-prev,
&${ce}-simple ${ce}-next
`]:{height:Qt.itemSizeSM,lineHeight:`${Qt.itemSizeSM}px`,verticalAlign:"top",[`${ce}-item-link`]:{height:Qt.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Qt.colorBgTextHover},"&:active":{backgroundColor:Qt.colorBgTextActive},"&::after":{height:Qt.itemSizeSM,lineHeight:`${Qt.itemSizeSM}px`}}},[`&${ce}-simple ${ce}-simple-pager`]:{display:"inline-block",height:Qt.itemSizeSM,marginInlineEnd:Qt.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Qt.marginXS,padding:`0 ${Qt.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Qt.itemInputBg,border:`${Qt.lineWidth}px ${Qt.lineType} ${Qt.colorBorder}`,borderRadius:Qt.borderRadius,outline:"none",transition:`border-color ${Qt.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Qt.colorPrimary},"&:focus":{borderColor:Qt.colorPrimaryHover,boxShadow:`${Qt.inputOutlineOffset}px 0 ${Qt.controlOutlineWidth}px ${Qt.controlOutline}`},"&[disabled]":{color:Qt.colorTextDisabled,backgroundColor:Qt.colorBgContainerDisabled,borderColor:Qt.colorBorder,cursor:"not-allowed"}}}}},An=Qt=>{const{componentCls:ce}=Qt;return{[`${ce}-jump-prev, ${ce}-jump-next`]:{outline:0,[`${ce}-item-container`]:{position:"relative",[`${ce}-item-link-icon`]:{color:Qt.colorPrimary,fontSize:Qt.fontSizeSM,opacity:0,transition:`all ${Qt.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${ce}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Qt.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Qt.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Qt.paginationEllipsisTextIndent,opacity:1,transition:`all ${Qt.motionDurationMid}`}},"&:hover":{[`${ce}-item-link-icon`]:{opacity:1},[`${ce}-item-ellipsis`]:{opacity:0}}},[`
${ce}-prev,
${ce}-jump-prev,
${ce}-jump-next
`]:{marginInlineEnd:Qt.marginXS},[`
${ce}-prev,
${ce}-next,
${ce}-jump-prev,
${ce}-jump-next
`]:{display:"inline-block",minWidth:Qt.itemSize,height:Qt.itemSize,color:Qt.colorText,fontFamily:Qt.fontFamily,lineHeight:`${Qt.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Qt.borderRadius,cursor:"pointer",transition:`all ${Qt.motionDurationMid}`},[`${ce}-prev, ${ce}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Qt.colorText,cursor:"pointer",userSelect:"none"},[`${ce}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Qt.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Qt.lineWidth}px ${Qt.lineType} transparent`,borderRadius:Qt.borderRadius,outline:"none",transition:`all ${Qt.motionDurationMid}`},[`&:hover ${ce}-item-link`]:{backgroundColor:Qt.colorBgTextHover},[`&:active ${ce}-item-link`]:{backgroundColor:Qt.colorBgTextActive},[`&${ce}-disabled:hover`]:{[`${ce}-item-link`]:{backgroundColor:"transparent"}}},[`${ce}-slash`]:{marginInlineEnd:Qt.paginationSlashMarginInlineEnd,marginInlineStart:Qt.paginationSlashMarginInlineStart},[`${ce}-options`]:{display:"inline-block",marginInlineStart:Qt.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Qt.controlHeight,marginInlineStart:Qt.marginXS,lineHeight:`${Qt.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Fe.ik)(Qt)),{width:Qt.controlHeightLG*1.25,height:Qt.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Qt.marginXS,marginInlineEnd:Qt.marginXS})}}}},Hn=Qt=>{const{componentCls:ce}=Qt;return{[`${ce}-item`]:{display:"inline-block",minWidth:Qt.itemSize,height:Qt.itemSize,marginInlineEnd:Qt.marginXS,fontFamily:Qt.fontFamily,lineHeight:`${Qt.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Qt.lineWidth}px ${Qt.lineType} transparent`,borderRadius:Qt.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Qt.paginationItemPaddingInline}px`,color:Qt.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${ce}-item-active)`]:{"&:hover":{transition:`all ${Qt.motionDurationMid}`,backgroundColor:Qt.colorBgTextHover},"&:active":{backgroundColor:Qt.colorBgTextActive}},"&-active":{fontWeight:Qt.fontWeightStrong,backgroundColor:Qt.itemActiveBg,borderColor:Qt.colorPrimary,a:{color:Qt.colorPrimary},"&:hover":{borderColor:Qt.colorPrimaryHover},"&:hover a":{color:Qt.colorPrimaryHover}}}}},un=Qt=>{const{componentCls:ce}=Qt;return{[ce]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ke.Wf)(Qt)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${ce}-total-text`]:{display:"inline-block",height:Qt.itemSize,marginInlineEnd:Qt.marginXS,lineHeight:`${Qt.itemSize-2}px`,verticalAlign:"middle"}}),Hn(Qt)),An(Qt)),fe(Qt)),We(Qt)),Pn(Qt)),{[`@media only screen and (max-width: ${Qt.screenLG}px)`]:{[`${ce}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Qt.screenSM}px)`]:{[`${ce}-options`]:{display:"none"}}}),[`&${Qt.componentCls}-rtl`]:{direction:"rtl"}}},De=Qt=>{const{componentCls:ce}=Qt;return{[`${ce}${ce}-disabled:not(${ce}-mini)`]:{"&, &:hover":{[`${ce}-item-link`]:{borderColor:Qt.colorBorder}},"&:focus-visible":{[`${ce}-item-link`]:{borderColor:Qt.colorBorder}},[`${ce}-item, ${ce}-item-link`]:{backgroundColor:Qt.colorBgContainerDisabled,borderColor:Qt.colorBorder,[`&:hover:not(${ce}-item-active)`]:{backgroundColor:Qt.colorBgContainerDisabled,borderColor:Qt.colorBorder,a:{color:Qt.colorTextDisabled}},[`&${ce}-item-active`]:{backgroundColor:Qt.itemActiveBgDisabled}},[`${ce}-prev, ${ce}-next`]:{"&:hover button":{backgroundColor:Qt.colorBgContainerDisabled,borderColor:Qt.colorBorder,color:Qt.colorTextDisabled},[`${ce}-item-link`]:{backgroundColor:Qt.colorBgContainerDisabled,borderColor:Qt.colorBorder}}},[`${ce}:not(${ce}-mini)`]:{[`${ce}-prev, ${ce}-next`]:{"&:hover button":{borderColor:Qt.colorPrimaryHover,backgroundColor:Qt.itemBg},[`${ce}-item-link`]:{backgroundColor:Qt.itemLinkBg,borderColor:Qt.colorBorder},[`&:hover ${ce}-item-link`]:{borderColor:Qt.colorPrimary,backgroundColor:Qt.itemBg,color:Qt.colorPrimary},[`&${ce}-disabled`]:{[`${ce}-item-link`]:{borderColor:Qt.colorBorder,color:Qt.colorTextDisabled}}},[`${ce}-item`]:{backgroundColor:Qt.itemBg,border:`${Qt.lineWidth}px ${Qt.lineType} ${Qt.colorBorder}`,[`&:hover:not(${ce}-item-active)`]:{borderColor:Qt.colorPrimary,backgroundColor:Qt.itemBg,a:{color:Qt.colorPrimary}},"&-active":{borderColor:Qt.colorPrimary}}}}},He=Qt=>{const{componentCls:ce}=Qt;return{[`${ce}:not(${ce}-disabled)`]:{[`${ce}-item`]:Object.assign({},(0,Ke.Qy)(Qt)),[`${ce}-jump-prev, ${ce}-jump-next`]:{"&:focus-visible":Object.assign({[`${ce}-item-link-icon`]:{opacity:1},[`${ce}-item-ellipsis`]:{opacity:0}},(0,Ke.oN)(Qt))},[`${ce}-prev, ${ce}-next`]:{[`&:focus-visible ${ce}-item-link`]:Object.assign({},(0,Ke.oN)(Qt))}}}};var Ee=(0,rn.Z)("Pagination",Qt=>{const ce=(0,Fn.TS)(Qt,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Qt.marginXXS/2,paginationMiniQuickJumperInputWidth:Qt.controlHeightLG*1.1,paginationItemPaddingInline:Qt.marginXXS*1.5,paginationEllipsisLetterSpacing:Qt.marginXXS/2,paginationSlashMarginInlineStart:Qt.marginXXS,paginationSlashMarginInlineEnd:Qt.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Fe.e5)(Qt),(0,Fe.TM)(Qt));return[un(ce),He(ce),Qt.wireframe&&De(ce)]},Qt=>({itemBg:Qt.colorBgContainer,itemSize:Qt.controlHeight,itemSizeSM:Qt.controlHeightSM,itemActiveBg:Qt.colorBgContainer,itemLinkBg:Qt.colorBgContainer,itemActiveColorDisabled:Qt.colorTextDisabled,itemActiveBgDisabled:Qt.controlItemBgActiveDisabled,itemInputBg:Qt.colorBgContainer,miniOptionsSizeChangerTop:0})),Jt=function(Qt,ce){var Tt={};for(var xt in Qt)Object.prototype.hasOwnProperty.call(Qt,xt)&&ce.indexOf(xt)<0&&(Tt[xt]=Qt[xt]);if(Qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,xt=Object.getOwnPropertySymbols(Qt);yt<xt.length;yt++)ce.indexOf(xt[yt])<0&&Object.prototype.propertyIsEnumerable.call(Qt,xt[yt])&&(Tt[xt[yt]]=Qt[xt[yt]]);return Tt},Re=Qt=>{const{prefixCls:ce,selectPrefixCls:Tt,className:xt,rootClassName:yt,style:kt,size:zt,locale:Mt,selectComponentClass:se,responsive:$e,showSizeChanger:cn}=Qt,sn=Jt(Qt,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:En}=(0,ie.Z)($e),{getPrefixCls:Gn,direction:zn,pagination:Zn={}}=It.useContext(tn.E_),$n=Gn("pagination",ce),[ni,ei]=Ee($n),Bi=cn!=null?cn:Zn.showSizeChanger,Ki=It.useMemo(()=>{const bt=It.createElement("span",{className:`${$n}-item-ellipsis`},"\u2022\u2022\u2022"),_i=It.createElement("button",{className:`${$n}-item-link`,type:"button",tabIndex:-1},zn==="rtl"?It.createElement(ue.Z,null):It.createElement(Kt.Z,null)),Fi=It.createElement("button",{className:`${$n}-item-link`,type:"button",tabIndex:-1},zn==="rtl"?It.createElement(Kt.Z,null):It.createElement(ue.Z,null)),co=It.createElement("a",{className:`${$n}-item-link`},It.createElement("div",{className:`${$n}-item-container`},zn==="rtl"?It.createElement(ge.Z,{className:`${$n}-item-link-icon`}):It.createElement(be,{className:`${$n}-item-link-icon`}),bt)),xo=It.createElement("a",{className:`${$n}-item-link`},It.createElement("div",{className:`${$n}-item-container`},zn==="rtl"?It.createElement(be,{className:`${$n}-item-link-icon`}):It.createElement(ge.Z,{className:`${$n}-item-link-icon`}),bt));return{prevIcon:_i,nextIcon:Fi,jumpPrevIcon:co,jumpNextIcon:xo}},[zn,$n]),[jn]=(0,Gt.Z)("Pagination",Ze.Z),Tn=Object.assign(Object.assign({},jn),Mt),In=(0,ln.Z)(zt),li=In==="small"||!!(En&&!In&&$e),gi=Gn("select",Tt),Yi=ve()({[`${$n}-mini`]:li,[`${$n}-rtl`]:zn==="rtl"},Zn==null?void 0:Zn.className,xt,yt,ei),Ci=Object.assign(Object.assign({},Zn==null?void 0:Zn.style),kt);return ni(It.createElement(Ue,Object.assign({},Ki,sn,{style:Ci,prefixCls:$n,selectPrefixCls:gi,className:Yi,selectComponentClass:se||(li?Sn:gn),locale:Tn,showSizeChanger:Bi})))},Be=Re},39722:function(xn,vn,Pt){"use strict";Pt.d(vn,{t5:function(){return Kt}});var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(55477),we=Pt(59301),Ht=Pt(36355),he=Pt(77578),Rt=Pt(17356),be=function(de,ve){var At={};for(var nt in de)Object.prototype.hasOwnProperty.call(de,nt)&&ve.indexOf(nt)<0&&(At[nt]=de[nt]);if(de!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,nt=Object.getOwnPropertySymbols(de);et<nt.length;et++)ve.indexOf(nt[et])<0&&Object.prototype.propertyIsEnumerable.call(de,nt[et])&&(At[nt[et]]=de[nt[et]]);return At};const ge=(de,ve,At)=>{if(!(!ve&&!At))return we.createElement(we.Fragment,null,ve&&we.createElement("div",{className:`${de}-title`},(0,he.Z)(ve)),we.createElement("div",{className:`${de}-inner-content`},(0,he.Z)(At)))},Kt=de=>{const{hashId:ve,prefixCls:At,className:nt,style:et,placement:ht="top",title:at,content:ft,children:vt}=de;return we.createElement("div",{className:It()(ve,At,`${At}-pure`,`${At}-placement-${ht}`,nt),style:et},we.createElement("div",{className:`${At}-arrow`}),we.createElement(Zt.G,Object.assign({},de,{className:ve,prefixCls:At}),vt||ge(At,at,ft)))},ue=de=>{const{prefixCls:ve}=de,At=be(de,["prefixCls"]),{getPrefixCls:nt}=we.useContext(Ht.E_),et=nt("popover",ve),[ht,at]=(0,Rt.Z)(et);return ht(we.createElement(Kt,Object.assign({},At,{prefixCls:et,hashId:at})))};vn.ZP=ue},60324:function(xn,vn,Pt){"use strict";var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(59301),we=Pt(77578),Ht=Pt(62892),he=Pt(36355),Rt=Pt(6848),be=Pt(39722),ge=Pt(17356),Kt=function(ve,At){var nt={};for(var et in ve)Object.prototype.hasOwnProperty.call(ve,et)&&At.indexOf(et)<0&&(nt[et]=ve[et]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,et=Object.getOwnPropertySymbols(ve);ht<et.length;ht++)At.indexOf(et[ht])<0&&Object.prototype.propertyIsEnumerable.call(ve,et[ht])&&(nt[et[ht]]=ve[et[ht]]);return nt};const ue=ve=>{let{title:At,content:nt,prefixCls:et}=ve;return Zt.createElement(Zt.Fragment,null,At&&Zt.createElement("div",{className:`${et}-title`},(0,we.Z)(At)),Zt.createElement("div",{className:`${et}-inner-content`},(0,we.Z)(nt)))},de=Zt.forwardRef((ve,At)=>{const{prefixCls:nt,title:et,content:ht,overlayClassName:at,placement:ft="top",trigger:vt="hover",mouseEnterDelay:Ct=.1,mouseLeaveDelay:Bt=.1,overlayStyle:Ft={}}=ve,Ot=Kt(ve,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:_t}=Zt.useContext(he.E_),te=_t("popover",nt),[Xt,Me]=(0,ge.Z)(te),qt=_t(),Ne=It()(at,Me);return Xt(Zt.createElement(Rt.Z,Object.assign({placement:ft,trigger:vt,mouseEnterDelay:Ct,mouseLeaveDelay:Bt,overlayStyle:Ft},Ot,{prefixCls:te,overlayClassName:Ne,ref:At,overlay:et||ht?Zt.createElement(ue,{prefixCls:te,title:et,content:ht}):null,transitionName:(0,Ht.m)(qt,"zoom-big",Ot.transitionName),"data-popover-inject":!0})))});de._InternalPanelDoNotUseOrYouWillBeFired=be.ZP,vn.Z=de},17356:function(xn,vn,Pt){"use strict";var mt=Pt(17313),It=Pt(29878),Zt=Pt(19447),we=Pt(33166),Ht=Pt(83116),he=Pt(37613);const Rt=Kt=>{const{componentCls:ue,popoverColor:de,minWidth:ve,fontWeightStrong:At,popoverPadding:nt,boxShadowSecondary:et,colorTextHeading:ht,borderRadiusLG:at,zIndexPopup:ft,marginXS:vt,colorBgElevated:Ct,popoverBg:Bt}=Kt;return[{[ue]:Object.assign(Object.assign({},(0,mt.Wf)(Kt)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:ft,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":Ct,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${ue}-content`]:{position:"relative"},[`${ue}-inner`]:{backgroundColor:Bt,backgroundClip:"padding-box",borderRadius:at,boxShadow:et,padding:nt},[`${ue}-title`]:{minWidth:ve,marginBottom:vt,color:ht,fontWeight:At},[`${ue}-inner-content`]:{color:de}})},(0,Zt.ZP)(Kt,{colorBg:"var(--antd-arrow-background-color)"}),{[`${ue}-pure`]:{position:"relative",maxWidth:"none",margin:Kt.sizePopupArrow,display:"inline-block",[`${ue}-content`]:{display:"inline-block"}}}]},be=Kt=>{const{componentCls:ue}=Kt;return{[ue]:we.i.map(de=>{const ve=Kt[`${de}6`];return{[`&${ue}-${de}`]:{"--antd-arrow-background-color":ve,[`${ue}-inner`]:{backgroundColor:ve},[`${ue}-arrow`]:{background:"transparent"}}}})}},ge=Kt=>{const{componentCls:ue,lineWidth:de,lineType:ve,colorSplit:At,paddingSM:nt,controlHeight:et,fontSize:ht,lineHeight:at,padding:ft}=Kt,vt=et-Math.round(ht*at),Ct=vt/2,Bt=vt/2-de,Ft=ft;return{[ue]:{[`${ue}-inner`]:{padding:0},[`${ue}-title`]:{margin:0,padding:`${Ct}px ${Ft}px ${Bt}px`,borderBottom:`${de}px ${ve} ${At}`},[`${ue}-inner-content`]:{padding:`${nt}px ${Ft}px`}}}};vn.Z=(0,Ht.Z)("Popover",Kt=>{const{colorBgElevated:ue,colorText:de,wireframe:ve}=Kt,At=(0,he.TS)(Kt,{popoverPadding:12,popoverBg:ue,popoverColor:de});return[Rt(At),be(At),ve&&ge(At),(0,It._y)(At,"zoom-big")]},Kt=>({width:177,minWidth:177,zIndexPopup:Kt.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},39978:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return Gt}});var mt=Pt(5891),It=Pt(59301),Zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},we=Zt,Ht=Pt(88853),he=function(Sn,gn){return It.createElement(Ht.Z,(0,mt.Z)({},Sn,{ref:gn,icon:we}))},Rt=It.forwardRef(he),be=Rt,ge=Pt(92310),Kt=Pt.n(ge),ue=Pt(80962),de=Pt(29043),ve=Pt(19149),At=Pt(35788),nt=Pt(85108),et=Pt(36994);function ht(Ae,Sn){var gn=Ae.disabled,Fe=Ae.prefixCls,Ke=Ae.character,rn=Ae.characterRender,Fn=Ae.index,Pn=Ae.count,We=Ae.value,fe=Ae.allowHalf,An=Ae.focused,Hn=Ae.onHover,un=Ae.onClick,De=function(ce){Hn(ce,Fn)},He=function(ce){un(ce,Fn)},Ee=function(ce){ce.keyCode===nt.Z.ENTER&&un(ce,Fn)},Jt=Fn+1,ye=new Set([Fe]);We===0&&Fn===0&&An?ye.add("".concat(Fe,"-focused")):fe&&We+.5>=Jt&&We<Jt?(ye.add("".concat(Fe,"-half")),ye.add("".concat(Fe,"-active")),An&&ye.add("".concat(Fe,"-focused"))):(Jt<=We?ye.add("".concat(Fe,"-full")):ye.add("".concat(Fe,"-zero")),Jt===We&&An&&ye.add("".concat(Fe,"-focused")));var Re=typeof Ke=="function"?Ke(Ae):Ke,Be=It.createElement("li",{className:Kt()(Array.from(ye)),ref:Sn},It.createElement("div",{onClick:gn?null:He,onKeyDown:gn?null:Ee,onMouseMove:gn?null:De,role:"radio","aria-checked":We>Fn?"true":"false","aria-posinset":Fn+1,"aria-setsize":Pn,tabIndex:gn?-1:0},It.createElement("div",{className:"".concat(Fe,"-first")},Re),It.createElement("div",{className:"".concat(Fe,"-second")},Re)));return rn&&(Be=rn(Be,Ae)),Be}var at=It.forwardRef(ht);function ft(){var Ae=It.useRef({});function Sn(Fe){return Ae.current[Fe]}function gn(Fe){return function(Ke){Ae.current[Fe]=Ke}}return[Sn,gn]}function vt(Ae){var Sn=Ae.pageXOffset,gn="scrollLeft";if(typeof Sn!="number"){var Fe=Ae.document;Sn=Fe.documentElement[gn],typeof Sn!="number"&&(Sn=Fe.body[gn])}return Sn}function Ct(Ae){var Sn,gn,Fe=Ae.ownerDocument,Ke=Fe.body,rn=Fe&&Fe.documentElement,Fn=Ae.getBoundingClientRect();return Sn=Fn.left,gn=Fn.top,Sn-=rn.clientLeft||Ke.clientLeft||0,gn-=rn.clientTop||Ke.clientTop||0,{left:Sn,top:gn}}function Bt(Ae){var Sn=Ct(Ae),gn=Ae.ownerDocument,Fe=gn.defaultView||gn.parentWindow;return Sn.left+=vt(Fe),Sn.left}var Ft=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Ot(Ae,Sn){var gn,Fe=Ae.prefixCls,Ke=Fe===void 0?"rc-rate":Fe,rn=Ae.className,Fn=Ae.defaultValue,Pn=Ae.value,We=Ae.count,fe=We===void 0?5:We,An=Ae.allowHalf,Hn=An===void 0?!1:An,un=Ae.allowClear,De=un===void 0?!0:un,He=Ae.character,Ee=He===void 0?"\u2605":He,Jt=Ae.characterRender,ye=Ae.disabled,Re=Ae.direction,Be=Re===void 0?"ltr":Re,Qt=Ae.tabIndex,ce=Qt===void 0?0:Qt,Tt=Ae.autoFocus,xt=Ae.onHoverChange,yt=Ae.onChange,kt=Ae.onFocus,zt=Ae.onBlur,Mt=Ae.onKeyDown,se=Ae.onMouseLeave,$e=(0,ve.Z)(Ae,Ft),cn=ft(),sn=(0,de.Z)(cn,2),En=sn[0],Gn=sn[1],zn=It.useRef(null),Zn=function(){if(!ye){var Yt;(Yt=zn.current)===null||Yt===void 0||Yt.focus()}};It.useImperativeHandle(Sn,function(){return{focus:Zn,blur:function(){if(!ye){var Yt;(Yt=zn.current)===null||Yt===void 0||Yt.blur()}}}});var $n=(0,At.Z)(Fn||0,{value:Pn}),ni=(0,de.Z)($n,2),ei=ni[0],Bi=ni[1],Ki=(0,At.Z)(null),jn=(0,de.Z)(Ki,2),Tn=jn[0],In=jn[1],li=function(Yt,Ve){var en=Be==="rtl",Bn=Yt+1;if(Hn){var qe=En(Yt),xe=Bt(qe),an=qe.clientWidth;(en&&Ve-xe>an/2||!en&&Ve-xe<an/2)&&(Bn-=.5)}return Bn},gi=function(Yt){Bi(Yt),yt==null||yt(Yt)},Yi=It.useState(!1),Ci=(0,de.Z)(Yi,2),bt=Ci[0],_i=Ci[1],Fi=function(){_i(!0),kt==null||kt()},co=function(){_i(!1),zt==null||zt()},xo=It.useState(null),Go=(0,de.Z)(xo,2),io=Go[0],ii=Go[1],ke=function(Yt,Ve){var en=li(Ve,Yt.pageX);en!==Tn&&(ii(en),In(null)),xt==null||xt(en)},Te=function(Yt){ye||(ii(null),In(null),xt==null||xt(void 0)),Yt&&(se==null||se(Yt))},Le=function(Yt,Ve){var en=li(Ve,Yt.pageX),Bn=!1;De&&(Bn=en===ei),Te(),gi(Bn?0:en),In(Bn?en:null)},re=function(Yt){var Ve=Yt.keyCode,en=Be==="rtl",Bn=ei;Ve===nt.Z.RIGHT&&Bn<fe&&!en?(Hn?Bn+=.5:Bn+=1,gi(Bn),Yt.preventDefault()):Ve===nt.Z.LEFT&&Bn>0&&!en||Ve===nt.Z.RIGHT&&Bn>0&&en?(Hn?Bn-=.5:Bn-=1,gi(Bn),Yt.preventDefault()):Ve===nt.Z.LEFT&&Bn<fe&&en&&(Hn?Bn+=.5:Bn+=1,gi(Bn),Yt.preventDefault()),Mt==null||Mt(Yt)};It.useEffect(function(){Tt&&!ye&&Zn()},[]);var nn=new Array(fe).fill(0).map(function(pe,Yt){return It.createElement(at,{ref:Gn(Yt),index:Yt,count:fe,disabled:ye,prefixCls:"".concat(Ke,"-star"),allowHalf:Hn,value:io===null?ei:io,onClick:Le,onHover:ke,key:pe||Yt,character:Ee,characterRender:Jt,focused:bt})}),Qe=Kt()(Ke,rn,(gn={},(0,ue.Z)(gn,"".concat(Ke,"-disabled"),ye),(0,ue.Z)(gn,"".concat(Ke,"-rtl"),Be==="rtl"),gn));return It.createElement("ul",(0,mt.Z)({className:Qe,onMouseLeave:Te,tabIndex:ye?-1:ce,onFocus:ye?null:Fi,onBlur:ye?null:co,onKeyDown:ye?null:re,ref:zn,role:"radiogroup"},(0,et.Z)($e,{aria:!0,data:!0,attr:!0})),nn)}var _t=It.forwardRef(Ot),te=_t,Xt=Pt(36355),Me=Pt(6848),qt=Pt(17313),Ne=Pt(83116),ne=Pt(37613);const Ce=Ae=>{const{componentCls:Sn}=Ae;return{[`${Sn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:Ae.marginXS},"> div":{transition:`all ${Ae.motionDurationMid}, outline 0s`,"&:hover":{transform:Ae.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${Ae.lineWidth}px dashed ${Ae.starColor}`,transform:Ae.starHoverScale}},"&-first, &-second":{color:Ae.starBg,transition:`all ${Ae.motionDurationMid}`,userSelect:"none",[Ae.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Sn}-star-first, &-half ${Sn}-star-second`]:{opacity:1},[`&-half ${Sn}-star-first, &-full ${Sn}-star-second`]:{color:"inherit"}}}},Ue=Ae=>({[`&-rtl${Ae.componentCls}`]:{direction:"rtl"}}),Ze=Ae=>{const{componentCls:Sn}=Ae;return{[Sn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,qt.Wf)(Ae)),{display:"inline-block",margin:0,padding:0,color:Ae.starColor,fontSize:Ae.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${Sn} ${Sn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Ce(Ae)),{[`+ ${Sn}-text`]:{display:"inline-block",marginInlineStart:Ae.marginXS,fontSize:Ae.fontSize}}),Ue(Ae))}};var tn=(0,Ne.Z)("Rate",Ae=>{const Sn=(0,ne.TS)(Ae,{});return[Ze(Sn)]},Ae=>({starColor:Ae.yellow6,starSize:Ae.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Ae.colorFillContent})),ln=function(Ae,Sn){var gn={};for(var Fe in Ae)Object.prototype.hasOwnProperty.call(Ae,Fe)&&Sn.indexOf(Fe)<0&&(gn[Fe]=Ae[Fe]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,Fe=Object.getOwnPropertySymbols(Ae);Ke<Fe.length;Ke++)Sn.indexOf(Fe[Ke])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Fe[Ke])&&(gn[Fe[Ke]]=Ae[Fe[Ke]]);return gn},Gt=It.forwardRef((Ae,Sn)=>{const{prefixCls:gn,className:Fe,rootClassName:Ke,style:rn,tooltips:Fn,character:Pn=It.createElement(be,null)}=Ae,We=ln(Ae,["prefixCls","className","rootClassName","style","tooltips","character"]),fe=(ye,Re)=>{let{index:Be}=Re;return Fn?It.createElement(Me.Z,{title:Fn[Be]},ye):ye},{getPrefixCls:An,direction:Hn,rate:un}=It.useContext(Xt.E_),De=An("rate",gn),[He,Ee]=tn(De),Jt=Object.assign(Object.assign({},un==null?void 0:un.style),rn);return He(It.createElement(te,Object.assign({ref:Sn,character:Pn,characterRender:fe},We,{className:Kt()(Fe,Ke,Ee,un==null?void 0:un.className),style:Jt,prefixCls:De,direction:Hn})))})},57809:function(xn,vn,Pt){"use strict";var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(77861),we=Pt(64002),Ht=Pt(59301),he=Pt(53487),Rt=Pt(62892),be=Pt(19080),ge=Pt(36355),Kt=Pt(1684),ue=Pt(93891),de=Pt(19716),ve=Pt(32441),At=Pt(33234),nt=Pt(14154),et=Pt(58582),ht=Pt(84443),at=Pt(66339),ft=function(Ot,_t){var te={};for(var Xt in Ot)Object.prototype.hasOwnProperty.call(Ot,Xt)&&_t.indexOf(Xt)<0&&(te[Xt]=Ot[Xt]);if(Ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,Xt=Object.getOwnPropertySymbols(Ot);Me<Xt.length;Me++)_t.indexOf(Xt[Me])<0&&Object.prototype.propertyIsEnumerable.call(Ot,Xt[Me])&&(te[Xt[Me]]=Ot[Xt[Me]]);return te};const vt="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ct=(Ot,_t)=>{var te,{prefixCls:Xt,bordered:Me=!0,className:qt,rootClassName:Ne,getPopupContainer:ne,popupClassName:Ce,dropdownClassName:Ue,listHeight:Ze=256,placement:tn,listItemHeight:ln=24,size:ie,disabled:Gt,notFoundContent:Ae,status:Sn,builtinPlacements:gn,dropdownMatchSelectWidth:Fe,popupMatchSelectWidth:Ke,direction:rn,style:Fn,allowClear:Pn}=Ot,We=ft(Ot,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:fe,getPrefixCls:An,renderEmpty:Hn,direction:un,virtual:De,popupMatchSelectWidth:He,popupOverflow:Ee,select:Jt}=Ht.useContext(ge.E_),ye=An("select",Xt),Re=An(),Be=rn!=null?rn:un,{compactSize:Qt,compactItemClassnames:ce}=(0,At.ri)(ye,Be),[Tt,xt]=(0,nt.Z)(ye),yt=Ht.useMemo(()=>{const{mode:Ci}=We;if(Ci!=="combobox")return Ci===vt?"combobox":Ci},[We.mode]),kt=yt==="multiple"||yt==="tags",zt=(0,ht.Z)(We.suffixIcon,We.showArrow),Mt=(te=Ke!=null?Ke:Fe)!==null&&te!==void 0?te:He,{status:se,hasFeedback:$e,isFormItemInput:cn,feedbackIcon:sn}=Ht.useContext(ve.aM),En=(0,be.F)(se,Sn);let Gn;Ae!==void 0?Gn=Ae:yt==="combobox"?Gn=null:Gn=(Hn==null?void 0:Hn("Select"))||Ht.createElement(ue.Z,{componentName:"Select"});const{suffixIcon:zn,itemIcon:Zn,removeIcon:$n,clearIcon:ni}=(0,at.Z)(Object.assign(Object.assign({},We),{multiple:kt,hasFeedback:$e,feedbackIcon:sn,showSuffixIcon:zt,prefixCls:ye,showArrow:We.showArrow,componentName:"Select"})),ei=Pn===!0?{clearIcon:ni}:Pn,Bi=(0,we.Z)(We,["suffixIcon","itemIcon"]),Ki=It()(Ce||Ue,{[`${ye}-dropdown-${Be}`]:Be==="rtl"},Ne,xt),jn=(0,de.Z)(Ci=>{var bt;return(bt=ie!=null?ie:Qt)!==null&&bt!==void 0?bt:Ci}),Tn=Ht.useContext(Kt.Z),In=Gt!=null?Gt:Tn,li=It()({[`${ye}-lg`]:jn==="large",[`${ye}-sm`]:jn==="small",[`${ye}-rtl`]:Be==="rtl",[`${ye}-borderless`]:!Me,[`${ye}-in-form-item`]:cn},(0,be.Z)(ye,En,$e),ce,Jt==null?void 0:Jt.className,qt,Ne,xt),gi=Ht.useMemo(()=>tn!==void 0?tn:Be==="rtl"?"bottomRight":"bottomLeft",[tn,Be]),Yi=(0,et.Z)(gn,Ee);return Tt(Ht.createElement(Zt.ZP,Object.assign({ref:_t,virtual:De,showSearch:Jt==null?void 0:Jt.showSearch},Bi,{style:Object.assign(Object.assign({},Jt==null?void 0:Jt.style),Fn),dropdownMatchSelectWidth:Mt,builtinPlacements:Yi,transitionName:(0,Rt.m)(Re,"slide-up",We.transitionName),listHeight:Ze,listItemHeight:ln,mode:yt,prefixCls:ye,placement:gi,direction:Be,suffixIcon:zn,menuItemSelectedIcon:Zn,removeIcon:$n,allowClear:ei,notFoundContent:Gn,className:li,getPopupContainer:ne||fe,dropdownClassName:Ki,disabled:In})))},Bt=Ht.forwardRef(Ct),Ft=(0,he.Z)(Bt);Bt.SECRET_COMBOBOX_MODE_DO_NOT_USE=vt,Bt.Option=Zt.Wx,Bt.OptGroup=Zt.Xo,Bt._InternalPanelDoNotUseOrYouWillBeFired=Ft,vn.default=Bt},14154:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return Bt}});var mt=Pt(17313),It=Pt(74207),Zt=Pt(37613),we=Pt(83116),Ht=Pt(13826),he=Pt(92899);const Rt=Ft=>{const{optionHeight:Ot,optionFontSize:_t,optionLineHeight:te,optionPadding:Xt}=Ft;return{position:"relative",display:"block",minHeight:Ot,padding:Xt,color:Ft.colorText,fontWeight:"normal",fontSize:_t,lineHeight:te,boxSizing:"border-box"}};var ge=Ft=>{const{antCls:Ot,componentCls:_t}=Ft,te=`${_t}-item`,Xt=`&${Ot}-slide-up-enter${Ot}-slide-up-enter-active`,Me=`&${Ot}-slide-up-appear${Ot}-slide-up-appear-active`,qt=`&${Ot}-slide-up-leave${Ot}-slide-up-leave-active`,Ne=`${_t}-dropdown-placement-`;return[{[`${_t}-dropdown`]:Object.assign(Object.assign({},(0,mt.Wf)(Ft)),{position:"absolute",top:-9999,zIndex:Ft.zIndexPopup,boxSizing:"border-box",padding:Ft.paddingXXS,overflow:"hidden",fontSize:Ft.fontSize,fontVariant:"initial",backgroundColor:Ft.colorBgElevated,borderRadius:Ft.borderRadiusLG,outline:"none",boxShadow:Ft.boxShadowSecondary,[`
${Xt}${Ne}bottomLeft,
${Me}${Ne}bottomLeft
`]:{animationName:Ht.fJ},[`
${Xt}${Ne}topLeft,
${Me}${Ne}topLeft,
${Xt}${Ne}topRight,
${Me}${Ne}topRight
`]:{animationName:Ht.Qt},[`${qt}${Ne}bottomLeft`]:{animationName:Ht.Uw},[`
${qt}${Ne}topLeft,
${qt}${Ne}topRight
`]:{animationName:Ht.ly},"&-hidden":{display:"none"},[`${te}`]:Object.assign(Object.assign({},Rt(Ft)),{cursor:"pointer",transition:`background ${Ft.motionDurationSlow} ease`,borderRadius:Ft.borderRadiusSM,"&-group":{color:Ft.colorTextDescription,fontSize:Ft.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},mt.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${te}-option-disabled)`]:{backgroundColor:Ft.optionActiveBg},[`&-selected:not(${te}-option-disabled)`]:{color:Ft.optionSelectedColor,fontWeight:Ft.optionSelectedFontWeight,backgroundColor:Ft.optionSelectedBg,[`${te}-option-state`]:{color:Ft.colorPrimary}},"&-disabled":{[`&${te}-option-selected`]:{backgroundColor:Ft.colorBgContainerDisabled},color:Ft.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Ft.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ht.oN)(Ft,"slide-up"),(0,Ht.oN)(Ft,"slide-down"),(0,he.Fm)(Ft,"move-up"),(0,he.Fm)(Ft,"move-down")]};const Kt=2,ue=Ft=>{let{controlHeightSM:Ot,controlHeight:_t,lineWidth:te}=Ft;const Xt=(_t-Ot)/2-te,Me=Math.ceil(Xt/2);return[Xt,Me]};function de(Ft,Ot){const{componentCls:_t,iconCls:te}=Ft,Xt=`${_t}-selection-overflow`,Me=Ft.multipleSelectItemHeight,[qt]=ue(Ft),Ne=Ot?`${_t}-${Ot}`:"";return{[`${_t}-multiple${Ne}`]:{fontSize:Ft.fontSize,[Xt]:{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:`${qt-Kt}px ${Kt*2}px`,borderRadius:Ft.borderRadius,[`${_t}-show-search&`]:{cursor:"text"},[`${_t}-disabled&`]:{background:Ft.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Kt}px 0`,lineHeight:`${Me}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${_t}-show-arrow ${_t}-selector,
&${_t}-allow-clear ${_t}-selector
`]:{paddingInlineEnd:Ft.fontSizeIcon+Ft.controlPaddingHorizontal},[`${_t}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Me,marginTop:Kt,marginBottom:Kt,lineHeight:`${Me-Ft.lineWidth*2}px`,background:Ft.multipleItemBg,border:`${Ft.lineWidth}px ${Ft.lineType} ${Ft.multipleItemBorderColor}`,borderRadius:Ft.borderRadiusSM,cursor:"default",transition:`font-size ${Ft.motionDurationSlow}, line-height ${Ft.motionDurationSlow}, height ${Ft.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Kt*2,paddingInlineStart:Ft.paddingXS,paddingInlineEnd:Ft.paddingXS/2,[`${_t}-disabled&`]:{color:Ft.multipleItemColorDisabled,borderColor:Ft.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Ft.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,mt.Ro)()),{display:"inline-flex",alignItems:"center",color:Ft.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${te}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Ft.colorIconHover}})},[`${Xt}-item + ${Xt}-item`]:{[`${_t}-selection-search`]:{marginInlineStart:0}},[`${_t}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Ft.inputPaddingHorizontalBase-qt,"\n &-input,\n &-mirror\n ":{height:Me,fontFamily:Ft.fontFamily,lineHeight:`${Me}px`,transition:`all ${Ft.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:Ft.inputPaddingHorizontalBase,insetInlineEnd:Ft.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Ft.motionDurationSlow}`}}}}var At=Ft=>{const{componentCls:Ot}=Ft,_t=(0,Zt.TS)(Ft,{controlHeight:Ft.controlHeightSM,multipleSelectItemHeight:Ft.controlHeightXS,borderRadius:Ft.borderRadiusSM,borderRadiusSM:Ft.borderRadiusXS}),te=(0,Zt.TS)(Ft,{fontSize:Ft.fontSizeLG,controlHeight:Ft.controlHeightLG,multipleSelectItemHeight:Ft.multipleItemHeightLG,borderRadius:Ft.borderRadiusLG,borderRadiusSM:Ft.borderRadius}),[,Xt]=ue(Ft);return[de(Ft),de(_t,"sm"),{[`${Ot}-multiple${Ot}-sm`]:{[`${Ot}-selection-placeholder`]:{insetInline:Ft.controlPaddingHorizontalSM-Ft.lineWidth},[`${Ot}-selection-search`]:{marginInlineStart:Xt}}},de(te,"lg")]};function nt(Ft,Ot){const{componentCls:_t,inputPaddingHorizontalBase:te,borderRadius:Xt}=Ft,Me=Ft.controlHeight-Ft.lineWidth*2,qt=Math.ceil(Ft.fontSize*1.25),Ne=Ot?`${_t}-${Ot}`:"";return{[`${_t}-single${Ne}`]:{fontSize:Ft.fontSize,[`${_t}-selector`]:Object.assign(Object.assign({},(0,mt.Wf)(Ft)),{display:"flex",borderRadius:Xt,[`${_t}-selection-search`]:{position:"absolute",top:0,insetInlineStart:te,insetInlineEnd:te,bottom:0,"&-input":{width:"100%"}},[`
${_t}-selection-item,
${_t}-selection-placeholder
`]:{padding:0,lineHeight:`${Me}px`,transition:`all ${Ft.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Me}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:qt},[`&${_t}-open ${_t}-selection-item`]:{color:Ft.colorTextPlaceholder},[`&:not(${_t}-customize-input)`]:{[`${_t}-selector`]:{width:"100%",height:Ft.controlHeight,padding:`0 ${te}px`,[`${_t}-selection-search-input`]:{height:Me},"&:after":{lineHeight:`${Me}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 ${te}px`,"&:after":{display:"none"}}}}}}}function et(Ft){const{componentCls:Ot}=Ft,_t=Ft.controlPaddingHorizontalSM-Ft.lineWidth;return[nt(Ft),nt((0,Zt.TS)(Ft,{controlHeight:Ft.controlHeightSM,borderRadius:Ft.borderRadiusSM}),"sm"),{[`${Ot}-single${Ot}-sm`]:{[`&:not(${Ot}-customize-input)`]:{[`${Ot}-selection-search`]:{insetInlineStart:_t,insetInlineEnd:_t},[`${Ot}-selector`]:{padding:`0 ${_t}px`},[`&${Ot}-show-arrow ${Ot}-selection-search`]:{insetInlineEnd:_t+Ft.fontSize*1.5},[`
&${Ot}-show-arrow ${Ot}-selection-item,
&${Ot}-show-arrow ${Ot}-selection-placeholder
`]:{paddingInlineEnd:Ft.fontSize*1.5}}}},nt((0,Zt.TS)(Ft,{controlHeight:Ft.singleItemHeightLG,fontSize:Ft.fontSizeLG,borderRadius:Ft.borderRadiusLG}),"lg")]}const ht=Ft=>{const{componentCls:Ot,selectorBg:_t}=Ft;return{position:"relative",backgroundColor:_t,border:`${Ft.lineWidth}px ${Ft.lineType} ${Ft.colorBorder}`,transition:`all ${Ft.motionDurationMid} ${Ft.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ot}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ot}-disabled&`]:{color:Ft.colorTextDisabled,background:Ft.colorBgContainerDisabled,cursor:"not-allowed",[`${Ot}-multiple&`]:{background:Ft.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},at=function(Ft,Ot){let _t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:te,borderHoverColor:Xt,outlineColor:Me,antCls:qt}=Ot,Ne=_t?{[`${te}-selector`]:{borderColor:Xt}}:{};return{[Ft]:{[`&:not(${te}-disabled):not(${te}-customize-input):not(${qt}-pagination-size-changer)`]:Object.assign(Object.assign({},Ne),{[`${te}-focused& ${te}-selector`]:{borderColor:Xt,boxShadow:`0 0 0 ${Ot.controlOutlineWidth}px ${Me}`,outline:0},[`&:hover ${te}-selector`]:{borderColor:Xt}})}}},ft=Ft=>{const{componentCls:Ot}=Ft;return{[`${Ot}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},vt=Ft=>{const{componentCls:Ot,inputPaddingHorizontalBase:_t,iconCls:te}=Ft;return{[Ot]:Object.assign(Object.assign({},(0,mt.Wf)(Ft)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ot}-customize-input) ${Ot}-selector`]:Object.assign(Object.assign({},ht(Ft)),ft(Ft)),[`${Ot}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},mt.vS),[`${Ot}-selection-placeholder`]:Object.assign(Object.assign({},mt.vS),{flex:1,color:Ft.colorTextPlaceholder,pointerEvents:"none"}),[`${Ot}-arrow`]:Object.assign(Object.assign({},(0,mt.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_t,height:Ft.fontSizeIcon,marginTop:-Ft.fontSizeIcon/2,color:Ft.colorTextQuaternary,fontSize:Ft.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[te]:{verticalAlign:"top",transition:`transform ${Ft.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ot}-suffix)`]:{pointerEvents:"auto"}},[`${Ot}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ot}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_t,zIndex:1,display:"inline-block",width:Ft.fontSizeIcon,height:Ft.fontSizeIcon,marginTop:-Ft.fontSizeIcon/2,color:Ft.colorTextQuaternary,fontSize:Ft.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Ft.clearBg,cursor:"pointer",opacity:0,transition:`color ${Ft.motionDurationMid} ease, opacity ${Ft.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Ft.colorTextTertiary}},"&:hover":{[`${Ot}-clear`]:{opacity:1}}}),[`${Ot}-has-feedback`]:{[`${Ot}-clear`]:{insetInlineEnd:_t+Ft.fontSize+Ft.paddingXS}}}},Ct=Ft=>{const{componentCls:Ot}=Ft;return[{[Ot]:{[`&-borderless ${Ot}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ot}-in-form-item`]:{width:"100%"}}},vt(Ft),et(Ft),At(Ft),ge(Ft),{[`${Ot}-rtl`]:{direction:"rtl"}},at(Ot,(0,Zt.TS)(Ft,{borderHoverColor:Ft.colorPrimaryHover,outlineColor:Ft.controlOutline})),at(`${Ot}-status-error`,(0,Zt.TS)(Ft,{borderHoverColor:Ft.colorErrorHover,outlineColor:Ft.colorErrorOutline}),!0),at(`${Ot}-status-warning`,(0,Zt.TS)(Ft,{borderHoverColor:Ft.colorWarningHover,outlineColor:Ft.colorWarningOutline}),!0),(0,It.c)(Ft,{borderElCls:`${Ot}-selector`,focusElCls:`${Ot}-focused`})]};var Bt=(0,we.Z)("Select",(Ft,Ot)=>{let{rootPrefixCls:_t}=Ot;const te=(0,Zt.TS)(Ft,{rootPrefixCls:_t,inputPaddingHorizontalBase:Ft.paddingSM-1,multipleSelectItemHeight:Ft.multipleItemHeight});return[Ct(te)]},Ft=>{const{fontSize:Ot,lineHeight:_t,controlHeight:te,controlPaddingHorizontal:Xt,zIndexPopupBase:Me,colorText:qt,fontWeightStrong:Ne,controlItemBgActive:ne,controlItemBgHover:Ce,colorBgContainer:Ue,colorFillSecondary:Ze,controlHeightLG:tn,controlHeightSM:ln,colorBgContainerDisabled:ie,colorTextDisabled:Gt}=Ft;return{zIndexPopup:Me+50,optionSelectedColor:qt,optionSelectedFontWeight:Ne,optionSelectedBg:ne,optionActiveBg:Ce,optionPadding:`${(te-Ot*_t)/2}px ${Xt}px`,optionFontSize:Ot,optionLineHeight:_t,optionHeight:te,selectorBg:Ue,clearBg:Ue,singleItemHeightLG:tn,multipleItemBg:Ze,multipleItemBorderColor:"transparent",multipleItemHeight:ln,multipleItemHeightLG:te,multipleSelectorBgDisabled:ie,multipleItemColorDisabled:Gt,multipleItemBorderColorDisabled:"transparent"}})},58582:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return It}});const mt=Zt=>{const Ht={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Zt==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ht),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ht),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ht),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ht),{points:["br","tr"],offset:[0,-4]})}};function It(Zt,we){return Zt||mt(we)}},84443:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return mt}});function mt(It,Zt){return Zt!==void 0?Zt:It!==null}},66339:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});var mt=Pt(10402),It=Pt(33130),Zt=Pt(72119),we=Pt(18290),Ht=Pt(50023),he=Pt(21970),Rt=Pt(59301);function be(ge){let{suffixIcon:Kt,clearIcon:ue,menuItemSelectedIcon:de,removeIcon:ve,loading:At,multiple:nt,hasFeedback:et,prefixCls:ht,showSuffixIcon:at,feedbackIcon:ft,showArrow:vt,componentName:Ct}=ge;const Bt=ue!=null?ue:Rt.createElement(It.Z,null),Ft=Xt=>Kt===null&&!et&&!vt?null:Rt.createElement(Rt.Fragment,null,at!==!1&&Xt,et&&ft);let Ot=null;if(Kt!==void 0)Ot=Ft(Kt);else if(At)Ot=Ft(Rt.createElement(Ht.Z,{spin:!0}));else{const Xt=`${ht}-suffix`;Ot=Me=>{let{open:qt,showSearch:Ne}=Me;return Ft(qt&&Ne?Rt.createElement(he.Z,{className:Xt}):Rt.createElement(we.Z,{className:Xt}))}}let _t=null;de!==void 0?_t=de:nt?_t=Rt.createElement(mt.Z,null):_t=null;let te=null;return ve!==void 0?te=ve:te=Rt.createElement(Zt.Z,null),{clearIcon:Bt,suffixIcon:Ot,itemIcon:_t,removeIcon:te}}},78485:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return Ee}});var mt=Pt(92310),It=Pt.n(mt),Zt=Pt(59301),we=Pt(36355),Ht=Pt(64002),Rt=Jt=>{const{prefixCls:ye,className:Re,style:Be,size:Qt,shape:ce}=Jt,Tt=It()({[`${ye}-lg`]:Qt==="large",[`${ye}-sm`]:Qt==="small"}),xt=It()({[`${ye}-circle`]:ce==="circle",[`${ye}-square`]:ce==="square",[`${ye}-round`]:ce==="round"}),yt=Zt.useMemo(()=>typeof Qt=="number"?{width:Qt,height:Qt,lineHeight:`${Qt}px`}:{},[Qt]);return Zt.createElement("span",{className:It()(ye,Tt,xt,Re),style:Object.assign(Object.assign({},yt),Be)})},be=Pt(9792),ge=Pt(83116),Kt=Pt(37613);const ue=new be.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),de=Jt=>({height:Jt,lineHeight:`${Jt}px`}),ve=Jt=>Object.assign({width:Jt},de(Jt)),At=Jt=>({background:Jt.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:ue,animationDuration:Jt.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),nt=Jt=>Object.assign({width:Jt*5,minWidth:Jt*5},de(Jt)),et=Jt=>{const{skeletonAvatarCls:ye,gradientFromColor:Re,controlHeight:Be,controlHeightLG:Qt,controlHeightSM:ce}=Jt;return{[`${ye}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Re},ve(Be)),[`${ye}${ye}-circle`]:{borderRadius:"50%"},[`${ye}${ye}-lg`]:Object.assign({},ve(Qt)),[`${ye}${ye}-sm`]:Object.assign({},ve(ce))}},ht=Jt=>{const{controlHeight:ye,borderRadiusSM:Re,skeletonInputCls:Be,controlHeightLG:Qt,controlHeightSM:ce,gradientFromColor:Tt}=Jt;return{[`${Be}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Tt,borderRadius:Re},nt(ye)),[`${Be}-lg`]:Object.assign({},nt(Qt)),[`${Be}-sm`]:Object.assign({},nt(ce))}},at=Jt=>Object.assign({width:Jt},de(Jt)),ft=Jt=>{const{skeletonImageCls:ye,imageSizeBase:Re,gradientFromColor:Be,borderRadiusSM:Qt}=Jt;return{[`${ye}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Be,borderRadius:Qt},at(Re*2)),{[`${ye}-path`]:{fill:"#bfbfbf"},[`${ye}-svg`]:Object.assign(Object.assign({},at(Re)),{maxWidth:Re*4,maxHeight:Re*4}),[`${ye}-svg${ye}-svg-circle`]:{borderRadius:"50%"}}),[`${ye}${ye}-circle`]:{borderRadius:"50%"}}},vt=(Jt,ye,Re)=>{const{skeletonButtonCls:Be}=Jt;return{[`${Re}${Be}-circle`]:{width:ye,minWidth:ye,borderRadius:"50%"},[`${Re}${Be}-round`]:{borderRadius:ye}}},Ct=Jt=>Object.assign({width:Jt*2,minWidth:Jt*2},de(Jt)),Bt=Jt=>{const{borderRadiusSM:ye,skeletonButtonCls:Re,controlHeight:Be,controlHeightLG:Qt,controlHeightSM:ce,gradientFromColor:Tt}=Jt;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Re}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Tt,borderRadius:ye,width:Be*2,minWidth:Be*2},Ct(Be))},vt(Jt,Be,Re)),{[`${Re}-lg`]:Object.assign({},Ct(Qt))}),vt(Jt,Qt,`${Re}-lg`)),{[`${Re}-sm`]:Object.assign({},Ct(ce))}),vt(Jt,ce,`${Re}-sm`))},Ft=Jt=>{const{componentCls:ye,skeletonAvatarCls:Re,skeletonTitleCls:Be,skeletonParagraphCls:Qt,skeletonButtonCls:ce,skeletonInputCls:Tt,skeletonImageCls:xt,controlHeight:yt,controlHeightLG:kt,controlHeightSM:zt,gradientFromColor:Mt,padding:se,marginSM:$e,borderRadius:cn,titleHeight:sn,blockRadius:En,paragraphLiHeight:Gn,controlHeightXS:zn,paragraphMarginTop:Zn}=Jt;return{[`${ye}`]:{display:"table",width:"100%",[`${ye}-header`]:{display:"table-cell",paddingInlineEnd:se,verticalAlign:"top",[`${Re}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Mt},ve(yt)),[`${Re}-circle`]:{borderRadius:"50%"},[`${Re}-lg`]:Object.assign({},ve(kt)),[`${Re}-sm`]:Object.assign({},ve(zt))},[`${ye}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Be}`]:{width:"100%",height:sn,background:Mt,borderRadius:En,[`+ ${Qt}`]:{marginBlockStart:zt}},[`${Qt}`]:{padding:0,"> li":{width:"100%",height:Gn,listStyle:"none",background:Mt,borderRadius:En,"+ li":{marginBlockStart:zn}}},[`${Qt}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${ye}-content`]:{[`${Be}, ${Qt} > li`]:{borderRadius:cn}}},[`${ye}-with-avatar ${ye}-content`]:{[`${Be}`]:{marginBlockStart:$e,[`+ ${Qt}`]:{marginBlockStart:Zn}}},[`${ye}${ye}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Bt(Jt)),et(Jt)),ht(Jt)),ft(Jt)),[`${ye}${ye}-block`]:{width:"100%",[`${ce}`]:{width:"100%"},[`${Tt}`]:{width:"100%"}},[`${ye}${ye}-active`]:{[`
${Be},
${Qt} > li,
${Re},
${ce},
${Tt},
${xt}
`]:Object.assign({},At(Jt))}}};var Ot=(0,ge.Z)("Skeleton",Jt=>{const{componentCls:ye}=Jt,Re=(0,Kt.TS)(Jt,{skeletonAvatarCls:`${ye}-avatar`,skeletonTitleCls:`${ye}-title`,skeletonParagraphCls:`${ye}-paragraph`,skeletonButtonCls:`${ye}-button`,skeletonInputCls:`${ye}-input`,skeletonImageCls:`${ye}-image`,imageSizeBase:Jt.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Jt.gradientFromColor} 25%, ${Jt.gradientToColor} 37%, ${Jt.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Ft(Re)]},Jt=>{const{colorFillContent:ye,colorFill:Re}=Jt,Be=ye,Qt=Re;return{color:Be,colorGradientEnd:Qt,gradientFromColor:Be,gradientToColor:Qt,titleHeight:Jt.controlHeight/2,blockRadius:Jt.borderRadiusSM,paragraphMarginTop:Jt.marginLG+Jt.marginXXS,paragraphLiHeight:Jt.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),te=Jt=>{const{prefixCls:ye,className:Re,rootClassName:Be,active:Qt,shape:ce="circle",size:Tt="default"}=Jt,{getPrefixCls:xt}=Zt.useContext(we.E_),yt=xt("skeleton",ye),[kt,zt]=Ot(yt),Mt=(0,Ht.Z)(Jt,["prefixCls","className"]),se=It()(yt,`${yt}-element`,{[`${yt}-active`]:Qt},Re,Be,zt);return kt(Zt.createElement("div",{className:se},Zt.createElement(Rt,Object.assign({prefixCls:`${yt}-avatar`,shape:ce,size:Tt},Mt))))},Me=Jt=>{const{prefixCls:ye,className:Re,rootClassName:Be,active:Qt,block:ce=!1,size:Tt="default"}=Jt,{getPrefixCls:xt}=Zt.useContext(we.E_),yt=xt("skeleton",ye),[kt,zt]=Ot(yt),Mt=(0,Ht.Z)(Jt,["prefixCls"]),se=It()(yt,`${yt}-element`,{[`${yt}-active`]:Qt,[`${yt}-block`]:ce},Re,Be,zt);return kt(Zt.createElement("div",{className:se},Zt.createElement(Rt,Object.assign({prefixCls:`${yt}-button`,size:Tt},Mt))))};const qt="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var ne=Jt=>{const{prefixCls:ye,className:Re,rootClassName:Be,style:Qt,active:ce}=Jt,{getPrefixCls:Tt}=Zt.useContext(we.E_),xt=Tt("skeleton",ye),[yt,kt]=Ot(xt),zt=It()(xt,`${xt}-element`,{[`${xt}-active`]:ce},Re,Be,kt);return yt(Zt.createElement("div",{className:zt},Zt.createElement("div",{className:It()(`${xt}-image`,Re),style:Qt},Zt.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${xt}-image-svg`},Zt.createElement("path",{d:qt,className:`${xt}-image-path`})))))},Ue=Jt=>{const{prefixCls:ye,className:Re,rootClassName:Be,active:Qt,block:ce,size:Tt="default"}=Jt,{getPrefixCls:xt}=Zt.useContext(we.E_),yt=xt("skeleton",ye),[kt,zt]=Ot(yt),Mt=(0,Ht.Z)(Jt,["prefixCls"]),se=It()(yt,`${yt}-element`,{[`${yt}-active`]:Qt,[`${yt}-block`]:ce},Re,Be,zt);return kt(Zt.createElement("div",{className:se},Zt.createElement(Rt,Object.assign({prefixCls:`${yt}-input`,size:Tt},Mt))))},Ze=Pt(5891),tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},ln=tn,ie=Pt(88853),Gt=function(ye,Re){return Zt.createElement(ie.Z,(0,Ze.Z)({},ye,{ref:Re,icon:ln}))},Ae=Zt.forwardRef(Gt),Sn=Ae,Fe=Jt=>{const{prefixCls:ye,className:Re,rootClassName:Be,style:Qt,active:ce,children:Tt}=Jt,{getPrefixCls:xt}=Zt.useContext(we.E_),yt=xt("skeleton",ye),[kt,zt]=Ot(yt),Mt=It()(yt,`${yt}-element`,{[`${yt}-active`]:ce},zt,Re,Be),se=Tt!=null?Tt:Zt.createElement(Sn,null);return kt(Zt.createElement("div",{className:Mt},Zt.createElement("div",{className:It()(`${yt}-image`,Re),style:Qt},se)))},Ke=Pt(26390),Fn=Jt=>{const ye=xt=>{const{width:yt,rows:kt=2}=Jt;if(Array.isArray(yt))return yt[xt];if(kt-1===xt)return yt},{prefixCls:Re,className:Be,style:Qt,rows:ce}=Jt,Tt=(0,Ke.Z)(Array(ce)).map((xt,yt)=>Zt.createElement("li",{key:yt,style:{width:ye(yt)}}));return Zt.createElement("ul",{className:It()(Re,Be),style:Qt},Tt)},We=Jt=>{let{prefixCls:ye,className:Re,width:Be,style:Qt}=Jt;return Zt.createElement("h3",{className:It()(ye,Re),style:Object.assign({width:Be},Qt)})};function fe(Jt){return Jt&&typeof Jt=="object"?Jt:{}}function An(Jt,ye){return Jt&&!ye?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Hn(Jt,ye){return!Jt&&ye?{width:"38%"}:Jt&&ye?{width:"50%"}:{}}function un(Jt,ye){const Re={};return(!Jt||!ye)&&(Re.width="61%"),!Jt&&ye?Re.rows=3:Re.rows=2,Re}const De=Jt=>{const{prefixCls:ye,loading:Re,className:Be,rootClassName:Qt,style:ce,children:Tt,avatar:xt=!1,title:yt=!0,paragraph:kt=!0,active:zt,round:Mt}=Jt,{getPrefixCls:se,direction:$e,skeleton:cn}=Zt.useContext(we.E_),sn=se("skeleton",ye),[En,Gn]=Ot(sn);if(Re||!("loading"in Jt)){const zn=!!xt,Zn=!!yt,$n=!!kt;let ni;if(zn){const Ki=Object.assign(Object.assign({prefixCls:`${sn}-avatar`},An(Zn,$n)),fe(xt));ni=Zt.createElement("div",{className:`${sn}-header`},Zt.createElement(Rt,Object.assign({},Ki)))}let ei;if(Zn||$n){let Ki;if(Zn){const Tn=Object.assign(Object.assign({prefixCls:`${sn}-title`},Hn(zn,$n)),fe(yt));Ki=Zt.createElement(We,Object.assign({},Tn))}let jn;if($n){const Tn=Object.assign(Object.assign({prefixCls:`${sn}-paragraph`},un(zn,Zn)),fe(kt));jn=Zt.createElement(Fn,Object.assign({},Tn))}ei=Zt.createElement("div",{className:`${sn}-content`},Ki,jn)}const Bi=It()(sn,{[`${sn}-with-avatar`]:zn,[`${sn}-active`]:zt,[`${sn}-rtl`]:$e==="rtl",[`${sn}-round`]:Mt},cn==null?void 0:cn.className,Be,Qt,Gn);return En(Zt.createElement("div",{className:Bi,style:Object.assign(Object.assign({},cn==null?void 0:cn.style),ce)},ni,ei))}return typeof Tt!="undefined"?Tt:null};De.Button=Me,De.Avatar=te,De.Input=Ue,De.Image=ne,De.Node=Fe;var He=De,Ee=He},81327:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return ht}});var mt=Pt(59301),It=Pt(92310),Zt=Pt.n(It),we=Pt(38298),Ht=Pt(36355),he=Pt(33234);const Rt=mt.createContext({latestIndex:0}),be=Rt.Provider;var Kt=at=>{let{className:ft,index:vt,children:Ct,split:Bt,style:Ft}=at;const{latestIndex:Ot}=mt.useContext(Rt);return Ct==null?null:mt.createElement(mt.Fragment,null,mt.createElement("div",{className:ft,style:Ft},Ct),vt<Ot&&Bt&&mt.createElement("span",{className:`${ft}-split`},Bt))},ue=Pt(2856);function de(at){return["small","middle","large"].includes(at)}function ve(at){return at?typeof at=="number"&&!Number.isNaN(at):!1}var At=function(at,ft){var vt={};for(var Ct in at)Object.prototype.hasOwnProperty.call(at,Ct)&&ft.indexOf(Ct)<0&&(vt[Ct]=at[Ct]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bt=0,Ct=Object.getOwnPropertySymbols(at);Bt<Ct.length;Bt++)ft.indexOf(Ct[Bt])<0&&Object.prototype.propertyIsEnumerable.call(at,Ct[Bt])&&(vt[Ct[Bt]]=at[Ct[Bt]]);return vt};const et=mt.forwardRef((at,ft)=>{var vt,Ct;const{getPrefixCls:Bt,space:Ft,direction:Ot}=mt.useContext(Ht.E_),{size:_t=(Ft==null?void 0:Ft.size)||"small",align:te,className:Xt,rootClassName:Me,children:qt,direction:Ne="horizontal",prefixCls:ne,split:Ce,style:Ue,wrap:Ze=!1,classNames:tn,styles:ln}=at,ie=At(at,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Gt,Ae]=Array.isArray(_t)?_t:[_t,_t],Sn=de(Ae),gn=de(Gt),Fe=ve(Ae),Ke=ve(Gt),rn=(0,we.Z)(qt,{keepEmpty:!0}),Fn=te===void 0&&Ne==="horizontal"?"center":te,Pn=Bt("space",ne),[We,fe]=(0,ue.Z)(Pn),An=Zt()(Pn,Ft==null?void 0:Ft.className,fe,`${Pn}-${Ne}`,{[`${Pn}-rtl`]:Ot==="rtl",[`${Pn}-align-${Fn}`]:Fn,[`${Pn}-gap-row-${Ae}`]:Sn,[`${Pn}-gap-col-${Gt}`]:gn},Xt,Me),Hn=Zt()(`${Pn}-item`,(vt=tn==null?void 0:tn.item)!==null&&vt!==void 0?vt:(Ct=Ft==null?void 0:Ft.classNames)===null||Ct===void 0?void 0:Ct.item);let un=0;const De=rn.map((Jt,ye)=>{var Re,Be;Jt!=null&&(un=ye);const Qt=Jt&&Jt.key||`${Hn}-${ye}`;return mt.createElement(Kt,{className:Hn,key:Qt,index:ye,split:Ce,style:(Re=ln==null?void 0:ln.item)!==null&&Re!==void 0?Re:(Be=Ft==null?void 0:Ft.styles)===null||Be===void 0?void 0:Be.item},Jt)}),He=mt.useMemo(()=>({latestIndex:un}),[un]);if(rn.length===0)return null;const Ee={};return Ze&&(Ee.flexWrap="wrap"),!gn&&Ke&&(Ee.columnGap=Gt),!Sn&&Fe&&(Ee.rowGap=Ae),We(mt.createElement("div",Object.assign({ref:ft,className:An,style:Object.assign(Object.assign(Object.assign({},Ee),Ft==null?void 0:Ft.style),Ue)},ie),mt.createElement(be,{value:He},De)))});et.Compact=he.ZP;var ht=et},31797:function(xn,vn,Pt){"use strict";Pt.d(vn,{default:function(){return Ot}});var mt=Pt(59301),It=Pt(56762),Zt=Pt(92343),we=Pt(92310),Ht=Pt.n(we),he=Pt(36355),Rt=Pt(78485),ge=_t=>{const{value:te,formatter:Xt,precision:Me,decimalSeparator:qt,groupSeparator:Ne="",prefixCls:ne}=_t;let Ce;if(typeof Xt=="function")Ce=Xt(te);else{const Ue=String(te),Ze=Ue.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Ze||Ue==="-")Ce=Ue;else{const tn=Ze[1];let ln=Ze[2]||"0",ie=Ze[4]||"";ln=ln.replace(/\B(?=(\d{3})+(?!\d))/g,Ne),typeof Me=="number"&&(ie=ie.padEnd(Me,"0").slice(0,Me>0?Me:0)),ie&&(ie=`${qt}${ie}`),Ce=[mt.createElement("span",{key:"int",className:`${ne}-content-value-int`},tn,ln),ie&&mt.createElement("span",{key:"decimal",className:`${ne}-content-value-decimal`},ie)]}}return mt.createElement("span",{className:`${ne}-content-value`},Ce)},Kt=Pt(17313),ue=Pt(83116),de=Pt(37613);const ve=_t=>{const{componentCls:te,marginXXS:Xt,padding:Me,colorTextDescription:qt,titleFontSize:Ne,colorTextHeading:ne,contentFontSize:Ce,fontFamily:Ue}=_t;return{[`${te}`]:Object.assign(Object.assign({},(0,Kt.Wf)(_t)),{[`${te}-title`]:{marginBottom:Xt,color:qt,fontSize:Ne},[`${te}-skeleton`]:{paddingTop:Me},[`${te}-content`]:{color:ne,fontSize:Ce,fontFamily:Ue,[`${te}-content-value`]:{display:"inline-block",direction:"ltr"},[`${te}-content-prefix, ${te}-content-suffix`]:{display:"inline-block"},[`${te}-content-prefix`]:{marginInlineEnd:Xt},[`${te}-content-suffix`]:{marginInlineStart:Xt}}})}};var At=(0,ue.Z)("Statistic",_t=>{const te=(0,de.TS)(_t,{});return[ve(te)]},_t=>{const{fontSizeHeading3:te,fontSize:Xt}=_t;return{titleFontSize:Xt,contentFontSize:te}}),et=_t=>{const{prefixCls:te,className:Xt,rootClassName:Me,style:qt,valueStyle:Ne,value:ne=0,title:Ce,valueRender:Ue,prefix:Ze,suffix:tn,loading:ln=!1,onMouseEnter:ie,onMouseLeave:Gt,decimalSeparator:Ae=".",groupSeparator:Sn=","}=_t,{getPrefixCls:gn,direction:Fe,statistic:Ke}=mt.useContext(he.E_),rn=gn("statistic",te),[Fn,Pn]=At(rn),We=mt.createElement(ge,Object.assign({decimalSeparator:Ae,groupSeparator:Sn,prefixCls:rn},_t,{value:ne})),fe=Ht()(rn,{[`${rn}-rtl`]:Fe==="rtl"},Ke==null?void 0:Ke.className,Xt,Me,Pn);return Fn(mt.createElement("div",{className:fe,style:Object.assign(Object.assign({},Ke==null?void 0:Ke.style),qt),onMouseEnter:ie,onMouseLeave:Gt},Ce&&mt.createElement("div",{className:`${rn}-title`},Ce),mt.createElement(Rt.Z,{paragraph:!1,loading:ln,className:`${rn}-skeleton`},mt.createElement("div",{style:Ne,className:`${rn}-content`},Ze&&mt.createElement("span",{className:`${rn}-content-prefix`},Ze),Ue?Ue(We):We,tn&&mt.createElement("span",{className:`${rn}-content-suffix`},tn)))))};const ht=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function at(_t,te){let Xt=_t;const Me=/\[[^\]]*]/g,qt=(te.match(Me)||[]).map(Ue=>Ue.slice(1,-1)),Ne=te.replace(Me,"[]"),ne=ht.reduce((Ue,Ze)=>{let[tn,ln]=Ze;if(Ue.includes(tn)){const ie=Math.floor(Xt/ln);return Xt-=ie*ln,Ue.replace(new RegExp(`${tn}+`,"g"),Gt=>{const Ae=Gt.length;return ie.toString().padStart(Ae,"0")})}return Ue},Ne);let Ce=0;return ne.replace(Me,()=>{const Ue=qt[Ce];return Ce+=1,Ue})}function ft(_t,te){const{format:Xt=""}=te,Me=new Date(_t).getTime(),qt=Date.now(),Ne=Math.max(Me-qt,0);return at(Ne,Xt)}const vt=1e3/30;function Ct(_t){return new Date(_t).getTime()}const Bt=_t=>{const{value:te,format:Xt="HH:mm:ss",onChange:Me,onFinish:qt}=_t,Ne=(0,It.Z)(),ne=mt.useRef(null),Ce=()=>{qt==null||qt(),ne.current&&(clearInterval(ne.current),ne.current=null)},Ue=()=>{const ln=Ct(te);ln>=Date.now()&&(ne.current=setInterval(()=>{Ne(),Me==null||Me(ln-Date.now()),ln<Date.now()&&Ce()},vt))};mt.useEffect(()=>(Ue(),()=>{ne.current&&(clearInterval(ne.current),ne.current=null)}),[te]);const Ze=(ln,ie)=>ft(ln,Object.assign(Object.assign({},ie),{format:Xt})),tn=ln=>(0,Zt.Tm)(ln,{title:void 0});return mt.createElement(et,Object.assign({},_t,{valueRender:tn,formatter:Ze}))};var Ft=mt.memo(Bt);et.Countdown=Ft;var Ot=et},78673:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return Ne}});var mt=Pt(50023),It=Pt(92310),Zt=Pt.n(It),we=Pt(5891),Ht=Pt(80962),he=Pt(29043),Rt=Pt(19149),be=Pt(59301),ge=Pt(35788),Kt=Pt(85108),ue=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],de=be.forwardRef(function(ne,Ce){var Ue,Ze=ne.prefixCls,tn=Ze===void 0?"rc-switch":Ze,ln=ne.className,ie=ne.checked,Gt=ne.defaultChecked,Ae=ne.disabled,Sn=ne.loadingIcon,gn=ne.checkedChildren,Fe=ne.unCheckedChildren,Ke=ne.onClick,rn=ne.onChange,Fn=ne.onKeyDown,Pn=(0,Rt.Z)(ne,ue),We=(0,ge.Z)(!1,{value:ie,defaultValue:Gt}),fe=(0,he.Z)(We,2),An=fe[0],Hn=fe[1];function un(Jt,ye){var Re=An;return Ae||(Re=Jt,Hn(Re),rn==null||rn(Re,ye)),Re}function De(Jt){Jt.which===Kt.Z.LEFT?un(!1,Jt):Jt.which===Kt.Z.RIGHT&&un(!0,Jt),Fn==null||Fn(Jt)}function He(Jt){var ye=un(!An,Jt);Ke==null||Ke(ye,Jt)}var Ee=Zt()(tn,ln,(Ue={},(0,Ht.Z)(Ue,"".concat(tn,"-checked"),An),(0,Ht.Z)(Ue,"".concat(tn,"-disabled"),Ae),Ue));return be.createElement("button",(0,we.Z)({},Pn,{type:"button",role:"switch","aria-checked":An,disabled:Ae,className:Ee,ref:Ce,onKeyDown:De,onClick:He}),Sn,be.createElement("span",{className:"".concat(tn,"-inner")},be.createElement("span",{className:"".concat(tn,"-inner-checked")},gn),be.createElement("span",{className:"".concat(tn,"-inner-unchecked")},Fe)))});de.displayName="Switch";var ve=de,At=Pt(14088),nt=Pt(36355),et=Pt(1684),ht=Pt(19716),at=Pt(64993),ft=Pt(17313),vt=Pt(83116),Ct=Pt(37613);const Bt=ne=>{const{componentCls:Ce,trackHeightSM:Ue,trackPadding:Ze,trackMinWidthSM:tn,innerMinMarginSM:ln,innerMaxMarginSM:ie,handleSizeSM:Gt}=ne,Ae=`${Ce}-inner`;return{[Ce]:{[`&${Ce}-small`]:{minWidth:tn,height:Ue,lineHeight:`${Ue}px`,[`${Ce}-inner`]:{paddingInlineStart:ie,paddingInlineEnd:ln,[`${Ae}-checked`]:{marginInlineStart:`calc(-100% + ${Gt+Ze*2}px - ${ie*2}px)`,marginInlineEnd:`calc(100% - ${Gt+Ze*2}px + ${ie*2}px)`},[`${Ae}-unchecked`]:{marginTop:-Ue,marginInlineStart:0,marginInlineEnd:0}},[`${Ce}-handle`]:{width:Gt,height:Gt},[`${Ce}-loading-icon`]:{top:(Gt-ne.switchLoadingIconSize)/2,fontSize:ne.switchLoadingIconSize},[`&${Ce}-checked`]:{[`${Ce}-inner`]:{paddingInlineStart:ln,paddingInlineEnd:ie,[`${Ae}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ae}-unchecked`]:{marginInlineStart:`calc(100% - ${Gt+Ze*2}px + ${ie*2}px)`,marginInlineEnd:`calc(-100% + ${Gt+Ze*2}px - ${ie*2}px)`}},[`${Ce}-handle`]:{insetInlineStart:`calc(100% - ${Gt+Ze}px)`}},[`&:not(${Ce}-disabled):active`]:{[`&:not(${Ce}-checked) ${Ae}`]:{[`${Ae}-unchecked`]:{marginInlineStart:ne.marginXXS/2,marginInlineEnd:-ne.marginXXS/2}},[`&${Ce}-checked ${Ae}`]:{[`${Ae}-checked`]:{marginInlineStart:-ne.marginXXS/2,marginInlineEnd:ne.marginXXS/2}}}}}}},Ft=ne=>{const{componentCls:Ce,handleSize:Ue}=ne;return{[Ce]:{[`${Ce}-loading-icon${ne.iconCls}`]:{position:"relative",top:(Ue-ne.fontSize)/2,color:ne.switchLoadingIconColor,verticalAlign:"top"},[`&${Ce}-checked ${Ce}-loading-icon`]:{color:ne.switchColor}}}},Ot=ne=>{const{componentCls:Ce,motion:Ue,trackPadding:Ze,handleBg:tn,handleShadow:ln,handleSize:ie}=ne,Gt=`${Ce}-handle`;return{[Ce]:{[Gt]:{position:"absolute",top:Ze,insetInlineStart:Ze,width:ie,height:ie,transition:`all ${ne.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:tn,borderRadius:ie/2,boxShadow:ln,transition:`all ${ne.switchDuration} ease-in-out`,content:'""'}},[`&${Ce}-checked ${Gt}`]:{insetInlineStart:`calc(100% - ${ie+Ze}px)`},[`&:not(${Ce}-disabled):active`]:Ue?{[`${Gt}::before`]:{insetInlineEnd:ne.switchHandleActiveInset,insetInlineStart:0},[`&${Ce}-checked ${Gt}::before`]:{insetInlineEnd:0,insetInlineStart:ne.switchHandleActiveInset}}:{}}}},_t=ne=>{const{componentCls:Ce,trackHeight:Ue,trackPadding:Ze,innerMinMargin:tn,innerMaxMargin:ln,handleSize:ie}=ne,Gt=`${Ce}-inner`;return{[Ce]:{[Gt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:ln,paddingInlineEnd:tn,transition:`padding-inline-start ${ne.switchDuration} ease-in-out, padding-inline-end ${ne.switchDuration} ease-in-out`,[`${Gt}-checked, ${Gt}-unchecked`]:{display:"block",color:ne.colorTextLightSolid,fontSize:ne.fontSizeSM,transition:`margin-inline-start ${ne.switchDuration} ease-in-out, margin-inline-end ${ne.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Gt}-checked`]:{marginInlineStart:`calc(-100% + ${ie+Ze*2}px - ${ln*2}px)`,marginInlineEnd:`calc(100% - ${ie+Ze*2}px + ${ln*2}px)`},[`${Gt}-unchecked`]:{marginTop:-Ue,marginInlineStart:0,marginInlineEnd:0}},[`&${Ce}-checked ${Gt}`]:{paddingInlineStart:tn,paddingInlineEnd:ln,[`${Gt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Gt}-unchecked`]:{marginInlineStart:`calc(100% - ${ie+Ze*2}px + ${ln*2}px)`,marginInlineEnd:`calc(-100% + ${ie+Ze*2}px - ${ln*2}px)`}},[`&:not(${Ce}-disabled):active`]:{[`&:not(${Ce}-checked) ${Gt}`]:{[`${Gt}-unchecked`]:{marginInlineStart:Ze*2,marginInlineEnd:-Ze*2}},[`&${Ce}-checked ${Gt}`]:{[`${Gt}-checked`]:{marginInlineStart:-Ze*2,marginInlineEnd:Ze*2}}}}}},te=ne=>{const{componentCls:Ce,trackHeight:Ue,trackMinWidth:Ze}=ne;return{[Ce]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ft.Wf)(ne)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ze,height:Ue,lineHeight:`${Ue}px`,verticalAlign:"middle",background:ne.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ne.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ce}-disabled)`]:{background:ne.colorTextTertiary}}),(0,ft.Qy)(ne)),{[`&${Ce}-checked`]:{background:ne.switchColor,[`&:hover:not(${Ce}-disabled)`]:{background:ne.colorPrimaryHover}},[`&${Ce}-loading, &${Ce}-disabled`]:{cursor:"not-allowed",opacity:ne.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ce}-rtl`]:{direction:"rtl"}})}};var Xt=(0,vt.Z)("Switch",ne=>{const Ce=(0,Ct.TS)(ne,{switchDuration:ne.motionDurationMid,switchColor:ne.colorPrimary,switchDisabledOpacity:ne.opacityLoading,switchLoadingIconSize:ne.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ne.opacityLoading})`,switchHandleActiveInset:"-30%"});return[te(Ce),_t(Ce),Ot(Ce),Ft(Ce),Bt(Ce)]},ne=>{const{fontSize:Ce,lineHeight:Ue,controlHeight:Ze,colorWhite:tn}=ne,ln=Ce*Ue,ie=Ze/2,Gt=2,Ae=ln-Gt*2,Sn=ie-Gt*2;return{trackHeight:ln,trackHeightSM:ie,trackMinWidth:Ae*2+Gt*4,trackMinWidthSM:Sn*2+Gt*2,trackPadding:Gt,handleBg:tn,handleSize:Ae,handleSizeSM:Sn,handleShadow:`0 2px 4px 0 ${new at.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Ae/2,innerMaxMargin:Ae+Gt+Gt*2,innerMinMarginSM:Sn/2,innerMaxMarginSM:Sn+Gt+Gt*2}}),Me=function(ne,Ce){var Ue={};for(var Ze in ne)Object.prototype.hasOwnProperty.call(ne,Ze)&&Ce.indexOf(Ze)<0&&(Ue[Ze]=ne[Ze]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tn=0,Ze=Object.getOwnPropertySymbols(ne);tn<Ze.length;tn++)Ce.indexOf(Ze[tn])<0&&Object.prototype.propertyIsEnumerable.call(ne,Ze[tn])&&(Ue[Ze[tn]]=ne[Ze[tn]]);return Ue};const qt=be.forwardRef((ne,Ce)=>{const{prefixCls:Ue,size:Ze,disabled:tn,loading:ln,className:ie,rootClassName:Gt,style:Ae}=ne,Sn=Me(ne,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:gn,direction:Fe,switch:Ke}=be.useContext(nt.E_),rn=be.useContext(et.Z),Fn=(tn!=null?tn:rn)||ln,Pn=gn("switch",Ue),We=be.createElement("div",{className:`${Pn}-handle`},ln&&be.createElement(mt.Z,{className:`${Pn}-loading-icon`})),[fe,An]=Xt(Pn),Hn=(0,ht.Z)(Ze),un=Zt()(Ke==null?void 0:Ke.className,{[`${Pn}-small`]:Hn==="small",[`${Pn}-loading`]:ln,[`${Pn}-rtl`]:Fe==="rtl"},ie,Gt,An),De=Object.assign(Object.assign({},Ke==null?void 0:Ke.style),Ae);return fe(be.createElement(At.Z,{component:"Switch"},be.createElement(ve,Object.assign({},Sn,{prefixCls:Pn,className:un,style:De,disabled:Fn,ref:Ce,loadingIcon:We}))))});qt.__ANT_SWITCH=!0;var Ne=qt},12563:function(xn,vn,Pt){"use strict";Pt.d(vn,{default:function(){return Me}});var mt=Pt(59301),It=Pt(72119),Zt=Pt(92310),we=Pt.n(Zt),Ht=Pt(36785),he=Pt(47729),Rt=Pt(14088),be=Pt(36355),ge=Pt(17313),Kt=Pt(37613),ue=Pt(83116);const de=qt=>{const{paddingXXS:Ne,lineWidth:ne,tagPaddingHorizontal:Ce,componentCls:Ue}=qt,Ze=Ce-ne,tn=Ne-ne;return{[Ue]:Object.assign(Object.assign({},(0,ge.Wf)(qt)),{display:"inline-block",height:"auto",marginInlineEnd:qt.marginXS,paddingInline:Ze,fontSize:qt.tagFontSize,lineHeight:qt.tagLineHeight,whiteSpace:"nowrap",background:qt.defaultBg,border:`${qt.lineWidth}px ${qt.lineType} ${qt.colorBorder}`,borderRadius:qt.borderRadiusSM,opacity:1,transition:`all ${qt.motionDurationMid}`,textAlign:"start",position:"relative",[`&${Ue}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:qt.defaultColor},[`${Ue}-close-icon`]:{marginInlineStart:tn,color:qt.colorTextDescription,fontSize:qt.tagIconSize,cursor:"pointer",transition:`all ${qt.motionDurationMid}`,"&:hover":{color:qt.colorTextHeading}},[`&${Ue}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${qt.iconCls}-close, ${qt.iconCls}-close:hover`]:{color:qt.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${Ue}-checkable-checked):hover`]:{color:qt.colorPrimary,backgroundColor:qt.colorFillSecondary},"&:active, &-checked":{color:qt.colorTextLightSolid},"&-checked":{backgroundColor:qt.colorPrimary,"&:hover":{backgroundColor:qt.colorPrimaryHover}},"&:active":{backgroundColor:qt.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${qt.iconCls} + span, > span + ${qt.iconCls}`]:{marginInlineStart:Ze}}),[`${Ue}-borderless`]:{borderColor:"transparent",background:qt.tagBorderlessBg}}},ve=qt=>{const{lineWidth:Ne,fontSizeIcon:ne}=qt,Ce=qt.fontSizeSM,Ue=`${qt.lineHeightSM*Ce}px`;return(0,Kt.TS)(qt,{tagFontSize:Ce,tagLineHeight:Ue,tagIconSize:ne-2*Ne,tagPaddingHorizontal:8,tagBorderlessBg:qt.colorFillTertiary})},At=qt=>({defaultBg:qt.colorFillQuaternary,defaultColor:qt.colorText});var nt=(0,ue.Z)("Tag",qt=>{const Ne=ve(qt);return de(Ne)},At),et=function(qt,Ne){var ne={};for(var Ce in qt)Object.prototype.hasOwnProperty.call(qt,Ce)&&Ne.indexOf(Ce)<0&&(ne[Ce]=qt[Ce]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,Ce=Object.getOwnPropertySymbols(qt);Ue<Ce.length;Ue++)Ne.indexOf(Ce[Ue])<0&&Object.prototype.propertyIsEnumerable.call(qt,Ce[Ue])&&(ne[Ce[Ue]]=qt[Ce[Ue]]);return ne},at=qt=>{const{prefixCls:Ne,style:ne,className:Ce,checked:Ue,onChange:Ze,onClick:tn}=qt,ln=et(qt,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:ie,tag:Gt}=mt.useContext(be.E_),Ae=rn=>{Ze==null||Ze(!Ue),tn==null||tn(rn)},Sn=ie("tag",Ne),[gn,Fe]=nt(Sn),Ke=we()(Sn,`${Sn}-checkable`,{[`${Sn}-checkable-checked`]:Ue},Gt==null?void 0:Gt.className,Ce,Fe);return gn(mt.createElement("span",Object.assign({},ln,{style:Object.assign(Object.assign({},ne),Gt==null?void 0:Gt.style),className:Ke,onClick:Ae})))},ft=Pt(45157);const vt=qt=>(0,ft.Z)(qt,(Ne,ne)=>{let{textColor:Ce,lightBorderColor:Ue,lightColor:Ze,darkColor:tn}=ne;return{[`${qt.componentCls}-${Ne}`]:{color:Ce,background:Ze,borderColor:Ue,"&-inverse":{color:qt.colorTextLightSolid,background:tn,borderColor:tn},[`&${qt.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Ct=(0,ue.b)(["Tag","preset"],qt=>{const Ne=ve(qt);return vt(Ne)},At);function Bt(qt){return typeof qt!="string"?qt:qt.charAt(0).toUpperCase()+qt.slice(1)}const Ft=(qt,Ne,ne)=>{const Ce=Bt(ne);return{[`${qt.componentCls}-${Ne}`]:{color:qt[`color${ne}`],background:qt[`color${Ce}Bg`],borderColor:qt[`color${Ce}Border`],[`&${qt.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ot=(0,ue.b)(["Tag","status"],qt=>{const Ne=ve(qt);return[Ft(Ne,"success","Success"),Ft(Ne,"processing","Info"),Ft(Ne,"error","Error"),Ft(Ne,"warning","Warning")]},At),_t=function(qt,Ne){var ne={};for(var Ce in qt)Object.prototype.hasOwnProperty.call(qt,Ce)&&Ne.indexOf(Ce)<0&&(ne[Ce]=qt[Ce]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,Ce=Object.getOwnPropertySymbols(qt);Ue<Ce.length;Ue++)Ne.indexOf(Ce[Ue])<0&&Object.prototype.propertyIsEnumerable.call(qt,Ce[Ue])&&(ne[Ce[Ue]]=qt[Ce[Ue]]);return ne};const te=(qt,Ne)=>{const{prefixCls:ne,className:Ce,rootClassName:Ue,style:Ze,children:tn,icon:ln,color:ie,onClose:Gt,closeIcon:Ae,closable:Sn,bordered:gn=!0}=qt,Fe=_t(qt,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Ke,direction:rn,tag:Fn}=mt.useContext(be.E_),[Pn,We]=mt.useState(!0);mt.useEffect(()=>{"visible"in Fe&&We(Fe.visible)},[Fe.visible]);const fe=(0,Ht.o2)(ie),An=(0,Ht.yT)(ie),Hn=fe||An,un=Object.assign(Object.assign({backgroundColor:ie&&!Hn?ie:void 0},Fn==null?void 0:Fn.style),Ze),De=Ke("tag",ne),[He,Ee]=nt(De),Jt=we()(De,Fn==null?void 0:Fn.className,{[`${De}-${ie}`]:Hn,[`${De}-has-color`]:ie&&!Hn,[`${De}-hidden`]:!Pn,[`${De}-rtl`]:rn==="rtl",[`${De}-borderless`]:!gn},Ce,Ue,Ee),ye=xt=>{xt.stopPropagation(),Gt==null||Gt(xt),!xt.defaultPrevented&&We(!1)},[,Re]=(0,he.Z)(Sn,Ae,xt=>xt===null?mt.createElement(It.Z,{className:`${De}-close-icon`,onClick:ye}):mt.createElement("span",{className:`${De}-close-icon`,onClick:ye},xt),null,!1),Be=typeof Fe.onClick=="function"||tn&&tn.type==="a",Qt=ln||null,ce=Qt?mt.createElement(mt.Fragment,null,Qt,tn&&mt.createElement("span",null,tn)):tn,Tt=mt.createElement("span",Object.assign({},Fe,{ref:Ne,className:Jt,style:un}),ce,Re,fe&&mt.createElement(Ct,{key:"preset",prefixCls:De}),An&&mt.createElement(Ot,{key:"status",prefixCls:De}));return He(Be?mt.createElement(Rt.Z,{component:"Tag"},Tt):Tt)},Xt=mt.forwardRef(te);Xt.CheckableTag=at;var Me=Xt},99498:function(xn,vn,Pt){(function(mt){mt(Pt(89780))})(function(mt){mt.defineOption("placeholder","",function(be,ge,Kt){var ue=Kt&&Kt!=mt.Init;if(ge&&!ue)be.on("blur",Ht),be.on("change",he),be.on("swapDoc",he),mt.on(be.getInputField(),"compositionupdate",be.state.placeholderCompose=function(){we(be)}),he(be);else if(!ge&&ue){be.off("blur",Ht),be.off("change",he),be.off("swapDoc",he),mt.off(be.getInputField(),"compositionupdate",be.state.placeholderCompose),It(be);var de=be.getWrapperElement();de.className=de.className.replace(" CodeMirror-empty","")}ge&&!be.hasFocus()&&Ht(be)});function It(be){be.state.placeholder&&(be.state.placeholder.parentNode.removeChild(be.state.placeholder),be.state.placeholder=null)}function Zt(be){It(be);var ge=be.state.placeholder=document.createElement("pre");ge.style.cssText="height: 0; overflow: visible",ge.style.direction=be.getOption("direction"),ge.className="CodeMirror-placeholder CodeMirror-line-like";var Kt=be.getOption("placeholder");typeof Kt=="string"&&(Kt=document.createTextNode(Kt)),ge.appendChild(Kt),be.display.lineSpace.insertBefore(ge,be.display.lineSpace.firstChild)}function we(be){setTimeout(function(){var ge=!1,Kt=be.getInputField();Kt.nodeName=="TEXTAREA"?ge=!Kt.value:be.lineCount()==1&&(ge=!/[^\u200b]/.test(Kt.querySelector(".CodeMirror-line").textContent)),ge?Zt(be):It(be)},20)}function Ht(be){Rt(be)&&Zt(be)}function he(be){var ge=be.getWrapperElement(),Kt=Rt(be);ge.className=ge.className.replace(" CodeMirror-empty","")+(Kt?" CodeMirror-empty":""),Kt?Zt(be):It(be)}function Rt(be){return be.lineCount()===1&&be.getLine(0)===""}})},25717:function(xn,vn,Pt){(function(mt){mt(Pt(89780))})(function(mt){var It={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Zt=mt.Pos;mt.defineOption("autoCloseBrackets",!1,function(nt,et,ht){ht&&ht!=mt.Init&&(nt.removeKeyMap(Ht),nt.state.closeBrackets=null),et&&(he(we(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(Ht))});function we(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:It[et]}var Ht={Backspace:ge,Enter:Kt};function he(nt){for(var et=0;et<nt.length;et++){var ht=nt.charAt(et),at="'"+ht+"'";Ht[at]||(Ht[at]=Rt(ht))}}he(It.pairs+"`");function Rt(nt){return function(et){return de(et,nt)}}function be(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var ht=nt.getModeAt(nt.getCursor());return ht.closeBrackets||et}function ge(nt){var et=be(nt);if(!et||nt.getOption("disableInput"))return mt.Pass;for(var ht=we(et,"pairs"),at=nt.listSelections(),ft=0;ft<at.length;ft++){if(!at[ft].empty())return mt.Pass;var vt=ve(nt,at[ft].head);if(!vt||ht.indexOf(vt)%2!=0)return mt.Pass}for(var ft=at.length-1;ft>=0;ft--){var Ct=at[ft].head;nt.replaceRange("",Zt(Ct.line,Ct.ch-1),Zt(Ct.line,Ct.ch+1),"+delete")}}function Kt(nt){var et=be(nt),ht=et&&we(et,"explode");if(!ht||nt.getOption("disableInput"))return mt.Pass;for(var at=nt.listSelections(),ft=0;ft<at.length;ft++){if(!at[ft].empty())return mt.Pass;var vt=ve(nt,at[ft].head);if(!vt||ht.indexOf(vt)%2!=0)return mt.Pass}nt.operation(function(){var Ct=nt.lineSeparator()||`
`;nt.replaceSelection(Ct+Ct,null),nt.execCommand("goCharLeft"),at=nt.listSelections();for(var Bt=0;Bt<at.length;Bt++){var Ft=at[Bt].head.line;nt.indentLine(Ft,null,!0),nt.indentLine(Ft+1,null,!0)}})}function ue(nt){var et=mt.cmpPos(nt.anchor,nt.head)>0;return{anchor:new Zt(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new Zt(nt.head.line,nt.head.ch+(et?1:-1))}}function de(nt,et){var ht=be(nt);if(!ht||nt.getOption("disableInput"))return mt.Pass;var at=we(ht,"pairs"),ft=at.indexOf(et);if(ft==-1)return mt.Pass;for(var vt=we(ht,"closeBefore"),Ct=we(ht,"triples"),Bt=at.charAt(ft+1)==et,Ft=nt.listSelections(),Ot=ft%2==0,_t,te=0;te<Ft.length;te++){var Xt=Ft[te],Me=Xt.head,qt,Ne=nt.getRange(Me,Zt(Me.line,Me.ch+1));if(Ot&&!Xt.empty())qt="surround";else if((Bt||!Ot)&&Ne==et)Bt&&At(nt,Me)?qt="both":Ct.indexOf(et)>=0&&nt.getRange(Me,Zt(Me.line,Me.ch+3))==et+et+et?qt="skipThree":qt="skip";else if(Bt&&Me.ch>1&&Ct.indexOf(et)>=0&&nt.getRange(Zt(Me.line,Me.ch-2),Me)==et+et){if(Me.ch>2&&/\bstring/.test(nt.getTokenTypeAt(Zt(Me.line,Me.ch-2))))return mt.Pass;qt="addFour"}else if(Bt){var ne=Me.ch==0?" ":nt.getRange(Zt(Me.line,Me.ch-1),Me);if(!mt.isWordChar(Ne)&&ne!=et&&!mt.isWordChar(ne))qt="both";else return mt.Pass}else if(Ot&&(Ne.length===0||/\s/.test(Ne)||vt.indexOf(Ne)>-1))qt="both";else return mt.Pass;if(!_t)_t=qt;else if(_t!=qt)return mt.Pass}var Ce=ft%2?at.charAt(ft-1):et,Ue=ft%2?et:at.charAt(ft+1);nt.operation(function(){if(_t=="skip")nt.execCommand("goCharRight");else if(_t=="skipThree")for(var Ze=0;Ze<3;Ze++)nt.execCommand("goCharRight");else if(_t=="surround"){for(var tn=nt.getSelections(),Ze=0;Ze<tn.length;Ze++)tn[Ze]=Ce+tn[Ze]+Ue;nt.replaceSelections(tn,"around"),tn=nt.listSelections().slice();for(var Ze=0;Ze<tn.length;Ze++)tn[Ze]=ue(tn[Ze]);nt.setSelections(tn)}else _t=="both"?(nt.replaceSelection(Ce+Ue,null),nt.triggerElectric(Ce+Ue),nt.execCommand("goCharLeft")):_t=="addFour"&&(nt.replaceSelection(Ce+Ce+Ce+Ce,"before"),nt.execCommand("goCharRight"))})}function ve(nt,et){var ht=nt.getRange(Zt(et.line,et.ch-1),Zt(et.line,et.ch+1));return ht.length==2?ht:null}function At(nt,et){var ht=nt.getTokenAt(Zt(et.line,et.ch+1));return/\bstring/.test(ht.type)&&ht.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(xn,vn,Pt){(function(mt){mt(Pt(89780),Pt(32855))})(function(mt){mt.defineOption("autoCloseTags",!1,function(ge,Kt,ue){if(ue!=mt.Init&&ue&&ge.removeKeyMap("autoCloseTags"),!!Kt){var de={name:"autoCloseTags"};(typeof Kt!="object"||Kt.whenClosing!==!1)&&(de["'/'"]=function(ve){return he(ve)}),(typeof Kt!="object"||Kt.whenOpening!==!1)&&(de["'>'"]=function(ve){return we(ve)}),ge.addKeyMap(de)}});var It=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Zt=["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 we(ge){if(ge.getOption("disableInput"))return mt.Pass;for(var Kt=ge.listSelections(),ue=[],de=ge.getOption("autoCloseTags"),ve=0;ve<Kt.length;ve++){if(!Kt[ve].empty())return mt.Pass;var At=Kt[ve].head,nt=ge.getTokenAt(At),et=mt.innerMode(ge.getMode(),nt.state),ht=et.state,at=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(ht),ft=at&&at.name;if(!ft)return mt.Pass;var vt=et.mode.configuration=="html",Ct=typeof de=="object"&&de.dontCloseTags||vt&&It,Bt=typeof de=="object"&&de.indentTags||vt&&Zt;nt.end>At.ch&&(ft=ft.slice(0,ft.length-nt.end+At.ch));var Ft=ft.toLowerCase();if(!ft||nt.type=="string"&&(nt.end!=At.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&at.close||nt.string.indexOf("/")==At.ch-nt.start-1||Ct&&Rt(Ct,Ft)>-1||be(ge,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ht)||[],ft,At,!0))return mt.Pass;var Ot=typeof de=="object"&&de.emptyTags;if(Ot&&Rt(Ot,ft)>-1){ue[ve]={text:"/>",newPos:mt.Pos(At.line,At.ch+2)};continue}var _t=Bt&&Rt(Bt,Ft)>-1;ue[ve]={indent:_t,text:">"+(_t?`
`:"")+"</"+ft+">",newPos:_t?mt.Pos(At.line+1,0):mt.Pos(At.line,At.ch+1)}}for(var te=typeof de=="object"&&de.dontIndentOnAutoClose,ve=Kt.length-1;ve>=0;ve--){var Xt=ue[ve];ge.replaceRange(Xt.text,Kt[ve].head,Kt[ve].anchor,"+insert");var Me=ge.listSelections().slice(0);Me[ve]={head:Xt.newPos,anchor:Xt.newPos},ge.setSelections(Me),!te&&Xt.indent&&(ge.indentLine(Xt.newPos.line,null,!0),ge.indentLine(Xt.newPos.line+1,null,!0))}}function Ht(ge,Kt){for(var ue=ge.listSelections(),de=[],ve=Kt?"/":"</",At=ge.getOption("autoCloseTags"),nt=typeof At=="object"&&At.dontIndentOnSlash,et=0;et<ue.length;et++){if(!ue[et].empty())return mt.Pass;var ht=ue[et].head,at=ge.getTokenAt(ht),ft=mt.innerMode(ge.getMode(),at.state),vt=ft.state;if(Kt&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=ht.ch-1))return mt.Pass;var Ct,Bt=ft.mode.name!="xml"&&ge.getMode().name=="htmlmixed";if(Bt&&ft.mode.name=="javascript")Ct=ve+"script";else if(Bt&&ft.mode.name=="css")Ct=ve+"style";else{var Ft=ft.mode.xmlCurrentContext&&ft.mode.xmlCurrentContext(vt);if(!Ft||Ft.length&&be(ge,Ft,Ft[Ft.length-1],ht))return mt.Pass;Ct=ve+Ft[Ft.length-1]}ge.getLine(ht.line).charAt(at.end)!=">"&&(Ct+=">"),de[et]=Ct}if(ge.replaceSelections(de),ue=ge.listSelections(),!nt)for(var et=0;et<ue.length;et++)(et==ue.length-1||ue[et].head.line<ue[et+1].head.line)&&ge.indentLine(ue[et].head.line)}function he(ge){return ge.getOption("disableInput")?mt.Pass:Ht(ge,!0)}mt.commands.closeTag=function(ge){return Ht(ge)};function Rt(ge,Kt){if(ge.indexOf)return ge.indexOf(Kt);for(var ue=0,de=ge.length;ue<de;++ue)if(ge[ue]==Kt)return ue;return-1}function be(ge,Kt,ue,de,ve){if(!mt.scanForClosingTag)return!1;var At=Math.min(ge.lastLine()+1,de.line+500),nt=mt.scanForClosingTag(ge,de,null,At);if(!nt||nt.tag!=ue)return!1;for(var et=ve?1:0,ht=Kt.length-1;ht>=0&&Kt[ht]==ue;ht--)++et;de=nt.to;for(var ht=1;ht<et;ht++){var at=mt.scanForClosingTag(ge,de,null,At);if(!at||at.tag!=ue)return!1;de=at.to}return!0}})},32855:function(xn,vn,Pt){(function(mt){mt(Pt(89780))})(function(mt){"use strict";var It=mt.Pos;function Zt(ht,at){return ht.line-at.line||ht.ch-at.ch}var we="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",Ht=we+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",he=new RegExp("<(/?)(["+we+"]["+Ht+"]*)","g");function Rt(ht,at,ft,vt){this.line=at,this.ch=ft,this.cm=ht,this.text=ht.getLine(at),this.min=vt?Math.max(vt.from,ht.firstLine()):ht.firstLine(),this.max=vt?Math.min(vt.to-1,ht.lastLine()):ht.lastLine()}function be(ht,at){var ft=ht.cm.getTokenTypeAt(It(ht.line,at));return ft&&/\btag\b/.test(ft)}function ge(ht){if(!(ht.line>=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function Kt(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function ue(ht){for(;;){var at=ht.text.indexOf(">",ht.ch);if(at==-1){if(ge(ht))continue;return}if(!be(ht,at+1)){ht.ch=at+1;continue}var ft=ht.text.lastIndexOf("/",at),vt=ft>-1&&!/\S/.test(ht.text.slice(ft+1,at));return ht.ch=at+1,vt?"selfClose":"regular"}}function de(ht){for(;;){var at=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(at==-1){if(Kt(ht))continue;return}if(!be(ht,at+1)){ht.ch=at;continue}he.lastIndex=at,ht.ch=at;var ft=he.exec(ht.text);if(ft&&ft.index==at)return ft}}function ve(ht){for(;;){he.lastIndex=ht.ch;var at=he.exec(ht.text);if(!at){if(ge(ht))continue;return}if(!be(ht,at.index+1)){ht.ch=at.index+1;continue}return ht.ch=at.index+at[0].length,at}}function At(ht){for(;;){var at=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(at==-1){if(Kt(ht))continue;return}if(!be(ht,at+1)){ht.ch=at;continue}var ft=ht.text.lastIndexOf("/",at),vt=ft>-1&&!/\S/.test(ht.text.slice(ft+1,at));return ht.ch=at+1,vt?"selfClose":"regular"}}function nt(ht,at){for(var ft=[];;){var vt=ve(ht),Ct,Bt=ht.line,Ft=ht.ch-(vt?vt[0].length:0);if(!vt||!(Ct=ue(ht)))return;if(Ct!="selfClose")if(vt[1]){for(var Ot=ft.length-1;Ot>=0;--Ot)if(ft[Ot]==vt[2]){ft.length=Ot;break}if(Ot<0&&(!at||at==vt[2]))return{tag:vt[2],from:It(Bt,Ft),to:It(ht.line,ht.ch)}}else ft.push(vt[2])}}function et(ht,at){for(var ft=[];;){var vt=At(ht);if(!vt)return;if(vt=="selfClose"){de(ht);continue}var Ct=ht.line,Bt=ht.ch,Ft=de(ht);if(!Ft)return;if(Ft[1])ft.push(Ft[2]);else{for(var Ot=ft.length-1;Ot>=0;--Ot)if(ft[Ot]==Ft[2]){ft.length=Ot;break}if(Ot<0&&(!at||at==Ft[2]))return{tag:Ft[2],from:It(ht.line,ht.ch),to:It(Ct,Bt)}}}}mt.registerHelper("fold","xml",function(ht,at){for(var ft=new Rt(ht,at.line,0);;){var vt=ve(ft);if(!vt||ft.line!=at.line)return;var Ct=ue(ft);if(!Ct)return;if(!vt[1]&&Ct!="selfClose"){var Bt=It(ft.line,ft.ch),Ft=nt(ft,vt[2]);return Ft&&Zt(Ft.from,Bt)>0?{from:Bt,to:Ft.from}:null}}}),mt.findMatchingTag=function(ht,at,ft){var vt=new Rt(ht,at.line,at.ch,ft);if(!(vt.text.indexOf(">")==-1&&vt.text.indexOf("<")==-1)){var Ct=ue(vt),Bt=Ct&&It(vt.line,vt.ch),Ft=Ct&&de(vt);if(!(!Ct||!Ft||Zt(vt,at)>0)){var Ot={from:It(vt.line,vt.ch),to:Bt,tag:Ft[2]};return Ct=="selfClose"?{open:Ot,close:null,at:"open"}:Ft[1]?{open:et(vt,Ft[2]),close:Ot,at:"close"}:(vt=new Rt(ht,Bt.line,Bt.ch,ft),{open:Ot,close:nt(vt,Ft[2]),at:"open"})}}},mt.findEnclosingTag=function(ht,at,ft,vt){for(var Ct=new Rt(ht,at.line,at.ch,ft);;){var Bt=et(Ct,vt);if(!Bt)break;var Ft=new Rt(ht,at.line,at.ch,ft),Ot=nt(Ft,Bt.tag);if(Ot)return{open:Bt,close:Ot}}},mt.scanForClosingTag=function(ht,at,ft,vt){var Ct=new Rt(ht,at.line,at.ch,vt?{from:0,to:vt}:null);return nt(Ct,ft)}})},89780:function(xn){(function(vn,Pt){xn.exports=Pt()})(this,function(){"use strict";var vn=navigator.userAgent,Pt=navigator.platform,mt=/gecko\/\d/i.test(vn),It=/MSIE \d/.test(vn),Zt=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(vn),we=/Edge\/(\d+)/.exec(vn),Ht=It||Zt||we,he=Ht&&(It?document.documentMode||6:+(we||Zt)[1]),Rt=!we&&/WebKit\//.test(vn),be=Rt&&/Qt\/\d+\.\d+/.test(vn),ge=!we&&/Chrome\//.test(vn),Kt=/Opera\//.test(vn),ue=/Apple Computer/.test(navigator.vendor),de=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(vn),ve=/PhantomJS/.test(vn),At=!we&&/AppleWebKit/.test(vn)&&/Mobile\/\w+/.test(vn),nt=/Android/.test(vn),et=At||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(vn),ht=At||/Mac/.test(Pt),at=/\bCrOS\b/.test(vn),ft=/win/i.test(Pt),vt=Kt&&vn.match(/Version\/(\d*\.\d*)/);vt&&(vt=Number(vt[1])),vt&&vt>=15&&(Kt=!1,Rt=!0);var Ct=ht&&(be||Kt&&(vt==null||vt<12.11)),Bt=mt||Ht&&he>=9;function Ft(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ot=function(it,st){var ct=it.className,dt=Ft(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 te(it,st){return _t(it).appendChild(st)}function Xt(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 Lt=0;Lt<st.length;++Lt)pt.appendChild(st[Lt]);return pt}function Me(it,st,ct,dt){var pt=Xt(it,st,ct,dt);return pt.setAttribute("role","presentation"),pt}var qt;document.createRange?qt=function(it,st,ct,dt){var pt=document.createRange();return pt.setEnd(dt||it,ct),pt.setStart(it,st),pt}:qt=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 Ne(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 ne(){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 Ce(it,st){var ct=it.className;Ft(st).test(ct)||(it.className+=(ct?" ":"")+st)}function Ue(it,st){for(var ct=it.split(" "),dt=0;dt<ct.length;dt++)ct[dt]&&!Ft(ct[dt]).test(st)&&(st+=" "+ct[dt]);return st}var Ze=function(it){it.select()};At?Ze=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:Ht&&(Ze=function(it){try{it.select()}catch(st){}});function tn(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function ln(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 ie(it,st,ct,dt,pt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Lt=dt||0,Dt=pt||0;;){var $t=it.indexOf(" ",Lt);if($t<0||$t>=st)return Dt+(st-Lt);Dt+=$t-Lt,Dt+=ct-Dt%ct,Lt=$t+1}}var Gt=function(){this.id=null,this.f=null,this.time=0,this.handler=tn(this.onTimeout,this)};Gt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Gt.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 Ae(it,st){for(var ct=0;ct<it.length;++ct)if(it[ct]==st)return ct;return-1}var Sn=50,gn={toString:function(){return"CodeMirror.Pass"}},Fe={scroll:!1},Ke={origin:"*mouse"},rn={origin:"+move"};function Fn(it,st,ct){for(var dt=0,pt=0;;){var Lt=it.indexOf(" ",dt);Lt==-1&&(Lt=it.length);var Dt=Lt-dt;if(Lt==it.length||pt+Dt>=st)return dt+Math.min(Dt,st-pt);if(pt+=Lt-dt,pt+=ct-pt%ct,dt=Lt+1,pt>=st)return dt}}var Pn=[""];function We(it){for(;Pn.length<=it;)Pn.push(fe(Pn)+" ");return Pn[it]}function fe(it){return it[it.length-1]}function An(it,st){for(var ct=[],dt=0;dt<it.length;dt++)ct[dt]=st(it[dt],dt);return ct}function Hn(it,st,ct){for(var dt=0,pt=ct(st);dt<it.length&&ct(it[dt])<=pt;)dt++;it.splice(dt,0,st)}function un(){}function De(it,st){var ct;return Object.create?ct=Object.create(it):(un.prototype=it,ct=new un),st&&ln(st,ct),ct}var He=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ee(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||He.test(it))}function Jt(it,st){return st?st.source.indexOf("\\w")>-1&&Ee(it)?!0:st.test(it):Ee(it)}function ye(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var Re=/[\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 Be(it){return it.charCodeAt(0)>=768&&Re.test(it)}function Qt(it,st,ct){for(;(ct<0?st>0:st<it.length)&&Be(it.charAt(st));)st+=ct;return st}function ce(it,st,ct){for(var dt=st>ct?-1:1;;){if(st==ct)return st;var pt=(st+ct)/2,Lt=dt<0?Math.ceil(pt):Math.floor(pt);if(Lt==st)return it(Lt)?st:ct;it(Lt)?ct=Lt:st=Lt+dt}}function Tt(it,st,ct,dt){if(!it)return dt(st,ct,"ltr",0);for(var pt=!1,Lt=0;Lt<it.length;++Lt){var Dt=it[Lt];(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",Lt),pt=!0)}pt||dt(st,ct,"ltr")}var xt=null;function yt(it,st,ct){var dt;xt=null;for(var pt=0;pt<it.length;++pt){var Lt=it[pt];if(Lt.from<st&&Lt.to>st)return pt;Lt.to==st&&(Lt.from!=Lt.to&&ct=="before"?dt=pt:xt=pt),Lt.from==st&&(Lt.from!=Lt.to&&ct!="before"?dt=pt:xt=pt)}return dt!=null?dt:xt}var kt=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(le){return le<=247?it.charAt(le):1424<=le&&le<=1524?"R":1536<=le&&le<=1785?st.charAt(le-1536):1774<=le&&le<=2220?"r":8192<=le&&le<=8203?"w":le==8204?"b":"L"}var dt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,Lt=/[LRr]/,Dt=/[Lb1n]/,$t=/[1n]/;function Vt(le,Ye,Pe){this.level=le,this.from=Ye,this.to=Pe}return function(le,Ye){var Pe=Ye=="ltr"?"L":"R";if(le.length==0||Ye=="ltr"&&!dt.test(le))return!1;for(var wn=le.length,yn=[],Xn=0;Xn<wn;++Xn)yn.push(ct(le.charCodeAt(Xn)));for(var ti=0,mi=Pe;ti<wn;++ti){var Mi=yn[ti];Mi=="m"?yn[ti]=mi:mi=Mi}for(var ro=0,Zi=Pe;ro<wn;++ro){var ho=yn[ro];ho=="1"&&Zi=="r"?yn[ro]="n":Lt.test(ho)&&(Zi=ho,ho=="r"&&(yn[ro]="R"))}for(var Zo=1,zi=yn[0];Zo<wn-1;++Zo){var ur=yn[Zo];ur=="+"&&zi=="1"&&yn[Zo+1]=="1"?yn[Zo]="1":ur==","&&zi==yn[Zo+1]&&(zi=="1"||zi=="n")&&(yn[Zo]=zi),zi=ur}for(var rs=0;rs<wn;++rs){var Zs=yn[rs];if(Zs==",")yn[rs]="N";else if(Zs=="%"){var ms=void 0;for(ms=rs+1;ms<wn&&yn[ms]=="%";++ms);for(var Ya=rs&&yn[rs-1]=="!"||ms<wn&&yn[ms]=="1"?"1":"N",ba=rs;ba<ms;++ba)yn[ba]=Ya;rs=ms-1}}for(var Rs=0,ll=Pe;Rs<wn;++Rs){var va=yn[Rs];ll=="L"&&va=="1"?yn[Rs]="L":Lt.test(va)&&(ll=va)}for(var js=0;js<wn;++js)if(pt.test(yn[js])){var Nr=void 0;for(Nr=js+1;Nr<wn&&pt.test(yn[Nr]);++Nr);for(var Ss=(js?yn[js-1]:Pe)=="L",ea=(Nr<wn?yn[Nr]:Pe)=="L",ya=Ss==ea?Ss?"L":"R":Pe,Ul=js;Ul<Nr;++Ul)yn[Ul]=ya;js=Nr-1}for(var vs=[],Dl,Es=0;Es<wn;)if(Dt.test(yn[Es])){var kc=Es;for(++Es;Es<wn&&Dt.test(yn[Es]);++Es);vs.push(new Vt(0,kc,Es))}else{var Pl=Es,ul=vs.length,Xa=Ye=="rtl"?1:0;for(++Es;Es<wn&&yn[Es]!="L";++Es);for(var Xr=Pl;Xr<Es;)if($t.test(yn[Xr])){Pl<Xr&&(vs.splice(ul,0,new Vt(1,Pl,Xr)),ul+=Xa);var na=Xr;for(++Xr;Xr<Es&&$t.test(yn[Xr]);++Xr);vs.splice(ul,0,new Vt(2,na,Xr)),ul+=Xa,Pl=Xr}else++Xr;Pl<Es&&vs.splice(ul,0,new Vt(1,Pl,Es))}return Ye=="ltr"&&(vs[0].level==1&&(Dl=le.match(/^\s+/))&&(vs[0].from=Dl[0].length,vs.unshift(new Vt(0,0,Dl[0].length))),fe(vs).level==1&&(Dl=le.match(/\s+$/))&&(fe(vs).to-=Dl[0].length,vs.push(new Vt(0,wn-Dl[0].length,wn)))),Ye=="rtl"?vs.reverse():vs}}();function zt(it,st){var ct=it.order;return ct==null&&(ct=it.order=kt(it.text,st)),ct}var Mt=[],se=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]||Mt).concat(ct)}};function $e(it,st){return it._handlers&&it._handlers[st]||Mt}function cn(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 Lt=Ae(pt,ct);Lt>-1&&(dt[st]=pt.slice(0,Lt).concat(pt.slice(Lt+1)))}}}function sn(it,st){var ct=$e(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 En(it,st,ct){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),sn(it,ct||st.type,it,st),ei(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)Ae(ct,st[dt])==-1&&ct.push(st[dt])}function zn(it,st){return $e(it,st).length>0}function Zn(it){it.prototype.on=function(st,ct){se(this,st,ct)},it.prototype.off=function(st,ct){cn(this,st,ct)}}function $n(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function ni(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function ei(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Bi(it){$n(it),ni(it)}function Ki(it){return it.target||it.srcElement}function jn(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 Tn=function(){if(Ht&&he<9)return!1;var it=Xt("div");return"draggable"in it||"dragDrop"in it}(),In;function li(it){if(In==null){var st=Xt("span","\u200B");te(it,Xt("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(In=st.offsetWidth<=1&&st.offsetHeight>2&&!(Ht&&he<8))}var ct=In?Xt("span","\u200B"):Xt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var gi;function Yi(it){if(gi!=null)return gi;var st=te(it,document.createTextNode("A\u062EA")),ct=qt(st,0,1).getBoundingClientRect(),dt=qt(st,1,2).getBoundingClientRect();return _t(it),!ct||ct.left==ct.right?!1:gi=dt.right-ct.right<3}var Ci=`
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 Lt=it.slice(st,it.charAt(pt-1)=="\r"?pt-1:pt),Dt=Lt.indexOf("\r");Dt!=-1?(ct.push(Lt.slice(0,Dt)),st+=Dt+1):(ct.push(Lt),st=pt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},bt=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},_i=function(){var it=Xt("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Fi=null;function co(it){if(Fi!=null)return Fi;var st=te(it,Xt("span","x")),ct=st.getBoundingClientRect(),dt=qt(st,0,1).getBoundingClientRect();return Fi=Math.abs(ct.left-dt.left)>1}var xo={},Go={};function io(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),xo[it]=st}function ii(it,st){Go[it]=st}function ke(it){if(typeof it=="string"&&Go.hasOwnProperty(it))it=Go[it];else if(it&&typeof it.name=="string"&&Go.hasOwnProperty(it.name)){var st=Go[it.name];typeof st=="string"&&(st={name:st}),it=De(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return ke("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return ke("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Te(it,st){st=ke(st);var ct=xo[st.name];if(!ct)return Te(it,"text/plain");var dt=ct(it,st);if(Le.hasOwnProperty(st.name)){var pt=Le[st.name];for(var Lt in pt)pt.hasOwnProperty(Lt)&&(dt.hasOwnProperty(Lt)&&(dt["_"+Lt]=dt[Lt]),dt[Lt]=pt[Lt])}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 Le={};function re(it,st){var ct=Le.hasOwnProperty(it)?Le[it]:Le[it]={};ln(st,ct)}function nn(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 Qe(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 pe(it,st,ct){return it.startState?it.startState(st,ct):!0}var Yt=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};Yt.prototype.eol=function(){return this.pos>=this.string.length},Yt.prototype.sol=function(){return this.pos==this.lineStart},Yt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Yt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Yt.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},Yt.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},Yt.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Yt.prototype.skipToEnd=function(){this.pos=this.string.length},Yt.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},Yt.prototype.backUp=function(it){this.pos-=it},Yt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ie(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ie(this.string,this.lineStart,this.tabSize):0)},Yt.prototype.indentation=function(){return ie(this.string,null,this.tabSize)-(this.lineStart?ie(this.string,this.lineStart,this.tabSize):0)},Yt.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 Lt=this.string.slice(this.pos).match(it);return Lt&&Lt.index>0?null:(Lt&&st!==!1&&(this.pos+=Lt[0].length),Lt)}},Yt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Yt.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},Yt.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},Yt.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Ve(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],Lt=pt.chunkSize();if(st<Lt){ct=pt;break}st-=Lt}return ct.lines[st]}function en(it,st,ct){var dt=[],pt=st.line;return it.iter(st.line,ct.line+1,function(Lt){var Dt=Lt.text;pt==ct.line&&(Dt=Dt.slice(0,ct.ch)),pt==st.line&&(Dt=Dt.slice(st.ch)),dt.push(Dt),++pt}),dt}function Bn(it,st,ct){var dt=[];return it.iter(st,ct,function(pt){dt.push(pt.text)}),dt}function qe(it,st){var ct=st-it.height;if(ct)for(var dt=it;dt;dt=dt.parent)dt.height+=ct}function xe(it){if(it.parent==null)return null;for(var st=it.parent,ct=Ae(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 an(it,st){var ct=it.first;t:do{for(var dt=0;dt<it.children.length;++dt){var pt=it.children[dt],Lt=pt.height;if(st<Lt){it=pt;continue t}st-=Lt,ct+=pt.chunkSize()}return ct}while(!it.lines);for(var Dt=0;Dt<it.lines.length;++Dt){var $t=it.lines[Dt],Vt=$t.height;if(st<Vt)break;st-=Vt}return ct+Dt}function Mn(it,st){return st>=it.first&&st<it.first+it.size}function Vn(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function _e(it,st,ct){if(ct===void 0&&(ct=null),!(this instanceof _e))return new _e(it,st,ct);this.line=it,this.ch=st,this.sticky=ct}function Je(it,st){return it.line-st.line||it.ch-st.ch}function hi(it,st){return it.sticky==st.sticky&&Je(it,st)==0}function qn(it){return _e(it.line,it.ch)}function vi(it,st){return Je(it,st)<0?st:it}function Kn(it,st){return Je(it,st)<0?it:st}function oi(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function ui(it,st){if(st.line<it.first)return _e(it.first,0);var ct=it.first+it.size-1;return st.line>ct?_e(ct,Ve(it,ct).text.length):xi(st,Ve(it,st.line).text.length)}function xi(it,st){var ct=it.ch;return ct==null||ct>st?_e(it.line,st):ct<0?_e(it.line,0):it}function to(it,st){for(var ct=[],dt=0;dt<st.length;dt++)ct[dt]=ui(it,st[dt]);return ct}var On=function(it,st){this.state=it,this.lookAhead=st},ri=function(it,st,ct,dt){this.state=st,this.doc=it,this.line=ct,this.maxLookAhead=dt||0,this.baseTokens=null,this.baseTokenPos=1};ri.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},ri.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}},ri.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ri.fromSaved=function(it,st,ct){return st instanceof On?new ri(it,nn(it.mode,st.state),ct,st.lookAhead):new ri(it,nn(it.mode,st),ct)},ri.prototype.save=function(it){var st=it!==!1?nn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new On(st,this.maxLookAhead):st};function lo(it,st,ct,dt){var pt=[it.state.modeGen],Lt={};fo(it,st.text,it.doc.mode,ct,function(le,Ye){return pt.push(le,Ye)},Lt,dt);for(var Dt=ct.state,$t=function(le){ct.baseTokens=pt;var Ye=it.state.overlays[le],Pe=1,wn=0;ct.state=!0,fo(it,st.text,Ye.mode,ct,function(yn,Xn){for(var ti=Pe;wn<yn;){var mi=pt[Pe];mi>yn&&pt.splice(Pe,1,yn,pt[Pe+1],mi),Pe+=2,wn=Math.min(yn,mi)}if(Xn)if(Ye.opaque)pt.splice(ti,Pe-ti,yn,"overlay "+Xn),Pe=ti+2;else for(;ti<Pe;ti+=2){var Mi=pt[ti+1];pt[ti+1]=(Mi?Mi+" ":"")+"overlay "+Xn}},Lt),ct.state=Dt,ct.baseTokens=null,ct.baseTokenPos=1},Vt=0;Vt<it.state.overlays.length;++Vt)$t(Vt);return{styles:pt,classes:Lt.bgClass||Lt.textClass?Lt:null}}function Ao(it,st,ct){if(!st.styles||st.styles[0]!=it.state.modeGen){var dt=Ii(it,xe(st)),pt=st.text.length>it.options.maxHighlightLength&&nn(it.doc.mode,dt.state),Lt=lo(it,st,dt);pt&&(dt.state=pt),st.stateAfter=dt.save(!pt),st.styles=Lt.styles,Lt.classes?st.styleClasses=Lt.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 Ii(it,st,ct){var dt=it.doc,pt=it.display;if(!dt.mode.startState)return new ri(dt,!0,st);var Lt=Hi(it,st,ct),Dt=Lt>dt.first&&Ve(dt,Lt-1).stateAfter,$t=Dt?ri.fromSaved(dt,Dt,Lt):new ri(dt,pe(dt.mode),Lt);return dt.iter(Lt,st,function(Vt){Oe(it,Vt.text,$t);var le=$t.line;Vt.stateAfter=le==st-1||le%5==0||le>=pt.viewFrom&&le<pt.viewTo?$t.save():null,$t.nextLine()}),ct&&(dt.modeFrontier=$t.line),$t}function Oe(it,st,ct,dt){var pt=it.doc.mode,Lt=new Yt(st,it.options.tabSize,ct);for(Lt.start=Lt.pos=dt||0,st==""&&Wn(pt,ct.state);!Lt.eol();)yi(pt,Lt,ct.state),Lt.start=Lt.pos}function Wn(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ct=Qe(it,st);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function yi(it,st,ct,dt){for(var pt=0;pt<10;pt++){dt&&(dt[0]=Qe(it,ct).mode);var Lt=it.token(st,ct);if(st.pos>st.start)return Lt}throw new Error("Mode "+it.name+" failed to advance stream.")}var di=function(it,st,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ct};function no(it,st,ct,dt){var pt=it.doc,Lt=pt.mode,Dt;st=ui(pt,st);var $t=Ve(pt,st.line),Vt=Ii(it,st.line,ct),le=new Yt($t.text,it.options.tabSize,Vt),Ye;for(dt&&(Ye=[]);(dt||le.pos<st.ch)&&!le.eol();)le.start=le.pos,Dt=yi(Lt,le,Vt.state),dt&&Ye.push(new di(le,Dt,nn(pt.mode,Vt.state)));return dt?Ye:new di(le,Dt,Vt.state)}function ji(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 fo(it,st,ct,dt,pt,Lt,Dt){var $t=ct.flattenSpans;$t==null&&($t=it.options.flattenSpans);var Vt=0,le=null,Ye=new Yt(st,it.options.tabSize,dt),Pe,wn=it.options.addModeClass&&[null];for(st==""&&ji(Wn(ct,dt.state),Lt);!Ye.eol();){if(Ye.pos>it.options.maxHighlightLength?($t=!1,Dt&&Oe(it,st,dt,Ye.pos),Ye.pos=st.length,Pe=null):Pe=ji(yi(ct,Ye,dt.state,wn),Lt),wn){var yn=wn[0].name;yn&&(Pe="m-"+(Pe?yn+" "+Pe:yn))}if(!$t||le!=Pe){for(;Vt<Ye.start;)Vt=Math.min(Ye.start,Vt+5e3),pt(Vt,le);le=Pe}Ye.start=Ye.pos}for(;Vt<Ye.pos;){var Xn=Math.min(Ye.pos,Vt+5e3);pt(Xn,le),Vt=Xn}}function Hi(it,st,ct){for(var dt,pt,Lt=it.doc,Dt=ct?-1:st-(it.doc.mode.innerMode?1e3:100),$t=st;$t>Dt;--$t){if($t<=Lt.first)return Lt.first;var Vt=Ve(Lt,$t-1),le=Vt.stateAfter;if(le&&(!ct||$t+(le instanceof On?le.lookAhead:0)<=Lt.modeFrontier))return $t;var Ye=ie(Vt.text,null,it.options.tabSize);(pt==null||dt>Ye)&&(pt=$t-1,dt=Ye)}return pt}function Ti(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=Ve(it,dt).stateAfter;if(pt&&(!(pt instanceof On)||dt+pt.lookAhead<st)){ct=dt+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ct)}}var Po=!1,pn=!1;function Vo(){Po=!0}function mn(){pn=!0}function po(it,st,ct){this.marker=it,this.from=st,this.to=ct}function vr(it,st){if(it)for(var ct=0;ct<it.length;++ct){var dt=it[ct];if(dt.marker==st)return dt}}function Si(it,st){for(var ct,dt=0;dt<it.length;++dt)it[dt]!=st&&(ct||(ct=[])).push(it[dt]);return ct}function Dr(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function hr(it,st,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var Lt=it[pt],Dt=Lt.marker,$t=Lt.from==null||(Dt.inclusiveLeft?Lt.from<=st:Lt.from<st);if($t||Lt.from==st&&Dt.type=="bookmark"&&(!ct||!Lt.marker.insertLeft)){var Vt=Lt.to==null||(Dt.inclusiveRight?Lt.to>=st:Lt.to>st);(dt||(dt=[])).push(new po(Dt,Lt.from,Vt?null:Lt.to))}}return dt}function ki(it,st,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var Lt=it[pt],Dt=Lt.marker,$t=Lt.to==null||(Dt.inclusiveRight?Lt.to>=st:Lt.to>st);if($t||Lt.from==st&&Dt.type=="bookmark"&&(!ct||Lt.marker.insertLeft)){var Vt=Lt.from==null||(Dt.inclusiveLeft?Lt.from<=st:Lt.from<st);(dt||(dt=[])).push(new po(Dt,Vt?null:Lt.from-st,Lt.to==null?null:Lt.to-st))}}return dt}function Oi(it,st){if(st.full)return null;var ct=Mn(it,st.from.line)&&Ve(it,st.from.line).markedSpans,dt=Mn(it,st.to.line)&&Ve(it,st.to.line).markedSpans;if(!ct&&!dt)return null;var pt=st.from.ch,Lt=st.to.ch,Dt=Je(st.from,st.to)==0,$t=hr(ct,pt,Dt),Vt=ki(dt,Lt,Dt),le=st.text.length==1,Ye=fe(st.text).length+(le?pt:0);if($t)for(var Pe=0;Pe<$t.length;++Pe){var wn=$t[Pe];if(wn.to==null){var yn=vr(Vt,wn.marker);yn?le&&(wn.to=yn.to==null?null:yn.to+Ye):wn.to=pt}}if(Vt)for(var Xn=0;Xn<Vt.length;++Xn){var ti=Vt[Xn];if(ti.to!=null&&(ti.to+=Ye),ti.from==null){var mi=vr($t,ti.marker);mi||(ti.from=Ye,le&&($t||($t=[])).push(ti))}else ti.from+=Ye,le&&($t||($t=[])).push(ti)}$t&&($t=bo($t)),Vt&&Vt!=$t&&(Vt=bo(Vt));var Mi=[$t];if(!le){var ro=st.text.length-2,Zi;if(ro>0&&$t)for(var ho=0;ho<$t.length;++ho)$t[ho].to==null&&(Zi||(Zi=[])).push(new po($t[ho].marker,null,null));for(var Zo=0;Zo<ro;++Zo)Mi.push(Zi);Mi.push(Vt)}return Mi}function bo(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 Oo(it,st,ct){var dt=null;if(it.iter(st.line,ct.line+1,function(yn){if(yn.markedSpans)for(var Xn=0;Xn<yn.markedSpans.length;++Xn){var ti=yn.markedSpans[Xn].marker;ti.readOnly&&(!dt||Ae(dt,ti)==-1)&&(dt||(dt=[])).push(ti)}}),!dt)return null;for(var pt=[{from:st,to:ct}],Lt=0;Lt<dt.length;++Lt)for(var Dt=dt[Lt],$t=Dt.find(0),Vt=0;Vt<pt.length;++Vt){var le=pt[Vt];if(!(Je(le.to,$t.from)<0||Je(le.from,$t.to)>0)){var Ye=[Vt,1],Pe=Je(le.from,$t.from),wn=Je(le.to,$t.to);(Pe<0||!Dt.inclusiveLeft&&!Pe)&&Ye.push({from:le.from,to:$t.from}),(wn>0||!Dt.inclusiveRight&&!wn)&&Ye.push({from:$t.to,to:le.to}),pt.splice.apply(pt,Ye),Vt+=Ye.length-3}}return pt}function Yn(it){var st=it.markedSpans;if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.detachLine(it);it.markedSpans=null}}function Wt(it,st){if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.attachLine(it);it.markedSpans=st}}function Fo(it){return it.inclusiveLeft?-1:0}function br(it){return it.inclusiveRight?1:0}function Fr(it,st){var ct=it.lines.length-st.lines.length;if(ct!=0)return ct;var dt=it.find(),pt=st.find(),Lt=Je(dt.from,pt.from)||Fo(it)-Fo(st);if(Lt)return-Lt;var Dt=Je(dt.to,pt.to)||br(it)-br(st);return Dt||st.id-it.id}function qr(it,st){var ct=pn&&it.markedSpans,dt;if(ct)for(var pt=void 0,Lt=0;Lt<ct.length;++Lt)pt=ct[Lt],pt.marker.collapsed&&(st?pt.from:pt.to)==null&&(!dt||Fr(dt,pt.marker)<0)&&(dt=pt.marker);return dt}function eo(it){return qr(it,!0)}function $i(it){return qr(it,!1)}function Do(it,st){var ct=pn&&it.markedSpans,dt;if(ct)for(var pt=0;pt<ct.length;++pt){var Lt=ct[pt];Lt.marker.collapsed&&(Lt.from==null||Lt.from<st)&&(Lt.to==null||Lt.to>st)&&(!dt||Fr(dt,Lt.marker)<0)&&(dt=Lt.marker)}return dt}function ir(it,st,ct,dt,pt){var Lt=Ve(it,st),Dt=pn&&Lt.markedSpans;if(Dt)for(var $t=0;$t<Dt.length;++$t){var Vt=Dt[$t];if(Vt.marker.collapsed){var le=Vt.marker.find(0),Ye=Je(le.from,ct)||Fo(Vt.marker)-Fo(pt),Pe=Je(le.to,dt)||br(Vt.marker)-br(pt);if(!(Ye>=0&&Pe<=0||Ye<=0&&Pe>=0)&&(Ye<=0&&(Vt.marker.inclusiveRight&&pt.inclusiveLeft?Je(le.to,ct)>=0:Je(le.to,ct)>0)||Ye>=0&&(Vt.marker.inclusiveRight&&pt.inclusiveLeft?Je(le.from,dt)<=0:Je(le.from,dt)<0)))return!0}}}function uo(it){for(var st;st=eo(it);)it=st.find(-1,!0).line;return it}function yr(it){for(var st;st=$i(it);)it=st.find(1,!0).line;return it}function Vi(it){for(var st,ct;st=$i(it);)it=st.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function Ni(it,st){var ct=Ve(it,st),dt=uo(ct);return ct==dt?st:xe(dt)}function Ji(it,st){if(st>it.lastLine())return st;var ct=Ve(it,st),dt;if(!Nn(it,ct))return st;for(;dt=$i(ct);)ct=dt.find(1,!0).line;return xe(ct)+1}function Nn(it,st){var ct=pn&&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&&Ro(it,st,dt))return!0}}}function Ro(it,st,ct){if(ct.to==null){var dt=ct.marker.find(1,!0);return Ro(it,dt.line,vr(dt.line.markedSpans,ct.marker))}if(ct.marker.inclusiveRight&&ct.to==st.text.length)return!0;for(var pt=void 0,Lt=0;Lt<st.markedSpans.length;++Lt)if(pt=st.markedSpans[Lt],pt.marker.collapsed&&!pt.marker.widgetNode&&pt.from==ct.to&&(pt.to==null||pt.to!=ct.from)&&(pt.marker.inclusiveLeft||ct.marker.inclusiveRight)&&Ro(it,st,pt))return!0}function or(it){it=uo(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 Lt=ct.parent;Lt;ct=Lt,Lt=ct.parent)for(var Dt=0;Dt<Lt.children.length;++Dt){var $t=Lt.children[Dt];if($t==ct)break;st+=$t.height}return st}function Ir(it){if(it.height==0)return 0;for(var st=it.text.length,ct,dt=it;ct=eo(dt);){var pt=ct.find(0,!0);dt=pt.from.line,st+=pt.from.ch-pt.to.ch}for(dt=it;ct=$i(dt);){var Lt=ct.find(0,!0);st-=dt.text.length-Lt.from.ch,dt=Lt.to.line,st+=dt.text.length-Lt.to.ch}return st}function pr(it){var st=it.display,ct=it.doc;st.maxLine=Ve(ct,ct.first),st.maxLineLength=Ir(st.maxLine),st.maxLineChanged=!0,ct.iter(function(dt){var pt=Ir(dt);pt>st.maxLineLength&&(st.maxLineLength=pt,st.maxLine=dt)})}var Br=function(it,st,ct){this.text=it,Wt(this,st),this.height=ct?ct(this):1};Br.prototype.lineNo=function(){return xe(this)},Zn(Br);function ts(it,st,ct,dt){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Yn(it),Wt(it,ct);var pt=dt?dt(it):1;pt!=it.height&&qe(it,pt)}function Ns(it){it.parent=null,Yn(it)}var ks={},ca={};function Ts(it,st){if(!it||/^\s*$/.test(it))return null;var ct=st.addModeClass?ca:ks;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function on(it,st){var ct=Me("span",null,null,Rt?"padding-right: .1px":null),dt={pre:Me("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 Lt=pt?st.rest[pt-1]:st.line,Dt=void 0;dt.pos=0,dt.addToken=ka,Yi(it.display.measure)&&(Dt=zt(Lt,it.doc.direction))&&(dt.addToken=cs(dt.addToken,Dt)),dt.map=[];var $t=st!=it.display.externalMeasured&&xe(Lt);nu(Lt,dt,Ao(it,Lt,$t)),Lt.styleClasses&&(Lt.styleClasses.bgClass&&(dt.bgClass=Ue(Lt.styleClasses.bgClass,dt.bgClass||"")),Lt.styleClasses.textClass&&(dt.textClass=Ue(Lt.styleClasses.textClass,dt.textClass||""))),dt.map.length==0&&dt.map.push(0,0,dt.content.appendChild(li(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(Rt){var Vt=dt.content.lastChild;(/\bcm-tab\b/.test(Vt.className)||Vt.querySelector&&Vt.querySelector(".cm-tab"))&&(dt.content.className="cm-tab-wrap-hack")}return sn(it,"renderLine",it,st.line,dt.pre),dt.pre.className&&(dt.textClass=Ue(dt.pre.className,dt.textClass||"")),dt}function ds(it){var st=Xt("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function ka(it,st,ct,dt,pt,Lt,Dt){if(st){var $t=it.splitSpaces?el(st,it.trailingSpace):st,Vt=it.cm.state.specialChars,le=!1,Ye;if(!Vt.test(st))it.col+=st.length,Ye=document.createTextNode($t),it.map.push(it.pos,it.pos+st.length,Ye),Ht&&he<9&&(le=!0),it.pos+=st.length;else{Ye=document.createDocumentFragment();for(var Pe=0;;){Vt.lastIndex=Pe;var wn=Vt.exec(st),yn=wn?wn.index-Pe:st.length-Pe;if(yn){var Xn=document.createTextNode($t.slice(Pe,Pe+yn));Ht&&he<9?Ye.appendChild(Xt("span",[Xn])):Ye.appendChild(Xn),it.map.push(it.pos,it.pos+yn,Xn),it.col+=yn,it.pos+=yn}if(!wn)break;Pe+=yn+1;var ti=void 0;if(wn[0]==" "){var mi=it.cm.options.tabSize,Mi=mi-it.col%mi;ti=Ye.appendChild(Xt("span",We(Mi),"cm-tab")),ti.setAttribute("role","presentation"),ti.setAttribute("cm-text"," "),it.col+=Mi}else wn[0]=="\r"||wn[0]==`
`?(ti=Ye.appendChild(Xt("span",wn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ti.setAttribute("cm-text",wn[0]),it.col+=1):(ti=it.cm.options.specialCharPlaceholder(wn[0]),ti.setAttribute("cm-text",wn[0]),Ht&&he<9?Ye.appendChild(Xt("span",[ti])):Ye.appendChild(ti),it.col+=1);it.map.push(it.pos,it.pos+1,ti),it.pos++}}if(it.trailingSpace=$t.charCodeAt(st.length-1)==32,ct||dt||pt||le||Lt||Dt){var ro=ct||"";dt&&(ro+=dt),pt&&(ro+=pt);var Zi=Xt("span",[Ye],ro,Lt);if(Dt)for(var ho in Dt)Dt.hasOwnProperty(ho)&&ho!="style"&&ho!="class"&&Zi.setAttribute(ho,Dt[ho]);return it.content.appendChild(Zi)}it.content.appendChild(Ye)}}function el(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ct=st,dt="",pt=0;pt<it.length;pt++){var Lt=it.charAt(pt);Lt==" "&&ct&&(pt==it.length-1||it.charCodeAt(pt+1)==32)&&(Lt="\xA0"),dt+=Lt,ct=Lt==" "}return dt}function cs(it,st){return function(ct,dt,pt,Lt,Dt,$t,Vt){pt=pt?pt+" cm-force-border":"cm-force-border";for(var le=ct.pos,Ye=le+dt.length;;){for(var Pe=void 0,wn=0;wn<st.length&&(Pe=st[wn],!(Pe.to>le&&Pe.from<=le));wn++);if(Pe.to>=Ye)return it(ct,dt,pt,Lt,Dt,$t,Vt);it(ct,dt.slice(0,Pe.to-le),pt,Lt,null,$t,Vt),Lt=null,dt=dt.slice(Pe.to-le),le=Pe.to}}}function Za(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 nu(it,st,ct){var dt=it.markedSpans,pt=it.text,Lt=0;if(!dt){for(var Dt=1;Dt<ct.length;Dt+=2)st.addToken(st,pt.slice(Lt,Lt=ct[Dt]),Ts(ct[Dt+1],st.cm.options));return}for(var $t=pt.length,Vt=0,le=1,Ye="",Pe,wn,yn=0,Xn,ti,mi,Mi,ro;;){if(yn==Vt){Xn=ti=mi=wn="",ro=null,Mi=null,yn=1/0;for(var Zi=[],ho=void 0,Zo=0;Zo<dt.length;++Zo){var zi=dt[Zo],ur=zi.marker;if(ur.type=="bookmark"&&zi.from==Vt&&ur.widgetNode)Zi.push(ur);else if(zi.from<=Vt&&(zi.to==null||zi.to>Vt||ur.collapsed&&zi.to==Vt&&zi.from==Vt)){if(zi.to!=null&&zi.to!=Vt&&yn>zi.to&&(yn=zi.to,ti=""),ur.className&&(Xn+=" "+ur.className),ur.css&&(wn=(wn?wn+";":"")+ur.css),ur.startStyle&&zi.from==Vt&&(mi+=" "+ur.startStyle),ur.endStyle&&zi.to==yn&&(ho||(ho=[])).push(ur.endStyle,zi.to),ur.title&&((ro||(ro={})).title=ur.title),ur.attributes)for(var rs in ur.attributes)(ro||(ro={}))[rs]=ur.attributes[rs];ur.collapsed&&(!Mi||Fr(Mi.marker,ur)<0)&&(Mi=zi)}else zi.from>Vt&&yn>zi.from&&(yn=zi.from)}if(ho)for(var Zs=0;Zs<ho.length;Zs+=2)ho[Zs+1]==yn&&(ti+=" "+ho[Zs]);if(!Mi||Mi.from==Vt)for(var ms=0;ms<Zi.length;++ms)Za(st,0,Zi[ms]);if(Mi&&(Mi.from||0)==Vt){if(Za(st,(Mi.to==null?$t+1:Mi.to)-Vt,Mi.marker,Mi.from==null),Mi.to==null)return;Mi.to==Vt&&(Mi=!1)}}if(Vt>=$t)break;for(var Ya=Math.min($t,yn);;){if(Ye){var ba=Vt+Ye.length;if(!Mi){var Rs=ba>Ya?Ye.slice(0,Ya-Vt):Ye;st.addToken(st,Rs,Pe?Pe+Xn:Xn,mi,Vt+Rs.length==yn?ti:"",wn,ro)}if(ba>=Ya){Ye=Ye.slice(Ya-Vt),Vt=Ya;break}Vt=ba,mi=""}Ye=pt.slice(Lt,Lt=ct[le++]),Pe=Ts(ct[le++],st.cm.options)}}}function Zl(it,st,ct){this.line=st,this.rest=Vi(st),this.size=this.rest?xe(fe(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=Nn(it,st)}function Mr(it,st,ct){for(var dt=[],pt,Lt=st;Lt<ct;Lt=pt){var Dt=new Zl(it.doc,Ve(it.doc,Lt),Lt);pt=Lt+Dt.size,dt.push(Dt)}return dt}var _o=null;function _s(it){_o?_o.ops.push(it):it.ownsGroup=_o={ops:[it],delayedCallbacks:[]}}function Mo(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 Ko(it,st){var ct=it.ownsGroup;if(ct)try{Mo(ct)}finally{_o=null,st(ct)}}var To=null;function ci(it,st){var ct=$e(it,st);if(ct.length){var dt=Array.prototype.slice.call(arguments,2),pt;_o?pt=_o.delayedCallbacks:To?pt=To:(pt=To=[],setTimeout(Ur,0));for(var Lt=function($t){pt.push(function(){return ct[$t].apply(null,dt)})},Dt=0;Dt<ct.length;++Dt)Lt(Dt)}}function Ur(){var it=To;To=null;for(var st=0;st<it.length;++st)it[st]()}function $r(it,st,ct,dt){for(var pt=0;pt<st.changes.length;pt++){var Lt=st.changes[pt];Lt=="text"?Qn(it,st):Lt=="gutter"?is(it,st,ct,dt):Lt=="class"?kr(it,st):Lt=="widget"&&Ta(it,st,dt)}st.changes=null}function ws(it){return it.node==it.text&&(it.node=Xt("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),Ht&&he<8&&(it.node.style.zIndex=2)),it.node}function Aa(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=ws(st);st.background=dt.insertBefore(Xt("div",null,ct),dt.firstChild),it.display.input.setUneditable(st.background)}}function nl(it,st){var ct=it.display.externalMeasured;return ct&&ct.line==st.line?(it.display.externalMeasured=null,st.measure=ct.measure,ct.built):on(it,st)}function Qn(it,st){var ct=st.text.className,dt=nl(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,kr(it,st)):ct&&(st.text.className=ct)}function kr(it,st){Aa(it,st),st.line.wrapClass?ws(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=ws(st);st.gutterBackground=Xt("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 Lt=st.line.gutterMarkers;if(it.options.lineNumbers||Lt){var Dt=ws(st),$t=st.gutter=Xt("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px");if(it.display.input.setUneditable($t),Dt.insertBefore($t,st.text),st.line.gutterClass&&($t.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Lt||!Lt["CodeMirror-linenumbers"])&&(st.lineNumber=$t.appendChild(Xt("div",Vn(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Lt)for(var Vt=0;Vt<it.display.gutterSpecs.length;++Vt){var le=it.display.gutterSpecs[Vt].className,Ye=Lt.hasOwnProperty(le)&&Lt[le];Ye&&$t.appendChild(Xt("div",[Ye],"CodeMirror-gutter-elt","left: "+dt.gutterLeft[le]+"px; width: "+dt.gutterWidth[le]+"px"))}}}function Ta(it,st,ct){st.alignable&&(st.alignable=null);for(var dt=Ft("CodeMirror-linewidget"),pt=st.node.firstChild,Lt=void 0;pt;pt=Lt)Lt=pt.nextSibling,dt.test(pt.className)&&st.node.removeChild(pt);Va(it,st,ct)}function iu(it,st,ct,dt){var pt=nl(it,st);return st.text=st.node=pt.pre,pt.bgClass&&(st.bgClass=pt.bgClass),pt.textClass&&(st.textClass=pt.textClass),kr(it,st),is(it,st,ct,dt),Va(it,st,dt),st.node}function Va(it,st,ct){if(wo(it,st.line,st,ct,!0),st.rest)for(var dt=0;dt<st.rest.length;dt++)wo(it,st.rest[dt],st,ct,!1)}function wo(it,st,ct,dt,pt){if(st.widgets)for(var Lt=ws(ct),Dt=0,$t=st.widgets;Dt<$t.length;++Dt){var Vt=$t[Dt],le=Xt("div",[Vt.node],"CodeMirror-linewidget"+(Vt.className?" "+Vt.className:""));Vt.handleMouseEvents||le.setAttribute("cm-ignore-events","true"),Ru(Vt,le,ct,dt),it.display.input.setUneditable(le),pt&&Vt.above?Lt.insertBefore(le,ct.gutter||ct.text):Lt.appendChild(le),ci(Vt,"redraw")}}function Ru(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 bs(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!Ne(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;"),te(st.display.measure,Xt("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function fa(it,st){for(var ct=Ki(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 Hs(it){return it.lineSpace.offsetTop}function Bl(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function ou(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=te(it.measure,Xt("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 ga(it){return Sn-it.display.nativeBarWidth}function Oa(it){return it.display.scroller.clientWidth-ga(it)-it.display.barWidth}function yu(it){return it.display.scroller.clientHeight-ga(it)-it.display.barHeight}function ih(it,st,ct){var dt=it.options.lineWrapping,pt=dt&&Oa(it);if(!st.measure.heights||dt&&st.measure.width!=pt){var Lt=st.measure.heights=[];if(dt){st.measure.width=pt;for(var Dt=st.text.firstChild.getClientRects(),$t=0;$t<Dt.length-1;$t++){var Vt=Dt[$t],le=Dt[$t+1];Math.abs(Vt.bottom-le.bottom)>2&&Lt.push((Vt.bottom+le.top)/2-ct.top)}}Lt.push(ct.bottom-ct.top)}}function ju(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(xe(it.rest[pt])>ct)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function oh(it,st){st=uo(st);var ct=xe(st),dt=it.display.externalMeasured=new Zl(it.doc,st,ct);dt.lineN=ct;var pt=dt.built=on(it,dt);return dt.text=pt.pre,te(it.display.lineMeasure,pt.pre),dt}function Ca(it,st,ct,dt){return il(it,Ks(it,st),ct,dt)}function vl(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[Cs(it,st)];var ct=it.display.externalMeasured;if(ct&&st>=ct.lineN&&st<ct.lineN+ct.size)return ct}function Ks(it,st){var ct=xe(st),dt=vl(it,ct);dt&&!dt.text?dt=null:dt&&dt.changes&&($r(it,dt,ct,jr(it)),it.curOp.forceUpdate=!0),dt||(dt=oh(it,st));var pt=ju(dt,st,ct);return{line:st,view:dt,rect:null,map:pt.map,cache:pt.cache,before:pt.before,hasHeights:!1}}function il(it,st,ct,dt,pt){st.before&&(ct=-1);var Lt=ct+(dt||""),Dt;return st.cache.hasOwnProperty(Lt)?Dt=st.cache[Lt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(ih(it,st.view,st.rect),st.hasHeights=!0),Dt=Ge(it,st,ct,dt),Dt.bogus||(st.cache[Lt]=Dt)),{left:Dt.left,right:Dt.right,top:pt?Dt.rtop:Dt.top,bottom:pt?Dt.rbottom:Dt.bottom}}var rh={left:0,right:0,top:0,bottom:0};function Ie(it,st,ct){for(var dt,pt,Lt,Dt,$t,Vt,le=0;le<it.length;le+=3)if($t=it[le],Vt=it[le+1],st<$t?(pt=0,Lt=1,Dt="left"):st<Vt?(pt=st-$t,Lt=pt+1):(le==it.length-3||st==Vt&&it[le+3]>st)&&(Lt=Vt-$t,pt=Lt-1,st>=Vt&&(Dt="right")),pt!=null){if(dt=it[le+2],$t==Vt&&ct==(dt.insertLeft?"left":"right")&&(Dt=ct),ct=="left"&&pt==0)for(;le&&it[le-2]==it[le-3]&&it[le-1].insertLeft;)dt=it[(le-=3)+2],Dt="left";if(ct=="right"&&pt==Vt-$t)for(;le<it.length-3&&it[le+3]==it[le+4]&&!it[le+5].insertLeft;)dt=it[(le+=3)+2],Dt="right";break}return{node:dt,start:pt,end:Lt,collapse:Dt,coverStart:$t,coverEnd:Vt}}function Xe(it,st){var ct=rh;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 Ge(it,st,ct,dt){var pt=Ie(st.map,ct,dt),Lt=pt.node,Dt=pt.start,$t=pt.end,Vt=pt.collapse,le;if(Lt.nodeType==3){for(var Ye=0;Ye<4;Ye++){for(;Dt&&Be(st.line.text.charAt(pt.coverStart+Dt));)--Dt;for(;pt.coverStart+$t<pt.coverEnd&&Be(st.line.text.charAt(pt.coverStart+$t));)++$t;if(Ht&&he<9&&Dt==0&&$t==pt.coverEnd-pt.coverStart?le=Lt.parentNode.getBoundingClientRect():le=Xe(qt(Lt,Dt,$t).getClientRects(),dt),le.left||le.right||Dt==0)break;$t=Dt,Dt=Dt-1,Vt="right"}Ht&&he<11&&(le=fn(it.display.measure,le))}else{Dt>0&&(Vt=dt="right");var Pe;it.options.lineWrapping&&(Pe=Lt.getClientRects()).length>1?le=Pe[dt=="right"?Pe.length-1:0]:le=Lt.getBoundingClientRect()}if(Ht&&he<9&&!Dt&&(!le||!le.left&&!le.right)){var wn=Lt.parentNode.getClientRects()[0];wn?le={left:wn.left,right:wn.left+rr(it.display),top:wn.top,bottom:wn.bottom}:le=rh}for(var yn=le.top-st.rect.top,Xn=le.bottom-st.rect.top,ti=(yn+Xn)/2,mi=st.view.measure.heights,Mi=0;Mi<mi.length-1&&!(ti<mi[Mi]);Mi++);var ro=Mi?mi[Mi-1]:0,Zi=mi[Mi],ho={left:(Vt=="right"?le.right:le.left)-st.rect.left,right:(Vt=="left"?le.left:le.right)-st.rect.left,top:ro,bottom:Zi};return!le.left&&!le.right&&(ho.bogus=!0),it.options.singleCursorHeightPerLine||(ho.rtop=yn,ho.rbottom=Xn),ho}function fn(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!co(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 oo(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 Ui(it){it.display.externalMeasure=null,_t(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)oo(it.display.view[st])}function mo(it){Ui(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function Ri(){return ge&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Gi(){return ge&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Bo(it){var st=0;if(it.widgets)for(var ct=0;ct<it.widgets.length;++ct)it.widgets[ct].above&&(st+=bs(it.widgets[ct]));return st}function Qi(it,st,ct,dt,pt){if(!pt){var Lt=Bo(st);ct.top+=Lt,ct.bottom+=Lt}if(dt=="line")return ct;dt||(dt="local");var Dt=or(st);if(dt=="local"?Dt+=Hs(it.display):Dt-=it.display.viewOffset,dt=="page"||dt=="window"){var $t=it.display.lineSpace.getBoundingClientRect();Dt+=$t.top+(dt=="window"?0:Gi());var Vt=$t.left+(dt=="window"?0:Ri());ct.left+=Vt,ct.right+=Vt}return ct.top+=Dt,ct.bottom+=Dt,ct}function Uo(it,st,ct){if(ct=="div")return st;var dt=st.left,pt=st.top;if(ct=="page")dt-=Ri(),pt-=Gi();else if(ct=="local"||!ct){var Lt=it.display.sizer.getBoundingClientRect();dt+=Lt.left,pt+=Lt.top}var Dt=it.display.lineSpace.getBoundingClientRect();return{left:dt-Dt.left,top:pt-Dt.top}}function dr(it,st,ct,dt,pt){return dt||(dt=Ve(it.doc,st.line)),Qi(it,dt,Ca(it,dt,st.ch,pt),ct)}function vo(it,st,ct,dt,pt,Lt){dt=dt||Ve(it.doc,st.line),pt||(pt=Ks(it,dt));function Dt(Xn,ti){var mi=il(it,pt,Xn,ti?"right":"left",Lt);return ti?mi.left=mi.right:mi.right=mi.left,Qi(it,dt,mi,ct)}var $t=zt(dt,it.doc.direction),Vt=st.ch,le=st.sticky;if(Vt>=dt.text.length?(Vt=dt.text.length,le="before"):Vt<=0&&(Vt=0,le="after"),!$t)return Dt(le=="before"?Vt-1:Vt,le=="before");function Ye(Xn,ti,mi){var Mi=$t[ti],ro=Mi.level==1;return Dt(mi?Xn-1:Xn,ro!=mi)}var Pe=yt($t,Vt,le),wn=xt,yn=Ye(Vt,Pe,le=="before");return wn!=null&&(yn.other=Ye(Vt,wn,le!="before")),yn}function ko(it,st){var ct=0;st=ui(it.doc,st),it.options.lineWrapping||(ct=rr(it.display)*st.ch);var dt=Ve(it.doc,st.line),pt=or(dt)+Hs(it.display);return{left:ct,right:ct,top:pt,bottom:pt+dt.height}}function Xo(it,st,ct,dt,pt){var Lt=_e(it,st,ct);return Lt.xRel=pt,dt&&(Lt.outside=dt),Lt}function xr(it,st,ct){var dt=it.doc;if(ct+=it.display.viewOffset,ct<0)return Xo(dt.first,0,null,-1,-1);var pt=an(dt,ct),Lt=dt.first+dt.size-1;if(pt>Lt)return Xo(dt.first+dt.size-1,Ve(dt,Lt).text.length,null,1,1);st<0&&(st=0);for(var Dt=Ve(dt,pt);;){var $t=hn(it,Dt,pt,st,ct),Vt=Do(Dt,$t.ch+($t.xRel>0||$t.outside>0?1:0));if(!Vt)return $t;var le=Vt.find(1);if(le.line==pt)return le;Dt=Ve(dt,pt=le.line)}}function fi(it,st,ct,dt){dt-=Bo(st);var pt=st.text.length,Lt=ce(function(Dt){return il(it,ct,Dt-1).bottom<=dt},pt,0);return pt=ce(function(Dt){return il(it,ct,Dt).top>dt},Lt,pt),{begin:Lt,end:pt}}function Ho(it,st,ct,dt){ct||(ct=Ks(it,st));var pt=Qi(it,st,il(it,ct,dt),"line").top;return fi(it,st,ct,pt)}function me(it,st,ct,dt){return it.bottom<=ct?!1:it.top>ct?!0:(dt?it.left:it.right)>st}function hn(it,st,ct,dt,pt){pt-=or(st);var Lt=Ks(it,st),Dt=Bo(st),$t=0,Vt=st.text.length,le=!0,Ye=zt(st,it.doc.direction);if(Ye){var Pe=(it.options.lineWrapping?Co:so)(it,st,ct,Lt,Ye,dt,pt);le=Pe.level!=1,$t=le?Pe.from:Pe.to-1,Vt=le?Pe.to:Pe.from-1}var wn=null,yn=null,Xn=ce(function(Zo){var zi=il(it,Lt,Zo);return zi.top+=Dt,zi.bottom+=Dt,me(zi,dt,pt,!1)?(zi.top<=pt&&zi.left<=dt&&(wn=Zo,yn=zi),!0):!1},$t,Vt),ti,mi,Mi=!1;if(yn){var ro=dt-yn.left<yn.right-dt,Zi=ro==le;Xn=wn+(Zi?0:1),mi=Zi?"after":"before",ti=ro?yn.left:yn.right}else{!le&&(Xn==Vt||Xn==$t)&&Xn++,mi=Xn==0?"after":Xn==st.text.length?"before":il(it,Lt,Xn-(le?1:0)).bottom+Dt<=pt==le?"after":"before";var ho=vo(it,_e(ct,Xn,mi),"line",st,Lt);ti=ho.left,Mi=pt<ho.top?-1:pt>=ho.bottom?1:0}return Xn=Qt(st.text,Xn,1),Xo(ct,Xn,mi,Mi,dt-ti)}function so(it,st,ct,dt,pt,Lt,Dt){var $t=ce(function(Pe){var wn=pt[Pe],yn=wn.level!=1;return me(vo(it,_e(ct,yn?wn.to:wn.from,yn?"before":"after"),"line",st,dt),Lt,Dt,!0)},0,pt.length-1),Vt=pt[$t];if($t>0){var le=Vt.level!=1,Ye=vo(it,_e(ct,le?Vt.from:Vt.to,le?"after":"before"),"line",st,dt);me(Ye,Lt,Dt,!0)&&Ye.top>Dt&&(Vt=pt[$t-1])}return Vt}function Co(it,st,ct,dt,pt,Lt,Dt){var $t=fi(it,st,dt,Dt),Vt=$t.begin,le=$t.end;/\s/.test(st.text.charAt(le-1))&&le--;for(var Ye=null,Pe=null,wn=0;wn<pt.length;wn++){var yn=pt[wn];if(!(yn.from>=le||yn.to<=Vt)){var Xn=yn.level!=1,ti=il(it,dt,Xn?Math.min(le,yn.to)-1:Math.max(Vt,yn.from)).right,mi=ti<Lt?Lt-ti+1e9:ti-Lt;(!Ye||Pe>mi)&&(Ye=yn,Pe=mi)}}return Ye||(Ye=pt[pt.length-1]),Ye.from<Vt&&(Ye={from:Vt,to:Ye.to,level:Ye.level}),Ye.to>le&&(Ye={from:Ye.from,to:le,level:Ye.level}),Ye}var Li;function Wi(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Li==null){Li=Xt("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)Li.appendChild(document.createTextNode("x")),Li.appendChild(Xt("br"));Li.appendChild(document.createTextNode("x"))}te(it.measure,Li);var ct=Li.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),_t(it.measure),ct||1}function rr(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=Xt("span","xxxxxxxxxx"),ct=Xt("pre",[st],"CodeMirror-line-like");te(it.measure,ct);var dt=st.getBoundingClientRect(),pt=(dt.right-dt.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function jr(it){for(var st=it.display,ct={},dt={},pt=st.gutters.clientLeft,Lt=st.gutters.firstChild,Dt=0;Lt;Lt=Lt.nextSibling,++Dt){var $t=it.display.gutterSpecs[Dt].className;ct[$t]=Lt.offsetLeft+Lt.clientLeft+pt,dt[$t]=Lt.clientWidth}return{fixedPos:Vr(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ct,gutterWidth:dt,wrapperWidth:st.wrapper.clientWidth}}function Vr(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function tr(it){var st=Wi(it.display),ct=it.options.lineWrapping,dt=ct&&Math.max(5,it.display.scroller.clientWidth/rr(it.display)-3);return function(pt){if(Nn(it.doc,pt))return 0;var Lt=0;if(pt.widgets)for(var Dt=0;Dt<pt.widgets.length;Dt++)pt.widgets[Dt].height&&(Lt+=pt.widgets[Dt].height);return ct?Lt+(Math.ceil(pt.text.length/dt)||1)*st:Lt+st}}function si(it){var st=it.doc,ct=tr(it);st.iter(function(dt){var pt=ct(dt);pt!=dt.height&&qe(dt,pt)})}function Ar(it,st,ct,dt){var pt=it.display;if(!ct&&Ki(st).getAttribute("cm-not-content")=="true")return null;var Lt,Dt,$t=pt.lineSpace.getBoundingClientRect();try{Lt=st.clientX-$t.left,Dt=st.clientY-$t.top}catch(Pe){return null}var Vt=xr(it,Lt,Dt),le;if(dt&&Vt.xRel>0&&(le=Ve(it.doc,Vt.line).text).length==Vt.ch){var Ye=ie(le,le.length,it.options.tabSize)-le.length;Vt=_e(Vt.line,Math.max(0,Math.round((Lt-ou(it.display).left)/rr(it.display))-Ye))}return Vt}function Cs(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 yo(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)pn&&Ni(it.doc,st)<pt.viewTo&&Wo(it);else if(ct<=pt.viewFrom)pn&&Ji(it.doc,ct+dt)>pt.viewFrom?Wo(it):(pt.viewFrom+=dt,pt.viewTo+=dt);else if(st<=pt.viewFrom&&ct>=pt.viewTo)Wo(it);else if(st<=pt.viewFrom){var Lt=cr(it,ct,ct+dt,1);Lt?(pt.view=pt.view.slice(Lt.index),pt.viewFrom=Lt.lineN,pt.viewTo+=dt):Wo(it)}else if(ct>=pt.viewTo){var Dt=cr(it,st,st,-1);Dt?(pt.view=pt.view.slice(0,Dt.index),pt.viewTo=Dt.lineN):Wo(it)}else{var $t=cr(it,st,st,-1),Vt=cr(it,ct,ct+dt,1);$t&&Vt?(pt.view=pt.view.slice(0,$t.index).concat(Mr(it,$t.lineN,Vt.lineN)).concat(pt.view.slice(Vt.index)),pt.viewTo+=dt):Wo(it)}var le=pt.externalMeasured;le&&(ct<le.lineN?le.lineN+=dt:st<le.lineN+le.size&&(pt.externalMeasured=null))}function Xi(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 Lt=dt.view[Cs(it,st)];if(Lt.node!=null){var Dt=Lt.changes||(Lt.changes=[]);Ae(Dt,ct)==-1&&Dt.push(ct)}}}function Wo(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function cr(it,st,ct,dt){var pt=Cs(it,st),Lt,Dt=it.display.view;if(!pn||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var $t=it.display.viewFrom,Vt=0;Vt<pt;Vt++)$t+=Dt[Vt].size;if($t!=st){if(dt>0){if(pt==Dt.length-1)return null;Lt=$t+Dt[pt].size-st,pt++}else Lt=$t-st;st+=Lt,ct+=Lt}for(;Ni(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 er(it,st,ct){var dt=it.display,pt=dt.view;pt.length==0||st>=dt.viewTo||ct<=dt.viewFrom?(dt.view=Mr(it,st,ct),dt.viewFrom=st):(dt.viewFrom>st?dt.view=Mr(it,st,dt.viewFrom).concat(dt.view):dt.viewFrom<st&&(dt.view=dt.view.slice(Cs(it,st))),dt.viewFrom=st,dt.viewTo<ct?dt.view=dt.view.concat(Mr(it,dt.viewTo,ct)):dt.viewTo>ct&&(dt.view=dt.view.slice(0,Cs(it,ct)))),dt.viewTo=ct}function Os(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 fs(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Nl(it,st){st===void 0&&(st=!0);for(var ct=it.doc,dt={},pt=dt.cursors=document.createDocumentFragment(),Lt=dt.selection=document.createDocumentFragment(),Dt=0;Dt<ct.sel.ranges.length;Dt++)if(!(!st&&Dt==ct.sel.primIndex)){var $t=ct.sel.ranges[Dt];if(!($t.from().line>=it.display.viewTo||$t.to().line<it.display.viewFrom)){var Vt=$t.empty();(Vt||it.options.showCursorWhenSelecting)&&sr(it,$t.head,pt),Vt||ar(it,$t,Lt)}}return dt}function sr(it,st,ct){var dt=vo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),pt=ct.appendChild(Xt("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 Lt=ct.appendChild(Xt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Lt.style.display="",Lt.style.left=dt.other.left+"px",Lt.style.top=dt.other.top+"px",Lt.style.height=(dt.other.bottom-dt.other.top)*.85+"px"}}function Ds(it,st){return it.top-st.top||it.left-st.left}function ar(it,st,ct){var dt=it.display,pt=it.doc,Lt=document.createDocumentFragment(),Dt=ou(it.display),$t=Dt.left,Vt=Math.max(dt.sizerWidth,Oa(it)-dt.sizer.offsetLeft)-Dt.right,le=pt.direction=="ltr";function Ye(Zi,ho,Zo,zi){ho<0&&(ho=0),ho=Math.round(ho),zi=Math.round(zi),Lt.appendChild(Xt("div",null,"CodeMirror-selected","position: absolute; left: "+Zi+`px;
top: `+ho+"px; width: "+(Zo==null?Vt-Zi:Zo)+`px;
height: `+(zi-ho)+"px"))}function Pe(Zi,ho,Zo){var zi=Ve(pt,Zi),ur=zi.text.length,rs,Zs;function ms(Rs,ll){return dr(it,_e(Zi,Rs),"div",zi,ll)}function Ya(Rs,ll,va){var js=Ho(it,zi,null,Rs),Nr=ll=="ltr"==(va=="after")?"left":"right",Ss=va=="after"?js.begin:js.end-(/\s/.test(zi.text.charAt(js.end-1))?2:1);return ms(Ss,Nr)[Nr]}var ba=zt(zi,pt.direction);return Tt(ba,ho||0,Zo==null?ur:Zo,function(Rs,ll,va,js){var Nr=va=="ltr",Ss=ms(Rs,Nr?"left":"right"),ea=ms(ll-1,Nr?"right":"left"),ya=ho==null&&Rs==0,Ul=Zo==null&&ll==ur,vs=js==0,Dl=!ba||js==ba.length-1;if(ea.top-Ss.top<=3){var Es=(le?ya:Ul)&&vs,kc=(le?Ul:ya)&&Dl,Pl=Es?$t:(Nr?Ss:ea).left,ul=kc?Vt:(Nr?ea:Ss).right;Ye(Pl,Ss.top,ul-Pl,Ss.bottom)}else{var Xa,Xr,na,Cu;Nr?(Xa=le&&ya&&vs?$t:Ss.left,Xr=le?Vt:Ya(Rs,va,"before"),na=le?$t:Ya(ll,va,"after"),Cu=le&&Ul&&Dl?Vt:ea.right):(Xa=le?Ya(Rs,va,"before"):$t,Xr=!le&&ya&&vs?Vt:Ss.right,na=!le&&Ul&&Dl?$t:ea.left,Cu=le?Ya(ll,va,"after"):Vt),Ye(Xa,Ss.top,Xr-Xa,Ss.bottom),Ss.bottom<ea.top&&Ye($t,Ss.bottom,null,ea.top),Ye(na,ea.top,Cu-na,ea.bottom)}(!rs||Ds(Ss,rs)<0)&&(rs=Ss),Ds(ea,rs)<0&&(rs=ea),(!Zs||Ds(Ss,Zs)<0)&&(Zs=Ss),Ds(ea,Zs)<0&&(Zs=ea)}),{start:rs,end:Zs}}var wn=st.from(),yn=st.to();if(wn.line==yn.line)Pe(wn.line,wn.ch,yn.ch);else{var Xn=Ve(pt,wn.line),ti=Ve(pt,yn.line),mi=uo(Xn)==uo(ti),Mi=Pe(wn.line,wn.ch,mi?Xn.text.length+1:null).end,ro=Pe(yn.line,mi?0:null,yn.ch).start;mi&&(Mi.top<ro.top-2?(Ye(Mi.right,Mi.top,null,Mi.bottom),Ye($t,ro.top,ro.left,ro.bottom)):Ye(Mi.right,Mi.top,ro.left-Mi.right,Mi.bottom)),Mi.bottom<ro.top&&Ye($t,Mi.bottom,null,ro.top)}ct.appendChild(Lt)}function wr(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()||zu(it),st.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function Rr(it){it.state.focused||(it.display.input.focus(),Sr(it))}function os(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,zu(it))},100)}function Sr(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(sn(it,"focus",it,st),it.state.focused=!0,Ce(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),Rt&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),wr(it))}function zu(it,st){it.state.delayingBlurEvent||(it.state.focused&&(sn(it,"blur",it,st),it.state.focused=!1,Ot(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function So(it){for(var st=it.display,ct=st.lineDiv.offsetTop,dt=0;dt<st.view.length;dt++){var pt=st.view[dt],Lt=it.options.lineWrapping,Dt=void 0,$t=0;if(!pt.hidden){if(Ht&&he<8){var Vt=pt.node.offsetTop+pt.node.offsetHeight;Dt=Vt-ct,ct=Vt}else{var le=pt.node.getBoundingClientRect();Dt=le.bottom-le.top,!Lt&&pt.text.firstChild&&($t=pt.text.firstChild.getBoundingClientRect().right-le.left-1)}var Ye=pt.line.height-Dt;if((Ye>.005||Ye<-.005)&&(qe(pt.line,Dt),Ld(pt.line),pt.rest))for(var Pe=0;Pe<pt.rest.length;Pe++)Ld(pt.rest[Pe]);if($t>it.display.sizerWidth){var wn=Math.ceil($t/rr(it.display));wn>it.display.maxLineLength&&(it.display.maxLineLength=wn,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function Ld(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 fr(it,st,ct){var dt=ct&&ct.top!=null?Math.max(0,ct.top):it.scroller.scrollTop;dt=Math.floor(dt-Hs(it));var pt=ct&&ct.bottom!=null?ct.bottom:dt+it.wrapper.clientHeight,Lt=an(st,dt),Dt=an(st,pt);if(ct&&ct.ensure){var $t=ct.ensure.from.line,Vt=ct.ensure.to.line;$t<Lt?(Lt=$t,Dt=an(st,or(Ve(st,$t))+it.wrapper.clientHeight)):Math.min(Vt,st.lastLine())>=Dt&&(Lt=an(st,or(Ve(st,Vt))-it.wrapper.clientHeight),Dt=Vt)}return{from:Lt,to:Math.max(Dt,Lt+1)}}function tf(it,st){if(!En(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&&!ve){var Lt=Xt("div","\u200B",null,`position: absolute;
top: `+(st.top-ct.viewOffset-Hs(it.display))+`px;
height: `+(st.bottom-st.top+ga(it)+ct.barHeight)+`px;
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Lt),Lt.scrollIntoView(pt),it.display.lineSpace.removeChild(Lt)}}}function sh(it,st,ct,dt){dt==null&&(dt=0);var pt;!it.options.lineWrapping&&st==ct&&(st=st.ch?_e(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ct=st.sticky=="before"?_e(st.line,st.ch+1,"before"):st);for(var Lt=0;Lt<5;Lt++){var Dt=!1,$t=vo(it,st),Vt=!ct||ct==st?$t:vo(it,ct);pt={left:Math.min($t.left,Vt.left),top:Math.min($t.top,Vt.top)-dt,right:Math.max($t.left,Vt.left),bottom:Math.max($t.bottom,Vt.bottom)+dt};var le=Fd(it,pt),Ye=it.doc.scrollTop,Pe=it.doc.scrollLeft;if(le.scrollTop!=null&&(Kr(it,le.scrollTop),Math.abs(it.doc.scrollTop-Ye)>1&&(Dt=!0)),le.scrollLeft!=null&&($o(it,le.scrollLeft),Math.abs(it.doc.scrollLeft-Pe)>1&&(Dt=!0)),!Dt)break}return pt}function ah(it,st){var ct=Fd(it,st);ct.scrollTop!=null&&Kr(it,ct.scrollTop),ct.scrollLeft!=null&&$o(it,ct.scrollLeft)}function Fd(it,st){var ct=it.display,dt=Wi(it.display);st.top<0&&(st.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,Lt=yu(it),Dt={};st.bottom-st.top>Lt&&(st.bottom=st.top+Lt);var $t=it.doc.height+Bl(ct),Vt=st.top<dt,le=st.bottom>$t-dt;if(st.top<pt)Dt.scrollTop=Vt?0:st.top;else if(st.bottom>pt+Lt){var Ye=Math.min(st.top,(le?$t:st.bottom)-Lt);Ye!=pt&&(Dt.scrollTop=Ye)}var Pe=it.options.fixedGutter?0:ct.gutters.offsetWidth,wn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-Pe,yn=Oa(it)-ct.gutters.offsetWidth,Xn=st.right-st.left>yn;return Xn&&(st.right=st.left+yn),st.left<10?Dt.scrollLeft=0:st.left<wn?Dt.scrollLeft=Math.max(0,st.left+Pe-(Xn?0:10)):st.right>yn+wn-3&&(Dt.scrollLeft=st.right+(Xn?0:10)-yn),Dt}function kn(it,st){st!=null&&(pi(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function Di(it){pi(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function Jo(it,st,ct){(st!=null||ct!=null)&&pi(it),st!=null&&(it.curOp.scrollLeft=st),ct!=null&&(it.curOp.scrollTop=ct)}function wi(it,st){pi(it),it.curOp.scrollToPos=st}function pi(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ct=ko(it,st.from),dt=ko(it,st.to);Cr(it,ct,dt,st.margin)}}function Cr(it,st,ct,dt){var pt=Fd(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});Jo(it,pt.scrollLeft,pt.scrollTop)}function Kr(it,st){Math.abs(it.doc.scrollTop-st)<2||(mt||uh(it,{top:st}),gs(it,st,!0),mt&&uh(it),Bd(it,100))}function gs(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 $o(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,nf(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function ls(it){var st=it.display,ct=st.gutters.offsetWidth,dt=Math.round(it.doc.height+Bl(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?ct:0,docHeight:dt,scrollHeight:dt+ga(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ct}}var Er=function(it,st,ct){this.cm=ct;var dt=this.vert=Xt("div",[Xt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=Xt("div",[Xt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");dt.tabIndex=pt.tabIndex=-1,it(dt),it(pt),se(dt,"scroll",function(){dt.clientHeight&&st(dt.scrollTop,"vertical")}),se(pt,"scroll",function(){pt.clientWidth&&st(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ht&&he<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Er.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 Lt=it.viewWidth-it.barLeft-(ct?dt:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Lt)+"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}},Er.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Er.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Er.prototype.zeroWidthHack=function(){var it=ht&&!de?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Gt,this.disableVert=new Gt},Er.prototype.enableZeroWidthBar=function(it,st,ct){it.style.pointerEvents="auto";function dt(){var pt=it.getBoundingClientRect(),Lt=ct=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);Lt!=it?it.style.pointerEvents="none":st.set(1e3,dt)}st.set(1e3,dt)},Er.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var pa=function(){};pa.prototype.update=function(){return{bottom:0,right:0}},pa.prototype.setScrollLeft=function(){},pa.prototype.setScrollTop=function(){},pa.prototype.clear=function(){};function ru(it,st){st||(st=ls(it));var ct=it.display.barWidth,dt=it.display.barHeight;Lo(it,st);for(var pt=0;pt<4&&ct!=it.display.barWidth||dt!=it.display.barHeight;pt++)ct!=it.display.barWidth&&it.options.lineWrapping&&So(it),Lo(it,ls(it)),ct=it.display.barWidth,dt=it.display.barHeight}function Lo(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 Ua={native:Er,null:pa};function ol(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Ot(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Ua[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),se(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"?$o(it,st):Kr(it,st)},it),it.display.scrollbars.addClass&&Ce(it.display.wrapper,it.display.scrollbars.addClass)}var Ys=0;function Da(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:++Ys},_s(it.curOp)}function kl(it){var st=it.curOp;st&&Ko(st,function(ct){for(var dt=0;dt<ct.ops.length;dt++)ct.ops[dt].cm.curOp=null;Gh(ct)})}function Gh(it){for(var st=it.ops,ct=0;ct<st.length;ct++)su(st[ct]);for(var dt=0;dt<st.length;dt++)Wh(st[dt]);for(var pt=0;pt<st.length;pt++)_p(st[pt]);for(var Lt=0;Lt<st.length;Lt++)ys(st[Lt]);for(var Dt=0;Dt<st.length;Dt++)lh(st[Dt])}function su(it){var st=it.cm,ct=st.display;Hp(st),it.updateMaxLine&&pr(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 Zh(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function Wh(it){it.updatedDisplay=it.mustUpdate&&ef(it.cm,it.update)}function _p(it){var st=it.cm,ct=st.display;it.updatedDisplay&&So(st),it.barMeasure=ls(st),ct.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=Ca(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+ga(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 ys(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&$o(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ct=it.focus&&it.focus==ne();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ct),(it.updatedDisplay||it.startHeight!=st.doc.height)&&ru(st,it.barMeasure),it.updatedDisplay&&dh(st,it.barMeasure),it.selectionChanged&&wr(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ct&&Rr(it.cm)}function lh(it){var st=it.cm,ct=st.display,dt=st.doc;if(it.updatedDisplay&&_r(st,it.update),ct.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ct.wheelStartX=ct.wheelStartY=null),it.scrollTop!=null&&gs(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&$o(st,it.scrollLeft,!0,!0),it.scrollToPos){var pt=sh(st,ui(dt,it.scrollToPos.from),ui(dt,it.scrollToPos.to),it.scrollToPos.margin);tf(st,pt)}var Lt=it.maybeHiddenMarkers,Dt=it.maybeUnhiddenMarkers;if(Lt)for(var $t=0;$t<Lt.length;++$t)Lt[$t].lines.length||sn(Lt[$t],"hide");if(Dt)for(var Vt=0;Vt<Dt.length;++Vt)Dt[Vt].lines.length&&sn(Dt[Vt],"unhide");ct.wrapper.offsetHeight&&(dt.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&sn(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function Tr(it,st){if(it.curOp)return st();Da(it);try{return st()}finally{kl(it)}}function Gs(it,st){return function(){if(it.curOp)return st.apply(it,arguments);Da(it);try{return st.apply(it,arguments)}finally{kl(it)}}}function Xs(it){return function(){if(this.curOp)return it.apply(this,arguments);Da(this);try{return it.apply(this,arguments)}finally{kl(this)}}}function Js(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);Da(st);try{return it.apply(this,arguments)}finally{kl(st)}}}function Bd(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,tn(Qs,it))}function Qs(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,dt=Ii(it,st.highlightFrontier),pt=[];st.iter(dt.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Lt){if(dt.line>=it.display.viewFrom){var Dt=Lt.styles,$t=Lt.text.length>it.options.maxHighlightLength?nn(st.mode,dt.state):null,Vt=lo(it,Lt,dt,!0);$t&&(dt.state=$t),Lt.styles=Vt.styles;var le=Lt.styleClasses,Ye=Vt.classes;Ye?Lt.styleClasses=Ye:le&&(Lt.styleClasses=null);for(var Pe=!Dt||Dt.length!=Lt.styles.length||le!=Ye&&(!le||!Ye||le.bgClass!=Ye.bgClass||le.textClass!=Ye.textClass),wn=0;!Pe&&wn<Dt.length;++wn)Pe=Dt[wn]!=Lt.styles[wn];Pe&&pt.push(dt.line),Lt.stateAfter=dt.save(),dt.nextLine()}else Lt.text.length<=it.options.maxHighlightLength&&Oe(it,Lt.text,dt),Lt.stateAfter=dt.line%5==0?dt.save():null,dt.nextLine();if(+new Date>ct)return Bd(it,it.options.workDelay),!0}),st.highlightFrontier=dt.line,st.modeFrontier=Math.max(st.modeFrontier,dt.line),pt.length&&Tr(it,function(){for(var Lt=0;Lt<pt.length;Lt++)Xi(it,pt[Lt],"text")})}}var Zh=function(it,st,ct){var dt=it.display;this.viewport=st,this.visible=fr(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=jr(it),this.events=[]};Zh.prototype.signal=function(it,st){zn(it,st)&&this.events.push(arguments)},Zh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)sn.apply(null,this.events[it])};function Hp(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=ga(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=ga(it)+"px",st.scrollbarsClipped=!0)}function Gp(it){if(it.hasFocus())return null;var st=ne();if(!st||!Ne(it.display.lineDiv,st))return null;var ct={activeElt:st};if(window.getSelection){var dt=window.getSelection();dt.anchorNode&&dt.extend&&Ne(it.display.lineDiv,dt.anchorNode)&&(ct.anchorNode=dt.anchorNode,ct.anchorOffset=dt.anchorOffset,ct.focusNode=dt.focusNode,ct.focusOffset=dt.focusOffset)}return ct}function $a(it){if(!(!it||!it.activeElt||it.activeElt==ne())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Ne(document.body,it.anchorNode)&&Ne(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 ef(it,st){var ct=it.display,dt=it.doc;if(st.editorIsHidden)return Wo(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&&Os(it)==0)return!1;As(it)&&(Wo(it),st.dims=jr(it));var pt=dt.first+dt.size,Lt=Math.max(st.visible.from-it.options.viewportMargin,dt.first),Dt=Math.min(pt,st.visible.to+it.options.viewportMargin);ct.viewFrom<Lt&&Lt-ct.viewFrom<20&&(Lt=Math.max(dt.first,ct.viewFrom)),ct.viewTo>Dt&&ct.viewTo-Dt<20&&(Dt=Math.min(pt,ct.viewTo)),pn&&(Lt=Ni(it.doc,Lt),Dt=Ji(it.doc,Dt));var $t=Lt!=ct.viewFrom||Dt!=ct.viewTo||ct.lastWrapHeight!=st.wrapperHeight||ct.lastWrapWidth!=st.wrapperWidth;er(it,Lt,Dt),ct.viewOffset=or(Ve(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Vt=Os(it);if(!$t&&Vt==0&&!st.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var le=Gp(it);return Vt>4&&(ct.lineDiv.style.display="none"),hg(it,ct.updateLineNumbers,st.dims),Vt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,$a(le),_t(ct.cursorDiv),_t(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,$t&&(ct.lastWrapHeight=st.wrapperHeight,ct.lastWrapWidth=st.wrapperWidth,Bd(it,400)),ct.updateLineNumbers=null,!0}function _r(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+Bl(it.display)-yu(it),ct.top)}),st.visible=fr(it.display,it.doc,ct),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else dt&&(st.visible=fr(it.display,it.doc,ct));if(!ef(it,st))break;So(it);var pt=ls(it);fs(it),ru(it,pt),dh(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 uh(it,st){var ct=new Zh(it,st);if(ef(it,ct)){So(it),_r(it,ct);var dt=ls(it);fs(it),ru(it,dt),dh(it,dt),ct.finish()}}function hg(it,st,ct){var dt=it.display,pt=it.options.lineNumbers,Lt=dt.lineDiv,Dt=Lt.firstChild;function $t(Xn){var ti=Xn.nextSibling;return Rt&&ht&&it.display.currentWheelTarget==Xn?Xn.style.display="none":Xn.parentNode.removeChild(Xn),ti}for(var Vt=dt.view,le=dt.viewFrom,Ye=0;Ye<Vt.length;Ye++){var Pe=Vt[Ye];if(!Pe.hidden)if(!Pe.node||Pe.node.parentNode!=Lt){var wn=iu(it,Pe,le,ct);Lt.insertBefore(wn,Dt)}else{for(;Dt!=Pe.node;)Dt=$t(Dt);var yn=pt&&st!=null&&st<=le&&Pe.lineNumber;Pe.changes&&(Ae(Pe.changes,"gutter")>-1&&(yn=!1),$r(it,Pe,le,ct)),yn&&(_t(Pe.lineNumber),Pe.lineNumber.appendChild(document.createTextNode(Vn(it.options,le)))),Dt=Pe.node.nextSibling}le+=Pe.size}for(;Dt;)Dt=$t(Dt)}function hh(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function dh(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+ga(it)+"px"}function nf(it){var st=it.display,ct=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var dt=Vr(st)-st.scroller.scrollLeft+it.doc.scrollLeft,pt=st.gutters.offsetWidth,Lt=dt+"px",Dt=0;Dt<ct.length;Dt++)if(!ct[Dt].hidden){it.options.fixedGutter&&(ct[Dt].gutter&&(ct[Dt].gutter.style.left=Lt),ct[Dt].gutterBackground&&(ct[Dt].gutterBackground.style.left=Lt));var $t=ct[Dt].alignable;if($t)for(var Vt=0;Vt<$t.length;Vt++)$t[Vt].style.left=Lt}it.options.fixedGutter&&(st.gutters.style.left=dt+pt+"px")}}function As(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ct=Vn(it.options,st.first+st.size-1),dt=it.display;if(ct.length!=dt.lineNumChars){var pt=dt.measure.appendChild(Xt("div",[Xt("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Lt=pt.firstChild.offsetWidth,Dt=pt.offsetWidth-Lt;return dt.lineGutter.style.width="",dt.lineNumInnerWidth=Math.max(Lt,dt.lineGutter.offsetWidth-Dt)+1,dt.lineNumWidth=dt.lineNumInnerWidth+Dt,dt.lineNumChars=dt.lineNumInnerWidth?ct.length:-1,dt.lineGutter.style.width=dt.lineNumWidth+"px",hh(it.display),!0}return!1}function qs(it,st){for(var ct=[],dt=!1,pt=0;pt<it.length;pt++){var Lt=it[pt],Dt=null;if(typeof Lt!="string"&&(Dt=Lt.style,Lt=Lt.className),Lt=="CodeMirror-linenumbers")if(st)dt=!0;else continue;ct.push({className:Lt,style:Dt})}return st&&!dt&&ct.push({className:"CodeMirror-linenumbers",style:null}),ct}function Vh(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],Lt=pt.className,Dt=pt.style,$t=st.appendChild(Xt("div",null,"CodeMirror-gutter "+Lt));Dt&&($t.style.cssText=Dt),Lt=="CodeMirror-linenumbers"&&(it.lineGutter=$t,$t.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ct.length?"":"none",hh(it)}function yl(it){Vh(it.display),yo(it),nf(it)}function ch(it,st,ct,dt){var pt=this;this.input=ct,pt.scrollbarFiller=Xt("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=Xt("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=Me("div",null,"CodeMirror-code"),pt.selectionDiv=Xt("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=Xt("div",null,"CodeMirror-cursors"),pt.measure=Xt("div",null,"CodeMirror-measure"),pt.lineMeasure=Xt("div",null,"CodeMirror-measure"),pt.lineSpace=Me("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var Lt=Me("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=Xt("div",[Lt],null,"position: relative"),pt.sizer=Xt("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=Xt("div",null,null,"position: absolute; height: "+Sn+"px; width: 1px;"),pt.gutters=Xt("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=Xt("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=Xt("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),Ht&&he<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!Rt&&!(mt&&et)&&(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=qs(dt.gutters,dt.lineNumbers),Vh(pt),ct.init(pt)}var rl=0,Ms=null;Ht?Ms=-.53:mt?Ms=15:ge?Ms=-.7:ue&&(Ms=-1/3);function au(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 Sl(it){var st=au(it);return st.x*=Ms,st.y*=Ms,st}function ta(it,st){var ct=au(st),dt=ct.x,pt=ct.y,Lt=it.display,Dt=Lt.scroller,$t=Dt.scrollWidth>Dt.clientWidth,Vt=Dt.scrollHeight>Dt.clientHeight;if(dt&&$t||pt&&Vt){if(pt&&ht&&Rt){t:for(var le=st.target,Ye=Lt.view;le!=Dt;le=le.parentNode)for(var Pe=0;Pe<Ye.length;Pe++)if(Ye[Pe].node==le){it.display.currentWheelTarget=le;break t}}if(dt&&!mt&&!Kt&&Ms!=null){pt&&Vt&&Kr(it,Math.max(0,Dt.scrollTop+pt*Ms)),$o(it,Math.max(0,Dt.scrollLeft+dt*Ms)),(!pt||pt&&Vt)&&$n(st),Lt.wheelStartX=null;return}if(pt&&Ms!=null){var wn=pt*Ms,yn=it.doc.scrollTop,Xn=yn+Lt.wrapper.clientHeight;wn<0?yn=Math.max(0,yn+wn-50):Xn=Math.min(it.doc.height,Xn+wn+50),uh(it,{top:yn,bottom:Xn})}rl<20&&(Lt.wheelStartX==null?(Lt.wheelStartX=Dt.scrollLeft,Lt.wheelStartY=Dt.scrollTop,Lt.wheelDX=dt,Lt.wheelDY=pt,setTimeout(function(){if(Lt.wheelStartX!=null){var ti=Dt.scrollLeft-Lt.wheelStartX,mi=Dt.scrollTop-Lt.wheelStartY,Mi=mi&&Lt.wheelDY&&mi/Lt.wheelDY||ti&&Lt.wheelDX&&ti/Lt.wheelDX;Lt.wheelStartX=Lt.wheelStartY=null,Mi&&(Ms=(Ms*rl+Mi)/(rl+1),++rl)}},200)):(Lt.wheelDX+=dt,Lt.wheelDY+=pt))}}var Al=function(it,st){this.ranges=it,this.primIndex=st};Al.prototype.primary=function(){return this.ranges[this.primIndex]},Al.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(!hi(ct.anchor,dt.anchor)||!hi(ct.head,dt.head))return!1}return!0},Al.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new Hr(qn(this.ranges[st].anchor),qn(this.ranges[st].head));return new Al(it,this.primIndex)},Al.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Al.prototype.contains=function(it,st){st||(st=it);for(var ct=0;ct<this.ranges.length;ct++){var dt=this.ranges[ct];if(Je(st,dt.from())>=0&&Je(it,dt.to())<=0)return ct}return-1};var Hr=function(it,st){this.anchor=it,this.head=st};Hr.prototype.from=function(){return Kn(this.anchor,this.head)},Hr.prototype.to=function(){return vi(this.anchor,this.head)},Hr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vl(it,st,ct){var dt=it&&it.options.selectionsMayTouch,pt=st[ct];st.sort(function(wn,yn){return Je(wn.from(),yn.from())}),ct=Ae(st,pt);for(var Lt=1;Lt<st.length;Lt++){var Dt=st[Lt],$t=st[Lt-1],Vt=Je($t.to(),Dt.from());if(dt&&!Dt.empty()?Vt>0:Vt>=0){var le=Kn($t.from(),Dt.from()),Ye=vi($t.to(),Dt.to()),Pe=$t.empty()?Dt.from()==Dt.head:$t.from()==$t.head;Lt<=ct&&--ct,st.splice(--Lt,2,new Hr(Pe?Ye:le,Pe?le:Ye))}}return new Al(st,ct)}function _u(it,st){return new Al([new Hr(it,st||it)],0)}function fh(it){return it.text?_e(it.from.line+it.text.length-1,fe(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Uh(it,st){if(Je(it,st.from)<0)return it;if(Je(it,st.to)<=0)return fh(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+=fh(st).ch-st.to.ch),_e(ct,dt)}function hc(it,st){for(var ct=[],dt=0;dt<it.sel.ranges.length;dt++){var pt=it.sel.ranges[dt];ct.push(new Hr(Uh(pt.anchor,st),Uh(pt.head,st)))}return Vl(it.cm,ct,it.sel.primIndex)}function Nd(it,st,ct){return it.line==st.line?_e(ct.line,it.ch-st.ch+ct.ch):_e(ct.line+(it.line-st.line),it.ch)}function dc(it,st,ct){for(var dt=[],pt=_e(it.first,0),Lt=pt,Dt=0;Dt<st.length;Dt++){var $t=st[Dt],Vt=Nd($t.from,pt,Lt),le=Nd(fh($t),pt,Lt);if(pt=$t.to,Lt=le,ct=="around"){var Ye=it.sel.ranges[Dt],Pe=Je(Ye.head,Ye.anchor)<0;dt[Dt]=new Hr(Pe?le:Vt,Pe?Vt:le)}else dt[Dt]=new Hr(Vt,Vt)}return new Al(dt,it.sel.primIndex)}function lr(it){it.doc.mode=Te(it.options,it.doc.modeOption),cc(it)}function cc(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,Bd(it,100),it.state.modeGen++,it.curOp&&yo(it)}function dg(it,st){return st.from.ch==0&&st.to.ch==0&&fe(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function of(it,st,ct,dt){function pt(ro){return ct?ct[ro]:null}function Lt(ro,Zi,ho){ts(ro,Zi,ho,dt),ci(ro,"change",ro,st)}function Dt(ro,Zi){for(var ho=[],Zo=ro;Zo<Zi;++Zo)ho.push(new Br(le[Zo],pt(Zo),dt));return ho}var $t=st.from,Vt=st.to,le=st.text,Ye=Ve(it,$t.line),Pe=Ve(it,Vt.line),wn=fe(le),yn=pt(le.length-1),Xn=Vt.line-$t.line;if(st.full)it.insert(0,Dt(0,le.length)),it.remove(le.length,it.size-le.length);else if(dg(it,st)){var ti=Dt(0,le.length-1);Lt(Pe,Pe.text,yn),Xn&&it.remove($t.line,Xn),ti.length&&it.insert($t.line,ti)}else if(Ye==Pe)if(le.length==1)Lt(Ye,Ye.text.slice(0,$t.ch)+wn+Ye.text.slice(Vt.ch),yn);else{var mi=Dt(1,le.length-1);mi.push(new Br(wn+Ye.text.slice(Vt.ch),yn,dt)),Lt(Ye,Ye.text.slice(0,$t.ch)+le[0],pt(0)),it.insert($t.line+1,mi)}else if(le.length==1)Lt(Ye,Ye.text.slice(0,$t.ch)+le[0]+Pe.text.slice(Vt.ch),pt(0)),it.remove($t.line+1,Xn);else{Lt(Ye,Ye.text.slice(0,$t.ch)+le[0],pt(0)),Lt(Pe,wn+Pe.text.slice(Vt.ch),yn);var Mi=Dt(1,le.length-1);Xn>1&&it.remove($t.line+1,Xn-1),it.insert($t.line+1,Mi)}ci(it,"change",it,st)}function lu(it,st,ct){function dt(pt,Lt,Dt){if(pt.linked)for(var $t=0;$t<pt.linked.length;++$t){var Vt=pt.linked[$t];if(Vt.doc!=Lt){var le=Dt&&Vt.sharedHist;ct&&!le||(st(Vt.doc,le),dt(Vt.doc,pt,le))}}}dt(it,null,!0)}function rf(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,si(it),lr(it),fc(it),it.options.lineWrapping||pr(it),it.options.mode=st.modeOption,yo(it)}function fc(it){(it.doc.direction=="rtl"?Ce:Ot)(it.display.lineDiv,"CodeMirror-rtl")}function q0(it){Tr(it,function(){fc(it),yo(it)})}function kd(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 sf(it,st){var ct={from:qn(st.from),to:fh(st),text:en(it,st.from,st.to)};return gh(it,ct,st.from.line,st.to.line+1),lu(it,function(dt){return gh(dt,ct,st.from.line,st.to.line+1)},!0),ct}function Ad(it){for(;it.length;){var st=fe(it);if(st.ranges)it.pop();else break}}function gc(it,st){if(st)return Ad(it.done),fe(it.done);if(it.done.length&&!fe(it.done).ranges)return fe(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),fe(it.done)}function pc(it,st,ct,dt){var pt=it.history;pt.undone.length=0;var Lt=+new Date,Dt,$t;if((pt.lastOp==dt||pt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&pt.lastModTime>Lt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Dt=gc(pt,pt.lastOp==dt)))$t=fe(Dt.changes),Je(st.from,st.to)==0&&Je(st.from,$t.to)==0?$t.to=fh(st):Dt.changes.push(sf(it,st));else{var Vt=fe(pt.done);for((!Vt||!Vt.ranges)&&Td(it.sel,pt.done),Dt={changes:[sf(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=Lt,pt.lastOp=pt.lastSelOp=dt,pt.lastOrigin=pt.lastSelOrigin=st.origin,$t||sn(it,"historyAdded")}function cg(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 mc(it,st,ct,dt){var pt=it.history,Lt=dt&&dt.origin;ct==pt.lastSelOp||Lt&&pt.lastSelOrigin==Lt&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==Lt||cg(it,Lt,fe(pt.done),st))?pt.done[pt.done.length-1]=st:Td(st,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=Lt,pt.lastSelOp=ct,dt&&dt.clearRedo!==!1&&Ad(pt.undone)}function Td(it,st){var ct=fe(st);ct&&ct.ranges&&ct.equals(it)||st.push(it)}function gh(it,st,ct,dt){var pt=st["spans_"+it.id],Lt=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]={}))[Lt]=Dt.markedSpans),++Lt})}function Ia(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 Su(it,st){var ct=st["spans_"+it.id];if(!ct)return null;for(var dt=[],pt=0;pt<st.text.length;++pt)dt.push(Ia(ct[pt]));return dt}function af(it,st){var ct=Su(it,st),dt=Oi(it,st);if(!ct)return dt;if(!dt)return ct;for(var pt=0;pt<ct.length;++pt){var Lt=ct[pt],Dt=dt[pt];if(Lt&&Dt)t:for(var $t=0;$t<Dt.length;++$t){for(var Vt=Dt[$t],le=0;le<Lt.length;++le)if(Lt[le].marker==Vt.marker)continue t;Lt.push(Vt)}else Dt&&(ct[pt]=Dt)}return ct}function Hu(it,st,ct){for(var dt=[],pt=0;pt<it.length;++pt){var Lt=it[pt];if(Lt.ranges){dt.push(ct?Al.prototype.deepCopy.call(Lt):Lt);continue}var Dt=Lt.changes,$t=[];dt.push({changes:$t});for(var Vt=0;Vt<Dt.length;++Vt){var le=Dt[Vt],Ye=void 0;if($t.push({from:le.from,to:le.to,text:le.text}),st)for(var Pe in le)(Ye=Pe.match(/^spans_(\d+)$/))&&Ae(st,Number(Ye[1]))>-1&&(fe($t)[Pe]=le[Pe],delete le[Pe])}}return dt}function lf(it,st,ct,dt){if(dt){var pt=it.anchor;if(ct){var Lt=Je(st,pt)<0;Lt!=Je(ct,pt)<0?(pt=st,st=ct):Lt!=Je(st,ct)<0&&(st=ct)}return new Hr(pt,st)}else return new Hr(ct||st,st)}function uf(it,st,ct,dt,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Ea(it,new Al([lf(it.sel.primary(),st,ct,pt)],0),dt)}function Wp(it,st,ct){for(var dt=[],pt=it.cm&&(it.cm.display.shift||it.extend),Lt=0;Lt<it.sel.ranges.length;Lt++)dt[Lt]=lf(it.sel.ranges[Lt],st[Lt],null,pt);var Dt=Vl(it.cm,dt,it.sel.primIndex);Ea(it,Dt,ct)}function ph(it,st,ct,dt){var pt=it.sel.ranges.slice(0);pt[st]=ct,Ea(it,Vl(it.cm,pt,it.sel.primIndex),dt)}function $h(it,st,ct,dt){Ea(it,_u(st,ct),dt)}function Zp(it,st,ct){var dt={ranges:st.ranges,update:function(pt){this.ranges=[];for(var Lt=0;Lt<pt.length;Lt++)this.ranges[Lt]=new Hr(ui(it,pt[Lt].anchor),ui(it,pt[Lt].head))},origin:ct&&ct.origin};return sn(it,"beforeSelectionChange",it,dt),it.cm&&sn(it.cm,"beforeSelectionChange",it.cm,dt),dt.ranges!=st.ranges?Vl(it.cm,dt.ranges,dt.ranges.length-1):st}function hf(it,st,ct){var dt=it.history.done,pt=fe(dt);pt&&pt.ranges?(dt[dt.length-1]=st,Kh(it,st,ct)):Ea(it,st,ct)}function Ea(it,st,ct){Kh(it,st,ct),mc(it,it.sel,it.cm?it.cm.curOp.id:NaN,ct)}function Kh(it,st,ct){(zn(it,"beforeSelectionChange")||it.cm&&zn(it.cm,"beforeSelectionChange"))&&(st=Zp(it,st,ct));var dt=ct&&ct.bias||(Je(st.primary().head,it.sel.primary().head)<0?-1:1);fg(it,yc(it,st,dt,!0)),!(ct&&ct.scroll===!1)&&it.cm&&Di(it.cm)}function fg(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Gn(it.cm)),ci(it,"cursorActivity",it))}function vc(it){fg(it,yc(it,it.sel,null,!1))}function yc(it,st,ct,dt){for(var pt,Lt=0;Lt<st.ranges.length;Lt++){var Dt=st.ranges[Lt],$t=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Lt],Vt=Sc(it,Dt.anchor,$t&&$t.anchor,ct,dt),le=Sc(it,Dt.head,$t&&$t.head,ct,dt);(pt||Vt!=Dt.anchor||le!=Dt.head)&&(pt||(pt=st.ranges.slice(0,Lt)),pt[Lt]=new Hr(Vt,le))}return pt?Vl(it.cm,pt,st.primIndex):st}function Gu(it,st,ct,dt,pt){var Lt=Ve(it,st.line);if(Lt.markedSpans)for(var Dt=0;Dt<Lt.markedSpans.length;++Dt){var $t=Lt.markedSpans[Dt],Vt=$t.marker,le="selectLeft"in Vt?!Vt.selectLeft:Vt.inclusiveLeft,Ye="selectRight"in Vt?!Vt.selectRight:Vt.inclusiveRight;if(($t.from==null||(le?$t.from<=st.ch:$t.from<st.ch))&&($t.to==null||(Ye?$t.to>=st.ch:$t.to>st.ch))){if(pt&&(sn(Vt,"beforeCursorEnter"),Vt.explicitlyCleared))if(Lt.markedSpans){--Dt;continue}else break;if(!Vt.atomic)continue;if(ct){var Pe=Vt.find(dt<0?1:-1),wn=void 0;if((dt<0?Ye:le)&&(Pe=gg(it,Pe,-dt,Pe&&Pe.line==st.line?Lt:null)),Pe&&Pe.line==st.line&&(wn=Je(Pe,ct))&&(dt<0?wn<0:wn>0))return Gu(it,Pe,st,dt,pt)}var yn=Vt.find(dt<0?-1:1);return(dt<0?le:Ye)&&(yn=gg(it,yn,dt,yn.line==st.line?Lt:null)),yn?Gu(it,yn,st,dt,pt):null}}return st}function Sc(it,st,ct,dt,pt){var Lt=dt||1,Dt=Gu(it,st,ct,Lt,pt)||!pt&&Gu(it,st,ct,Lt,!0)||Gu(it,st,ct,-Lt,pt)||!pt&&Gu(it,st,ct,-Lt,!0);return Dt||(it.cantEdit=!0,_e(it.first,0))}function gg(it,st,ct,dt){return ct<0&&st.ch==0?st.line>it.first?ui(it,_e(st.line-1)):null:ct>0&&st.ch==(dt||Ve(it,st.line)).text.length?st.line<it.first+it.size-1?_e(st.line+1,0):null:new _e(st.line,st.ch+ct)}function Ls(it){it.setSelection(_e(it.firstLine(),0),_e(it.lastLine()),Fe)}function xc(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,Lt,Dt,$t){pt&&(dt.from=ui(it,pt)),Lt&&(dt.to=ui(it,Lt)),Dt&&(dt.text=Dt),$t!==void 0&&(dt.origin=$t)}),sn(it,"beforeChange",it,dt),it.cm&&sn(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 mh(it,st,ct){if(it.cm){if(!it.cm.curOp)return Gs(it.cm,mh)(it,st,ct);if(it.cm.state.suppressEdits)return}if(!((zn(it,"beforeChange")||it.cm&&zn(it.cm,"beforeChange"))&&(st=xc(it,st,!0),!st))){var dt=Po&&!ct&&Oo(it,st.from,st.to);if(dt)for(var pt=dt.length-1;pt>=0;--pt)Yh(it,{from:dt[pt].from,to:dt[pt].to,text:pt?[""]:st.text,origin:st.origin});else Yh(it,st)}}function Yh(it,st){if(!(st.text.length==1&&st.text[0]==""&&Je(st.from,st.to)==0)){var ct=hc(it,st);pc(it,st,ct,it.cm?it.cm.curOp.id:NaN),Od(it,st,ct,Oi(it,st));var dt=[];lu(it,function(pt,Lt){!Lt&&Ae(dt,pt.history)==-1&&(mg(pt.history,st),dt.push(pt.history)),Od(pt,st,null,Oi(pt,st))})}}function Pc(it,st,ct){var dt=it.cm&&it.cm.state.suppressEdits;if(!(dt&&!ct)){for(var pt=it.history,Lt,Dt=it.sel,$t=st=="undo"?pt.done:pt.undone,Vt=st=="undo"?pt.undone:pt.done,le=0;le<$t.length&&(Lt=$t[le],!(ct?Lt.ranges&&!Lt.equals(it.sel):!Lt.ranges));le++);if(le!=$t.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(Lt=$t.pop(),Lt.ranges){if(Td(Lt,Vt),ct&&!Lt.equals(it.sel)){Ea(it,Lt,{clearRedo:!1});return}Dt=Lt}else if(dt){$t.push(Lt);return}else break;var Ye=[];Td(Dt,Vt),Vt.push({changes:Ye,generation:pt.generation}),pt.generation=Lt.generation||++pt.maxGeneration;for(var Pe=zn(it,"beforeChange")||it.cm&&zn(it.cm,"beforeChange"),wn=function(ti){var mi=Lt.changes[ti];if(mi.origin=st,Pe&&!xc(it,mi,!1))return $t.length=0,{};Ye.push(sf(it,mi));var Mi=ti?hc(it,mi):fe($t);Od(it,mi,Mi,af(it,mi)),!ti&&it.cm&&it.cm.scrollIntoView({from:mi.from,to:fh(mi)});var ro=[];lu(it,function(Zi,ho){!ho&&Ae(ro,Zi.history)==-1&&(mg(Zi.history,mi),ro.push(Zi.history)),Od(Zi,mi,null,af(Zi,mi))})},yn=Lt.changes.length-1;yn>=0;--yn){var Xn=wn(yn);if(Xn)return Xn.v}}}}function pg(it,st){if(st!=0&&(it.first+=st,it.sel=new Al(An(it.sel.ranges,function(pt){return new Hr(_e(pt.anchor.line+st,pt.anchor.ch),_e(pt.head.line+st,pt.head.ch))}),it.sel.primIndex),it.cm)){yo(it.cm,it.first,it.first-st,st);for(var ct=it.cm.display,dt=ct.viewFrom;dt<ct.viewTo;dt++)Xi(it.cm,dt,"gutter")}}function Od(it,st,ct,dt){if(it.cm&&!it.cm.curOp)return Gs(it.cm,Od)(it,st,ct,dt);if(st.to.line<it.first){pg(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);pg(it,pt),st={from:_e(it.first,0),to:_e(st.to.line+pt,st.to.ch),text:[fe(st.text)],origin:st.origin}}var Lt=it.lastLine();st.to.line>Lt&&(st={from:st.from,to:_e(Lt,Ve(it,Lt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=en(it,st.from,st.to),ct||(ct=hc(it,st)),it.cm?Vp(it.cm,st,dt):of(it,st,dt),Kh(it,ct,Fe),it.cantEdit&&Sc(it,_e(it.firstLine(),0))&&(it.cantEdit=!1)}}function Vp(it,st,ct){var dt=it.doc,pt=it.display,Lt=st.from,Dt=st.to,$t=!1,Vt=Lt.line;it.options.lineWrapping||(Vt=xe(uo(Ve(dt,Lt.line))),dt.iter(Vt,Dt.line+1,function(yn){if(yn==pt.maxLine)return $t=!0,!0})),dt.sel.contains(st.from,st.to)>-1&&Gn(it),of(dt,st,ct,tr(it)),it.options.lineWrapping||(dt.iter(Vt,Lt.line+st.text.length,function(yn){var Xn=Ir(yn);Xn>pt.maxLineLength&&(pt.maxLine=yn,pt.maxLineLength=Xn,pt.maxLineChanged=!0,$t=!1)}),$t&&(it.curOp.updateMaxLine=!0)),Ti(dt,Lt.line),Bd(it,400);var le=st.text.length-(Dt.line-Lt.line)-1;st.full?yo(it):Lt.line==Dt.line&&st.text.length==1&&!dg(it.doc,st)?Xi(it,Lt.line,"text"):yo(it,Lt.line,Dt.line+1,le);var Ye=zn(it,"changes"),Pe=zn(it,"change");if(Pe||Ye){var wn={from:Lt,to:Dt,text:st.text,removed:st.removed,origin:st.origin};Pe&&ci(it,"change",it,wn),Ye&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(wn)}it.display.selForContextMenu=null}function Xh(it,st,ct,dt,pt){var Lt;dt||(dt=ct),Je(dt,ct)<0&&(Lt=[dt,ct],ct=Lt[0],dt=Lt[1]),typeof st=="string"&&(st=it.splitLines(st)),mh(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 Up(it,st,ct,dt){for(var pt=0;pt<it.length;++pt){var Lt=it[pt],Dt=!0;if(Lt.ranges){Lt.copied||(Lt=it[pt]=Lt.deepCopy(),Lt.copied=!0);for(var $t=0;$t<Lt.ranges.length;$t++)Tl(Lt.ranges[$t].anchor,st,ct,dt),Tl(Lt.ranges[$t].head,st,ct,dt);continue}for(var Vt=0;Vt<Lt.changes.length;++Vt){var le=Lt.changes[Vt];if(ct<le.from.line)le.from=_e(le.from.line+dt,le.from.ch),le.to=_e(le.to.line+dt,le.to.ch);else if(st<=le.to.line){Dt=!1;break}}Dt||(it.splice(0,pt+1),pt=0)}}function mg(it,st){var ct=st.from.line,dt=st.to.line,pt=st.text.length-(dt-ct)-1;Up(it.done,ct,dt,pt),Up(it.undone,ct,dt,pt)}function Jh(it,st,ct,dt){var pt=st,Lt=st;return typeof st=="number"?Lt=Ve(it,oi(it,st)):pt=xe(st),pt==null?null:(dt(Lt,pt)&&it.cm&&Xi(it.cm,pt,ct),Lt)}function Dd(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}Dd.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),ci(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 ps(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}ps.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 Lt=Math.min(st,pt-it),Dt=dt.height;if(dt.removeInner(it,Lt),this.height-=Dt-dt.height,pt==Lt&&(this.children.splice(ct--,1),dt.parent=null),(st-=Lt)==0)break;it=0}else it-=pt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Dd))){var $t=[];this.collapse($t),this.children=[new Dd($t)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ct){this.size+=st.length,this.height+=ct;for(var dt=0;dt<this.children.length;++dt){var pt=this.children[dt],Lt=pt.chunkSize();if(it<=Lt){if(pt.insertInner(it,st,ct),pt.lines&&pt.lines.length>50){for(var Dt=pt.lines.length%25+25,$t=Dt;$t<pt.lines.length;){var Vt=new Dd(pt.lines.slice($t,$t+=25));pt.height-=Vt.height,this.children.splice(++dt,0,Vt),Vt.parent=this}pt.lines=pt.lines.slice(0,Dt),this.maybeSpill()}break}it-=Lt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ct=new ps(st);if(it.parent){it.size-=ct.size,it.height-=ct.height;var pt=Ae(it.parent.children,it);it.parent.children.splice(pt+1,0,ct)}else{var dt=new ps(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],Lt=pt.chunkSize();if(it<Lt){var Dt=Math.min(st,Lt-it);if(pt.iterN(it,Dt,ct))return!0;if((st-=Dt)==0)break;it=0}else it-=Lt}}};var Wu=function(it,st,ct){if(ct)for(var dt in ct)ct.hasOwnProperty(dt)&&(this[dt]=ct[dt]);this.doc=it,this.node=st};Wu.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ct=this.line,dt=xe(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 Lt=bs(this);qe(ct,Math.max(0,ct.height-Lt)),it&&(Tr(it,function(){$p(it,ct,-Lt),Xi(it,dt,"widget")}),ci(it,"lineWidgetCleared",it,this,dt))}},Wu.prototype.changed=function(){var it=this,st=this.height,ct=this.doc.cm,dt=this.line;this.height=null;var pt=bs(this)-st;pt&&(Nn(this.doc,dt)||qe(dt,dt.height+pt),ct&&Tr(ct,function(){ct.curOp.forceUpdate=!0,$p(ct,dt,pt),ci(ct,"lineWidgetChanged",ct,it,xe(dt))}))},Zn(Wu);function $p(it,st,ct){or(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&kn(it,ct)}function df(it,st,ct,dt){var pt=new Wu(it,ct,dt),Lt=it.cm;return Lt&&pt.noHScroll&&(Lt.display.alignWidgets=!0),Jh(it,st,"widget",function(Dt){var $t=Dt.widgets||(Dt.widgets=[]);if(pt.insertAt==null?$t.push(pt):$t.splice(Math.min($t.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Dt,Lt&&!Nn(it,Dt)){var Vt=or(Dt)<it.scrollTop;qe(Dt,Dt.height+bs(pt)),Vt&&kn(Lt,pt.height),Lt.curOp.forceUpdate=!0}return!0}),Lt&&ci(Lt,"lineWidgetAdded",Lt,pt,typeof st=="number"?st:xe(st)),pt}var Kp=0,ze=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Kp};ze.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&Da(it),zn(this,"clear")){var ct=this.find();ct&&ci(this,"clear",ct.from,ct.to)}for(var dt=null,pt=null,Lt=0;Lt<this.lines.length;++Lt){var Dt=this.lines[Lt],$t=vr(Dt.markedSpans,this);it&&!this.collapsed?Xi(it,xe(Dt),"text"):it&&($t.to!=null&&(pt=xe(Dt)),$t.from!=null&&(dt=xe(Dt))),Dt.markedSpans=Si(Dt.markedSpans,$t),$t.from==null&&this.collapsed&&!Nn(this.doc,Dt)&&it&&qe(Dt,Wi(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Vt=0;Vt<this.lines.length;++Vt){var le=uo(this.lines[Vt]),Ye=Ir(le);Ye>it.display.maxLineLength&&(it.display.maxLine=le,it.display.maxLineLength=Ye,it.display.maxLineChanged=!0)}dt!=null&&it&&this.collapsed&&yo(it,dt,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&vc(it.doc)),it&&ci(it,"markerCleared",it,this,dt,pt),st&&kl(it),this.parent&&this.parent.clear()}},ze.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ct,dt,pt=0;pt<this.lines.length;++pt){var Lt=this.lines[pt],Dt=vr(Lt.markedSpans,this);if(Dt.from!=null&&(ct=_e(st?Lt:xe(Lt),Dt.from),it==-1))return ct;if(Dt.to!=null&&(dt=_e(st?Lt:xe(Lt),Dt.to),it==1))return dt}return ct&&{from:ct,to:dt}},ze.prototype.changed=function(){var it=this,st=this.find(-1,!0),ct=this,dt=this.doc.cm;!st||!dt||Tr(dt,function(){var pt=st.line,Lt=xe(st.line),Dt=vl(dt,Lt);if(Dt&&(oo(Dt),dt.curOp.selectionChanged=dt.curOp.forceUpdate=!0),dt.curOp.updateMaxLine=!0,!Nn(ct.doc,pt)&&ct.height!=null){var $t=ct.height;ct.height=null;var Vt=bs(ct)-$t;Vt&&qe(pt,pt.height+Vt)}ci(dt,"markerChanged",dt,it)})},ze.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||Ae(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},ze.prototype.detachLine=function(it){if(this.lines.splice(Ae(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},Zn(ze);function Qh(it,st,ct,dt,pt){if(dt&&dt.shared)return Yp(it,st,ct,dt,pt);if(it.cm&&!it.cm.curOp)return Gs(it.cm,Qh)(it,st,ct,dt,pt);var Lt=new ze(it,pt),Dt=Je(st,ct);if(dt&&ln(dt,Lt,!1),Dt>0||Dt==0&&Lt.clearWhenEmpty!==!1)return Lt;if(Lt.replacedWith&&(Lt.collapsed=!0,Lt.widgetNode=Me("span",[Lt.replacedWith],"CodeMirror-widget"),dt.handleMouseEvents||Lt.widgetNode.setAttribute("cm-ignore-events","true"),dt.insertLeft&&(Lt.widgetNode.insertLeft=!0)),Lt.collapsed){if(ir(it,st.line,st,ct,Lt)||st.line!=ct.line&&ir(it,ct.line,st,ct,Lt))throw new Error("Inserting collapsed marker partially overlapping an existing one");mn()}Lt.addToHistory&&pc(it,{from:st,to:ct,origin:"markText"},it.sel,NaN);var $t=st.line,Vt=it.cm,le;if(it.iter($t,ct.line+1,function(Pe){Vt&&Lt.collapsed&&!Vt.options.lineWrapping&&uo(Pe)==Vt.display.maxLine&&(le=!0),Lt.collapsed&&$t!=st.line&&qe(Pe,0),Dr(Pe,new po(Lt,$t==st.line?st.ch:null,$t==ct.line?ct.ch:null)),++$t}),Lt.collapsed&&it.iter(st.line,ct.line+1,function(Pe){Nn(it,Pe)&&qe(Pe,0)}),Lt.clearOnEnter&&se(Lt,"beforeCursorEnter",function(){return Lt.clear()}),Lt.readOnly&&(Vo(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Lt.collapsed&&(Lt.id=++Kp,Lt.atomic=!0),Vt){if(le&&(Vt.curOp.updateMaxLine=!0),Lt.collapsed)yo(Vt,st.line,ct.line+1);else if(Lt.className||Lt.startStyle||Lt.endStyle||Lt.css||Lt.attributes||Lt.title)for(var Ye=st.line;Ye<=ct.line;Ye++)Xi(Vt,Ye,"text");Lt.atomic&&vc(Vt.doc),ci(Vt,"markerAdded",Vt,Lt)}return Lt}var xu=function(it,st){this.markers=it,this.primary=st;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};xu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();ci(this,"clear")}},xu.prototype.find=function(it,st){return this.primary.find(it,st)},Zn(xu);function Yp(it,st,ct,dt,pt){dt=ln(dt),dt.shared=!1;var Lt=[Qh(it,st,ct,dt,pt)],Dt=Lt[0],$t=dt.widgetNode;return lu(it,function(Vt){$t&&(dt.widgetNode=$t.cloneNode(!0)),Lt.push(Qh(Vt,ui(Vt,st),ui(Vt,ct),dt,pt));for(var le=0;le<Vt.linked.length;++le)if(Vt.linked[le].isParent)return;Dt=fe(Lt)}),new xu(Lt,Dt)}function vg(it){return it.findMarks(_e(it.first,0),it.clipPos(_e(it.lastLine())),function(st){return st.parent})}function Xp(it,st){for(var ct=0;ct<st.length;ct++){var dt=st[ct],pt=dt.find(),Lt=it.clipPos(pt.from),Dt=it.clipPos(pt.to);if(Je(Lt,Dt)){var $t=Qh(it,Lt,Dt,dt.primary,dt.primary.type);dt.markers.push($t),$t.parent=dt}}}function yg(it){for(var st=function(dt){var pt=it[dt],Lt=[pt.primary.doc];lu(pt.primary.doc,function(Vt){return Lt.push(Vt)});for(var Dt=0;Dt<pt.markers.length;Dt++){var $t=pt.markers[Dt];Ae(Lt,$t.doc)==-1&&($t.parent=null,pt.markers.splice(Dt--,1))}},ct=0;ct<it.length;ct++)st(ct)}var tv=0,ma=function(it,st,ct,dt,pt){if(!(this instanceof ma))return new ma(it,st,ct,dt,pt);ct==null&&(ct=0),ps.call(this,[new Dd([new Br("",null)])]),this.first=ct,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ct;var Lt=_e(ct,0);this.sel=_u(Lt),this.history=new kd(null),this.id=++tv,this.modeOption=st,this.lineSep=dt,this.direction=pt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),of(this,{from:Lt,to:Lt,text:it}),Ea(this,_u(Lt),Fe)};ma.prototype=De(ps.prototype,{constructor:ma,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=Bn(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:Js(function(it){var st=_e(this.first,0),ct=this.first+this.size-1;mh(this,{from:st,to:_e(ct,Ve(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&Jo(this.cm,0,0),Ea(this,_u(st),Fe)}),replaceRange:function(it,st,ct,dt){st=ui(this,st),ct=ct?ui(this,ct):st,Xh(this,it,st,ct,dt)},getRange:function(it,st,ct){var dt=en(this,ui(this,it),ui(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(Mn(this,it))return Ve(this,it)},getLineNumber:function(it){return xe(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Ve(this,it)),uo(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return ui(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:Js(function(it,st,ct){$h(this,ui(this,typeof it=="number"?_e(it,st||0):it),null,ct)}),setSelection:Js(function(it,st,ct){$h(this,ui(this,it),ui(this,st||it),ct)}),extendSelection:Js(function(it,st,ct){uf(this,ui(this,it),st&&ui(this,st),ct)}),extendSelections:Js(function(it,st){Wp(this,to(this,it),st)}),extendSelectionsBy:Js(function(it,st){var ct=An(this.sel.ranges,it);Wp(this,to(this,ct),st)}),setSelections:Js(function(it,st,ct){if(it.length){for(var dt=[],pt=0;pt<it.length;pt++)dt[pt]=new Hr(ui(this,it[pt].anchor),ui(this,it[pt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Ea(this,Vl(this.cm,dt,st),ct)}}),addSelection:Js(function(it,st,ct){var dt=this.sel.ranges.slice(0);dt.push(new Hr(ui(this,it),ui(this,st||it))),Ea(this,Vl(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=en(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=en(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:Js(function(it,st,ct){for(var dt=[],pt=this.sel,Lt=0;Lt<pt.ranges.length;Lt++){var Dt=pt.ranges[Lt];dt[Lt]={from:Dt.from(),to:Dt.to(),text:this.splitLines(it[Lt]),origin:ct}}for(var $t=st&&st!="end"&&dc(this,dt,st),Vt=dt.length-1;Vt>=0;Vt--)mh(this,dt[Vt]);$t?hf(this,$t):this.cm&&Di(this.cm)}),undo:Js(function(){Pc(this,"undo")}),redo:Js(function(){Pc(this,"redo")}),undoSelection:Js(function(){Pc(this,"undo",!0)}),redoSelection:Js(function(){Pc(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 kd(this.history.maxGeneration),lu(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:Hu(this.history.done),undone:Hu(this.history.undone)}},setHistory:function(it){var st=this.history=new kd(this.history.maxGeneration);st.done=Hu(it.done.slice(0),null,!0),st.undone=Hu(it.undone.slice(0),null,!0)},setGutterMarker:Js(function(it,st,ct){return Jh(this,it,"gutter",function(dt){var pt=dt.gutterMarkers||(dt.gutterMarkers={});return pt[st]=ct,!ct&&ye(pt)&&(dt.gutterMarkers=null),!0})}),clearGutter:Js(function(it){var st=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&Jh(st,ct,"gutter",function(){return ct.gutterMarkers[it]=null,ye(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!Mn(this,it)||(st=it,it=Ve(this,it),!it))return null}else if(st=xe(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:Js(function(it,st,ct){return Jh(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(Ft(ct).test(dt[pt]))return!1;dt[pt]+=" "+ct}return!0})}),removeLineClass:Js(function(it,st,ct){return Jh(this,it,st=="gutter"?"gutter":"class",function(dt){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Lt=dt[pt];if(Lt)if(ct==null)dt[pt]=null;else{var Dt=Lt.match(Ft(ct));if(!Dt)return!1;var $t=Dt.index+Dt[0].length;dt[pt]=Lt.slice(0,Dt.index)+(!Dt.index||$t==Lt.length?"":" ")+Lt.slice($t)||null}else return!1;return!0})}),addLineWidget:Js(function(it,st,ct){return df(this,it,st,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ct){return Qh(this,ui(this,it),ui(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=ui(this,it),Qh(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=ui(this,it);var st=[],ct=Ve(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=ui(this,it),st=ui(this,st);var dt=[],pt=it.line;return this.iter(it.line,st.line+1,function(Lt){var Dt=Lt.markedSpans;if(Dt)for(var $t=0;$t<Dt.length;$t++){var Vt=Dt[$t];!(Vt.to!=null&&pt==it.line&&it.ch>=Vt.to||Vt.from==null&&pt!=it.line||Vt.from!=null&&pt==st.line&&Vt.from>=st.ch)&&(!ct||ct(Vt.marker))&&dt.push(Vt.marker.parent||Vt.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 Lt=pt.text.length+dt;if(Lt>it)return st=it,!0;it-=Lt,++ct}),ui(this,_e(ct,st))},indexFromPos:function(it){it=ui(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 ma(Bn(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 ma(Bn(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}],Xp(dt,vg(this)),dt},unlinkDoc:function(it){if(it instanceof Lr&&(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),yg(vg(this));break}}if(it.history==this.history){var dt=[it.id];lu(it,function(pt){return dt.push(pt.id)},!0),it.history=new kd(null),it.history.done=Hu(this.history.done,dt),it.history.undone=Hu(this.history.undone,dt)}},iterLinkedDocs:function(it){lu(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Ci(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Js(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&q0(this.cm))})}),ma.prototype.eachLine=ma.prototype.iter;var wc=0;function Sg(it){var st=this;if(qp(st),!(En(st,it)||fa(st.display,it))){$n(it),Ht&&(wc=+new Date);var ct=Ar(st,it,!0),dt=it.dataTransfer.files;if(!(!ct||st.isReadOnly()))if(dt&&dt.length&&window.FileReader&&window.File)for(var pt=dt.length,Lt=Array(pt),Dt=0,$t=function(){++Dt==pt&&Gs(st,function(){ct=ui(st.doc,ct);var yn={from:ct,to:ct,text:st.doc.splitLines(Lt.filter(function(Xn){return Xn!=null}).join(st.doc.lineSeparator())),origin:"paste"};mh(st.doc,yn),hf(st.doc,_u(ui(st.doc,ct),ui(st.doc,fh(yn))))})()},Vt=function(yn,Xn){if(st.options.allowDropFileTypes&&Ae(st.options.allowDropFileTypes,yn.type)==-1){$t();return}var ti=new FileReader;ti.onerror=function(){return $t()},ti.onload=function(){var mi=ti.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(mi)){$t();return}Lt[Xn]=mi,$t()},ti.readAsText(yn)},le=0;le<dt.length;le++)Vt(dt[le],le);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 Ye=it.dataTransfer.getData("Text");if(Ye){var Pe;if(st.state.draggingText&&!st.state.draggingText.copy&&(Pe=st.listSelections()),Kh(st.doc,_u(ct,ct)),Pe)for(var wn=0;wn<Pe.length;++wn)Xh(st.doc,"",Pe[wn].anchor,Pe[wn].head,"drag");st.replaceSelection(Ye,"around","paste"),st.display.input.focus()}}catch(yn){}}}}function Jp(it,st){if(Ht&&(!it.state.draggingText||+new Date-wc<100)){Bi(st);return}if(!(En(it,st)||fa(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!ue)){var ct=Xt("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Kt&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),st.dataTransfer.setDragImage(ct,0,0),Kt&&ct.parentNode.removeChild(ct)}}function Qp(it,st){var ct=Ar(it,st);if(ct){var dt=document.createDocumentFragment();sr(it,ct,dt),it.display.dragCursor||(it.display.dragCursor=Xt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),te(it.display.dragCursor,dt)}}function qp(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function tm(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 Lt=0;Lt<ct.length;Lt++)it(ct[Lt])})}}var xg=!1;function xl(){xg||(Id(),xg=!0)}function Id(){var it;se(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,tm(Pg)},100))}),se(window,"blur",function(){return tm(zu)})}function Pg(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var Pu={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"},Cc=0;Cc<10;Cc++)Pu[Cc+48]=Pu[Cc+96]=String(Cc);for(var cf=65;cf<=90;cf++)Pu[cf]=String.fromCharCode(cf);for(var Ec=1;Ec<=12;Ec++)Pu[Ec+111]=Pu[Ec+63235]="F"+Ec;var sl={};sl.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"},sl.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"},sl.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"},sl.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"]},sl.default=ht?sl.macDefault:sl.pcDefault;function wg(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ct,dt,pt,Lt,Dt=0;Dt<st.length-1;Dt++){var $t=st[Dt];if(/^(cmd|meta|m)$/i.test($t))Lt=!0;else if(/^a(lt)?$/i.test($t))ct=!0;else if(/^(c|ctrl|control)$/i.test($t))dt=!0;else if(/^s(hift)?$/i.test($t))pt=!0;else throw new Error("Unrecognized modifier name: "+$t)}return ct&&(it="Alt-"+it),dt&&(it="Ctrl-"+it),Lt&&(it="Cmd-"+it),pt&&(it="Shift-"+it),it}function Cg(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=An(ct.split(" "),wg),Lt=0;Lt<pt.length;Lt++){var Dt=void 0,$t=void 0;Lt==pt.length-1?($t=pt.join(" "),Dt=dt):($t=pt.slice(0,Lt+1).join(" "),Dt="...");var Vt=st[$t];if(!Vt)st[$t]=Dt;else if(Vt!=Dt)throw new Error("Inconsistent bindings for "+$t)}delete it[ct]}for(var le in st)it[le]=st[le];return it}function Ol(it,st,ct,dt){st=qh(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 Ol(it,st.fallthrough,ct,dt);for(var Lt=0;Lt<st.fallthrough.length;Lt++){var Dt=Ol(it,st.fallthrough[Lt],ct,dt);if(Dt)return Dt}}}function Rd(it){var st=typeof it=="string"?it:Pu[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Eg(it,st,ct){var dt=it;return st.altKey&&dt!="Alt"&&(it="Alt-"+it),(Ct?st.metaKey:st.ctrlKey)&&dt!="Ctrl"&&(it="Ctrl-"+it),(Ct?st.ctrlKey:st.metaKey)&&dt!="Mod"&&(it="Cmd-"+it),!ct&&st.shiftKey&&dt!="Shift"&&(it="Shift-"+it),it}function em(it,st){if(Kt&&it.keyCode==34&&it.char)return!1;var ct=Pu[it.keyCode];return ct==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ct=it.code),Eg(ct,it,st))}function qh(it){return typeof it=="string"?sl[it]:it}function al(it,st){for(var ct=it.doc.sel.ranges,dt=[],pt=0;pt<ct.length;pt++){for(var Lt=st(ct[pt]);dt.length&&Je(Lt.from,fe(dt).to)<=0;){var Dt=dt.pop();if(Je(Dt.from,Lt.from)<0){Lt.from=Dt.from;break}}dt.push(Lt)}Tr(it,function(){for(var $t=dt.length-1;$t>=0;$t--)Xh(it.doc,"",dt[$t].from,dt[$t].to,"+delete");Di(it)})}function bg(it,st,ct){var dt=Qt(it.text,st+ct,ct);return dt<0||dt>it.text.length?null:dt}function Fs(it,st,ct){var dt=bg(it,st.ch,ct);return dt==null?null:new _e(st.line,dt,ct<0?"after":"before")}function bc(it,st,ct,dt,pt){if(it){st.doc.direction=="rtl"&&(pt=-pt);var Lt=zt(ct,st.doc.direction);if(Lt){var Dt=pt<0?fe(Lt):Lt[0],$t=pt<0==(Dt.level==1),Vt=$t?"after":"before",le;if(Dt.level>0||st.doc.direction=="rtl"){var Ye=Ks(st,ct);le=pt<0?ct.text.length-1:0;var Pe=il(st,Ye,le).top;le=ce(function(wn){return il(st,Ye,wn).top==Pe},pt<0==(Dt.level==1)?Dt.from:Dt.to-1,le),Vt=="before"&&(le=bg(ct,le,1))}else le=pt<0?Dt.to:Dt.from;return new _e(dt,le,Vt)}}return new _e(dt,pt<0?ct.text.length:0,pt<0?"before":"after")}function ff(it,st,ct,dt){var pt=zt(st,it.doc.direction);if(!pt)return Fs(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 Lt=yt(pt,ct.ch,ct.sticky),Dt=pt[Lt];if(it.doc.direction=="ltr"&&Dt.level%2==0&&(dt>0?Dt.to>ct.ch:Dt.from<ct.ch))return Fs(st,ct,dt);var $t=function(Mi,ro){return bg(st,Mi instanceof _e?Mi.ch:Mi,ro)},Vt,le=function(Mi){return it.options.lineWrapping?(Vt=Vt||Ks(it,st),Ho(it,st,Vt,Mi)):{begin:0,end:st.text.length}},Ye=le(ct.sticky=="before"?$t(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Dt.level==1){var Pe=Dt.level==1==dt<0,wn=$t(ct,Pe?1:-1);if(wn!=null&&(Pe?wn<=Dt.to&&wn<=Ye.end:wn>=Dt.from&&wn>=Ye.begin)){var yn=Pe?"before":"after";return new _e(ct.line,wn,yn)}}var Xn=function(Mi,ro,Zi){for(var ho=function(rs,Zs){return Zs?new _e(ct.line,$t(rs,1),"before"):new _e(ct.line,rs,"after")};Mi>=0&&Mi<pt.length;Mi+=ro){var Zo=pt[Mi],zi=ro>0==(Zo.level!=1),ur=zi?Zi.begin:$t(Zi.end,-1);if(Zo.from<=ur&&ur<Zo.to||(ur=zi?Zo.from:$t(Zo.to,-1),Zi.begin<=ur&&ur<Zi.end))return ho(ur,zi)}},ti=Xn(Lt+dt,dt,Ye);if(ti)return ti;var mi=dt>0?Ye.end:$t(Ye.begin,-1);return mi!=null&&!(dt>0&&mi==st.text.length)&&(ti=Xn(dt>0?0:pt.length-1,dt,le(mi)),ti)?ti:null}var vh={selectAll:Ls,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Fe)},killLine:function(it){return al(it,function(st){if(st.empty()){var ct=Ve(it.doc,st.head.line).text.length;return st.head.ch==ct&&st.head.line<it.lastLine()?{from:st.head,to:_e(st.head.line+1,0)}:{from:st.head,to:_e(st.head.line,ct)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return al(it,function(st){return{from:_e(st.from().line,0),to:ui(it.doc,_e(st.to().line+1,0))}})},delLineLeft:function(it){return al(it,function(st){return{from:_e(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(_e(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(_e(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return jd(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Mg(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return zd(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")},rn)},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")},rn)},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/)?Mg(it,st.head):dt},rn)},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 Lt=ct[pt].from(),Dt=ie(it.getLine(Lt.line),Lt.ch,dt);st.push(We(dt-Dt%dt))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Tr(it,function(){for(var st=it.listSelections(),ct=[],dt=0;dt<st.length;dt++)if(st[dt].empty()){var pt=st[dt].head,Lt=Ve(it.doc,pt.line).text;if(Lt){if(pt.ch==Lt.length&&(pt=new _e(pt.line,pt.ch-1)),pt.ch>0)pt=new _e(pt.line,pt.ch+1),it.replaceRange(Lt.charAt(pt.ch-1)+Lt.charAt(pt.ch-2),_e(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Dt=Ve(it.doc,pt.line-1).text;Dt&&(pt=new _e(pt.line,1),it.replaceRange(Lt.charAt(0)+it.doc.lineSeparator()+Dt.charAt(Dt.length-1),_e(pt.line-1,Dt.length-1),pt,"+transpose"))}}ct.push(new Hr(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return Tr(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);Di(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function jd(it,st){var ct=Ve(it.doc,st),dt=uo(ct);return dt!=ct&&(st=xe(dt)),bc(!0,it,dt,st,1)}function zd(it,st){var ct=Ve(it.doc,st),dt=yr(ct);return dt!=ct&&(st=xe(dt)),bc(!0,it,ct,st,-1)}function Mg(it,st){var ct=jd(it,st.line),dt=Ve(it.doc,ct.line),pt=zt(dt,it.doc.direction);if(!pt||pt[0].level==0){var Lt=Math.max(ct.ch,dt.text.search(/\S/)),Dt=st.line==ct.line&&st.ch<=Lt&&st.ch;return _e(ct.line,Dt?0:Lt,ct.sticky)}return ct}function _d(it,st,ct){if(typeof st=="string"&&(st=vh[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)!=gn}finally{it.display.shift=dt,it.state.suppressEdits=!1}return pt}function Lg(it,st,ct){for(var dt=0;dt<it.state.keyMaps.length;dt++){var pt=Ol(st,it.state.keyMaps[dt],ct,it);if(pt)return pt}return it.options.extraKeys&&Ol(st,it.options.extraKeys,ct,it)||Ol(st,it.options.keyMap,ct,it)}var wu=new Gt;function td(it,st,ct,dt){var pt=it.state.keySeq;if(pt){if(Rd(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())}),gf(it,pt+" "+st,ct,dt))return!0}return gf(it,st,ct,dt)}function gf(it,st,ct,dt){var pt=Lg(it,st,dt);return pt=="multi"&&(it.state.keySeq=st),pt=="handled"&&ci(it,"keyHandled",it,st,ct),(pt=="handled"||pt=="multi")&&($n(ct),wr(it)),!!pt}function pf(it,st){var ct=em(st,!0);return ct?st.shiftKey&&!it.state.keySeq?td(it,"Shift-"+ct,st,function(dt){return _d(it,dt,!0)})||td(it,ct,st,function(dt){if(typeof dt=="string"?/^go[A-Z]/.test(dt):dt.motion)return _d(it,dt)}):td(it,ct,st,function(dt){return _d(it,dt)}):!1}function mf(it,st,ct){return td(it,"'"+ct+"'",st,function(dt){return _d(it,dt,!0)})}var ed=null;function Fg(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=ne(),!En(st,it))){Ht&&he<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;st.display.shift=ct==16||it.shiftKey;var dt=pf(st,it);Kt&&(ed=dt?ct:null,!dt&&ct==88&&!_i&&(ht?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),mt&&!ht&&!dt&&ct==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ct==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Bg(st)}}function Bg(it){var st=it.display.lineDiv;Ce(st,"CodeMirror-crosshair");function ct(dt){(dt.keyCode==18||!dt.altKey)&&(Ot(st,"CodeMirror-crosshair"),cn(document,"keyup",ct),cn(document,"mouseover",ct))}se(document,"keyup",ct),se(document,"mouseover",ct)}function Ng(it){it.keyCode==16&&(this.doc.sel.shift=!1),En(this,it)}function uu(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(fa(st.display,it)||En(st,it)||it.ctrlKey&&!it.altKey||ht&&it.metaKey)){var ct=it.keyCode,dt=it.charCode;if(Kt&&ct==ed){ed=null,$n(it);return}if(!(Kt&&(!it.which||it.which<10)&&pf(st,it))){var pt=String.fromCharCode(dt==null?ct:dt);pt!="\b"&&(mf(st,it,pt)||st.display.input.onKeyPress(it))}}}var nm=400,kg=function(it,st,ct){this.time=it,this.pos=st,this.button=ct};kg.prototype.compare=function(it,st,ct){return this.time+nm>it&&Je(st,this.pos)==0&&ct==this.button};var Hd,nd;function Ag(it,st){var ct=+new Date;return nd&&nd.compare(ct,it,st)?(Hd=nd=null,"triple"):Hd&&Hd.compare(ct,it,st)?(nd=new kg(ct,it,st),Hd=null,"double"):(Hd=new kg(ct,it,st),nd=null,"single")}function hu(it){var st=this,ct=st.display;if(!(En(st,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,fa(ct,it)){Rt||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!Sf(st,it)){var dt=Ar(st,it),pt=jn(it),Lt=dt?Ag(dt,pt):"single";window.focus(),pt==1&&st.state.selectingText&&st.state.selectingText(it),!(dt&&Tg(st,pt,dt,Lt,it))&&(pt==1?dt?im(st,dt,Lt,it):Ki(it)==ct.scroller&&$n(it):pt==2?(dt&&uf(st.doc,dt),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(Bt?st.display.input.onContextMenu(it):os(st)))}}}function Tg(it,st,ct,dt,pt){var Lt="Click";return dt=="double"?Lt="Double"+Lt:dt=="triple"&&(Lt="Triple"+Lt),Lt=(st==1?"Left":st==2?"Middle":"Right")+Lt,td(it,Eg(Lt,pt),pt,function(Dt){if(typeof Dt=="string"&&(Dt=vh[Dt]),!Dt)return!1;var $t=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),$t=Dt(it,ct)!=gn}finally{it.state.suppressEdits=!1}return $t})}function vf(it,st,ct){var dt=it.getOption("configureMouse"),pt=dt?dt(it,st,ct):{};if(pt.unit==null){var Lt=at?ct.shiftKey&&ct.metaKey:ct.altKey;pt.unit=Lt?"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 im(it,st,ct,dt){Ht?setTimeout(tn(Rr,it),0):it.curOp.focus=ne();var pt=vf(it,ct,dt),Lt=it.doc.sel,Dt;it.options.dragDrop&&Tn&&!it.isReadOnly()&&ct=="single"&&(Dt=Lt.contains(st))>-1&&(Je((Dt=Lt.ranges[Dt]).from(),st)<0||st.xRel>0)&&(Je(Dt.to(),st)>0||st.xRel<0)?Og(it,dt,st,pt):ev(it,dt,st,pt)}function Og(it,st,ct,dt){var pt=it.display,Lt=!1,Dt=Gs(it,function(le){Rt&&(pt.scroller.draggable=!1),it.state.draggingText=!1,cn(pt.wrapper.ownerDocument,"mouseup",Dt),cn(pt.wrapper.ownerDocument,"mousemove",$t),cn(pt.scroller,"dragstart",Vt),cn(pt.scroller,"drop",Dt),Lt||($n(le),dt.addNew||uf(it.doc,ct,null,null,dt.extend),Rt&&!ue||Ht&&he==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),$t=function(le){Lt=Lt||Math.abs(st.clientX-le.clientX)+Math.abs(st.clientY-le.clientY)>=10},Vt=function(){return Lt=!0};Rt&&(pt.scroller.draggable=!0),it.state.draggingText=Dt,Dt.copy=!dt.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),se(pt.wrapper.ownerDocument,"mouseup",Dt),se(pt.wrapper.ownerDocument,"mousemove",$t),se(pt.scroller,"dragstart",Vt),se(pt.scroller,"drop",Dt),os(it),setTimeout(function(){return pt.input.focus()},20)}function Dg(it,st,ct){if(ct=="char")return new Hr(st,st);if(ct=="word")return it.findWordAt(st);if(ct=="line")return new Hr(_e(st.line,0),ui(it.doc,_e(st.line+1,0)));var dt=ct(it,st);return new Hr(dt.from,dt.to)}function ev(it,st,ct,dt){var pt=it.display,Lt=it.doc;$n(st);var Dt,$t,Vt=Lt.sel,le=Vt.ranges;if(dt.addNew&&!dt.extend?($t=Lt.sel.contains(ct),$t>-1?Dt=le[$t]:Dt=new Hr(ct,ct)):(Dt=Lt.sel.primary(),$t=Lt.sel.primIndex),dt.unit=="rectangle")dt.addNew||(Dt=new Hr(ct,ct)),ct=Ar(it,st,!0,!0),$t=-1;else{var Ye=Dg(it,ct,dt.unit);dt.extend?Dt=lf(Dt,Ye.anchor,Ye.head,dt.extend):Dt=Ye}dt.addNew?$t==-1?($t=le.length,Ea(Lt,Vl(it,le.concat([Dt]),$t),{scroll:!1,origin:"*mouse"})):le.length>1&&le[$t].empty()&&dt.unit=="char"&&!dt.extend?(Ea(Lt,Vl(it,le.slice(0,$t).concat(le.slice($t+1)),0),{scroll:!1,origin:"*mouse"}),Vt=Lt.sel):ph(Lt,$t,Dt,Ke):($t=0,Ea(Lt,new Al([Dt],0),Ke),Vt=Lt.sel);var Pe=ct;function wn(Zi){if(Je(Pe,Zi)!=0)if(Pe=Zi,dt.unit=="rectangle"){for(var ho=[],Zo=it.options.tabSize,zi=ie(Ve(Lt,ct.line).text,ct.ch,Zo),ur=ie(Ve(Lt,Zi.line).text,Zi.ch,Zo),rs=Math.min(zi,ur),Zs=Math.max(zi,ur),ms=Math.min(ct.line,Zi.line),Ya=Math.min(it.lastLine(),Math.max(ct.line,Zi.line));ms<=Ya;ms++){var ba=Ve(Lt,ms).text,Rs=Fn(ba,rs,Zo);rs==Zs?ho.push(new Hr(_e(ms,Rs),_e(ms,Rs))):ba.length>Rs&&ho.push(new Hr(_e(ms,Rs),_e(ms,Fn(ba,Zs,Zo))))}ho.length||ho.push(new Hr(ct,ct)),Ea(Lt,Vl(it,Vt.ranges.slice(0,$t).concat(ho),$t),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Zi)}else{var ll=Dt,va=Dg(it,Zi,dt.unit),js=ll.anchor,Nr;Je(va.anchor,js)>0?(Nr=va.head,js=Kn(ll.from(),va.anchor)):(Nr=va.anchor,js=vi(ll.to(),va.head));var Ss=Vt.ranges.slice(0);Ss[$t]=om(it,new Hr(ui(Lt,js),Nr)),Ea(Lt,Vl(it,Ss,$t),Ke)}}var yn=pt.wrapper.getBoundingClientRect(),Xn=0;function ti(Zi){var ho=++Xn,Zo=Ar(it,Zi,!0,dt.unit=="rectangle");if(Zo)if(Je(Zo,Pe)!=0){it.curOp.focus=ne(),wn(Zo);var zi=fr(pt,Lt);(Zo.line>=zi.to||Zo.line<zi.from)&&setTimeout(Gs(it,function(){Xn==ho&&ti(Zi)}),150)}else{var ur=Zi.clientY<yn.top?-20:Zi.clientY>yn.bottom?20:0;ur&&setTimeout(Gs(it,function(){Xn==ho&&(pt.scroller.scrollTop+=ur,ti(Zi))}),50)}}function mi(Zi){it.state.selectingText=!1,Xn=1/0,Zi&&($n(Zi),pt.input.focus()),cn(pt.wrapper.ownerDocument,"mousemove",Mi),cn(pt.wrapper.ownerDocument,"mouseup",ro),Lt.history.lastSelOrigin=null}var Mi=Gs(it,function(Zi){Zi.buttons===0||!jn(Zi)?mi(Zi):ti(Zi)}),ro=Gs(it,mi);it.state.selectingText=ro,se(pt.wrapper.ownerDocument,"mousemove",Mi),se(pt.wrapper.ownerDocument,"mouseup",ro)}function om(it,st){var ct=st.anchor,dt=st.head,pt=Ve(it.doc,ct.line);if(Je(ct,dt)==0&&ct.sticky==dt.sticky)return st;var Lt=zt(pt);if(!Lt)return st;var Dt=yt(Lt,ct.ch,ct.sticky),$t=Lt[Dt];if($t.from!=ct.ch&&$t.to!=ct.ch)return st;var Vt=Dt+($t.from==ct.ch==($t.level!=1)?0:1);if(Vt==0||Vt==Lt.length)return st;var le;if(dt.line!=ct.line)le=(dt.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var Ye=yt(Lt,dt.ch,dt.sticky),Pe=Ye-Dt||(dt.ch-ct.ch)*($t.level==1?-1:1);Ye==Vt-1||Ye==Vt?le=Pe<0:le=Pe>0}var wn=Lt[Vt+(le?-1:0)],yn=le==(wn.level==1),Xn=yn?wn.from:wn.to,ti=yn?"after":"before";return ct.ch==Xn&&ct.sticky==ti?st:new Hr(new _e(ct.line,Xn,ti),dt)}function yf(it,st,ct,dt){var pt,Lt;if(st.touches)pt=st.touches[0].clientX,Lt=st.touches[0].clientY;else try{pt=st.clientX,Lt=st.clientY}catch(wn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;dt&&$n(st);var Dt=it.display,$t=Dt.lineDiv.getBoundingClientRect();if(Lt>$t.bottom||!zn(it,ct))return ei(st);Lt-=$t.top-Dt.viewOffset;for(var Vt=0;Vt<it.display.gutterSpecs.length;++Vt){var le=Dt.gutters.childNodes[Vt];if(le&&le.getBoundingClientRect().right>=pt){var Ye=an(it.doc,Lt),Pe=it.display.gutterSpecs[Vt];return sn(it,ct,it,Ye,Pe.className,st),ei(st)}}}function Sf(it,st){return yf(it,st,"gutterClick",!0)}function xf(it,st){fa(it.display,st)||rm(it,st)||En(it,st,"contextmenu")||Bt||it.display.input.onContextMenu(st)}function rm(it,st){return zn(it,"gutterContextMenu")?yf(it,st,"gutterContextMenu",!1):!1}function Pf(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mo(it)}var yh={toString:function(){return"CodeMirror.Init"}},Ig={},Mc={};function sm(it){var st=it.optionHandlers;function ct(dt,pt,Lt,Dt){it.defaults[dt]=pt,Lt&&(st[dt]=Dt?function($t,Vt,le){le!=yh&&Lt($t,Vt,le)}:Lt)}it.defineOption=ct,it.Init=yh,ct("value","",function(dt,pt){return dt.setValue(pt)},!0),ct("mode",null,function(dt,pt){dt.doc.modeOption=pt,lr(dt)},!0),ct("indentUnit",2,lr,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(dt){cc(dt),mo(dt),yo(dt)},!0),ct("lineSeparator",null,function(dt,pt){if(dt.doc.lineSep=pt,!!pt){var Lt=[],Dt=dt.doc.first;dt.doc.iter(function(Vt){for(var le=0;;){var Ye=Vt.text.indexOf(pt,le);if(Ye==-1)break;le=Ye+pt.length,Lt.push(_e(Dt,Ye))}Dt++});for(var $t=Lt.length-1;$t>=0;$t--)Xh(dt.doc,pt,Lt[$t],_e(Lt[$t].line,Lt[$t].ch+pt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(dt,pt,Lt){dt.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),Lt!=yh&&dt.refresh()}),ct("specialCharPlaceholder",ds,function(dt){return dt.refresh()},!0),ct("electricChars",!0),ct("inputStyle",et?"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",!ft),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(dt){Pf(dt),yl(dt)},!0),ct("keyMap","default",function(dt,pt,Lt){var Dt=qh(pt),$t=Lt!=yh&&qh(Lt);$t&&$t.detach&&$t.detach(dt,Dt),Dt.attach&&Dt.attach(dt,$t||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,am,!0),ct("gutters",[],function(dt,pt){dt.display.gutterSpecs=qs(pt,dt.options.lineNumbers),yl(dt)},!0),ct("fixedGutter",!0,function(dt,pt){dt.display.gutters.style.left=pt?Vr(dt.display)+"px":"0",dt.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(dt){return ru(dt)},!0),ct("scrollbarStyle","native",function(dt){ol(dt),ru(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=qs(dt.options.gutters,pt),yl(dt)},!0),ct("firstLineNumber",1,yl,!0),ct("lineNumberFormatter",function(dt){return dt},yl,!0),ct("showCursorWhenSelecting",!1,fs,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(dt,pt){pt=="nocursor"&&(zu(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,wf),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,fs,!0),ct("singleCursorHeightPerLine",!0,fs,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,cc,!0),ct("addModeClass",!1,cc,!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,cc,!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 wf(it,st,ct){var dt=ct&&ct!=yh;if(!st!=!dt){var pt=it.display.dragFunctions,Lt=st?se:cn;Lt(it.display.scroller,"dragstart",pt.start),Lt(it.display.scroller,"dragenter",pt.enter),Lt(it.display.scroller,"dragover",pt.over),Lt(it.display.scroller,"dragleave",pt.leave),Lt(it.display.scroller,"drop",pt.drop)}}function am(it){it.options.lineWrapping?(Ce(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ot(it.display.wrapper,"CodeMirror-wrap"),pr(it)),si(it),yo(it),mo(it),setTimeout(function(){return ru(it)},100)}function Lr(it,st){var ct=this;if(!(this instanceof Lr))return new Lr(it,st);this.options=st=st?ln(st):{},ln(Ig,st,!1);var dt=st.value;typeof dt=="string"?dt=new ma(dt,st.mode,null,st.lineSeparator,st.direction):st.mode&&(dt.modeOption=st.mode),this.doc=dt;var pt=new Lr.inputStyles[st.inputStyle](this),Lt=this.display=new ch(it,dt,pt,st);Lt.wrapper.CodeMirror=this,Pf(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ol(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 Gt,keySeq:null,specialChars:null},st.autofocus&&!et&&Lt.input.focus(),Ht&&he<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Gd(this),xl(),Da(this),this.curOp.forceUpdate=!0,rf(this,dt),st.autofocus&&!et||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&Sr(ct)},20):zu(this);for(var Dt in Mc)Mc.hasOwnProperty(Dt)&&Mc[Dt](this,st[Dt],yh);As(this),st.finishInit&&st.finishInit(this);for(var $t=0;$t<id.length;++$t)id[$t](this);kl(this),Rt&&st.lineWrapping&&getComputedStyle(Lt.lineDiv).textRendering=="optimizelegibility"&&(Lt.lineDiv.style.textRendering="auto")}Lr.defaults=Ig,Lr.optionHandlers=Mc;function Gd(it){var st=it.display;se(st.scroller,"mousedown",Gs(it,hu)),Ht&&he<11?se(st.scroller,"dblclick",Gs(it,function(Vt){if(!En(it,Vt)){var le=Ar(it,Vt);if(!(!le||Sf(it,Vt)||fa(it.display,Vt))){$n(Vt);var Ye=it.findWordAt(le);uf(it.doc,Ye.anchor,Ye.head)}}})):se(st.scroller,"dblclick",function(Vt){return En(it,Vt)||$n(Vt)}),se(st.scroller,"contextmenu",function(Vt){return xf(it,Vt)}),se(st.input.getField(),"contextmenu",function(Vt){st.scroller.contains(Vt.target)||xf(it,Vt)});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 Lt(Vt){if(Vt.touches.length!=1)return!1;var le=Vt.touches[0];return le.radiusX<=1&&le.radiusY<=1}function Dt(Vt,le){if(le.left==null)return!0;var Ye=le.left-Vt.left,Pe=le.top-Vt.top;return Ye*Ye+Pe*Pe>20*20}se(st.scroller,"touchstart",function(Vt){if(!En(it,Vt)&&!Lt(Vt)&&!Sf(it,Vt)){st.input.ensurePolled(),clearTimeout(ct);var le=+new Date;st.activeTouch={start:le,moved:!1,prev:le-dt.end<=300?dt:null},Vt.touches.length==1&&(st.activeTouch.left=Vt.touches[0].pageX,st.activeTouch.top=Vt.touches[0].pageY)}}),se(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),se(st.scroller,"touchend",function(Vt){var le=st.activeTouch;if(le&&!fa(st,Vt)&&le.left!=null&&!le.moved&&new Date-le.start<300){var Ye=it.coordsChar(st.activeTouch,"page"),Pe;!le.prev||Dt(le,le.prev)?Pe=new Hr(Ye,Ye):!le.prev.prev||Dt(le,le.prev.prev)?Pe=it.findWordAt(Ye):Pe=new Hr(_e(Ye.line,0),ui(it.doc,_e(Ye.line+1,0))),it.setSelection(Pe.anchor,Pe.head),it.focus(),$n(Vt)}pt()}),se(st.scroller,"touchcancel",pt),se(st.scroller,"scroll",function(){st.scroller.clientHeight&&(Kr(it,st.scroller.scrollTop),$o(it,st.scroller.scrollLeft,!0),sn(it,"scroll",it))}),se(st.scroller,"mousewheel",function(Vt){return ta(it,Vt)}),se(st.scroller,"DOMMouseScroll",function(Vt){return ta(it,Vt)}),se(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Vt){En(it,Vt)||Bi(Vt)},over:function(Vt){En(it,Vt)||(Qp(it,Vt),Bi(Vt))},start:function(Vt){return Jp(it,Vt)},drop:Gs(it,Sg),leave:function(Vt){En(it,Vt)||qp(it)}};var $t=st.input.getField();se($t,"keyup",function(Vt){return Ng.call(it,Vt)}),se($t,"keydown",Gs(it,Fg)),se($t,"keypress",Gs(it,uu)),se($t,"focus",function(Vt){return Sr(it,Vt)}),se($t,"blur",function(Vt){return zu(it,Vt)})}var id=[];Lr.defineInitHook=function(it){return id.push(it)};function Ws(it,st,ct,dt){var pt=it.doc,Lt;ct==null&&(ct="add"),ct=="smart"&&(pt.mode.indent?Lt=Ii(it,st).state:ct="prev");var Dt=it.options.tabSize,$t=Ve(pt,st),Vt=ie($t.text,null,Dt);$t.stateAfter&&($t.stateAfter=null);var le=$t.text.match(/^\s*/)[0],Ye;if(!dt&&!/\S/.test($t.text))Ye=0,ct="not";else if(ct=="smart"&&(Ye=pt.mode.indent(Lt,$t.text.slice(le.length),$t.text),Ye==gn||Ye>150)){if(!dt)return;ct="prev"}ct=="prev"?st>pt.first?Ye=ie(Ve(pt,st-1).text,null,Dt):Ye=0:ct=="add"?Ye=Vt+it.options.indentUnit:ct=="subtract"?Ye=Vt-it.options.indentUnit:typeof ct=="number"&&(Ye=Vt+ct),Ye=Math.max(0,Ye);var Pe="",wn=0;if(it.options.indentWithTabs)for(var yn=Math.floor(Ye/Dt);yn;--yn)wn+=Dt,Pe+=" ";if(wn<Ye&&(Pe+=We(Ye-wn)),Pe!=le)return Xh(pt,Pe,_e(st,0),_e(st,le.length),"+input"),$t.stateAfter=null,!0;for(var Xn=0;Xn<pt.sel.ranges.length;Xn++){var ti=pt.sel.ranges[Xn];if(ti.head.line==st&&ti.head.ch<le.length){var mi=_e(st,le.length);ph(pt,Xn,new Hr(mi,mi));break}}}var Ka=null;function od(it){Ka=it}function Lc(it,st,ct,dt,pt){var Lt=it.doc;it.display.shift=!1,dt||(dt=Lt.sel);var Dt=+new Date-200,$t=pt=="paste"||it.state.pasteIncoming>Dt,Vt=Ci(st),le=null;if($t&&dt.ranges.length>1)if(Ka&&Ka.text.join(`
`)==st){if(dt.ranges.length%Ka.text.length==0){le=[];for(var Ye=0;Ye<Ka.text.length;Ye++)le.push(Lt.splitLines(Ka.text[Ye]))}}else Vt.length==dt.ranges.length&&it.options.pasteLinesPerSelection&&(le=An(Vt,function(Mi){return[Mi]}));for(var Pe=it.curOp.updateInput,wn=dt.ranges.length-1;wn>=0;wn--){var yn=dt.ranges[wn],Xn=yn.from(),ti=yn.to();yn.empty()&&(ct&&ct>0?Xn=_e(Xn.line,Xn.ch-ct):it.state.overwrite&&!$t?ti=_e(ti.line,Math.min(Ve(Lt,ti.line).text.length,ti.ch+fe(Vt).length)):$t&&Ka&&Ka.lineWise&&Ka.text.join(`
`)==Vt.join(`
`)&&(Xn=ti=_e(Xn.line,0)));var mi={from:Xn,to:ti,text:le?le[wn%le.length]:Vt,origin:pt||($t?"paste":it.state.cutIncoming>Dt?"cut":"+input")};mh(it.doc,mi),ci(it,"inputRead",it,mi)}st&&!$t&&jg(it,st),Di(it),it.curOp.updateInput<2&&(it.curOp.updateInput=Pe),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Rg(it,st){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&Tr(st,function(){return Lc(st,ct,0,null,"paste")}),!0}function jg(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 Lt=it.getModeAt(pt.head),Dt=!1;if(Lt.electricChars){for(var $t=0;$t<Lt.electricChars.length;$t++)if(st.indexOf(Lt.electricChars.charAt($t))>-1){Dt=Ws(it,pt.head.line,"smart");break}}else Lt.electricInput&&Lt.electricInput.test(Ve(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Dt=Ws(it,pt.head.line,"smart"));Dt&&ci(it,"electricInput",it,pt.head.line)}}}function zg(it){for(var st=[],ct=[],dt=0;dt<it.doc.sel.ranges.length;dt++){var pt=it.doc.sel.ranges[dt].head.line,Lt={anchor:_e(pt,0),head:_e(pt+1,0)};ct.push(Lt),st.push(it.getRange(Lt.anchor,Lt.head))}return{text:st,ranges:ct}}function _g(it,st,ct,dt){it.setAttribute("autocorrect",ct?"":"off"),it.setAttribute("autocapitalize",dt?"":"off"),it.setAttribute("spellcheck",!!st)}function Hg(){var it=Xt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=Xt("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Rt?it.style.width="1000px":it.setAttribute("wrap","off"),At&&(it.style.border="1px solid black"),_g(it),st}function Sh(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 Lt=this.options,Dt=Lt[dt];Lt[dt]==pt&&dt!="mode"||(Lt[dt]=pt,st.hasOwnProperty(dt)&&Gs(this,st[dt])(this,pt,Dt),sn(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"](qh(dt))},removeKeyMap:function(dt){for(var pt=this.state.keyMaps,Lt=0;Lt<pt.length;++Lt)if(pt[Lt]==dt||pt[Lt].name==dt)return pt.splice(Lt,1),!0},addOverlay:Xs(function(dt,pt){var Lt=dt.token?dt:it.getMode(this.options,dt);if(Lt.startState)throw new Error("Overlays may not be stateful.");Hn(this.state.overlays,{mode:Lt,modeSpec:dt,opaque:pt&&pt.opaque,priority:pt&&pt.priority||0},function(Dt){return Dt.priority}),this.state.modeGen++,yo(this)}),removeOverlay:Xs(function(dt){for(var pt=this.state.overlays,Lt=0;Lt<pt.length;++Lt){var Dt=pt[Lt].modeSpec;if(Dt==dt||typeof dt=="string"&&Dt.name==dt){pt.splice(Lt,1),this.state.modeGen++,yo(this);return}}}),indentLine:Xs(function(dt,pt,Lt){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),Mn(this.doc,dt)&&Ws(this,dt,pt,Lt)}),indentSelection:Xs(function(dt){for(var pt=this.doc.sel.ranges,Lt=-1,Dt=0;Dt<pt.length;Dt++){var $t=pt[Dt];if($t.empty())$t.head.line>Lt&&(Ws(this,$t.head.line,dt,!0),Lt=$t.head.line,Dt==this.doc.sel.primIndex&&Di(this));else{var Vt=$t.from(),le=$t.to(),Ye=Math.max(Lt,Vt.line);Lt=Math.min(this.lastLine(),le.line-(le.ch?0:1))+1;for(var Pe=Ye;Pe<Lt;++Pe)Ws(this,Pe,dt);var wn=this.doc.sel.ranges;Vt.ch==0&&pt.length==wn.length&&wn[Dt].from().ch>0&&ph(this.doc,Dt,new Hr(Vt,wn[Dt].to()),Fe)}}}),getTokenAt:function(dt,pt){return no(this,dt,pt)},getLineTokens:function(dt,pt){return no(this,_e(dt),pt,!0)},getTokenTypeAt:function(dt){dt=ui(this.doc,dt);var pt=Ao(this,Ve(this.doc,dt.line)),Lt=0,Dt=(pt.length-1)/2,$t=dt.ch,Vt;if($t==0)Vt=pt[2];else for(;;){var le=Lt+Dt>>1;if((le?pt[le*2-1]:0)>=$t)Dt=le;else if(pt[le*2+1]<$t)Lt=le+1;else{Vt=pt[le*2+2];break}}var Ye=Vt?Vt.indexOf("overlay "):-1;return Ye<0?Vt:Ye==0?null:Vt.slice(0,Ye-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 Lt=[];if(!ct.hasOwnProperty(pt))return Lt;var Dt=ct[pt],$t=this.getModeAt(dt);if(typeof $t[pt]=="string")Dt[$t[pt]]&&Lt.push(Dt[$t[pt]]);else if($t[pt])for(var Vt=0;Vt<$t[pt].length;Vt++){var le=Dt[$t[pt][Vt]];le&&Lt.push(le)}else $t.helperType&&Dt[$t.helperType]?Lt.push(Dt[$t.helperType]):Dt[$t.name]&&Lt.push(Dt[$t.name]);for(var Ye=0;Ye<Dt._global.length;Ye++){var Pe=Dt._global[Ye];Pe.pred($t,this)&&Ae(Lt,Pe.val)==-1&&Lt.push(Pe.val)}return Lt},getStateAfter:function(dt,pt){var Lt=this.doc;return dt=oi(Lt,dt==null?Lt.first+Lt.size-1:dt),Ii(this,dt+1,pt).state},cursorCoords:function(dt,pt){var Lt,Dt=this.doc.sel.primary();return dt==null?Lt=Dt.head:typeof dt=="object"?Lt=ui(this.doc,dt):Lt=dt?Dt.from():Dt.to(),vo(this,Lt,pt||"page")},charCoords:function(dt,pt){return dr(this,ui(this.doc,dt),pt||"page")},coordsChar:function(dt,pt){return dt=Uo(this,dt,pt||"page"),xr(this,dt.left,dt.top)},lineAtHeight:function(dt,pt){return dt=Uo(this,{top:dt,left:0},pt||"page").top,an(this.doc,dt+this.display.viewOffset)},heightAtLine:function(dt,pt,Lt){var Dt=!1,$t;if(typeof dt=="number"){var Vt=this.doc.first+this.doc.size-1;dt<this.doc.first?dt=this.doc.first:dt>Vt&&(dt=Vt,Dt=!0),$t=Ve(this.doc,dt)}else $t=dt;return Qi(this,$t,{top:0,left:0},pt||"page",Lt||Dt).top+(Dt?this.doc.height-or($t):0)},defaultTextHeight:function(){return Wi(this.display)},defaultCharWidth:function(){return rr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(dt,pt,Lt,Dt,$t){var Vt=this.display;dt=vo(this,ui(this.doc,dt));var le=dt.bottom,Ye=dt.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Vt.sizer.appendChild(pt),Dt=="over")le=dt.top;else if(Dt=="above"||Dt=="near"){var Pe=Math.max(Vt.wrapper.clientHeight,this.doc.height),wn=Math.max(Vt.sizer.clientWidth,Vt.lineSpace.clientWidth);(Dt=="above"||dt.bottom+pt.offsetHeight>Pe)&&dt.top>pt.offsetHeight?le=dt.top-pt.offsetHeight:dt.bottom+pt.offsetHeight<=Pe&&(le=dt.bottom),Ye+pt.offsetWidth>wn&&(Ye=wn-pt.offsetWidth)}pt.style.top=le+"px",pt.style.left=pt.style.right="",$t=="right"?(Ye=Vt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):($t=="left"?Ye=0:$t=="middle"&&(Ye=(Vt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=Ye+"px"),Lt&&ah(this,{left:Ye,top:le,right:Ye+pt.offsetWidth,bottom:le+pt.offsetHeight})},triggerOnKeyDown:Xs(Fg),triggerOnKeyPress:Xs(uu),triggerOnKeyUp:Ng,triggerOnMouseDown:Xs(hu),execCommand:function(dt){if(vh.hasOwnProperty(dt))return vh[dt].call(null,this)},triggerElectric:Xs(function(dt){jg(this,dt)}),findPosH:function(dt,pt,Lt,Dt){var $t=1;pt<0&&($t=-1,pt=-pt);for(var Vt=ui(this.doc,dt),le=0;le<pt&&(Vt=Fc(this.doc,Vt,$t,Lt,Dt),!Vt.hitSide);++le);return Vt},moveH:Xs(function(dt,pt){var Lt=this;this.extendSelectionsBy(function(Dt){return Lt.display.shift||Lt.doc.extend||Dt.empty()?Fc(Lt.doc,Dt.head,dt,pt,Lt.options.rtlMoveVisually):dt<0?Dt.from():Dt.to()},rn)}),deleteH:Xs(function(dt,pt){var Lt=this.doc.sel,Dt=this.doc;Lt.somethingSelected()?Dt.replaceSelection("",null,"+delete"):al(this,function($t){var Vt=Fc(Dt,$t.head,dt,pt,!1);return dt<0?{from:Vt,to:$t.head}:{from:$t.head,to:Vt}})}),findPosV:function(dt,pt,Lt,Dt){var $t=1,Vt=Dt;pt<0&&($t=-1,pt=-pt);for(var le=ui(this.doc,dt),Ye=0;Ye<pt;++Ye){var Pe=vo(this,le,"div");if(Vt==null?Vt=Pe.left:Pe.left=Vt,le=xh(this,Pe,$t,Lt),le.hitSide)break}return le},moveV:Xs(function(dt,pt){var Lt=this,Dt=this.doc,$t=[],Vt=!this.display.shift&&!Dt.extend&&Dt.sel.somethingSelected();if(Dt.extendSelectionsBy(function(Ye){if(Vt)return dt<0?Ye.from():Ye.to();var Pe=vo(Lt,Ye.head,"div");Ye.goalColumn!=null&&(Pe.left=Ye.goalColumn),$t.push(Pe.left);var wn=xh(Lt,Pe,dt,pt);return pt=="page"&&Ye==Dt.sel.primary()&&kn(Lt,dr(Lt,wn,"div").top-Pe.top),wn},rn),$t.length)for(var le=0;le<Dt.sel.ranges.length;le++)Dt.sel.ranges[le].goalColumn=$t[le]}),findWordAt:function(dt){var pt=this.doc,Lt=Ve(pt,dt.line).text,Dt=dt.ch,$t=dt.ch;if(Lt){var Vt=this.getHelper(dt,"wordChars");(dt.sticky=="before"||$t==Lt.length)&&Dt?--Dt:++$t;for(var le=Lt.charAt(Dt),Ye=Jt(le,Vt)?function(Pe){return Jt(Pe,Vt)}:/\s/.test(le)?function(Pe){return/\s/.test(Pe)}:function(Pe){return!/\s/.test(Pe)&&!Jt(Pe)};Dt>0&&Ye(Lt.charAt(Dt-1));)--Dt;for(;$t<Lt.length&&Ye(Lt.charAt($t));)++$t}return new Hr(_e(dt.line,Dt),_e(dt.line,$t))},toggleOverwrite:function(dt){dt!=null&&dt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ce(this.display.cursorDiv,"CodeMirror-overwrite"):Ot(this.display.cursorDiv,"CodeMirror-overwrite"),sn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ne()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Xs(function(dt,pt){Jo(this,dt,pt)}),getScrollInfo:function(){var dt=this.display.scroller;return{left:dt.scrollLeft,top:dt.scrollTop,height:dt.scrollHeight-ga(this)-this.display.barHeight,width:dt.scrollWidth-ga(this)-this.display.barWidth,clientHeight:yu(this),clientWidth:Oa(this)}},scrollIntoView:Xs(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:_e(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?wi(this,dt):Cr(this,dt.from,dt.to,dt.margin)}),setSize:Xs(function(dt,pt){var Lt=this,Dt=function(Vt){return typeof Vt=="number"||/^\d+$/.test(String(Vt))?Vt+"px":Vt};dt!=null&&(this.display.wrapper.style.width=Dt(dt)),pt!=null&&(this.display.wrapper.style.height=Dt(pt)),this.options.lineWrapping&&Ui(this);var $t=this.display.viewFrom;this.doc.iter($t,this.display.viewTo,function(Vt){if(Vt.widgets){for(var le=0;le<Vt.widgets.length;le++)if(Vt.widgets[le].noHScroll){Xi(Lt,$t,"widget");break}}++$t}),this.curOp.forceUpdate=!0,sn(this,"refresh",this)}),operation:function(dt){return Tr(this,dt)},startOperation:function(){return Da(this)},endOperation:function(){return kl(this)},refresh:Xs(function(){var dt=this.display.cachedTextHeight;yo(this),this.curOp.forceUpdate=!0,mo(this),Jo(this,this.doc.scrollLeft,this.doc.scrollTop),hh(this.display),(dt==null||Math.abs(dt-Wi(this.display))>.5||this.options.lineWrapping)&&si(this),sn(this,"refresh",this)}),swapDoc:Xs(function(dt){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),rf(this,dt),mo(this),this.display.input.reset(),Jo(this,dt.scrollLeft,dt.scrollTop),this.curOp.forceScroll=!0,ci(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}},Zn(it),it.registerHelper=function(dt,pt,Lt){ct.hasOwnProperty(dt)||(ct[dt]=it[dt]={_global:[]}),ct[dt][pt]=Lt},it.registerGlobalHelper=function(dt,pt,Lt,Dt){it.registerHelper(dt,pt,Dt),ct[dt]._global.push({pred:Lt,val:Dt})}}function Fc(it,st,ct,dt,pt){var Lt=st,Dt=ct,$t=Ve(it,st.line),Vt=pt&&it.direction=="rtl"?-ct:ct;function le(){var ro=st.line+Vt;return ro<it.first||ro>=it.first+it.size?!1:(st=new _e(ro,st.ch,st.sticky),$t=Ve(it,ro))}function Ye(ro){var Zi;if(dt=="codepoint"){var ho=$t.text.charCodeAt(st.ch+(dt>0?0:-1));isNaN(ho)?Zi=null:Zi=new _e(st.line,Math.max(0,Math.min($t.text.length,st.ch+ct*(ho>=55296&&ho<56320?2:1))),-ct)}else pt?Zi=ff(it.cm,$t,st,ct):Zi=Fs($t,st,ct);if(Zi==null)if(!ro&&le())st=bc(pt,it.cm,$t,st.line,Vt);else return!1;else st=Zi;return!0}if(dt=="char"||dt=="codepoint")Ye();else if(dt=="column")Ye(!0);else if(dt=="word"||dt=="group")for(var Pe=null,wn=dt=="group",yn=it.cm&&it.cm.getHelper(st,"wordChars"),Xn=!0;!(ct<0&&!Ye(!Xn));Xn=!1){var ti=$t.text.charAt(st.ch)||`
`,mi=Jt(ti,yn)?"w":wn&&ti==`
`?"n":!wn||/\s/.test(ti)?null:"p";if(wn&&!Xn&&!mi&&(mi="s"),Pe&&Pe!=mi){ct<0&&(ct=1,Ye(),st.sticky="after");break}if(mi&&(Pe=mi),ct>0&&!Ye(!Xn))break}var Mi=Sc(it,st,Lt,Dt,!0);return hi(Lt,Mi)&&(Mi.hitSide=!0),Mi}function xh(it,st,ct,dt){var pt=it.doc,Lt=st.left,Dt;if(dt=="page"){var $t=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Vt=Math.max($t-.5*Wi(it.display),3);Dt=(ct>0?st.bottom:st.top)+ct*Vt}else dt=="line"&&(Dt=ct>0?st.bottom+3:st.top-3);for(var le;le=xr(it,Lt,Dt),!!le.outside;){if(ct<0?Dt<=0:Dt>=pt.height){le.hitSide=!0;break}Dt+=ct*5}return le}var Yr=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Gt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Yr.prototype.init=function(it){var st=this,ct=this,dt=ct.cm,pt=ct.div=it.lineDiv;_g(pt,dt.options.spellcheck,dt.options.autocorrect,dt.options.autocapitalize);function Lt($t){for(var Vt=$t.target;Vt;Vt=Vt.parentNode){if(Vt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Vt.className))break}return!1}se(pt,"paste",function($t){!Lt($t)||En(dt,$t)||Rg($t,dt)||he<=11&&setTimeout(Gs(dt,function(){return st.updateFromDOM()}),20)}),se(pt,"compositionstart",function($t){st.composing={data:$t.data,done:!1}}),se(pt,"compositionupdate",function($t){st.composing||(st.composing={data:$t.data,done:!1})}),se(pt,"compositionend",function($t){st.composing&&($t.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),se(pt,"touchstart",function(){return ct.forceCompositionEnd()}),se(pt,"input",function(){st.composing||st.readFromDOMSoon()});function Dt($t){if(!(!Lt($t)||En(dt,$t))){if(dt.somethingSelected())od({lineWise:!1,text:dt.getSelections()}),$t.type=="cut"&&dt.replaceSelection("",null,"cut");else if(dt.options.lineWiseCopyCut){var Vt=zg(dt);od({lineWise:!0,text:Vt.text}),$t.type=="cut"&&dt.operation(function(){dt.setSelections(Vt.ranges,0,Fe),dt.replaceSelection("",null,"cut")})}else return;if($t.clipboardData){$t.clipboardData.clearData();var le=Ka.text.join(`
`);if($t.clipboardData.setData("Text",le),$t.clipboardData.getData("Text")==le){$t.preventDefault();return}}var Ye=Hg(),Pe=Ye.firstChild;dt.display.lineSpace.insertBefore(Ye,dt.display.lineSpace.firstChild),Pe.value=Ka.text.join(`
`);var wn=document.activeElement;Ze(Pe),setTimeout(function(){dt.display.lineSpace.removeChild(Ye),wn.focus(),wn==pt&&ct.showPrimarySelection()},50)}}se(pt,"copy",Dt),se(pt,"cut",Dt)},Yr.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Yr.prototype.prepareSelection=function(){var it=Nl(this.cm,!1);return it.focus=document.activeElement==this.div,it},Yr.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Yr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Yr.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 Lt=Bc(st,it.anchorNode,it.anchorOffset),Dt=Bc(st,it.focusNode,it.focusOffset);if(!(Lt&&!Lt.bad&&Dt&&!Dt.bad&&Je(Kn(Lt,Dt),dt)==0&&Je(vi(Lt,Dt),pt)==0)){var $t=st.display.view,Vt=dt.line>=st.display.viewFrom&&Cf(st,dt)||{node:$t[0].measure.map[2],offset:0},le=pt.line<st.display.viewTo&&Cf(st,pt);if(!le){var Ye=$t[$t.length-1].measure,Pe=Ye.maps?Ye.maps[Ye.maps.length-1]:Ye.map;le={node:Pe[Pe.length-1],offset:Pe[Pe.length-2]-Pe[Pe.length-3]}}if(!Vt||!le){it.removeAllRanges();return}var wn=it.rangeCount&&it.getRangeAt(0),yn;try{yn=qt(Vt.node,Vt.offset,le.offset,le.node)}catch(Xn){}yn&&(!mt&&st.state.focused?(it.collapse(Vt.node,Vt.offset),yn.collapsed||(it.removeAllRanges(),it.addRange(yn))):(it.removeAllRanges(),it.addRange(yn)),wn&&it.anchorNode==null?it.addRange(wn):mt&&this.startGracePeriod()),this.rememberSelection()}},Yr.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)},Yr.prototype.showMultipleSelections=function(it){te(this.cm.display.cursorDiv,it.cursors),te(this.cm.display.selectionDiv,it.selection)},Yr.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Yr.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return Ne(this.div,st)},Yr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Yr.prototype.blur=function(){this.div.blur()},Yr.prototype.getField=function(){return this.div},Yr.prototype.supportsTouch=function(){return!0},Yr.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():Tr(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)},Yr.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Yr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(nt&&ge&&this.cm.display.gutterSpecs.length&&Gg(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ct=Bc(st,it.anchorNode,it.anchorOffset),dt=Bc(st,it.focusNode,it.focusOffset);ct&&dt&&Tr(st,function(){Ea(st.doc,_u(ct,dt),Fe),(ct.bad||dt.bad)&&(st.curOp.selectionChanged=!0)})}}},Yr.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=_e(dt.line-1,Ve(it.doc,dt.line-1).length)),pt.ch==Ve(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=_e(pt.line+1,0)),dt.line<st.viewFrom||pt.line>st.viewTo-1)return!1;var Lt,Dt,$t;dt.line==st.viewFrom||(Lt=Cs(it,dt.line))==0?(Dt=xe(st.view[0].line),$t=st.view[0].node):(Dt=xe(st.view[Lt].line),$t=st.view[Lt-1].node.nextSibling);var Vt=Cs(it,pt.line),le,Ye;if(Vt==st.view.length-1?(le=st.viewTo-1,Ye=st.lineDiv.lastChild):(le=xe(st.view[Vt+1].line)-1,Ye=st.view[Vt+1].node.previousSibling),!$t)return!1;for(var Pe=it.doc.splitLines(Zd(it,$t,Ye,Dt,le)),wn=en(it.doc,_e(Dt,0),_e(le,Ve(it.doc,le).text.length));Pe.length>1&&wn.length>1;)if(fe(Pe)==fe(wn))Pe.pop(),wn.pop(),le--;else if(Pe[0]==wn[0])Pe.shift(),wn.shift(),Dt++;else break;for(var yn=0,Xn=0,ti=Pe[0],mi=wn[0],Mi=Math.min(ti.length,mi.length);yn<Mi&&ti.charCodeAt(yn)==mi.charCodeAt(yn);)++yn;for(var ro=fe(Pe),Zi=fe(wn),ho=Math.min(ro.length-(Pe.length==1?yn:0),Zi.length-(wn.length==1?yn:0));Xn<ho&&ro.charCodeAt(ro.length-Xn-1)==Zi.charCodeAt(Zi.length-Xn-1);)++Xn;if(Pe.length==1&&wn.length==1&&Dt==dt.line)for(;yn&&yn>dt.ch&&ro.charCodeAt(ro.length-Xn-1)==Zi.charCodeAt(Zi.length-Xn-1);)yn--,Xn++;Pe[Pe.length-1]=ro.slice(0,ro.length-Xn).replace(/^\u200b+/,""),Pe[0]=Pe[0].slice(yn).replace(/\u200b+$/,"");var Zo=_e(Dt,yn),zi=_e(le,wn.length?fe(wn).length-Xn:0);if(Pe.length>1||Pe[0]||Je(Zo,zi))return Xh(it.doc,Pe,Zo,zi,"+input"),!0},Yr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Yr.prototype.reset=function(){this.forceCompositionEnd()},Yr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Yr.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))},Yr.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Tr(this.cm,function(){return yo(it.cm)})},Yr.prototype.setUneditable=function(it){it.contentEditable="false"},Yr.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Gs(this.cm,Lc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Yr.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Yr.prototype.onContextMenu=function(){},Yr.prototype.resetPosition=function(){},Yr.prototype.needsContentAttribute=!0;function Cf(it,st){var ct=vl(it,st.line);if(!ct||ct.hidden)return null;var dt=Ve(it.doc,st.line),pt=ju(ct,dt,st.line),Lt=zt(dt,it.doc.direction),Dt="left";if(Lt){var $t=yt(Lt,st.ch);Dt=$t%2?"right":"left"}var Vt=Ie(pt.map,st.ch,Dt);return Vt.offset=Vt.collapse=="right"?Vt.end:Vt.start,Vt}function Gg(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function Wd(it,st){return st&&(it.bad=!0),it}function Zd(it,st,ct,dt,pt){var Lt="",Dt=!1,$t=it.doc.lineSeparator(),Vt=!1;function le(yn){return function(Xn){return Xn.id==yn}}function Ye(){Dt&&(Lt+=$t,Vt&&(Lt+=$t),Dt=Vt=!1)}function Pe(yn){yn&&(Ye(),Lt+=yn)}function wn(yn){if(yn.nodeType==1){var Xn=yn.getAttribute("cm-text");if(Xn){Pe(Xn);return}var ti=yn.getAttribute("cm-marker"),mi;if(ti){var Mi=it.findMarks(_e(dt,0),_e(pt+1,0),le(+ti));Mi.length&&(mi=Mi[0].find(0))&&Pe(en(it.doc,mi.from,mi.to).join($t));return}if(yn.getAttribute("contenteditable")=="false")return;var ro=/^(pre|div|p|li|table|br)$/i.test(yn.nodeName);if(!/^br$/i.test(yn.nodeName)&&yn.textContent.length==0)return;ro&&Ye();for(var Zi=0;Zi<yn.childNodes.length;Zi++)wn(yn.childNodes[Zi]);/^(pre|p)$/i.test(yn.nodeName)&&(Vt=!0),ro&&(Dt=!0)}else yn.nodeType==3&&Pe(yn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;wn(st),st!=ct;)st=st.nextSibling,Vt=!1;return Lt}function Bc(it,st,ct){var dt;if(st==it.display.lineDiv){if(dt=it.display.lineDiv.childNodes[ct],!dt)return Wd(it.clipPos(_e(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 Lt=it.display.view[pt];if(Lt.node==dt)return lm(Lt,st,ct)}}function lm(it,st,ct){var dt=it.text.firstChild,pt=!1;if(!st||!Ne(dt,st))return Wd(_e(xe(it.line),0),!0);if(st==dt&&(pt=!0,st=dt.childNodes[ct],ct=0,!st)){var Lt=it.rest?fe(it.rest):it.line;return Wd(_e(xe(Lt),Lt.text.length),pt)}var Dt=st.nodeType==3?st:null,$t=st;for(!Dt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Dt=st.firstChild,ct&&(ct=Dt.nodeValue.length));$t.parentNode!=dt;)$t=$t.parentNode;var Vt=it.measure,le=Vt.maps;function Ye(mi,Mi,ro){for(var Zi=-1;Zi<(le?le.length:0);Zi++)for(var ho=Zi<0?Vt.map:le[Zi],Zo=0;Zo<ho.length;Zo+=3){var zi=ho[Zo+2];if(zi==mi||zi==Mi){var ur=xe(Zi<0?it.line:it.rest[Zi]),rs=ho[Zo]+ro;return(ro<0||zi!=mi)&&(rs=ho[Zo+(ro?1:0)]),_e(ur,rs)}}}var Pe=Ye(Dt,$t,ct);if(Pe)return Wd(Pe,pt);for(var wn=$t.nextSibling,yn=Dt?Dt.nodeValue.length-ct:0;wn;wn=wn.nextSibling){if(Pe=Ye(wn,wn.firstChild,0),Pe)return Wd(_e(Pe.line,Pe.ch-yn),pt);yn+=wn.textContent.length}for(var Xn=$t.previousSibling,ti=ct;Xn;Xn=Xn.previousSibling){if(Pe=Ye(Xn,Xn.firstChild,-1),Pe)return Wd(_e(Pe.line,Pe.ch+ti),pt);ti+=Xn.textContent.length}}var Is=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Gt,this.hasSelection=!1,this.composing=null};Is.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),At&&(pt.style.width="0px"),se(pt,"input",function(){Ht&&he>=9&&st.hasSelection&&(st.hasSelection=null),ct.poll()}),se(pt,"paste",function(Dt){En(dt,Dt)||Rg(Dt,dt)||(dt.state.pasteIncoming=+new Date,ct.fastPoll())});function Lt(Dt){if(!En(dt,Dt)){if(dt.somethingSelected())od({lineWise:!1,text:dt.getSelections()});else if(dt.options.lineWiseCopyCut){var $t=zg(dt);od({lineWise:!0,text:$t.text}),Dt.type=="cut"?dt.setSelections($t.ranges,null,Fe):(ct.prevInput="",pt.value=$t.text.join(`
`),Ze(pt))}else return;Dt.type=="cut"&&(dt.state.cutIncoming=+new Date)}}se(pt,"cut",Lt),se(pt,"copy",Lt),se(it.scroller,"paste",function(Dt){if(!(fa(it,Dt)||En(dt,Dt))){if(!pt.dispatchEvent){dt.state.pasteIncoming=+new Date,ct.focus();return}var $t=new Event("paste");$t.clipboardData=Dt.clipboardData,pt.dispatchEvent($t)}}),se(it.lineSpace,"selectstart",function(Dt){fa(it,Dt)||$n(Dt)}),se(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"})}}),se(pt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},Is.prototype.createField=function(it){this.wrapper=Hg(),this.textarea=this.wrapper.firstChild},Is.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Is.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ct=it.doc,dt=Nl(it);if(it.options.moveInputWithCursor){var pt=vo(it,ct.sel.primary().head,"div"),Lt=st.wrapper.getBoundingClientRect(),Dt=st.lineDiv.getBoundingClientRect();dt.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,pt.top+Dt.top-Lt.top)),dt.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,pt.left+Dt.left-Lt.left))}return dt},Is.prototype.showSelection=function(it){var st=this.cm,ct=st.display;te(ct.cursorDiv,it.cursors),te(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Is.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ct=st.getSelection();this.textarea.value=ct,st.state.focused&&Ze(this.textarea),Ht&&he>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",Ht&&he>=9&&(this.hasSelection=null))}},Is.prototype.getField=function(){return this.textarea},Is.prototype.supportsTouch=function(){return!1},Is.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||ne()!=this.textarea))try{this.textarea.focus()}catch(it){}},Is.prototype.blur=function(){this.textarea.blur()},Is.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Is.prototype.receivedFocus=function(){this.slowPoll()},Is.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Is.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ct(){var dt=st.poll();!dt&&!it?(it=!0,st.polling.set(60,ct)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ct)},Is.prototype.poll=function(){var it=this,st=this.cm,ct=this.textarea,dt=this.prevInput;if(this.contextMenuPending||!st.state.focused||bt(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(Ht&&he>=9&&this.hasSelection===pt||ht&&/[\uf700-\uf7ff]/.test(pt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Lt=pt.charCodeAt(0);if(Lt==8203&&!dt&&(dt="\u200B"),Lt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Dt=0,$t=Math.min(dt.length,pt.length);Dt<$t&&dt.charCodeAt(Dt)==pt.charCodeAt(Dt);)++Dt;return Tr(st,function(){Lc(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},Is.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Is.prototype.onKeyPress=function(){Ht&&he>=9&&(this.hasSelection=null),this.fastPoll()},Is.prototype.onContextMenu=function(it){var st=this,ct=st.cm,dt=ct.display,pt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Lt=Ar(ct,it),Dt=dt.scroller.scrollTop;if(!Lt||Kt)return;var $t=ct.options.resetSelectionOnContextMenu;$t&&ct.doc.sel.contains(Lt)==-1&&Gs(ct,Ea)(ct.doc,_u(Lt),Fe);var Vt=pt.style.cssText,le=st.wrapper.style.cssText,Ye=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-Ye.top-5)+"px; left: "+(it.clientX-Ye.left-5)+`px;
z-index: 1000; background: `+(Ht?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Pe;Rt&&(Pe=window.scrollY),dt.input.focus(),Rt&&window.scrollTo(null,Pe),dt.input.reset(),ct.somethingSelected()||(pt.value=st.prevInput=" "),st.contextMenuPending=yn,dt.selForContextMenu=ct.doc.sel,clearTimeout(dt.detectingSelectAll);function wn(){if(pt.selectionStart!=null){var ti=ct.somethingSelected(),mi="\u200B"+(ti?pt.value:"");pt.value="\u21DA",pt.value=mi,st.prevInput=ti?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=mi.length,dt.selForContextMenu=ct.doc.sel}}function yn(){if(st.contextMenuPending==yn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=le,pt.style.cssText=Vt,Ht&&he<9&&dt.scrollbars.setScrollTop(dt.scroller.scrollTop=Dt),pt.selectionStart!=null)){(!Ht||Ht&&he<9)&&wn();var ti=0,mi=function(){dt.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&st.prevInput=="\u200B"?Gs(ct,Ls)(ct):ti++<10?dt.detectingSelectAll=setTimeout(mi,500):(dt.selForContextMenu=null,dt.input.reset())};dt.detectingSelectAll=setTimeout(mi,200)}}if(Ht&&he>=9&&wn(),Bt){Bi(it);var Xn=function(){cn(window,"mouseup",Xn),setTimeout(yn,20)};se(window,"mouseup",Xn)}else setTimeout(yn,50)},Is.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Is.prototype.setUneditable=function(){},Is.prototype.needsContentAttribute=!1;function um(it,st){if(st=st?ln(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=ne();st.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function dt(){it.value=$t.getValue()}var pt;if(it.form&&(se(it.form,"submit",dt),!st.leaveSubmitMethodAlone)){var Lt=it.form;pt=Lt.submit;try{var Dt=Lt.submit=function(){dt(),Lt.submit=pt,Lt.submit(),Lt.submit=Dt}}catch(Vt){}}st.finishInit=function(Vt){Vt.save=dt,Vt.getTextArea=function(){return it},Vt.toTextArea=function(){Vt.toTextArea=isNaN,dt(),it.parentNode.removeChild(Vt.getWrapperElement()),it.style.display="",it.form&&(cn(it.form,"submit",dt),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var $t=Lr(function(Vt){return it.parentNode.insertBefore(Vt,it.nextSibling)},st);return $t}function Vd(it){it.off=cn,it.on=se,it.wheelEventPixels=Sl,it.Doc=ma,it.splitLines=Ci,it.countColumn=ie,it.findColumn=Fn,it.isWordChar=Ee,it.Pass=gn,it.signal=sn,it.Line=Br,it.changeEnd=fh,it.scrollbarModel=Ua,it.Pos=_e,it.cmpPos=Je,it.modes=xo,it.mimeModes=Go,it.resolveMode=ke,it.getMode=Te,it.modeExtensions=Le,it.extendMode=re,it.copyState=nn,it.startState=pe,it.innerMode=Qe,it.commands=vh,it.keyMap=sl,it.keyName=em,it.isModifierKey=Rd,it.lookupKey=Ol,it.normalizeKeyMap=Cg,it.StringStream=Yt,it.SharedTextMarker=xu,it.TextMarker=ze,it.LineWidget=Wu,it.e_preventDefault=$n,it.e_stopPropagation=ni,it.e_stop=Bi,it.addClass=Ce,it.contains=Ne,it.rmClass=Ot,it.keyNames=Pu}sm(Lr),Sh(Lr);var Zu="iter insert remove copy getEditor constructor".split(" ");for(var Nc in ma.prototype)ma.prototype.hasOwnProperty(Nc)&&Ae(Zu,Nc)<0&&(Lr.prototype[Nc]=function(it){return function(){return it.apply(this.doc,arguments)}}(ma.prototype[Nc]));return Zn(ma),Lr.inputStyles={textarea:Is,contenteditable:Yr},Lr.defineMode=function(it){!Lr.defaults.mode&&it!="null"&&(Lr.defaults.mode=it),io.apply(this,arguments)},Lr.defineMIME=ii,Lr.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Lr.defineMIME("text/plain","null"),Lr.defineExtension=function(it,st){Lr.prototype[it]=st},Lr.defineDocExtension=function(it,st){ma.prototype[it]=st},Lr.fromTextArea=um,Vd(Lr),Lr.version="5.58.2",Lr})},25419:function(xn,vn,Pt){(function(mt){mt(Pt(89780),Pt(15525),Pt(98101))})(function(mt){"use strict";mt.defineMode("markdown",function(It,Zt){var we=mt.getMode(It,"text/html"),Ht=we.name=="null";function he(ie){if(mt.findModeByName){var Gt=mt.findModeByName(ie);Gt&&(ie=Gt.mime||Gt.mimes[0])}var Ae=mt.getMode(It,ie);return Ae.name=="null"?null:Ae}Zt.highlightFormatting===void 0&&(Zt.highlightFormatting=!1),Zt.maxBlockquoteDepth===void 0&&(Zt.maxBlockquoteDepth=0),Zt.taskLists===void 0&&(Zt.taskLists=!1),Zt.strikethrough===void 0&&(Zt.strikethrough=!1),Zt.emoji===void 0&&(Zt.emoji=!1),Zt.fencedCodeBlockHighlighting===void 0&&(Zt.fencedCodeBlockHighlighting=!0),Zt.fencedCodeBlockDefaultMode===void 0&&(Zt.fencedCodeBlockDefaultMode="text/plain"),Zt.xml===void 0&&(Zt.xml=!0),Zt.tokenTypeOverrides===void 0&&(Zt.tokenTypeOverrides={});var Rt={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var be in Rt)Rt.hasOwnProperty(be)&&Zt.tokenTypeOverrides[be]&&(Rt[be]=Zt.tokenTypeOverrides[be]);var ge=/^([*\-_])(?:\s*\1){2,}\s*$/,Kt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ue=/^\[(x| )\](?=\s)/i,de=Zt.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ve=/^ {0,3}(?:\={1,}|-{2,})\s*$/,At=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\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]/,at=" ";function ft(ie,Gt,Ae){return Gt.f=Gt.inline=Ae,Ae(ie,Gt)}function vt(ie,Gt,Ae){return Gt.f=Gt.block=Ae,Ae(ie,Gt)}function Ct(ie){return!ie||!/\S/.test(ie.string)}function Bt(ie){if(ie.linkTitle=!1,ie.linkHref=!1,ie.linkText=!1,ie.em=!1,ie.strong=!1,ie.strikethrough=!1,ie.quote=0,ie.indentedCode=!1,ie.f==Ot){var Gt=Ht;if(!Gt){var Ae=mt.innerMode(we,ie.htmlState);Gt=Ae.mode.name=="xml"&&Ae.state.tagStart===null&&!Ae.state.context&&Ae.state.tokenize.isInText}Gt&&(ie.f=Me,ie.block=Ft,ie.htmlState=null)}return ie.trailingSpace=0,ie.trailingSpaceNewLine=!1,ie.prevLine=ie.thisLine,ie.thisLine={stream:null},null}function Ft(ie,Gt){var Ae=ie.column()===Gt.indentation,Sn=Ct(Gt.prevLine.stream),gn=Gt.indentedCode,Fe=Gt.prevLine.hr,Ke=Gt.list!==!1,rn=(Gt.listStack[Gt.listStack.length-1]||0)+3;Gt.indentedCode=!1;var Fn=Gt.indentation;if(Gt.indentationDiff===null&&(Gt.indentationDiff=Gt.indentation,Ke)){for(Gt.list=null;Fn<Gt.listStack[Gt.listStack.length-1];)Gt.listStack.pop(),Gt.listStack.length?Gt.indentation=Gt.listStack[Gt.listStack.length-1]:Gt.list=!1;Gt.list!==!1&&(Gt.indentationDiff=Fn-Gt.listStack[Gt.listStack.length-1])}var Pn=!Sn&&!Fe&&!Gt.prevLine.header&&(!Ke||!gn)&&!Gt.prevLine.fencedCodeEnd,We=(Gt.list===!1||Fe||Sn)&&Gt.indentation<=rn&&ie.match(ge),fe=null;if(Gt.indentationDiff>=4&&(gn||Gt.prevLine.fencedCodeEnd||Gt.prevLine.header||Sn))return ie.skipToEnd(),Gt.indentedCode=!0,Rt.code;if(ie.eatSpace())return null;if(Ae&&Gt.indentation<=rn&&(fe=ie.match(de))&&fe[1].length<=6)return Gt.quote=0,Gt.header=fe[1].length,Gt.thisLine.header=!0,Zt.highlightFormatting&&(Gt.formatting="header"),Gt.f=Gt.inline,te(Gt);if(Gt.indentation<=rn&&ie.eat(">"))return Gt.quote=Ae?1:Gt.quote+1,Zt.highlightFormatting&&(Gt.formatting="quote"),ie.eatSpace(),te(Gt);if(!We&&!Gt.setext&&Ae&&Gt.indentation<=rn&&(fe=ie.match(Kt))){var An=fe[1]?"ol":"ul";return Gt.indentation=Fn+ie.current().length,Gt.list=!0,Gt.quote=0,Gt.listStack.push(Gt.indentation),Gt.em=!1,Gt.strong=!1,Gt.code=!1,Gt.strikethrough=!1,Zt.taskLists&&ie.match(ue,!1)&&(Gt.taskList=!0),Gt.f=Gt.inline,Zt.highlightFormatting&&(Gt.formatting=["list","list-"+An]),te(Gt)}else{if(Ae&&Gt.indentation<=rn&&(fe=ie.match(nt,!0)))return Gt.quote=0,Gt.fencedEndRE=new RegExp(fe[1]+"+ *$"),Gt.localMode=Zt.fencedCodeBlockHighlighting&&he(fe[2]||Zt.fencedCodeBlockDefaultMode),Gt.localMode&&(Gt.localState=mt.startState(Gt.localMode)),Gt.f=Gt.block=_t,Zt.highlightFormatting&&(Gt.formatting="code-block"),Gt.code=-1,te(Gt);if(Gt.setext||(!Pn||!Ke)&&!Gt.quote&&Gt.list===!1&&!Gt.code&&!We&&!et.test(ie.string)&&(fe=ie.lookAhead(1))&&(fe=fe.match(ve)))return Gt.setext?(Gt.header=Gt.setext,Gt.setext=0,ie.skipToEnd(),Zt.highlightFormatting&&(Gt.formatting="header")):(Gt.header=fe[0].charAt(0)=="="?1:2,Gt.setext=Gt.header),Gt.thisLine.header=!0,Gt.f=Gt.inline,te(Gt);if(We)return ie.skipToEnd(),Gt.hr=!0,Gt.thisLine.hr=!0,Rt.hr;if(ie.peek()==="[")return ft(ie,Gt,Ue)}return ft(ie,Gt,Gt.inline)}function Ot(ie,Gt){var Ae=we.token(ie,Gt.htmlState);if(!Ht){var Sn=mt.innerMode(we,Gt.htmlState);(Sn.mode.name=="xml"&&Sn.state.tagStart===null&&!Sn.state.context&&Sn.state.tokenize.isInText||Gt.md_inside&&ie.current().indexOf(">")>-1)&&(Gt.f=Me,Gt.block=Ft,Gt.htmlState=null)}return Ae}function _t(ie,Gt){var Ae=Gt.listStack[Gt.listStack.length-1]||0,Sn=Gt.indentation<Ae,gn=Ae+3;if(Gt.fencedEndRE&&Gt.indentation<=gn&&(Sn||ie.match(Gt.fencedEndRE))){Zt.highlightFormatting&&(Gt.formatting="code-block");var Fe;return Sn||(Fe=te(Gt)),Gt.localMode=Gt.localState=null,Gt.block=Ft,Gt.f=Me,Gt.fencedEndRE=null,Gt.code=0,Gt.thisLine.fencedCodeEnd=!0,Sn?vt(ie,Gt,Gt.block):Fe}else return Gt.localMode?Gt.localMode.token(ie,Gt.localState):(ie.skipToEnd(),Rt.code)}function te(ie){var Gt=[];if(ie.formatting){Gt.push(Rt.formatting),typeof ie.formatting=="string"&&(ie.formatting=[ie.formatting]);for(var Ae=0;Ae<ie.formatting.length;Ae++)Gt.push(Rt.formatting+"-"+ie.formatting[Ae]),ie.formatting[Ae]==="header"&&Gt.push(Rt.formatting+"-"+ie.formatting[Ae]+"-"+ie.header),ie.formatting[Ae]==="quote"&&(!Zt.maxBlockquoteDepth||Zt.maxBlockquoteDepth>=ie.quote?Gt.push(Rt.formatting+"-"+ie.formatting[Ae]+"-"+ie.quote):Gt.push("error"))}if(ie.taskOpen)return Gt.push("meta"),Gt.length?Gt.join(" "):null;if(ie.taskClosed)return Gt.push("property"),Gt.length?Gt.join(" "):null;if(ie.linkHref?Gt.push(Rt.linkHref,"url"):(ie.strong&&Gt.push(Rt.strong),ie.em&&Gt.push(Rt.em),ie.strikethrough&&Gt.push(Rt.strikethrough),ie.emoji&&Gt.push(Rt.emoji),ie.linkText&&Gt.push(Rt.linkText),ie.code&&Gt.push(Rt.code),ie.image&&Gt.push(Rt.image),ie.imageAltText&&Gt.push(Rt.imageAltText,"link"),ie.imageMarker&&Gt.push(Rt.imageMarker)),ie.header&&Gt.push(Rt.header,Rt.header+"-"+ie.header),ie.quote&&(Gt.push(Rt.quote),!Zt.maxBlockquoteDepth||Zt.maxBlockquoteDepth>=ie.quote?Gt.push(Rt.quote+"-"+ie.quote):Gt.push(Rt.quote+"-"+Zt.maxBlockquoteDepth)),ie.list!==!1){var Sn=(ie.listStack.length-1)%3;Sn?Sn===1?Gt.push(Rt.list2):Gt.push(Rt.list3):Gt.push(Rt.list1)}return ie.trailingSpaceNewLine?Gt.push("trailing-space-new-line"):ie.trailingSpace&&Gt.push("trailing-space-"+(ie.trailingSpace%2?"a":"b")),Gt.length?Gt.join(" "):null}function Xt(ie,Gt){if(ie.match(At,!0))return te(Gt)}function Me(ie,Gt){var Ae=Gt.text(ie,Gt);if(typeof Ae!="undefined")return Ae;if(Gt.list)return Gt.list=null,te(Gt);if(Gt.taskList){var Sn=ie.match(ue,!0)[1]===" ";return Sn?Gt.taskOpen=!0:Gt.taskClosed=!0,Zt.highlightFormatting&&(Gt.formatting="task"),Gt.taskList=!1,te(Gt)}if(Gt.taskOpen=!1,Gt.taskClosed=!1,Gt.header&&ie.match(/^#+$/,!0))return Zt.highlightFormatting&&(Gt.formatting="header"),te(Gt);var gn=ie.next();if(Gt.linkTitle){Gt.linkTitle=!1;var Fe=gn;gn==="("&&(Fe=")"),Fe=(Fe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ke="^\\s*(?:[^"+Fe+"\\\\]+|\\\\\\\\|\\\\.)"+Fe;if(ie.match(new RegExp(Ke),!0))return Rt.linkHref}if(gn==="`"){var rn=Gt.formatting;Zt.highlightFormatting&&(Gt.formatting="code"),ie.eatWhile("`");var Fn=ie.current().length;if(Gt.code==0&&(!Gt.quote||Fn==1))return Gt.code=Fn,te(Gt);if(Fn==Gt.code){var Pn=te(Gt);return Gt.code=0,Pn}else return Gt.formatting=rn,te(Gt)}else if(Gt.code)return te(Gt);if(gn==="\\"&&(ie.next(),Zt.highlightFormatting)){var We=te(Gt),fe=Rt.formatting+"-escape";return We?We+" "+fe:fe}if(gn==="!"&&ie.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Gt.imageMarker=!0,Gt.image=!0,Zt.highlightFormatting&&(Gt.formatting="image"),te(Gt);if(gn==="["&&Gt.imageMarker&&ie.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Gt.imageMarker=!1,Gt.imageAltText=!0,Zt.highlightFormatting&&(Gt.formatting="image"),te(Gt);if(gn==="]"&&Gt.imageAltText){Zt.highlightFormatting&&(Gt.formatting="image");var We=te(Gt);return Gt.imageAltText=!1,Gt.image=!1,Gt.inline=Gt.f=Ne,We}if(gn==="["&&!Gt.image)return Gt.linkText&&ie.match(/^.*?\]/)||(Gt.linkText=!0,Zt.highlightFormatting&&(Gt.formatting="link")),te(Gt);if(gn==="]"&&Gt.linkText){Zt.highlightFormatting&&(Gt.formatting="link");var We=te(Gt);return Gt.linkText=!1,Gt.inline=Gt.f=ie.match(/\(.*?\)| ?\[.*?\]/,!1)?Ne:Me,We}if(gn==="<"&&ie.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Gt.f=Gt.inline=qt,Zt.highlightFormatting&&(Gt.formatting="link");var We=te(Gt);return We?We+=" ":We="",We+Rt.linkInline}if(gn==="<"&&ie.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Gt.f=Gt.inline=qt,Zt.highlightFormatting&&(Gt.formatting="link");var We=te(Gt);return We?We+=" ":We="",We+Rt.linkEmail}if(Zt.xml&&gn==="<"&&ie.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var An=ie.string.indexOf(">",ie.pos);if(An!=-1){var Hn=ie.string.substring(ie.start,An);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Hn)&&(Gt.md_inside=!0)}return ie.backUp(1),Gt.htmlState=mt.startState(we),vt(ie,Gt,Ot)}if(Zt.xml&&gn==="<"&&ie.match(/^\/\w*?>/))return Gt.md_inside=!1,"tag";if(gn==="*"||gn==="_"){for(var un=1,De=ie.pos==1?" ":ie.string.charAt(ie.pos-2);un<3&&ie.eat(gn);)un++;var He=ie.peek()||" ",Ee=!/\s/.test(He)&&(!ht.test(He)||/\s/.test(De)||ht.test(De)),Jt=!/\s/.test(De)&&(!ht.test(De)||/\s/.test(He)||ht.test(He)),ye=null,Re=null;if(un%2&&(!Gt.em&&Ee&&(gn==="*"||!Jt||ht.test(De))?ye=!0:Gt.em==gn&&Jt&&(gn==="*"||!Ee||ht.test(He))&&(ye=!1)),un>1&&(!Gt.strong&&Ee&&(gn==="*"||!Jt||ht.test(De))?Re=!0:Gt.strong==gn&&Jt&&(gn==="*"||!Ee||ht.test(He))&&(Re=!1)),Re!=null||ye!=null){Zt.highlightFormatting&&(Gt.formatting=ye==null?"strong":Re==null?"em":"strong em"),ye===!0&&(Gt.em=gn),Re===!0&&(Gt.strong=gn);var Pn=te(Gt);return ye===!1&&(Gt.em=!1),Re===!1&&(Gt.strong=!1),Pn}}else if(gn===" "&&(ie.eat("*")||ie.eat("_"))){if(ie.peek()===" ")return te(Gt);ie.backUp(1)}if(Zt.strikethrough){if(gn==="~"&&ie.eatWhile(gn)){if(Gt.strikethrough){Zt.highlightFormatting&&(Gt.formatting="strikethrough");var Pn=te(Gt);return Gt.strikethrough=!1,Pn}else if(ie.match(/^[^\s]/,!1))return Gt.strikethrough=!0,Zt.highlightFormatting&&(Gt.formatting="strikethrough"),te(Gt)}else if(gn===" "&&ie.match(/^~~/,!0)){if(ie.peek()===" ")return te(Gt);ie.backUp(2)}}if(Zt.emoji&&gn===":"&&ie.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Gt.emoji=!0,Zt.highlightFormatting&&(Gt.formatting="emoji");var Be=te(Gt);return Gt.emoji=!1,Be}return gn===" "&&(ie.match(/^ +$/,!1)?Gt.trailingSpace++:Gt.trailingSpace&&(Gt.trailingSpaceNewLine=!0)),te(Gt)}function qt(ie,Gt){var Ae=ie.next();if(Ae===">"){Gt.f=Gt.inline=Me,Zt.highlightFormatting&&(Gt.formatting="link");var Sn=te(Gt);return Sn?Sn+=" ":Sn="",Sn+Rt.linkInline}return ie.match(/^[^>]+/,!0),Rt.linkInline}function Ne(ie,Gt){if(ie.eatSpace())return null;var Ae=ie.next();return Ae==="("||Ae==="["?(Gt.f=Gt.inline=Ce(Ae==="("?")":"]"),Zt.highlightFormatting&&(Gt.formatting="link-string"),Gt.linkHref=!0,te(Gt)):"error"}var ne={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ce(ie){return function(Gt,Ae){var Sn=Gt.next();if(Sn===ie){Ae.f=Ae.inline=Me,Zt.highlightFormatting&&(Ae.formatting="link-string");var gn=te(Ae);return Ae.linkHref=!1,gn}return Gt.match(ne[ie]),Ae.linkHref=!0,te(Ae)}}function Ue(ie,Gt){return ie.match(/^([^\]\\]|\\.)*\]:/,!1)?(Gt.f=Ze,ie.next(),Zt.highlightFormatting&&(Gt.formatting="link"),Gt.linkText=!0,te(Gt)):ft(ie,Gt,Me)}function Ze(ie,Gt){if(ie.match(/^\]:/,!0)){Gt.f=Gt.inline=tn,Zt.highlightFormatting&&(Gt.formatting="link");var Ae=te(Gt);return Gt.linkText=!1,Ae}return ie.match(/^([^\]\\]|\\.)+/,!0),Rt.linkText}function tn(ie,Gt){return ie.eatSpace()?null:(ie.match(/^[^\s]+/,!0),ie.peek()===void 0?Gt.linkTitle=!0:ie.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Gt.f=Gt.inline=Me,Rt.linkHref+" url")}var ln={startState:function(){return{f:Ft,prevLine:{stream:null},thisLine:{stream:null},block:Ft,htmlState:null,indentation:0,inline:Me,text:Xt,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(ie){return{f:ie.f,prevLine:ie.prevLine,thisLine:ie.thisLine,block:ie.block,htmlState:ie.htmlState&&mt.copyState(we,ie.htmlState),indentation:ie.indentation,localMode:ie.localMode,localState:ie.localMode?mt.copyState(ie.localMode,ie.localState):null,inline:ie.inline,text:ie.text,formatting:!1,linkText:ie.linkText,linkTitle:ie.linkTitle,linkHref:ie.linkHref,code:ie.code,em:ie.em,strong:ie.strong,strikethrough:ie.strikethrough,emoji:ie.emoji,header:ie.header,setext:ie.setext,hr:ie.hr,taskList:ie.taskList,list:ie.list,listStack:ie.listStack.slice(0),quote:ie.quote,indentedCode:ie.indentedCode,trailingSpace:ie.trailingSpace,trailingSpaceNewLine:ie.trailingSpaceNewLine,md_inside:ie.md_inside,fencedEndRE:ie.fencedEndRE}},token:function(ie,Gt){if(Gt.formatting=!1,ie!=Gt.thisLine.stream){if(Gt.header=0,Gt.hr=!1,ie.match(/^\s*$/,!0))return Bt(Gt),null;if(Gt.prevLine=Gt.thisLine,Gt.thisLine={stream:ie},Gt.taskList=!1,Gt.trailingSpace=0,Gt.trailingSpaceNewLine=!1,!Gt.localState&&(Gt.f=Gt.block,Gt.f!=Ot)){var Ae=ie.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(Gt.indentation=Ae,Gt.indentationDiff=null,Ae>0)return null}}return Gt.f(ie,Gt)},innerMode:function(ie){return ie.block==Ot?{state:ie.htmlState,mode:we}:ie.localState?{state:ie.localState,mode:ie.localMode}:{state:ie,mode:ln}},indent:function(ie,Gt,Ae){return ie.block==Ot&&we.indent?we.indent(ie.htmlState,Gt,Ae):ie.localState&&ie.localMode.indent?ie.localMode.indent(ie.localState,Gt,Ae):mt.Pass},blankLine:Bt,getType:te,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ln},"xml"),mt.defineMIME("text/markdown","markdown"),mt.defineMIME("text/x-markdown","markdown")})},98101:function(xn,vn,Pt){(function(mt){mt(Pt(89780))})(function(mt){"use strict";mt.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 It=0;It<mt.modeInfo.length;It++){var Zt=mt.modeInfo[It];Zt.mimes&&(Zt.mime=Zt.mimes[0])}mt.findModeByMIME=function(we){we=we.toLowerCase();for(var Ht=0;Ht<mt.modeInfo.length;Ht++){var he=mt.modeInfo[Ht];if(he.mime==we)return he;if(he.mimes){for(var Rt=0;Rt<he.mimes.length;Rt++)if(he.mimes[Rt]==we)return he}}if(/\+xml$/.test(we))return mt.findModeByMIME("application/xml");if(/\+json$/.test(we))return mt.findModeByMIME("application/json")},mt.findModeByExtension=function(we){we=we.toLowerCase();for(var Ht=0;Ht<mt.modeInfo.length;Ht++){var he=mt.modeInfo[Ht];if(he.ext){for(var Rt=0;Rt<he.ext.length;Rt++)if(he.ext[Rt]==we)return he}}},mt.findModeByFileName=function(we){for(var Ht=0;Ht<mt.modeInfo.length;Ht++){var he=mt.modeInfo[Ht];if(he.file&&he.file.test(we))return he}var Rt=we.lastIndexOf("."),be=Rt>-1&&we.substring(Rt+1,we.length);if(be)return mt.findModeByExtension(be)},mt.findModeByName=function(we){we=we.toLowerCase();for(var Ht=0;Ht<mt.modeInfo.length;Ht++){var he=mt.modeInfo[Ht];if(he.name.toLowerCase()==we)return he;if(he.alias){for(var Rt=0;Rt<he.alias.length;Rt++)if(he.alias[Rt].toLowerCase()==we)return he}}}})},67549:function(xn,vn,Pt){(function(mt){mt(Pt(89780))})(function(mt){"use strict";mt.defineMode("stex",function(It,Zt){"use strict";function we(At,nt){At.cmdState.push(nt)}function Ht(At){return At.cmdState.length>0?At.cmdState[At.cmdState.length-1]:null}function he(At){var nt=At.cmdState.pop();nt&&nt.closeBracket()}function Rt(At){for(var nt=At.cmdState,et=nt.length-1;et>=0;et--){var ht=nt[et];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function be(At,nt,et){return function(){this.name=At,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ge={};ge.importmodule=be("importmodule","tag",["string","builtin"]),ge.documentclass=be("documentclass","tag",["","atom"]),ge.usepackage=be("usepackage","tag",["atom"]),ge.begin=be("begin","tag",["atom"]),ge.end=be("end","tag",["atom"]),ge.label=be("label","tag",["atom"]),ge.ref=be("ref","tag",["atom"]),ge.eqref=be("eqref","tag",["atom"]),ge.cite=be("cite","tag",["atom"]),ge.bibitem=be("bibitem","tag",["atom"]),ge.Bibitem=be("Bibitem","tag",["atom"]),ge.RBibitem=be("RBibitem","tag",["atom"]),ge.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Kt(At,nt){At.f=nt}function ue(At,nt){var et;if(At.match(/^\\[a-zA-Z@]+/)){var ht=At.current().slice(1);return et=ge.hasOwnProperty(ht)?ge[ht]:ge.DEFAULT,et=new et,we(nt,et),Kt(nt,ve),et.style}if(At.match(/^\\[$&%#{}_]/)||At.match(/^\\[,;!\/\\]/))return"tag";if(At.match("\\["))return Kt(nt,function(ft,vt){return de(ft,vt,"\\]")}),"keyword";if(At.match("\\("))return Kt(nt,function(ft,vt){return de(ft,vt,"\\)")}),"keyword";if(At.match("$$"))return Kt(nt,function(ft,vt){return de(ft,vt,"$$")}),"keyword";if(At.match("$"))return Kt(nt,function(ft,vt){return de(ft,vt,"$")}),"keyword";var at=At.next();if(at=="%")return At.skipToEnd(),"comment";if(at=="}"||at=="]"){if(et=Ht(nt),et)et.closeBracket(at),Kt(nt,ve);else return"error";return"bracket"}else return at=="{"||at=="["?(et=ge.DEFAULT,et=new et,we(nt,et),"bracket"):/\d/.test(at)?(At.eatWhile(/[\w.%]/),"atom"):(At.eatWhile(/[\w\-_]/),et=Rt(nt),et.name=="begin"&&(et.argument=At.current()),et.styleIdentifier())}function de(At,nt,et){if(At.eatSpace())return null;if(et&&At.match(et))return Kt(nt,ue),"keyword";if(At.match(/^\\[a-zA-Z@]+/))return"tag";if(At.match(/^[a-zA-Z]+/))return"variable-2";if(At.match(/^\\[$&%#{}_]/)||At.match(/^\\[,;!\/]/)||At.match(/^[\^_&]/))return"tag";if(At.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(At.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=At.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(At.skipToEnd(),"comment"):"error"}function ve(At,nt){var et=At.peek(),ht;return et=="{"||et=="["?(ht=Ht(nt),ht.openBracket(et),At.eat(et),Kt(nt,ue),"bracket"):/[ \t\r]/.test(et)?(At.eat(et),null):(Kt(nt,ue),he(nt),ue(At,nt))}return{startState:function(){var At=Zt.inMathMode?function(nt,et){return de(nt,et)}:ue;return{cmdState:[],f:At}},copyState:function(At){return{cmdState:At.cmdState.slice(),f:At.f}},token:function(At,nt){return nt.f(At,nt)},blankLine:function(At){At.f=ue,At.cmdState.length=0},lineComment:"%"}}),mt.defineMIME("text/x-stex","stex"),mt.defineMIME("text/x-latex","stex")})},15525:function(xn,vn,Pt){(function(mt){mt(Pt(89780))})(function(mt){"use strict";var It={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},Zt={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};mt.defineMode("xml",function(we,Ht){var he=we.indentUnit,Rt={},be=Ht.htmlMode?It:Zt;for(var ge in be)Rt[ge]=be[ge];for(var ge in Ht)Rt[ge]=Ht[ge];var Kt,ue;function de(qt,Ne){function ne(Ze){return Ne.tokenize=Ze,Ze(qt,Ne)}var Ce=qt.next();if(Ce=="<")return qt.eat("!")?qt.eat("[")?qt.match("CDATA[")?ne(nt("atom","]]>")):null:qt.match("--")?ne(nt("comment","-->")):qt.match("DOCTYPE",!0,!0)?(qt.eatWhile(/[\w\._\-]/),ne(et(1))):null:qt.eat("?")?(qt.eatWhile(/[\w\._\-]/),Ne.tokenize=nt("meta","?>"),"meta"):(Kt=qt.eat("/")?"closeTag":"openTag",Ne.tokenize=ve,"tag bracket");if(Ce=="&"){var Ue;return qt.eat("#")?qt.eat("x")?Ue=qt.eatWhile(/[a-fA-F\d]/)&&qt.eat(";"):Ue=qt.eatWhile(/[\d]/)&&qt.eat(";"):Ue=qt.eatWhile(/[\w\.\-:]/)&&qt.eat(";"),Ue?"atom":"error"}else return qt.eatWhile(/[^&<]/),null}de.isInText=!0;function ve(qt,Ne){var ne=qt.next();if(ne==">"||ne=="/"&&qt.eat(">"))return Ne.tokenize=de,Kt=ne==">"?"endTag":"selfcloseTag","tag bracket";if(ne=="=")return Kt="equals",null;if(ne=="<"){Ne.tokenize=de,Ne.state=vt,Ne.tagName=Ne.tagStart=null;var Ce=Ne.tokenize(qt,Ne);return Ce?Ce+" tag error":"tag error"}else return/[\'\"]/.test(ne)?(Ne.tokenize=At(ne),Ne.stringStartCol=qt.column(),Ne.tokenize(qt,Ne)):(qt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function At(qt){var Ne=function(ne,Ce){for(;!ne.eol();)if(ne.next()==qt){Ce.tokenize=ve;break}return"string"};return Ne.isInAttribute=!0,Ne}function nt(qt,Ne){return function(ne,Ce){for(;!ne.eol();){if(ne.match(Ne)){Ce.tokenize=de;break}ne.next()}return qt}}function et(qt){return function(Ne,ne){for(var Ce;(Ce=Ne.next())!=null;){if(Ce=="<")return ne.tokenize=et(qt+1),ne.tokenize(Ne,ne);if(Ce==">")if(qt==1){ne.tokenize=de;break}else return ne.tokenize=et(qt-1),ne.tokenize(Ne,ne)}return"meta"}}function ht(qt,Ne,ne){this.prev=qt.context,this.tagName=Ne,this.indent=qt.indented,this.startOfLine=ne,(Rt.doNotIndent.hasOwnProperty(Ne)||qt.context&&qt.context.noIndent)&&(this.noIndent=!0)}function at(qt){qt.context&&(qt.context=qt.context.prev)}function ft(qt,Ne){for(var ne;;){if(!qt.context||(ne=qt.context.tagName,!Rt.contextGrabbers.hasOwnProperty(ne)||!Rt.contextGrabbers[ne].hasOwnProperty(Ne)))return;at(qt)}}function vt(qt,Ne,ne){return qt=="openTag"?(ne.tagStart=Ne.column(),Ct):qt=="closeTag"?Bt:vt}function Ct(qt,Ne,ne){return qt=="word"?(ne.tagName=Ne.current(),ue="tag",_t):Rt.allowMissingTagName&&qt=="endTag"?(ue="tag bracket",_t(qt,Ne,ne)):(ue="error",Ct)}function Bt(qt,Ne,ne){if(qt=="word"){var Ce=Ne.current();return ne.context&&ne.context.tagName!=Ce&&Rt.implicitlyClosed.hasOwnProperty(ne.context.tagName)&&at(ne),ne.context&&ne.context.tagName==Ce||Rt.matchClosing===!1?(ue="tag",Ft):(ue="tag error",Ot)}else return Rt.allowMissingTagName&&qt=="endTag"?(ue="tag bracket",Ft(qt,Ne,ne)):(ue="error",Ot)}function Ft(qt,Ne,ne){return qt!="endTag"?(ue="error",Ft):(at(ne),vt)}function Ot(qt,Ne,ne){return ue="error",Ft(qt,Ne,ne)}function _t(qt,Ne,ne){if(qt=="word")return ue="attribute",te;if(qt=="endTag"||qt=="selfcloseTag"){var Ce=ne.tagName,Ue=ne.tagStart;return ne.tagName=ne.tagStart=null,qt=="selfcloseTag"||Rt.autoSelfClosers.hasOwnProperty(Ce)?ft(ne,Ce):(ft(ne,Ce),ne.context=new ht(ne,Ce,Ue==ne.indented)),vt}return ue="error",_t}function te(qt,Ne,ne){return qt=="equals"?Xt:(Rt.allowMissing||(ue="error"),_t(qt,Ne,ne))}function Xt(qt,Ne,ne){return qt=="string"?Me:qt=="word"&&Rt.allowUnquoted?(ue="string",_t):(ue="error",_t(qt,Ne,ne))}function Me(qt,Ne,ne){return qt=="string"?Me:_t(qt,Ne,ne)}return{startState:function(qt){var Ne={tokenize:de,state:vt,indented:qt||0,tagName:null,tagStart:null,context:null};return qt!=null&&(Ne.baseIndent=qt),Ne},token:function(qt,Ne){if(!Ne.tagName&&qt.sol()&&(Ne.indented=qt.indentation()),qt.eatSpace())return null;Kt=null;var ne=Ne.tokenize(qt,Ne);return(ne||Kt)&&ne!="comment"&&(ue=null,Ne.state=Ne.state(Kt||ne,qt,Ne),ue&&(ne=ue=="error"?ne+" error":ue)),ne},indent:function(qt,Ne,ne){var Ce=qt.context;if(qt.tokenize.isInAttribute)return qt.tagStart==qt.indented?qt.stringStartCol+1:qt.indented+he;if(Ce&&Ce.noIndent)return mt.Pass;if(qt.tokenize!=ve&&qt.tokenize!=de)return ne?ne.match(/^(\s*)/)[0].length:0;if(qt.tagName)return Rt.multilineTagIndentPastTag!==!1?qt.tagStart+qt.tagName.length+2:qt.tagStart+he*(Rt.multilineTagIndentFactor||1);if(Rt.alignCDATA&&/<!\[CDATA\[/.test(Ne))return 0;var Ue=Ne&&/^<(\/)?([\w_:\.-]*)/.exec(Ne);if(Ue&&Ue[1])for(;Ce;)if(Ce.tagName==Ue[2]){Ce=Ce.prev;break}else if(Rt.implicitlyClosed.hasOwnProperty(Ce.tagName))Ce=Ce.prev;else break;else if(Ue)for(;Ce;){var Ze=Rt.contextGrabbers[Ce.tagName];if(Ze&&Ze.hasOwnProperty(Ue[2]))Ce=Ce.prev;else break}for(;Ce&&Ce.prev&&!Ce.startOfLine;)Ce=Ce.prev;return Ce?Ce.indent+he:qt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Rt.htmlMode?"html":"xml",helperType:Rt.htmlMode?"html":"xml",skipAttribute:function(qt){qt.state==Xt&&(qt.state=_t)},xmlCurrentTag:function(qt){return qt.tagName?{name:qt.tagName,close:qt.type=="closeTag"}:null},xmlCurrentContext:function(qt){for(var Ne=[],ne=qt.context;ne;ne=ne.prev)ne.tagName&&Ne.push(ne.tagName);return Ne.reverse()}}}),mt.defineMIME("text/xml","xml"),mt.defineMIME("application/xml","xml"),mt.mimeModes.hasOwnProperty("text/html")||mt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(xn,vn,Pt){"use strict";Pt.d(vn,{$u:function(){return ge},BD:function(){return un},E9:function(){return be},FF:function(){return In},FJ:function(){return vt},Hn:function(){return ft},KX:function(){return Bt},NB:function(){return Tt},S0:function(){return fe},UL:function(){return Kt},Vk:function(){return at},Vm:function(){return yt},YI:function(){return An},ZA:function(){return Zt},Zt:function(){return ue},al:function(){return ye},bn:function(){return Jt},bx:function(){return De},g2:function(){return Hn},h1:function(){return Xt},hD:function(){return Zn},l4:function(){return he},rU:function(){return xt},s_:function(){return He},uz:function(){return ce},z6:function(){return de}}),xn=Pt.hmd(xn),function(){var bt;function _i(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Fi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:_i(a)}}function co(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var xo=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Go;if(typeof Object.setPrototypeOf=="function")Go=Object.setPrototypeOf;else{var io;t:{var ii={a:!0},ke={};try{ke.__proto__=ii,io=ke.a;break t}catch(a){}io=!1}Go=io?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Te=Go;function Le(a,y){if(a.prototype=xo(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 re=typeof Pt.g!="undefined"&&Pt.g!=null?Pt.g:self,nn=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},Qe=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function pe(a,y){if(y){var x=re;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&&Qe(x,a,{writable:!0,value:y})}}pe("Object.assign",function(a){return a||nn}),pe("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 Yt=typeof globalThis=="object"&&globalThis||typeof Pt.g=="object"&&Pt.g.global===Pt.g&&Pt.g||typeof self=="object"&&self.self===self&&self||{};Yt.requestAnimationFrame===void 0&&(Yt.setImmediate===void 0?Yt.requestAnimationFrame=function(a){Yt.setTimeout(a,0)}:Yt.requestAnimationFrame=Yt.setImmediate);function Ve(){}function en(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Yt.clearTimeout(x),x=Bn(function(){x=-1,a.apply(E,b)},y)}}function Bn(a,y){return Yt.setTimeout(a,y)}function qe(a){return Yt.document.createElement(a)}function xe(a){throw Error(a)}function an(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),xe(a)}function Mn(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),xe(x+" is not in the range "+y+": "+a)}function Vn(a){Yt.console&&Yt.console.log(a)}function _e(a){return typeof a=="object"&&a!==null}function Je(a){return Array.isArray(a)||Yt.NodeList&&a instanceof Yt.NodeList||Yt.HTMLCollection&&a instanceof Yt.HTMLCollection}function hi(a){return Array.prototype.slice.call(a)}function qn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):xe("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function vi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):xe("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Kn(){var a=Ii.pop();return a===void 0?[]:a}function oi(a){a.length=0,Ii.push(a)}function ui(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(_e(a)&&a.constructor)return ui(a.constructor);return typeof a}function xi(a){var y=a;return _e(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 to(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 On(a,y,x){Object.defineProperty(fr.prototype,a,{get:y,set:x})}function ri(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=Yt.navigator!==void 0&&0<Yt.navigator.userAgent.indexOf("Trident/7"),Ao=Yt.navigator!==void 0&&Yt.navigator.platform!==void 0&&Yt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ii=[];Object.freeze([]),Ve.className="Util",Ve.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Ve.adym="gojs.net",Ve.vfo="28e645fdb266",Ve.className="Util";function Oe(a,y,x){po(this),this.j=a,this.xa=y,this.o=x}Oe.prototype.toString=function(){return"EnumValue."+this.xa};function Wn(a,y){return y==null||y===""?null:a[y]}re.Object.defineProperties(Oe.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Oe.className="EnumValue";function yi(){this.ew=[]}yi.prototype.toString=function(){return this.ew.join("")},yi.prototype.add=function(a){a!==""&&this.ew.push(a)},yi.className="StringBuilder";function di(){}di.className="PropertyCollection";var no={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Yt.console&&Yt.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 ji(){}ji.prototype.reset=function(){},ji.prototype.next=function(){return!1},ji.prototype.Ad=function(){return!1},ji.prototype.first=function(){return null},ji.prototype.any=function(){return!1},ji.prototype.all=function(){return!0},ji.prototype.each=function(){return this},ji.prototype.map=function(){return this},ji.prototype.filter=function(){return this},ji.prototype.de=function(){},ji.prototype.toString=function(){return"EmptyIterator"},re.Object.defineProperties(ji.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),ji.prototype.first=ji.prototype.first,ji.prototype.hasNext=ji.prototype.Ad,ji.prototype.next=ji.prototype.next,ji.prototype.reset=ji.prototype.reset;var fo=null;ji.className="EmptyIterator",fo=new ji;function Hi(a){this.key=-1,this.value=a}Hi.prototype.reset=function(){this.key=-1},Hi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Hi.prototype.Ad=function(){return this.next()},Hi.prototype.first=function(){return this.key=0,this.value},Hi.prototype.any=function(a){return this.key=-1,a(this.value)},Hi.prototype.all=function(a){return this.key=-1,a(this.value)},Hi.prototype.each=function(a){return this.key=-1,a(this.value),this},Hi.prototype.map=function(a){return new Hi(a(this.value))},Hi.prototype.filter=function(a){return a(this.value)?new Hi(this.value):fo},Hi.prototype.de=function(){this.value=null},Hi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},re.Object.defineProperties(Hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),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="SingletonIterator";function Ti(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Ti.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Ti.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},Ti.prototype.Ad=function(){return this.next()},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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 pn,a.s=x,a.xb(),a.iterator},Ti.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 pn,a.s=x,a.xb(),a.iterator},Ti.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Ti.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},re.Object.defineProperties(Ti.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}}}),Ti.prototype.first=Ti.prototype.first,Ti.prototype.hasNext=Ti.prototype.Ad,Ti.prototype.next=Ti.prototype.next,Ti.prototype.reset=Ti.prototype.reset,Ti.className="ListIterator";function Po(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Po.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Po.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)},Po.prototype.Ad=function(){return this.next()},Po.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},Po.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},Po.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},Po.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},Po.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 pn,a.s=x,a.xb(),a.iterator},Po.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 pn,a.s=x,a.xb(),a.iterator},Po.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Po.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},re.Object.defineProperties(Po.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Po.prototype.first=Po.prototype.first,Po.prototype.hasNext=Po.prototype.Ad,Po.prototype.next=Po.prototype.next,Po.prototype.reset=Po.prototype.reset,Po.className="ListIteratorBackwards";function pn(a){po(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&xe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=pn.prototype,bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.toString=function(){return"List()#"+Si(this)},bt.add=function(a){return a===null?this:(this._isFrozen&&an(this,a),this.s.push(a),this.xb(),this)},bt.push=function(a){this.add(a)},bt.addAll=function(a){if(a===null)return this;this._isFrozen&&an(this);var y=this.s;if(Je(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},bt.clear=function(){this._isFrozen&&an(this),this.s.length=0,this.xb()},bt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},bt.has=function(a){return this.contains(a)},bt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},bt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Mn(a,"0 <= i < length",pn,"elt:i"),y[a]},bt.get=function(a){return this.M(a)},bt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Mn(a,"0 <= i < length",pn,"setElt:i"),this._isFrozen&&an(this,a),x[a]=y},bt.set=function(a,y){this.cd(a,y)},bt.first=function(){var a=this.s;return a.length===0?null:a[0]},bt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},bt.pop=function(){this._isFrozen&&an(this);var a=this.s;return 0<a.length?a.pop():null},pn.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},pn.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},pn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},pn.prototype.map=function(a){for(var y=new pn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},pn.prototype.filter=function(a){for(var y=new pn,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},bt=pn.prototype,bt.Gb=function(a,y){0>a&&Mn(a,">= 0",pn,"insertAt:i"),this._isFrozen&&an(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},bt.remove=function(a){if(a===null)return!1;this._isFrozen&&an(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)},bt.delete=function(a){return this.remove(a)},bt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Mn(a,"0 <= i < length",pn,"removeAt:i"),this._isFrozen&&an(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},bt.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&&an(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},pn.prototype.copy=function(){var a=new pn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},bt=pn.prototype,bt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},bt.Iv=function(){for(var a=new mn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},bt.sort=function(a){return this._isFrozen&&an(this),this.s.sort(a),this.xb(),this},bt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&an(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Mn(y,"0 <= from < length",pn,"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},bt.reverse=function(){return this._isFrozen&&an(this),this.s.reverse(),this.xb(),this},re.Object.defineProperties(pn.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 fo;var a=this.Sa;return a!==null?(a.reset(),a):new Ti(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return fo;var a=this.Hg;return a!==null?(a.reset(),a):new Po(this)}}}),pn.prototype.reverse=pn.prototype.reverse,pn.prototype.sortRange=pn.prototype.zi,pn.prototype.sort=pn.prototype.sort,pn.prototype.toSet=pn.prototype.Iv,pn.prototype.toArray=pn.prototype.Fa,pn.prototype.removeRange=pn.prototype.removeRange,pn.prototype.removeAt=pn.prototype.mb,pn.prototype.delete=pn.prototype.delete,pn.prototype.remove=pn.prototype.remove,pn.prototype.insertAt=pn.prototype.Gb,pn.prototype.pop=pn.prototype.pop,pn.prototype.last=pn.prototype.jc,pn.prototype.first=pn.prototype.first,pn.prototype.set=pn.prototype.set,pn.prototype.setElt=pn.prototype.cd,pn.prototype.get=pn.prototype.get,pn.prototype.elt=pn.prototype.M,pn.prototype.indexOf=pn.prototype.indexOf,pn.prototype.has=pn.prototype.has,pn.prototype.contains=pn.prototype.contains,pn.prototype.clear=pn.prototype.clear,pn.prototype.addAll=pn.prototype.addAll,pn.prototype.push=pn.prototype.push,pn.prototype.add=pn.prototype.add,pn.prototype.thaw=pn.prototype.ka,pn.prototype.freeze=pn.prototype.freeze,pn.className="List";function Vo(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Vo.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Vo.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)},Vo.prototype.Ad=function(){return this.next()},Vo.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},Vo.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},Vo.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},Vo.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},Vo.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Vo.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new pn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Vo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Vo.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},re.Object.defineProperties(Vo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Vo.prototype.first=Vo.prototype.first,Vo.prototype.hasNext=Vo.prototype.Ad,Vo.prototype.next=Vo.prototype.next,Vo.prototype.reset=Vo.prototype.reset,Vo.className="SetIterator";function mn(a){po(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&xe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=mn.prototype,bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.toString=function(){return"Set()#"+Si(this)},bt.add=function(a){if(a===null)return this;this._isFrozen&&an(this,a);var y=a;return _e(a)&&(y=vr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new bo(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},bt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&an(this),Je(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},bt.contains=function(a){if(a===null)return!1;var y=a;return _e(a)&&(y=Si(a),y===void 0)?!1:this.Tb[y]!==void 0},bt.has=function(a){return this.contains(a)},bt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},bt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},bt.first=function(){var a=this.ea;return a===null?null:a.value},mn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},mn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},mn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},mn.prototype.map=function(a){for(var y=new mn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},mn.prototype.filter=function(a){for(var y=new mn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},bt=mn.prototype,bt.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=a;if(_e(a)&&(y=Si(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},bt.delete=function(a){return this.remove(a)},bt.hp=function(a){if(a===null)return this;if(this._isFrozen&&an(this),Je(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},bt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&an(this);var y=new mn;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},bt.clear=function(){this._isFrozen&&an(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},mn.prototype.copy=function(){var a=new mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},mn.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},mn.prototype.Hv=function(){var a=new pn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function po(a){a.__gohashid=Dr++}function vr(a){var y=a.__gohashid;return y===void 0&&(y=Dr++,a.__gohashid=y),y}function Si(a){return a.__gohashid}re.Object.defineProperties(mn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return fo;var a=this.Sa;return a!==null?(a.reset(),a):new Vo(this)}}}),mn.prototype.toList=mn.prototype.Hv,mn.prototype.toArray=mn.prototype.Fa,mn.prototype.clear=mn.prototype.clear,mn.prototype.retainAll=mn.prototype.pA,mn.prototype.removeAll=mn.prototype.hp,mn.prototype.delete=mn.prototype.delete,mn.prototype.remove=mn.prototype.remove,mn.prototype.first=mn.prototype.first,mn.prototype.containsAny=mn.prototype.Ty,mn.prototype.containsAll=mn.prototype.Sy,mn.prototype.has=mn.prototype.has,mn.prototype.contains=mn.prototype.contains,mn.prototype.addAll=mn.prototype.addAll,mn.prototype.add=mn.prototype.add,mn.prototype.thaw=mn.prototype.ka,mn.prototype.freeze=mn.prototype.freeze;var Dr=1;mn.className="Set",mn.uniqueHash=po,mn.hashIdUnique=vr,mn.hashId=Si;function hr(a){this.ma=a,this.qa=a.Ja,this.sa=null}hr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},hr.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)},hr.prototype.Ad=function(){return this.next()},hr.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},hr.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},hr.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},hr.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},hr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},hr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new pn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},hr.prototype.de=function(){this.value=this.key=null,this.qa=-1},hr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},re.Object.defineProperties(hr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),hr.prototype.first=hr.prototype.first,hr.prototype.hasNext=hr.prototype.Ad,hr.prototype.next=hr.prototype.next,hr.prototype.reset=hr.prototype.reset,hr.className="MapKeySetIterator";function ki(a){mn.call(this),po(this),this._isFrozen=!0,this.ma=a}Le(ki,mn),bt=ki.prototype,bt.freeze=function(){return this},bt.ka=function(){return this},bt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},bt.add=function(){xe("This Set is read-only: "+this.toString())},bt.contains=function(a){return this.ma.contains(a)},bt.has=function(a){return this.contains(a)},bt.remove=function(){xe("This Set is read-only: "+this.toString())},bt.delete=function(a){return this.remove(a)},bt.clear=function(){xe("This Set is read-only: "+this.toString())},bt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},ki.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},ki.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},ki.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},ki.prototype.map=function(a){for(var y=new mn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},ki.prototype.filter=function(a){for(var y=new mn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},ki.prototype.copy=function(){return new ki(this.ma)},ki.prototype.Iv=function(){var a=new mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ki.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},ki.prototype.Hv=function(){var a=new pn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},re.Object.defineProperties(ki.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?fo:new hr(this.ma)}}}),ki.prototype.toList=ki.prototype.Hv,ki.prototype.toArray=ki.prototype.Fa,ki.prototype.toSet=ki.prototype.Iv,ki.prototype.first=ki.prototype.first,ki.prototype.clear=ki.prototype.clear,ki.prototype.delete=ki.prototype.delete,ki.prototype.remove=ki.prototype.remove,ki.prototype.has=ki.prototype.has,ki.prototype.contains=ki.prototype.contains,ki.prototype.add=ki.prototype.add,ki.prototype.thaw=ki.prototype.ka,ki.prototype.freeze=ki.prototype.freeze,ki.className="MapKeySet";function Oi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Oi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Oi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Oi.prototype.Ad=function(){return this.next()},Oi.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Oi.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Oi.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Oi.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Oi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Oi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new pn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Oi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Oi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},re.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset,Oi.className="MapValueSetIterator";function bo(a,y){this.key=a,this.value=y,this.ll=this.va=null}bo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},bo.className="KeyValuePair";function Oo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Oo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Oo.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Oo.prototype.Ad=function(){return this.next()},Oo.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Oo.prototype.any=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Oo.prototype.all=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Oo.prototype.each=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y),y=y.va;return this},Oo.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Oo.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Oo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Oo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},re.Object.defineProperties(Oo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Oo.prototype.first=Oo.prototype.first,Oo.prototype.hasNext=Oo.prototype.Ad,Oo.prototype.next=Oo.prototype.next,Oo.prototype.reset=Oo.prototype.reset,Oo.className="MapIterator";function Yn(a){po(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"&&xe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=Yn.prototype,bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.toString=function(){return"Map()#"+Si(this)},bt.add=function(a,y){this._isFrozen&&an(this,a);var x=a;_e(a)&&(x=vr(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new bo(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},bt.set=function(a,y){return this.add(a,y)},bt.addAll=function(a){if(a===null)return this;if(Je(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 Yn)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},bt.first=function(){return this.ea},Yn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Yn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Yn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Yn.prototype.map=function(a){for(var y=new Yn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Yn.prototype.filter=function(a){for(var y=new Yn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},bt=Yn.prototype,bt.contains=function(a){var y=a;return _e(a)&&(y=Si(a),y===void 0)?!1:this.Tb[y]!==void 0},bt.has=function(a){return this.contains(a)},bt.I=function(a){var y=a;return _e(a)&&(y=Si(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},bt.get=function(a){return this.I(a)},bt.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=a;if(_e(a)&&(y=Si(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},bt.delete=function(a){return this.remove(a)},bt.clear=function(){this._isFrozen&&an(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()},Yn.prototype.copy=function(){var a=new Yn,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Yn.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 bo(b.key,b.value),x++}return y},Yn.prototype.Lf=function(){return new ki(this)},re.Object.defineProperties(Yn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return fo;var a=this.Sa;return a!==null?(a.reset(),a):new Oo(this)}},iteratorKeys:{get:function(){return 0>=this.count?fo:new hr(this)}},iteratorValues:{get:function(){if(0>=this.count)return fo;var a=this.jf;return a!==null?(a.reset(),a):new Oi(this)}}}),Yn.prototype.toKeySet=Yn.prototype.Lf,Yn.prototype.toArray=Yn.prototype.Fa,Yn.prototype.clear=Yn.prototype.clear,Yn.prototype.delete=Yn.prototype.delete,Yn.prototype.remove=Yn.prototype.remove,Yn.prototype.get=Yn.prototype.get,Yn.prototype.getValue=Yn.prototype.I,Yn.prototype.has=Yn.prototype.has,Yn.prototype.contains=Yn.prototype.contains,Yn.prototype.first=Yn.prototype.first,Yn.prototype.addAll=Yn.prototype.addAll,Yn.prototype.set=Yn.prototype.set,Yn.prototype.add=Yn.prototype.add,Yn.prototype.thaw=Yn.prototype.ka,Yn.prototype.freeze=Yn.prototype.freeze,Yn.className="Map";function Wt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):xe("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Fo,br,Fr,qr,eo;Wt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Wt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Wt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Wt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Wt.prototype.copy=function(){var a=new Wt;return a.x=this.x,a.y=this.y,a},bt=Wt.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&xe("cannot thaw constant: "+this),this._isFrozen=!1,this};function $i(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 Wt(x,b)}return new Wt}function Do(a){return a.x.toString()+" "+a.y.toString()}bt.toString=function(){return"Point("+this.x+","+this.y+")"},bt.D=function(a){return a instanceof Wt?this.x===a.x&&this.y===a.y:!1},bt.hi=function(a,y){return this.x===a&&this.y===y},bt.Xa=function(a){return me.B(this.x,a.x)&&me.B(this.y,a.y)},bt.add=function(a){return this.x+=a.x,this.y+=a.y,this},bt.re=function(a){return this.x-=a.x,this.y-=a.y,this},bt.offset=function(a,y){return this.x+=a,this.y+=y,this},Wt.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},bt=Wt.prototype,bt.scale=function(a,y){return this.x*=a,this.y*=y,this},bt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},bt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},bt.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},bt.ab=function(a){return ir(a.x-this.x,a.y-this.y)},bt.direction=function(a,y){return ir(a-this.x,y-this.y)};function ir(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}bt.Ry=function(a,y){return me.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},bt.fA=function(a,y,x,E){return me.qh(a,y,x,E,this.x,this.y,this),this},bt.gA=function(a,y){return me.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},bt.uA=function(a,y,x,E){return me.No(this.x,this.y,a,y,x,E,this),this},bt.vA=function(a,y){return me.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},bt.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},bt.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},bt.transform=function(a){return a.Ga(this),this};function uo(a,y){return y.Cd(a),a}function yr(a,y,x,E,b,z){var tt=b-x,ot=z-E,rt=tt*tt+ot*ot;x-=a,E-=y;var lt=-x*tt-E*ot;return 0>=lt||lt>=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 Vi(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Ni(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)}bt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Wt.alloc=function(){var a=Ji.pop();return a===void 0?new Wt:a},Wt.allocAt=function(a,y){var x=Ji.pop();return x===void 0?new Wt(a,y):(x.x=a,x.y=y,x)},Wt.free=function(a){Ji.push(a)},Wt.prototype.isReal=Wt.prototype.w,Wt.prototype.setSpot=Wt.prototype.yi,Wt.prototype.setRectSpot=Wt.prototype.xi,Wt.prototype.snapToGridPoint=Wt.prototype.vA,Wt.prototype.snapToGrid=Wt.prototype.uA,Wt.prototype.projectOntoLineSegmentPoint=Wt.prototype.gA,Wt.prototype.projectOntoLineSegment=Wt.prototype.fA,Wt.intersectingLineSegments=function(a,y,x,E,b,z,tt,ot){return me.Rl(a,y,x,E,b,z,tt,ot)},Wt.prototype.compareWithLineSegmentPoint=Wt.prototype.Ry,Wt.compareWithLineSegment=function(a,y,x,E,b,z){return me.Fl(a,y,x,E,b,z)},Wt.prototype.direction=Wt.prototype.direction,Wt.prototype.directionPoint=Wt.prototype.ab,Wt.prototype.normalize=Wt.prototype.normalize,Wt.prototype.distanceSquared=Wt.prototype.zd,Wt.prototype.distanceSquaredPoint=Wt.prototype.Bf,Wt.prototype.scale=Wt.prototype.scale,Wt.prototype.rotate=Wt.prototype.rotate,Wt.prototype.offset=Wt.prototype.offset,Wt.prototype.subtract=Wt.prototype.re,Wt.prototype.add=Wt.prototype.add,Wt.prototype.equalsApprox=Wt.prototype.Xa,Wt.prototype.equalTo=Wt.prototype.hi,Wt.prototype.equals=Wt.prototype.D,Wt.prototype.set=Wt.prototype.set,Wt.prototype.setTo=Wt.prototype.sg;var Ji=[];Wt.className="Point",Wt.parse=$i,Wt.stringify=Do,Wt.distanceLineSegmentSquared=yr,Wt.distanceSquared=Vi,Wt.direction=Ni,Wt.Origin=Fo=new Wt(0,0).ja(),Wt.InfiniteTopLeft=br=new Wt(-1/0,-1/0).ja(),Wt.InfiniteBottomRight=Fr=new Wt(1/0,1/0).ja(),Wt.SixPoint=qr=new Wt(6,6).ja(),Wt.NoPoint=eo=new Wt(NaN,NaN).ja(),Wt.parse=$i,Wt.stringify=Do,Wt.distanceLineSegmentSquared=yr,Wt.distanceSquared=Vi,Wt.direction=Ni;function Nn(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):xe("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ro,or,Ir,pr,Br,ts,Ns;Nn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Nn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Nn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Nn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Nn.prototype.copy=function(){var a=new Nn;return a.width=this.width,a.height=this.height,a},bt=Nn.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&xe("cannot thaw constant: "+this),this._isFrozen=!1,this};function ks(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 Nn(x,b)}return new Nn}function ca(a){return a.width.toString()+" "+a.height.toString()}bt.toString=function(){return"Size("+this.width+","+this.height+")"},bt.D=function(a){return a instanceof Nn?this.width===a.width&&this.height===a.height:!1},bt.hi=function(a,y){return this.width===a&&this.height===y},bt.Xa=function(a){return me.B(this.width,a.width)&&me.B(this.height,a.height)},bt.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},bt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Nn.alloc=function(){var a=Ts.pop();return a===void 0?new Nn:a},Nn.free=function(a){Ts.push(a)},Nn.prototype.isReal=Nn.prototype.w,Nn.prototype.inflate=Nn.prototype.Bc,Nn.prototype.equalsApprox=Nn.prototype.Xa,Nn.prototype.equalTo=Nn.prototype.hi,Nn.prototype.equals=Nn.prototype.D,Nn.prototype.set=Nn.prototype.set,Nn.prototype.setTo=Nn.prototype.sg;var Ts=[];Nn.className="Size",Nn.parse=ks,Nn.stringify=ca,Nn.ZeroSize=Ro=new Nn(0,0).ja(),Nn.OneSize=or=new Nn(1,1).ja(),Nn.SixSize=Ir=new Nn(6,6).ja(),Nn.EightSize=pr=new Nn(8,8).ja(),Nn.TenSize=Br=new Nn(10,10).ja(),Nn.InfiniteSize=ts=new Nn(1/0,1/0).ja(),Nn.NoSize=Ns=new Nn(NaN,NaN).ja(),Nn.parse=ks,Nn.stringify=ca;function on(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 Wt?(x=a.x,a=a.y,y instanceof Wt?(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 Nn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):xe("Incorrect second argument supplied to Rect constructor "+y)):xe("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}bt=on.prototype,bt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},bt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function ds(a,y,x){a.width=y,a.height=x}bt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},bt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},bt.dd=function(a){return this.x=a.x,this.y=a.y,this},bt.tA=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.copy=function(){var a=new on;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},bt=on.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&xe("cannot thaw constant: "+this),this._isFrozen=!1,this};function ka(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 on(x,b,z,tt)}return new on}function el(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}bt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},bt.D=function(a){return a instanceof on?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},bt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},bt.Xa=function(a){return me.B(this.x,a.x)&&me.B(this.y,a.y)&&me.B(this.width,a.width)&&me.B(this.height,a.height)};function cs(a,y){return me.$(a.x,y.x)&&me.$(a.y,y.y)&&me.$(a.width,y.width)&&me.$(a.height,y.height)}bt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},bt.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},bt.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},bt.offset=function(a,y){return this.x+=a,this.y+=y,this},bt.Bc=function(a,y){return Za(this,y,a,y,a)},bt.Co=function(a){return Za(this,a.top,a.right,a.bottom,a.left)},bt.Fv=function(a){return Za(this,-a.top,-a.right,-a.bottom,-a.left)},bt.Hz=function(a,y,x,E){return Za(this,a,y,x,E)};function Za(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}bt.Ex=function(a){return nu(this,a.x,a.y,a.width,a.height)},bt.Uu=function(a,y,x,E){return nu(this,a,y,x,E)};function nu(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}bt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},bt.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 Zl(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))}bt.Ye=function(a){return Mr(this,a.x,a.y,0,0)},bt.ed=function(a){return Mr(this,a.x,a.y,a.width,a.height)},bt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Mr(this,a,y,x,E)};function Mr(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}bt.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 _o(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 _s(a,y,x,E,b,z,tt,ot){return a>tt+b||b>x+a?!1:!(y>ot+z||z>E+y)}bt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},bt.Mz=function(){return this.width===0&&this.height===0},on.alloc=function(){var a=To.pop();return a===void 0?new on:a},on.allocAt=function(a,y,x,E){var b=To.pop();return b===void 0?new on(a,y,x,E):b.h(a,y,x,E)},on.free=function(a){To.push(a)},re.Object.defineProperties(on.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 Wt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Nn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Wt(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}}}),on.prototype.isEmpty=on.prototype.Mz,on.prototype.isReal=on.prototype.w,on.intersectsLineSegment=function(a,y,x,E,b,z,tt,ot){return me.Fx(a,y,x,E,b,z,tt,ot)},on.prototype.setSpot=on.prototype.yi,on.prototype.union=on.prototype.Kv,on.prototype.unionRect=on.prototype.ed,on.prototype.unionPoint=on.prototype.Ye,on.prototype.intersects=on.prototype.Vu,on.prototype.intersectsRect=on.prototype.Yc,on.prototype.intersect=on.prototype.Uu,on.prototype.intersectRect=on.prototype.Ex,on.prototype.grow=on.prototype.Hz,on.prototype.subtractMargin=on.prototype.Fv,on.prototype.addMargin=on.prototype.Co,on.prototype.inflate=on.prototype.Bc,on.prototype.offset=on.prototype.offset,on.prototype.contains=on.prototype.contains,on.prototype.containsRect=on.prototype.Re,on.prototype.containsPoint=on.prototype.ca,on.prototype.equalsApprox=on.prototype.Xa,on.prototype.equalTo=on.prototype.hi,on.prototype.equals=on.prototype.D,on.prototype.setSize=on.prototype.tA,on.prototype.setPoint=on.prototype.dd,on.prototype.set=on.prototype.set,on.prototype.setTo=on.prototype.sg;var Mo=null,Ko=null,To=[];on.className="Rect",on.parse=ka,on.stringify=el,on.contains=_o,on.intersects=_s,on.ZeroRect=Mo=new on(0,0,0,0).ja(),on.NoRect=Ko=new on(NaN,NaN,NaN,NaN).ja(),on.parse=ka,on.stringify=el,on.contains=_o,on.intersects=_s;function ci(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):xe("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}ci.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},ci.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},ci.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},ci.prototype.copy=function(){var a=new ci;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},bt=ci.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&xe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ur(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 ci;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new ci(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new ci(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new ci(x,b):new ci(x,b,z,tt)}return new ci}function $r(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}bt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},bt.D=function(a){return a instanceof ci?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},bt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},bt.Xa=function(a){return me.B(this.top,a.top)&&me.B(this.right,a.right)&&me.B(this.bottom,a.bottom)&&me.B(this.left,a.left)},bt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},ci.alloc=function(){var a=nl.pop();return a===void 0?new ci:a},ci.free=function(a){nl.push(a)},ci.prototype.isReal=ci.prototype.w,ci.prototype.equalsApprox=ci.prototype.Xa,ci.prototype.equalTo=ci.prototype.hi,ci.prototype.equals=ci.prototype.D,ci.prototype.set=ci.prototype.set,ci.prototype.setTo=ci.prototype.sg;var ws=null,Aa=null,nl=[];ci.className="Margin",ci.parse=Ur,ci.stringify=$r,ci.ZeroMargin=ws=new ci(0,0,0,0).ja(),ci.TwoMargin=Aa=new ci(2,2,2,2).ja(),ci.parse=Ur,ci.stringify=$r;function Qn(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 kr,is,Ta,iu,Va,wo,Ru,bs,fa,Hs,Bl,ou,ga,Oa,yu,ih,ju,oh,Ca,vl,Ks,il,rh,Ie,Xe,Ge,fn,oo,Ui,mo,Ri,Gi,Bo,Qi,Uo,dr;Qn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Qn.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Qn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Qn.prototype.copy=function(){var a=new Qn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},bt=Qn.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&xe("cannot thaw constant: "+this),this._isFrozen=!1,this};function vo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function ko(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return kr;if(a==="TopLeft")return is;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Ta;if(a==="TopRight")return iu;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Va;if(a==="Center")return wo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Ru;if(a==="BottomLeft")return bs;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return fa;if(a==="BottomRight")return Hs;if(a==="TopSide")return Bl;if(a==="LeftSide")return ou;if(a==="RightSide")return ga;if(a==="BottomSide")return Oa;if(a==="TopBottomSides")return yu;if(a==="LeftRightSides")return ih;if(a==="TopLeftSides")return ju;if(a==="TopRightSides")return oh;if(a==="BottomLeftSides")return Ca;if(a==="BottomRightSides")return vl;if(a==="NotTopSide")return Ks;if(a==="NotLeftSide")return il;if(a==="NotRightSide")return rh;if(a==="NotBottomSide")return Ie;if(a==="AllSides")return Xe;if(a==="Default")return Ge;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 Qn(x,b,z,tt)}return new Qn}function Xo(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}bt.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(kr)?"None":this.D(is)?"TopLeft":this.D(Ta)?"Top":this.D(iu)?"TopRight":this.D(Va)?"Left":this.D(wo)?"Center":this.D(Ru)?"Right":this.D(bs)?"BottomLeft":this.D(fa)?"Bottom":this.D(Hs)?"BottomRight":this.D(Bl)?"TopSide":this.D(ou)?"LeftSide":this.D(ga)?"RightSide":this.D(Oa)?"BottomSide":this.D(yu)?"TopBottomSides":this.D(ih)?"LeftRightSides":this.D(ju)?"TopLeftSides":this.D(oh)?"TopRightSides":this.D(Ca)?"BottomLeftSides":this.D(vl)?"BottomRightSides":this.D(Ks)?"NotTopSide":this.D(il)?"NotLeftSide":this.D(rh)?"NotRightSide":this.D(Ie)?"NotBottomSide":this.D(Xe)?"AllSides":this.D(Ge)?"Default":"None"},bt.D=function(a){return a instanceof Qn?(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},bt.gv=function(){return new Qn(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},bt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(fn))a=ou;else if(a.D(oo))a=ga;else if(a.D(Ui))a=Bl;else if(a.D(mo))a=Oa;else return!1;return a=a.offsetY,(this.offsetY&a)===a},bt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},bt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},bt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},bt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},bt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Qn.alloc=function(){var a=xr.pop();return a===void 0?new Qn:a},Qn.free=function(a){xr.push(a)},Qn.prototype.isDefault=Qn.prototype.Xb,Qn.prototype.isNone=Qn.prototype.ys,Qn.prototype.isSide=Qn.prototype.$c,Qn.prototype.isNoSpot=Qn.prototype.Mc,Qn.prototype.isSpot=Qn.prototype.sb,Qn.prototype.includesSide=Qn.prototype.Hf,Qn.prototype.opposite=Qn.prototype.gv,Qn.prototype.equals=Qn.prototype.D,Qn.prototype.set=Qn.prototype.set,Qn.prototype.setTo=Qn.prototype.sg;var xr=[];Qn.className="Spot",Qn.parse=ko,Qn.stringify=Xo,Qn.None=kr=vo(new Qn(0,0,0,0),0).ja(),Qn.Default=Ge=vo(new Qn(0,0,-1,0),-1).ja(),Qn.TopLeft=is=new Qn(0,0,0,0).ja(),Qn.TopCenter=Ta=new Qn(.5,0,0,0).ja(),Qn.TopRight=iu=new Qn(1,0,0,0).ja(),Qn.LeftCenter=Va=new Qn(0,.5,0,0).ja(),Qn.Center=wo=new Qn(.5,.5,0,0).ja(),Qn.RightCenter=Ru=new Qn(1,.5,0,0).ja(),Qn.BottomLeft=bs=new Qn(0,1,0,0).ja(),Qn.BottomCenter=fa=new Qn(.5,1,0,0).ja(),Qn.BottomRight=Hs=new Qn(1,1,0,0).ja(),Qn.MiddleTop=Ri=Ta,Qn.MiddleLeft=Gi=Va,Qn.MiddleRight=Bo=Ru,Qn.MiddleBottom=Qi=fa,Qn.Top=Ui=Ta,Qn.Left=fn=Va,Qn.Right=oo=Ru,Qn.Bottom=mo=fa,Qn.TopSide=Bl=vo(new Qn(0,0,1,1),1).ja(),Qn.LeftSide=ou=vo(new Qn(0,0,1,2),1).ja(),Qn.RightSide=ga=vo(new Qn(0,0,1,4),1).ja(),Qn.BottomSide=Oa=vo(new Qn(0,0,1,8),1).ja(),Qn.TopBottomSides=yu=vo(new Qn(0,0,1,9),1).ja(),Qn.LeftRightSides=ih=vo(new Qn(0,0,1,6),1).ja(),Qn.TopLeftSides=ju=vo(new Qn(0,0,1,3),1).ja(),Qn.TopRightSides=oh=vo(new Qn(0,0,1,5),1).ja(),Qn.BottomLeftSides=Ca=vo(new Qn(0,0,1,10),1).ja(),Qn.BottomRightSides=vl=vo(new Qn(0,0,1,12),1).ja(),Qn.NotTopSide=Ks=vo(new Qn(0,0,1,14),1).ja(),Qn.NotLeftSide=il=vo(new Qn(0,0,1,13),1).ja(),Qn.NotRightSide=rh=vo(new Qn(0,0,1,11),1).ja(),Qn.NotBottomSide=Ie=vo(new Qn(0,0,1,7),1).ja(),Qn.AllSides=Xe=vo(new Qn(0,0,1,15),1).ja(),Uo=new Qn(.156,.156).ja(),dr=new Qn(.844,.844).ja(),Qn.parse=ko,Qn.stringify=Xo;function fi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}fi.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},fi.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},fi.prototype.copy=function(){var a=new fi;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},fi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},fi.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},fi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},fi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},fi.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},fi.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},fi.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},fi.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},bt=fi.prototype,bt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},bt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},bt.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)},bt.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))},bt.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))},bt.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,lt=this.dx,ut=this.dy,gt=y*z+x*ot+lt,St=y*tt+x*rt+ut,wt=E*z+x*ot+lt,Et=E*tt+x*rt+ut;return x=y*z+b*ot+lt,y=y*tt+b*rt+ut,z=E*z+b*ot+lt,E=E*tt+b*rt+ut,b=Math.min(gt,wt),gt=Math.max(gt,wt),wt=Math.min(St,Et),St=Math.max(St,Et),b=Math.min(b,x),gt=Math.max(gt,x),wt=Math.min(wt,y),St=Math.max(St,y),b=Math.min(b,z),gt=Math.max(gt,z),wt=Math.min(wt,E),St=Math.max(St,E),a.h(b,wt,gt-b,St-wt),a},fi.alloc=function(){var a=Ho.pop();return a===void 0?new fi:a},fi.free=function(a){Ho.push(a)},fi.prototype.transformRect=fi.prototype.pp,fi.prototype.transformPoint=fi.prototype.Ga,fi.prototype.scale=fi.prototype.scale,fi.prototype.translate=fi.prototype.translate,fi.prototype.rotate=fi.prototype.rotate,fi.prototype.invert=fi.prototype.Vj,fi.prototype.multiplyInverted=fi.prototype.bv,fi.prototype.multiply=fi.prototype.multiply,fi.prototype.reset=fi.prototype.reset,fi.prototype.isIdentity=fi.prototype.ws,fi.prototype.equals=fi.prototype.D,fi.prototype.setTransform=fi.prototype.setTransform,fi.prototype.set=fi.prototype.set;var Ho=[];fi.className="Transform",fi.xF="54a702f3e53909c447824c6706603faf4c";var me={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=me.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);me.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 lt=y,ut=E;else lt=E,ut=y;if(a===x)return lt<=tt&&tt<=ut&&a-b<=z&&z<=a+b;if(y===E)return ot<=z&&z<=rt&&y-b<=tt&&tt<=y+b;if(rt+=b,ot-=b,ot<=z&&z<=rt&&(ut+=b,lt-=b,lt<=tt&&tt<=ut))if(rt-ot>ut-lt)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,ot,rt,lt,ut,gt){if(me.Yb(a,y,tt,ot,gt,x,E)&&me.Yb(a,y,tt,ot,gt,b,z))return me.Yb(a,y,tt,ot,gt,lt,ut);var St=(a+x)/2,wt=(y+E)/2,Et=(x+b)/2,Nt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(St+Et)/2,x=(wt+Nt)/2,Et=(Et+b)/2,Nt=(Nt+z)/2;var Ut=(E+Et)/2,jt=(x+Nt)/2;return me.cs(a,y,St,wt,E,x,Ut,jt,rt,lt,ut,gt)||me.cs(Ut,jt,Et,Nt,b,z,tt,ot,rt,lt,ut,gt)},ax:function(a,y,x,E,b,z,tt,ot,rt){var lt=(x+b)/2,ut=(E+z)/2;return rt.h((((a+x)/2+lt)/2+(lt+(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,lt=(E+z)/2;return Ni(((a+x)/2+rt)/2,((y+E)/2+lt)/2,(rt+(b+tt)/2)/2,(lt+(z+ot)/2)/2)},Dl:function(a,y,x,E,b,z,tt,ot,rt,lt){if(me.Yb(a,y,tt,ot,rt,x,E)&&me.Yb(a,y,tt,ot,rt,b,z))Mr(lt,a,y,0,0),Mr(lt,tt,ot,0,0);else{var ut=(a+x)/2,gt=(y+E)/2,St=(x+b)/2,wt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(ut+St)/2,x=(gt+wt)/2,St=(St+b)/2,wt=(wt+z)/2;var Et=(E+St)/2,Nt=(x+wt)/2;me.Dl(a,y,ut,gt,E,x,Et,Nt,rt,lt),me.Dl(Et,Nt,St,wt,b,z,tt,ot,rt,lt)}return lt},Qe:function(a,y,x,E,b,z,tt,ot,rt,lt){if(me.Yb(a,y,tt,ot,rt,x,E)&&me.Yb(a,y,tt,ot,rt,b,z))lt.length===0&&(lt.push(a),lt.push(y)),lt.push(tt),lt.push(ot);else{var ut=(a+x)/2,gt=(y+E)/2,St=(x+b)/2,wt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(ut+St)/2,x=(gt+wt)/2,St=(St+b)/2,wt=(wt+z)/2;var Et=(E+St)/2,Nt=(x+wt)/2;me.Qe(a,y,ut,gt,E,x,Et,Nt,rt,lt),me.Qe(Et,Nt,St,wt,b,z,tt,ot,rt,lt)}return lt},jv:function(a,y,x,E,b,z,tt,ot,rt,lt){if(me.Yb(a,y,b,z,lt,x,E))return me.Yb(a,y,b,z,lt,ot,rt);var ut=(a+x)/2,gt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var St=(ut+x)/2,wt=(gt+E)/2;return me.jv(a,y,ut,gt,St,wt,tt,ot,rt,lt)||me.jv(St,wt,x,E,b,z,tt,ot,rt,lt)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,ot){if(me.Yb(a,y,b,z,tt,x,E))Mr(ot,a,y,0,0),Mr(ot,b,z,0,0);else{var rt=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(rt+x)/2,gt=(lt+E)/2;me.iv(a,y,rt,lt,ut,gt,tt,ot),me.iv(ut,gt,x,E,b,z,tt,ot)}return ot},ep:function(a,y,x,E,b,z,tt,ot){if(me.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,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(rt+x)/2,gt=(lt+E)/2;me.ep(a,y,rt,lt,ut,gt,tt,ot),me.ep(ut,gt,x,E,b,z,tt,ot)}return ot},Eo:function(a,y,x,E,b,z,tt,ot,rt,lt,ut,gt,St,wt){if(me.Yb(a,y,tt,ot,St,x,E)&&me.Yb(a,y,tt,ot,St,b,z))return!me.Rl(a,y,tt,ot,rt,lt,ut,gt)||(St=(a-tt)*(lt-gt)-(y-ot)*(rt-ut),St===0)?!1:(wt.h(((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*gt-lt*ut))/St,((a*ot-y*tt)*(lt-gt)-(y-ot)*(rt*gt-lt*ut))/St),!0);var Et=(a+x)/2,Nt=(y+E)/2,Ut=(x+b)/2,jt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(Et+Ut)/2,x=(Nt+jt)/2,Ut=(Ut+b)/2,jt=(jt+z)/2;var ee=(E+Ut)/2,oe=(x+jt)/2,ae=1/0,Se=!1,je=0,Dn=0;return me.Eo(a,y,Et,Nt,E,x,ee,oe,rt,lt,ut,gt,St,wt)&&(a=(wt.x-rt)*(wt.x-rt)+(wt.y-lt)*(wt.y-lt),a<ae&&(ae=a,Se=!0,je=wt.x,Dn=wt.y)),me.Eo(ee,oe,Ut,jt,b,z,tt,ot,rt,lt,ut,gt,St,wt)&&(wt.x-rt)*(wt.x-rt)+(wt.y-lt)*(wt.y-lt)<ae&&(Se=!0,je=wt.x,Dn=wt.y),Se&&(wt.x=je,wt.y=Dn),Se},Fo:function(a,y,x,E,b,z,tt,ot,rt,lt,ut,gt,St){var wt=0;if(me.Yb(a,y,tt,ot,St,x,E)&&me.Yb(a,y,tt,ot,St,b,z)){if(St=(a-tt)*(lt-gt)-(y-ot)*(rt-ut),St===0)return wt;var Et=((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*gt-lt*ut))/St,Nt=((a*ot-y*tt)*(lt-gt)-(y-ot)*(rt*gt-lt*ut))/St;if(Et>=ut)return wt;if((rt>ut?rt-ut:ut-rt)<(lt>gt?lt-gt:gt-lt)){if(y<ot?(rt=y,a=ot):(rt=ot,a=y),Nt<rt||Nt>a)return wt}else if(a<tt?(rt=a,a=tt):rt=tt,Et<rt||Et>a)return wt;0<St?wt++:0>St&&wt--}else{Et=(a+x)/2,Nt=(y+E)/2;var Ut=(x+b)/2,jt=(E+z)/2;b=(b+tt)/2,z=(z+ot)/2,E=(Et+Ut)/2,x=(Nt+jt)/2,Ut=(Ut+b)/2,jt=(jt+z)/2;var ee=(E+Ut)/2,oe=(x+jt)/2;wt+=me.Fo(a,y,Et,Nt,E,x,ee,oe,rt,lt,ut,gt,St),wt+=me.Fo(ee,oe,Ut,jt,b,z,tt,ot,rt,lt,ut,gt,St)}return wt},qh:function(a,y,x,E,b,z,tt){return me.$(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)):me.$(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 me.B(a,x)&&me.B(y,E)?(rt.h(a,y),!1):me.$(b,tt)?me.$(a,x)?(me.qh(a,y,x,E,b,z,rt),!1):me.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,rt):(ot=(ot-z)/(tt-b),me.$(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),me.$(ot,tt)?(me.qh(a,y,x,E,b,z,rt),!1):(b=(tt*a-ot*b+z-y)/(tt-ot),me.$(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)):me.qh(a,y,x,E,b,tt*(b-a)+y,rt))))},MA:function(a,y,x,E,b){return me.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,lt){function ut(Ut,jt){var ee=(Ut-a)*(Ut-a)+(jt-y)*(jt-y);ee<gt&&(gt=ee,rt.h(Ut,jt))}var gt=1/0;ut(rt.x,rt.y);var St=0,wt=0,Et=0,Nt=0;if(b<tt?(St=b,wt=tt):(St=tt,wt=b),z<ot?(Et=b,Nt=tt):(Et=tt,Nt=b),St=(wt-St)/2+lt,lt=(Nt-Et)/2+lt,b=(b+tt)/2,z=(z+ot)/2,St===0||lt===0)return rt;if(.5>(x>a?x-a:a-x)){if(St=1-(x-b)*(x-b)/(St*St),0>St)return rt;St=Math.sqrt(St),E=-lt*St+z,ut(x,lt*St+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(St*St)+x*x/(lt*lt),ot=2*x*(y-x*a)/(lt*lt)-2*x*z/(lt*lt)-2*b/(St*St),St=ot*ot-4*E*(2*x*a*z/(lt*lt)-2*y*z/(lt*lt)+z*z/(lt*lt)+b*b/(St*St)-1+(y-x*a)*(y-x*a)/(lt*lt)),0>St)return rt;St=Math.sqrt(St),lt=(-ot+St)/(2*E),ut(lt,x*lt-x*a+y),St=(-ot-St)/(2*E),ut(St,x*St-x*a+y)}return rt},Ff:function(a,y,x,E,b,z,tt,ot,rt){var lt=1e21,ut=a,gt=y;if(me.Ve(a,y,a,E,b,z,tt,ot,rt)){var St=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z);St<lt&&(lt=St,ut=rt.x,gt=rt.y)}return me.Ve(x,y,x,E,b,z,tt,ot,rt)&&(St=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z),St<lt&&(lt=St,ut=rt.x,gt=rt.y)),me.Ve(a,y,x,y,b,z,tt,ot,rt)&&(y=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z),y<lt&&(lt=y,ut=rt.x,gt=rt.y)),me.Ve(a,E,x,E,b,z,tt,ot,rt)&&(a=(rt.x-b)*(rt.x-b)+(rt.y-z)*(rt.y-z),a<lt&&(lt=a,ut=rt.x,gt=rt.y)),rt.h(ut,gt),1e21>lt},us:function(a,y,x){return me.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,lt=y+E;return b===tt?(z<ot?(tt=z,z=ot):tt=ot,a<=b&&b<=rt&&tt<=lt&&z>=y):z===ot?(b<tt?(ot=b,b=tt):ot=tt,y<=z&&z<=lt&&ot<=rt&&b>=a):!!(_o(a,y,x,E,b,z)||_o(a,y,x,E,tt,ot)||me.Rl(a,y,rt,y,b,z,tt,ot)||me.Rl(rt,y,rt,lt,b,z,tt,ot)||me.Rl(rt,lt,a,lt,b,z,tt,ot)||me.Rl(a,lt,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>=me.Fl(a,y,x,E,b,z)*me.Fl(a,y,x,E,tt,ot)&&0>=me.Fl(b,z,tt,ot,a,y)*me.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,lt=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return rt=lt+ot*Math.min(E,rt),ot=a+x*Math.cos(lt),lt=y+x*Math.sin(lt),a+=x*Math.cos(rt),y+=x*Math.sin(rt),x=(ot+a)/2,rt=(lt+y)/2,z.push([ot,lt,x,rt,x,rt,a,y]),z;for(;1e-5<E;)b=lt+ot*Math.min(E,rt),z.push(me.Vy(x,lt,b,a,y)),E-=Math.abs(b-lt),lt=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),ot=a*Math.sin(z),rt=-ot,lt=tt*tt+rt*rt,ut=lt+tt*tt+rt*ot;return lt=4/3*(Math.sqrt(2*lt*ut)-ut)/(tt*ot-rt*tt),ot=tt-lt*rt,tt=rt+lt*tt,rt=-tt,lt=z+y,z=Math.cos(lt),lt=Math.sin(lt),[E+a*Math.cos(y),b+a*Math.sin(y),E+ot*z-tt*lt,b+ot*lt+tt*z,E+ot*z-rt*lt,b+ot*lt+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,lt=tt===0?x:E;return(tt===0?b:z)&&(lt=-lt),tt=ot,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),me.az(rt,tt===0?a:y,lt,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,ot=-z+tt,rt=-z+Math.sqrt(a*a+tt*tt);y=ot;for(var lt=0;9999999999>lt&&(y=.5*(ot+rt),!(y===ot||y===rt));++lt){var ut=a/(y+b),gt=tt/(y+z);if(ut=ut*ut+gt*gt-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 di,um:new di,Mf:new di,Nf:0,vm:100};me.za=me.AA;function hn(a){po(this),this.l=2,a===void 0&&(a=hn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===hn.o?this.ee=new pn:(hn.V===null&&(hn.V=new pn().freeze()),this.ee=hn.V),this.aq=this.ee.Ja,this.Ip=new on().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=is,this.gg=Hs,this.Rk=this.Sk=NaN,this.Uf=wn}hn.prototype.copy=function(){var a=new hn;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===hn.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},hn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},hn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==hn.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},hn.prototype.ka=function(){if(Object.isFrozen(this)&&xe("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==hn.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},hn.prototype.Xa=function(a){if(!(a instanceof hn))return!1;if(this.type!==a.type)return this.type===hn.j&&a.type===hn.o?so(this,a):a.type===hn.j&&this.type===hn.o?so(a,this):!1;if(this.type===hn.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 me.B(this.startX,a.startX)&&me.B(this.startY,a.startY)&&me.B(this.endX,a.endX)&&me.B(this.endY,a.endY)};function so(a,y){return a.type!==hn.j||y.type!==hn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&me.B(a.startX,y.startX)&&me.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Xi&&me.B(a.endX,y.endX)&&me.B(a.endY,y.endY))))}hn.ia=function(a){return a.toString()},hn.prototype.qb=function(a){a.classType===hn&&(this.type=a)},hn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case hn.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 hn.u:var y=new on(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 hn.F:if(y=new on(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 hn.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()}},hn.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},hn.parse=function(a,y){function x(){return Nt>=ae-1?!0:lt[Nt+1].match(Se)!==null}function E(){return Nt++,lt[Nt]}function b(Ei){var Pi=parseFloat(E()),No=parseFloat(E());Ut===Ut.toLowerCase()&&(Pi=oe.x+Pi,No=oe.y+No),Ei.h(Pi,No)}function z(){return b(oe),oe}function tt(){return b(ee),ee}function ot(){var Ei=jt.toLowerCase();return Ei!=="c"&&Ei!=="s"&&Ei!=="q"&&Ei!=="t"?oe:new Wt(2*oe.x-ee.x,2*oe.y-ee.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 lt=a.split(" ");for(a=0;a<lt.length;a++){var ut=lt[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){rt=Kn();for(var gt="",St=!1,wt=0;wt<ut.length;wt++){var Et=ut[wt];Et!=="."||St?Et==="."?(rt.push(gt),gt="."):gt+=Et:(St=!0,gt+=Et)}for(rt.push(gt),lt.splice(a,1),ut=0;ut<rt.length;ut++)lt.splice(a+ut,0,rt[ut]);a+=rt.length-1,oi(rt)}}var Nt=-1,Ut="",jt="";rt=new Wt(0,0);var ee=new Wt(0,0),oe=new Wt(0,0),ae=lt.length;a=N1(null),St=gt=ut=!1,wt=!0,Et=null;for(var Se=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Nt>=ae-1);)if(jt=Ut,Ut=E(),Ut!=="")switch(Ut.toUpperCase()){case"X":wt=!0,gt=ut=!1;break;case"M":for(Et=z(),a.mc===null||wt===!0?(Rf(a,Et.x,Et.y,ut,!gt,St),wt=!1):a.moveTo(Et.x,Et.y),rt.assign(oe);!x();)Et=z(),a.lineTo(Et.x,Et.y);break;case"L":for(;!x();)Et=z(),a.lineTo(Et.x,Et.y);break;case"H":for(;!x();)oe=new Wt((Ut===Ut.toLowerCase()?oe.x:0)+parseFloat(E()),oe.y),a.lineTo(oe.x,oe.y);break;case"V":for(;!x();)oe=new Wt(oe.x,(Ut===Ut.toLowerCase()?oe.y:0)+parseFloat(E())),a.lineTo(oe.x,oe.y);break;case"C":for(;!x();){Et=new Wt,b(Et);var je=tt(),Dn=z();Eh(a,Et.x,Et.y,je.x,je.y,Dn.x,Dn.y)}break;case"S":for(;!x();)Et=ot(),je=tt(),Dn=z(),Eh(a,Et.x,Et.y,je.x,je.y,Dn.x,Dn.y);break;case"Q":for(;!x();)Et=tt(),je=z(),zm(a,Et.x,Et.y,je.x,je.y);break;case"T":for(;!x();)ee=Et=ot(),je=z(),zm(a,Et.x,Et.y,je.x,je.y);break;case"B":for(;!x();){Et=parseFloat(E()),je=parseFloat(E()),Dn=parseFloat(E());var Un=parseFloat(E()),_n=parseFloat(E()),bn=_n,dn=!1;x()||(bn=parseFloat(E()),x()||(dn=parseFloat(E())!==0)),Ut===Ut.toLowerCase()&&(Dn+=oe.x,Un+=oe.y),a.arcTo(Et,je,Dn,Un,_n,bn,dn)}break;case"A":for(;!x();)Et=Math.abs(parseFloat(E())),je=Math.abs(parseFloat(E())),Dn=parseFloat(E()),_n=Un=!1,dn=bn=0,bn=E(),bn.length===1?(Un=!!parseFloat(bn),_n=!!parseFloat(E()),bn=parseFloat(E())):bn.length===2?(Un=!!parseFloat(bn[0]),_n=!!parseFloat(bn[1]),bn=parseFloat(E())):(Un=!!parseFloat(bn[0]),_n=!!parseFloat(bn[1]),bn=parseFloat(bn.slice(2))),dn=parseFloat(E()),Ut===Ut.toLowerCase()&&(bn=oe.x+bn,dn=oe.y+dn),oe.h(bn,dn),wx(a,Et,je,Dn,Un,_n,bn,dn);break;case"Z":Px(a),oe.assign(rt);break;case"F":for(Et="",je=1;lt[Nt+je];)if(lt[Nt+je]==="0")St=!0,je++;else if(lt[Nt+je].match(/[Uu]/)!==null)je++;else if(lt[Nt+je].match(Se)===null)je++;else{Et=lt[Nt+je];break}Et.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Et="",je=1;lt[Nt+je];)if(lt[Nt+je].match(/[Ff]/)!==null)je++;else if(lt[Nt+je].match(Se)===null)je++;else{Et=lt[Nt+je];break}Et.match(/[Mm]/)?gt=!0:a.mc.isShadowed=!1}if(rt=a.os,_m=a,y)for(y=rt.figures.iterator;y.next();)y.value.isFilled=!0;return rt},hn.Ha=function(a,y){for(var x=a.length,E=Wt.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}Wt.free(E)},hn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===hn.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},hn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===hn.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),Co(this,a,!1),Mr(a,0,0,0,0),a.freeze()},hn.prototype.ix=function(){var a=new on;return Co(this,a,!0),a};function Co(a,y,x){switch(a.type){case hn.j:case hn.u:case hn.F:x?y.h(a.od,a.pd,0,0):Mr(y,a.od,a.pd,0,0),Mr(y,a.Dc,a.Ec,0,0);break;case hn.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):Mr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,ot=tt.length,rt=z.startX,lt=z.startY,ut=0;ut<ot;ut++){var gt=tt[ut];switch(gt.type){case Xi:case yo:rt=gt.endX,lt=gt.endY,Mr(y,rt,lt,0,0);break;case Wo:me.Dl(rt,lt,gt.point1X,gt.point1Y,gt.point2X,gt.point2Y,gt.endX,gt.endY,.5,y),rt=gt.endX,lt=gt.endY;break;case cr:me.iv(rt,lt,gt.point1X,gt.point1Y,gt.endX,gt.endY,.5,y),rt=gt.endX,lt=gt.endY;break;case er:case Os:var St=gt.type===er?Ar(gt,z):Cs(gt,z,rt,lt),wt=St.length;if(wt===0){rt=gt.type===er?gt.centerX:gt.endX,lt=gt.type===er?gt.centerY:gt.endY,Mr(y,rt,lt,0,0);break}gt=null;for(var Et=0;Et<wt;Et++)gt=St[Et],me.Dl(gt[0],gt[1],gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],.5,y);gt!==null&&(rt=gt[6],lt=gt[7]);break;default:xe("Unknown Segment type: "+gt.type)}}}break;default:xe("Unknown Geometry type: "+a.type)}}hn.prototype.normalize=function(){this._isFrozen&&an(this);var a=this.ix();return this.offset(-a.x,-a.y),new Wt(-a.x,-a.y)},hn.prototype.offset=function(a,y){return this._isFrozen&&an(this),this.transform(1,0,0,1,a,y),this},hn.prototype.scale=function(a,y){return this._isFrozen&&an(this),this.transform(a,0,0,y,0,0),this},hn.prototype.rotate=function(a,y,x){this._isFrozen&&an(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=fi.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),fi.free(E),this},bt=hn.prototype,bt.transform=function(a,y,x,E,b,z){switch(this.type){case hn.j:case hn.u:case hn.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 hn.o:for(var rt=this.figures.s,lt=rt.length,ut=0;ut<lt;ut++){var gt=rt[ut];tt=gt.startX,ot=gt.startY,gt.startX=tt*a+ot*x+b,gt.startY=tt*y+ot*E+z,gt=gt.segments.s;for(var St=gt.length,wt=0;wt<St;wt++){var Et=gt[wt];switch(Et.type){case Xi:case yo:tt=Et.endX,ot=Et.endY,Et.endX=tt*a+ot*x+b,Et.endY=tt*y+ot*E+z;break;case Wo:tt=Et.point1X,ot=Et.point1Y,Et.point1X=tt*a+ot*x+b,Et.point1Y=tt*y+ot*E+z,tt=Et.point2X,ot=Et.point2Y,Et.point2X=tt*a+ot*x+b,Et.point2Y=tt*y+ot*E+z,tt=Et.endX,ot=Et.endY,Et.endX=tt*a+ot*x+b,Et.endY=tt*y+ot*E+z;break;case cr:tt=Et.point1X,ot=Et.point1Y,Et.point1X=tt*a+ot*x+b,Et.point1Y=tt*y+ot*E+z,tt=Et.endX,ot=Et.endY,Et.endX=tt*a+ot*x+b,Et.endY=tt*y+ot*E+z;break;case er:tt=Et.centerX,ot=Et.centerY,Et.centerX=tt*a+ot*x+b,Et.centerY=tt*y+ot*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Et.startAngle+=tt),0>a&&(Et.startAngle=180-Et.startAngle,Et.sweepAngle=-Et.sweepAngle),0>E&&(Et.startAngle=-Et.startAngle,Et.sweepAngle=-Et.sweepAngle),Et.radiusX*=Math.sqrt(a*a+x*x),Et.radiusY!==void 0&&(Et.radiusY*=Math.sqrt(y*y+E*E));break;case Os:if(tt=Et.endX,ot=Et.endY,Et.endX=tt*a+ot*x+b,Et.endY=tt*y+ot*E+z,Et.radiusX===0||Et.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Et.xAxisRotation+=tt),0>a&&(Et.xAxisRotation=180-Et.xAxisRotation,Et.isClockwiseArc=!Et.isClockwiseArc),0>E&&(Et.xAxisRotation=-Et.xAxisRotation,Et.isClockwiseArc=!Et.isClockwiseArc),Et.radiusX*=Math.sqrt(a*a+x*x),Et.radiusY*=Math.sqrt(y*y+E*E);break;default:xe("Unknown Segment type: "+Et.type)}}}}return this._isInvalidBounds=!0,this},bt.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 hn.j:return me.Yb(x,E,b,z,y,a.x,a.y);case hn.u:var tt=on.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),on.free(tt),a;case hn.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 hn.o:return Li(this,a,y,!0,!1);default:return!1}};function Li(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,ot=0,rt,lt,ut,gt,St=a.figures.s,wt=St.length,Et=0;Et<wt;Et++){var Nt=St[Et],Ut=!Nt.isEvenOdd;if(Nt.isFilled){if(E&&Nt.ca(z,y,x))return!0;var jt=Nt.segments;rt=Nt.startX,lt=Nt.startY;for(var ee=rt,oe=lt,ae=jt.s,Se=0;Se<=jt.length;Se++){var je=void 0;if(Se!==jt.length){je=ae[Se];var Dn=je.type;a=je.endX,gt=je.endY}else Dn=Xi,a=ee,gt=oe;switch(Dn){case yo:if(ee=Wi(z,y,tt,y,rt,lt,ee,oe),isNaN(ee))return!0;ot+=ee,ee=a,oe=gt;break;case Xi:if(rt=Wi(z,y,tt,y,rt,lt,a,gt),isNaN(rt))return!0;ot+=rt;break;case Wo:ut=me.Fo(rt,lt,je.point1X,je.point1Y,je.point2X,je.point2Y,a,gt,tt,y,z,y,.5),ot+=ut;break;case cr:ut=me.Fo(rt,lt,(rt+2*je.point1X)/3,(lt+2*je.point1Y)/3,(2*je.point1X+a)/3,(2*je.point1Y+gt)/3,a,gt,tt,y,z,y,.5),ot+=ut;break;case er:case Os:Dn=je.type===er?Ar(je,Nt):Cs(je,Nt,rt,lt);var Un=Dn.length;if(Un===0){if(rt=Wi(z,y,tt,y,rt,lt,je.type===er?je.centerX:je.endX,je.type===er?je.centerY:je.endY),isNaN(rt))return!0;ot+=rt;break}je=null;for(var _n=0;_n<Un;_n++){if(je=Dn[_n],_n===0){if(ut=Wi(z,y,tt,y,rt,lt,je[0],je[1]),isNaN(ut))return!0;ot+=ut}ut=me.Fo(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],tt,y,z,y,.5),ot+=ut}je!==null&&(a=je[6],gt=je[7]);break;default:xe("Unknown Segment type: "+je.type)}rt=a,lt=gt}if(Ut){if(ot!==0)return!0}else if(ot%2!==0)return!0;ot=0}else if(Nt.ca(z,y,b?x:x+2))return!0}return!1}function Wi(a,y,x,E,b,z,tt,ot){if(me.Yb(b,z,tt,ot,.05,a,y))return NaN;var rt=(a-x)*(z-ot);if(rt===0)return 0;var lt=((a*E-y*x)*(b-tt)-(a-x)*(b*ot-z*tt))/rt;if(y=(a*E-y*x)*(z-ot)/rt,lt>=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(lt<b||lt>tt)return 0}else if(lt<tt||lt>b)return 0;return 0<rt?1:-1}function rr(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}bt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Wt),this.type===hn.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],lt=rt.length;for(a=0;a<lt;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},bt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===hn.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 lt=ot[a];if(z+lt>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=lt}}return NaN},bt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===hn.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],lt=rt.length;for(a=0;a<lt;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},bt.xx=function(a){if(this.type===hn.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=Wt.alloc();return me.qh(y,x,E,b,z,a,ot),a=ot.x,z=ot.y,Wt.free(ot),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===hn.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 lt=Math.min(tt,rt,ot,b);if(lt===ot)return E/z;if(lt===rt)return(y+a)/z;if(lt===b)return(2*y+x-E)/z;if(lt===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Wt.alloc(),b=1/0,ot=tt=0,rt=y.length;for(var ut=lt=0,gt=0;gt<rt;gt++)for(var St=y[gt],wt=x[gt],Et=St.length,Nt=0;Nt<Et;Nt+=2){var Ut=St[Nt],jt=St[Nt+1];if(Nt!==0){me.qh(lt,ut,Ut,jt,a.x,a.y,E);var ee=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);ee<b&&(b=ee,tt=ot,tt+=Math.sqrt((E.x-lt)*(E.x-lt)+(E.y-ut)*(E.y-ut))),ot+=wt[(Nt-2)/2]}lt=Ut,ut=jt}return Wt.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function jr(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===hn.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===hn.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===hn.F){var z=new tr;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new si(er);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=Ar(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];me.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(Vr(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 lt=b.segments.s,ut=lt.length,gt=0;gt<ut;gt++){var St=lt[gt];switch(St.type){case yo:4<=E.length&&(y.push(E),x.push(Vr(E))),E=[],E.push(St.endX),E.push(St.endY),tt=St.endX,z=St.endY,ot=tt,rt=z;break;case Xi:E.push(St.endX),E.push(St.endY),tt=St.endX,z=St.endY;break;case Wo:me.Qe(tt,z,St.point1X,St.point1Y,St.point2X,St.point2Y,St.endX,St.endY,.5,E),tt=St.endX,z=St.endY;break;case cr:me.ep(tt,z,St.point1X,St.point1Y,St.endX,St.endY,.5,E),tt=St.endX,z=St.endY;break;case er:var wt=Ar(St,b),Et=wt.length;if(Et===0){E.push(St.centerX),E.push(St.centerY),tt=St.centerX,z=St.centerY;break}for(var Nt=0;Nt<Et;Nt++){var Ut=wt[Nt];me.Qe(tt,z,Ut[2],Ut[3],Ut[4],Ut[5],Ut[6],Ut[7],.5,E),tt=Ut[6],z=Ut[7]}break;case Os:if(wt=Cs(St,b,tt,z),Et=wt.length,Nt=St.endX,Ut=St.endY,Et===0){E.push(Nt),E.push(Ut),tt=Nt,z=Ut;break}for(Nt=0;Nt<Et;Nt++)Ut=wt[Nt],me.Qe(tt,z,Ut[2],Ut[3],Ut[4],Ut[5],Ut[6],Ut[7],.5,E),tt=Ut[6],z=Ut[7];break;default:xe("Segment not of valid type: "+St.type)}St.isClosed&&(E.push(ot),E.push(rt))}4<=E.length&&(y.push(E),x.push(Vr(E)))}}}function Vr(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(Vi(x,E,tt,ot))),x=tt,E=ot}return y}bt.add=function(a){return this.ee.add(a),this},bt.pm=function(a,y,x,E,b,z,tt,ot){return this._isFrozen&&an(this),this.fg=new Qn(a,y,b,z).freeze(),this.gg=new Qn(x,E,tt,ot).freeze(),this},re.Object.defineProperties(hn.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 jr(this),this.tk}},flattenedLengths:{get:function(){return jr(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===hn.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===hn.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&&an(this,a),this.na=a,a===hn.o?this.ee=new pn:(hn.V===null&&(hn.V=new pn().freeze()),this.ee=hn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&an(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&an(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&an(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&an(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&an(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&an(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&an(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&an(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),hn.prototype.setSpots=hn.prototype.pm,hn.prototype.add=hn.prototype.add,hn.prototype.getFractionForPoint=hn.prototype.xx,hn.prototype.getPointAndAngleAlongPath=hn.prototype.Qu,hn.prototype.getAngleAlongPath=hn.prototype.wx,hn.prototype.getPointAlongPath=hn.prototype.Pu,hn.prototype.containsPoint=hn.prototype.ca,hn.prototype.transform=hn.prototype.transform,hn.prototype.rotate=hn.prototype.rotate,hn.prototype.scale=hn.prototype.scale,hn.prototype.offset=hn.prototype.offset,hn.prototype.normalize=hn.prototype.normalize,hn.prototype.computeBoundsWithoutOrigin=hn.prototype.ix,hn.prototype.equalsApprox=hn.prototype.Xa,hn.className="Geometry",hn.j=new Oe(hn,"Line",0),hn.u=new Oe(hn,"Rectangle",1),hn.F=new Oe(hn,"Ellipse",2),hn.o=new Oe(hn,"Path",3),hn.V=null,hn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",hn.className="Geometry",hn.stringify=hn.ia,hn.fillPath=hn.nb,hn.parse=hn.parse,hn.Line=hn.j,hn.Rectangle=hn.u,hn.Ellipse=hn.F,hn.Path=hn.o;function tr(a,y,x,E,b){po(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 pn,this.sr=this.pl.Ja,this.fw=null}tr.prototype.copy=function(){var a=new tr;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},bt=tr.prototype,bt.Xa=function(a){if(!(a instanceof tr&&me.B(this.startX,a.startX)&&me.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},bt.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},bt.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},bt.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},bt.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},bt.add=function(a){return this.pl.add(a),this},bt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,ot=this.segments.s,rt=ot.length,lt=0;lt<rt;lt++){var ut=ot[lt];switch(ut.type){case yo:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case Xi:if(me.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case Wo:if(me.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 cr:if(me.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 er:case Os:var gt=ut.type===er?Ar(ut,this):Cs(ut,this,E,b),St=gt.length,wt=ut.type===er?ut.centerX:ut.endX,Et=ut.type===er?ut.centerY:ut.endY;if(St===0){if(me.Yb(E,b,wt,Et,x,a,y))return!0;E=wt,b=Et;break}for(wt=null,Et=0;Et<St;Et++)if(wt=gt[Et],Et===0&&me.Yb(E,b,wt[0],wt[1],x,a,y)||me.cs(wt[0],wt[1],wt[2],wt[3],wt[4],wt[5],wt[6],wt[7],.5,a,y,x))return!0;wt!==null&&(E=wt[6],b=wt[7]);break;default:xe("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&me.Yb(E,b,z,tt,x,a,y))return!0}return!1},re.Object.defineProperties(tr.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&&an(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&an(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&an(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&an(this,a),this.pl=a,this._isInvalidBounds=!0}}}),tr.prototype.add=tr.prototype.add,tr.prototype.equalsApprox=tr.prototype.Xa,tr.className="PathFigure";function si(a,y,x,E,b,z,tt,ot){po(this),a===void 0&&(a=Xi),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===Os?(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===er&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===er&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}si.prototype.copy=function(){var a=new si;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},bt=si.prototype,bt.Xa=function(a){if(!(a instanceof si)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case yo:case Xi:return me.B(this.endX,a.endX)&&me.B(this.endY,a.endY);case Wo:return me.B(this.endX,a.endX)&&me.B(this.endY,a.endY)&&me.B(this.point1X,a.point1X)&&me.B(this.point1Y,a.point1Y)&&me.B(this.point2X,a.point2X)&&me.B(this.point2Y,a.point2Y);case cr:return me.B(this.endX,a.endX)&&me.B(this.endY,a.endY)&&me.B(this.point1X,a.point1X)&&me.B(this.point1Y,a.point1Y);case er:return me.B(this.startAngle,a.startAngle)&&me.B(this.sweepAngle,a.sweepAngle)&&me.B(this.centerX,a.centerX)&&me.B(this.centerY,a.centerY)&&me.B(this.radiusX,a.radiusX)&&me.B(this.radiusY,a.radiusY);case Os:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&me.B(this.xAxisRotation,a.xAxisRotation)&&me.B(this.endX,a.endX)&&me.B(this.endY,a.endY)&&me.B(this.radiusX,a.radiusX)&&me.B(this.radiusY,a.radiusY);default:return!1}},bt.qb=function(a){a.classType===si&&(this.type=a)},bt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case yo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Xi:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wo: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 cr: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 er: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 Os: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":"")},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.close=function(){return this.isClosed=!0,this};function Ar(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=me.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=fi.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),hn.Ha(z,tt),fi.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 Cs(a,y,x,E){function b(Nt,Ut,jt,ee){return(Nt*ee<Ut*jt?-1:1)*Math.acos((Nt*jt+Ut*ee)/(Math.sqrt(Nt*Nt+Ut*Ut)*Math.sqrt(jt*jt+ee*ee)))}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,lt=a.Dc,ut=a.Ec,gt=Math.cos(tt),St=Math.sin(tt),wt=gt*(x-lt)/2+St*(E-ut)/2;tt=-St*(x-lt)/2+gt*(E-ut)/2;var Et=wt*wt/(y*y)+tt*tt/(z*z);return 1<Et&&(y*=Math.sqrt(Et),z*=Math.sqrt(Et)),Et=(ot===rt?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*wt*wt)/(y*y*tt*tt+z*z*wt*wt)),isNaN(Et)&&(Et=0),ot=Et*y*tt/z,Et=Et*-z*wt/y,isNaN(ot)&&(ot=0),isNaN(Et)&&(Et=0),x=(x+lt)/2+gt*ot-St*Et,E=(E+ut)/2+St*ot+gt*Et,ut=b(1,0,(wt-ot)/y,(tt-Et)/z),gt=(wt-ot)/y,lt=(tt-Et)/z,wt=(-wt-ot)/y,ot=(-tt-Et)/z,tt=b(gt,lt,wt,ot),wt=(gt*wt+lt*ot)/(Math.sqrt(gt*gt+lt*lt)*Math.sqrt(wt*wt+ot*ot)),-1>=wt?tt=Math.PI:1<=wt&&(tt=0),!rt&&0<tt&&(tt-=2*Math.PI),rt&&0>tt&&(tt+=2*Math.PI),rt=y>z?1:y/z,wt=y>z?z/y:1,y=me.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=fi.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(rt,wt),hn.Ha(y,z),fi.free(z),a.ae=y,a.ae}re.Object.defineProperties(si.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&&an(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&an(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&an(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&an(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&an(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&an(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&an(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&an(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&an(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Mn(a,">= zero",si,"radiusX"),this._isFrozen&&an(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Mn(a,">= zero",si,"radiusY"),this._isFrozen&&an(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&an(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&&an(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&&an(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&&an(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&&an(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),si.prototype.equalsApprox=si.prototype.Xa;var yo=new Oe(si,"Move",0),Xi=new Oe(si,"Line",1),Wo=new Oe(si,"Bezier",2),cr=new Oe(si,"QuadraticBezier",3),er=new Oe(si,"Arc",4),Os=new Oe(si,"SvgArc",4);si.className="PathSegment",si.Move=yo,si.Line=Xi,si.Bezier=Wo,si.QuadraticBezier=cr,si.Arc=er,si.SvgArc=Os;function fs(){this.H=null,this.xu=new Wt(0,0).freeze(),this.mt=new Wt(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}fs.prototype.copy=function(){var a=new fs;return this.clone(a)},fs.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},fs.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},fs.prototype.So=function(a,y){var x=this.diagram;return x===null||Eg(x,a,y),y},fs.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Eg(x,a,y),y.assign(x.Ps(y))),y},re.Object.defineProperties(fs.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}}}),fs.prototype.getMultiTouchDocumentPoint=fs.prototype.Bz,fs.prototype.getMultiTouchViewPoint=fs.prototype.So,fs.className="InputEvent";function Nl(){this.H=null,this.xa="",this.ar=this.Lr=null}Nl.prototype.copy=function(){var a=new Nl;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Nl.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},re.Object.defineProperties(Nl.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}}}),Nl.className="DiagramEvent";function sr(){this.Fm=ar,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}sr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},sr.prototype.copy=function(){var a=new sr;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=_e(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=_e(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=_e(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=_e(y)&&typeof y.J=="function"?y.J():y,a},sr.prototype.qb=function(a){a.classType===sr&&(this.change=a)},sr.prototype.toString=function(){var a="";return a=this.change===Ds?a+"* ":this.change===ar?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===Ds?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=xi(this.object)),this.oldValue!==null&&(a+=" old: "+xi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+xi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},sr.prototype.I=function(a){return a?this.oldValue:this.newValue},sr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},sr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},sr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},sr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},sr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},re.Object.defineProperties(sr.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===Ds&&(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}}}),sr.prototype.redo=sr.prototype.redo,sr.prototype.canRedo=sr.prototype.canRedo,sr.prototype.undo=sr.prototype.undo,sr.prototype.canUndo=sr.prototype.canUndo,sr.prototype.getParam=sr.prototype.Dz,sr.prototype.getValue=sr.prototype.I,sr.prototype.clear=sr.prototype.clear;var Ds=new Oe(sr,"Transaction",-1),ar=new Oe(sr,"Property",0),wr=new Oe(sr,"Insert",1),Rr=new Oe(sr,"Remove",2);sr.className="ChangedEvent",sr.Transaction=Ds,sr.Property=ar,sr.Insert=wr,sr.Remove=Rr;function os(){this.o=new pn().freeze(),this.xa="",this.j=!1}os.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},os.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()},os.prototype.canUndo=function(){return this.isComplete},os.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()}},os.prototype.canRedo=function(){return this.isComplete},os.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()}},os.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Yn,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===ar&&E.object){var b=y.get(E.object);b||(b=new Yn,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()}},re.Object.defineProperties(os.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}}}),os.prototype.optimize=os.prototype.ak,os.prototype.redo=os.prototype.redo,os.prototype.canRedo=os.prototype.canRedo,os.prototype.undo=os.prototype.undo,os.prototype.canUndo=os.prototype.canUndo,os.prototype.clear=os.prototype.clear,os.className="Transaction";function Sr(){this.Pt=new mn,this.Jd=!1,this.u=new pn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new pn().freeze(),this.hl=new pn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Sr.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},Sr.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},Sr.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},bt=Sr.prototype,bt.Xw=function(a){this.Pt.add(a)},bt.Rx=function(a){this.Pt.remove(a)},bt.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},bt.eb=function(a){return a===void 0&&(a=""),zu(this,!0,a)},bt.Kf=function(){return zu(this,!1,"")};function zu(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Vn("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}bt.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()}},Sr.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Sr.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){Vn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Sr.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Sr.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){Vn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Sr.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new sr;for(E.change=Ds,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Sr.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new os);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||Vn("Change not within a transaction: "+x.toString()))}},Sr.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},re.Object.defineProperties(Sr.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}}}),Sr.prototype.handleChanged=Sr.prototype.Tu,Sr.prototype.redo=Sr.prototype.redo,Sr.prototype.undo=Sr.prototype.undo,Sr.prototype.canUndo=Sr.prototype.canUndo,Sr.prototype.discardHistoryAfterIndex=Sr.prototype.lx,Sr.prototype.rollbackTransaction=Sr.prototype.Kf,Sr.prototype.commitTransaction=Sr.prototype.eb,Sr.prototype.startTransaction=Sr.prototype.Ea,Sr.prototype.removeModel=Sr.prototype.Rx,Sr.prototype.addModel=Sr.prototype.Xw,Sr.prototype.clear=Sr.prototype.clear,Sr.className="UndoManager";function So(){po(this),this.H=xu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new fs,this.Zr=-1}So.prototype.toString=function(){return this.name!==""?this.name+" Tool":ui(this.constructor)},So.prototype.updateAdornments=function(){},So.prototype.canStart=function(){return this.isEnabled},So.prototype.doStart=function(){},So.prototype.doActivate=function(){this.isActive=!0},So.prototype.doDeactivate=function(){this.isActive=!1},So.prototype.doStop=function(){},So.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},So.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},So.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},So.prototype.doMouseMove=function(){},So.prototype.doMouseUp=function(){this.stopTool()},So.prototype.doMouseWheel=function(){},So.prototype.canStartMultiTouch=function(){return!0},So.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Wt.allocAt(NaN,NaN)),E=y.So(1,Wt.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}Wt.free(x),Wt.free(E)},So.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Wt.allocAt(NaN,NaN)),E=y.So(1,Wt.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 Wt((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}Wt.free(x),Wt.free(E)},So.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},So.prototype.doKeyUp=function(){},So.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},So.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},So.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Ao?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||(Ao?y.meta:y.control)||y.shift||a.clearSelection()}},So.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,Ld(a,E,x),E.handled};function Ld(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)}}}So.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}},So.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},So.prototype.doCurrentObjectChanged=function(){},So.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===ah&&!y.shift||b===sh&&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===ah&&y.shift||b===sh&&!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)}}},So.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},So.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Bn(function(){x.doWaitAfter(E)},a)},So.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Yt.clearTimeout(this.Zr),this.Zr=-1},So.prototype.doWaitAfter=function(){},So.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Eo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},So.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},re.Object.defineProperties(So.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof ze&&(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}}}),So.prototype.startTransaction=So.prototype.Ea,So.className="Tool";function fr(){So.call(this),this.name="ToolManager",this.hb=new pn,this.ob=new pn,this.Hb=new pn,this.F=this.V=850,this.o=new Nn(2,2).ja(),this.Ha=5e3,this.ia=sh,this.u=kn,this.Mp=this.j=null,this.zj=-1}Le(fr,So),fr.prototype.initializeStandardTools=function(){},fr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Eo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},fr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Di&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Jo){y.bubbles=!0;return}if(this.gestureBehavior===Di)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===sh?this.mouseWheelBehavior=ah:this.mouseWheelBehavior===ah&&(this.mouseWheelBehavior=sh)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},fr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Jo){y.bubbles=!0;return}if(this.gestureBehavior===Di)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}}tf(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function tf(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}fr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Eo&&(y===a||y.rg(a))||this.hideToolTip()},fr.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()))},fr.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)},fr.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 Eo)||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()},fr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Eo){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 au&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Yt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Bn(function(){b.hideToolTip()},a)}},fr.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}},fr.prototype.hideToolTip=function(){this.zj!==-1&&(Yt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Eo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof au&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},fr.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()},fr.prototype.doMouseWheel=function(){this.standardMouseWheel()},fr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},fr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},fr.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},fr.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},fr.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)},re.Object.defineProperties(fr.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 Eo?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}}}),fr.prototype.replaceStandardTool=fr.prototype.gb;var sh=new Oe(fr,"WheelScroll",0),ah=new Oe(fr,"WheelZoom",1),Fd=new Oe(fr,"WheelNone",2),kn=new Oe(fr,"GestureZoom",3),Di=new Oe(fr,"GestureCancel",4),Jo=new Oe(fr,"GestureNone",5);fr.className="ToolManager",fr.WheelScroll=sh,fr.WheelZoom=ah,fr.WheelNone=Fd,fr.GestureZoom=kn,fr.GestureCancel=Di,fr.GestureNone=Jo;function wi(){So.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 Wt(NaN,NaN),this.Fr=new Wt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new mn().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var pi;Le(wi,So),wi.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},wi.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},wi.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,(Ao?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},wi.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),ys=null,this.isActive=!0,this.tl.set(a.position),Cr(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&&ma(a),mf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ys=this,lh=this.diagram,this.doSimulatedDragOut()))};function Cr(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Ln?(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 $a,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}wi.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},wi.prototype.Pd=function(a){return a===void 0?new Zu(Fo):this.isGridSnapEnabled?new Zu(new Wt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Zu(a.copy())},wi.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Kr(this),ed(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<pi.count){for(var y=pi,x=y.length,E=0;E<x;E++){var b=y.M(E);Er(b),ls(b),Kr(b),b.diagram.ug()}y.clear()}Er(this),this.tl.h(NaN,NaN),lh!==null&&(lh.currentCursor=""),ys=lh=null,ls(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),wc(a,!0)},wi.prototype.stopTransaction=function(){var a=this.diagram,y=So.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Kr(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Ua(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function gs(){var a=ys;ls(a),ru(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}wi.prototype.doCancel=function(){ls(this),ru(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},wi.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},wi.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function $o(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")):ru(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 Yn,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 Ln&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Cr(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Lh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ls(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 Ln&&(x.value.point=new Wt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Er(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 pa(a,y,x){var E=a.diagram,b=a.startPoint,z=Wt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Wt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(ma(E),E.hk())}wi.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&td(E,a,y,this.dragOptions,x)};function ru(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 Ln&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Lh(E,-b.x,-b.y)}y.bd()}}function Lo(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Da(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=Ua(a,b,E),!a.isActive&&ys===null)return;var ot=E!==null?E.part:null;if(ot===null||x.handlesDragDropForTopLevelParts&&ot.isTopLevel&&!(ot instanceof bi)){var rt=x.mouseDragOver;rt!==null&&(rt(b),tt=!0)}if(!a.isActive&&ys===null||(a.doDragOver(y,E),!a.isActive&&ys===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)}wi.prototype.findDragOverObject=function(a){var y=this;return Pu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Eo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},wi.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 Ua(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&&ys===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=ol(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 ol(a){var y=a.panel;return y!==null?y:a instanceof ai&&!(a instanceof bi)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Ys(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(lt){return E.findValidLinkablePort(lt,x)});a=Wt.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(wo,a);rt=y.Bf(rt),rt<z&&(tt=ot,z=rt)}}return Wt.free(a),tt}function Da(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=Ys(a,x.i(0),!1),z!==null&&(tt=z.part));var ot=null,rt=null;x.toNode===null&&(ot=Ys(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)):ef(b,tt,z,rt,ot):ef(b,null,null,null,null)}}}}wi.prototype.doDragOver=function(){};function kl(a,y){var x=a.diagram;a.dragsLink&&Da(a,!0),Kr(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;Gh(a,b,z),z=ol(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||ys!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Rn&&z.linksConnected.each(function(ot){ot.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||ys!==null){for(a=on.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Rn&&su(x,E,a);on.free(a)}}}function Gh(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof bi||(x=a.mouseDrop,x!==null&&x(y))}function su(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 Ln},!0,function(b){return b instanceof Ln},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}wi.prototype.doDropOnto=function(){},wi.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()?($o(this,!1),mf(a,this.copiedParts),pa(this,this.copiedParts,!1),ed(a,this.copiedParts)):this.mayMove()?(ls(this),pa(this,this.draggedParts,!0)):this.mayDragOut()?($o(this,!1),pa(this,this.copiedParts,!1)):ls(this),Lo(this,a.lastInput.documentPoint))}},wi.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?(ls(this),$o(this,!0),mf(a,this.copiedParts),pa(this,this.copiedParts,!1),ed(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,ls(this),this.mayMove()&&(pa(this,this.draggedParts,!0),Lo(this,a.lastInput.documentPoint))),this.Ym=!0,kl(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Wh(this),a.Ya(),ed(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},wi.prototype.simulatedMouseMove=function(a,y,x){if(ys===null)return!1;var E=ys.diagram;x instanceof ze||(x=null);var b=lh;return x!==b&&(b!==null&&b!==E&&(b.ug(),ys.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),lh=x,x!==null&&x!==E&&(gs(),b=x.toolManager.findTool("Dragging"),b!==null&&(pi.contains(b)||pi.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)},wi.prototype.simulatedMouseUp=function(a,y,x){if(ys===null)return!1;var E=lh,b=ys.diagram;if(x===null)return ys.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),ys.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;lh=x,E=x.toolManager.findTool("Dragging"),E!==null&&(gs(),pi.contains(E)||pi.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 Wt),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=ys,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Wh(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Rn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}wi.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Ao?!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())},wi.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())},wi.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())},wi.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},wi.prototype.Az=function(){return ys},wi.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ys;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},wi.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),al(a),a.animationManager.Cc(),a=ys,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},wi.prototype.doSimulatedDragLeave=function(){var a=ys;a!==null&&a.doSimulatedDragOut(),this.doCancel()},wi.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ys;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;_p(this,y.draggedParts.Lf(),!1,a.firstInput),pa(this,this.copiedParts,!1),Lo(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},wi.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ys;if(y!==null){var x=y.diagram;if(y.Ym=!0,ls(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),_p(this,y.draggedParts.Lf(),!0,a.lastInput),pa(this,this.copiedParts,!1);var E=new mn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),kl(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 _p(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=on.alloc();b=E=1/0;for(var tt=-1/0,ot=-1/0,rt=y.iterator;rt.next();){var lt=rt.value;if(lt.isVisible()){var ut=lt.location;lt=ut.x,ut=ut.y,isNaN(lt)||isNaN(ut)||(lt<E&&(E=lt),ut<b&&(b=ut),lt>tt&&(tt=lt),ut>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,on.free(z),z=a.Fr,tt=new Yn,ot=Wt.alloc(),rt=y.iterator;rt.next();)lt=rt.value,lt instanceof Ln&&lt.canCopy()&&(ut=x.I(lt),ut!==null&&(ut.points=lt.points,Lh(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)lt=y.value,lt.Zc()&&lt.canCopy()&&(rt=x.I(lt),rt!==null&&(lt=lt.location,ot.h(z.x-(E-lt.x),z.y-(b-lt.y)),rt.location=ot,rt.Va(),tt.add(rt,a.Pd(ot))));Wt.free(ot),a.copiedParts=tt,Cr(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Lh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}wi.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},wi.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Wt},re.Object.defineProperties(wi.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}}}),wi.prototype.getDraggingSource=wi.prototype.Az;var ys=null,lh=null;wi.className="DraggingTool",pi=new pn,On("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),fr.prototype.doCancel=function(){ys!==null&&ys.doCancel(),So.prototype.doCancel.call(this)};function Tr(){So.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Ln,y=new Ai;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Ai,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Rn,y=new Ai,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=or,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Rn,y=new Ai,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=or,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 Yn,this.Of=this.gj=this.Pf=null}Le(Tr,So),Tr.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Tr.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=Nn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,Nn.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=wo,z=Wt.alloc(),x.location=y.ga(wo,z),Wt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Tr.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=or,y.fromSpot=kr,y.toSpot=kr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Tr.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Tr.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Rn){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)}},Tr.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Rn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Rn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Tr.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(gt){return b.findValidLinkablePort(gt,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,ot=tt.part;if(ot instanceof Rn){var rt=tt.ga(wo,Wt.alloc()),lt=x.x-rt.x,ut=x.y-rt.y;Wt.free(rt),rt=lt*lt+ut*ut,rt<E&&(lt=this.validPortsCache.I(tt),lt!==null?lt&&(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 Rn&&(x.layer===null||x.layer.allowLink))?y:null},Tr.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},Tr.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},Tr.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Tr.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Rn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Rn))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},Tr.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)},Tr.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 mn;return E.add(a),Gs(this,x,y,E)};function Gs(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Gs(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Gs(a,y.labeledLink,x,E))))}Tr.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!==Lc){if(E===_g){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!Xs(this,a,y,x,!0)}if(E===Hg){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!Xs(this,a,y,x,!0)}if(E===Rg)return a===y?a=!0:(E=new mn,E.add(y),a=Js(this,E,a,y,x)),!a;if(E===jg)return!Xs(this,a,y,x,!1);if(E===zg)return a===y?a=!0:(E=new mn,E.add(y),a=Bd(this,E,a,y,x)),!a}return!0};function Xs(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&&Xs(a,tt,x,E,b)))return!0}return!1}function Js(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&&Js(a,y,tt,E,b)))return!0}return!1}function Bd(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&&Bd(a,y,ot,E,b))return!0}}return!1}re.Object.defineProperties(Tr.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}}}),Tr.className="LinkingBaseTool";function Qs(){Tr.call(this),this.name="Linking",this.V={},this.F=null,this.K=Zh,this.Xd=null}Le(Qs,Tr),Qs.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},Qs.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 Rn)))return null;var x=this.direction;if(x===Zh||x===Hp){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===Zh||x===Gp)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Qs.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 Rn&&(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 Rn&&(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)},Qs.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()},Qs.prototype.doStop=function(){Tr.prototype.doStop.call(this),this.startObject=null},Qs.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 Rn&&(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)}}},Qs.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Ln)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)},Qs.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Qs.prototype.doNoLink=function(){},re.Object.defineProperties(Qs.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 Zh=new Oe(Qs,"Either",0),Hp=new Oe(Qs,"ForwardsOnly",0),Gp=new Oe(Qs,"BackwardsOnly",0);Qs.className="LinkingTool",Qs.Either=Zh,Qs.ForwardsOnly=Hp,Qs.BackwardsOnly=Gp;function $a(){Tr.call(this),this.name="Relinking";var a=new Ai;a.figure="Diamond",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Ai,a.figure="Diamond",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new on}Le($a,Tr),$a.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Ln){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)}},$a.prototype.makeAdornment=function(a,y){var x=new Eo;return x.type=Cn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},$a.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},$a.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 Eo&&x.adornedPart instanceof Ln))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=Ro),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ro),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},$a.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===_f||x===Fh)&&(x=ra),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}},$a.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()},$a.prototype.doStop=function(){Tr.prototype.doStop.call(this),this.handle=null},$a.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 Rn&&(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()}}},$a.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},$a.prototype.doNoRelink=function(){};function ef(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)}re.Object.defineProperties($a.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 Eo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),$a.className="RelinkingTool",On("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),On("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function _r(){So.call(this),this.name="LinkReshaping";var a=new Ai;a.figure="Rectangle",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Ai,a.figure="Diamond",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Wt,this.Yq=new pn}Le(_r,So),_r.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:hg},_r.prototype.om=function(a,y){a.reshapingBehavior=y},_r.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Ln){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)}},_r.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Eo,b.type=Cn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==Qa)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 lt=y.i(x+1);me.B(rt.x,lt.x)&&me.B(rt.y,lt.y)&&(lt=y.i(x-1)),me.B(rt.x,lt.x)?(this.om(ot,dh),ot.cursor="n-resize"):me.B(rt.y,lt.y)&&(this.om(ot,hh),ot.cursor="w-resize")}else tt===z-1&&E?(rt=y.i(z-1),lt=y.i(z),me.B(rt.x,lt.x)&&me.B(rt.y,lt.y)&&(rt=y.i(z+1)),me.B(rt.x,lt.x)?(this.om(ot,dh),ot.cursor="n-resize"):me.B(rt.y,lt.y)&&(this.om(ot,hh),ot.cursor="w-resize")):tt!==z&&(this.om(ot,nf),ot.cursor="move");b.add(ot)}b.adornedObject=a}return b},_r.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},_r.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},_r.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},_r.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 Ln){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}}},_r.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},_r.prototype.stopTransaction=function(){var a=this.diagram,y=So.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},_r.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},_r.prototype.getResegmentingPoint=function(){return this.handle.ga(wo)},_r.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},_r.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&&(uh(this,tt,E,b,z,!0)||uh(this,tt,E,b,z,!1))){var ot=y.points.copy();uh(this,tt,E,b,z,!0)?(ot.cd(x-2,new Wt(tt.x,(z.y+tt.y)/2)),ot.cd(x+1,new Wt(z.x,(z.y+tt.y)/2))):(ot.cd(x-2,new Wt((z.x+tt.x)/2,tt.y)),ot.cd(x+1,new Wt((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&&(uh(this,E,b,z,tt,!0)||uh(this,E,b,z,tt,!1))&&(ot=y.points.copy(),uh(this,E,b,z,tt,!0)?(ot.cd(x-1,new Wt(E.x,(E.y+tt.y)/2)),ot.cd(x+2,new Wt(tt.x,(E.y+tt.y)/2))):(ot.cd(x-1,new Wt((E.x+tt.x)/2,E.y)),ot.cd(x+2,new Wt((E.x+tt.x)/2,tt.y))),ot.mb(x+1),ot.mb(x),y.points=ot,y.Wb())}}else tt=Wt.alloc(),me.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()),Wt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function uh(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}_r.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===dh?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===hh&&(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===dh?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===hh&&(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);me.B(z.x,b.x)&&me.B(b.y,tt.y)?(me.B(z.x,y.i(E-2).x)&&!me.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),me.B(tt.y,y.i(E+2).y)&&!me.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):me.B(z.y,b.y)&&me.B(b.x,tt.x)?(me.B(z.y,y.i(E-2).y)&&!me.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),me.B(tt.x,y.i(E+2).x)&&!me.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):me.B(z.x,b.x)&&me.B(b.x,tt.x)?(me.B(z.x,y.i(E-2).x)&&!me.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),me.B(tt.x,y.i(E+2).x)&&!me.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):me.B(z.y,b.y)&&me.B(b.y,tt.y)&&(me.B(z.y,y.i(E-2).y)&&!me.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),me.B(tt.y,y.i(E+2).y)&&!me.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(wo,Wt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Wt.alloc()),y.L(0,E.x,E.y),Wt.free(z),Wt.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(wo,Wt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Wt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Wt.free(x),Wt.free(a));y.zf()},_r.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case nf:return a;case dh:return new Wt(y.i(x).x,a.y);case hh:return new Wt(a.x,y.i(x).y);default:case hg:return y.i(x)}},re.Object.defineProperties(_r.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 Eo))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}}}),_r.prototype.setReshapingBehavior=_r.prototype.om,_r.prototype.getReshapingBehavior=_r.prototype.Ru;var hg=new Oe(_r,"None",0),hh=new Oe(_r,"Horizontal",1),dh=new Oe(_r,"Vertical",2),nf=new Oe(_r,"All",3);_r.className="LinkReshapingTool",_r.None=hg,_r.Horizontal=hh,_r.Vertical=dh,_r.All=nf,On("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function As(){So.call(this),this.name="Resizing",this.o=new Nn(1,1).freeze(),this.j=new Nn(9999,9999).freeze(),this.yg=new Nn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Ai;a.alignmentFocus=wo,a.figure="Rectangle",a.desiredSize=Ir,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Wt,this.Dw=new Nn,this.Tn=new Wt,this.rt=new Nn(0,0),this.qt=new Nn(1/0,1/0),this.pt=new Nn(1,1)}Le(As,So),As.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Ln)){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(),ad(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},As.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Eo,y.type=Cn.Spot,y.locationSpot=wo;var x=new oa;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,is)),y.add(this.makeHandle(a,iu)),y.add(this.makeHandle(a,Hs)),y.add(this.makeHandle(a,bs)),y.add(this.makeHandle(a,Ri)),y.add(this.makeHandle(a,Bo)),y.add(this.makeHandle(a,Qi)),y.add(this.makeHandle(a,Gi))}else if(Cl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},As.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},As.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=wo),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 Cn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},As.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},As.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))},As.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},As.prototype.stopTransaction=function(){var a=this.diagram,y=So.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},As.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},As.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,Wt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Wt.free(b)}},As.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,Wt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Wt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},As.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 bi){var E=new pn;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()}},As.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=wo);var tt=this.adornedObject.naturalBounds,ot=tt.x,rt=tt.y,lt=tt.x+tt.width,ut=tt.y+tt.height,gt=1;if(!z){gt=tt.width;var St=tt.height;0>=gt&&(gt=1),0>=St&&(St=1),gt=St/gt}return St=Wt.alloc(),me.No(a.x,a.y,ot,rt,b.width,b.height,St),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(St.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.y=Math.max(St.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(gt*a.width,E.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,E.width),x.width),a.height=gt*a.width),a.x=lt-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(St.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.height=Math.max(Math.min(St.y-rt,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(gt*a.width,E.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,E.width),x.width),a.height=gt*a.width),a.x=lt-a.width)):(a.x=Math.max(St.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=lt-a.x,z||(a.height=Math.max(Math.min(gt*a.width,E.height),x.height),a.width=a.height/gt,a.y=rt+.5*(ut-rt-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(St.x-ot,E.width),x.width),a.y=Math.max(St.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(gt*a.width,E.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,E.width),x.width),a.height=gt*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(St.x-ot,E.width),x.width),a.height=Math.max(Math.min(St.y-rt,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(gt*a.width,E.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,E.width),x.width),a.height=gt*a.width))):(a.width=Math.max(Math.min(St.x-ot,E.width),x.width),z||(a.height=Math.max(Math.min(gt*a.width,E.height),x.height),a.width=a.height/gt,a.y=rt+.5*(ut-rt-a.height))):0>=y.y?(a.y=Math.max(St.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/gt,E.width),x.width),a.height=gt*a.width,a.x=ot+.5*(lt-ot-a.width))):1<=y.y&&(a.height=Math.max(Math.min(St.y-rt,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/gt,E.width),x.width),a.height=gt*a.width,a.x=ot+.5*(lt-ot-a.width))),Wt.free(St),a},As.prototype.computeReshape=function(){var a=yn;return this.adornedObject instanceof Ai&&(a=Ev(this.adornedObject)),!(a===Xn||this.diagram.lastInput.shift)},As.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},As.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},As.prototype.computeCellSize=function(){var a=new Nn(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},re.Object.defineProperties(As.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 Eo))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 Eo)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}}}),As.className="ResizingTool",On("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function qs(){So.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Wt,this.ue=null;var a=new Ai;a.figure="Ellipse",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Wt(NaN,NaN),this.u=0,this.F=50}Le(qs,So),qs.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)}},qs.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Eo,y.type=Cn.Position,y.locationSpot=wo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Cl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},qs.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},qs.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)},qs.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(wo)},qs.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)},qs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Wt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},qs.prototype.stopTransaction=function(){var a=this.diagram,y=So.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},qs.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},qs.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},qs.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()},qs.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()}},qs.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},re.Object.defineProperties(qs.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 Eo))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 Eo)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}}}),qs.className="RotatingTool",On("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Vh(){So.call(this),this.name="ClickSelecting"}Le(Vh,So),Vh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Vh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Vh.className="ClickSelectingTool";function yl(){So.call(this),this.name="Action",this.pk=null}Le(yl,So),yl.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},yl.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()},yl.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))}},yl.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()},yl.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())},yl.prototype.doStop=function(){this.pk=null},yl.className="ActionTool";function ch(){So.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Wt(0,0)}Le(ch,So),ch.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)},ch.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ch.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 ai)x.Zc()&&(Cl(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);_e(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Wt.allocAt(a.x,a.y);this.isGridSnapEnabled&&pf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Wt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},re.Object.defineProperties(ch.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}}}),ch.className="ClickCreatingTool";function rl(){So.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new ai;a.layerName="Tool",a.selectable=!1;var y=new Ai;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Le(rl,So),rl.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))},rl.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},rl.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},rl.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=Nn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Nn.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},rl.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()},rl.prototype.computeBoxBounds=function(){var a=this.diagram;return new on(a.firstInput.documentPoint,a.lastInput.documentPoint)},rl.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Ao?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 pn,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)}},re.Object.defineProperties(rl.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}}}),rl.className="DragSelectingTool";function Ms(){So.call(this),this.name="Panning",this.Xt=new Wt,this.xy=new Wt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Yt.document,"scroll",a.Kw,!1),a.stopTool()}}Le(Ms,So),Ms.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())},Ms.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Yt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ms.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ms.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ms.prototype.doMouseMove=function(){this.move()},Ms.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ms.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)}},re.Object.defineProperties(Ms.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ms.className="PanningTool",On("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),On("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),On("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),On("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),On("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function au(){this.F=this.u=this.j=this.o=null}re.Object.defineProperties(au.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}}}),au.className="HTMLInfo";function Sl(a,y,x){this.text=a,this.hx=y,this.visible=x}Sl.className="ContextMenuButtonInfo";function ta(){So.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Wt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Le(ta,So);function Al(a){var y=new au;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},Uh=y,a.tu=function(){a.stopTool()},y=qe("div");var x=qe("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=qe("style");Yt.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",Hr,!1),E.addEventListener(y,"selectstart",Hr,!1),E.addEventListener(x,"contextmenu",Hr,!1)),y.className="goCXforeground",x.className="goCXbackground",Yt.document.body&&(Yt.document.body.appendChild(y),Yt.document.body.appendChild(x)),dc=y,Nd=x,hc=!0}function Hr(a){return a.preventDefault(),!1}ta.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)},ta.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ta.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ta.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof ze||(a instanceof Pe?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},ta.prototype.doActivate=function(){},ta.prototype.doMouseDown=function(){if(So.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Eo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Vl(this)},ta.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Eo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Vl(this)};function Vl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof au||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(_u(a,!0),a.isActive||a.stopTool())}ta.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function _u(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=Uh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Pe?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Eo&&!a.currentContextMenu.visible&&a.stopTool()}}ta.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ta.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Eo){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 au&&a.show(y,x,this);this.currentContextMenu=a},ta.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}},ta.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Eo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof au&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function fh(a){var y=new pn;return y.add(new Sl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Sl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Sl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Sl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Sl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Sl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Sl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Sl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Sl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Sl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Sl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Sl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Sl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ta.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=fh(this)),dc.innerHTML="",Nd.addEventListener("pointerdown",this.tu,!1);var y=this,x=qe("ul");x.className="goCXul",dc.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=qe("li"),z.className="goCXli";var tt=qe("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)}}dc.style.display="block",Nd.style.display="block"},ta.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Uh){dc.style.display="none",Nd.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Nd,"pointerdown",this.tu,!1),this.currentContextMenu=null}},re.Object.defineProperties(ta.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Eo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hc===!1&&Uh===null&&Lr&&Al(this),Uh},set:function(a){a===null&&(hc=!0),Uh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Uh=null,hc=!1,Nd=null,dc=null;ta.className="ContextMenuTool",On("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function lr(){So.call(this),this.name="TextEditing",this.Zh=new Qo,this.ia=null,this.V=kd,this.vj=null,this.qa=Ad,this.u=1,this.F=!0,this.o=null,this.j=new au,this.kt=null,cc(this,this.j)}Le(lr,So);function cc(a,y){if(Lr){var x=qe("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(fc)):b==="Tab"?(a.acceptText(rf),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Ad){var E=a.kt;a.qa===gc&&(a.qa=pc),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Ad){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 Qo&&z instanceof lr)if(z.state===mc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(wo),ot=b.position,rt=b.scale,lt=E.Df()*rt;lt<z.minimumEditorScale&&(lt=z.minimumEditorScale);var ut=E.naturalBounds.width*lt+6,gt=E.naturalBounds.height*lt+2,St=(tt.x-ot.x)*rt;tt=(tt.y-ot.y)*rt,ot=E.verticalAlignment,rt=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*lt,gt=ot.y*gt-ot.y*rt+ot.offsetY-(.5*gt-.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*lt+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(St-ut/2|0)-1+"px",x.style.top=(tt+gt|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=lt,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}lr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||gh&&gh!==this&&(gh.acceptText(lu),gh&&gh!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Qo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===kd&&!y.isSelected||this.starting===sf&&2>a.lastInput.clickCount)):!1},lr.prototype.doStart=function(){gh=this,this.textBlock!==null&&this.doActivate()},lr.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 Qo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=gc;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new on(this.textBlock.ga(is),this.textBlock.ga(Hs));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},lr.prototype.doCancel=function(){this.stopTool()},lr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},lr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(lu)},lr.prototype.acceptText=function(a){switch(a){case lu:this.qa===Td?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===gc||this.qa===mc||this.qa===pc)&&(this.qa=cg,dg(this));break;case of:case fc:case rf:(fc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===gc||this.qa===mc||this.qa===pc)&&(this.qa=cg,dg(this))}};function dg(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=Td,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=mc,a.doError(b,z))}}lr.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)},lr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},lr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Ad,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},lr.prototype.doStop=function(){gh=null},lr.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)))},lr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},re.Object.defineProperties(lr.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)}}}),lr.prototype.measureTemporaryTextBlock=lr.prototype.Lx;var of=new Oe(lr,"LostFocus",0),lu=new Oe(lr,"MouseDown",1),rf=new Oe(lr,"Tab",2),fc=new Oe(lr,"Enter",3),q0=new Oe(lr,"SingleClick",0),kd=new Oe(lr,"SingleClickSelected",1),sf=new Oe(lr,"DoubleClick",2),Ad=new Oe(lr,"StateNone",0),gc=new Oe(lr,"StateActive",1),pc=new Oe(lr,"StateEditing",2),cg=new Oe(lr,"StateValidating",3),mc=new Oe(lr,"StateInvalid",4),Td=new Oe(lr,"StateValidated",5),gh=null;lr.className="TextEditingTool",lr.LostFocus=of,lr.MouseDown=lu,lr.Tab=rf,lr.Enter=fc,lr.SingleClick=q0,lr.SingleClickSelected=kd,lr.DoubleClick=sf,lr.StateNone=Ad,lr.StateActive=gc,lr.StateEditing=pc,lr.StateValidating=cg,lr.StateInvalid=mc,lr.StateValidated=Td,On("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ia(a){yc||(fg(),yc=!0),this.H=xu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Gu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new mn,this.ce=new Ls,this.ce.Yd=this,this.Ei=new mn,this.pu=new mn,this.Sr=new mn,this.pr=new mn,a&&Object.assign(this,a)}Ia.prototype.Xe=function(a){this.H=a},Ia.prototype.canStart=function(){return!0};function Su(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Fs(a.H),a.zb=!0)}function af(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Gu?(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===gg&&y.vc.clear(),a.Qw=!!(a.Pk===Sc&&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(),xc(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Ws&&E!==null&&(delete E.start.scale,delete E.end.scale),Yt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&ma(x),Sg(x),a.zb=!1,y.start(),y.bc&&(ph(a),x.Ya(),pg(y,0),al(x,!0),$h(a),x.R("AnimationStarting",a)))}))}}function Hu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function lf(a,y,x,E){a.isTicking||Hu(a)||y instanceof Ln&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}bt=Ia.prototype,bt.fv=function(a){return this.ce.fv(a)},bt.Xu=function(a){return this.ce.Xu(a)};function uf(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 Pe&&rt.diagram!==null||rt instanceof ze){ot=!0;break t}}ot=!1}ot?Pc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(ph(b),al(b.H),$h(b)),Yt.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Yt.requestAnimationFrame(function(){x()}))}function Wp(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ph(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 $h(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}bt.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(),xc(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),xc(y,this.H)},bt.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))},bt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Ea(this,a))},bt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),mh(this.ce,y,"position",y.position,y.position),Ea(this,a))};function Zp(a,y,x){!a.zb||y.D(x)||Hu(a)||(a.H.pi||(y=x.copy()),mh(a.ce,a.H,"position",y,x))}function hf(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Ea(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Kh(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],lt=y[1],ut=y[2];return y=y[3],ot===0||ot===100?(z=rt,tt=lt):(ut===0||ut===100)&&(rt=z,lt=tt),180<Math.abs(rt-z)&&(rt>z?z+=360:rt+=360),z=b(x,z,rt-z,E)%360,tt=b(x,tt,lt-tt,E),ot=b(x,ot,ut-ot,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+ot+"%, "+x+")"}function fg(){function a(x,E,b,z,tt,ot){x.position=new Wt(z(tt,E.x,b.x-E.x,ot),z(tt,E.y,b.y-E.y,ot))}var y=new Yn;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 Wt(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 Wt(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 Wt(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,lt=b.actualBounds;b=lt.x+lt.width/2-rt.width/2,rt=lt.y+lt.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 Wt(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 on(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=Kh(E,b,tt,ot,z)}),y.add("stroke",function(x,E,b,z,tt,ot){x.stroke=Kh(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=Kh(E,b,tt,ot,z)}),y.add("areaBackground",function(x,E,b,z,tt,ot){x.areaBackground=Kh(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)}),vc=y}re.Object.defineProperties(Ia.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&&Mn(a,">= 1",Ia,"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}}}),Ia.prototype.stopAnimation=Ia.prototype.Cc;var vc=null,yc=!1,Gu=new Oe(Ia,"Default",1),Sc=new Oe(Ia,"AnimateLocations",2),gg=new Oe(Ia,"None",3);Ia.className="AnimationManager",Ia.defineAnimationEffect=function(a,y){yc||(fg(),yc=!0),vc.add(a,y)},Ia.Default=Gu,Ia.AnimateLocations=Sc,Ia.None=gg;function Ls(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=Od,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Fo,this.vc=new Yn,this.Tt=new Yn,this.yl=new mn,this.Ut=new mn,this.dw=Sh,a&&Object.assign(this,a)}Ls.prototype.suspend=function(){this.Xk=!0},Ls.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Pc(this,!0),ph(this.Yd),al(this.H),$h(this.Yd),this.H.redraw()};function xc(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}bt=Ls.prototype,bt.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 ze?a=x:x instanceof Pe&&(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===Gu&&this===y.defaultAnimation&&(this.Lp=Vp,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Fc),ph(y),this.yl.each(function(E){E.data=null,a.add(E)}),$h(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,uf(y,this),this)},bt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},bt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof ze?this.H=a:a instanceof Pe&&a.diagram!==null&&(this.H=a.diagram)),a instanceof ai){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return mh(this,a,y,x,E,b),this};function mh(a,y,x,E,b,z){var tt=a.vc;if(y instanceof ze&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Uu(E),sv(),E=[Ja.j,Ja.u,Ja.o,Ja.F],Uu(b),sv(),b=[Ja.j,Ja.u,Ja.o,Ja.F]),tt.contains(y)){var ot=tt.I(y),rt=ot.start,lt=ot.end;rt[x]===void 0&&(rt[x]=Yh(E)),lt[x]=Yh(b)}else rt={},lt={},rt[x]=Yh(E),lt[x]=Yh(b),ot=rt.position,y instanceof Pe&&ot instanceof Wt&&!ot.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ot.assign(lt.position),ot=new Xh(rt,lt,z),tt.add(y,ot);tt=rt[x],tt instanceof Wt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof ai?ot.Ku.location=Yh(y.location):z&&(ot.Ku[x]=Yh(E))}function Yh(a){return a instanceof Wt||a instanceof Nn?a.copy():a}bt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},bt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Pc(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),ph(x),pg(a,b),al(a.H,!0),$h(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 pg(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Pe&&z.diagram===null)){var tt=E.value,ot=b?tt.end:tt.start;tt=b?tt.start:tt.end;var rt=vc,lt;for(lt in tt)lt==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||rt.get(lt)===null||rt.get(lt)(z,ot[lt],tt[lt],a.Lp,y,x,a)}}}bt.stop=function(){return this.bc?(this.Ml(!0),this):this},bt.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,ph(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=vc;E.next();){var tt=E.key,ot=E.value,rt=b?ot.end:ot.start,lt=b?ot.start:ot.end,ut=ot.Ku,gt;for(gt in lt)if(z.get(gt)!==null){var St=gt;!ot.Hu||St!=="position:nodeCollapse"&&St!=="position:placeholder"||(St="position"),z.get(St)(tt,rt[gt],ut[gt]!==void 0?ut[gt]:ot.Hu?rt[gt]:lt[gt],this.Lp,this.Gd,this.Gd,this)}ot.Hu&&ut.location!==void 0&&tt instanceof ai&&(tt.location=ut.location),ot.nv&&tt instanceof ai&&tt.Zb(!1)}if(y.As.clear(),wc(y,!1),y.Ya(),y.N(),al(y,!0),x.defaultAnimation===this){for(gt=x.pr.iterator;gt.next();)b=gt.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}al(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),$h(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),xc(this,null),x.Ml(this),y.$b())}},bt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof bi&&(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 Wt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof bi)for(a=a.memberParts;a.next();)E=a.value,E instanceof Rn&&this.Cj(E,y)},bt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof bi&&(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 bi)for(a=a.memberParts;a.next();)E=a.value,E instanceof Rn&&this.Aj(E,y)}},bt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},re.Object.defineProperties(Ls.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(a,">= 1",Ls,"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:xe("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}}}),Ls.prototype.getTemporaryState=Ls.prototype.Ez,Ls.prototype.stop=Ls.prototype.stop,Ls.prototype.add=Ls.prototype.add,Ls.prototype.addTemporaryPart=Ls.prototype.Iy;function Od(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Vp(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Ls.className="Animation",Ls.EaseLinear=function(a,y,x,E){return x*a/E+y},Ls.EaseInOutQuad=Od,Ls.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Ls.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Ls.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Ls.EaseOutExpo=Vp;function Xh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Xh.className="AnimationState";function Tl(a,y,x){this.xd=null,this.rf=a,this.so=x||mg,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Jh))}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 Up(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))}re.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 mg=new Oe(Tl,"Default",1),Jh=new Oe(Tl,"Immediate",2),Dd=new Oe(Tl,"Bundled",3);Tl.className="AnimationTrigger",Tl.Default=mg,Tl.Immediate=Jh,Tl.Bundled=Dd;function ps(a){po(this),this.H=null,this.Pa=new pn,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)}bt=ps.prototype,bt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,js(x)}a.clear(),this.Zq.length=0},bt.Xe=function(a){this.H=a},bt.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 bi?b++:rt instanceof Rn?E++:rt instanceof Ln?z++:rt instanceof Eo?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&&Si(E)&&(ot+=" #"+Si(E)),x instanceof Rn?ot+=" "+xi(E):x instanceof Ln&&(ot+=" "+xi(x.fromNode)+" "+xi(x.toNode));return y+" "+this.Pa.count+": "+ot},bt.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=Wt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var ot=z[tt];if((E!==!0||ad(ot)!==!1)&&ot.isVisible()&&(b.assign(a),uo(b,ot.oe),ot=ot.ic(b,y,x),ot!==null&&(y!==null&&(ot=y(ot)),ot!==null&&(x===null||x(ot)))))return Wt.free(b),ot}return Wt.free(b),null},bt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof pn||E instanceof mn||(E=new mn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Wt.alloc(),tt=this.Pa.s,ot=tt.length;ot--;){var rt=tt[ot];if((b!==!0||ad(rt)!==!1)&&rt.isVisible()){z.assign(a),uo(z,rt.oe);var lt=rt;rt.ji(z,y,x,E)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||E.add(lt))}}return Wt.free(z),E},bt.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 pn||b instanceof mn||(b=new mn),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||ad(rt)!==!1)&&rt.isVisible()){var lt=rt;rt.Cf(a,y,x,E,b)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||b.add(lt))}}return b},bt.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 lt=ot[rt];if((tt!==!0||ad(lt)!==!1)&&z(lt)&&lt.isVisible()){var ut=lt;lt.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},bt.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 pn||b instanceof mn)&&(z=b),b=!0),z instanceof pn||z instanceof mn||(z=new mn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var ot=Wt.alloc(),rt=Wt.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var gt=lt[ut];if((tt!==!0||ad(gt)!==!1)&&gt.isVisible()){ot.assign(a),uo(ot,gt.oe),rt.h(a.x+y,a.y),uo(rt,gt.oe);var St=gt;gt.og(ot,rt,x,E,b,z)&&(x!==null&&(St=x(St)),St===null||E!==null&&!E(St)||z.add(St))}}return Wt.free(ot),Wt.free(rt),z},bt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Kn();for(var b=Kn(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Ln){if(tt.fd===!1)continue}else if(tt instanceof Eo&&tt.adornedPart!==null)continue;var ot=tt.actualBounds;tt.isVisible()&&Zl(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]);oi(a),oi(b)}}};function Wu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}bt.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=Wu(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,ot=on.alloc(),rt=0;rt<E;rt++)this.Oj(a,x[rt],y,z,tt,ot,!0);if(on.free(ot),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function $p(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=Wu(a,y),ot=a.Zq;ot.length=0;for(var rt=x.scale,lt=on.alloc(),ut=0;ut<z;ut++){var gt=b[ut];E.contains(gt)&&a.Oj(y,gt,x,ot,rt,lt,!1)}on.free(lt),y.globalAlpha=tt}}}bt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!ad(y))a.Hs(y);else{if(E!==null&&y instanceof Ln&&(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 Ra?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&&(Nr(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Nr(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),Nr(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))}},bt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(ar,a,this,y,x,E,b)},bt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&js(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)),df(this,a,y),a},bt.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,js(y),a};function df(a,y,x){if(y=Kp(a,y,x),x instanceof bi&&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&&df(a,-1,y)}x.svg!==null&&x.svg.remove()}function Kp(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}re.Object.defineProperties(ps.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===""&&xe("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&xe("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)&&Mn(a,"0 <= value <= 1",ps,"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))}}}),ps.prototype.findObjectsNear=ps.prototype.og,ps.prototype.findObjectsIn=ps.prototype.Cf,ps.prototype.findObjectsAt=ps.prototype.ji,ps.prototype.findObjectAt=ps.prototype.ic,ps.className="Layer";function ze(a,y){if(lm||(Is(),lm=!0),po(this),xu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Lr){var x=this,E=function(){x.removeEventListener(Yt.document,"DOMContentLoaded",E,!1),x.setRTL()};Yt.document.body!==null?this.setRTL():x.addEventListener(Yt.document,"DOMContentLoaded",E,!1)}this.ol=null,wf.add("Model",jo);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===ar&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Yp(this),this.model=hy(),this.Wg=!0,Jp(this),this.layout=new mr,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 um,a!==void 0&&(typeof a=="string"||Yt.Element&&a instanceof Element?yg(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Qh,xu;function Yp(a){a.Yd=new Ia,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new pn,a.pj=new Yn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Wt(NaN,NaN).freeze(),a.du=new Wt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Wt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new fi,a.zu=new Wt(NaN,NaN).freeze(),a.ut=new on(NaN,NaN,NaN,NaN).freeze(),a.rj=new ci(0,0,0,0).freeze(),a.sj=Sh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ws,a.zk=Ge,a.Fg=Ws,a.pq=Ge,a.yt=is,a.Bt=is,a.Fc=!0,a.pn=!1,a.De=new mn,a.Eh=new Yn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new ci(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new fs,a.bq.diagram=a,a.Qg=new fs,a.Qg.diagram=a,a.cj=new fs,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,ev(a),a.ai=new mn,a.Ht=!0,a.uu=xh,a.pw=!1,a.wu=Lc,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 Yn,a.Xn=new pn,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 ci(5).freeze(),a.Hw=new mn().freeze(),a.Nt=999999999,a.nw=new mn().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 mn,a.ow=new mn,a.Xh=null,a.aw=new Nn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Wt,bounds:new on,Py:new Nn,bA:new Nn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new on(NaN,NaN,NaN,NaN).freeze(),a.wo=new Nn(NaN,NaN).freeze(),a.Sp=new on(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Yn;var y=new Rn,x=new Qo;x.bind(new Gr("text","",xi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Rn,x=new Qo,x.stroke="brown",x.bind(new Gr("text","",xi)),y.add(x),a.Lg.add("Comment",y),y=new Rn,y.selectable=!1,y.avoidable=!1,x=new Ai,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Nn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Yn,y=new bi,y.selectionObjectName="GROUPPANEL",y.type=Cn.Vertical,x=new Qo,x.font="bold 12pt sans-serif",x.bind(new Gr("text","",xi)),y.add(x),x=new Cn(Cn.Auto),x.name="GROUPPANEL";var E=new Ai;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new oa,E.padding=new ci(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Yn,y=new Ln,x=new Ai,x.isPanelMain=!0,y.add(x),x=new Ai,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Ln,x=new Ai,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Eo,y.type=Cn.Auto,x=new Ai,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new oa,x.margin=new ci(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Eo,y.type=Cn.Link,x=new Ai,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 jo,a.toolManager=new fr,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=Xp(),a.eq=null,a.fq=eo,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 Wt,a.zy=500,a.wp=new Wt,a.wq=!1}ze.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Gd=null,id="",vg(this,!1),this.Xn.clear(),Df(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function vg(a,y){a.animationManager.Cc(!0),a.Hw=new mn().freeze(),a.nw=new mn().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(),Df(),a.Og.clear(),Ii=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Xp(){return null}ze.prototype.reset=function(){this.clear(),this.vb=!0,Yp(this),hu(this),this.Wg=!0,Jp(this),this.layout=new mr,this.Wg=!1,this.model=hy(),this.model.undoManager=new Sr,this.vb=this.rn=!1,this.N()},ze.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Yt.document.body);var y=qe("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},ze.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Yt.document.body);var y=0;if(Lr){var x=am;y=Qh,x===null&&(x=am=qe("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Qh=qe("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||Ao||(y=11)}this.Db=y,this.Gw=!0},ze.prototype.qb=function(a){a.classType===ze&&(this.autoScale=a)},ze.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 yg(a,y){if(Lr){if(y!=null||xe("Diagram setup requires an argument DIV."),a.Ka!==null&&xe("Diagram has already completed setup."),typeof y=="string"?a.Ka=Yt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:xe("No DIV or DIV id supplied: "+y),a.Ka===null&&xe("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&xe("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Yt.ResizeObserver){var x=en(function(){a.$b()},250);a.ol=new Yt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Yt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var 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=Yt.go;var b=new wl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Yt.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),Mg(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new wl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Lr){b=qe("div");var z=qe("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=qp,b.addEventListener("pointerdown",tm),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=en(function(){a.Yh=null,a.N()},300),a.Ov=en(function(){Sg(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var ot=sl(a,tt,!0);ot.bubbles=!0;var rt=0,lt=0;ot.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(rt=0<tt.deltaX?1:-1),tt.deltaY!==0&&(lt=0<tt.deltaY?1:-1),ot.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-rt:-lt):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(rt=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(lt=0<tt.wheelDeltaY?-1:1),ot.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-rt:-lt):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(ot.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Ol(ot,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,sl(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 lt=rt;rt=Cg(a,tt,!0,!1,!0,lt),Rd(a,tt,rt),rt.targetDiagram=wg(tt,tt.target),rt.targetObject=null,lt||rt.clone(a.bq),lt=a.uw,ot=ot?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(lt.x-tt.screenX)>ot||Math.abs(lt.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():Ol(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=Cg(a,tt,!1,!1,!1,ot[1]!==null);var rt=Yt.document.elementFromPoint(tt.clientX,tt.clientY)||null;rt!==null&&rt.shadowRoot!==void 0&&rt.shadowRoot!==null&&(rt=rt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var lt=a,ut=tt;rt&&rt.H&&(ut=tt,lt=rt.H),ot.targetDiagram=lt,Rd(a,ut,ot),ot.targetObject=null,a.doMouseMove(),Ol(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=Cg(a,tt,!1,!0,!0,!1);var lt=Yt.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&&lt.shadowRoot!==void 0&&lt.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&&lt.H instanceof ze&&lt.H!==a&&Rd(lt.H,tt,rt),lt===null&&(lt=tt.target),Rd(a,tt,rt),rt.clickCount=a.yq,rt.targetDiagram=wg(tt,lt),rt.targetObject=null,a.doMouseUp(),Ol(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"+Nc[1]+Nc[2]+"wI"+Zd.slice(1,5)]["b"+Ax.slice(1,y)](E.Z,Bc,y,y),E.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}ze.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},ze.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function tv(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(Yt,"resize",a.Ov,!1)}function ma(a){30<a.Sq&&(a.Yh=1)}function wc(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),no&&no.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}ze.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Yt.devicePixelRatio||1},ze.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},ze.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},ze.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},ze.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},ze.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},ze.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},ze.prototype.doFocus=function(){this.focus()},ze.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Yt.scrollX||Yt.pageXOffset,y=Yt.scrollY||Yt.pageYOffset;this.ta.focus(),Yt.scrollTo(a,y)}},ze.prototype.Oy=function(){this.H.R("GainedFocus")},ze.prototype.Ny=function(){this.H.R("LostFocus")};function Sg(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===Ws&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Jp(a){var y=new ps;y.name="Background",a.Al(y),y=new ps,y.name="",a.Al(y),y=new ps,y.name="Foreground",a.Al(y),y=new ps,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ps,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ps,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Qp(a){var y=new Cn(Cn.Grid);y.name="GRID";var x=new Ai;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ai,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ai,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ai,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ai,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ai,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ai,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 qp(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):_d(this.H)}function tm(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):_d(this.H)}ze.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,lt=E.height+z.top+z.bottom,ut=E.right+z.right;z=E.bottom+z.bottom;var gt=b.x;E=b.y;var St=b.width,wt=b.height,Et=b.right,Nt=b.bottom;b=this.scale;var Ut=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ut=Ut+a.scrollWidth-a.clientWidth;break;case"reverse":Ut=a.scrollWidth-Ut-a.clientWidth}var jt=Ut;St<rt||wt<lt?(Ut=Wt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==jt&&(Ut.x=jt/b+tt,this.ju=jt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ut.y=a.scrollTop/b+ot,this.lu=a.scrollTop),this.position=Ut,Wt.free(Ut),this.Ee=this.qr=!1):(Ut=Wt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<gt&&(this.position=Ut.h(jt+tt,this.position.y)),ut>Et&&(this.position=Ut.h(-(y.scrollWidth-this.Aa)+jt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(ot<E&&(this.position=Ut.h(this.position.x,a.scrollTop+ot)),z>Nt&&(this.position=Ut.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Wt.free(Ut),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,Et=b.right,z=E.bottom,Nt=b.bottom,tt=E.x,gt=b.x,ot=E.y,E=b.y,St>=rt&&tt>=gt&&ut<=Et&&(x.style.width="1px"),wt>=lt&&ot>=E&&z<=Nt&&(x.style.height="1px"))}},ze.prototype.computeBounds=function(a){return a===void 0&&(a=new on),Fs(this),xg(this,a)};function xg(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 lt=tt[rt];lt.isInDocumentBounds&&lt.isVisible()&&(lt=lt.actualBounds,lt.w()&&(x?(x=!1,y.assign(lt)):y.ed(lt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}ze.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Je(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Ln||(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 Ln||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new on(NaN,NaN,0,0):x};function xl(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=Wt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=on.allocAt(0,0,E.width,E.height);var b=Wt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,on.free(E),Wt.free(b),Wt.free(x)}x=a.yh,y&&a.Fg!==Ws&&(x=a.Fg);var z=x!==Ws?Id(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()?wo:rt),Pg(a,a.documentBounds,b,tt,ot,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,me.B(z.x,x)&&me.B(z.y,E)&&me.B(z.width,b)&&me.B(z.height,tt)||a.onViewportBoundsChanged(new on(x,E,b,tt),z,y,!1)}}function Id(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===Ka?(y=Math.min(rt,ot),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===od?(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}ze.prototype.zoomToFit=function(){var a=this.sj;this.sj=Sh,this.scale=Id(this,Ka),a!==Sh&&(xl(this,!1),Pg(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},bt=ze.prototype,bt.BA=function(a,y){y===void 0&&(y=Ka);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Ka||y===od)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===od?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 Wt(a.x,a.y)}},bt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Wt(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))},bt.zz=function(a){if(a instanceof Pe){this.eq=a;var y=Wt.alloc();this.fq=this.op(a.ga(is,y)),Wt.free(y)}else this.eq=null,this.fq=eo};function Pg(a,y,x,E,b,z){var tt=Wt.allocAt(a.pa.x,a.pa.y),ot=tt.x,rt=tt.y;if(a.eq!==null){var lt=Wt.alloc();lt=a.eq.ga(is,lt),ot=lt.x-a.fq.x/a.scale,rt=lt.y-a.fq.y/a.scale,b=kr,Wt.free(lt)}(z||a.scrollMode===Sh)&&(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),Zp(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),hu(a),Wt.free(tt)}bt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Pu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof ai)return a}else if(a=Pu(this,a,function(x){return x.part}),a instanceof ai)return a;return null},bt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Fs(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 Pu(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Fs(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}bt.lz=function(a,y,x){return y===void 0&&(y=!0),Cc(this,a,function(E){return E.part},y?function(E){return E instanceof ai&&E.canSelect()}:null,x)};function Cc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof pn||b instanceof mn||(b=new mn),Fs(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}bt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof pn||E instanceof mn||(E=new mn),Fs(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},bt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),cf(this,a,function(b){return b instanceof ai&&(!x||b.canSelect())},y,E)},bt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof pn||b instanceof mn||(b=new mn),Fs(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},bt.Nu=function(a,y,x,E,b,z){var tt=new mn;Fs(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 cf(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 pn||b instanceof mn||(b=new mn),Fs(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}bt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Ec(this,a,y,function(z){return z instanceof ai&&(!E||z.canSelect())},x,b)},bt.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 pn||b instanceof mn)&&(z=b),b=!0),z instanceof pn||z instanceof mn||(z=new mn),Fs(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 Ec(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 pn||b instanceof mn)&&(z=b),b=!0),z instanceof pn||z instanceof mn||(z=new mn),Fs(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}ze.prototype.acceptEvent=function(a){return sl(this,a,a instanceof MouseEvent)};function sl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Rd(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),Ao&&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=wg(y,y.target),E.targetObject=null,E}function wg(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 Cg(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,Ao&&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 Ol(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}ze.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=sl(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(),Ol(x,a)},ze.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=sl(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(),Ol(x,a)},ze.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=sl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Ol(x,a)},ze.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=sl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Ol(x,a)},ze.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Wt(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?uo(new Wt(y,a),this.Ab):new Wt(y,a)};function Rd(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=Wt.allocAt(tt,ot),a.Ab.Cd(y),x.documentPoint.assign(y),Wt.free(y)):x.documentPoint.h(tt,ot)}function Eg(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))}}ze.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function em(a){a.ld||Fs(a),a.Va()}ze.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},bt=ze.prototype,bt.Pz=function(){return this.kg},bt.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 Wt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Bn(function(){E.ld=!1,Su(y,"Model"),a(E)},1)},bt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Yt.requestAnimationFrame(function(){y.kg&&y.bd()})}},bt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),al(this))};function qh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||_d(a)||(y&&Fs(a),x&&xl(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];Xr(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||Sg(a),qh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(uu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Fs(a),z=!1,(!a.hf||a.xh)&&(a.hf?Og(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Og(a,!1)),z=!0),a.Jk=!1,Fs(a),a.ou||em(a),qh(a,!0,!1),tt=!1,z?(x=on.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,bg(a)),a.R("LayoutCompleted"),qh(a,!0,!1),on.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ws?a.scale=Id(a,a.Fg):a.yh!==Ws?a.scale=Id(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),xl(a,!0)),z&&tt&&a.eb("Initial Layout"),Fs(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function bg(a){if(a.Fg!==Ws)a.scale=Id(a,a.Fg);else if(a.yh!==Ws)a.scale=Id(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}xl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),uu(a)}function Fs(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 mn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof bi&&E.U&65536&&(E.U=E.U^65536)})}}bt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof bi||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof bi&&x.isVisible()&&bc(this,x);for(a.reset();a.next();)x=a.value,x instanceof Ln&&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 Eo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function bc(a,y){for(var x=Kn(),E=Kn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof bi?(Xa(z)||na(z)||sd(z))&&bc(a,z):z instanceof Ln?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(oi(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();oi(E)}bt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},bt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&xe("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){zd(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,Ky(a,ot.m11,ot.m12,ot.m21,ot.m22,ot.dx,ot.dy),this.pb!==1&&(a.globalAlpha=this.pb),vh(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?Vd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(fi.prototype.Cd=fi.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,zd(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,lt=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(-lt,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),vh(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?Vd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(fi.prototype.Cd=fi.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=no&&no.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 ff(a,y,x,E,b,z,tt,ot,rt,lt){if(a.Ka!==null){a.ta===null&&xe("No canvas specified"),tt===void 0&&(tt=null),ot===void 0&&(ot=null),rt===void 0&&(rt=!1),lt===void 0&&(lt=!1),zd(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var gt=a.Wa.s,St=gt.length;try{var wt=new on(z.x,z.y,E.width/b,E.height/b),Et=wt.copy();Et.Co(x),uu(a,Et),Fs(a),a.Fd(gt,St,a,wt),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 Nt=a.Mb;y.scale(Nt,Nt);var Ut=fi.alloc();Ut.reset(),Ut.translate(x.left,x.top),Ut.scale(b),z.x===0&&z.y===0||Ut.translate(-z.x,-z.y),y.setTransform(Ut.m11,Ut.m12,Ut.m21,Ut.m22,Ut.dx,Ut.dy),y.yc(),y instanceof Ra&&Ky(y,Ut.m11,Ut.m12,Ut.m21,Ut.m22,Ut.dx,Ut.dy),fi.free(Ut),vh(a,y),y.globalAlpha=a.pb;var jt=a.Qj("Grid");if(tt){var ee=new mn,oe=tt.iterator;for(oe.reset();oe.next();){var ae=oe.value;ae instanceof ai&&(lt||ae.layer!==jt)&&(ae.Gj(),ee.add(ae))}for(lt=0;lt<St;lt++)$p(gt[lt],y,a,ee,rt);ee.each(function(je){return je.Gj()})}else for(ee=0;ee<St;ee++){var Se=gt[ee];Se===jt?lt&&Se.gc(y,a,!0):Se.gc(y,a,rt)}a.$i=!1,a.Yf&&Vd(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(gt,St,a,a.viewportBounds),uu(a),a.ib instanceof Ra&&(a.ib.Nj.PA(),a.redraw())}}}bt.Gf=function(a){return this.Rg[a]},bt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},bt.Tx=function(){this.Rg=new di,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Ao||lo),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function vh(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}bt.Ql=function(a){return this.on[a]},bt.sA=function(a,y){this.on[a]=y},bt.Sx=function(){this.on=new di,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},bt.set=function(a){return Object.assign(this,a),this},bt.Du=function(a){return this.nm(a)},bt.nm=function(a){return jd(this,a),this};function jd(a,y){var x=a instanceof Cn,E=a instanceof ze,b;for(b in y){b===""&&xe("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])),_e(z)?tt=b.substr(ot+1):xe("Unable to find object named: "+rt+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!to(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&to(a.toolManager,tt))z=a.toolManager;else if(E&&om(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Jn&&tt==="Changed"){a.Pe(y[tt]);continue}else xe('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof Pe&&z.Vw(tt)}}bt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Yn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},bt.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")},ze.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!==Fc&&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=on.alloc(),Tg(this,this.computeBounds(E)),on.free(E)),E=this.ta,E===null||E instanceof du)))){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 lt=70*tt,ut=Math.max(z,0),gt=Math.max(y,0),St=Math.floor(b-ut),wt=Math.floor(ot-gt);a.drawImage(E.Oa,ut,gt,St,wt,0,0,St,wt),Vd(this.Yf,this)&&a.clearRect(0,0,rt,lt),E=Kn(),a=Kn(),wt=Math.abs(z),St=Math.abs(y);var Et=ut===0?0:b-wt;ut=Wt.allocAt(Et,0),wt=Wt.allocAt(wt+Et,ot),a.push(new on(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y)));var Nt=this.Ab;if(Nt.reset(),Nt.scale(tt,tt),this.Ca!==1&&Nt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Nt.translate(-tt.x,-tt.y),uo(ut,Nt),uo(wt,Nt),E.push(new on(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),Et=gt===0?0:ot-St,ut.h(0,Et),wt.h(b,St+Et),a.push(new on(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),uo(ut,Nt),uo(wt,Nt),E.push(new on(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),Vd(this.Yf,this)&&(b=0<z?0:-z,ot=0<y?0:-y,ut.h(b,ot),wt.h(rt+b,lt+ot),a.push(new on(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y))),uo(ut,Nt),uo(wt,Nt),E.push(new on(Math.min(ut.x,wt.x),Math.min(ut.y,wt.y),Math.abs(ut.x-wt.x),Math.abs(ut.y-wt.y)))),Wt.free(ut),Wt.free(wt),qh(this,!1,!0),this.Ka===null&&xe("No div specified"),this.ta===null&&xe("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(zd(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,lt=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-rt,-lt),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),vh(this,b),b.globalAlpha=this.pb,ot=0;ot<z;ot++)if(tt=y[ot],rt=E,tt.visible&&tt.pb!==0){lt=Wu(tt,b),gt=tt.Zq,gt.length=0,ut=this.scale,St=on.alloc(),wt=tt.Pa.s,Nt=wt.length,Et=rt.length;for(var Ut=0;Ut<Nt;Ut++){var jt=wt[Ut],ee=Qd(jt,jt.actualBounds);t:{for(var oe=2/ut,ae=4/ut,Se=0;Se<Et;Se++){var je=rt[Se];if(je.width!==0&&je.height!==0&&ee.Vu(je.x-oe,je.y-oe,je.width+ae,je.height+ae)){ee=!0;break t}}ee=!1}ee&&tt.Oj(b,jt,this,gt,ut,St,!0)}on.free(St),b.globalAlpha=lt}b.restore(),b.Vc(!0),this.Yf&&Vd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}oi(E),oi(a),this.ld=!1}}else this.bd();x&&(ma(this),this.bd(),wc(this,!0))}else x?(ma(this),this.bd(),wc(this,!0)):this.bd()}};function zd(a){a.pn!==!1&&(a.pn=!1,Mg(a,a.Aa,a.ya))}function Mg(a,y,x){hu(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function _d(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,lt=b.clientHeight||E+ot,ut=a.viewportBounds;b=ut.x;var gt=ut.y,St=ut.width,wt=ut.height;if((rt!==x+tt||lt!==E+ot)&&(a.gf=!1,a.Be=!1,ot=tt=0,a.Aa=rt,a.ya=lt,z=a.pn=!0,hu(a)),!a.hf||!a.viewportBounds.w())return!0;var Et=a.ku,Nt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Ut=a.documentBounds,jt=0,ee=0,oe=0,ae=0,Se=ut.width,je=ut.height,Dn=a.rj;a.contentAlignment.sb()?(Ut.width>Se&&(jt=Dn.left,ee=Dn.right),Ut.height>je&&(oe=Dn.top,ae=Dn.bottom)):(jt=Dn.left,ee=Dn.right,oe=Dn.top,ae=Dn.bottom);var Un=Ut.width+jt+ee,_n=Ut.height+oe+ae;Dn=a.scale;var bn=Un>rt/Dn,dn=_n>lt/Dn;if(!(z||a.gf||a.Be||bn||dn))return!0;jt=Ut.x-jt,rt=ut.x,ee=Ut.right+ee,lt=ut.right+tt,oe=Ut.y-oe;var Ei=ut.y;Ut=Ut.bottom+ae,ut=ut.bottom+ot;var Pi="1px";if(ae="1px",a.scrollMode===Sh&&(bn||dn)&&(bn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(bn=1,jt+1<rt&&(bn=Math.max((rt-jt)*Dn+a.Aa,bn)),ee>lt+1&&(bn=Math.max((ee-lt)*Dn+a.Aa,bn)),Se+tt+1<Un&&(bn=Math.max((Un-Se)*Dn+a.Aa,bn)),Pi=bn.toString()+"px"),dn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(bn=1,oe+1<Ei&&(bn=Math.max((Ei-oe)*Dn+a.ya,bn)),Ut>ut+1&&(bn=Math.max((Ut-ut)*Dn+a.ya,bn)),je+ot+1<_n&&(bn=Math.max((_n-je)*Dn+a.ya,bn)),ae=bn.toString()+"px")),bn=Pi!=="1px",dn=ae!=="1px",bn&&dn||!bn&&!dn||(dn&&(lt-=a.Db),bn&&(ut-=a.Db),Un<Se+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,jt+1<rt&&(tt=Math.max((rt-jt)*Dn+a.Aa,tt)),ee>lt+1&&(tt=Math.max((ee-lt)*Dn+a.Aa,tt)),Se+1<Un&&(tt=Math.max((Un-Se)*Dn+a.Aa,tt)),Pi=tt.toString()+"px"),bn=Pi!=="1px",tt=a.ya,bn!==a.Be&&(tt=bn?a.ya-a.Db:a.ya+a.Db),_n<je+ot||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ot=1,oe+1<Ei&&(ot=Math.max((Ei-oe)*Dn+tt,ot)),Ut>ut+1&&(ot=Math.max((Ut-ut)*Dn+tt,ot)),je+1<_n&&(ot=Math.max((_n-je)*Dn+tt,ot)),ae=ot.toString()+"px"),dn=ae!=="1px"),a.qr&&bn===a.Be&&dn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(bn!==a.Be&&(Pi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=bn,Nt.style.width=Pi,dn!==a.gf&&(ae==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(ot=Wt.alloc(),dn?(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)),Wt.free(ot))),z&&hu(a),a.gf=dn,Nt.style.height=ae,a.gu=!0,z&&(a.pn=!0),y=Et.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Se+1<Un?y=(a.position.x-jt)*Dn:jt+1<rt?y=Et.scrollWidth-Et.clientWidth:ee>lt+1&&(y=a.position.x*Dn)),a.tn)switch(a.bu){case"negative":y=-(Et.scrollWidth-y-Et.clientWidth);break;case"reverse":y=Et.scrollWidth-y-Et.clientWidth}return Et.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(je+1<_n?Et.scrollTop=(a.position.y-oe)*Dn:oe+1<Ei?Et.scrollTop=Et.scrollHeight-Et.clientHeight:Ut>ut+1&&(Et.scrollTop=a.position.y*Dn)),rt=a.Aa,lt=a.ya,Et.style.width=rt+(a.gf?a.Db:0)+"px",Et.style.height=lt+(a.Be?a.Db:0)+"px",x!==rt||E!==lt||a.animationManager.zb?(x=on.allocAt(b,gt,St,wt),a.onViewportBoundsChanged(x,a.viewportBounds,Dn,z),on.free(x),!1):!0}bt=ze.prototype,bt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&xe("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&&xe('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(wr,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},bt.oi=function(a){this.partManager.oi(a);var y=this;Yd(a,function(x){Hd(y,x)}),(a instanceof Eo||a instanceof bi&&a.placeholder!==null)&&a.v(),a.data!==null&&Yd(a,function(x){ay(y.partManager,x)}),na(a)!==!0&&sd(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Qd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Qd(a,a.actualBounds)),this.$b()},bt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Yd(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Qd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Qd(a,a.actualBounds)),this.$b()},bt.remove=function(a){Lg(this,a,!0)};function Lg(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(Rr,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}bt.Is=function(a,y){if(y===void 0&&(y=!1),Je(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 mn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},bt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},ze.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=gf(this)),this.toolManager!==null){var b=new Yn;if(a!==null)if(Je(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)}td(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=gf(a)),x instanceof Rn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof bi&&(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 Ln)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)wu(a,y,x.value,E,b);else x instanceof Eo||y.add(x,a.Pd(b,x,x.location))}function td(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Wt.alloc(),tt=Wt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||mf(a,y);for(var ot=Kn(),rt=Kn(),lt=y.iterator,ut=Wt.alloc();lt.next();){var gt=lt.key,St=lt.value;if(gt.Zc()){var wt=Fg(a,gt,y);wt!==null?ot.push(new it(gt,St,wt)):(!b||gt.canMove())&&(wt=St.point,z.assign(wt),a.computeMove(gt,z.add(tt),E,ut),gt.location=ut,St.shifted===void 0&&(St.shifted=new Wt),St.shifted.assign(ut.re(wt)))}else lt.key instanceof Ln&&rt.push(lt.sa)}for(Wt.free(ut),b=ot.length,lt=0;lt<b;lt++)gt=ot[lt],z.assign(gt.info.point),gt.Su.shifted===void 0&&(gt.Su.shifted=new Wt),gt.node.location=z.add(gt.Su.shifted);for(b=Wt.alloc(),lt=Wt.alloc(),gt=rt.length,St=0;St<gt;St++){var Et=rt[St];if(wt=Et.key,wt instanceof Ln)if(wt.suspendsRouting){wt.Tg=null,ut=wt.fromNode;var Nt=wt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Nt=Et.value.point,wt.dragComputation===null)y.add(wt,a.Pd(E,wt,tt)),Lh(wt,tt.x-Nt.x,tt.y-Nt.y);else{Et=Wt.allocAt(0,0),(ut=wt.i(0))&&ut.w()&&Et.assign(ut);var Ut=ut=Wt.alloc().assign(Et).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Ut=Wt.alloc(),pf(a,wt,ut,Ut,E)),ut.assign(wt.dragComputation(wt,ut,Ut)).re(Et),y.add(wt,a.Pd(E,wt,ut)),Lh(wt,ut.x-Nt.x,ut.y-Nt.y),Wt.free(Et),Wt.free(ut),Ut!==ut&&Wt.free(Ut)}else ut!==null&&(b.assign(ut.location),Ut=y.I(ut),Ut!==null&&b.re(Ut.point)),Nt!==null&&(lt.assign(Nt.location),Ut=y.I(Nt),Ut!==null&&lt.re(Ut.point)),ut!==null&&Nt!==null?b.Xa(lt)?(ut=Et.value.point,Nt=z,Nt.assign(b),Nt.re(ut),y.add(wt,a.Pd(E,wt,b)),Lh(wt,Nt.x,Nt.y)):(wt.suspendsRouting=!1,wt.bb()):(Et=Et.value.point,ut=ut!==null?b:Nt!==null?lt:tt,y.add(wt,a.Pd(E,wt,ut)),Lh(wt,ut.x-Et.x,ut.y-Et.y))}else(wt.fromNode===null||wt.toNode===null)&&(ut=Et.value.point,y.add(wt,a.Pd(E,wt,tt)),Lh(wt,tt.x-ut.x,tt.y-ut.y))}Wt.free(z),Wt.free(tt),Wt.free(b),Wt.free(lt),oi(ot),oi(rt),x||(Fs(a),ed(a,y))}}ze.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Wt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Wt.alloc(),pf(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,lt=rt.x;return isNaN(lt)&&(lt=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,lt)),Math.max(tt,Math.min(x.y,rt))),b!==y&&Wt.free(b),E};function gf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function pf(a,y,x,E,b){if(b===void 0&&(b=gf(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=Wt.allocAt(0,0),z.yi(0,0,a,y,b),me.No(x.x,x.y,ot+z.x,tt+z.y,a,y,E),Wt.free(z)}}function mf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Ln&&(y.suspendsRouting=!0)}function ed(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Ln&&(x.suspendsRouting=!1,$v(x)&&x.bb())}a.Mr=!1}}function Fg(a,y,x){return y=y.containingGroup,y!==null&&(a=Fg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}bt=ze.prototype,bt.Pd=function(a,y,x){if(x===void 0)return new Zu(Fo);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new Zu(new Wt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Zu(x.copy())};function Bg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&xe("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&xe("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&xe("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&xe("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&&xe("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}bt.Al=function(a){Bg(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(wr,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},bt.Ww=function(a,y){Bg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Rr,"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(wr,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},bt.Cy=function(a,y){Bg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Rr,"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(wr,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},bt.kA=function(a){if(a.diagram!==this&&xe("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(Rr,"layers",this,a,null,x,null),this.N(),this.Ya()}}},bt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},bt.Yw=function(a){return this.pf===null&&(this.pf=new pn),this.pf.add(a),this.model.Pe(a),this},bt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},bt.Pe=function(a){return this.zg===null&&(this.zg=new pn),this.zg.add(a),this},bt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},bt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ds&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},bt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var ot=new sr;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)},bt.g=function(a,y,x,E,b){this.cb(ar,a,this,y,x,E,b)},ze.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===ar){var b=a.object;if(gr(b,a.propertyName,a.I(y)),b instanceof Pe){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===wr){var tt=a.object,ot=a.newParam,rt=a.newValue;if(tt instanceof Cn)if(typeof ot=="number"&&rt instanceof Pe){y?tt.pc(ot):tt.Gb(ot,rt);var lt=tt.part;lt!==null&&lt.Wb()}else typeof ot=="number"&&rt instanceof Jr&&(rt.isRow?h1(tt,ot,y?void 0:rt):d1(tt,ot,y?void 0:rt));else if(tt instanceof ps){var ut=a.oldParam===!0;typeof ot=="number"&&rt instanceof ai&&(y?(rt.isSelected=!1,rt.isHighlighted=!1,rt.Wb(),tt.pc(ut?ot:-1,rt,ut)):tt.oi(ot,rt,ut))}else tt instanceof ze?typeof ot=="number"&&rt instanceof ps&&(y?this.Wa.mb(ot):(rt.Xe(this),this.Wa.Gb(ot,rt))):xe("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Rr){var gt=a.object,St=a.oldParam,wt=a.oldValue;if(gt instanceof Cn)typeof St=="number"&&wt instanceof Pe?y?gt.Gb(St,wt):gt.pc(St):typeof St=="number"&&wt instanceof Jr&&(wt.isRow?h1(gt,St,y?wt:void 0):d1(gt,St,y?wt:void 0));else if(gt instanceof ps){var Et=a.newParam===!0;typeof St=="number"&&wt instanceof ai&&(y?0>gt.Pa.indexOf(wt)&&gt.oi(St,wt,Et):(wt.isSelected=!1,wt.isHighlighted=!1,wt.Wb(),gt.pc(Et?St:-1,wt,Et)))}else gt instanceof ze?typeof St=="number"&&wt instanceof ps&&(y?(wt.Xe(this),this.Wa.Gb(St,wt)):this.Wa.mb(St)):xe("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Ds&&xe("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},ze.prototype.Ea=function(a){return this.undoManager.Ea(a)},ze.prototype.eb=function(a){return this.undoManager.eb(a)},ze.prototype.Kf=function(){return this.undoManager.Kf()},ze.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}},ze.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},ze.prototype.rp=function(){this.partManager.rp()};function Ng(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,hu(a),a.N(),a.Ee=!0,E.zb&&(Hu(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,hu(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,ot=a.zoomPoint.x,rt=a.zoomPoint.y,lt=a.contentAlignment;isNaN(ot)&&(lt.$c()?lt.Hf(ou)?ot=0:lt.Hf(ga)&&(ot=z-1):ot=lt.sb()?lt.x*(z-1):z/2),isNaN(rt)&&(lt.$c()?lt.Hf(Bl)?rt=0:lt.Hf(Oa)&&(rt=tt-1):rt=lt.sb()?lt.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Wt.allocAt(a.pa.x+ot/y-ot/x,a.pa.y+rt/y-rt/x),a.position=z,Wt.free(z),a.Ca=x,hu(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),xl(a,!1),E.zb&&(Hu(E)||E.ce.add(E.H,"scale",y,a.Ca))}}ze.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!==Ws||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof fr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),tf(b,this)),this.vb||this.invalidateViewport(a,y),uu(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 uu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Nn.alloc(),b=1,z=1,tt=x.O.s,ot=tt.length,rt=0;rt<ot;rt++){var lt=tt[rt],ut=Math.abs(lt.interval);2>ut||(pv(lt.figure)?z=z*ut/me.vx(z,ut):b=b*ut/me.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=on.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){on.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,on.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Wt.alloc(),me.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Nn.free(E),x.part.location=y,Wt.free(y)}}ze.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)}},ze.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))},ze.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Je(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof ai||xe("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 ai||xe("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},ze.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()}},bt=ze.prototype,bt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},bt.Jz=function(a){a=new mn().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 ai||xe("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},bt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Wt.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)),Wt.free(z);return}xe("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):xe("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Wt.free(z)},bt.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)},bt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},bt.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)},bt.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,lt=y.m22,ut=y.dx,gt=y.dy,St=x*tt+E*rt+ut;y=x*ot+E*lt+gt;var wt=b*tt+E*rt+ut;return a=b*ot+E*lt+gt,E=x*tt+z*rt+ut,x=x*ot+z*lt+gt,tt=b*tt+z*rt+ut,b=b*ot+z*lt+gt,z=Math.min(St,wt),St=Math.max(St,wt),wt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),St=Math.max(St,E),wt=Math.min(wt,x),y=Math.max(y,x),z=Math.min(z,tt),St=Math.max(St,tt),wt=Math.min(wt,b),y=Math.max(y,b),new on(z,wt,St-z,y-wt)},bt.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),uo(a.copy(),this.Ab)};function nm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function kg(a){return a=wf.get(a),a!==null?new a:new jo}ze.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Ds&&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===Ds){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Fs(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||af(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&&(nm(this),this.As.clear(),Wp(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var ot=this;Bn(function(){ot.currentTool.standardMouseOver(),ot.Rt=!1},10)}}}finally{this.aa=!0}}}};function Hd(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)nd(a,y[E])}function nd(a,y){if(y instanceof xa){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof mn&&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 Ag(a,y){if(y instanceof xa){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 mn&&x.Bg.remove(a),Df(E));break}}}}}ze.prototype.Wd=function(){this.partManager.Wd()},ze.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},ze.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},ze.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},ze.prototype.Vb=function(a){return this.partManager.Vb(a)},ze.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},bt=ze.prototype,bt.Lc=function(a){return this.partManager.Lc(a)},bt.ii=function(a){return this.partManager.ii(a)},bt.Kc=function(a){return this.partManager.Kc(a)},bt.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:co(Fi(y)))},bt.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:co(Fi(y)))};function hu(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 Tg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),xl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}bt.Va=function(){if(this.Zi){var a=on.alloc();Tg(this,this.computeBounds(a)),on.free(a)}},bt.rz=function(){for(var a=new mn,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},bt.qz=function(){return this.ai.iterator},bt.Uz=function(a){Fs(this),a&&vf(this,!0),this.ld?Og(this,!1):(this.Jk=!0,al(this))};function vf(a,y){for(var x=a.ai.iterator;x.next();)im(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function im(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)im(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Og(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||Su(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Dg(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Fs(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||af(z),a.aa=x}}}function Dg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Dg(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),bc(a,y),b.isValidLayout=!0):a.xh=!0)}}bt.yz=function(){for(var a=new pn,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 pn;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new Yn,E=new Yn;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 om(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function yf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;xe("Unknown DiagramEvent name: "+y)}bt.Bj=function(a,y){return a=yf(this,a),a!==null&&a.add(y),this},bt.am=function(a,y){a=yf(this,a),a!==null&&a.remove(y)},bt.R=function(a,y,x){var E=yf(this,a),b=new Nl;if(b.diagram=this,a=om(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 Sf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}bt.Yj=function(a,y){return xf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},ze.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?xg(this,a):a.assign(this.documentBounds)};function xf(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new hp(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=rm(a,x)),x===null){y=on.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&&Pf(a,tt,E,y)}on.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=on.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Rn&&Pf(a,tt,E,y);on.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&oS(b);return b}function rm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?rm(a,y.containingGroup):null}function Pf(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(Hf(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(Bh,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=Bh}else if(y instanceof bi)for(y=y.memberParts;y.next();)b=y.value,b instanceof Rn&&Pf(a,b,x,E)}}function yh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}ze.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Ig(this)};function Ig(a){a.vk===-1&&(a.vk=Bn(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=on.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Tg(a,y),on.free(y),a.Fc=!0,a.bd(),Ig(a))}},a.vp))}ze.prototype.ug=function(){this.vk!==-1&&(Yt.clearTimeout(this.vk),this.vk=-1)},ze.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=on.allocAt(0,0,E.width*b,E.height*b);var z=Wt.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(Fo)||(y=new Wt(y.x+z.x/b,y.y+z.y/b)),on.free(E),Wt.free(z),y},bt=ze.prototype,bt.Cs=function(){return null},bt.av=function(){return null},bt.bs=function(a,y){this.pj.add(a,y)},bt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof bi&&(y.$p=null)})};function Mc(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-lt>rt?y(x,b,ot):Yt.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,lt=+new Date;return Yt.requestAnimationFrame(function(){E()}),null}bt.Wz=function(a){return Lr?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},bt.Jx=function(a){return a===void 0&&(a={}),Mc(this,this.Xz,a)},bt.Xz=function(a,y,x){var E=sm(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 Zd+"data":b=E.getImageData(0,0,x.width,x.height);break;case Zd:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&xe('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 sm(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&xe("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 Nn(1/0,1/0):new Nn(2e3,2e3));var ot=y.position||null,rt=y.parts||null,lt=y.padding===void 0?1:y.padding,ut=y.background||null,gt=y.omitTemporary;gt===void 0&&(gt=!0);var St=y.document||document,wt=y.elementFinished||null,Et=y.showTemporary;Et===void 0&&(Et=!gt),y=y.showGrid,y===void 0&&(y=Et),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof lt=="number"?lt=new ci(lt):lt instanceof ci||xe("MakeImage padding must be a Margin or a number."),lt.left=Math.max(lt.left,0),lt.right=Math.max(lt.right,0),lt.top=Math.max(lt.top,0),lt.bottom=Math.max(lt.bottom,0),a.ib.Vc(!0),gt=new wl(null,St,void 0,!0);var Nt=gt.context;if(!(b||z||rt||ot))return gt.width=a.Aa+Math.ceil(lt.left+lt.right),gt.height=a.ya+Math.ceil(lt.top+lt.bottom),x==="SVG"?E===null?null:(E.resize(gt.width,gt.height,gt.width,gt.height),E.ownerDocument=St,E.hs=wt,ff(a,E.context,lt,new Nn(gt.width,gt.height),a.Ca,a.pa,rt,ut,Et,y),E.context):(a.Xm=!1,ff(a,Nt,lt,new Nn(gt.width,gt.height),a.Ca,a.pa,rt,ut,Et,y),a.Xm=!0,gt.context);var Ut=a.Pp,jt=a.documentBounds.copy();if(jt.Fv(a.yb),Et)for(var ee=a.Wa.s,oe=ee.length,ae=0;ae<oe;ae++){var Se=ee[ae];if(Se.visible&&Se.isTemporary){Se=Se.Pa.s;for(var je=Se.length,Dn=0;Dn<je;Dn++){var Un=Se[Dn];Un.isInDocumentBounds&&Un.isVisible()&&(Un=Un.actualBounds,Un.w()&&jt.ed(Un))}}}if(ee=new Wt(jt.x,jt.y),rt!==null){for(oe=new on(0,0,0,0),ae=!0,Se=rt.iterator,Se.reset();Se.next();)je=Se.value,je instanceof ai&&(Dn=je.layer,Dn!==null&&!Dn.visible||Dn!==null&&!Et&&Dn.isTemporary||!je.isVisible()||(je=je.actualBounds,je.w()&&(ae?(ae=!1,oe.assign(je)):oe.ed(je))));jt.width=oe.width,jt.height=oe.height,ee.x=oe.x,ee.y=oe.y}return ot!==null&&ot.w()&&(ee=ot,z||(z=Ut)),oe=ot=0,lt!==null&&(ot=lt.left+lt.right,oe=lt.top+lt.bottom),ae=Se=0,b!==null&&(Se=b.width,ae=b.height,isFinite(Se)&&(Se=Math.max(0,Se-ot)),isFinite(ae)&&(ae=Math.max(0,ae-oe))),b!==null&&z!==null?(z==="NaN"&&(z=Ut),b.w()?(b=Se,jt=ae):isNaN(ae)?(b=Se,jt=jt.height*z):(b=jt.width*z,jt=ae)):b!==null?b.w()?(z=Math.min(Se/jt.width,ae/jt.height),b=Se,jt=ae):isNaN(ae)?(z=Se/jt.width,b=Se,jt=jt.height*z):(z=ae/jt.height,b=jt.width*z,jt=ae):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-ot)/jt.width,(tt.height-oe)/jt.height),z>Ut?(z=Ut,b=jt.width,jt=jt.height):(b=tt.width,jt=tt.height)):(b=jt.width*z,jt=jt.height*z):(z=Ut,b=jt.width,jt=jt.height),lt!==null?(b+=ot,jt+=oe):lt=new ci(0),tt!==null&&(Ut=tt.width,tt=tt.height,isNaN(Ut)&&(Ut=2e3),isNaN(tt)&&(tt=2e3),isFinite(Ut)&&(b=Math.min(b,Ut)),isFinite(tt)&&(jt=Math.min(jt,tt))),gt.width=Math.ceil(b),gt.height=Math.ceil(jt),x==="SVG"?E===null?null:(E.resize(gt.width,gt.height,gt.width,gt.height),E.ownerDocument=St,E.hs=wt,ff(a,E.context,lt,new Nn(Math.ceil(b),Math.ceil(jt)),z,ee,rt,ut,Et,y),E.context):(a.Xm=!1,ff(a,Nt,lt,new Nn(Math.ceil(b),Math.ceil(jt)),z,ee,rt,ut,Et,y),a.Xm=!0,gt.context)}re.Object.defineProperties(ze.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 du(this,Yt.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new du(this,Yt.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(Yt,"resize",this.Ov,!1),this.removeEventListener(Yt,"wheel",this.$j,!0),xu===this&&(xu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),yg(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)&&Mn(a,"0 <= value <= 1",ze,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),xl(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),xl(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),xl(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),xl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Mn(a,">= 0",ze,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Mn(a,">= 0",ze,"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 Mn(a,">= 0",ze,"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||nm(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&&xe("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=vg(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Su(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=kg(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(Yt,"pointermove",this.dk,!0),this.addEventListener(Yt,"pointerdown",this.ui,!0),this.addEventListener(Yt,"pointerup",this.fk,!0),this.addEventListener(Yt,"pointerout",this.ek,!0),this.addEventListener(Yt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Yt,"wheel",this.$j,!0),this.addEventListener(Yt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Yt,"pointermove",this.dk,!0),this.removeEventListener(Yt,"pointerdown",this.ui,!0),this.removeEventListener(Yt,"pointerup",this.fk,!0),this.removeEventListener(Yt,"pointerout",this.ek,!0),this.removeEventListener(Yt,"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(Yt,"wheel",this.$j,!0),this.removeEventListener(Yt,"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=Wt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Zp(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?hu(this):(this.vb=!0,a=this.scale,Pg(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)}Wt.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=Qp(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Qp(this)),a.type!==Cn.Grid&&xe("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),uu(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),hu(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||xe("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 ci(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===Sh&&xl(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,xl(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,Ng(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&&Ng(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!==Ws&&xl(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||xe("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()||xe("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)):Mn(a,"> 0",ze,"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)):Mn(a,"> 0",ze,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),xl(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new ci(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&&xe("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();)tp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==xh&&a!==Yr&&a!==Cf&&xe("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 Nn(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 ci(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),re.Object.defineProperties(ze,{licenseKey:{get:function(){return Gg.jc()},set:function(a){Gg.add(a.replace(/\s/g,""))}},version:{get:function(){return Wd}}}),ze.prototype.makeImageData=ze.prototype.Jx,ze.prototype.makeImage=ze.prototype.Wz,ze.prototype.cacheGroupExternalLinks=ze.prototype.Fu,ze.prototype.addRenderer=ze.prototype.bs,ze.prototype.makeSVG=ze.prototype.av,ze.prototype.makeSvg=ze.prototype.Cs,ze.prototype.stopAutoScroll=ze.prototype.ug,ze.prototype.doAutoScroll=ze.prototype.gs,ze.prototype.isUnoccupied=ze.prototype.Yj,ze.prototype.raiseDiagramEvent=ze.prototype.R,ze.prototype.removeDiagramListener=ze.prototype.am,ze.prototype.addDiagramListener=ze.prototype.Bj,ze.prototype.findTreeRoots=ze.prototype.yz,ze.prototype.layoutDiagram=ze.prototype.Uz,ze.prototype.findTopLevelGroups=ze.prototype.qz,ze.prototype.findTopLevelNodesAndLinks=ze.prototype.rz,ze.prototype.ensureBounds=ze.prototype.Va,ze.prototype.findLinksByExample=ze.prototype.ls,ze.prototype.findNodesByExample=ze.prototype.ms,ze.prototype.findLinkForData=ze.prototype.Kc,ze.prototype.findNodeForData=ze.prototype.ii,ze.prototype.findPartForData=ze.prototype.Lc,ze.prototype.findLinkForKey=ze.prototype.findLinkForKey,ze.prototype.findNodeForKey=ze.prototype.Vb,ze.prototype.findPartForKey=ze.prototype.findPartForKey,ze.prototype.rebuildParts=ze.prototype.Wd,ze.prototype.transformViewToDoc=ze.prototype.Ps,ze.prototype.transformRectDocToView=ze.prototype.zA,ze.prototype.transformDocToView=ze.prototype.op,ze.prototype.centerRect=ze.prototype.es,ze.prototype.scrollToRect=ze.prototype.tv,ze.prototype.scroll=ze.prototype.scroll,ze.prototype.highlightCollection=ze.prototype.Jz,ze.prototype.highlight=ze.prototype.Iz,ze.prototype.selectCollection=ze.prototype.rA,ze.prototype.select=ze.prototype.select,ze.prototype.updateAllRelationshipsFromData=ze.prototype.rp,ze.prototype.updateAllTargetBindings=ze.prototype.updateAllTargetBindings,ze.prototype.commit=ze.prototype.commit,ze.prototype.rollbackTransaction=ze.prototype.Kf,ze.prototype.commitTransaction=ze.prototype.eb,ze.prototype.startTransaction=ze.prototype.Ea,ze.prototype.raiseChanged=ze.prototype.g,ze.prototype.raiseChangedEvent=ze.prototype.cb,ze.prototype.removeChangedListener=ze.prototype.ik,ze.prototype.addChangedListener=ze.prototype.Pe,ze.prototype.removeModelChangedListener=ze.prototype.mA,ze.prototype.addModelChangedListener=ze.prototype.Yw,ze.prototype.findLayer=ze.prototype.Qj,ze.prototype.removeLayer=ze.prototype.kA,ze.prototype.addLayerAfter=ze.prototype.Cy,ze.prototype.addLayerBefore=ze.prototype.Ww,ze.prototype.addLayer=ze.prototype.Al,ze.prototype.moveParts=ze.prototype.moveParts,ze.prototype.copyParts=ze.prototype.Kj,ze.prototype.removeParts=ze.prototype.Is,ze.prototype.remove=ze.prototype.remove,ze.prototype.add=ze.prototype.add,ze.prototype.clearDelayedGeometries=ze.prototype.bx,ze.prototype.setProperties=ze.prototype.nm,ze.prototype.attach=ze.prototype.Du,ze.prototype.set=ze.prototype.set,ze.prototype.resetInputOptions=ze.prototype.Sx,ze.prototype.setInputOption=ze.prototype.sA,ze.prototype.getInputOption=ze.prototype.Ql,ze.prototype.resetRenderingHints=ze.prototype.Tx,ze.prototype.setRenderingHint=ze.prototype.Xx,ze.prototype.getRenderingHint=ze.prototype.Gf,ze.prototype.maybeUpdate=ze.prototype.bd,ze.prototype.requestUpdate=ze.prototype.$b,ze.prototype.delayInitialization=ze.prototype.Xy,ze.prototype.isUpdateRequested=ze.prototype.Pz,ze.prototype.invalidateDocumentBounds=ze.prototype.Ya,ze.prototype.findObjectsNear=ze.prototype.og,ze.prototype.findPartsNear=ze.prototype.mz,ze.prototype.findObjectsIn=ze.prototype.Cf,ze.prototype.findPartsIn=ze.prototype.ux,ze.prototype.findObjectsAt=ze.prototype.ji,ze.prototype.findPartsAt=ze.prototype.lz,ze.prototype.findObjectAt=ze.prototype.ic,ze.prototype.findPartAt=ze.prototype.Ol,ze.prototype.focusObject=ze.prototype.zz,ze.prototype.alignDocument=ze.prototype.Jy,ze.prototype.zoomToRect=ze.prototype.BA,ze.prototype.zoomToFit=ze.prototype.zoomToFit,ze.prototype.diagramScroll=ze.prototype.kx,ze.prototype.focus=ze.prototype.focus;var wf=new Yn,am=null,Lr=Yt.document!==void 0,Gd=null,id="",Ws=new Oe(ze,"None",0),Ka=new Oe(ze,"Uniform",1),od=new Oe(ze,"UniformToFill",2),Lc=new Oe(ze,"CycleAll",10),Rg=new Oe(ze,"CycleNotDirected",11),jg=new Oe(ze,"CycleNotDirectedFast",12),zg=new Oe(ze,"CycleNotUndirected",13),_g=new Oe(ze,"CycleDestinationTree",14),Hg=new Oe(ze,"CycleSourceTree",15),Sh=new Oe(ze,"DocumentScroll",1),Fc=new Oe(ze,"InfiniteScroll",2),xh=new Oe(ze,"TreeParentCollapsed",21),Yr=new Oe(ze,"AllParentsCollapsed",22),Cf=new Oe(ze,"AnyParentsCollapsed",23),Gg=new pn,Wd="2.3.10",Zd="image",Bc=null,lm=!1;function Is(){if(Lr){var a=Yt.document.createElement("canvas"),y=a.getContext("2d"),x=ri("7ca11abfd022028846");y[x]=ri("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Ve.Dx+"4ae6247590da4bb21c324ba3a84e385776",fi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",me.za],b=1;5>b;b++)y[ri("7ca11abfd7330390")](ri(E[b-1]),10,15*b);for(y[x]=ri("39f046ebb36e4b"),x=1;5>x;x++)y[ri("7ca11abfd7330390")](ri(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(fi.prototype.Cd=fi.prototype.Eu),Bc=a}}ze.className="Diagram",ze.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Yt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof ze?y.H:null},ze.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},ze.useDOM=function(a){Lr=a?Yt.document!==void 0:!1},ze.isUsingDOM=function(){return Lr},ze.None=Ws,ze.Uniform=Ka,ze.UniformToFill=od,ze.CycleAll=Lc,ze.CycleNotDirected=Rg,ze.CycleNotDirectedFast=jg,ze.CycleNotUndirected=zg,ze.CycleDestinationTree=_g,ze.CycleSourceTree=Hg,ze.DocumentScroll=Sh,ze.InfiniteScroll=Fc,ze.TreeParentCollapsed=xh,ze.AllParentsCollapsed=Yr,ze.AnyParentsCollapsed=Cf;function um(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Vd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=Yt[ri("76a715b2f73f148a")][ri("72ba13b5")]||"";if(a.Rc=!0,Lr){var E=ze[ri("76a115b6ed251eaf4692")];if(E)for(var b=Gg.iterator;b.next()&&(E=b.value,E=ri(E).split(ri("39e9")),!(6>E.length));){var z=ri(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=ri(Ve[ri("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var ot=Yt[ri("74a900bae4370f8b51")][ri("6fbb13a1c2311e8a57")].toLowerCase();if(tt=ot[ri("73a612b6fb191d")](ri("3aad1ab6e022098b4dc4")),z=ri(E[2]),-1<tt&&(ot=ot[ri("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<ot&&ot<tt),!a.Rc))break;for(tt=x[ri("76ad18b4f73e")],ot=x[ri("73a612b6fb191d")](ri("35e7"))+2;ot<tt;ot++)y+=x[ot];if(tt=y[ri("73a612b6fb191d")](z),0>tt&&z!==ri("7da71ca0ad381e90")&&(tt=y[ri("73a612b6fb191d")](ri("76a715b2ef3e149757"))),0>tt&&(tt=y[ri("73a612b6fb191d")](ri("76a715b2ef3e149757"))),0>tt&&(tt=y[ri("73a612b6fb191d")](ri("2bfa41fdb3784bca12"))),0>tt&&(tt=x[ri("73a612b6fb191d")](ri("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[ri("73a612b6fb191d")](ri("35"))||y[ri("73a612b6fb191d")](ri("35"))===-1),!a.Rc||x[ri("73a612b6fb191d")](ri("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[ri("73a612b6fb191d")](z)),!a.Rc)||(tt=Yt[ri("76a715b2f73f148a")][ri("69ad17a1e03e")],ot=tt[ri("73a612b6fb191d")](ri("7fb002b6ed25128b4da25b2e")),-1<ot&&(a.Rc=!(tt[ri("73a612b6fb191d")](z)>ot),!a.Rc)))break;if(z[0]==="#"){tt=Yt.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[ri("79a417a0f0181a8946")]=E,Yt.document[ri("78a712aa")]){Yt.document[ri("78a712aa")][ri("7bb806b6ed32388c4a875b")](tt),rt=Yt.getComputedStyle(tt).getPropertyValue(ri("78a704b7e62456904c9b12701b6532a8"));var lt=Yt.getComputedStyle(tt).getPropertyValue(ri("75b817b0ea2202"));if(Yt.document[ri("78a712aa")][ri("68ad1bbcf533388c4a875b")](tt),rt){if(tt=Yt[ri("77a902b0eb1b1e804a8a")],lt==="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(ri("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[ri("76ad18b4f73e")],b=x[ri("73a612b6fb191d")](ri("35e7"))+2;b<ut;b++)y+=x[b];x=y[ri("73a612b6fb191d")](ri("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[ri("73a612b6fb191d")](ri("35")))}}}return 0<a.Rc&&a!==a.wy}um.className="DiagramHelper";function Zu(a){this.j=a===void 0?new Wt:a,this.o=new Wt}re.Object.defineProperties(Zu.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 Nc="DraggingInfo";Zu.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 Nn(NaN,NaN).freeze(),this.gridSnapCellSpot=is,this.gridSnapOrigin=new Wt(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"||Yt.Element&&a instanceof Element)var x=ze.call(this,a)||this;else x=ze.call(this)||this,y=a;return dt(x),y&&x.nm(y),x}Le(ct,ze);function dt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Ta,a.layout=new xs}ct.prototype.reset=function(){ze.prototype.reset.call(this),dt(this)},ct.className="Palette";function pt(a,y){if(typeof a=="string"||Yt.Element&&a instanceof Element)var x=ze.call(this,a)||this;else x=ze.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 ai;var b=new Ai;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 ci(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new $t,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,ot=E.lastInput.documentPoint;z.position=new Wt(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=Ka,x.vb=!1,y&&Object.assign(x,y),x}Le(pt,ze),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(zd(this),this.ql===null){var x=new wl(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Lt(this)}finally{this.ta=a,this.ib=y}}}ze.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&xe("No div specified"),this.ta===null&&xe("No canvas specified"),!(this.ta instanceof du)&&(Dv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){zd(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?Lt(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 Lt(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=on.alloc().assign(a.viewportBounds).ed(y.viewportBounds),uu(y,b),on.free(b),Fs(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 lt=ot.diagram.grid.part;if(!x&&ot.isTemporary)E&&lt.layer===ot&&(ot=Wu(ot,b),lt.gc(b,rt),b.globalAlpha=ot);else{for(var ut=Wu(ot,b),gt=rt.scale,St=on.alloc(),wt=ot.Pa.s,Et=wt.length,Nt=0;Nt<Et;Nt++){var Ut=wt[Nt];(E||Ut!==lt)&&ot.Oj(b,Ut,rt,null,gt,St,!1)}on.free(St),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=Nn.alloc();b.h(x.width,x.height),E.desiredSize=b,Nn.free(b),a=2/a.scale,E instanceof Ai&&(E.strokeWidth=a),y.location=new Wt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}pt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Mo;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))},re.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&xe("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 $t(){wi.call(this),this.j=null}Le($t,wi),$t.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new Wt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Wt(a.x-this.j.x,a.y-this.j.y)),!0)},$t.prototype.doActivate=function(){this.j=null,wi.prototype.doActivate.call(this)},$t.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},$t.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new Wt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Wt(a.x-this.j.x,a.y-this.j.y)}}},$t.className="OverviewDraggingTool";function Vt(){po(this),this.H=xu,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=Mo,this.hb=!0,this.cg=null,this.ob=200}Vt.prototype.toString=function(){return"CommandHandler"},Vt.prototype.Xe=function(a){this.H=a},Vt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Ao?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()},Vt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Vt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof fr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Vt.prototype.canStopCommand=function(){return!0},Vt.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=""}},Vt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Vt.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 mn,x=a.selection.iterator;x.next();)ld(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=""}},Vt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Vt.prototype.copySelection=function(){var a=this.diagram,y=new mn;for(a=a.selection.iterator;a.next();)ld(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Vt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Vt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Vt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Vt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Gd=null,id="";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 pn,x.addAll(z),Gd=x,id=y.model.dataFormat}}y.R("ClipboardChanged",x)},Vt.prototype.pasteFromClipboard=function(){var a=new mn,y=Gd;if(y===null)return a;var x=this.diagram;if(id!==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},Vt.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);td(y,z,new Wt(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=""}},Vt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Gd===null||Gd.count===0||id!==a.model.dataFormat)},Vt.prototype.undo=function(){this.diagram.undoManager.undo()},Vt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Vt.prototype.redo=function(){this.diagram.undoManager.redo()},Vt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Vt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ws&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Vt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ws?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Vt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ws&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Vt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ws?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Vt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Vt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Vt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Su(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=Mo):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),af(y)},Vt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Vt.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;Su(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=le(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 Rn&&rt.isTreeExpanded&&(!(rt instanceof bi)||rt.isSubGraphExpanded);)rt=b.pop();0<b.length?(rt instanceof ai&&y.tv(rt.actualBounds),rt instanceof Rn&&!rt.isTreeExpanded&&(rt.isTreeExpanded=!0),rt instanceof bi&&!rt.isSubGraphExpanded&&(rt.isSubGraphExpanded=!0)):(rt instanceof ai&&y.es(rt.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Bn(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 le(a,y,x){if(y.isVisible())return x;if(y instanceof Eo)le(a,y.adornedPart,x);else if(y instanceof Ln){var E=y.fromNode;E!==null&&le(a,E,x),y=y.toNode,y!==null&&le(a,y,x)}else y instanceof Rn&&(E=y.labeledLink,E!==null&&le(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),le(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),le(a,y,x));return x}Vt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof ai)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Vt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Su(y.animationManager,"Collapse Tree");var x=new pn;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 Rn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Vt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Rn&&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 Rn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Vt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Su(y.animationManager,"Expand Tree");var x=new pn;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 Rn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Vt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Rn)||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 Rn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Vt.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 pn,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var ot=new pn,rt=b.iterator;rt.next();){var lt=rt.value;z=!1;for(var ut=b.iterator;ut.next();)if(lt.Td(ut.value)){z=!0;break}z||ot.add(lt)}if(0<ot.count){var gt=ot.first().containingGroup;if(gt!==null)for(;gt!==null;){b=!1;for(var St=ot.iterator;St.next();)if(!St.value.Td(gt)){b=!0;break}if(b)gt=gt.containingGroup;else break}if(x instanceof bi)Cl(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var wt=y.copyNodeData(x);_e(wt)&&(y.xf(wt),E=a.ii(wt))}if(E!==null){gt!==null&&this.isValidMember(gt,E)&&(E.containingGroup=gt);for(var Et=ot.iterator;Et.next();){var Nt=Et.value;this.isValidMember(E,Nt)&&(Nt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Vt.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 Ye(a){var y=Kn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Ln||y.push(x)}a=new mn,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 oi(y),a}Vt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Ln)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},Vt.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 pn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof bi&&z.canUngroup()&&E.add(z)}var tt=new pn;if(0<E.count){y.clearSelection(!0);for(var ot=E.iterator;ot.next();){var rt=ot.value;rt.expandSubGraph();var lt=rt.containingGroup,ut=lt!==null&&lt.data!==null?x.wa(lt.data):void 0;tt.addAll(rt.memberParts);for(var gt=tt.iterator;gt.next();){var St=gt.value;if(St.isSelected=!0,!(St instanceof Ln)){var wt=St.data;wt!==null?x.mp(wt,ut):St.containingGroup=lt}}y.remove(rt)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Vt.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 bi))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof bi&&y.canUngroup())return!0;return!1},Vt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Ye(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Vt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Su(y.animationManager,"Collapse SubGraph");var x=new pn;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 bi&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Vt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof bi&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof bi&&y.isSubGraphExpanded)return!0;return!1},Vt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Su(y.animationManager,"Expand SubGraph");var x=new pn;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 bi&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Vt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof bi&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof bi&&!y.isSubGraphExpanded)return!0;return!1},Vt.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 Qo&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Vt.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 Qo))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 Qo&&x.editable}),a!==null))return!0;return!1},Vt.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 Pe?b=a.ga(wo):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Wt(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,_u(x,!1,a)}},Vt.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)},Vt.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 Yn,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 Ln&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},re.Object.defineProperties(Vt.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||xe("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}}}),Vt.className="CommandHandler",Xp=function(){return new Vt};function Pe(){po(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Wt(NaN,NaN).freeze(),this.jd=Ns,this.Ab=new fi,this.wh=new fi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ws,this.uc=new on(NaN,NaN,NaN,NaN).freeze(),this.Ib=new on(NaN,NaN,NaN,NaN).freeze(),this.dc=new on(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Ge,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 wn,yn,Xn,ti,mi,Mi,ro,Zi,ho,Zo;Pe.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=hi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Pe.prototype.Vw=function(a){var y=this.Dh;if(Je(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Pe.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Pe.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},Pe.prototype.copy=function(){return this.clone()},bt=Pe.prototype,bt.qb=function(a){a.classType===Ln?a.name.indexOf("Orient")===0?this.segmentOrientation=a:xe("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Pe&&(this.stretch=a)},bt.toString=function(){return ui(this.constructor)+"#"+Si(this)},bt.th=function(){this.A!==null&&(this.A.nc=!0)};function zi(a){a.A===null?a.A=new Ac:a.A.nc&&(a.A=a.A.copy())}bt.Xc=function(){if(this.ba===null){var a=new Wg;a.Xi=kr,a.yj=kr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},bt.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===ar&&Es(this)&&ur(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 Yn),tt=z.undoManager.transactionLevel===0,a.startCondition===Jh?tt=!0:a.startCondition===Dd&&(tt=!1),tt?(z=new Ls,Up(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()):(Su(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Cn&&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 Cn&&Yd(ot,function(rt){rt.data!==null&&rt.l&16777216&&rt.La(y)})};function ur(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=MS(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))}}bt.ks=function(a){return this.bindingId===a?this:null},bt.g=function(a,y,x){this.cb(ar,a,this,y,x)},bt.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 fi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function rs(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}bt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?yr(a.x,a.y,0,0,0,E.height)<=y||yr(a.x,a.y,0,E.height,E.width,E.height)<=y||yr(a.x,a.y,E.width,E.height,E.width,0)<=y||yr(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},bt.se=function(){return!0},bt.ca=function(a){var y=Wt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Wt.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=_o(x.x-tt*rt,x.y-tt*rt,x.width+z*rt,x.height+z*rt,y.x,y.y),Wt.free(y),a}return b=!1,(this instanceof Eo||this instanceof Ai?_o(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)),Wt.free(y),b},bt.gh=function(a){var y=this.naturalBounds;return _o(0,0,y.width,y.height,a.x,a.y)},bt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=on.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Wt.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)))),Wt.free(b),on.free(y),E},bt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Wt.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)))),Wt.free(b),E},bt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Wt.allocAt(0,0),b=Wt.allocAt(0,x.height),z=Wt.allocAt(x.width,x.height),tt=Wt.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=on.allocAt(0,0,x.width,x.height);var rt=Wt.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)))),Wt.free(rt),on.free(x),!ot&&(me.us(a,E,b)||me.us(a,b,z)||me.us(a,z,tt)||me.us(a,tt,E))&&(ot=!0)}return Wt.free(E),Wt.free(b),Wt.free(z),Wt.free(tt),ot},bt.ga=function(a,y){if(y===void 0&&(y=new Wt),a instanceof Qn){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},bt.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe,E=Wt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Mr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Mr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Mr(a,E.x,E.y,0,0),Wt.free(E),a},bt.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},bt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},bt.qs=function(a,y){return y===void 0&&(y=new Wt),y.assign(a),this.oe.Cd(y),y},bt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},bt.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,lt=-z.m21*tt,ut=z.m11*tt,gt=tt*(z.m21*z.dy-z.m22*z.dx),St=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,me.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*ot+y*lt+gt,a=a*rt+y*ut+St,y=x*ot+E*lt+gt,x=x*rt+E*ut+St,b.h(0,0),E=this.naturalBounds,x=me.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},Pe.prototype.measure=function(a,y,x,E){if(Xa(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 Cn;switch(ya(this,!0)){case yn:tt=b=0,ot&&(y=a=1/0);break;case wn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case ti:isFinite(a)&&a>x&&(b=a),tt=0,ot&&(y=1/0);break;case mi: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()||xe("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Xr(this,!1)}},Pe.prototype.Wl=function(){},Pe.prototype.Dd=function(){return!1},Pe.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=on.alloc();z.assign(this.Ib),this.Ib.ka(),na(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&&Ch(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 Qo&&(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()||xe("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Cu(this,!1),on.free(z)},bt=Pe.prototype,bt.eh=function(){};function Zs(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=ya(a,!0),x===E&&z===b&&(y=yn),y){case yn:(x>E||z>b)&&(Xr(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case wn:Xr(a,!0),a.measure(E,b,0,0);break;case ti:Xr(a,!0),a.measure(E,z,0,0);break;case mi:Xr(a,!0),a.measure(x,b,0,0)}}}bt.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(),cs(a,y)||(x.oh(),this.Pn(x)))},bt.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof Rn&&W1(a,this))},bt.gc=function(a,y){if(!ll(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 Cn&&Ch(this),tt=this.Ib;if(z){var ot=this.Ib,rt=this.dc,lt=this.areaBackground,ut=this.Ma;lt===null&&ut===null||a.yc(),lt!==null&&(Nr(this,a,lt,!0,!0,rt,ot),lt instanceof Io&&lt.type===dl?(a.beginPath(),a.rect(ot.x,ot.y,ot.width,ot.height),a.ng(lt)):a.fillRect(ot.x,ot.y,ot.width,ot.height)),ut!==null&&(Nr(this,a,ut,!0,!1,rt,ot),ut instanceof Io&&ut.type===dl?(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&&Ss(this),lt=this.part,rt=!1;var gt=0;lt&&y.Gf("drawShadows")&&(rt=lt.isShadowed)&&(ut=lt.shadowOffset,gt=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var St;if(!(St=y.$i||!ut)){var wt=this.naturalBounds;St=this.wh;var Et=St.m11,Nt=St.m21,Ut=St.dx,jt=St.m12,ee=St.m22,oe=St.dy,ae,Se=ae=0;St=ae*Et+Se*Nt+Ut;var je=ae*jt+Se*ee+oe;ae=wt.width+gt,Se=0;var Dn=ae*Et+Se*Nt+Ut;ae=ae*jt+Se*ee+oe,Se=Math.min(St,Dn);var Un=Math.min(je,ae),_n=Math.max(St+0,Dn)-Se,bn=Math.max(je+0,ae)-Un;St=Se,je=Un,ae=wt.width+gt,Se=wt.height+gt,Dn=ae*Et+Se*Nt+Ut,ae=ae*jt+Se*ee+oe,Se=Math.min(St,Dn),Un=Math.min(je,ae),_n=Math.max(St+_n,Dn)-Se,bn=Math.max(je+bn,ae)-Un,St=Se,je=Un,ae=0,Se=wt.height+gt,Dn=ae*Et+Se*Nt+Ut,ae=ae*jt+Se*ee+oe,Se=Math.min(St,Dn),Un=Math.min(je,ae),_n=Math.max(St+_n,Dn)-Se,bn=Math.max(je+bn,ae)-Un,St=Se,je=Un,gt=y.viewportBounds,wt=gt.x,Et=gt.y,St=!(St>gt.width+wt||wt>_n+St||je>gt.height+Et||Et>bn+je)}if(St){if(St=(this.l&256)!==0,a.clipInsteadOfFill&&(St=!1),this instanceof Qo&&(a.font=this.font),St){if(je=ot.se()?ot.naturalBounds:ot.actualBounds,_n=Math.max(tt.x,je.x),bn=Math.max(tt.y,je.y),gt=Math.min(tt.right,je.right)-_n,wt=Math.min(tt.bottom,je.bottom)-bn,Et=this.tb,Et!==null&&(_n=Et.x,bn=Et.y,gt=Et.width,wt=Et.height),_n>tt.width+tt.x||tt.x>je.width+je.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(_n,bn,gt,wt),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}rt&&(je=lt.shadowOffset,a.Ev(je.x*y.scale*this.scale*y.Mb,je.y*y.scale*this.scale*y.Mb,lt.shadowBlur),Vu(a),a.shadowColor=lt.shadowColor)}rt&&this.shadowVisible===!0?Vu(a):rt&&this.shadowVisible===!1&&Eu(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Ya(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),rt&&ms(this,ot)&&this.shadowVisible===null&&Eu(a),this.Ma!==null&&(a.yc(),ba(this,a,lt,tt)),rt&&(this.Ma!==null||this.areaBackground!==null||ms(this,ot))?(Dl(this,!0),this.shadowVisible===null&&Eu(a)):Dl(this,!1),this.hh(a,y),rt&&this.l&512&&Vu(a),ut&&rt&&Eu(a),St&&(a.restore(),a.Vc(this instanceof Cn)),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 ms(a,y){return y===null?!1:(Ch(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Cn.Auto||y.type===Cn.Spot)&&y.Pb()!==a)}bt.Dv=function(){};function Ya(a,y,x,E){Nr(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Io&&a.areaBackground.type===dl?(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 ba(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,ot=x.width+b,rt=x.height+b;Nr(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Io&&a.Ma.type===dl?(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 Rs(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===Cn.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 ll(a,y,x){if(!(y instanceof Ra))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&&Rs(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),Vu(y),y.shadowColor=a.shadowColor}a instanceof Qo&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Cn;var ot=a instanceof Cn?Ch(a):!1;a.l&4096&&Ss(a);var rt=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&ot?(Zg(y,1,0,0,1,0,0),a.svg=y.ad):z?(Zg(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Zg(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var lt=tt.copy().Vj();y.rb.ha=[lt.m11,lt.m12,lt.m21,lt.m22,lt.dx,lt.dy],Ya(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]),ba(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],ba(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&&Vu(y),ot&&a.shadowVisible===!0?Vu(y):ot&&a.shadowVisible===!1&&Eu(y),b=a.panel,ot&&ms(a,b)&&a.shadowVisible===null&&Eu(y),y.Il&&(lt=x.computePixelRatio(),lt="drop-shadow("+y.shadowOffsetX/lt+"px "+y.shadowOffsetY/lt+"px "+y.shadowBlur/lt/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",lt),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",lt)),ot&&(a.Ma!==null||a.areaBackground!==null||ms(a,b))?(Dl(a,!0),a.shadowVisible===null&&Eu(y)):Dl(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,lt=a.svg,!z&&lt!==null&&ot!==lt&&lt.parentNode===a.panel.svg?(a.svg.replaceWith(ot),a.svg=ot,ot!==null&&a.$o(y,E,rt,ot),va(y,lt),!0):(a.svg=ot,tt!==null&&ot===null&&(dm(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&&Vu(y),a.Dd()&&Eu(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&&Rs(a,E,ot),tt!==null&&tt(a,ot)),!0)}bt.$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"+Dr++,ot=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof Cn&&(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"),va(a,E)};function va(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function js(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Fi(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()}}bt.hh=function(){},bt.lv=function(){this.Uc=!0},bt.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 Cn?Ch(this):!1;if(!(this instanceof Cn&&b))if(this instanceof xa){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Yy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Xy(a)):y.setAttributeNS(null,"transform",Xy(a))}else if(!x||this instanceof Cn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Ai){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],Ya(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&&cm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(cm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Cn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),ba(this,a,this.naturalBounds,this.actualBounds),y.Ma?(cm(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&&cm(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},bt.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 Nr(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===wh)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var lt=a.kq();if(ot=z.width,rt=z.height,b?(ot=tt.width,rt=tt.height):E||(ot+=lt,rt+=lt),(z=y instanceof Kd)&&x.xe&&(x.type===Nf||x.yk===ot&&x.ft===rt))var ut=x.xe;else{var gt=0,St=0,wt=0,Et=0,Nt=0,Ut=0;if(Ut=Nt=0,b?(Nt=tt.x,Ut=tt.y):E||(Nt-=lt/2,Ut-=lt/2),gt=x.start.x*ot+x.start.offsetX,St=x.start.y*rt+x.start.offsetY,wt=x.end.x*ot+x.end.offsetX,Et=x.end.y*rt+x.end.offsetY,gt+=Nt,wt+=Nt,St+=Ut,Et+=Ut,x.type===$u)ut=y.createLinearGradient(gt,St,wt,Et);else if(x.type===dl)Ut=isNaN(x.endRadius)?Math.max(ot,rt)/2:x.endRadius,isNaN(x.startRadius)?(Nt=0,Ut=Math.max(ot,rt)/2):Nt=x.startRadius,ut=y.createRadialGradient(gt,St,Nt,wt,Et,Ut);else if(x.type===Nf)try{ut=y.createPattern(x.pattern,"repeat")}catch(ee){ut=null}if(x.type!==Nf&&(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===Nf&&x.yk!==-1)){x.yk=-1;var jt=a.diagram;jt!==null&&x.yk===-1&&Bn(function(){jt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}bt.rg=function(a){if(a instanceof Cn)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},bt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},bt.If=function(){for(var a=this instanceof Cn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ss(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Pl(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)}Pl(a,!1),ul(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,ul(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,ul(a,!1)))}bt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Wt.alloc();z.yi(y,x,E,b,wo),a.rotate(this.Kb,z.x,z.y),Wt.free(z)}},bt.v=function(a){if(!Xa(this)){a===void 0&&(a=!1),Xr(this,!0),Cu(this,!0);var y=this.panel;y===null||a||y.v()}},bt.Uj=function(){Xa(this)||(Xr(this,!0),Cu(this,!0))};function ea(a){if(!na(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Rn&&a.Bd(),y.$b())),Cu(a,!0)}}bt.Uk=function(){!(this.l&2048)&&(Pl(this,!0),ul(this,!0))},bt.Wu=function(){ul(this,!0)},bt.N=function(){var a=this.part;a!==null&&a.N()};function ya(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Cn.Table?Ul(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Cn.Auto&&E.Pb()===a?vs(a,wn,y):x===Mi?E!==null?E.type===Cn.Spot&&E.Pb()===a?vs(a,wn,y):(x=E.defaultStretch,x===Mi?vs(a,yn,y):vs(a,x,y)):vs(a,yn,y):vs(a,x,y)}function Ul(a,y,x,E){var b=a.stretch;if(b!==Mi)return vs(a,b,E);var z=b=null;switch(y.stretch){case mi:z=!0;break;case wn:z=!0}switch(x.stretch){case ti:b=!0;break;case wn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===ti||y===wn),z===null&&(z=y===mi||y===wn),b===!0&&z===!0?vs(a,wn,E):b===!0?vs(a,ti,E):z===!0?vs(a,mi,E):vs(a,yn,E)}function vs(a,y,x){if(x)return y;if(y===yn||(x=a.desiredSize,x.w()))return yn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===ti)return yn;if(y===wn)return mi}else{if(y===mi)return yn;if(y===wn)return ti}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===mi)return yn;if(y===wn)return ti}else{if(y===ti)return yn;if(y===wn)return mi}return y}function Dl(a,y){a.l=y?a.l|512:a.l&-513}function Es(a){return(a.l&1024)!==0}function kc(a,y){a.l=y?a.l|1024:a.l&-1025}function Pl(a,y){a.l=y?a.l|2048:a.l&-2049}function ul(a,y){a.l=y?a.l|4096:a.l&-4097}function Xa(a){return(a.l&8192)!==0}function Xr(a,y){a.l=y?a.l|8192:a.l&-8193}function na(a){return(a.l&16384)!==0}function Cu(a,y){a.l=y?a.l|16384:a.l&-16385}bt.Gj=function(){this.svg=null},bt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},bt.Av=function(){},bt.zv=function(a){return this.pa=a,ea(this),!0},bt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},bt.kq=function(){return 0};function Ud(a){var y=a.part;if(y instanceof Rn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function $y(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Cn?a instanceof Rn?a.Bd():a.qm(a,function(x){Ud(x)}):Ud(a))}bt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Gr(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&c1(a)&&xe("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new pn),this.localBindings.add(b),this},bt.set=function(a){return Object.assign(this,a),this},bt.Du=function(a){return nv(this,a),this},bt.apply=function(a){return a(this),this},bt.nm=function(a){return jd(this,a),this},bt.pz=function(){return this.ih()},bt.ih=function(){for(var a=this instanceof Cn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},bt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Yn),this.animationTriggers.add(a.propertyName,a),this};function hl(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=Ef.I(a);typeof z=="function"?(x=hi(arguments),E=z(x),_e(E)||xe('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Yt.go[a]}if(E===null&&(b!=null&&b.constructor||xe("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 ze&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(yg(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?xe("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 Qo)a.text=y;else if(a instanceof Ai)a.figure=y;else if(a instanceof xa)a.source=y;else if(a instanceof Cn)y=Il.I(y),y!==null&&(a.type=y);else if(a instanceof Io){var x=Wn(Io,y);x!==null?a.type=x:xe("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof hn?(y=Wn(hn,y),y!==null&&(a.type=y)):a instanceof si&&(y=Wn(si,y),y!==null&&(a.type=y));else if(y instanceof Pe)a instanceof Cn||xe("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Jr){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 Jr?Fm(E,y):xe("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Oe)typeof a.qb=="function"&&a.qb(y);else if(y instanceof es)a.type=y;else if(y instanceof Gr)a instanceof Pe||a instanceof Jr?a.bind(y):xe("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Tl)a instanceof Pe?a.Jv(y):xe("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof tr)a instanceof hn&&a.type===hn.o?a.figures.add(y):xe("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof si)a instanceof tr?a.segments.add(y):xe("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof mr)a instanceof ze||a instanceof bi?a.layout=y:xe("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 Io){x=new di;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);jd(a,x)}else if(a instanceof Jr){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&xe("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)&&xe("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new di;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);jd(a,b)}else jd(a,y);else xe('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Ph(a,y){Ef.add(a,y)}function hm(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}re.Object.defineProperties(Pe.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Ac),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 Ac),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 Ac),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(zi(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&&(zi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ra},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new rd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ra&&(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 rd),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 rd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Fo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new rd),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Mi},set:function(a){var y=this.stretch;y!==a&&(zi(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&&(zi(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)&&Mn(a,"0 <= value <= 1",Pe,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Qd(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(Qd(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(),$y(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&&Oc(a,"GraphObject.areaBackground"),a instanceof Io&&a.freeze(),zi(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&&Oc(a,"GraphObject.background"),a instanceof Io&&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 ai)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 Wt(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&&xe("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,$y(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 Ai&&this.qc(),this.g("desiredSize",E,a),Es(this)&&(a=this.part,a!==null&&(ur(this,a,"width"),ur(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 Nn(a,this.jd.height).freeze(),this.v(),this instanceof Ai&&this.qc(),this.g("desiredSize",y,a),Es(this)&&(a=this.part,a!==null&&ur(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 Nn(this.jd.width,a).freeze(),this.v(),this instanceof Ai&&this.qc(),this.g("desiredSize",y,a),Es(this)&&(a=this.part,a!==null&&ur(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Ro},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(),zi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ts},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(),zi(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 ci(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&&Ss(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ss(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(zi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:yn},set:function(a){this.reshapingBehavior!==a&&(zi(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()&&xe("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),ea(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Mn(a,">= 0",Pe,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Mn(a,">= 1",Pe,"columnSpan"),zi(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Mn(a,">= 0",Pe,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Mn(a,">= 1",Pe,"rowSpan"),zi(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&&(zi(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 Rn||xe("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,U1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:kr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Ud(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",Pe,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Ud(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),Ud(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&Mn(a,">= 0",Pe,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:kr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Ud(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",Pe,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Ud(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),Ud(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&Mn(a,">= 0",Pe,"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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(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&&(zi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Pe.prototype.trigger=Pe.prototype.Jv,Pe.prototype.findBindingPanel=Pe.prototype.ih,Pe.prototype.findTemplateBinder=Pe.prototype.pz,Pe.prototype.setProperties=Pe.prototype.nm,Pe.prototype.apply=Pe.prototype.apply,Pe.prototype.attach=Pe.prototype.Du,Pe.prototype.set=Pe.prototype.set,Pe.prototype.isEnabledObject=Pe.prototype.If,Pe.prototype.isVisibleObject=Pe.prototype.Ed,Pe.prototype.isContainedBy=Pe.prototype.rg,Pe.prototype.getNearestIntersectionPoint=Pe.prototype.rs,Pe.prototype.getLocalPoint=Pe.prototype.qs,Pe.prototype.getDocumentScale=Pe.prototype.Df,Pe.prototype.getDocumentAngle=Pe.prototype.li,Pe.prototype.getDocumentBounds=Pe.prototype.mi,Pe.prototype.getDocumentPoint=Pe.prototype.ga,Pe.prototype.intersectsRect=Pe.prototype.Yc,Pe.prototype.containedInRect=Pe.prototype.fh,Pe.prototype.containsRect=Pe.prototype.Re,Pe.prototype.containsPoint=Pe.prototype.ca,Pe.prototype.raiseChanged=Pe.prototype.g,Pe.prototype.raiseChangedEvent=Pe.prototype.cb,Pe.prototype.addCopyProperty=Pe.prototype.Vw;var Ef=null;Pe.className="GraphObject",Ef=new Yn,Ph("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=hl(Cn,Cn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Cn){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"},hl(Ai,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Qn(0,0,2.76142374915397,2.761423749153969),spot2:new Qn(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 Cn&&(x=E.fb("ButtonBorder"),x instanceof Ai)){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 Cn&&(x=E.fb("ButtonBorder"),x instanceof Ai&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Cn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Ai){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 Cn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Ai){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 Cn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Ai){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 Cn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Ai))){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}),Ph("TreeExpanderButton",function(){var a=hl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},hl(Ai,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:pr},new Gr("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Gr("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Eo&&(x=x.adornedPart),x instanceof Rn){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}),Ph("SubGraphExpanderButton",function(){var a=hl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},hl(Ai,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:pr},new Gr("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 Eo&&(x=x.adornedPart),x instanceof bi){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}),Ph("ToolTip",function(){return hl(Eo,Cn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Wt(0,3),shadowBlur:5},hl(Ai,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Qn(0,0,4,6),spot2:new Qn(1,1,-4,-4)}))}),Ph("ContextMenu",function(){return hl(Eo,Cn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Wt(0,3),shadowBlur:5},new Gr("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ph("ContextMenuButton",function(){var a=hl("Button");a.stretch=ti;var y=a.fb("ButtonBorder");return y instanceof Ai&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Qn(0,0,2,3),y.spot2=new Qn(1,1,-2,-2)),a}),Ph("PanelExpanderButton",function(a){var y=hm(a,"COLLAPSIBLE"),x=hl("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},hl(Ai,{name:"ButtonIcon",strokeWidth:2},new Gr("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Ai&&(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}),Ph("CheckBoxButton",function(a){var y=hm(a);return a=hl("Button",{desiredSize:new Nn(14,14)},hl(Ai,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:wn,geometryStretch:Xn,visible:!1},y!==""?new Gr("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Cn){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}),Ph("CheckBox",function(a){a=hm(a),a=hl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ci(0,1,0,0)});var y=hl(Cn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new ci(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}),Pe.None=yn=new Oe(Pe,"None",0),Pe.Default=Mi=new Oe(Pe,"Default",0),Pe.Vertical=mi=new Oe(Pe,"Vertical",4),Pe.Horizontal=ti=new Oe(Pe,"Horizontal",5),Pe.Fill=wn=new Oe(Pe,"Fill",3),Pe.Uniform=Xn=new Oe(Pe,"Uniform",1),Pe.UniformToFill=ro=new Oe(Pe,"UniformToFill",2),Pe.FlipVertical=Zi=new Oe(Pe,"FlipVertical",1),Pe.FlipHorizontal=ho=new Oe(Pe,"FlipHorizontal",2),Pe.FlipBoth=Zo=new Oe(Pe,"FlipBoth",3),Pe.make=hl,Pe.getBuilders=function(){var a=new Yn,y;for(y in Ef)if(y!==y.toLowerCase()){var x=Ef.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Pe.defineBuilder=Ph,Pe.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Ef.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Pe))return y&&E.set(y),E;xe('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Pe.takeBuilderArgument=hm;function Ac(){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=Ro,this.o=ts,this.hg=Mi,this.ob=this.Bi=1,this.Pf=yn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Ac.prototype.copy=function(){var a=new Ac;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 rd(){this.u=-1/0,this.o=0,this.F=Fo,this.rr=ra,this.j=this.V="None"}rd.prototype.copy=function(){var a=new rd;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},rd.className="LinkElementSettings";function Wg(){this.yj=this.Xi=Ge,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Wg.prototype.copy=function(){var a=new Wg;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},Wg.className="LinkSettings";function $d(){this.ha=[1,0,0,1,0,0]}$d.prototype.copy=function(){var a=new $d;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},$d.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},$d.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},$d.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)}},$d.className="STransform";function Tc(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Tc.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Tc.className="SGradient";function du(a,y,x){this.ownerDocument=a=y===void 0?Yt.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Ra(this,x)}du.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},du.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),_e(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},du.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},du.prototype.focus=function(){this.Oa.focus()},du.prototype.mx=function(){this.ownerDocument=null},re.Object.defineProperties(du.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}}}),du.className="SVGSurface";function Ra(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 $d,this.j=dm(this),this.Nj=dm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Dr++,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 Ky(a,y,x,E,b,z,tt){a.Nj===void 0?Zg(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}bt=Ra.prototype,bt.arc=function(a,y,x,E,b,z,tt,ot){var rt=2*Math.PI,lt=rt-1e-6,ut=x*Math.cos(E),gt=x*Math.sin(E),St=a+ut,wt=y+gt,Et=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-St)||1e-6<Math.abs(ot-wt))&&this.path.push(["L",St,+wt]),0>E&&(E=E%rt+rt),E>lt?(this.path.push(["A",x,x,0,1,Et,a-ut,y-gt]),this.path.push(["A",x,x,0,1,Et,St,wt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Et,a+x*Math.cos(b),y+x*Math.sin(b)])},bt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},bt.Se=function(a){this.addPath(this.path,this.rb,a||0)},bt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},bt.clearRect=function(){},bt.clip=function(){this.Yl.clipPath=!0},bt.closePath=function(){this.path.push(["z"])},bt.createLinearGradient=function(a,y,x,E){var b=new Tc("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},bt.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"+Dr++,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(Zd,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},bt.createRadialGradient=function(a,y,x,E,b,z){var tt=new Tc("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function Yy(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)}bt.drawImage=function(a,y,x,E,b,z,tt,ot,rt){var lt="";a instanceof HTMLCanvasElement&&(lt=a.toDataURL()),a instanceof HTMLImageElement&&(lt=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,ot=E=ut,rt=b=a),E=E||0,b=b||0,ot=ot||0,rt=rt||0,Yy(this,y,x,E,b,z||0,tt||0,ot,rt),z={x:0,y:0,width:ut||E,height:a||b,href:lt},me.$(E,ot)&&me.$(b,rt)?lt.toLowerCase().indexOf(".svg")===-1&&lt.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),bf(this,Zd,z,this.rb),this.addElement(Zd,z)},bt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},bt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},bt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},bf(this,"fill",a,this.rb),this.addElement("rect",a)},bt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},bf(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},bt.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},bf(this,"fill",y,this.rb),this.addElement("text",y,a[0])},bt.lineTo=function(a,y){this.path.push(["L",a,y])},bt.moveTo=function(a,y){this.path.push(["M",a,y])},bt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},bt.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"])},bt.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},bt.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())},bt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Zg(this,a,y,x,E,b,z)};function Xy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}bt.scale=function(a,y){this.rb.scale(a,y)},bt.translate=function(a,y){this.rb.translate(a,y)},bt.transform=function(){},bt.yc=function(){},bt.stroke=function(){Qy(this,this.Yl)},bt.jk=function(){this.clipInsteadOfFill||this.stroke()},bt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},bt.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 bf(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 Tc?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 Jy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Tc?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 Tc)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"+Dr++,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(lt,ut){return lt.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}bt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=hi(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,bf(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 Zg(a,y,x,E,b,z,tt){var ot=new $d;ot.ha=[y,x,E,b,z,tt],y={},bf(a,"g",y,ot),ot=a.addElement("g",y),a.nh.push(ot)}function dm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}bt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Eu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Vu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}bt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},bt.fs=function(){this.Ct=!1},bt.Vc=function(){},bt.Wx=function(){},Ra.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ra.prototype.getImageData=function(){return null},Ra.prototype.measureText=function(){return null};function cm(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()))}Ra.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ra.className="SVGContext",ze.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new du(this,Yt.document));var y=new du(this,Yt.document,!0);a===void 0&&(a=new di);var x=this;return Mc(this,function(E,b){return E=sm(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},ze.prototype.makeSvg=ze.prototype.Cs,ze.prototype.av=function(a){return this.Cs(a)},ze.prototype.makeSVG=ze.prototype.av;function wl(a,y,x,E){this.ownerDocument=y=y===void 0?Yt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Kd(y,x,E),y.H=a}wl.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},wl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},wl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},wl.prototype.focus=function(){this.Oa.focus()},wl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},re.Object.defineProperties(wl.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),wl.className="CanvasSurface";function Kd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&xe("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 fi,this.isTemporary=!!x}bt=Kd.prototype,bt.Wx=function(a){this.Z.imageSmoothingEnabled=a},bt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},bt.beginPath=function(){this.Z.beginPath()},bt.Se=function(){},bt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},bt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},bt.clip=function(){this.Z.clip()},bt.closePath=function(){this.Z.closePath()},bt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},bt.createPattern=function(a,y){return this.Z.createPattern(a,y)},bt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},bt.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)},bt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},bt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},bt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},bt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},bt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},bt.lineTo=function(a,y){this.Z.lineTo(a,y)},bt.measureText=function(a){return this.Z.measureText(a)},bt.moveTo=function(a,y){this.Z.moveTo(a,y)},bt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},bt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},bt.restore=function(){this.Z.restore()},bt.save=function(){this.yc(),this.Z.save()},Kd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},bt=Kd.prototype,bt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},bt.scale=function(a,y){this.El.scale(a,y)},bt.translate=function(a,y){this.El.translate(a,y)},bt.stroke=function(){this.Z.stroke()},bt.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}},bt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},bt.ng=function(a,y){if(a instanceof Io&&a.type===dl){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)},bt.jk=function(){this.Hm||this.stroke()},bt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},bt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},bt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},bt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},bt.Hs=function(){},re.Object.defineProperties(Kd.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mx=Object.freeze([]);Kd.className="CanvasSurfaceContext";function Vg(){this.F=this.o=this.u=this.j=0}Vg.className="ColorNumbers";function Io(a,y){Bf||(hv(),Bf=!0),po(this),this._isFrozen=!1,a===void 0?(this.na=wh,this.xk="black"):typeof a=="string"?(this.na=wh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===$u?(this.Qd=Ta,this.Lk=fa):this.Lk=a===dl?this.Qd=wo:this.Qd=kr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Io.prototype.copy=function(){var a=new Io;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},bt=Io.prototype,bt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},bt.ka=function(){return Object.isFrozen(this)&&xe("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},bt.qb=function(a){a.classType===Io&&(this.type=a)},bt.toString=function(){var a="Brush(";if(this.type===wh)a+=this.color;else if(a=this.type===$u?a+"Linear ":this.type===dl?a+"Radial ":this.type===Nf?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+")"},bt.addColorStop=function(a,y){return this._isFrozen&&an(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Mn(a,"0 <= loc <= 1",Io,"addColorStop:loc"),this.we===null&&(this.we=new Yn),this.we.add(a,y),this.na===wh&&(this.type=$u),this.xe=null,this},bt.Vz=function(a,y){if(this._isFrozen&&an(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?kf:y,this.type===wh)Uu(this.color),this.color=Lf(a,y);else if((this.type===$u||this.type===dl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Uu(x.value),this.addColorStop(x.key,Lf(a,y));return this};function qy(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?kf:x,Uu(a),Lf(y,x)}bt.Wy=function(a,y){if(this._isFrozen&&an(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?kf:y,this.type===wh)Uu(this.color),this.color=Lf(-a,y);else if((this.type===$u||this.type===dl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Uu(x.value),this.addColorStop(x.key,Lf(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?kf:x,Uu(a),Lf(-y,x)}function rv(a,y,x){Uu(a),a=nr.j;var E=nr.u,b=nr.o,z=nr.F;return Uu(y),x===void 0&&(x=.5),"rgba("+Math.round((nr.j-a)*x+a)+", "+Math.round((nr.u-E)*x+E)+", "+Math.round((nr.o-b)*x+b)+", "+Math.round((nr.F-z)*x+z)+")"}bt.Gx=function(){if(this.type===wh)return Mf(this.color);if((this.type===$u||this.type===dl)&&this.colorStops!==null){var a=this.colorStops;if(this.type===dl)return Mf(a.first().value);if(a.get(.5)!==null)return Mf(a.get(.5));if(a.count===2)return a=a.Fa(),Mf(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,Mf(rv(a.get(x),a.get(E),1-z/b))}return!1};function Mf(a){return a?a instanceof Io?a.Gx():(Uu(a),128>(299*nr.j+587*nr.u+114*nr.o)/1e3):!1}function Lf(a,y){switch(y){case kf:y=100*av(nr.j);var x=100*av(nr.u),E=100*av(nr.o);return ia.j=.4124564*y+.3575761*x+.1804375*E,ia.u=.2126729*y+.7151522*x+.072175*E,ia.o=.0193339*y+.119192*x+.9503041*E,ia.F=nr.F,y=uv(ia.j/Ff[0]),x=uv(ia.u/Ff[1]),E=uv(ia.o/Ff[2]),bu.j=116*x-16,bu.u=500*(y-x),bu.o=200*(x-E),bu.F=ia.F,bu.j=Math.min(100,Math.max(0,bu.j+100*a)),a=(bu.j+16)/116,y=a-bu.o/200,ia.j=Ff[0]*e1(bu.u/500+a),ia.u=Ff[1]*(bu.j>fm*dv?Math.pow(a,3):bu.j/fm),ia.o=Ff[2]*e1(y),ia.F=bu.F,a=-.969266*ia.j+1.8760108*ia.u+.041556*ia.o,y=.0556434*ia.j+-.2040259*ia.u+1.0572252*ia.o,nr.j=255*lv((3.2404542*ia.j+-1.5371385*ia.u+-.4985314*ia.o)/100),nr.u=255*lv(a/100),nr.o=255*lv(y/100),nr.F=ia.F,nr.j=Math.round(nr.j),255<nr.j?nr.j=255:0>nr.j&&(nr.j=0),nr.u=Math.round(nr.u),255<nr.u?nr.u=255:0>nr.u&&(nr.u=0),nr.o=Math.round(nr.o),255<nr.o?nr.o=255:0>nr.o&&(nr.o=0),"rgba("+nr.j+", "+nr.u+", "+nr.o+", "+nr.F+")";case n1:return sv(),Ja.o=Math.min(100,Math.max(0,Ja.o+100*a)),"hsla("+Ja.j+", "+Ja.u+"%, "+Ja.o+"%, "+Ja.F+")";default:xe("Unknown color space: "+y)}}function Uu(a){Bf||(hv(),Bf=!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,nr.j=a[0],nr.u=a[1],nr.o=a[2],nr.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,nr.j=0,nr.u=0,nr.o=0,nr.F=1)}}function sv(){var a=nr.j/255,y=nr.u/255,x=nr.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))}Ja.j=Math.round(tt),Ja.u=Math.round(100*a),Ja.o=Math.round(100*b),Ja.F=nr.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):(fm*a+16)/116}function e1(a){var y=a*a*a;return y>dv?y:(116*a-16)/fm}function Oc(a,y){typeof a!="string"&&(a instanceof Io||xe("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=Lr?new wl(null,void 0,{willReadFrequently:!0}).context:null}re.Object.defineProperties(Io.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&an(this,a),this.na=a,this.start.Mc()&&(a===$u?this.start=Ta:a===dl&&(this.start=wo)),this.end.Mc()&&(a===$u?this.end=fa:a===dl&&(this.end=wo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&an(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&an(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&an(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&an(this,a),0>a&&Mn(a,">= zero",Io,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&an(this,a),0>a&&Mn(a,">= zero",Io,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&an(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&an(this,a),this.cr=a,this.xe=null}}}),Io.prototype.isDark=Io.prototype.Gx,Io.prototype.darkenBy=Io.prototype.Wy,Io.prototype.lightenBy=Io.prototype.Vz,Io.prototype.addColorStop=Io.prototype.addColorStop;var dv=216/24389,fm=24389/27,Ff=[95.047,100,108.883],cv=null,nr=new Vg,Ja=new Vg,ia=new Vg,bu=new Vg,Bf=!1;Io.className="Brush";var wh;Io.Solid=wh=new Oe(Io,"Solid",0);var $u;Io.Linear=$u=new Oe(Io,"Linear",1);var dl;Io.Radial=dl=new Oe(Io,"Radial",2);var Nf;Io.Pattern=Nf=new Oe(Io,"Pattern",4);var kf;Io.Lab=kf=new Oe(Io,"Lab",5);var n1;Io.HSL=n1=new Oe(Io,"HSL",6),Io.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},Io.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Bf||(hv(),Bf=!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)},Io.lighten=function(a){return qy(a)},Io.lightenBy=qy,Io.darken=function(a){return t1(a)},Io.darkenBy=t1,Io.mix=rv,Io.isDark=Mf;function es(){this.xa="Base"}es.prototype.measure=function(){},es.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},es.prototype.arrange=function(){},es.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},es.prototype.iA=function(a){a.Uj()},es.prototype.gc=function(){},re.Object.defineProperties(es.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Cn}}}),es.prototype.remeasureObject=es.prototype.iA,es.prototype.arrangeElement=es.prototype.Ly,es.prototype.measureElement=es.prototype.Yz,es.className="PanelLayout";function gm(){this.xa="Base"}Le(gm,es),gm.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length;a=Ku(a);for(var rt=0;rt<ot;rt++){var lt=E[rt];if(lt.visible||lt===a){var ut=lt.margin,gt=ut.right+ut.left;ut=ut.top+ut.bottom,lt.measure(y,x,z,tt);var St=lt.measuredBounds;gt=Math.max(St.width+gt,0),ut=Math.max(St.height+ut,0),St=lt.position.x;var wt=lt.position.y;isFinite(St)||(St=0),isFinite(wt)||(wt=0),lt instanceof Ai&&lt.isGeometryPositioned&&(lt=lt.strokeWidth/2,St-=lt,wt-=lt),Mr(b,St,wt,gt,ut)}}},gm.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,lt=z.position.y;if(rt=isNaN(rt)?-a:rt-a,lt=isNaN(lt)?-x:lt-x,z instanceof Ai&&z.isGeometryPositioned){var ut=z.strokeWidth/2;rt-=ut,lt-=ut}z.visible&&z.arrange(rt+ot.left,lt+ot.top,tt.width,tt.height)}};function pm(){this.xa="Base"}Le(pm,es),pm.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length;y=Kn(),z=Ku(a);for(var rt=0;rt<ot;rt++){var lt=E[rt];if(lt.visible||lt===z){var ut=ya(lt,!1);if(ut!==yn&&ut!==ti)y.push(lt);else{lt.measure(1/0,x,0,tt),ut=lt.margin,lt=lt.measuredBounds;var gt=Math.max(lt.height+ut.top+ut.bottom,0);b.width+=Math.max(lt.width+ut.right+ut.left,0),b.height=Math.max(b.height,gt)}}}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));oi(y)},pm.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 lt=z,ut=y[rt];if(ut.visible){var gt=ut.measuredBounds,St=ut.margin,wt=St.top+St.bottom,Et=z+b.bottom,Nt=gt.height,Ut=ya(ut,!1);(isNaN(ut.desiredSize.height)&&Ut===wn||Ut===mi)&&(Nt=Math.max(x.height-wt-Et,0)),wt=Nt+wt+Et,Et=ut.alignment,Et.Xb()&&(Et=a.defaultAlignment),Et.sb()||(Et=wo),tt&&(ot-=gt.width+St.left+St.right),ut.arrange(ot+Et.offsetX+St.left,lt+Et.offsetY+St.top+(x.height*Et.y-wt*Et.y),gt.width,Nt),tt||(ot+=gt.width+St.left+St.right)}}};function mm(){this.xa="Base"}Le(mm,es),mm.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=Kn();for(var ot=Ku(a),rt=0;rt<tt;rt++){var lt=E[rt];if(lt.visible||lt===ot){var ut=ya(lt,!1);if(ut!==yn&&ut!==mi)x.push(lt);else{var gt=lt.margin;ut=gt.right+gt.left,gt=gt.top+gt.bottom,lt.measure(y,1/0,z,0),lt=lt.measuredBounds,ds(b,Math.max(b.width,Math.max(lt.width+ut,0)),b.height+Math.max(lt.height+gt,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)&&(lt=rt.margin,tt=lt.right+lt.left,lt=lt.top+lt.bottom,rt.measure(y,1/0,z,0),rt=rt.measuredBounds,lt=Math.max(rt.height+lt,0),b.width=Math.max(b.width,Math.max(rt.width+tt,0)),b.height+=lt);oi(x)}},mm.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 lt=z,ut=y[rt];if(ut.visible){var gt=ut.measuredBounds,St=ut.margin,wt=St.left+St.right,Et=z+b.right,Nt=gt.width,Ut=ya(ut,!1);(isNaN(ut.desiredSize.width)&&Ut===wn||Ut===ti)&&(Nt=Math.max(x.width-wt-Et,0)),wt=Nt+wt+Et,Et=ut.alignment,Et.Xb()&&(Et=a.defaultAlignment),Et.sb()||(Et=wo),tt&&(ot-=gt.height+St.bottom+St.top),ut.arrange(lt+Et.offsetX+St.left+(x.width*Et.x-wt*Et.x),ot+Et.offsetY+St.top,Nt,gt.height),tt||(ot+=gt.height+St.bottom+St.top)}}};function vm(){this.xa="Base"}Le(vm,es),vm.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length,rt=a.Pb(),lt=rt.margin,ut=lt.right+lt.left,gt=lt.top+lt.bottom;rt.measure(y,x,z,tt);var St=rt.measuredBounds;z=St.width,tt=St.height;var wt=Math.max(z+ut,0),Et=Math.max(tt+gt,0),Nt=a.isClipping,Ut=on.allocAt(-lt.left,-lt.top,wt,Et),jt=on.allocAt(0,0,z,tt);fv(rt,jt,!0),z=jt.width,tt=jt.height;for(var ee=!0,oe=Ku(a),ae=0;ae<ot;ae++){var Se=E[ae];St=y;var je=x;if(Se!==rt&&(Se.visible||Se===oe)){lt=Se.margin;var Dn=lt.left,Un=lt.top;switch(wt=lt.right+lt.left,Et=lt.top+lt.bottom,lt=ya(Se,!1),lt){case wn:St=z,je=tt,Un=Dn=Et=wt=0;break;case ti:St=z,Dn=wt=0;break;case mi:je=tt,Un=Et=0}Se.measure(St,je,0,0),St=Se.measuredBounds,wt=Math.max(St.width+wt,0),Et=Math.max(St.height+Et,0),lt=Se.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=wo);var _n=Se.alignmentFocus;if(_n.Xb()&&(_n=wo),je=null,Se instanceof Cn&&Se.$e!==""&&(je=Se.fb(Se.$e),je===Se&&(je=null)),Dn=jt.x-Dn,Un=jt.y-Un,je!==null){for(Se.arrange(0,0,St.width,St.height),St=je.actualBounds,St=Wt.allocAt(St.x+(_n.x*St.width-_n.offsetX),St.y+(_n.y*St.height-_n.offsetY)),je=je.panel;je!==Se;)je.transform.Ga(St),je=je.panel;Dn+=lt.x*z+lt.offsetX-St.x,Un+=lt.y*tt+lt.offsetY-St.y,Wt.free(St)}else Dn+=lt.x*z+lt.offsetX-(_n.x*St.width+_n.offsetX),Un+=lt.y*tt+lt.offsetY-(_n.y*St.height+_n.offsetY);ee?(ee=!1,b.h(Dn,Un,wt,Et)):Mr(b,Dn,Un,wt,Et)}}switch(ee?b.assign(Ut):Nt?b.Uu(jt.x,jt.y,jt.width,jt.height):Mr(b,Ut.x,Ut.y,Ut.width,Ut.height),on.free(Ut),on.free(jt),lt=rt.stretch,lt===Mi&&(lt=ya(rt,!1)),lt){case yn:return;case wn:if(!isFinite(y)&&!isFinite(x))return;break;case ti:if(!isFinite(y))return;break;case mi:if(!isFinite(x))return}for(St=rt.measuredBounds,z=St.width,tt=St.height,wt=Math.max(z+ut,0),Et=Math.max(tt+gt,0),lt=rt.margin,jt=on.allocAt(-lt.left,-lt.top,wt,Et),fv(rt,jt,!0),z=jt.width,tt=jt.height,y=0;y<ot;y++)x=E[y],x===rt||!x.visible&&x!==oe||(lt=x.margin,wt=lt.right+lt.left,Et=lt.top+lt.bottom,St=x.measuredBounds,wt=Math.max(St.width+wt,0),Et=Math.max(St.height+Et,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=wo),x=x.alignmentFocus,x.Xb()&&(x=wo),ee?(ee=!1,b.h(ut.x*z+ut.offsetX-(x.x*St.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*St.height+x.offsetY)-lt.top,wt,Et)):Mr(b,ut.x*z+ut.offsetX-(x.x*St.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*St.height+x.offsetY)-lt.top,wt,Et));ee?b.assign(Ut):Nt?b.Uu(jt.x,jt.y,jt.width,jt.height):Mr(b,Ut.x,Ut.y,Ut.width,Ut.height),on.free(jt)},vm.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 lt=z-x.x,ut=rt-x.y;for(b.arrange(lt,ut,tt,ot),tt=on.allocAt(0,0,tt,ot),fv(b,tt,!1),ot=0;ot<E;ot++){var gt=y[ot];if(gt!==b){lt=gt.measuredBounds;var St=lt.width,wt=lt.height;ut=gt.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=wo);var Et=gt.alignmentFocus;if(Et.Xb()&&(Et=wo),lt=null,gt instanceof Cn&&gt.$e!==""&&(lt=gt.fb(gt.$e),lt===gt&&(lt=null)),lt!==null){var Nt=lt.actualBounds;for(Et=Wt.allocAt(Nt.x+(Et.x*Nt.width-Et.offsetX),Nt.y+(Et.y*Nt.height-Et.offsetY)),lt=lt.panel;lt!==gt;)lt.transform.Ga(Et),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-Et.x,ut=ut.y*tt.height+ut.offsetY-Et.y,Wt.free(Et)}else lt=ut.x*tt.width+ut.offsetX-(Et.x*St+Et.offsetX),ut=ut.y*tt.height+ut.offsetY-(Et.y*wt+Et.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,gt.visible&&gt.arrange(z+lt,rt+ut,St,wt)}}on.free(tt)};function fv(a,y,x){var E=null;if(a instanceof Cn&&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 ym(){this.xa="Base"}Le(ym,es),ym.prototype.measure=function(a,y,x,E,b,z,tt){var ot=E.length,rt=a.Pb(),lt=rt.margin,ut=y,gt=x,St=lt.right+lt.left,wt=lt.top+lt.bottom;rt.measure(y,x,z,tt),lt=rt.measuredBounds;var Et=0,Nt=null;rt instanceof Ai&&(Nt=rt,Et=Nt.strokeWidth*Nt.scale);var Ut=Math.max(lt.width+St,0);lt=Math.max(lt.height+wt,0);var jt=vv(rt),ee=jt.x*Ut+jt.offsetX;jt=jt.y*lt+jt.offsetY;var oe=yv(rt),ae=oe.x*Ut+oe.offsetX;for(oe=oe.y*lt+oe.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(ee-ae)-Et,0)),isFinite(x)&&(gt=Math.max(Math.abs(jt-oe)-Et,0)),Et=Nn.alloc(),Et.h(0,0),a=Ku(a),oe=0;oe<ot;oe++)jt=E[oe],jt===rt||!jt.visible&&jt!==a||(lt=jt.margin,Ut=lt.right+lt.left,ee=lt.top+lt.bottom,jt.measure(ut,gt,0,0),lt=jt.measuredBounds,Ut=Math.max(lt.width+Ut,0),lt=Math.max(lt.height+ee,0),Et.h(Math.max(Ut,Et.width),Math.max(lt,Et.height)));if(ot===1)b.width=Ut,b.height=lt,Nn.free(Et);else{switch(jt=vv(rt),oe=yv(rt),ot=E=0,oe.x!==jt.x&&oe.y!==jt.y&&(E=Et.width/Math.abs(oe.x-jt.x),ot=Et.height/Math.abs(oe.y-jt.y)),Nn.free(Et),Et=0,Nt!==null&&(Et=Nt.strokeWidth*Nt.scale,Ev(Nt)===Xn&&(E=ot=Math.max(E,ot))),E+=Math.abs(jt.offsetX)+Math.abs(oe.offsetX)+Et,ot+=Math.abs(jt.offsetY)+Math.abs(oe.offsetY)+Et,Nt=rt.stretch,Nt===Mi&&(Nt=ya(rt,!1)),Nt){case yn:tt=z=0;break;case wn:isFinite(y)&&(E=y),isFinite(x)&&(ot=x);break;case ti:isFinite(y)&&(E=y),tt=0;break;case mi:z=0,isFinite(x)&&(ot=x)}rt.Uj(),rt.measure(E,ot,z,tt),b.width=rt.measuredBounds.width+St,b.height=rt.measuredBounds.height+wt}},ym.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=on.alloc();z.h(0,0,1,1);var tt=E.margin,ot=tt.left;tt=tt.top;var rt=a.padding,lt=rt.left;rt=rt.top,E.arrange(lt+ot,rt+tt,b.width,b.height);var ut=vv(E),gt=yv(E),St=ut.y*b.height+ut.offsetY,wt=gt.x*b.width+gt.offsetX;for(gt=gt.y*b.height+gt.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=St,Mr(z,wt,gt,0,0),z.x+=ot+lt,z.y+=tt+rt,b=0;b<x;b++)ot=y[b],ot!==E&&(lt=ot.measuredBounds,tt=ot.margin,rt=Math.max(lt.width+tt.right+tt.left,0),ut=Math.max(lt.height+tt.top+tt.bottom,0),St=ot.alignment,St.Xb()&&(St=a.defaultAlignment),St.sb()||(St=wo),rt=z.width*St.x+St.offsetX-rt*St.x+tt.left+z.x,tt=z.height*St.y+St.offsetY-ut*St.y+tt.top+z.y,ot.visible&&(_o(z.x,z.y,z.width,z.height,rt,tt,lt.width,lt.height)?ot.arrange(rt,tt,lt.width,lt.height):ot.arrange(rt,tt,lt.width,lt.height,new on(z.x,z.y,z.width,z.height))));on.free(z)};function Sm(){this.xa="Base",this.name="Table"}Le(Sm,es),Sm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=Kn(),ot=Kn(),rt=0;rt<z;rt++){var lt=E[rt],ut=lt instanceof Cn?lt:null;if(ut!==null&&Ch(ut)&&lt.visible){ot.push(ut);for(var gt=ut.O.s,St=gt.length,wt=0;wt<St;wt++){var Et=gt[wt];ut.type===Cn.TableRow?Et.row=lt.row:ut.type===Cn.TableColumn&&(Et.column=lt.column),tt.push(Et)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Nt=[],Ut=0;Ut<z;Ut++){var jt=tt[Ut];jt.visible&&(Xr(jt,!0),Cu(jt,!0),Nt[jt.row]||(Nt[jt.row]=[]),Nt[jt.row][jt.column]||(Nt[jt.row][jt.column]=[]),Nt[jt.row][jt.column].push(jt))}oi(tt);var ee=Kn(),oe=Kn(),ae=Kn(),Se={count:0},je={count:0},Dn=y,Un=x,_n=a.rowDefs,bn=a.colDefs,dn=null;z=_n.length;for(var Ei=0;Ei<z;Ei++)dn=_n[Ei],dn!==void 0&&(dn.actual=0);z=bn.length;for(var Pi=0;Pi<z;Pi++)dn=bn[Pi],dn!==void 0&&(dn.actual=0);for(var No=Nt.length,Yo=0,ss=0;ss<No;ss++)Nt[ss]&&(Yo=Math.max(Yo,Nt[ss].length));var hs=Math.min(a.topIndex,No-1),Vs=Math.min(a.leftIndex,Yo-1),as=0;No=Nt.length;for(var Th=Ku(a),Wr=0;Wr<No;Wr++)if(Nt[Wr]){Yo=Nt[Wr].length;var Jl=a.Fb(Wr);Jl.actual=0;for(var Us=Jl.oc=0;Us<Yo;Us++)if(Nt[Wr][Us]){var Oh=a.Eb(Us);ee[Us]===void 0&&(Oh.actual=0,Oh.oc=0,ee[Us]=!0);for(var tl=Nt[Wr][Us],Ml=tl.length,_a=0;_a<Ml;_a++){var La=tl[_a];if(La.visible||La===Th){var Sd=1<La.rowSpan||1<La.columnSpan;Sd&&(Wr<hs||Us<Vs||oe.push(La));var Ql=La.margin,tg=Ql.right+Ql.left,Ha=Ql.top+Ql.bottom,$s=Ul(La,Jl,Oh,!1),Ap=La.desiredSize,Uc=!isNaN(Ap.height),gu=!isNaN(Ap.width)&&Uc;if(Sd||$s===yn||gu||Wr<hs||Us<Vs||(Se[Us]!==void 0||$s!==wn&&$s!==ti||(Se[Us]=-1,Se.count++),je[Wr]!==void 0||$s!==wn&&$s!==mi||(je[Wr]=-1,je.count++),ae.push(La)),La.measure(1/0,1/0,0,0),!(Wr<hs||Us<Vs)){var Fa=La.measuredBounds,ic=Math.max(Fa.width+tg,0),Ga=Math.max(Fa.height+Ha,0);if(La.rowSpan===1&&($s===yn||$s===ti)){dn=a.Fb(Wr);var xd=dn.Wc();as=Math.max(Ga-dn.actual,0),as+xd>Un&&(as=Math.max(Un-xd,0));var G0=dn.oa===0;dn.oc=dn.oc+as,dn.actual=dn.oa+as,Un=Math.max(Un-(as+(G0?xd:0)),0)}if(La.columnSpan===1&&($s===yn||$s===mi)){dn=a.Eb(Us);var Tp=dn.Wc();as=Math.max(ic-dn.actual,0),as+Tp>Dn&&(as=Math.max(Dn-Tp,0));var _y=dn.oa===0;dn.oc=dn.oc+as,dn.actual=dn.oa+as,Dn=Math.max(Dn-(as+(_y?Tp:0)),0)}Sd&&La.Uj()}}}}}oi(ee);var Ou=0,Ju=0;z=a.columnCount;for(var $c=0;$c<z;$c++){var Pd=bn[$c];Pd!==void 0&&(Ou+=isNaN(Pd.Hc)?Pd.oc:Pd.Hc,Pd.oc!==0&&(Ou+=Pd.Wc()))}z=a.rowCount;for(var eg=0;eg<z;eg++){var wd=_n[eg];wd!==void 0&&(Ju+=isNaN(wd.Hc)?wd.oc:wd.Hc,wd.oc!==0&&(Ju+=wd.Wc()))}Dn=Math.max(y-Ou,0);var Du=Un=Math.max(x-Ju,0),Dh=Dn;z=ae.length;for(var Ba=0;Ba<z;Ba++){var pu=ae[Ba],W0=a.Fb(pu.row),Qu=a.Eb(pu.column),ng=pu.measuredBounds,ql=pu.margin,oc=ql.right+ql.left,mu=ql.top+ql.bottom;Se[pu.column]=Qu.oc===0&&Se[pu.column]!==void 0?Math.max(ng.width+oc,Se[pu.column]):null,je[pu.row]=W0.oc===0&&je[pu.row]!==void 0?Math.max(ng.height+mu,je[pu.row]):null}var Kc=0,ig=0,Gl;for(Gl in je)Gl!=="count"&&(Kc+=je[Gl]);for(Gl in Se)Gl!=="count"&&(ig+=Se[Gl]);for(var Ps=Nn.alloc(),Op=0;Op<z;Op++){var ha=ae[Op];if(ha.visible||ha===Th){var Zr=a.Fb(ha.row),da=a.Eb(ha.column),qu=0;isFinite(da.width)?qu=da.width:(isFinite(Dn)&&Se[ha.column]!==null?ig===0?qu=da.actual+Dn:qu=Se[ha.column]/ig*Dh:Se[ha.column]!==null?qu=Dn:qu=da.actual||Dn,qu=Math.max(0,qu-da.Wc()));var Ih=0;switch(isFinite(Zr.height)?Ih=Zr.height:(isFinite(Un)&&je[ha.row]!==null?Kc===0?Ih=Zr.actual+Un:Ih=je[ha.row]/Kc*Du:je[ha.row]!==null?Ih=Un:Ih=Zr.actual||Un,Ih=Math.max(0,Ih-Zr.Wc())),Ps.h(Math.max(da.minimum,Math.min(qu,da.maximum)),Math.max(Zr.minimum,Math.min(Ih,Zr.maximum))),$s=Ul(ha,Zr,da,!1),$s){case ti:Ps.height=Math.max(Ps.height,Zr.actual+Un);break;case mi:Ps.width=Math.max(Ps.width,da.actual+Dn)}var rc=ha.margin,Hy=rc.right+rc.left,Z0=rc.top+rc.bottom;ha.Uj(),ha.measure(Ps.width,Ps.height,da.minimum,Zr.minimum);var og=ha.measuredBounds,sc=Math.max(og.width+Hy,0),Yc=Math.max(og.height+Z0,0);isFinite(Dn)&&(sc=Math.min(sc,Ps.width)),isFinite(Un)&&(Yc=Math.min(Yc,Ps.height));var Na=0;Na=Zr.actual,Zr.actual=Math.max(Zr.actual,Yc),Zr.oc=Math.max(Zr.oc,Yc),as=Zr.actual-Na,Un=Math.max(Un-as,0),je[ha.row]===null&&(Du=Math.max(Du-as,0)),Na=da.actual,da.actual=Math.max(da.actual,sc),da.oc=Math.max(da.oc,sc),as=da.actual-Na,Dn=Math.max(Dn-as,0),Se[ha.column]===null&&(Dh=Math.max(Dh-as,0))}}oi(ae);var th=Nn.alloc(),tu=Kn(),ml=Kn();if(z=oe.length,z!==0){for(var Cd=0;Cd<No;Cd++)if(Nt[Cd]){Yo=Nt[Cd].length;var rg=a.Fb(Cd);tu[Cd]=rg.actual;for(var Ed=0;Ed<Yo;Ed++)if(Nt[Cd][Ed]){var V0=a.Eb(Ed);ml[Ed]=V0.actual}}}for(var sg=0;sg<z;sg++){var Or=oe[sg];if(Or.visible||Or===Th){var Wl=a.Fb(Or.row),Ll=a.Eb(Or.column);switch(Ps.h(Math.max(Ll.minimum,Math.min(y,Ll.maximum)),Math.max(Wl.minimum,Math.min(x,Wl.maximum))),$s=Ul(Or,Wl,Ll,!1),$s){case wn:ml[Ll.index]!==0&&(Ps.width=Math.min(Ps.width,ml[Ll.index])),tu[Wl.index]!==0&&(Ps.height=Math.min(Ps.height,tu[Wl.index]));break;case ti:ml[Ll.index]!==0&&(Ps.width=Math.min(Ps.width,ml[Ll.index]));break;case mi:tu[Wl.index]!==0&&(Ps.height=Math.min(Ps.height,tu[Wl.index]))}isFinite(Ll.width)&&(Ps.width=Ll.width),isFinite(Wl.height)&&(Ps.height=Wl.height),th.h(0,0);for(var U0=Ll.minimum,Wa=Wl.minimum,Rh=1;Rh<Or.rowSpan&&!(Or.row+Rh>=a.rowCount);Rh++)dn=a.Fb(Or.row+Rh),as=0,as=$s===wn||$s===mi?Math.max(dn.minimum,tu[Or.row+Rh]===0?dn.maximum:Math.min(tu[Or.row+Rh],dn.maximum)):Math.max(dn.minimum,isNaN(dn.Hc)?dn.maximum:Math.min(dn.Hc,dn.maximum)),th.height+=as,Wa+=dn.minimum;for(var Fl=1;Fl<Or.columnSpan&&!(Or.column+Fl>=a.columnCount);Fl++)dn=a.Eb(Or.column+Fl),as=0,as=$s===wn||$s===ti?Math.max(dn.minimum,ml[Or.column+Fl]===0?dn.maximum:Math.min(ml[Or.column+Fl],dn.maximum)):Math.max(dn.minimum,isNaN(dn.Hc)?dn.maximum:Math.min(dn.Hc,dn.maximum)),th.width+=as,U0+=dn.minimum;Ps.width+=th.width,Ps.height+=th.height;var ag=Or.margin,bd=ag.right+ag.left,Dp=ag.top+ag.bottom;Or.measure(Ps.width,Ps.height,U0,Wa);for(var lg=Or.measuredBounds,vu=Math.max(lg.width+bd,0),ac=Math.max(lg.height+Dp,0),Md=0,ug=0;ug<Or.rowSpan&&!(Or.row+ug>=a.rowCount);ug++)dn=a.Fb(Or.row+ug),Md+=dn.total||0;if(Md<ac){var jh=ac-Md,Iu=ac-Md;if(Or.spanAllocation!==null)for(var zh=Or.spanAllocation,eh=0;eh<Or.rowSpan&&!(0>=jh)&&!(Or.row+eh>=a.rowCount);eh++){dn=a.Fb(Or.row+eh);var _h=dn.oa||0,lc=zh(Or,dn,Iu);dn.actual=Math.min(dn.maximum,_h+lc),dn.oa!==_h&&(jh-=dn.oa-_h)}for(;0<jh;){var eu=dn.oa||0;if(isNaN(dn.height)&&dn.maximum>eu&&(dn.actual=Math.min(dn.maximum,eu+jh),dn.oa!==eu&&(jh-=dn.oa-eu)),dn.index===0)break;dn=a.Fb(dn.index-1)}}for(var Xc=0,Hh=0;Hh<Or.columnSpan&&!(Or.column+Hh>=a.columnCount);Hh++)dn=a.Eb(Or.column+Hh),Xc+=dn.total||0;if(Xc<vu){var Jc=vu-Xc,Gy=vu-Xc;if(Or.spanAllocation!==null)for(var nh=Or.spanAllocation,uc=0;uc<Or.columnSpan&&!(0>=Jc)&&!(Or.column+uc>=a.columnCount);uc++){dn=a.Eb(Or.column+uc);var Ip=dn.oa||0,Wy=nh(Or,dn,Gy);dn.actual=Math.min(dn.maximum,Ip+Wy),dn.oa!==Ip&&(Jc-=dn.oa-Ip)}for(;0<Jc;){var $0=dn.oa||0;if(isNaN(dn.width)&&dn.maximum>$0&&(dn.actual=Math.min(dn.maximum,$0+Jc),dn.oa!==$0&&(Jc-=dn.oa-$0)),dn.index===0)break;dn=a.Eb(dn.index-1)}}}}oi(oe),Nn.free(th),Nn.free(Ps),tu!==void 0&&oi(tu),ml!==void 0&&oi(ml);var Qc=0,qc=0,K0=a.desiredSize,gx=a.maxSize;$s=ya(a,!0);var Rp=Ju=Ou=0,jp=0;z=a.columnCount;for(var Y0=0;Y0<z;Y0++)bn[Y0]!==void 0&&(dn=a.Eb(Y0),isFinite(dn.width)?(Rp+=dn.width,Rp+=dn.Wc()):Bm(dn)===Yg?(Rp+=dn.oa,Rp+=dn.Wc()):dn.oa!==0&&(Ou+=dn.oa,Ou+=dn.Wc()));isFinite(K0.width)?Qc=Math.min(K0.width,gx.width):Qc=$s!==yn&&isFinite(y)?y:Ou,Qc=Math.max(Qc,a.minSize.width),Qc=Math.max(Qc-Rp,0);for(var Jx=Ou===0?1:Math.max(Qc/Ou,1),X0=0;X0<z;X0++)bn[X0]!==void 0&&(dn=a.Eb(X0),isFinite(dn.width)||Bm(dn)===Yg||(dn.actual=dn.oa*Jx),dn.position=b.width,dn.oa!==0&&(b.width+=dn.oa,b.width+=dn.Wc()));z=a.rowCount;for(var J0=0;J0<z;J0++)_n[J0]!==void 0&&(dn=a.Fb(J0),isFinite(dn.height)?(jp+=dn.height,jp+=dn.Wc()):Bm(dn)===Yg?(jp+=dn.oa,jp+=dn.Wc()):dn.oa!==0&&(Ju+=dn.oa,Ju+=dn.Wc()));isFinite(K0.height)?qc=Math.min(K0.height,gx.height):qc=$s!==yn&&isFinite(x)?x:Ju,qc=Math.max(qc,a.minSize.height),qc=Math.max(qc-jp,0);for(var Qx=Ju===0?1:Math.max(qc/Ju,1),Q0=0;Q0<z;Q0++)_n[Q0]!==void 0&&(dn=a.Fb(Q0),isFinite(dn.height)||Bm(dn)===Yg||(dn.actual=dn.oa*Qx),dn.position=b.height,dn.oa!==0&&(b.height+=dn.oa,b.height+=dn.Wc()));z=ot.length;for(var Zy=0;Zy<z;Zy++){var zp=ot[Zy],Vy=0,Uy=0;zp.type===Cn.TableRow?(Vy=b.width,dn=a.Fb(zp.row),Uy=dn.actual):(dn=a.Eb(zp.column),Vy=dn.actual,Uy=b.height),zp.measuredBounds.h(0,0,Vy,Uy),Xr(zp,!1)}oi(ot),a.inRowsCols=Nt},Sm.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,lt=tt.length,ut=0,gt=0;gt<lt;gt++)tt[gt]&&(ut=Math.max(ut,tt[gt].length));rt=a.rowDefs,ot=a.colDefs;var St=gt=0,wt=Math.min(a.topIndex,lt-1);if(0<rt.length){for(;wt!==lt&&(rt[wt]===void 0||rt[wt].oa===0);)wt++;wt=Math.max(Math.min(wt,lt-1),0),gt=-rt[wt].position}var Et=Math.min(a.leftIndex,ut-1);if(0<ot.length){for(;Et!==ut&&(ot[Et]===void 0||ot[Et].oa===0);)Et++;Et=Math.max(Math.min(Et,ut-1),0),St=-ot[Et].position}for(var Nt=0,Ut=0;Nt!==lt&&rt[Nt]===void 0;)Nt++;for(;Ut!==lt&&ot[Ut]===void 0;)Ut++;ut=a.part,a.Fb(Nt),a.Eb(Ut);for(var jt=0;jt<y.length;jt++){var ee=y[jt];if(ee instanceof Cn&&ee.visible&&Ch(ee)){if(ee.type===Cn.TableRow){ot=a.Fb(ee.row);var oe=a.Eb(Ut)}else ot=a.Fb(Nt),oe=a.Eb(ee.column);rt=ot.position+gt+b,ot.oa!==0&&(rt+=ot.Io(Math.max(Nt,wt))),ot=oe.position+St+z,oe.oa!==0&&(ot+=oe.Io(Math.max(Ut,Et))),oe=ee.measuredBounds,ee.Uk(),ee.actualBounds.ka();var ae=ee.actualBounds,Se=on.allocAt(ae.x,ae.y,ae.width,ae.height);ae.x=ee.type===Cn.TableRow?z:ot,ae.y=ee.type===Cn.TableColumn?b:rt,ae.width=oe.width,ae.height=oe.height,ee.actualBounds.freeze(),Cu(ee,!1),cs(Se,ae)||ut===null||(ut.oh(),ee.Pn(ut)),on.free(Se)}}for(jt=Nn.alloc(),ee=0;ee<lt;ee++)if(tt[ee]){for(ut=tt[ee].length,oe=a.Fb(ee),rt=oe.position+gt+b,oe.oa!==0&&(rt+=oe.Io(Math.max(Nt,wt))),ae=0;ae<ut;ae++)if(tt[ee][ae]){Se=a.Eb(ae),ot=Se.position+St+z,Se.oa!==0&&(ot+=Se.Io(Math.max(Ut,Et)));for(var je=tt[ee][ae],Dn=je.length,Un=0;Un<Dn;Un++){var _n=je[Un],bn=_n.measuredBounds;jt.h(0,0);for(var dn=1;dn<_n.rowSpan&&!(ee+dn>=a.rowCount);dn++){var Ei=a.Fb(ee+dn);Ei.oa!==0&&(jt.height+=Ei.total)}for(dn=1;dn<_n.columnSpan&&!(ae+dn>=a.columnCount);dn++)Ei=a.Eb(ae+dn),Ei.oa!==0&&(jt.width+=Ei.total);var Pi=Se.oa+jt.width,No=oe.oa+jt.height;dn=ot,Ei=rt;var Yo=Pi,ss=No,hs=ot,Vs=rt,as=Pi,Th=No;ot+Pi>x.width&&(as=Math.max(x.width-ot,0)),rt+No>x.height&&(Th=Math.max(x.height-rt,0));var Wr=_n.alignment;if(Wr.Xb()){Wr=a.defaultAlignment,Wr.sb()||(Wr=wo);var Jl=Wr.x,Us=Wr.y,Oh=Wr.offsetX;Wr=Wr.offsetY;var tl=Se.alignment,Ml=oe.alignment;tl.sb()&&(Jl=tl.x,Oh=tl.offsetX),Ml.sb()&&(Us=Ml.y,Wr=Ml.offsetY)}else Jl=Wr.x,Us=Wr.y,Oh=Wr.offsetX,Wr=Wr.offsetY;(isNaN(Jl)||isNaN(Us))&&(Us=Jl=.5,Wr=Oh=0),tl=bn.width,Ml=bn.height;var _a=_n.margin,La=_a.left+_a.right,Sd=_a.top+_a.bottom,Ql=Ul(_n,oe,Se,!1);!isNaN(_n.desiredSize.width)||Ql!==wn&&Ql!==ti||(tl=Math.max(Pi-La,0)),!isNaN(_n.desiredSize.height)||Ql!==wn&&Ql!==mi||(Ml=Math.max(No-Sd,0)),Pi=_n.maxSize,No=_n.minSize,tl=Math.min(Pi.width,tl),Ml=Math.min(Pi.height,Ml),tl=Math.max(No.width,tl),Ml=Math.max(No.height,Ml),Pi=Ml+Sd,dn+=Yo*Jl-(tl+La)*Jl+Oh+_a.left,Ei+=ss*Us-Pi*Us+Wr+_a.top,_n.visible&&(_o(hs,Vs,as,Th,dn,Ei,bn.width,bn.height)?_n.arrange(dn,Ei,tl,Ml):_n.arrange(dn,Ei,tl,Ml,new on(hs,Vs,as,Th)))}}}for(Nn.free(jt),a=0;a<E;a++)x=y[a],z=x instanceof Cn?x:null,z!==null&&Ch(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function xm(){this.xa="Base"}Le(xm,es),xm.prototype.measure=function(){},xm.prototype.arrange=function(){};function Pm(){this.xa="Base"}Le(Pm,es),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function wm(){this.xa="Base"}Le(wm,es),wm.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&xe("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,lt=rt.right+rt.left;if(rt=rt.top+rt.bottom,isFinite(y)||isFinite(x)){var ut=E.scale,gt=ot.width;ot=ot.height;var St=Math.max(y-lt,0),wt=Math.max(x-rt,0),Et=1;a.viewboxStretch===Xn?gt!==0&&ot!==0&&(Et=Math.min(St/gt,wt/ot)):gt!==0&&ot!==0&&(Et=Math.max(St/gt,wt/ot)),Et===0&&(Et=1e-4),E.Ca*=Et,ut!==E.scale&&(Xr(E,!0),E.measure(1/0,1/0,z,tt))}ot=E.measuredBounds,b.width=isFinite(y)?y:Math.max(ot.width+lt,0),b.height=isFinite(x)?x:Math.max(ot.height+rt,0)},wm.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=wo),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 Ug(){this.xa="Base"}Le(Ug,es),Ug.prototype.measure=function(){},Ug.prototype.arrange=function(){},Ug.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,lt=Math.ceil(ot/b),ut=Math.ceil(rt/E),gt=a.gridOrigin,St=gt.x;gt=gt.y,y.save(),y.beginPath(),y.rect(0,0,ot,rt),y.clip(),y.Se();for(var wt=[],Et=a.O.s,Nt=Et.length,Ut=0;Ut<Nt;Ut++){var jt=Et[Ut],ee=[];if(wt.push(ee),jt.visible){var oe=jt.interval;if(!(0>oe)){jt=pv(jt.figure);for(var ae=0;ae<Nt;ae++)if(ae!==Ut){var Se=Et[ae];Se.visible&&pv(Se.figure)===jt&&(Se=Se.interval,Se>oe&&ee.push(Se))}}}}for(Et=a.O.s,Nt=Et.length,Ut=0;Ut<Nt;Ut++){var je=Et[Ut];if(je.visible&&(ee=je.interval||1,jt=Math.abs(ee),!(2>b*jt*x))){if(oe=je.segmentIndex,(!isFinite(oe)||isNaN(oe))&&(oe=0),0>oe&&(oe=jt-Math.min(-oe,jt)),oe=Math.round(oe%jt),jt=je.opacity,ae=1,jt!==1){if(jt===0)continue;ae=y.globalAlpha,y.globalAlpha=ae*jt}Se=wt[Ut];var Dn=!1,Un=je.strokeDashArray;if(Un!==null&&(Dn=!0,y.js(Un,je.strokeDashOffset)),je.figure==="LineV"&&je.stroke!==null&&0<je.strokeWidth){for(y.lineWidth=je.strokeWidth,Nr(a,y,je.stroke,!1,!1,z,tt),y.beginPath(),Un=je=Math.floor((St-b)/b);Un<=je+lt;Un++){var _n=Un*b+St;0<=_n&&_n<=ot&&Cm(Un,ee,oe,Se)&&(y.moveTo(_n,0),y.lineTo(_n,rt))}y.stroke(),y.Se()}else if(je.figure==="LineH"&&je.stroke!==null&&0<je.strokeWidth){for(y.lineWidth=je.strokeWidth,Nr(a,y,je.stroke,!1,!1,z,tt),y.beginPath(),Un=je=Math.floor((gt-E)/E);Un<=je+ut;Un++)_n=Un*E+gt,0<=_n&&_n<=rt&&Cm(Un,ee,oe,Se)&&(y.moveTo(0,_n),y.lineTo(ot,_n));y.stroke(),y.Se()}else if(je.figure==="BarV"&&je.fill!==null)for(Nr(a,y,je.fill,!0,!1,z,tt),je=je.width,isNaN(je)&&(je=b),_n=Un=Math.floor((St-b)/b);_n<=Un+lt;_n++){var bn=_n*b+St;0<=bn+je&&bn<=ot&&Cm(_n,ee,oe,Se)&&y.fillRect(bn,0,je,rt)}else if(je.figure==="BarH"&&je.fill!==null)for(Nr(a,y,je.fill,!0,!1,z,tt),je=je.height,isNaN(je)&&(je=E),_n=Un=Math.floor((gt-E)/E);_n<=Un+ut;_n++)bn=_n*E+gt,0<=bn+je&&bn<=rt&&Cm(_n,ee,oe,Se)&&y.fillRect(0,bn,ot,je);Dn&&y.fs(),jt!==1&&(y.globalAlpha=ae)}}y.restore(),y.Vc(!1)};function Cm(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 Em(){this.xa="Base"}Le(Em,es),Em.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Eo||a instanceof Ln){var tt=null,ot=null;if(a instanceof Ln&&(tt=a),a instanceof Eo&&(ot=a,tt=ot.adornedPart,a.j===null&&(a.j=[])),tt instanceof Ln){var rt=tt;if(z===0)ds(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof Eo?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=rt.points,gt=tt.pointsCount;ot!==null?ot.Ul(!1):tt!==null&&tt.Ul(!1),ot=y.width;var St=y.height,wt=a.j;if(wt.length=0,lt!==null){i1(a,ot,St,lt);var Et=lt.measuredBounds;x.ed(Et),wt.push(Et)}Et=fi.alloc();for(var Nt=Wt.alloc(),Ut=Wt.alloc(),jt=0;jt<z;jt++){var ee=E[jt];if(ee!==lt)if(ee.isPanelMain&&ee instanceof Ai){i1(a,ot,St,ee);var oe=ee.measuredBounds;x.ed(oe),wt.push(oe)}else if(2>gt)ee.measure(1/0,1/0,0,0),oe=ee.measuredBounds,x.ed(oe),wt.push(oe);else{var ae=ee.segmentIndex,Se=ee.segmentFraction,je=ee.alignmentFocus;je.Mc()&&(je=wo);var Dn=ee.segmentOrientation,Un=ee.segmentOffset;if(isNaN(ae)){var _n=rt.ua;oe=Kn(),_n.Qu(Se,oe);var bn=Wt.allocAt(oe[0],oe[1]);if(bn.add(rt.i(0)),_n.type===hn.j?bn.offset(-_n.startX,-_n.startY):(_n=_n.figures.first(),_n!==null&&bn.offset(-_n.startX,-_n.startY)),_n=oe[2],Dn!==ra){var dn=rt.computeAngle(ee,Dn,_n);ee.Kb=dn}dn=bn.x-y.x;var Ei=bn.y-y.y;Wt.free(bn),oi(oe)}else if(ae<-gt||ae>=gt)oe=Wt.alloc(),rt.vg(),rt.computeMidPoint(oe),_n=rt.midAngle,Dn!==ra&&(dn=rt.computeAngle(ee,Dn,_n),ee.Kb=dn),dn=oe.x-y.x,Ei=oe.y-y.y,Wt.free(oe);else{if(dn=0,0<=ae?(Ei=ut.M(ae),oe=ae<gt-1?ut.M(ae+1):Ei):(dn=gt+ae,Ei=ut.M(dn),oe=0<dn?ut.M(dn-1):Ei),Ei.Xa(oe)){0<=ae?(_n=0<ae?ut.M(ae-1):Ei,dn=ae<gt-2?ut.M(ae+2):oe):(_n=dn<gt-1?ut.M(dn+1):Ei,dn=1<dn?ut.M(dn-2):oe),bn=_n.Bf(Ei);var Pi=oe.Bf(dn);_n=bn>Pi+10?0<=ae?_n.ab(Ei):Ei.ab(_n):Pi>bn+10?0<=ae?oe.ab(dn):dn.ab(oe):0<=ae?_n.ab(dn):dn.ab(_n)}else _n=0<=ae?Ei.ab(oe):oe.ab(Ei);Dn!==ra&&(dn=rt.computeAngle(ee,Dn,_n),ee.Kb=dn),dn=Ei.x+(oe.x-Ei.x)*Se-y.x,Ei=Ei.y+(oe.y-Ei.y)*Se-y.y}ee.measure(1/0,1/0,0,0),oe=ee.measuredBounds,bn=ee.naturalBounds;var No=0;ee instanceof Ai&&(No=ee.strokeWidth),Pi=bn.width+No;var Yo=bn.height+No;Et.reset(),Et.translate(-oe.x,-oe.y),Et.scale(ee.scale,ee.scale),Et.rotate(Dn===ra?ee.angle:_n,Pi/2,Yo/2),Dn!==rp&&Dn!==ap||Et.rotate(90,Pi/2,Yo/2),Dn!==sp&&Dn!==lp||Et.rotate(-90,Pi/2,Yo/2),Dn===t0&&(45<_n&&135>_n||225<_n&&315>_n)&&Et.rotate(-_n,Pi/2,Yo/2),bn=new on(0,0,Pi,Yo),Nt.xi(bn,je),Et.Ga(Nt),je=-Nt.x+No/2*ee.scale,ee=-Nt.y+No/2*ee.scale,Ut.assign(Un),No=isNaN(Un.x);var ss=isNaN(Un.y);if(No||ss){Pi=Pi/2+3,Yo=Yo/2+3;var hs=45<=_n&&135>=_n,Vs=225<=_n&&315>=_n;Dn===ra&&(hs||Vs)?(Ut.x=ss?Pi:Un.y,Ut.y=No?Yo:Un.x,hs?0<=ae||isNaN(ae)&&.5>Se||!No||(Ut.y=-Yo):Vs&&((0<=ae||isNaN(ae)&&.5>Se)&&No&&(Ut.y=-Yo),ss&&(Ut.x=-Pi))):(No&&(Ut.x=0<=ae||isNaN(ae)&&.5>Se?Pi:-Pi),ss&&(Ut.y=-Yo),Ut.rotate(_n))}else Ut.rotate(_n);dn+=Ut.x,Ei+=Ut.y,bn.set(oe),bn.h(dn+je,Ei+ee,oe.width,oe.height),wt.push(bn),x.ed(bn)}}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),ds(b,x.width||0,x.height||0),fi.free(Et),Wt.free(Nt),Wt.free(Ut)}}}},Em.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Eo||a instanceof Ln){var E=a,b=null;a instanceof Eo&&(b=a,E=b.adornedPart);var z=a instanceof Eo?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 lt=y[rt];if(lt!==z&&ot<tt.length){var ut=tt[ot];ot++,lt.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Ln)for(z=a.labelNodes;z.next();){var gt=a;tt=z.value,ot=tt.segmentIndex,rt=tt.segmentFraction;var St=tt.alignmentFocus;if(lt=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(ot)){var wt=gt.ua,Et=Kn();wt.Qu(rt,Et);var Nt=Wt.allocAt(Et[0],Et[1]);Nt.add(gt.i(0)),wt.type===hn.j||(wt=wt.figures.first()),Nt.offset(-wt.startX,-wt.startY),wt=Et[2],lt!==ra&&(gt=gt.computeAngle(tt,lt,wt),tt.angle=gt),gt=Nt.x;var Ut=Nt.y;Wt.free(Nt),oi(Et)}else if(ot<-x||ot>=x)Et=Wt.alloc(),wt=gt,Ut=Et,wt.vg(),wt.computeMidPoint(Ut),wt=gt.midAngle,lt!==ra&&(gt=gt.computeAngle(tt,lt,wt),tt.angle=gt),gt=Et.x,Ut=Et.y,Wt.free(Et);else{if(Nt=0,0<=ot?(Et=y.s[ot],Ut=ot<x-1?y.s[ot+1]:Et):(Nt=x+ot,Et=y.s[Nt],Ut=0<Nt?y.s[Nt-1]:Et),Et.Xa(Ut)){0<=ot?(wt=0<ot?y.s[ot-1]:Et,Nt=ot<x-2?y.s[ot+2]:Ut):(wt=Nt<x-1?y.s[Nt+1]:Et,Nt=1<Nt?y.s[Nt-2]:Ut);var jt=wt.Bf(Et),ee=Ut.Bf(Nt);wt=jt>ee+10?0<=ot?wt.ab(Et):Et.ab(wt):ee>jt+10?0<=ot?Ut.ab(Nt):Nt.ab(Ut):0<=ot?wt.ab(Nt):Nt.ab(wt)}else wt=0<=ot?Et.ab(Ut):Ut.ab(Et);lt!==ra&&(gt=gt.computeAngle(tt,lt,wt),tt.angle=gt),gt=Et.x+(Ut.x-Et.x)*rt,Ut=Et.y+(Ut.y-Et.y)*rt}if(St.ys())tt.location=new Wt(gt,Ut);else{St.Mc()&&(St=wo),Et=fi.alloc(),Et.reset(),Et.scale(tt.scale,tt.scale),Et.rotate(tt.angle,0,0);var oe=tt.naturalBounds;Nt=on.allocAt(0,0,oe.width,oe.height),jt=Wt.alloc(),jt.xi(Nt,St),Et.Ga(jt),St=-jt.x,ee=-jt.y;var ae=oe.width,Se=oe.height;oe=Wt.alloc(),oe.assign(ut);var je=isNaN(ut.x),Dn=isNaN(ut.y);if(je||Dn){ae=ae/2+3,Se=Se/2+3;var Un=45<=wt&&135>=wt,_n=225<=wt&&315>=wt;lt===ra&&(Un||_n)?(oe.x=Dn?ae:ut.y,oe.y=je?Se:ut.x,Un?0<=ot||isNaN(ot)&&.5>rt||!je||(oe.y=-Se):_n&&((0<=ot||isNaN(ot)&&.5>rt)&&je&&(oe.y=-Se),Dn&&(oe.x=-ae))):(je&&(oe.x=0<=ot||isNaN(ot)&&.5>rt?ae:-ae),Dn&&(oe.y=-Se),oe.rotate(wt))}else oe.rotate(wt);gt+=oe.x,Ut+=oe.y,Et.pp(Nt),St+=Nt.x,ee+=Nt.y,ot=Wt.allocAt(gt+St,Ut+ee),tt.move(ot),Wt.free(ot),Wt.free(oe),Wt.free(jt),on.free(Nt),fi.free(Et)}}b!==null?b.Ul(!1):E.Ul(!1),E=A1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Wt.free(E)}};function i1(a,y,x,E){if(Xa(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Eo&&a.type===Cn.Link&&a.adornedObject instanceof Ai&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Ln&&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 Eo&&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),Xr(E,!1)}}function $g(){this.xa="Base"}Le($g,es),$g.prototype.measure=function(a,y,x,E,b,z,tt){var ot=a.Pb();a.graduatedBounds=[];var rt=ot.margin,lt=rt.right+rt.left,ut=rt.top+rt.bottom;ot.measure(y,x,z,tt);var gt=ot.measuredBounds,St=new on(-rt.left,-rt.top,Math.max(gt.width+lt,0),Math.max(gt.height+ut,0));a.graduatedBounds.push(St),b.assign(St);for(var wt=ot.geometry,Et=ot.strokeWidth,Nt=wt.flattenedSegments,Ut=wt.flattenedLengths,jt=wt.flattenedTotalLength,ee=Nt.length,oe=0,ae=0,Se=Kn(),je=0;je<ee;je++){var Dn=Nt[je],Un=[];ae=oe=0;for(var _n=Dn.length,bn=0;bn<_n;bn+=2){var dn=Dn[bn],Ei=Dn[bn+1];if(bn!==0){var Pi=180*Math.atan2(Ei-ae,dn-oe)/Math.PI;0>Pi&&(Pi+=360),Un.push(Pi)}oe=dn,ae=Ei}Se.push(Un)}if(a.graduatedIntervals===null){for(var No=[],Yo=a.O.s,ss=Yo.length,hs=0;hs<ss;hs++){var Vs=Yo[hs],as=[];if(No.push(as),Vs.visible){var Th=Vs.interval;if(!(0>Th)){for(var Wr=0;Wr<ss;Wr++)if(Wr!==hs){var Jl=Yo[Wr];if(Jl.visible&&Vs.constructor===Jl.constructor){var Us=Jl.interval;Us>Th&&as.push(Us)}}}}}a.graduatedIntervals=No}var Oh=a.graduatedIntervals,tl=a.O.s,Ml=tl.length,_a=0,La=0,Sd=jt;a.graduatedMarks=[];for(var Ql,tg=0;tg<Ml;tg++){var Ha=tl[tg];if(Ql=[],Ha.visible&&Ha!==ot){var $s=Math.abs(Ha.interval),Ap=a.graduatedTickUnit;if(!(2>Ap*$s*jt/a.graduatedRange&&Ha.graduatedSkip===null)){var Uc=Ut[0][0],gu=0,Fa=0;La=jt*Ha.graduatedStart-1e-4,Sd=jt*Ha.graduatedEnd+1e-4;var ic=Ap*$s,Ga=a.graduatedTickBase;if(Ga<a.graduatedMin){var xd=(a.graduatedMin-Ga)/ic;xd=xd%1===0?xd:Math.floor(xd+1),Ga+=xd*ic}else Ga>a.graduatedMin+ic&&(Ga-=Math.floor((Ga-a.graduatedMin)/ic)*ic);for(var G0=Oh[tg],Tp=Ga,_y=1e-6*a.graduatedMax,Ou=1;Ga<=a.graduatedMax+_y;Ou++){t:{for(var Ju=G0.length,$c=0;$c<Ju;$c++){var Pd=(Ga-a.graduatedTickBase)%(G0[$c]*a.graduatedTickUnit),eg=1e-6*a.graduatedTickUnit;if(Pd<eg&&Pd>-eg){var wd=!1;break t}}wd=!0}if(wd&&(Ga>a.graduatedMax&&(Ga=a.graduatedMax),Ha.graduatedSkip===null||Ha instanceof Qo&&!Ha.graduatedSkip(Ga,Ha)||Ha instanceof Ai&&!Ha.graduatedSkip(Ga,Ha))&&(_a=(Ga-a.graduatedMin)*jt/a.graduatedRange,_a>jt&&(_a=jt),La<=_a&&_a<=Sd)){for(var Du=Se[gu][Fa],Dh=Ut[gu][Fa];gu<Ut.length;){for(;_a>Uc&&Fa<Ut[gu].length-1;)Fa++,Du=Se[gu][Fa],Dh=Ut[gu][Fa],Uc+=Dh;if(_a<=Uc)break;gu++,Fa=0,Du=Se[gu][Fa],Dh=Ut[gu][Fa],Uc+=Dh}var Ba=Nt[gu],pu=Ba[2*Fa],W0=Ba[2*Fa+1],Qu=(_a-(Uc-Dh))/Dh,ng=new Wt(pu+(Ba[2*Fa+2]-pu)*Qu+Et/2-wt.bounds.x,W0+(Ba[2*Fa+3]-W0)*Qu+Et/2-wt.bounds.y);ng.scale(ot.scale,ot.scale);t:{var ql=Du,oc=Se[gu];if(!(.5005>Qu&&.4995<Qu)){var mu=ql;if(.5>Qu?0<Fa?mu=oc[Fa-1]:me.$(Ba[0],Ba[Ba.length-2])&&me.$(Ba[1],Ba[Ba.length-1])&&(mu=oc[oc.length-1]):.5<Qu&&(Fa+1<oc.length?mu=oc[Fa+1]:me.$(Ba[0],Ba[Ba.length-2])&&me.$(Ba[1],Ba[Ba.length-1])&&(mu=oc[0])),ql!==mu){var Kc=Math.abs(ql-mu);if(180<Kc&&(ql<mu?ql+=360:mu+=360,Kc=Math.abs(ql-mu)),5e-4>Qu||.9995<Qu){Du=(ql+mu)/2%360;break t}if(10>Kc){var ig=1-Math.abs(.5-Qu);Du=(ql*ig+mu*(1-ig))%360;break t}}}Du=ql}if(Ha instanceof Qo){var Gl="";Ha.graduatedFunction!==null?(Gl=Ha.graduatedFunction(Ga,Ha),Gl=Gl!=null?Gl.toString():""):Gl=(+Ga.toFixed(2)).toString(),Gl!==""&&Ql.push({$l:ng,angle:Du,text:Gl})}else Ql.push({$l:ng,angle:Du})}Ga=Tp+Ou*ic}}}a.graduatedMarks.push(Ql)}oi(Se);var Ps=a.graduatedMarks;if(Ps!==null)for(var Op=E.length,ha=0;ha<Op;ha++){var Zr=E[ha],da=Ps[ha];if(Zr.visible&&Zr!==ot&&da.length!==0){if(Zr instanceof Ai){var qu=a,Ih=b,rc=Zr.alignmentFocus;rc.Mc()&&(rc=Ta);var Hy=Zr.angle;Zr.Kb=0,Zr.measure(1/0,1/0,0,0),Zr.Kb=Hy;var Z0=Zr.measuredBounds,og=Z0.width,sc=Z0.height,Yc=on.allocAt(0,0,og,sc),Na=Wt.alloc();Na.xi(Yc,rc),on.free(Yc);for(var th=-Na.x,tu=-Na.y,ml=new on,Cd=da.length,rg=0;rg<Cd;rg++)for(var Ed=da[rg],V0=Ed.$l.x,sg=Ed.$l.y,Or=Ed.angle,Wl=0;4>Wl;Wl++){switch(Wl){case 0:Na.h(th,tu);break;case 1:Na.h(th+og,tu);break;case 2:Na.h(th,tu+sc);break;case 3:Na.h(th+og,tu+sc)}Na.rotate(Or+Zr.angle),Na.offset(V0,sg),rg===0&&Wl===0?ml.h(Na.x,Na.y,0,0):ml.Ye(Na),Na.offset(-V0,-sg),Na.rotate(-Or-Zr.angle)}Wt.free(Na),qu.graduatedBounds!==null&&qu.graduatedBounds.push(ml),Mr(Ih,ml.x,ml.y,ml.width,ml.height)}else if(Zr instanceof Qo){var Ll=a,U0=b;Ll.temporaryTextBlock===null&&(Ll.temporaryTextBlock=new Qo);var Wa=Ll.temporaryTextBlock;y1(Wa,Zr);var Rh=Zr.alignmentFocus;Rh.Mc()&&(Rh=Ta);for(var Fl=Zr.segmentOrientation,ag=Zr.segmentOffset,bd=new on,Dp=0,lg=0,vu=0,ac=0,Md=0,ug=da.length,jh=0;jh<ug;jh++){var Iu=da[jh];Dp=Iu.$l.x,lg=Iu.$l.y,vu=Iu.angle,Md=ac=Zr.angle,Fl!==ra&&(Md=Fl===op||Fl===qm?vu+Zr.angle:vu,ac=Ln.computeAngle(Fl,Md)),Wa.Kb=ac,Wa.text=Iu.text||"",Wa.measure(1/0,1/0,0,0);var zh=Wa.measuredBounds,eh=Wa.naturalBounds,_h=eh.width,lc=eh.height,eu=fi.alloc();eu.reset(),eu.translate(-zh.x,-zh.y),eu.scale(Wa.scale,Wa.scale),eu.rotate(Md,_h/2,lc/2),Fl!==rp&&Fl!==ap||eu.rotate(90,_h/2,lc/2),Fl!==sp&&Fl!==lp||eu.rotate(-90,_h/2,lc/2),Fl===t0&&(45<vu&&135>vu||225<vu&&315>vu)&&eu.rotate(-vu,_h/2,lc/2);var Xc=on.allocAt(0,0,_h,lc),Hh=Wt.alloc();Hh.xi(Xc,Rh),eu.Ga(Hh);var Jc=-Hh.x,Gy=-Hh.y,nh=Wt.alloc();nh.assign(ag),isNaN(nh.x)&&(nh.x=_h/2+3),isNaN(nh.y)&&(nh.y=-(lc/2+3)),nh.rotate(vu),Dp+=nh.x+Jc,lg+=nh.y+Gy;var uc=new on(Dp,lg,zh.width,zh.height),Ip=new on(zh.x,zh.y,zh.width,zh.height),Wy=new on(eh.x,eh.y,eh.width,eh.height);Iu.Sz=ac,Iu.lineCount=Wa.lineCount,Iu.lines=[Wa.Cb,Wa.Ih,Wa.df,Wa.Le,Wa.Qc,Wa.Qb,Wa.ze],Iu.actualBounds=uc,Iu.measuredBounds=Ip,Iu.naturalBounds=Wy,jh===0?bd.assign(uc):bd.ed(uc),Wt.free(nh),Wt.free(Hh),on.free(Xc),fi.free(eu)}Ll.graduatedBounds!==null&&Ll.graduatedBounds.push(bd),Mr(U0,bd.x,bd.y,bd.width,bd.height)}Xr(Zr,!1)}}},$g.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,lt=0;lt<rt;lt++){var ut=y[lt];ot=b[lt],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}}},$g.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 Ra,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,lt=a.graduatedMarks,ut=rt.length,gt=0;gt<ut;gt++){var St=rt[gt],wt=lt[gt],Et=wt.length;if(St.visible&&St!==z&&wt.length!==0){if(St instanceof Ai){if(!(2>a.graduatedTickUnit*St.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&St.graduatedSkip===null)){var Nt=St.measuredBounds,Ut=St.strokeWidth*St.scale,jt=St.alignmentFocus;jt.Mc()&&(jt=Ta);for(var ee=0;ee<Et;ee++){var oe=wt[ee].$l,ae=wt[ee].angle,Se=jt,je=St.Ab;je.reset(),je.translate(oe.x+ot.x,oe.y+ot.y),je.rotate(ae+St.angle,0,0),je.translate(-Nt.width*Se.x+Se.offsetX+Ut/2,-Nt.height*Se.y+Se.offsetY+Ut/2),je.scale(St.scale,St.scale),Pl(St,!1),St.wh.set(St.Ab),St.Kk=St.scale,ul(St,!1),St.gc(y,x),b&&(a.svg.appendChild(St.svg),St.svg=null),St.Ab.reset()}}}else if(St instanceof Qo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Qo),Nt=a.temporaryTextBlock,y1(Nt,St),Ut=0;Ut<Et;Ut++)jt=wt[Ut],jt.actualBounds&&jt.measuredBounds&&jt.naturalBounds&&(Nt.ec=jt.text||"",Nt.Kb=jt.Sz||0,Nt.Gc=jt.lineCount||0,ee=jt.lines,ee!==void 0&&(Nt.Cb=ee[0],Nt.Ih=ee[1],Nt.df=ee[2],Nt.Le=ee[3],Nt.Qc=ee[4],Nt.Qb=ee[5],Nt.ze=ee[6]),jt.naturalBounds&&(Nt.dc=jt.naturalBounds),jt.actualBounds&&(ee=jt.actualBounds,Nt.arrange(ee.x,ee.y,ee.width,ee.height)),ee=jt.actualBounds,Nt.arrange(ee.x,ee.y,ee.width,ee.height),oe=jt.measuredBounds,jt=jt.naturalBounds,ae=Nt.Ab,ae.reset(),ae.translate(ee.x+ot.x,ee.y+ot.y),ae.translate(-oe.x,-oe.y),Nt.no(ae,jt.x,jt.y,jt.width,jt.height),Pl(Nt,!1),Nt.wh.set(Nt.Ab),Nt.Kk=Nt.scale,ul(Nt,!1),Nt.Ng=St.part,Nt.Me=St.panel,Nt.gc(y,x),Nt.Me=null,Nt.Ng=null,b&&(a.svg.appendChild(Nt.svg),Nt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Cn(a,y){if(Pe.call(this),this.na=null,a===void 0)this.na=Cn.Position;else if(typeof a=="string"){var x=Il.I(a);x!==null&&(this.na=x)}else a instanceof es?this.na=a:a&&(this.na=Cn.Position,y=a);this.na===null&&xe("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Cn.Grid?1048576:0),this.O=new pn,this.yb=ws,this.Tm=Ge,this.Uf=Mi,this.$g=null,this.$e="",this.jg=new on(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Xn,this.jn=Br,this.kn=Fo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Le(Cn,Pe),Cn.prototype.cloneProtected=function(a){Pe.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},Cn.prototype.Af=function(a){Pe.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},Cn.prototype.copy=function(){var a=Pe.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 Rn&&(z.Te=!0);var ot=a.diagram;ot!==null&&ot.undoManager.isUndoingRedoing||z.cb(wr,"elements",a,null,b,null,tt)}}return a}return null},bt=Cn.prototype,bt.toString=function(){return"Panel("+this.type.name+")#"+Si(this)},bt.Pn=function(a){Pe.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},bt.hh=function(a,y){if(this.na===Cn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Cn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Cn.Table)if(a.yc(),a instanceof Ra){var x=a.yd;a.yd=dm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Cn.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&&o1(a,y,!0,x),E!==null&&o1(a,y,!1,E),x!==null&&bm(a,y,!0,x,!1),E!==null&&bm(a,y,!1,E,!1)}function o1(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,ot=!0,rt=0;rt<b;rt++){var lt=E[rt];if(lt!==void 0&&lt.actual!==0)if(ot)ot=!1;else{if(x){if(lt.position>tt.height)continue}else if(lt.position>tt.width)continue;var ut=lt.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var gt=lt.separatorStroke;if(gt===null&&(gt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&gt!==null){Nr(a,y,gt,!1,!1,tt,z),gt=!1;var St=lt.separatorDashArray;St===null&&(St=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),St!==null&&(gt=!0,y.js(St,0)),y.beginPath(),St=lt.position+ut,x?St>tt.height&&(ut-=St-tt.height):St>tt.width&&(ut-=St-tt.width),lt=lt.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(lt+=ut.top,St=tt.width-ut.right,y.moveTo(ut.left,lt),y.lineTo(St,lt)):(lt+=ut.left,St=tt.height-ut.bottom,y.moveTo(lt,ut.top),y.lineTo(lt,St)),y.stroke(),y.Se(),gt&&y.fs()}}}}function bm(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,ot=a.naturalBounds,rt=r1(a,!0),lt=r1(a,!1),ut=0;ut<z;ut++){var gt=E[ut];if(gt!==void 0&&gt.background!==null&&gt.coversSeparators!==b&&gt.actual!==0){var St=x?tt.height:tt.width;if(!(gt.position>St)){var wt=gt.Wc(),Et=gt.separatorStrokeWidth;isNaN(Et)&&(Et=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Nt=gt.separatorStroke;Nt===null&&(Nt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Nt===null||gt.index===(x?rt:lt))&&(Et=0),wt-=Et,Et=gt.position+Et,wt+=gt.actual,Et+wt>St&&(wt=St-Et),0>=wt||(St=a.yb,Nr(a,y,gt.background,!0,!1,ot,tt),x?y.fillRect(St.left,Et+St.top,tt.width-(St.left+St.right),wt):y.fillRect(Et+St.left,St.top,wt,tt.height-(St.top+St.bottom)))}}}}function r1(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"}bt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},bt.kk=function(a,y,x){if(!Pe.prototype.kk.call(this,a,y,x))return!1;if(this.type===Cn.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===Cn.Grid||this.na===Cn.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},bt.nk=function(){return!0},bt.$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 Pe.prototype.$o.call(this,a,y,x,E)},bt.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,lt=-tt.m12*ot,ut=-tt.m21*ot,gt=tt.m11*ot,St=ot*(tt.m21*tt.dy-tt.m22*tt.dx),wt=ot*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,me.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*rt+y*ut+St,ot=a*lt+y*gt+wt,a=x*rt+E*ut+St,rt=x*lt+E*gt+wt,b.h(0,0),x=this.naturalBounds,z=me.Ff(0,0,x.width,x.height,z,ot,a,rt,b),b.transform(tt),z;z||(rt=1,ut=lt=0,gt=1,wt=St=0),ot=a*rt+y*ut+St,a=a*lt+y*gt+wt,rt=x*rt+E*ut+St,x=x*lt+E*gt+wt,b.h(rt,x),E=(rt-ot)*(rt-ot)+(x-a)*(x-a),lt=!1,gt=this.O.s,wt=gt.length,ut=Wt.alloc(),St=null,y=1/0;var Et=null,Nt=this.isClipping&&this.na===Cn.Spot;Nt&&(Et=Wt.alloc(),St=this.Pb(),(lt=St.Sj(ot,a,rt,x,Et))&&(y=(ot-Et.x)*(ot-Et.x)+(a-Et.y)*(a-Et.y)));for(var Ut=0;Ut<wt;Ut++){var jt=gt[Ut];jt.visible&&jt!==St&&jt.Sj(ot,a,rt,x,ut)&&(lt=!0,jt=(ot-ut.x)*(ot-ut.x)+(a-ut.y)*(a-ut.y),jt<E&&(E=jt,b.set(ut)))}return Nt&&(y>E&&b.set(Et),Wt.free(Et)),Wt.free(ut),z&&b.transform(tt),lt},bt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Pe.prototype.Gj.call(this)},bt.v=function(a){if(!Xa(this)){Pe.prototype.v.call(this,a),a=null,(this.na===Cn.Auto||this.na===Cn.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=ya(b,!1);(b instanceof oa||b instanceof Cn||b instanceof Qo||z!==yn)&&b.v(!0)}}}},bt.Uj=function(){if(!Xa(this)){Xr(this,!0),Cu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},bt.Uk=function(){if(!(this.l&2048)){Pl(this,!0),ul(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},bt.Wu=function(){ul(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},bt.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 lt=this.O.s;lt.length!==0&&this.na.measure(this,a,y,lt,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),ds(b,a,rt),ds(this.naturalBounds,a,rt),this.Ge(0,0,a,rt)},bt.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 Ku(a){return a.part!==null?a.part.locationObject:null}bt.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=ya(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=yn),a){case yn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case wn:this.v(!0),this.measure(x+ot,E+tt,0,0);break;case ti:this.v(!0),this.measure(x+ot,z+tt,0,0);break;case mi:this.v(!0),this.measure(y+ot,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},bt.gh=function(a){var y=this.naturalBounds,x=Ku(this);if(_o(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Wt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(uo(b.set(a),z.transform),z.ca(b)))return Wt.free(b),!0}return Wt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},bt.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},bt.qm=function(a,y){if(y(this,a),a instanceof Cn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Yd(a,y){s1(a,a,y)}function s1(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 Cn&&s1(a,z,x)}}function vx(a,y){a1(a,a,y)}function a1(a,y,x){if(x(y),y instanceof Cn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)a1(a,y[b],x)}}bt.Nl=function(a){return l1(this,this,a)};function l1(a,y,x){if(x(y))return y;if(y instanceof Cn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=l1(a,y[b],x);if(z!==null)return z}}return null}bt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Kg(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Cn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function u1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Cn?x=Math.max(x,u1(b)):b instanceof Ai&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}bt.se=function(){return!(this.type===Cn.TableRow||this.type===Cn.TableColumn)};function Ch(a){return a.type===Cn.TableRow||a.type===Cn.TableColumn}bt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),na(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:uo(Wt.allocAt(a.x,a.y),this.transform),ot=this.diagram,rt=10,lt=5;if(ot!==null&&(rt=ot.Ql("extraTouchArea"),lt=rt/2),_o(-(lt*b),-(lt*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=Wt.alloc(),lt=(rt=this.isClipping&&this.na===Cn.Spot)?this.Pb():null,rt&&(lt.se()?uo(ot.set(a),lt.transform):ot.set(a),!lt.ca(ot)))return Wt.free(ot),z||Wt.free(tt),null;for(var gt=Ku(this);ut--;){var St=b[ut];if((St.visible||St===gt)&&(St.se()?uo(ot.set(a),St.transform):ot.set(a),!rt||St!==lt)){var wt=null;if(St instanceof Cn?wt=St.ic(ot,y,x):St.pickable===!0&&St.ca(ot)&&(wt=St),wt!==null&&(y!==null&&(wt=y(wt)),wt!==null&&(x===null||x(wt))))return Wt.free(ot),z||Wt.free(tt),wt}}Wt.free(ot)}return this.background===null&&this.areaBackground===null?(z||Wt.free(tt),null):(a=_o(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Wt.free(tt),a)}return z||Wt.free(tt),null},bt.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:uo(Wt.allocAt(a.x,a.y),this.transform);if(b=_o(0,0,b.width,b.height,tt.x,tt.y),Ch(this)||b){if(!this.isAtomic){for(var ot=this.O.s,rt=ot.length,lt=Wt.alloc(),ut=Ku(this);rt--;){var gt=ot[rt];if(gt.visible||gt===ut){gt.se()?uo(lt.set(a),gt.transform):lt.set(a);var St=gt;gt=gt instanceof Cn?gt:null,(gt!==null?gt.ji(lt,y,x,E):St.ca(lt))&&St.pickable!==!1&&(y!==null&&(St=y(St)),St===null||x!==null&&!x(St)||E.add(St))}}Wt.free(lt)}return z||Wt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Wt.free(tt),!1},bt.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=fi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&fi.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var ot=Ku(this),rt=this.O.s,lt=rt.length;lt--;){var ut=rt[lt];if(ut.visible||ut===ot){var gt=ut.actualBounds,St=this.naturalBounds;gt.x>St.width||gt.y>St.height||0>gt.x+gt.width||0>gt.y+gt.height||(gt=ut,ut=ut instanceof Cn?ut:null,St=fi.alloc(),St.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,St):rs(gt,a,E,St))&&(y!==null&&(gt=y(gt)),gt===null||x!==null&&!x(gt)||b.add(gt)),fi.free(St))}}return z===void 0&&fi.free(tt),E}return z===void 0&&fi.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 Cn&&mv(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}bt.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:uo(Wt.allocAt(a.x,a.y),this.transform),lt=ot?y:uo(Wt.allocAt(y.x,y.y),this.transform),ut=rt.Bf(lt),gt=0<rt.x&&rt.x<tt.width&&0<rt.y&&rt.y<tt.height||yr(rt.x,rt.y,0,0,0,tt.height)<=ut||yr(rt.x,rt.y,0,tt.height,tt.width,tt.height)<=ut||yr(rt.x,rt.y,tt.width,tt.height,tt.width,0)<=ut||yr(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||(Wt.free(rt),Wt.free(lt)),gt){if(!this.isAtomic){rt=Wt.alloc(),lt=Wt.alloc(),ut=Ku(this);for(var St=this.O.s,wt=St.length;wt--;){var Et=St[wt];if(Et.visible||Et===ut){var Nt=Et.actualBounds,Ut=this.naturalBounds;(!ot||!(Nt.x>Ut.width||Nt.y>Ut.height||0>Nt.x+Nt.width||0>Nt.y+Nt.height))&&(Et.se()?(Nt=Et.transform,uo(rt.set(a),Nt),uo(lt.set(y),Nt)):(rt.set(a),lt.set(y)),Nt=Et,Et=Et instanceof Cn?Et:null,(Et!==null?Et.og(rt,lt,x,E,b,z):Nt.tx(rt,lt,b))&&(x!==null&&(Nt=x(Nt)),Nt===null||E!==null&&!E(Nt)||z.add(Nt)))}}Wt.free(rt),Wt.free(lt)}return b?gt:tt}return!1};function vv(a){var y=null;return a instanceof Ai&&(y=a.spot1,y===Ge&&(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 Ai&&(y=a.spot2,y===Ge&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Hs),y}bt.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},bt.M=function(a){return this.O.M(a)},bt.Gb=function(a,y){y instanceof ai&&xe("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&xe("Cannot make a Panel contain itself: "+this.toString()),xe("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&xe("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!==Cn.Grid||y instanceof Ai||xe("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Cn.Graduated||y instanceof Ai||y instanceof Qo||xe("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 Yn),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 xe("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),Xa(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Cn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Lm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Rn&&(x.Te=!0),x.Te&&x instanceof Rn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Rr,"elements",this,y,null,E,null),x.cb(wr,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}bt.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)},bt.mb=function(a){0<=a&&this.pc(a,!0)},bt.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),Xr(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 Rn&&(E instanceof Cn?E.qm(E,function(tt,ot){Gv(z,ot,y)}):Gv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Rr,"elements",this,E,null,a,null))},bt.Fb=function(a){0>a&&Mn(a,">= 0",Cn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Jr;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(wr,"rowdefs",this,null,x,null,a)}return y[a]},bt.oA=function(a){if(0>a&&Mn(a,">= 0",Cn,"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(Rr,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Jr?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}bt.Eb=function(a){0>a&&Mn(a,">= 0",Cn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Jr;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(wr,"coldefs",this,null,x,null,a)}return y[a]},bt.jA=function(a){if(0>a&&Mn(a,">= 0",Cn,"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(Rr,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Jr?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}bt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Fm(y,a),this},bt.Hy=function(a,y){return(a=this.Fb(a))&&Fm(a,new Jr(y)),this},bt.By=function(a,y){return(a=this.Eb(a))&&Fm(a,new Jr(y)),this},bt.nz=function(a){if(0>a||this.type!==Cn.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},bt.fz=function(a){if(0>a||this.type!==Cn.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},bt.Fz=function(a,y){if(y===void 0&&(y=new Wt(NaN,NaN)),this.type!==Cn.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)},bt.Gz=function(a){if(this.type!==Cn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function c1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Cl(a){var y=a.allBindings;if(y===null)a.data!==null&&xe("Template cannot have .data be non-null: "+a),a.allBindings=y=new pn;else if(y._isFrozen)return;var x=new pn;Sv(a,!1),a.qm(a,function(lt,ut){ut.th();var gt=ut.localBindings;if(gt!==null)for(kc(ut,!1),gt=gt.iterator;gt.next();){var St=gt.value;St.mode===mp&&kc(ut,!0);var wt=St.sourceName;wt!==null&&(wt==="/"&&Sv(lt,!0),wt=MS(St,lt,ut),wt!==null&&(x.add(wt),wt.srcBindings===null&&(wt.srcBindings=new pn),wt.srcBindings.add(St))),y.add(St)}if(ut instanceof Cn&&ut.type===Cn.Table){if(0<ut.rowCount){for(lt=ut.rowDefs,gt=lt.length,St=0;St<gt;St++)if(wt=lt[St],wt!==void 0&&wt.be!==null)for(var Et=wt.be.iterator;Et.next();){var Nt=Et.value;Nt.xd=wt,Nt.to=2,Nt.wl=wt.index,y.add(Nt)}}if(0<ut.columnCount){for(ut=ut.colDefs,lt=ut.length,gt=0;gt<lt;gt++)if(St=ut[gt],St!==void 0&&St.be!==null)for(wt=St.be.iterator;wt.next();)Et=wt.value,Et.xd=St,Et.to=1,Et.wl=St.index,y.add(Et)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){kc(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new pn),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 Cn&&(tt=ot.substring(0,rt),ot=ot.substr(rt+1),rt=z.fb(tt),rt!==null?(z=rt,b.targetProperty=ot):Vn('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Jr?(tt=Si(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof Pe?(tt=Si(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):xe("Unknown type of binding target: "+z)}y.freeze(),a instanceof ai&&a.Zc()&&a.Va()}bt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof Cn&&(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&&Cl(y),y},bt.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 Cn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},bt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(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 Cn&&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 Cn)||z.data!==y[tt])return!0;b++,tt++}return!1}function Kg(a){if(a.type===Cn.Spot||a.type===Cn.Auto)return Math.min(a.O.length,1);if(a.type===Cn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Ai&&E.isPanelMain))break}return x}return a.type===Cn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Cn&&Ch(a))?1:0}bt.mv=function(){for(var a=Kg(this);this.O.length>a;)this.pc(this.O.length-1,!1);f1(this,this.itemArray)};function f1(a,y){var x=Kg(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++)Mm(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 Cn){if(tt.data!==z){var ot=Pv(a,tt.data),rt=Pv(a,z),lt=rt!==ot;lt||(ot=wv(a,ot),lt=wv(a,rt)!==ot),lt?(a.pc(E,!1),Mm(a,z,b,!1)):tt.data=z}}else Mm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),Xa(a)||a.v(),a.graduatedIntervals=null,a.If()||Lm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Rn&&(y.Te=!0),y.Te&&y instanceof Rn&&(y.wc=null))}}function Mm(a,y,x,E){if(!(y==null||0>x)){var b=Pv(a,y);if(b=wv(a,b),b!==null){if(Cl(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 Yn),a.ge.add(y,b)),z=x+Kg(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 Cn){var b=y,z=x;E.type===Cn.TableRow?E.row=b:E.type===Cn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Pv(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=zr(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;xe("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function wv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(g1||(g1=!0,Vn('No item template Panel found for category "'+y+'" on '+a),Vn(" Using default item template."),a=new Cn,y=new Qo,y.bind(new Gr("text","",xi)),a.add(y),p1=a),E=p1)),E}function Lm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Cn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Cn&&!z.isEnabled||Lm(a,z,x)}}}function cu(a,y){y.name=a,Il.add(a,y)}re.Object.defineProperties(Cn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Cn.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&&Mn(a,">= 0",Cn,"padding"),a=new ci(a)):(0>a.left&&Mn(a.left,">= 0",Cn,"padding:value.left"),0>a.right&&Mn(a.right,">= 0",Cn,"padding:value.right"),0>a.top&&Mn(a.top,">= 0",Cn,"padding:value.top"),0>a.bottom&&Mn(a.bottom,">= 0",Cn,"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:ws},set:function(a){typeof a=="number"&&(a=new ci(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new cl),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 Io)&&(a instanceof Io&&a.freeze(),this.T===null&&(this.T=new cl),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 cl),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)||xe("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 cl),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 Io)&&(a instanceof Io&&a.freeze(),this.T===null&&(this.T=new cl),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 cl),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)||xe("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 cl),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 cl),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||xe("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&uu(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()||xe("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&uu(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 Yu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Es(this)&&(a=this.part,a!==null&&ur(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 Yu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Es(this)&&(a=this.part,a!==null&&ur(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 Yu),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 Yu),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 Yu,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 Yu,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 Yu,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 Yu,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 cl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new cl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Nm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new cl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Nm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new cl),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)&&xe("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new cl),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)&&xe("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new cl),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 ai&&!(this instanceof Eo);Cl(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Ln?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof ai&&(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 Ac),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ay(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||f1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new Yn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ai||a.isPanelMain)&&xe("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(););zi(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&&(zi(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 bi&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Lm(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),re.Object.defineProperties(Cn,{Position:{get:function(){return Il.I("Position")}},Horizontal:{get:function(){return Il.I("Horizontal")}},Vertical:{get:function(){return Il.I("Vertical")}},Spot:{get:function(){return Il.I("Spot")}},Auto:{get:function(){return Il.I("Auto")}},Table:{get:function(){return Il.I("Table")}},Viewbox:{get:function(){return Il.I("Viewbox")}},TableRow:{get:function(){return Il.I("TableRow")}},TableColumn:{get:function(){return Il.I("TableColumn")}},Link:{get:function(){return Il.I("Link")}},Grid:{get:function(){return Il.I("Grid")}},Graduated:{get:function(){return Il.I("Graduated")}}}),Cn.prototype.rebuildItemElements=Cn.prototype.mv,Cn.prototype.findItemPanelForData=Cn.prototype.sx,Cn.prototype.updateTargetBindings=Cn.prototype.La,Cn.prototype.copyTemplate=Cn.prototype.Uy,Cn.prototype.graduatedValueForPoint=Cn.prototype.Gz,Cn.prototype.graduatedPointForValue=Cn.prototype.Fz,Cn.prototype.findColumnForLocalX=Cn.prototype.fz,Cn.prototype.findRowForLocalY=Cn.prototype.nz,Cn.prototype.addColumnDefinition=Cn.prototype.By,Cn.prototype.addRowDefinition=Cn.prototype.Hy,Cn.prototype.addRowColumnDefinition=Cn.prototype.Gy,Cn.prototype.removeColumnDefinition=Cn.prototype.jA,Cn.prototype.getColumnDefinition=Cn.prototype.Eb,Cn.prototype.removeRowDefinition=Cn.prototype.oA,Cn.prototype.getRowDefinition=Cn.prototype.Fb,Cn.prototype.removeAt=Cn.prototype.mb,Cn.prototype.remove=Cn.prototype.remove,Cn.prototype.insertAt=Cn.prototype.Gb,Cn.prototype.elt=Cn.prototype.M,Cn.prototype.add=Cn.prototype.add,Cn.prototype.findObject=Cn.prototype.fb,Cn.prototype.findInVisualTree=Cn.prototype.Nl,Cn.prototype.walkVisualTreeFrom=Cn.prototype.qm,Cn.prototype.findMainElement=Cn.prototype.Pb;var g1=!1,p1=null,Il=new Yn;Cn.className="Panel",Cn.definePanelLayout=cu,cu("Position",new gm),cu("Vertical",new mm),cu("Auto",new ym),cu("Link",new Em);function Yu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Yu.prototype.copy=function(){var a=new Yu;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},Yu.className="GradPanelSettings";function cl(){this.Pc=[],this.Oc=[],this.j=this.ob=Nm,this.hb=this.Hb=0,this.Qp=ws,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}cl.prototype.copy=function(a){for(var y=new cl,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},cl.className="TablePanelSettings";function Jr(a){po(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Ge,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=Mi,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))}Jr.prototype.copy=function(){var a=new Jr;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=hi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Fm(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=hi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}bt=Jr.prototype,bt.qb=function(a){a.classType===Jr&&(this.sizing=a)},bt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Si(this)},bt.wi=function(a){this.Me=a},bt.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)},bt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Cn.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)},bt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(ar,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 Bm(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}bt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Gr(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&c1(y)&&xe("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new pn),this.be.add(b),this},re.Object.defineProperties(Jr.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&&Mn(a,">= 0",Jr,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",Jr,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Mn(a,">= 0",Jr,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Mn(a,">= 0",Jr,"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 ci(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&&Oc(a,"RowColumnDefinition.separatorStroke"),a instanceof Io&&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)||xe("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&&Oc(a,"RowColumnDefinition.background"),a instanceof Io&&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}}}),Jr.prototype.computeEffectiveSpacing=Jr.prototype.Wc,Jr.prototype.computeEffectiveSpacingTop=Jr.prototype.Io;var Cv=new Oe(Jr,"Default",0),Yg=new Oe(Jr,"None",1),Nm=new Oe(Jr,"ProportionalExtra",2);Jr.className="RowColumnDefinition",Jr.Default=Cv,Jr.None=Yg,Jr.ProportionalExtra=Nm;function Ai(a,y){Pe.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}Le(Ai,Pe),Ai.prototype.cloneProtected=function(a){Pe.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=hi(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 Xd(a){a.Na===null?a.Na=new Mv:a.Na.nc&&(a.Na=a.Na.copy())}bt=Ai.prototype,bt.th=function(){Pe.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},bt.qb=function(a){a===yn||a===Xn||a===ro||a===Mi?this.geometryStretch=a:Pe.prototype.qb.call(this,a)},bt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Si(this)};function Af(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],lt,ut,gt,St,wt,Et,Nt=0,Ut=Kn(),jt=2;jt<b;jt+=2)lt=x[jt],ut=x[jt+1],gt=lt-ot,ot=ut-rt,gt===0&&(gt=.001),St=ot/gt,wt=Math.atan2(ot,gt),Et=Math.sqrt(gt*gt+ot*ot),Ut.push([gt,wt,St,Et]),Nt+=Et,ot=lt,rt=ut;ot=x[0],rt=x[1],gt=E.measuredBounds.width,E instanceof Ai&&(gt-=E.strokeWidth),1>gt&&(gt=1),b=x=gt,lt=tt/2,ut=lt!==0,jt=0,Et=Ut[jt],gt=Et[0],wt=Et[1],St=Et[2],Et=Et[3];for(var ee=0;.1<=Nt;){if(ee===0&&(ut?(b=x,b-=lt,Nt-=lt,ut=!1):b=x,b===0&&(b=1)),b>Nt){oi(Ut);return}b>Et?(ee=b-Et,b=Et):ee=0;var oe=Math.sqrt(b*b/(1+St*St));if(0>gt&&(oe=-oe),ot+=oe,rt+=St*oe,a.translate(ot,rt),a.rotate(wt),a.translate(-(tt/2),-(z/2)),ee===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-wt),a.translate(-ot,-rt),Nt-=b,Et-=b,ee!==0){if(jt++,jt===Ut.length){oi(Ut);return}Et=Ut[jt],gt=Et[0],wt=Et[1],St=Et[2],Et=Et[3],b=ee}}oi(Ut)}}bt.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&&Nr(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===Cn.Link&&ot instanceof Eo&&ot.category==="Selection"&&ot.adornedObject instanceof Ai&&ot.adornedPart.Pb()===ot.adornedObject?ot.adornedObject.strokeWidth:0),rt===0&&(x=null),x!==null&&rt!==0&&(Nr(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===hn.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===hn.u){var lt=b.startX;rt=b.startY;var ut=b.endX,gt=b.endY;b=Math.min(lt,ut);var St=Math.min(rt,gt);lt=Math.abs(ut-lt),rt=Math.abs(gt-rt),a.beginPath(),a.rect(b,St,lt,rt),E!==null&&a.ng(E),x!==null&&(ot&&z&&Eu(a),a.jk(),ot&&z&&Vu(a)),a.Se()}else if(b.type===hn.F)lt=b.startX,rt=b.startY,ut=b.endX,gt=b.endY,b=Math.abs(ut-lt)/2,St=Math.abs(gt-rt)/2,lt=Math.min(lt,ut)+b,rt=Math.min(rt,gt)+St,a.beginPath(),a.moveTo(lt,rt-St),a.bezierCurveTo(lt+me.wg*b,rt-St,lt+b,rt-me.wg*St,lt+b,rt),a.bezierCurveTo(lt+b,rt+me.wg*St,lt+me.wg*b,rt+St,lt,rt+St),a.bezierCurveTo(lt-me.wg*b,rt+St,lt-b,rt+me.wg*St,lt-b,rt),a.bezierCurveTo(lt-b,rt-me.wg*St,lt-me.wg*b,rt-St,lt,rt-St),a.closePath(),E!==null&&a.ng(E),x!==null&&(ot&&z&&Eu(a),a.jk(),ot&&z&&Vu(a)),a.Se();else if(b.type===hn.o)for(b=b.figures,rt=b.length,St=0;St<rt;St++){lt=b.s[St],a.beginPath(),a.moveTo(lt.startX,lt.startY),ut=lt.segments.s,gt=ut.length;for(var wt=null,Et=0;Et<gt;Et++){var Nt=ut[Et];switch(Nt.type){case yo:a.moveTo(Nt.endX,Nt.endY);break;case Xi:a.lineTo(Nt.endX,Nt.endY);break;case Wo:a.bezierCurveTo(Nt.point1X,Nt.point1Y,Nt.point2X,Nt.point2Y,Nt.endX,Nt.endY);break;case cr:a.quadraticCurveTo(Nt.point1X,Nt.point1Y,Nt.endX,Nt.endY);break;case er:if(Nt.radiusX===Nt.radiusY){var Ut=Math.PI/180;a.arc(Nt.point1X,Nt.point1Y,Nt.radiusX,Nt.startAngle*Ut,(Nt.startAngle+Nt.sweepAngle)*Ut,0>Nt.sweepAngle,wt!==null?wt.endX:lt.startX,wt!==null?wt.endY:lt.startY)}else if(wt=Ar(Nt,lt),Ut=wt.length,Ut===0)a.lineTo(Nt.centerX,Nt.centerY);else for(var jt=0;jt<Ut;jt++){var ee=wt[jt];jt===0&&a.lineTo(ee[0],ee[1]),a.bezierCurveTo(ee[2],ee[3],ee[4],ee[5],ee[6],ee[7])}break;case Os:if(jt=Ut=0,wt!==null&&wt.type===er){if(wt=Ar(wt,lt),ee=wt.length,ee===0){a.lineTo(Nt.endX,Nt.endY);break}wt=wt[ee-1]||null,wt!==null&&(Ut=wt[6],jt=wt[7])}else Ut=wt!==null?wt.endX:lt.startX,jt=wt!==null?wt.endY:lt.startY;if(wt=Cs(Nt,lt,Ut,jt),Ut=wt.length,Ut===0){a.lineTo(Nt.endX,Nt.endY);break}for(jt=0;jt<Ut;jt++)ee=wt[jt],a.bezierCurveTo(ee[2],ee[3],ee[4],ee[5],ee[6],ee[7]);break;default:xe("Segment not of valid type: "+Nt.type)}Nt.isClosed&&a.closePath(),wt=Nt}ut=lt.isFilled,z?lt.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&(ut&&ot&&Eu(a),a.jk(),ut&&ot&&Vu(a))):(Eu(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk(),Vu(a)):(ut&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk()),a.Se(St)}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=Kn(),z.type===hn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),Af(a,y,E,x);else if(z.type===hn.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,St=b,lt=ot.segments.s,ut=lt.length,gt=0;gt<ut;gt++){switch(Et=lt[gt],Et.type){case yo:Af(a,y,E,x),E.length=0,E.push(Et.endX),E.push(Et.endY),tt=Et.endX,b=Et.endY,rt=tt,St=b;break;case Xi:E.push(Et.endX),E.push(Et.endY),tt=Et.endX,b=Et.endY;break;case Wo:me.Qe(tt,b,Et.point1X,Et.point1Y,Et.point2X,Et.point2Y,Et.endX,Et.endY,.5,E),tt=Et.endX,b=Et.endY;break;case cr:me.ep(tt,b,Et.point1X,Et.point1Y,Et.endX,Et.endY,.5,E),tt=Et.endX,b=Et.endY;break;case er:if(Nt=Ar(Et,ot),wt=Nt.length,wt===0){E.push(Et.centerX),E.push(Et.centerY),tt=Et.centerX,b=Et.centerY;break}for(Ut=0;Ut<wt;Ut++)jt=Nt[Ut],me.Qe(tt,b,jt[2],jt[3],jt[4],jt[5],jt[6],jt[7],.5,E),tt=jt[6],b=jt[7];break;case Os:if(Nt=Cs(Et,ot,tt,b),wt=Nt.length,wt===0){E.push(Et.endX),E.push(Et.endY),tt=Et.endX,b=Et.endY;break}for(Ut=0;Ut<wt;Ut++)jt=Nt[Ut],me.Qe(tt,b,jt[2],jt[3],jt[4],jt[5],jt[6],jt[7],.5,E),tt=jt[6],b=jt[7];break;default:xe("Segment not of valid type: "+Et.type)}Et.isClosed&&(E.push(rt),E.push(St),Af(a,y,E,x))}Af(a,y,E,x)}else if(z.type===hn.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),Af(a,y,E,x);else if(z.type===hn.F){if(b=new tr,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new si(er),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=Ar(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++)St=z[rt],me.Qe(tt,b,St[2],St[3],St[4],St[5],St[6],St[7],.5,E),tt=St[6],b=St[7];Af(a,y,E,x)}oi(E),a.restore(),a.Vc(!1)}}}},bt.kk=function(a,y,x){return!Pe.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)},bt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Pe.prototype.nk.call(this,a)},bt.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)}},bt.ga=function(a,y){if(y===void 0&&(y=new Wt),a instanceof Qn){a.Mc()&&xe("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},bt.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe;y=on.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Wt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Mr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Mr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Mr(a,E.x,E.y,0,0),on.free(y),Wt.free(E),a},bt.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!==hn.j||y||(b+=2);var z=on.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return on.free(z),!1;if(E=b+1e-4,x.type===hn.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:(on.free(z),me.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===hn.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 on.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),on.free(z),a}if(x.type===hn.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 on.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),on.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===hn.o)return on.free(z),this.fill===null?rr(x,a.x,a.y,b):Li(x,a,b,1<this.strokeWidth,y);xe("Unknown Geometry type: "+x.type)},bt.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=bv[ot];if(rt===void 0){var lt=me.Ze[ot];typeof lt=="string"&&(lt=me.Ze[lt]),typeof lt=="function"?(rt=lt(null,100,100),bv[ot]=rt):xe("Unsupported Figure: "+ot)}tt=rt.bounds}ot=tt.width,rt=tt.height,lt=tt.width;var ut=tt.height;switch(ya(this,!0)){case yn:E=x=0;break;case wn:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case ti:lt=Math.max(a-z,0),E=0;break;case mi:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(lt=b.width),isFinite(b.height)&&(ut=b.height);var gt=this.maxSize,St=this.minSize;switch(x=Math.max(x-z,St.width),E=Math.max(E-z,St.height),lt=Math.min(gt.width,lt),ut=Math.min(gt.height,ut),lt=isFinite(lt)?Math.max(x,lt):Math.max(ot,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(rt,E),x=Ev(this),x){case yn:break;case wn:ot=lt,rt=ut;break;case Xn:x=Math.min(lt/ot,ut/rt),isFinite(x)||(x=1),ot*=x,rt*=x;break;default:xe(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&&me.$(this.ua.Sk,a-z)&&me.$(this.ua.Rk,y-z)||(this.ua=Ai.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),lt+z,ut+z),b.w()?(lt=b.width,ut=b.height,lt=Math.min(gt.width,lt),ut=Math.min(gt.height,ut),lt=Math.max(St.width,lt),ut=Math.max(St.height,ut),this.dc.h(0,0,lt,ut)):this.dc.assign(tt)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===Mi?wn:y:y===Mi?bv[a.figure].defaultStretch:y}bt.eh=function(a,y,x,E){Zs(this,a,y,x,E)},bt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},bt.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,lt=-z.m21*tt,ut=z.m11*tt,gt=tt*(z.m21*z.dy-z.m22*z.dx),St=tt*(z.m12*z.dx-z.m11*z.dy);z=a*ot+y*lt+gt,tt=a*rt+y*ut+St,ot=x*ot+E*lt+gt,rt=x*rt+E*ut+St,gt=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var wt=lt.bounds;if(ut=!1,lt.type===hn.j)if(1.5>=this.strokeWidth)ut=me.Ve(lt.startX,lt.startY,lt.endX,lt.endY,z,tt,ot,rt,b);else{if(lt.startX===lt.endX?(E=gt,ut=0):(y=(lt.endY-lt.startY)/(lt.endX-lt.startX),ut=gt/Math.sqrt(1+y*y),E=ut*y),y=Kn(),a=new Wt,me.Ve(lt.startX+E,lt.startY+ut,lt.endX+E,lt.endY+ut,z,tt,ot,rt,a)&&y.push(a),a=new Wt,me.Ve(lt.startX-E,lt.startY-ut,lt.endX-E,lt.endY-ut,z,tt,ot,rt,a)&&y.push(a),a=new Wt,me.Ve(lt.startX+E,lt.startY+ut,lt.startX-E,lt.startY-ut,z,tt,ot,rt,a)&&y.push(a),a=new Wt,me.Ve(lt.endX+E,lt.endY+ut,lt.endX-E,lt.endY-ut,z,tt,ot,rt,a)&&y.push(a),ot=y.length,ot===0)return oi(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);oi(y)}else if(lt.type===hn.u)ut=me.Ff(wt.x-gt,wt.y-gt,wt.x+wt.width+gt,wt.y+wt.height+gt,z,tt,ot,rt,b);else if(lt.type===hn.F){y=on.allocAt(wt.x,wt.y,wt.width,wt.height).Bc(gt,gt);t:if(y.width===0)ut=me.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,ot,rt,b);else if(y.height===0)ut=me.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,ot,rt,b);else{if(a=y.width/2,lt=y.height/2,E=y.x+a,ut=y.y+lt,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+lt*lt-rt*rt){b.x=NaN,b.y=NaN,ut=!1;break t}gt=Math.sqrt(a*a*x*x+lt*lt-rt*rt),ot=(-(a*a*x*rt)+a*lt*gt)/(lt*lt+a*a*x*x)+E,a=(-(a*a*x*rt)-a*lt*gt)/(lt*lt+a*a*x*x)+E,lt=x*(ot-E)+rt+ut,rt=x*(a-E)+rt+ut,Math.abs((z-ot)*(z-ot))+Math.abs((tt-lt)*(tt-lt))<Math.abs((z-a)*(z-a))+Math.abs((tt-rt)*(tt-rt))?(b.x=ot,b.y=lt):(b.x=a,b.y=rt)}else{if(ot=lt*lt,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}on.free(y)}else if(lt.type===hn.o){St=Wt.alloc();var Et=ot-z,Nt=rt-tt,Ut=Et*Et+Nt*Nt,jt=z,ee=tt;if(0<Ut&&wt.contains(jt,ee)&&(St.x=jt,St.y=ee,this.ca(St)))for(Et!==0&&.5>Math.abs(Et)?(Nt*=.5/Et,Et=.5):Nt!==0&&.5>Math.abs(Nt)&&(Et*=.5/Nt,Nt=.5),jt-=Et,ee-=Nt;wt.contains(jt,ee);)jt-=Et,ee-=Nt;for(b.x=ot,b.y=rt,Nt=0;Nt<lt.figures.count;Nt++){var oe=lt.figures.s[Nt],ae=oe.isFilled?jt:z,Se=oe.isFilled?ee:tt,je=oe.segments;wt=oe.startX,Et=oe.startY;for(var Dn=wt,Un=Et,_n=0;_n<je.count;_n++){var bn=je.s[_n],dn=bn.type,Ei=bn.endX,Pi=bn.endY,No=!1;switch(dn){case yo:Dn=Ei,Un=Pi;break;case Xi:No=Am(wt,Et,Ei,Pi,ae,Se,ot,rt,St);break;case Wo:No=me.Eo(wt,Et,bn.point1X,bn.point1Y,bn.point2X,bn.point2Y,Ei,Pi,ae,Se,ot,rt,.6,St);break;case cr:No=me.Eo(wt,Et,wt+2/3*(bn.point1X-wt),Et+2/3*(bn.point1Y-Et),Ei+2/3*(bn.point1X-Ei),Pi+2/3*(bn.point1Y-Pi),Ei,Pi,ae,Se,ot,rt,.6,St);break;case er:case Os:dn=bn.type===er?Ar(bn,oe):Cs(bn,oe,wt,Et);var Yo=dn.length;if(Yo===0){No=Am(wt,Et,bn.type===er?bn.centerX:bn.endX,bn.type===er?bn.centerY:bn.endY,ae,Se,ot,rt,St);break}for(Pi=null,Ei=0;Ei<Yo;Ei++){if(Pi=dn[Ei],Ei===0&&Am(wt,Et,Pi[0],Pi[1],ae,Se,ot,rt,St)){var ss=km(ae,Se,St,Ut,b);ss<Ut&&(Ut=ss,ut=!0)}me.Eo(Pi[0],Pi[1],Pi[2],Pi[3],Pi[4],Pi[5],Pi[6],Pi[7],ae,Se,ot,rt,.6,St)&&(ss=km(ae,Se,St,Ut,b),ss<Ut&&(Ut=ss,ut=!0))}Ei=Pi[6],Pi=Pi[7];break;default:xe("Unknown Segment type: "+dn)}wt=Ei,Et=Pi,No&&(No=km(ae,Se,St,Ut,b),No<Ut&&(Ut=No,ut=!0)),bn.isClosed&&(Ei=Dn,Pi=Un,Am(wt,Et,Ei,Pi,ae,Se,ot,rt,St)&&(bn=km(ae,Se,St,Ut,b),bn<Ut&&(Ut=bn,ut=!0)))}}z=x-a,tt=E-y,ot=Math.sqrt(z*z+tt*tt),ot!==0&&(z/=ot,tt/=ot),b.x-=z*gt,b.y-=tt*gt,Wt.free(St)}else xe("Unknown Geometry type: "+lt.type);return ut?(this.transform.Ga(b),!0):!1};function km(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 Am(a,y,x,E,b,z,tt,ot,rt){if(me.$(a,x)&&me.$(y,E)||me.$(b,tt)&&me.$(z,ot))return!1;var lt=!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||me.$(rt.y,a))&&(rt.y<y||me.$(rt.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(rt.x>y||me.$(rt.x,y))&&(rt.x<a||me.$(rt.x,a))&&(lt=!0)),lt)}bt.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=Wt.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)))),Wt.free(z),b},bt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=fi.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Wt.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 Wt.free(tt),!0;var ot=Wt.alloc(),rt=Wt.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,Jd(this,tt,ot,rt)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Jd(this,tt,ot,rt)?y=!0:(ot.x=E,ot.y=a,ot.transform(x),Jd(this,tt,ot,rt)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Jd(this,tt,ot,rt)&&(y=!0)))),Wt.free(tt),fi.free(x),Wt.free(ot),Wt.free(rt),y};function Jd(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)}bt.tx=function(a,y,x){function E(Ut,jt){for(var ee=Ut.length,oe=0;oe<ee;oe+=2)if(jt.zd(Ut[oe],Ut[oe+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,lt=tt.x+tt.width;if(tt=tt.y+tt.height,Vi(a.x,a.y,ot,rt)<=b&&Vi(a.x,a.y,lt,rt)<=b&&Vi(a.x,a.y,ot,tt)<=b&&Vi(a.x,a.y,lt,tt)<=b)return!0}if(ot=y.startX,rt=y.startY,lt=y.endX,tt=y.endY,y.type===hn.j){if(x=(ot-lt)*(a.x-lt)+(rt-tt)*(a.y-tt),yr(a.x,a.y,ot,rt,lt,tt)<=(0<=(lt-ot)*(a.x-ot)+(tt-rt)*(a.y-rt)&&0<=x?b:z))return!0}else{if(y.type===hn.u)return y=!1,x&&(y=yr(a.x,a.y,ot,rt,ot,tt)<=b||yr(a.x,a.y,ot,rt,lt,rt)<=b||yr(a.x,a.y,lt,rt,lt,tt)<=b||yr(a.x,a.y,ot,tt,lt,tt)<=b),y;if(y.type===hn.F){y=a.x-(ot+lt)/2,z=a.y-(rt+tt)/2;var ut=Math.abs(lt-ot)/2,gt=Math.abs(tt-rt)/2;if(ut===0||gt===0)return yr(a.x,a.y,ot,rt,lt,tt)<=b;if(x){if(a=me.$y(ut,gt,y,z),a*a<=b)return!0}else return!(Vi(y,z,-ut,0)>=b||Vi(y,z,0,-gt)>=b||Vi(y,z,0,gt)>=b||Vi(y,z,ut,0)>=b)}else if(y.type===hn.o){if(lt=y.bounds,z=lt.x,ot=lt.y,rt=lt.x+lt.width,lt=lt.y+lt.height,a.x>rt&&a.x<z&&a.y>lt&&a.y<ot&&yr(a.x,a.y,z,ot,z,lt)>b&&yr(a.x,a.y,z,ot,rt,ot)>b&&yr(a.x,a.y,rt,lt,z,lt)>b&&yr(a.x,a.y,rt,lt,rt,ot)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?rr(y,a.x,a.y,z):Li(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,lt=0;lt<rt;lt++)switch(gt=ot[lt],gt.type){case yo:case Xi:if(tt=gt.endX,ut=gt.endY,a.zd(tt,ut)>b)return!1;break;case Wo:var St=Kn();if(me.Qe(tt,ut,gt.point1X,gt.point1Y,gt.point2X,gt.point2Y,gt.endX,gt.endY,.8,St),tt=E(St,a),oi(St),tt||(tt=gt.endX,ut=gt.endY,a.zd(tt,ut)>b))return!1;break;case cr:if(St=Kn(),me.ep(tt,ut,gt.point1X,gt.point1Y,gt.endX,gt.endY,.8,St),tt=E(St,a),oi(St),tt||(tt=gt.endX,ut=gt.endY,a.zd(tt,ut)>b))return!1;break;case er:case Os:St=gt.type===er?Ar(gt,z):Cs(gt,z,tt,ut);var wt=St.length;if(wt===0){if(tt=gt.type===er?gt.centerX:gt.endX,ut=gt.type===er?gt.centerY:gt.endY,a.zd(tt,ut)>b)return!1;break}gt=null;for(var Et=Kn(),Nt=0;Nt<wt;Nt++)if(gt=St[Nt],Et.length=0,me.Qe(gt[0],gt[1],gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],.8,Et),E(Et,a))return oi(Et),!1;oi(Et),gt!==null&&(tt=gt[6],ut=gt[7]);break;default:xe("Unknown Segment type: "+gt.type)}}return!0}}}return!1},bt.qc=function(){this.ua=null},bt.kq=function(){return this.ig};function m1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=op,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Bo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Qn(1-Bo.x,Bo.y)))}Ai.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Mu[a.toArrow];else a.fromArrow!=="None"?E=Mu[a.fromArrow]:(E=me.Ze[a.figure],typeof E=="string"&&(E=me.Ze[E]),E===void 0&&xe("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=me.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function v1(a){var y=Mu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Mu[x],y===void 0){var E=null,b;for(b in me.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=hn.parse(me.um[E],!1),Mu[E]=a,x!==E&&(Mu[x]=E),E}}return typeof y=="string"?y:y instanceof hn?a:null}re.Object.defineProperties(Ai.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),Es(this)&&(a=this.part,a!==null&&ur(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=hn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Wt.allocAt(-y.x,-y.y),Wt.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&&Oc(a,"Shape.fill"),a instanceof Io&&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&&Oc(a,"Shape.stroke"),a instanceof Io&&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 Mn(a,"value >= 0",Ai,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Mn(a,'"butt", "round", or "square"',Ai,"strokeCap"):(Xd(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Mn(a,'"miter", "bevel", or "round"',Ai,"strokeJoin"):(Xd(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){Xd(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)||xe("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&&(Xd(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=me.Ze[a];typeof x=="function"?x=a:(x=me.Ze[a.toLowerCase()])||xe("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=v1(a);x===null?xe("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new rd),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),m1(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=v1(a);x===null?xe("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new rd),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),m1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Ge},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Xd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Ge},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Xd(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&&(Xd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Mi},set:function(a){var y=this.geometryStretch;y!==a&&(Xd(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 Lu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&uu(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 Lu),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 Lu),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 Lu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Ai.prototype.intersectsRect=Ai.prototype.Yc,Ai.prototype.containedInRect=Ai.prototype.fh,Ai.prototype.getNearestIntersectionPoint=Ai.prototype.rs,Ai.prototype.getDocumentBounds=Ai.prototype.mi,Ai.prototype.getDocumentPoint=Ai.prototype.ga;var Mu=new di,bv=new di;Ai.className="Shape",Ai.getFigureGenerators=function(){var a=new Yn,y;for(y in me.Ze)y!==y.toLowerCase()&&a.add(y,me.Ze[y]);return a.freeze(),a},Ai.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=me.Ze;E[a]=y,E[x]=a},Ai.getArrowheadGeometries=function(){var a=new Yn;for(E in me.um)if(Mu[E]===void 0){var y=hn.parse(me.um[E],!1);Mu[E]=y,y=E.toLowerCase(),y!==E&&(Mu[y]=E)}for(var x in Mu)if(x!==x.toLowerCase()){var E=Mu[x];E instanceof hn&&a.add(x,E)}return a.freeze(),a},Ai.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=hn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||xe("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Mu;E[a]=x,E[y]=a};function Mv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Mi,this.gg=this.fg=Ge}Mv.prototype.copy=function(){var a=new Mv;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 Qo(a,y){return Pe.call(this),Rm||(Sa=Lr?new wl(null).context:null,Rm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Le(Qo,Pe),Qo.prototype.cloneProtected=function(a){Pe.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 fu(a){a.da===null?a.da=new Tv:a.da.nc&&(a.da=a.da.copy())}bt=Qo.prototype,bt.th=function(){Pe.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function y1(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}bt.qb=function(a){a.classType===Qo?this.wrap=a:Pe.prototype.qb.call(this,a)},bt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},bt.v=function(){Pe.prototype.v.call(this)},bt.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=Jg(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 lt=this.isStrikethrough;Nr(this,a,this.xc,!0,!1,x,E),(rt||lt)&&Nr(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,gt=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var St=y.scale;switch(8>(gt*gt+ut*ut)*St*St&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ra&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,gt=this.spacingBelow,this.flip){case ho:a.translate(b,0),a.scale(-1,1);break;case Zi:a.translate(0,z),a.scale(1,-1);break;case Zo:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,St=(y+tt+gt)*ut,z>St&&(E=this.verticalAlignment,E=E.y*z-E.y*St+E.offsetY),ut===1&&this.ze!==null)gt=this.Cb,gt>b&&(gt=b),this.Oj(this.ze,a,0,E+y,b,tt,gt,x,ot,rt,lt);else if(this.Qc!==null&&this.Qb!==null)for(St=0;St<ut;St++){var wt=this.Qc[St];wt>b&&(wt=b),E+=y,this.Oj(this.Qb[St],a,0,E,b,tt,wt,x,ot,rt,lt),E+=tt+gt}switch(this.flip){case ho:a.scale(-1,1),a.translate(-b,0);break;case Zi:a.scale(1,-1),a.translate(0,-z);break;case Zo:a.scale(-1,-1),a.translate(-b,-z)}}},bt.Oj=function(a,y,x,E,b,z,tt,ot,rt,lt,ut){var gt=0;if(ot)rt==="left"?gt=0:rt==="right"?gt=b-tt:rt==="center"&&(gt=(b-tt)/2),y.fillRect(x+gt,E+.25*z,tt,1);else{if(rt==="left"?gt=0:rt==="right"?gt=b:rt==="center"&&(gt=b/2),b=Tm!==null?Tm(this,z):.75*z,y.fillText(a,x+gt,E+b),a=z/20|0,a===0&&(a=1),rt==="right"?gt-=tt:rt==="center"&&(gt-=tt/2),lt){ot=Om!==null?Om(this,z):.8*z,rt=x+gt,lt=E+ot,b=x+gt+tt,ot=E+ot;var St=a;y.beginPath(),y.lineWidth=St,y.moveTo(rt,lt),y.lineTo(b,ot),y.stroke(),y.Se(),y instanceof Ra&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+gt,z=ut,x=x+gt+tt,tt=ut,gt=a,y.beginPath(),y.lineWidth=gt,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Ra&&y.ad.classList.add("gojs-td"))}},bt.kk=function(a,y,x){if(!Pe.prototype.kk.call(this,a,y,x))return!1;if(Nr(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++)Jy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Jy(a,y,!0);return!0},bt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Pe.prototype.nk.call(this,a)},bt.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)}},bt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;Sa!==null&&b1!==z&&(b1=Sa.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 lt=z.indexOf(`
`,ot);lt===-1&&(lt=z.length,rt=!0),ot=z.substr(ot,lt-ot),this.formatting===Qg&&(ot=ot.trim()),tt=Math.max(tt,Rl(ot)),ot=lt+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=Rl(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=x1(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===Dm&&(y=this.Ae,y=this.overflow===Dm?S1(y):0,lt=this.spacingAbove+this.spacingBelow,lt=Math.max(0,Jg(this)+lt),rt=Math.min(this.maxLines-1,Math.max(Math.floor(rt/lt+.01)-1,0)),!(rt+1>=this.Qb.length))){for(this.l|=16777216,lt=this.Qb[rt],y=Math.max(1,a-y);Rl(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=qg,y=Rl(lt),this.Qb[rt]=lt,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===P1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),ds(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},bt.eh=function(a,y,x,E){Zs(this,a,y,x,E)};function Xg(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 Lv(a,y,x,E){var b=a.formatting===Qg;b&&(y=y.trim());var z=0,tt=a.Ae,ot=a.spacingAbove+a.spacingBelow;ot=Math.max(0,Jg(a)+ot);var rt=a.overflow===Dm?S1(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,ot);else if(tt=y,a.wrap===Fv){a.Le=1;var lt=Rl(y);if(rt===0||lt<=x)a.Cb=Math.max(a.Cb,lt),Xg(a,y,a.Cb),E!==null&&E.h(lt,ot);else{for(z=Tf(a,tt),tt=tt.substr(z.length),y=Tf(a,tt),lt=Rl(z+y);0<y.length&&lt<=x;)z+=y,tt=tt.substr(y.length),y=Tf(a,tt),lt=z+y,b&&(lt=lt.trim()),lt=Rl(lt);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-rt);Rl(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=qg;var ut=Rl(z);a.Cb=ut,Xg(a,z,ut),E!==null&&E.h(ut,ot)}}else{for(rt=0,tt.length===0&&(rt=1,Xg(a,tt,0));0<tt.length;){for(y=Tf(a,tt),tt=tt.substr(y.length);Rl(y)>x;){var gt=1;for(lt=Rl(y.substr(0,gt)),ut=0;lt<=x;)gt++,ut=lt,lt=Rl(y.substr(0,gt));if(gt===1){var St=lt;z=Math.max(z,lt)}else St=ut,z=Math.max(z,ut);if(gt--,1>gt&&(gt=1),Xg(a,y.substr(0,gt),St),rt++,y=y.substr(gt),a.Gc+rt>a.maxLines)break}for(ut=Tf(a,tt),lt=Rl(y+ut);0<ut.length&&lt<=x;)y+=ut,tt=tt.substr(ut.length),ut=Tf(a,tt),lt=y+ut,b&&(lt=lt.trim()),lt=Rl(lt);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(gt=lt,z=Math.max(z,lt)):(gt=ut=Rl(y),z=Math.max(z,ut)),Xg(a,y,gt),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 Tf(a,y){if(a.wrap===w1)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===C1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function Rl(a){return Sa===null?8*a.length:Sa.measureText(a).width}function Jg(a){if(a.df!==null)return a.df;var y=a.Ae;if(Sa===null){var x=16;return a.df=x}return kv[y]!==void 0&&5e3>E1?x=kv[y]:(x=1.3*Sa.measureText("M").width,kv[y]=x,E1++),a.df=x}function S1(a){if(Sa===null)return 6;if(Im[a]!==void 0&&5e3>Av)var y=Im[a];else y=Sa.measureText(qg).width,Im[a]=y,Av++;return y}function x1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Jg(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!==Fv){a.Le=0;var rt=Nn.alloc();Lv(a,z,y,rt),b+=rt.height,Nn.free(rt),a.Gc+=a.Le}else Lv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(ot=!0)}z=tt+1}return a.Lq=b}re.Object.defineProperties(Qo.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"||(fu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:yn},set:function(a){var y=this.flip;y!==a&&(fu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ui},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),fu(this),this.da.Yr=a,ea(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Nn.alloc();Lv(this,this.ec,999999,a);var y=a.width;Nn.free(a),a=x1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),ds(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:Bv},set:function(a){var y=this.wrap;y!==a&&(fu(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&&(fu(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&&Oc(a,"TextBlock.stroke"),a instanceof Io&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Jg(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&&(fu(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&&(fu(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 Lu),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 Lu),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 Lu),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 Lu),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 Lu),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&&(fu(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&&(fu(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&&(fu(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&&(fu(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Qg},set:function(a){var y=this.formatting;y!==a&&(fu(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&&Mn(a,"> 0",Qo,"maxLines"),fu(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 Tm=null,Om=null,Fv=new Oe(Qo,"None",0),P1=new Oe(Qo,"WrapFit",1),Bv=new Oe(Qo,"WrapDesiredSize",2),w1=new Oe(Qo,"WrapBreakAll",3),Nv=new Oe(Qo,"OverflowClip",0),Dm=new Oe(Qo,"OverflowEllipsis",1),Qg=new Oe(Qo,"FormatTrim",0),C1=new Oe(Qo,"FormatNone",0),Sx=/[ \u200b\u00ad]/,kv=new di,E1=0,Im=new di,Av=0,qg="...",b1="",Sa=null,Rm=!1;Qo.className="TextBlock";function Tv(){this.nc=!1,this.Hd=null,this.Xf=yn,this.gq=Qg,this.Jq=1/0,this.$q=Nv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ui,this.$r=Bv}Tv.prototype.copy=function(){var a=new Tv;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},Qo.getEllipsis=function(){return qg},Qo.setEllipsis=function(a){qg=a,Im=new di,Av=0},Qo.getBaseline=function(){return Tm},Qo.setBaseline=function(a){Tm=a},Qo.getUnderline=function(){return Om},Qo.setUnderline=function(a){Om=a},Qo.isValidFont=function(a){if(Rm||(Sa=Lr?new wl(null).context:null,Rm=!0),Sa===null)return!0;var y=Sa.font;if(a===y||a==="10px sans-serif")return!0;Sa.font="10px sans-serif",Sa.font=a;var x=Sa.font;if(x!=="10px sans-serif")return Sa.font=y,!0;Sa.font="19px serif";var E=Sa.font;return Sa.font=a,x=Sa.font,Sa.font=y,x!==E},Qo.FormatNone=C1,Qo.FormatTrim=Qg,Qo.None=Fv,Qo.OverflowClip=Nv,Qo.OverflowEllipsis=Dm,Qo.WrapBreakAll=w1,Qo.WrapDesiredSize=Bv,Qo.WrapFit=P1;function Lu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Lu.prototype.copy=function(){var a=new Lu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Lu.className="GradElementSettings";function xa(a,y){Pe.call(this),this.Eg=null,this.qo="",this.Xg=Ko,this.Nk=wn,this.Zg=this.Hd=null,this.Mk=wo,this.Xf=yn,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 Of;Le(xa,Pe),xa.prototype.cloneProtected=function(a){Pe.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},xa.prototype.qb=function(a){a===yn||a===Xn||a===ro?this.imageStretch=a:Pe.prototype.qb.call(this,a)},xa.prototype.toString=function(){return"Picture("+this.source+")#"+Si(this)};function Df(a){a===void 0&&(a=""),a!==""?Of[a]&&(delete Of[a],jm--):(Of=new di,jm=0)}function M1(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()||(Xr(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=Kn();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);oi(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}xa.prototype.hA=function(){if(this.source!==""){Df(this.source);var a=this.source;this.source="",this.source=a}},xa.prototype.redraw=function(){this.N(),this.Uc=!0},xa.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 Kd)){var b=a instanceof Ra;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 lt=rt,ut=ot;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,rt=this.Xg.width,ot=this.Xg.height);var gt=rt,St=ot,wt=this.Nk,Et=this.Mk;switch(wt){case yn:if(this.sourceRect.w())break;gt>=E.width&&(z=z+Et.offsetX+(gt*Et.x-E.width*Et.x)),St>=E.height&&(tt=tt+Et.offsetY+(St*Et.y-E.height*Et.y)),rt=Math.min(E.width,gt),ot=Math.min(E.height,St);break;case wn:gt=E.width,St=E.height;break;case Xn:case ro:wt===Xn?(wt=Math.min(E.height/St,E.width/gt),gt*=wt,St*=wt):wt===ro&&(wt=Math.max(E.height/St,E.width/gt),gt*=wt,St*=wt,gt>=E.width&&(z=(z+Et.offsetX+(gt*Et.x-E.width*Et.x)/gt)*rt),St>=E.height&&(tt=(tt+Et.offsetY+(St*Et.y-E.height*Et.y)/St)*ot),rt*=1/(gt/E.width),ot*=1/(St/E.height),gt=E.width,St=E.height)}wt=this.Df()*y.scale;var Nt=gt*wt*St*wt,Ut=rt*ot/Nt,jt=x.__goCache;wt=null;var ee=xx;if(!b){if(x.sq&&jt!==void 0&&4<Nt&&Ut>ee*ee)for(jt.gi===null&&(F1(jt,4,lt,ut,x),F1(jt,16,lt,ut,x)),b=jt.gi,lt=b.length,ut=0;ut<lt&&b[ut].ratio*b[ut].ratio<Ut;ut++)wt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new wl(null).context;try{b.drawImage(this.Eg,0,0)}catch(oe){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(oe){this.vl=!0}}if(this.vl)return}}switch(b=gt<E.width?Et.offsetX+(E.width*Et.x-gt*Et.x):0,Et=St<E.height?Et.offsetY+(E.height*Et.y-St*Et.y):0,this.flip){case ho:a.translate(Math.min(E.width,gt),0),a.scale(-1,1);break;case Zi:a.translate(0,Math.min(E.height,St)),a.scale(1,-1);break;case Zo:a.translate(Math.min(E.width,gt),Math.min(E.height,St)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&jt!==void 0&&wt!==null&&wt.ratio!==1){a.save(),y=wt.ratio;try{a.drawImage(wt.source,z/y,tt/y,Math.min(wt.source.width,rt/y),Math.min(wt.source.height,ot/y),b,Et,Math.min(E.width,gt),Math.min(E.height,St)),a instanceof Ra&&(this.bt=[z/y,tt/y,Math.min(wt.source.width,rt/y),Math.min(wt.source.height,ot/y),b,Et,Math.min(E.width,gt),Math.min(E.height,St)])}catch(oe){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,rt,ot,b,Et,Math.min(E.width,gt),Math.min(E.height,St)),a instanceof Ra&&(this.bt=[z,tt,rt,ot,b,Et,Math.min(E.width,gt),Math.min(E.height,St)])}catch(oe){this.en=!1}switch(this.flip){case ho:a.scale(-1,1),a.translate(-Math.min(E.width,gt),0);break;case Zi:a.scale(1,-1),a.translate(0,-Math.min(E.height,St));break;case Zo:a.scale(-1,-1),a.translate(-Math.min(E.width,gt),-Math.min(E.height,St))}}}}},xa.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=ya(this,!0),tt=this.Eg,ot=this.qn,rt=0,lt=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,lt=ot?+tt.height:tt.naturalHeight),isFinite(b.width)||z===wn||z===ti?(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===wn||z===mi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=lt)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:lt),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),ds(this.dc,a,y),this.Ge(0,0,a,y)},xa.prototype.eh=function(a,y,x,E){Zs(this,a,y,x,E)},re.Object.defineProperties(xa.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||xe("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Ag(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new mn),E!==null&&x&&nd(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()||(Xr(this,!1),this.v())):x&&M1(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=Of;if(Lr){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<jm&&(Df(),x=Of),E=qe("img"),E.hn=!0,M1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,jm++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new L1),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}}}),xa.prototype.redraw=xa.prototype.redraw,xa.prototype.reloadSource=xa.prototype.hA;var jm=0,xx=4;xa.className="Picture",Of=new di,xa.clearCache=Df;function L1(){this.gi=null}function F1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new wl(null),tt=z.context,ot=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new B1(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))}L1.className="PictureCacheArray";function B1(a,y){this.source=a,this.ratio=y}B1.className="PictureCacheInstance";function If(){this.os=new hn,this.mc=null}If.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new hn,this.mc=null};function Rf(a,y,x,E,b,z){a.mc=new tr,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 Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}If.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new si(yo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},If.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new si(Xi);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Eh(a,y,x,E,b,z,tt){var ot;ot===void 0&&(ot=!1);var rt=new si(Wo);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 zm(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new si(cr);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}If.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var ot=new si(er);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 wx(a,y,x,E,b,z,tt,ot){var rt;rt===void 0&&(rt=!1),y=new si(Os,tt,ot,y,x,E,b,z),rt&&y.close(),a.mc.segments.add(y)}function N1(a){var y=_m;return y!==null?(_m=null,y.reset(a),y):(y=new If,y.reset(a),y)}var _m=null;If.className="StreamGeometryContext";function zs(a,y){var x=a.toLowerCase(),E=me.Ze;E[a]=y,E[x]=a}zs("Rectangle",function(a,y,x){a="r"+y+","+x;var E=me.Mf[a];return E!==void 0||(E=new hn(hn.u),E.endX=y,E.endY=x,me.Nf<me.vm&&(me.Mf[a]=E,me.Nf++)),E}),zs("Square",function(a,y,x){a="s"+y+","+x;var E=me.Mf[a];return E!==void 0||(E=new hn(hn.u),E.endX=y,E.endY=x,E.defaultStretch=Xn,me.Nf<me.vm&&(me.Mf[a]=E,me.Nf++)),E}),zs("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=me.Mf[E];if(b!==void 0)return b;var z=a*me.wg;return b=new hn().add(new tr(a,0,!0).add(new si(Xi,y-a,0)).add(new si(Wo,y,a,y-z,0,y,z)).add(new si(Xi,y,x-a)).add(new si(Wo,y-a,x,y,x-z,y-z,x)).add(new si(Xi,a,x)).add(new si(Wo,0,x-a,z,x,0,x-z)).add(new si(Xi,0,a)).add(new si(Wo,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Qn(0,0,z,z),b.spot2=new Qn(1,1,-z,-z)),me.Nf<me.vm&&(me.Mf[E]=b,me.Nf++),b}),zs("Border","RoundedRectangle"),zs("Ellipse",function(a,y,x){a="e"+y+","+x;var E=me.Mf[a];return E!==void 0||(E=new hn(hn.F),E.endX=y,E.endY=x,E.spot1=Uo,E.spot2=dr,me.Nf<me.vm&&(me.Mf[a]=E,me.Nf++)),E}),zs("Circle",function(a,y,x){a="c"+y+","+x;var E=me.Mf[a];return E!==void 0||(E=new hn(hn.F),E.endX=y,E.endY=x,E.spot1=Uo,E.spot2=dr,E.defaultStretch=Xn,me.Nf<me.vm&&(me.Mf[a]=E,me.Nf++)),E}),zs("TriangleRight",function(a,y,x){return new hn().add(new tr(0,0).add(new si(Xi,y,.5*x)).add(new si(Xi,0,x).close())).pm(0,.25,.5,.75)}),zs("TriangleDown",function(a,y,x){return new hn().add(new tr(0,0).add(new si(Xi,y,0)).add(new si(Xi,.5*y,x).close())).pm(.25,0,.75,.5)}),zs("TriangleLeft",function(a,y,x){return new hn().add(new tr(y,x).add(new si(Xi,0,.5*x)).add(new si(Xi,y,0).close())).pm(.5,.25,1,.75)}),zs("TriangleUp",function(a,y,x){return new hn().add(new tr(y,x).add(new si(Xi,0,x)).add(new si(Xi,.5*y,0).close())).pm(.25,.5,.75,1)}),zs("Triangle","TriangleUp"),zs("Diamond",function(a,y,x){return new hn().add(new tr(.5*y,0).add(new si(Xi,0,.5*x)).add(new si(Xi,.5*y,x)).add(new si(Xi,y,.5*x).close())).pm(.25,.25,.75,.75)}),zs("LineH",function(a,y,x){return a=new hn(hn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),zs("LineV",function(a,y,x){return a=new hn(hn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),zs("None","Rectangle"),zs("BarH","Rectangle"),zs("BarV","Rectangle"),zs("MinusLine","LineH"),zs("PlusLine",function(a,y,x){return new hn().add(new tr(0,x/2,!1).add(new si(Xi,y,x/2)).add(new si(yo,y/2,0)).add(new si(Xi,y/2,x)))}),zs("XLine",function(a,y,x){return new hn().add(new tr(0,x,!1).add(new si(Xi,y,0)).add(new si(yo,0,0)).add(new si(Xi,y,x)))}),zs("LineRight",function(a,y,x){return new hn().add(new tr(.25*y,0,!1).add(new si(Xi,.75*y,.5*x)).add(new si(Xi,.25*y,x)))}),zs("LineDown",function(a,y,x){return new hn().add(new tr(0,.25*x,!1).add(new si(Xi,.5*y,.75*x)).add(new si(Xi,y,.25*x)))}),zs("LineLeft",function(a,y,x){return new hn().add(new tr(.75*y,0,!1).add(new si(Xi,.25*y,.5*x)).add(new si(Xi,.75*y,x)))}),zs("LineUp",function(a,y,x){return new hn().add(new tr(0,.75*x,!1).add(new si(Xi,.5*y,.25*x)).add(new si(Xi,y,.75*x)))}),me.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 Ov(){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=Ge,this.Gq="",this.Hq=is,this.Pq=br,this.Kq=Fr,this.Up=null,this.Cq=127,this.zr=qr,this.yr="gray",this.Vg=4}Ov.prototype.copy=function(){var a=new Ov;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 ai(a,y){a===void 0||a instanceof es||typeof a=="string"?Cn.call(this,a):(Cn.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 Wt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new on,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Le(ai,Cn),ai.prototype.cloneProtected=function(a){Cn.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},bt=ai.prototype,bt.Af=function(a){Cn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},bt.toString=function(){var a=ui(this.constructor)+"#"+Si(this);return this.data!==null&&(a+="("+xi(this.data)+")"),a};function Pa(a){a.P===null?a.P=new Ov:a.P.nc&&(a.P=a.P.copy())}bt.th=function(){Cn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},bt.gk=function(a,y,x,E,b,z,tt){var ot=this.diagram;ot!==null&&(a===wr&&y==="elements"?b instanceof Cn?Yd(b,function(rt){ay(ot.partManager,rt),Hd(ot,rt)}):nd(ot,b):a===Rr&&y==="elements"&&(b instanceof Cn?Yd(b,function(rt){ly(ot.partManager,rt,ot)}):Ag(ot,b)),ot.cb(a,y,x,E,b,z,tt))},bt.La=function(a){if(Cn.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 Cn&&Yd(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},ai.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},ai.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},ai.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 Yn),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)))}}},ai.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)}},ai.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Kn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);oi(y)}},ai.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 bi?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Eo))break t;Cl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Cn.Link),x.adornedObject=y)}if(x!==null){x.type===Cn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},ai.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 Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Hm(a){if(sd(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function k1(a){if(a.G|=2097152,sd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||O1(a,y,x),x=a.Ib;var E=on.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),on.free(E),Rv(a,!1)}}ai.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new fi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},ai.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=wo;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Wt.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),Wt.free(tt)}},ai.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ai.prototype.moveTo=function(a,y,x){a=Wt.allocAt(a,y),this.move(a,x),Wt.free(a)},ai.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())},ai.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())},ai.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Yn),y.I(a)!==null)return y.I(a);var x=Cn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function bh(a,y,x,E){E===void 0&&(E=new Wt),x=x.Mc()?wo: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}ai.prototype.mi=function(a){return a===void 0&&(a=new on),a.assign(this.actualBounds)},ai.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function A1(a){var y=Wt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Ai?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 Qd(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=u1(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}ai.prototype.arrange=function(){if(na(this)===!1)k1(this);else{Cu(this,!1);var a=this.Ib,y=on.alloc();y.assign(a);var x=ad(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;O1(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()||me.B(y.width,a.width)&&me.B(y.height,a.height)||0<=this.vw&&this.C(16),on.free(y),Rv(this,!1)}},bt=ai.prototype,bt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=on.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),on.free(b)}!(this.G&65536)&&a.D(y)||R1(this,E,x),x.N(),!a.w()&&!y.w()||cs(a,y)||(this instanceof Rn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},bt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&T1(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 Wt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),sd(this)===!1&&na(this)===!1&&(Hm(this),k1(this)),!0};function T1(a,y,x,E,b){y===null||a instanceof Eo||(y=y.animationManager,y.zb&&lf(y,a,new Wt(E,b),x))}bt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;sd(this)||na(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)}Hm(this)},bt.Av=function(){this.G&=-2097153,Hm(this)};function O1(a,y,x){var E=A1(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?D1(a,y,x,b,E):I1(a,y,x,b,E):z?D1(a,y,x,b,E):tt&&I1(a,y,x,b,E),a.G|=2097152,Wt.free(E),a.Uk()}function D1(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 Eo||lf(x,a,new Wt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Wt(z,tt),y.copy()))}function I1(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 R1(a,y,x){jv(a,!1),a instanceof Rn&&yh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?ad(a)?(Zl(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}bt.si=function(){return!0},bt.Zc=function(){return!0},bt.ph=function(){return!1},bt.Dd=function(){return!0};function Iv(a,y,x,E){y.constructor===a.constructor||_1||(_1=!0,Vn('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Vn(" Old class: "+ui(a.constructor)+", new class: "+ui(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,lt=!1;a instanceof Rn&&(ot=a.isTreeLeaf,rt=a.isTreeExpanded,lt=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof Rn&&(a.U=ot?a.U|4:a.U&-5,a.U=rt?a.U|1:a.U&-2,a.U=lt?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}ai.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},ai.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},ai.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},ai.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},ai.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},ai.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},ai.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},ai.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},ai.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 sd(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 ad(a){return(a.G&131072)!==0}bt=ai.prototype,bt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Gm(a,y){a.G=y?a.G|1048576:a.G&-1048577}bt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},bt.N=function(){var a=this.diagram;a!==null&&!na(this)&&!sd(this)&&this.isVisible()&&this.Ib.w()&&a.N(Qd(this,this.Ib))},bt.v=function(){Cn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Rn&&this.labeledLink!==null&&ea(this.labeledLink),a.$b(!0))},bt.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},bt.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},bt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},bt.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof Rn&&(y=y.labeledLink,y!==null)?zv(a,y):0}bt.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Rn&&(x=y.labeledLink,x!==null)?j1(a,x):y}bt.Td=function(a){return a instanceof bi?_v(this,this,a):!1};function _v(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!_v(a,E,x)?y instanceof Rn&&(y=y.labeledLink,y!==null)?_v(a,y,x):!1:!0}bt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof bi&&Gm(y,!0),y instanceof Rn){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 Rn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof bi&&Gm(y,!1),y instanceof Rn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},ai.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Rn&&this.isLinkLabel)},ai.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 Rn&&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 z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function ld(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Eo)){if(a.add(y),y instanceof Rn){if(x&&y instanceof bi)for(var tt=y.memberParts;tt.next();)ld(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,lt=ot.toNode;rt=rt===null||a.contains(rt),lt=lt===null||a.contains(lt),(b?rt&&lt:rt||lt)&&ld(a,ot,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)ld(a,y.value,x,E-1,b,z)}else if(y instanceof Ln)for(y=y.labelNodes;y.next();)ld(a,y.value,x,E,b,z)}}re.Object.defineProperties(ai.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?fo: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(Rr,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(wr,"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&&(Pa(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&&df(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 Eo?this.type!==Cn.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:br},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Pa(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Fr},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Pa(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&&(Pa(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(),Pa(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,na(this)===!1&&(Hm(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)),T1(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 Eo)){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 Eo?this instanceof Eo&&(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&&(Cl(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(z!==null&&z.jm(E,a),x=dS(x.partManager,E,a),x!==null&&(Cl(x),x=x.copy(),x===null||x instanceof Ln||(E=this.location.copy(),Iv(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){Iv(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&&(Pa(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&&(Pa(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&&(Pa(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 Ln?(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&&(Pa(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&&(Pa(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&&(Pa(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(),Pa(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&&(Pa(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&&(Pa(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:Ge},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Pa(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&&xe("Cannot make a Group a member of itself: "+this.toString()),xe("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof bi&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof bi&&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 bi){for(x=new mn,ld(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Rn)for(E=E.linksConnected;E.next();)jf(E.value)}if(this instanceof Rn){for(x=this.linksConnected;x.next();)jf(x.value);x=this.labeledLink,x!==null&&jf(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&df(y,-1,a))}}else xe("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&&(Pa(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Rn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Pa(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&&(Pa(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:qr},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Pa(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&&(Pa(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&&(Pa(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),ai.prototype.invalidateLayout=ai.prototype.C,ai.prototype.findCommonContainingGroup=ai.prototype.px,ai.prototype.isMemberOf=ai.prototype.Td,ai.prototype.findTopLevelPart=ai.prototype.sz,ai.prototype.findSubGraphLevel=ai.prototype.oz,ai.prototype.ensureBounds=ai.prototype.Va,ai.prototype.getDocumentBounds=ai.prototype.mi,ai.prototype.findObject=ai.prototype.fb,ai.prototype.moveTo=ai.prototype.moveTo,ai.prototype.invalidateAdornments=ai.prototype.Wb,ai.prototype.clearAdornments=ai.prototype.Ej,ai.prototype.removeAdornment=ai.prototype.Jf,ai.prototype.addAdornment=ai.prototype.bh,ai.prototype.findAdornment=ai.prototype.Pj,ai.prototype.updateTargetBindings=ai.prototype.La;var _1=!1;ai.className="Part",ai.LayoutNone=0,ai.LayoutAdded=1,ai.LayoutRemoved=2,ai.LayoutShown=4,ai.LayoutHidden=8,ai.LayoutNodeSized=16,ai.LayoutGroupLayout=32,ai.LayoutNodeReplaced=64,ai.LayoutStandard=127,ai.LayoutAll=16777215;function Eo(a,y){a===void 0||a instanceof es||typeof a=="string"?ai.call(this,a):(ai.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}Le(Eo,ai),Eo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Eo.prototype.updateRelationshipsFromData=function(){},Eo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Ln&&y instanceof Ai){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 Ai&&(b.ua=a)}}},Eo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!na(a))},Eo.prototype.Zc=function(){return!1},Eo.prototype.gk=function(a,y,x,E,b,z,tt){if(a===wr&&y==="elements"){if(b instanceof oa)this.$a===null&&(this.$a=b);else if(b instanceof Cn){var ot=b.Nl(function(rt){return rt instanceof oa});ot instanceof oa&&this.$a===null&&(this.$a=ot)}}else a===Rr&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Cn&&this.$a.rg(E)&&(this.$a=null));ai.prototype.gk.call(this,a,y,x,E,b,z,tt)},Eo.prototype.updateAdornments=function(){},Eo.prototype.Lj=function(){},re.Object.defineProperties(Eo.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}}}),Eo.className="Adornment";function Hv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Aa,this.er=Vm,this.Kr=this.ij=this.Nq=this.Mq=null}Hv.prototype.copy=function(){var a=new Hv;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 Rn(a,y){a===void 0||a instanceof es||typeof a=="string"?ai.call(this,a):(ai.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new pn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Le(Rn,ai),Rn.prototype.cloneProtected=function(a){ai.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},bt=Rn.prototype,bt.Af=function(a){ai.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Mh(a){a.Ba===null?a.Ba=new Hv:a.Ba.nc&&(a.Ba=a.Ba.copy())}bt.th=function(){ai.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new mn),a.af.add(y))}function G1(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}bt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},bt.gk=function(a,y,x,E,b,z,tt){a===wr&&y==="elements"?this.wc=null:a===Rr&&y==="elements"&&(this.wc=null),ai.prototype.gk.call(this,a,y,x,E,b,z,tt)},bt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(ja(x.fromPort),ja(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(ja(x.fromPort),ja(x.toPort),x.bb())}}function ja(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||ja(y.port)}}bt.si=function(){return!0},Rn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Rn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Rn.prototype.isVisible=function(){if(!ai.prototype.isVisible.call(this))return!1;var a=!0,y=xh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===xh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Yr){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===Cf&&(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},Rn.prototype.Zb=function(a){ai.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)}},Rn.prototype.qx=function(){var a=new mn,y=new mn;return Z1(this,this,a,y),y.iterator};function Z1(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)&&Z1(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}Rn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Ti(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},bt=Rn.prototype,bt.Mo=function(a){a===void 0&&(a=null);var y=new Ti(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},bt.Sd=function(a){a===void 0&&(a=null);var y=new Ti(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},bt.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 mn,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 mn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Hi(x):fo},bt.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 mn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Hi(x):fo},bt.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 mn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Hi(x):fo},bt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Ti(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},bt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Ti(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 Wm(a,y,x){ja(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 Zm(a,y,x){ja(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)):tp(y)))}function tp(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}}}Rn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},bt=Rn.prototype,bt.Vo=function(a){ai.prototype.Vo.call(this,a),a||(tp(this),a=this.Yk,a!==null&&q1(a,this))},bt.Wo=function(a){ai.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},bt.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,ai.prototype.Lj.call(this)},bt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new Yn:a.wc.clear(),a.qm(a,function(y,x){U1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function U1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Gv(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=Kn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);oi(x)}}}bt.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},bt.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}},bt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Gm(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;)Gm(y,!1),y=y.pg();return x},bt.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},bt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Rn)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},bt.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 mn;return a(this,y),y},bt.uz=function(){return $1(this,this)};function $1(a,y){return y=y.pg(),y===null?0:1+$1(a,y)}bt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Ti(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},bt.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 pn,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 pn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Hi(x):fo},bt.wz=function(a){a===void 0&&(a=1/0);var y=new mn;return ld(y,this,!1,a,!0),y},Rn.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 mn;x.add(this),K1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===xh),y.Ue=!1}};function K1(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),K1(rt,y,x,E-1,b,z,tt)))}else Y1(a,y,x,b,z,tt)}function Y1(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),rt={};ot.next();){var lt=ot.value;if(lt.isTreeLink&&(lt=lt.To(a),lt!==null&&lt!==a)){var ut=y.contains(lt);if(ut||y.add(lt),tt){var gt=x?lt.Oo():lt.Po();rt.uv=a,gt.all(function(St){return function(wt){return wt===St.uv||!wt.isTreeExpanded}}(rt))&&E.Aj(lt,b),lt.oh(),lt.Zb(!1)}lt.isTreeExpanded&&(lt.wasTreeExpanded=lt.isTreeExpanded,ut||Y1(lt,y,x,E,b,z))}rt={uv:rt.uv}}a.isTreeExpanded=!1}Rn.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 mn;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===xh),y.Ue=!1}};function X1(a,y,x,E,b,z,tt){for(var ot=z===a?!1:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),lt={};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 gt=x?ut.Oo():ut.Po();lt.vv=a,gt.all(function(St){return function(wt){return wt===St.vv||!wt.isTreeExpanded}}(lt))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,X1(ut,y,x,E-1,b,z,tt))}lt={vv:lt.vv}}a.isTreeExpanded=!0}re.Object.defineProperties(Rn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Vm},set:function(a){var y=this.portSpreading;y!==a&&(Mh(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&&yh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Aa},set:function(a){typeof a=="number"&&(a=new ci(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Mh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&yh(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&&(Mh(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&&(Mh(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&&(Mh(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&&(q1(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),ea(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(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&&(Mh(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))}}}),Rn.prototype.expandTree=Rn.prototype.expandTree,Rn.prototype.collapseTree=Rn.prototype.collapseTree,Rn.prototype.findTreeParts=Rn.prototype.wz,Rn.prototype.findTreeChildrenNodes=Rn.prototype.Ou,Rn.prototype.findTreeChildrenLinks=Rn.prototype.Qo,Rn.prototype.findTreeLevel=Rn.prototype.uz,Rn.prototype.findTreeParentChain=Rn.prototype.vz,Rn.prototype.findTreeParentNode=Rn.prototype.pg,Rn.prototype.findTreeParentLink=Rn.prototype.kh,Rn.prototype.findCommonTreeParent=Rn.prototype.gz,Rn.prototype.findTreeRoot=Rn.prototype.xz,Rn.prototype.isInTreeOf=Rn.prototype.Nz,Rn.prototype.findPort=Rn.prototype.ns,Rn.prototype.findLinksTo=Rn.prototype.kz,Rn.prototype.findLinksBetween=Rn.prototype.jz,Rn.prototype.findNodesInto=Rn.prototype.Oo,Rn.prototype.findNodesOutOf=Rn.prototype.Po,Rn.prototype.findNodesConnected=Rn.prototype.Mu,Rn.prototype.findLinksInto=Rn.prototype.Sd,Rn.prototype.findLinksOutOf=Rn.prototype.Mo,Rn.prototype.findExternalTreeLinksConnected=Rn.prototype.qx,Rn.prototype.invalidateConnectedLinks=Rn.prototype.Bd,Rn.prototype.invalidateLinkBundle=Rn.prototype.Lz;var Ex=new Oe(Rn,"SpreadingNone",10),Vm=new Oe(Rn,"SpreadingEvenly",11),Wv=new Oe(Rn,"SpreadingPacked",12);Rn.className="Node",Rn.SpreadingNone=Ex,Rn.SpreadingEvenly=Vm,Rn.SpreadingPacked=Wv;function bi(a,y){a===void 0||a instanceof es||typeof a=="string"?Rn.call(this,a):(Rn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new mn,this.$a=null,this.Sc=new mr,this.Sc.group=this,this.gl=new mn,this.tb=this.$p=null,y&&Object.assign(this,y)}Le(bi,Rn),bi.prototype.cloneProtected=function(a){Rn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof oa});y instanceof oa?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())},bt=bi.prototype,bt.Af=function(a){Rn.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 Rn)x.Bd(y);else if(x instanceof Ln)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},bt.gk=function(a,y,x,E,b,z,tt){if(a===wr&&y==="elements"){if(b instanceof oa)this.$a===null?this.$a=b:this.$a!==b&&xe("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Cn){var ot=b.Nl(function(rt){return rt instanceof oa});ot instanceof oa&&(this.$a===null?this.$a=ot:this.$a!==ot&&xe("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Rr&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Cn&&this.$a.rg(E)&&(this.$a=null));Rn.prototype.gk.call(this,a,y,x,E,b,z,tt)},bt.Xl=function(a,y){Rn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Cn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Cn&&(a=a.Pb()),this.tb===null&&(this.tb=new on),a.mi(this.tb),a instanceof Ai&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},bt.eh=function(a,y,x,E){this.nf=this.$a,Rn.prototype.eh.call(this,a,y,x,E)},bt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Ln||y.Va()}),Rn.prototype.Va.call(this)},bt.si=function(){if(!Rn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Rn){if(y.isVisible()&&na(y))return!1}else if(y instanceof Ln&&y.isVisible()&&na(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof bi&&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 Ln&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof bi&&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 Ln&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}bt.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)}Rn.prototype.Lj.call(this)},bi.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Ye(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},bi.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Ye(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},bi.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))},bt=bi.prototype,bt.Bd=function(a){var y=(this.U&65536)!==0;if(Rn.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()?(ja(x.fromPort),ja(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(ja(x.fromPort),ja(x.toPort),x.bb()))}}},bt.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 mn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Rn)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},bt.iz=function(){var a=this.Rj();a.add(this);for(var y=new mn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Rn)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},bt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new mn;return a(this,y),y},bt.Rj=function(){var a=new mn;return ld(a,this,!0,0,!0),a.remove(this),a},bt.Zb=function(a){Rn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},bi.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();J1(this,y,a,this),a.Ue=!1}};function J1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof bi&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,J1(z,y,x,E)),z instanceof Rn)z.Bd(y),x.Aj(z,E);else if(z instanceof Ln)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}bi.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof bi&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,Q1(z,y,x,E)),z instanceof Rn)z.Bd(y),x.Cj(z,E);else if(z instanceof Ln)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}bi.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=Wt.alloc(),Rn.prototype.move.call(this,a,y),a=new mn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Ln&&(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 Rn&&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 Ln&&(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(),$v(b)&&b.bb());Wt.free(z)}},re.Object.defineProperties(bi.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&&xe("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&&(Mh(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&&(Mh(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&&(Mh(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&&(Mh(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)}}}),bi.prototype.expandSubGraph=bi.prototype.expandSubGraph,bi.prototype.collapseSubGraph=bi.prototype.collapseSubGraph,bi.prototype.findSubGraphParts=bi.prototype.Rj,bi.prototype.findContainingGroupChain=bi.prototype.hz,bi.prototype.findExternalNodesConnected=bi.prototype.iz,bi.prototype.findExternalLinksConnected=bi.prototype.Lu,bi.prototype.ensureBounds=bi.prototype.Va,bi.className="Group";function oa(a){Pe.call(this),this.yb=ws,this.ko=new on(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Le(oa,Pe),oa.prototype.cloneProtected=function(a){Pe.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},oa.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return _o(0,0,y.width,y.height,a.x,a.y)},oa.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof bi||a instanceof Eo)||xe("Placeholder is not inside a Group or Adornment."),a instanceof bi){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(ds(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=Wt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Wt.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 Ai&&(tt=z.strokeWidth);var ot=z.Df(),rt=z.naturalBounds,lt=(rt.width+tt)*ot;tt=(rt.height+tt)*ot,a.type!==Cn.Link&&(ot=z.ga(a.category==="Selection"?is:a.locationSpot,Wt.alloc()),a.location=ot,Wt.free(ot)),isNaN(lt)||isNaN(tt)?(a=z.ga(is,Wt.alloc()),lt=on.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(Hs,a)),lt.Ye(z.ga(iu,a)),lt.Ye(z.ga(bs,a)),ds(y,lt.width+E||0,lt.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Wt.free(a),on.free(lt)):(ds(y,lt+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},oa.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},oa.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof bi&&!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=on.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof bi&&!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)),on.free(x),E&&y instanceof bi&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},oa.prototype.computeMemberBounds=function(a){if(!(this.part instanceof bi))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 Ln&&(!y.computesBoundsIncludingLinks||Xa(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},re.Object.defineProperties(oa.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new ci(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),oa.className="Placeholder";function Ln(a){ai.call(this,Cn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ra,this.Om=0,this.Qm=ra,this.Rm=NaN,this.qj=Xv,this.po=.5,this.wd=null,this.Nb=new pn().freeze(),this.Tg=this.Mg=null,this.ml=new on,this.ua=new hn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Wt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Le(Ln,ai),Ln.prototype.cloneProtected=function(a){ai.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())},bt=Ln.prototype,bt.Af=function(a){ai.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&&ja(y),a=a.toPort,a!==null&&ja(a)},bt.qb=function(a){a.classType===Ln?(a.value&2)===2?this.routing=a:a===Qa||a===Fh||a===_f?this.curve=a:a===ip||a===Jm||a===Qm?this.adjusting=a:a!==Xv&&a!==ra&&xe("Unknown Link enum value for a Link property: "+a):ai.prototype.qb.call(this,a)},bt.Xc=function(){this.ba===null&&(this.ba=new Wg)},bt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),na(a)||sd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),na(a)||sd(a)))},bt.zv=function(){return!1},bt.Av=function(){},bt.Zc=function(){return!1},Ln.prototype.computeAngle=function(a,y,x){return Ln.computeAngle(y,x)},Ln.computeAngle=function(a,y){switch(a){default:case ra:a=0;break;case op:a=y;break;case rp:a=y+90;break;case sp:a=y-90;break;case Jv:a=y+180;break;case qm:a=me.bp(y),90<a&&270>a&&(a-=180);break;case ap:a=me.bp(y+90),90<a&&270>a&&(a-=180);break;case lp:a=me.bp(y-90),90<a&&270>a&&(a-=180);break;case t0:if(a=me.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return me.bp(a)};function jf(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&&Vv(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}bt=Ln.prototype,bt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&ai.prototype.oh.call(this)},bt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},bt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function q1(a,y){a.wd===null&&(a.wd=new mn),a.wd.add(y),a.v()}bt.Vo=function(a){if(ai.prototype.Vo.call(this,a),qd(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Wm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Wm(x,this,E)}ep(this)}},bt.Wo=function(a){if(ai.prototype.Wo.call(this,a),qd(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Zm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Zm(x,this,E)}np(this)}},bt.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))},Ln.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Ln.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?ai.prototype.move.call(this,a,!1):(a=Wt.allocAt(x.x+E,x.y+b),ai.prototype.move.call(this,a,!1),Wt.free(a)),Lh(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Ln.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},Ln.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},Ln.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(eo),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()===Qa))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()===Qa){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return me.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),me.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},Ln.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()===Qa))return this.ua.wx(.5);if(this.computeCurve()===Qa&&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),me.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)},bt=Ln.prototype,bt.i=function(a){return this.Nb.s[a]},bt.dd=function(a,y){this.Nb.cd(a,y)},bt.L=function(a,y,x){this.Nb.cd(a,new Wt(y,x))},bt.Kz=function(a,y){this.Nb.Gb(a,y)},bt.m=function(a,y,x){this.Nb.Gb(a,new Wt(y,x))},bt.ne=function(a){this.Nb.add(a)},bt.yf=function(a,y){this.Nb.add(new Wt(a,y))},bt.pv=function(a){this.Nb.mb(a)},bt.Fj=function(){this.Nb.clear()};function Lh(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 pn,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Wt(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),ea(a)),E?Um(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&hf(tt.animationManager,a,b),a.g("points",z,b)}}bt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},bt.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,lt=rt.length,ut=0;ut<lt;ut++){var gt=rt[ut];tt=Math.min(gt.x,tt),ot=Math.min(gt.y,ot),gt.freeze()}if(y.freeze(),lt===z){for(z=0;z<lt;z++)if(ut=b[z],gt=rt[z],ut.x-x!==gt.x-tt||ut.y-E!==gt.y-ot){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&hf(x.animationManager,this,y),Um(this),this.g("points",a,y)}},bt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Um(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),Xm(a,!1))}bt.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())}},bt.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()}}},Ln.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Rc||(Rc=new Rn,Rc.desiredSize=Ro,Rc.Va()),this.defaultFromPoint&&(Rc.location=this.defaultFromPoint,Rc.Va(),y=a=Rc)):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?(jc||(jc=new Rn,jc.desiredSize=Ro,jc.Va()),this.defaultToPoint&&(jc.location=this.defaultToPoint,jc.Va(),b=E=jc)):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=zf(tt),rt=zf(x),lt=y===b&&y!==null,ut=this.isOrthogonal,gt=this.curve===Qa;this.Wf=lt&&!ut?gt=!0:!1;var St=this.computeAdjusting()===ra||lt;if(!ut&&!lt&&ot&&rt){if(ot=!1,!St&&3<=z&&(St=this.getLinkPoint(a,y,tt,!0,!1,E,b),rt=this.getLinkPoint(E,b,x,!1,!1,a,y),ot=this.adjustPoints(0,St,z-1,rt))&&(St=this.getLinkPoint(a,y,tt,!0,!1,E,b),rt=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,St,z-1,rt)),!ot)if(this.Fj(),gt){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),St=this.getLinkPoint(E,b,x,!1,!1,a,y),ot=St.x-z.x,rt=St.y-z.y,lt=this.computeCurviness(),gt=ut=0;var wt=z.x+ot/3,Et=z.y+rt/3,Nt=wt,Ut=Et;me.B(rt,0)?Ut=0<ot?Ut-lt:Ut+lt:(ut=-ot/rt,gt=Math.sqrt(lt*lt/(ut*ut+1)),0>lt&&(gt=-gt),Nt=(0>rt?-1:1)*gt+wt,Ut=ut*(Nt-wt)+Et),wt=z.x+2*ot/3,Et=z.y+2*rt/3;var jt=wt,ee=Et;me.B(rt,0)?ee=0<ot?ee-lt:ee+lt:(jt=(0>rt?-1:1)*gt+wt,ee=ut*(jt-wt)+Et),this.Fj(),this.ne(z),this.yf(Nt,Ut),this.yf(jt,ee),this.ne(St),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,St=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,St),b=this.getLinkPoint(z,St,x,!1,!1,a,y),this.hasCurviness()?(St=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+St/2,y=E.y+x/2,z=a,ot=y,me.B(x,0)?ot=0<St?ot-tt:ot+tt:(St=-St/x,z=Math.sqrt(tt*tt/(St*St+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,ot=St*(z-a)+y),this.ne(E),this.yf(z,ot),this.ne(b)):(this.ne(E),this.ne(b),ot=on.alloc(),y.mi(ot),rt=ot.ca(b),St.mi(ot),lt=ot.ca(E),(rt||lt)&&(tt=y.ga(Km(tt),new Wt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=St.ga(Km(x),new Wt),this.dd(1,this.getLinkPointFromPoint(z,St,x,E,!1,x))),on.free(ot))}else{gt=this.isAvoiding,St&&(ut&&gt||lt)&&this.Fj();var oe=lt?this.computeCurviness():0;gt=this.getLinkPoint(a,y,tt,!0,ut,E,b),wt=Nt=Et=0,(ut||!ot||lt)&&(Ut=this.computeEndSegmentLength(a,y,tt,!0),wt=this.getLinkDirection(a,y,gt,tt,!0,ut,E,b),lt&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(wt-=ut?90:30,0>oe&&(wt-=180)),0>wt?wt+=360:360<=wt&&(wt-=360),lt&&(Ut+=Math.abs(oe)*(ut?1:2)),wt===0?Et=Ut:wt===90?Nt=Ut:wt===180?Et=-Ut:wt===270?Nt=-Ut:(Et=Ut*Math.cos(wt*Math.PI/180),Nt=Ut*Math.sin(wt*Math.PI/180)),tt.Mc()&&lt&&(Ut=y.ga(wo,Wt.alloc()),jt=Wt.allocAt(Ut.x+1e3*Et,Ut.y+1e3*Nt),this.getLinkPointFromPoint(a,y,Ut,jt,!0,gt),Wt.free(Ut),Wt.free(jt))),Ut=this.getLinkPoint(E,b,x,!1,ut,a,y);var ae=ee=jt=0;if(ut||!rt||lt){var Se=this.computeEndSegmentLength(E,b,x,!1);ae=this.getLinkDirection(E,b,Ut,x,!1,ut,a,y),lt&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ae+=ut?0:30,0>oe&&(ae+=180)),0>ae?ae+=360:360<=ae&&(ae-=360),lt&&(Se+=Math.abs(oe)*(ut?1:2)),ae===0?jt=Se:ae===90?ee=Se:ae===180?jt=-Se:ae===270?ee=-Se:(jt=Se*Math.cos(ae*Math.PI/180),ee=Se*Math.sin(ae*Math.PI/180)),x.Mc()&&lt&&(x=b.ga(wo,Wt.alloc()),tt=Wt.allocAt(x.x+1e3*jt,x.y+1e3*ee),this.getLinkPointFromPoint(E,b,x,tt,!1,Ut),Wt.free(x),Wt.free(tt))}x=gt,(ut||!ot||lt)&&(x=new Wt(gt.x+Et,gt.y+Nt)),tt=Ut,(ut||!rt||lt)&&(tt=new Wt(Ut.x+jt,Ut.y+ee)),!St&&!ut&&ot&&3<z&&this.adjustPoints(0,gt,z-2,tt)?this.dd(z-1,Ut):!St&&!ut&&rt&&3<z&&this.adjustPoints(1,x,z-1,Ut)?this.dd(0,gt):!St&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,gt),this.dd(z-1,Ut)):(this.Fj(),this.ne(gt),(ut||!ot||lt)&&this.ne(x),ut&&this.addOrthoPoints(x,wt,tt,ae,a,E),(ut||!rt||lt)&&this.ne(tt),this.ne(Ut))}return!0};function Uv(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}Ln.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Wt),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,lt=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),gt=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*rt+ut,E=E.x*ot+E.y*lt+gt,tt=x.x*tt+x.y*rt+ut,x=x.x*ot+x.y*lt+gt}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function $m(a,y){var x=y.Zn;return x===null&&(x=new zc,x.port=y,x.node=y.part,y.Zn=x),aS(x,a)}Ln.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,ot){if(ot===void 0&&(ot=new Wt),x.sb()&&!zf(x))return y.ga(x,ot),ot;if(x.$c()){var rt=$m(this,y);if(rt!==null){if(ot.assign(rt.Zo),b&&this.routing===eS){var lt=$m(this,tt);if(lt!==null&&rt.Gl<lt.Gl){rt=Wt.alloc(),lt=Wt.alloc();var ut=new on(y.ga(is,rt),y.ga(Hs,lt)),gt=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,gt,!E,b,a,y,lt),(x.Hf(ou)||x.Hf(ga))&&a.y>=ut.y&&a.y<=ut.y+ut.height?ot.y=a.y:(x.Hf(Bl)||x.Hf(Oa))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(ot.x=a.x),Wt.free(rt),Wt.free(lt)}}return ot}}return x=y.ga(Km(x),Wt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=Uv(x,tt.copy()))):(rt=this.computeSpot(!E,tt),z=Wt.alloc(),tt=tt.ga(Km(rt),z),b&&(tt=Uv(x,tt)),Wt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,ot),Wt.free(x),ot},Ln.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=$m(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(wo,Wt.alloc()),this.pointsCount>(z?6:2)?(ot=b?this.i(1):this.i(this.pointsCount-2),ot=z?Uv(rt,ot.copy()):x):(x=Wt.alloc(),ot=ot.ga(wo,x),Wt.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,Wt.free(rt),rt=x}return E.Mc()&&tt.Td(a)&&(rt+=180,360<=rt&&(rt-=360)),zf(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},Ln.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=$m(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)},Ln.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=wo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Ge?kr:y)):(a=y||this.toPort,a===null?a=wo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Ge?kr:y)),a};function zf(a){return a===kr||a.x===.5&&a.y===.5}function Km(a){return a.x===.5&&a.y===.5?a:wo}Ln.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ra&&4<this.pointsCount?this.computeMidPoint(new Wt):(a=y.Zn,a=a!==null?aS(a,this):null,a!==null?a.Zo:y.ga(wo))},Ln.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},Ln.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=fi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&fi.free(tt),!0;if(this.Yc(a,tt)){var ot=!1;if(!this.isAtomic)for(var rt=this.O.s,lt=rt.length;lt--;){var ut=rt[lt];if(ut.visible||ut===this.locationObject){var gt=ut.actualBounds,St=this.naturalBounds;if(!(gt.x>St.width||gt.y>St.height||0>gt.x+gt.width||0>gt.y+gt.height)){if(gt=fi.alloc(),gt.set(tt),ut instanceof Cn)ot=ut.Cf(a,y,x,E,b,gt);else if(this.path===ut){if(ut instanceof Ai)if(ot=a,St=E,ut.pickable===!1)ot=!1;else if(gt.multiply(ut.transform),St)t:{var wt=ot,Et=gt;if(ut.fh(wt,Et))ot=!0;else{if(Et===void 0&&(Et=ut.transform,wt.Re(ut.actualBounds))){ot=!0;break t}ot=wt.left,St=wt.right;var Nt=wt.top;wt=wt.bottom;var Ut=Wt.alloc(),jt=Wt.alloc(),ee=Wt.alloc(),oe=fi.alloc();oe.set(Et),oe.bv(ut.transform),oe.Vj(),jt.x=St,jt.y=Nt,jt.transform(oe),Ut.x=ot,Ut.y=Nt,Ut.transform(oe),Et=!1,Jd(ut,Ut,jt,ee)?Et=!0:(Ut.x=St,Ut.y=wt,Ut.transform(oe),Jd(ut,Ut,jt,ee)?Et=!0:(jt.x=ot,jt.y=wt,jt.transform(oe),Jd(ut,Ut,jt,ee)?Et=!0:(Ut.x=ot,Ut.y=Nt,Ut.transform(oe),Jd(ut,Ut,jt,ee)&&(Et=!0)))),fi.free(oe),Wt.free(Ut),Wt.free(jt),Wt.free(ee),ot=Et}}else ot=ut.fh(ot,gt)}else ot=rs(ut,a,E,gt);ot&&(St=ut,y!==null&&(St=y(ut)),St&&(x===null||x(St))&&b.add(St)),fi.free(gt)}}}return z===void 0&&fi.free(tt),ot||this.background!==null||this.areaBackground!==null}return z===void 0&&fi.free(tt),!1},Ln.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?Qa:this.curve},Ln.prototype.computeCorner=function(){if(this.curve===Qa)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Ln.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},Ln.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;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===op||E===qm||E===Jv?a=Math.max(a,b):E===sp||E===lp||E===rp||E===ap?a=Math.max(a,tt):(y=y.ga(wo).ab(x.ga(wo))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===Qa&&(a*=1.333)}}return a},Ln.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ra&&x.bb()}},Ln.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=nS;var y=this.Sf;if(y!==null){for(var x=Kn(),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),oi(x)}}return a},Ln.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Ln.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Ln.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===Jm)return!1;b===Qm&&(b=ip)}switch(b){case Jm: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,lt=Math.sqrt(ot*ot+rt*rt);if(!me.$(lt,0)){if(me.$(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 gt=y.y;ot=E.x-tt;var St=E.y-gt;for(rt=Math.sqrt(ot*ot+St*St),me.$(ot,0)?St=0>St?-Math.PI/2:Math.PI/2:(St=Math.atan(St/Math.abs(ot)),0>ot&&(St=Math.PI-St)),lt=rt/lt,ut=St-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),me.$(y,0)||(me.$(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*=lt,this.L(a,tt+y*Math.cos(ot),gt+y*Math.sin(ot)));this.dd(x,E)}}return!0;case Qm:if(z=this.i(a),gt=this.i(x),!z.Xa(y)||!gt.Xa(E)){b=z.x,z=z.y,tt=gt.x,gt=gt.y,lt=(tt-b)*(tt-b)+(gt-z)*(gt-z),ot=y.x,ut=y.y,rt=E.x,St=E.y;var wt=1;if(rt-ot!==0){var Et=(St-ut)/(rt-ot);wt=Math.sqrt(1+1/(Et*Et))}else Et=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Nt=y.x,Ut=y.y,jt=.5;lt!==0&&(jt=((b-Nt)*(b-tt)+(z-Ut)*(z-gt))/lt);var ee=b+jt*(tt-b),oe=z+jt*(gt-z);y=Math.sqrt((Nt-ee)*(Nt-ee)+(Ut-oe)*(Ut-oe)),Ut<Et*(Nt-ee)+oe&&(y=-y),0<Et&&(y=-y),Nt=ot+jt*(rt-ot),jt=ut+jt*(St-ut),Et!==0?(y=Nt+y/wt,this.L(a,y,jt-(y-Nt)/Et)):this.L(a,Nt,jt+y)}this.dd(x,E)}return!0;case ip:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),ot=z.x,ut=z.y,gt=ot,lt=ut,me.B(b.y,z.y)?me.B(z.x,tt.x)?ut=y.y:me.B(z.y,tt.y)&&(ot=y.x):me.B(b.x,z.x)&&(me.B(z.y,tt.y)?ot=y.x:me.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,St=ut,me.B(b.y,z.y)?me.B(z.x,tt.x)?ut=E.y:me.B(z.y,tt.y)&&(ot=E.x):me.B(b.x,z.x)&&(me.B(z.y,tt.y)?ot=E.x:me.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,ot,ut),$v(this))){this.L(a+1,gt,lt),this.L(x-1,rt,St),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Ln.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(up,up),rt.Bc(up,up),ot.Ye(a),rt.Ye(x);var lt=Wt.alloc(),ut=Wt.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?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x<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=lt.x,ut.y=x.y):E===0&&a.x<rt.left&&a.y>rt.top&&a.y<rt.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<ot.top||E===270&&x.y>ot.bottom)&&(E===180&&(rt.ca(a)||ot.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?lt.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(E===180||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>ot.top&&lt.y<ot.bottom&&(x.x>=ot.left&&x.x<=a.x||a.x<=rt.right&&a.x>=x.x?(E===90||E===270)&&(lt.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?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=lt.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?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x>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=lt.x,ut.y=x.y):E===180&&a.x>rt.right&&a.y>rt.top&&a.y<rt.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<ot.top||E===270&&x.y>ot.bottom)&&(E===0&&(rt.ca(a)||ot.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?lt.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(E===0||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>ot.top&&lt.y<ot.bottom&&(x.x<=ot.right&&x.x>=a.x||a.x>=rt.left&&a.x<=x.x?(E===90||E===270)&&(lt.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?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=lt.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?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(lt.y=a.y<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=lt.y):E===90&&a.y<rt.top&&a.x>rt.left&&a.x<rt.right&&(lt.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<ot.left||E===180&&x.x>ot.right)&&(E===270&&(rt.ca(a)||ot.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?lt.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(lt.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>ot.left&&lt.x<ot.right&&(x.y>=ot.top&&x.y<=a.y||a.y<=rt.bottom&&a.y>=x.y?(E===0||E===180)&&(lt.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,E===90?ot.right:Math.max(ot.right,rt.right)),ut.x=lt.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?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(lt.y=a.y>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=lt.y):E===270&&a.y>rt.bottom&&a.x>rt.left&&a.x<rt.right&&(lt.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<ot.left||E===180&&x.x>ot.right)&&(E===90&&(rt.ca(a)||ot.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?lt.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(lt.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>ot.left&&lt.x<ot.right&&(x.y<=ot.bottom&&x.y>=a.y||a.y>=rt.top&&a.y<=x.y?(E===0||E===180)&&(lt.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,E===270?ot.right:Math.max(ot.right,rt.right)),ut.x=lt.x,ut.y=x.y)));var gt=x;if(this.isAvoiding){var St=this.diagram;if(St===null||b===z||this.layer.isTemporary||!Sf(St)||ot.ca(gt)&&!z.Td(b)||rt.ca(a)&&!b.Td(z))y=!1;else{var wt=xf(St,!0,this.containingGroup,null);if(this.segmentIndex!==17&&wt.Yj(Math.min(a.x,lt.x),Math.min(a.y,lt.y),Math.abs(a.x-lt.x),Math.abs(a.y-lt.y))&&wt.Yj(Math.min(lt.x,ut.x),Math.min(lt.y,ut.y),Math.abs(lt.x-ut.x),Math.abs(lt.y-ut.y))&&wt.Yj(Math.min(ut.x,gt.x),Math.min(ut.y,gt.y),Math.abs(ut.x-gt.x),Math.abs(ut.y-gt.y)))y=!1;else{b=a,z=gt;var Et=x=null;if(St.isVirtualized){St=wt.bounds.copy(),St.Bc(-wt.Ho,-wt.Go);var Nt=Wt.alloc();Hf(wt,a.x,a.y)||(me.Ff(St.x,St.y,St.x+St.width,St.y+St.height,a.x,a.y,lt.x,lt.y,Nt)?(x=a=Nt.copy(),y=Nt.ab(lt)):me.Ff(St.x,St.y,St.x+St.width,St.y+St.height,lt.x,lt.y,ut.x,ut.y,Nt)?(x=a=Nt.copy(),y=Nt.ab(ut)):me.Ff(St.x,St.y,St.x+St.width,St.y+St.height,ut.x,ut.y,gt.x,gt.y,Nt)&&(x=a=Nt.copy(),y=Nt.ab(gt))),Hf(wt,gt.x,gt.y)||(me.Ff(St.x,St.y,St.x+St.width,St.y+St.height,gt.x,gt.y,ut.x,ut.y,Nt)?(Et=gt=Nt.copy(),E=ut.ab(Nt)):me.Ff(St.x,St.y,St.x+St.width,St.y+St.height,ut.x,ut.y,lt.x,lt.y,Nt)?(Et=gt=Nt.copy(),E=lt.ab(Nt)):me.Ff(St.x,St.y,St.x+St.width,St.y+St.height,lt.x,lt.y,a.x,a.y,Nt)&&(Et=gt=Nt.copy(),E=a.ab(Nt))),Wt.free(Nt)}ot=ot.copy().ed(rt),ot.Bc(wt.Ho*wt.Os,wt.Go*wt.Os),rS(wt,a,y,gt,E,ot,!0),rt=Fu(wt,gt.x,gt.y),!wt.abort&&rt>=Gf&&(oS(wt),ot.Bc(wt.Ho*wt.Hx,wt.Go*wt.Ix),rS(wt,a,y,gt,E,ot,!1),rt=Fu(wt,gt.x,gt.y)),!wt.abort&&rt<Gf&&Fu(wt,gt.x,gt.y)!==Bh?(Kv(this,wt,gt.x,gt.y,E,!0,tt),ot=this.i(2),4>this.pointsCount?(y===0||y===180?(ot.x=a.x,ot.y=gt.y):(ot.x=gt.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?me.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)):me.B(ot.y,tt.y)?(Math.abs(a.y-ot.y)<=wt.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)&&(me.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)):me.B(ot.x,tt.x)?(Math.abs(a.x-ot.x)<=wt.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)),Et!==null&&(E===0||E===180?this.yf(z.x,Et.y):this.yf(Et.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),Wt.free(lt),Wt.free(ut)}},Ln.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 $v(a){if(a.diagram===null||!a.isAvoiding||!Sf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=xf(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 Kv(a,y,x,E,b,z,tt){var ot=y.Ho,rt=y.Go,lt=Fu(y,x,E),ut=x,gt=E;for(b===0?ut+=ot:b===90?gt+=rt:b===180?ut-=ot:gt-=rt,b!==tt&&lt>tc&&Fu(y,ut,gt)!==lt-1&&(Fu(y,x-ot,E)===lt-1?(b=180,ut=x-ot,gt=E):Fu(y,x+ot,E)===lt-1?(b=0,ut=x+ot,gt=E):Fu(y,x,E-rt)===lt-1?(b=270,ut=x,gt=E-rt):Fu(y,x,E+rt)===lt-1&&(b=90,ut=x,gt=E+rt));lt>tc&&Fu(y,ut,gt)===lt-1;)x=ut,E=gt,b===0?ut+=ot:b===90?gt+=rt:b===180?ut-=ot:gt-=rt,--lt;z?lt>tc&&(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),lt>tc&&(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),Fu(y,tt,ut)===lt-1?Kv(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),Fu(y,tt,ut)===lt-1&&Kv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}Ln.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=yr(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=yr(y,a,E.x,E.y,x.x,x.y);E=x,ot<b&&(z=tt,b=ot)}return z},Ln.prototype.qc=function(){this.lk=!1,this.v()},Ln.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 Ai&&(b.ua=this.ua)}}},Ln.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&qd(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===Qa&&3<=y&&!me.$(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||qd(this)){if(a.type=hn.o,ot=N1(a),this.computeShortLength(!0)!==0&&(b=Dc(this,b,!0,z)),Rf(ot,b.x,b.y,!1),tt===Qa&&3<=y&&!me.$(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=Dc(this,b,!1,z)),Eh(ot,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Wt.allocAt(E,rt),x=Wt.alloc(),x.assign(this.i(1)),z=Wt.allocAt(E,rt),b=Wt.allocAt(E,rt),tt=this.i(0);for(var lt,ut=this.smoothness/3,gt=1;gt<this.pointsCount-1;gt++){lt=this.i(gt);var St=tt,wt=lt,Et=this.i(Yv(this,lt,gt,!1));if((!me.$(St.x,wt.x)||!me.$(wt.x,Et.x))&&(!me.$(St.y,wt.y)||!me.$(wt.y,Et.y))){var Nt=ut;isNaN(Nt)&&(Nt=this.smoothness/3);var Ut=St.x;St=St.y;var jt=wt.x;wt=wt.y;var ee=Et.x;Et=Et.y;var oe=Nt*Ym(Ut,St,jt,wt);Nt*=Ym(jt,wt,ee,Et),me.$(St,wt)&&me.$(jt,ee)&&(jt>Ut?Et>wt?(z.x=jt-oe,z.y=wt-oe,b.x=jt+Nt,b.y=wt+Nt):(z.x=jt-oe,z.y=wt+oe,b.x=jt+Nt,b.y=wt-Nt):Et>wt?(z.x=jt+oe,z.y=wt-oe,b.x=jt-Nt,b.y=wt+Nt):(z.x=jt+oe,z.y=wt+oe,b.x=jt-Nt,b.y=wt-Nt)),me.$(Ut,jt)&&me.$(wt,Et)&&(wt>St?(ee>jt?(z.x=jt-oe,z.y=wt-oe,b.x=jt+Nt):(z.x=jt+oe,z.y=wt-oe,b.x=jt-Nt),b.y=wt+Nt):(ee>jt?(z.x=jt-oe,z.y=wt+oe,b.x=jt+Nt):(z.x=jt+oe,z.y=wt+oe,b.x=jt-Nt),b.y=wt-Nt)),(me.$(Ut,jt)&&me.$(jt,ee)||me.$(St,wt)&&me.$(wt,Et))&&(Ut=.5*(Ut+ee),St=.5*(St+Et),z.x=Ut,z.y=St,b.x=Ut,b.y=St),(gt===1||gt===2&&me.$(tt.x,this.i(0).x)&&me.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+lt.x),x.y=.5*(tt.y+lt.y)),Eh(ot,x.x-E,x.y-rt,z.x-E,z.y-rt,lt.x-E,lt.y-rt),y.set(z),x.set(b),tt=lt}}lt=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=Dc(this,ut.copy(),!1,Fo)),lt=.5*(lt+ut.x),tt=.5*(tt+ut.y),Eh(ot,b.x-E,b.y-rt,lt-E,tt-rt,ut.x-E,ut.y-rt),Wt.free(y),Wt.free(x),Wt.free(z),Wt.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=Dc(this,tt.copy(),!1,Fo)),Eh(ot,z.x-E,z.y-rt,b.x-E,b.y-rt,tt.x-E,tt.y-rt);else{for(z=Wt.alloc(),z.assign(this.i(0)),b=Wt.alloc(),b.assign(z),tt=this.computeCorner(),gt=1,lt=0;gt<y;){if(gt=Yv(this,z,gt,1<gt),ut=this.i(gt),gt>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=Dc(this,ut.copy(),!1,Fo)),Ic(this,ot,-E,-rt,z,ut,x);else if(lt===0)for(gt=1;gt<y;)b.assign(z),ut=this.i(gt++),Ic(this,ot,-E,-rt,z,ut,x),z.assign(ut);break}if(lt=Yv(this,ut,gt+1,gt<y-3),gt=-E,Ut=-rt,St=ut,jt=this.i(lt),Nt=x,me.B(z.y,St.y)&&me.B(St.x,jt.x))if(Et=Math.min(tt,Math.abs(St.x-b.x)/2),Et=oe=Math.min(Et,Math.abs(jt.y-St.y)/2),me.B(Et,0))Ic(this,ot,gt,Ut,z,St,Nt),z.assign(St);else{var ae=St.x,Se=St.y;wt=ae,ee=Se,St.x>z.x?ae=St.x-Et:ae=St.x+Et,jt.y>St.y?ee=St.y+oe:ee=St.y-oe,jt=Wt.allocAt(ae,Se),Ic(this,ot,gt,Ut,z,jt,Nt),Wt.free(jt),zm(ot,St.x+gt,St.y+Ut,wt+gt,ee+Ut),z.h(wt,ee)}else me.B(z.x,St.x)&&me.B(St.y,jt.y)?(Et=Math.min(tt,Math.abs(St.y-b.y)/2),Et=oe=Math.min(Et,Math.abs(jt.x-St.x)/2),me.B(oe,0)?(Ic(this,ot,gt,Ut,z,St,Nt),z.assign(St)):(ae=St.x,Se=St.y,wt=ae,ee=Se,St.y>z.y?Se=St.y-Et:Se=St.y+Et,jt.x>St.x?wt=St.x+oe:wt=St.x-oe,jt=Wt.allocAt(ae,Se),Ic(this,ot,gt,Ut,z,jt,Nt),Wt.free(jt),zm(ot,St.x+gt,St.y+Ut,wt+gt,ee+Ut),z.h(wt,ee))):(Ic(this,ot,gt,Ut,z,St,Nt),z.assign(St));b.assign(ut),gt=lt}Wt.free(z)}_m=ot}else ot=this.i(1).copy(),ot.x-=E,ot.y-=rt,this.computeShortLength(!0)!==0&&(b=Dc(this,b,!0,z)),this.computeShortLength(!1)!==0&&(ot=Dc(this,ot,!1,z)),a.type=hn.j,a.startX=b.x,a.startY=b.y,a.endX=ot.x,a.endY=ot.y;return this.lk=!0,a};function Ym(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),me.$(a,0)?y:me.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Dc(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=Ym(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=Ym(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 Yv(a,y,x,E){for(var b=a.pointsCount,z=y;me.$(y.x,z.x)&&me.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!me.$(y.x,z.x)&&!me.$(y.y,z.y))return x-1;for(var tt=z;me.$(y.x,z.x)&&me.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||me.$(y.y,z.y)&&me.$(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}Ln.prototype.computeJumpLength=function(){return 10};function Ic(a,y,x,E,b,z,tt){if(!tt&&qd(a)){tt=a.computeJumpLength();var ot=tt/2,rt=[],lt=0;if(a.isVisible()&&(lt=bx(a,b,z,rt)),0<lt){if(me.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<lt;){var gt=Math.max(b.x,Math.min(rt[ut++]-ot,z.x-tt));y.lineTo(gt+x,z.y+E);for(var St=gt+x,wt=Math.min(gt+tt,z.x);ut<lt&&(gt=rt[ut],gt<wt+tt);)ut++,wt=Math.min(gt+ot,z.x);gt=z.y-tt+E,wt+=x;var Et=z.y+E;a.curve===Fh?Rf(y,wt,Et,!1):Eh(y,St,gt,wt,gt,wt,Et)}else for(--lt;0<=lt;){for(ut=Math.min(b.x,Math.max(rt[lt--]+ot,z.x+tt)),y.lineTo(ut+x,z.y+E),St=ut+x,gt=Math.max(ut-tt,z.x);0<=lt&&(ut=rt[lt],ut>gt-tt);)lt--,gt=Math.max(ut-ot,z.x);ut=z.y-tt+E,gt+=x,wt=z.y+E,a.curve===Fh?Rf(y,gt,wt,!1):Eh(y,St,ut,gt,ut,gt,wt)}else if(me.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<lt;){for(gt=Math.max(b.y,Math.min(rt[ut++]-ot,z.y-tt)),y.lineTo(z.x+x,gt+E),St=gt+E,gt=Math.min(gt+tt,z.y);ut<lt&&(wt=rt[ut],wt<gt+tt);)ut++,gt=Math.min(wt+ot,z.y);wt=z.x-tt+x,Et=z.x+x,gt+=E,a.curve===Fh?Rf(y,Et,gt,!1):Eh(y,wt,St,wt,gt,Et,gt)}else for(--lt;0<=lt;){for(ut=Math.min(b.y,Math.max(rt[lt--]+ot,z.y+tt)),y.lineTo(z.x+x,ut+E),St=ut+E,ut=Math.max(ut-tt,z.y);0<=lt&&(gt=rt[lt],gt>ut-tt);)lt--,ut=Math.max(gt-ot,z.y);gt=z.x-tt+x,wt=z.x+x,ut+=E,a.curve===Fh?Rf(y,wt,ut,!1):Eh(y,gt,St,gt,ut,wt,ut)}}}y.lineTo(z.x+x,z.y+E)}function bx(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 Ln){if(rt===a)return 0<E.length&&E.sort(function(ut,gt){return ut-gt}),E.length;if(rt.isVisible()&&qd(rt)){var lt=rt.routeBounds;lt.w()&&a.routeBounds.Yc(lt)&&!a.usesSamePort(rt)&&(lt=rt.path,lt!==null&&lt.Ed()&&Mx(y,x,E,rt))}}}}}return 0<E.length&&E.sort(function(ut,gt){return ut-gt}),E.length}function Mx(a,y,x,E){for(var b=me.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),ot=Wt.alloc(),rt=1;rt<z;rt++){var lt=E.i(rt);if(rt<z-1){var ut=E.i(rt+1);if(tt.y===lt.y&&lt.y===ut.y){if(lt.x>tt.x&&ut.x>=lt.x||lt.x<tt.x&&ut.x<=lt.x)continue}else if(tt.x===lt.x&&lt.x===ut.x&&(lt.y>tt.y&&ut.y>=lt.y||lt.y<tt.y&&ut.y<=lt.y))continue}t:{ut=a.x;var gt=a.y,St=y.x,wt=y.y,Et=tt.x;tt=tt.y;var Nt=lt.x,Ut=lt.y;if(me.B(ut,St)){if(!me.B(gt,wt)&&me.B(tt,Ut)&&Math.min(gt,wt)<tt&&Math.max(gt,wt)>tt&&Math.min(Et,Nt)<ut&&Math.max(Et,Nt)>ut&&!me.B(Et,Nt)){ot.x=ut,ot.y=tt,ut=!0;break t}}else if(me.B(gt,wt)&&me.B(Et,Nt)&&Math.min(ut,St)<Et&&Math.max(ut,St)>Et&&Math.min(tt,Ut)<gt&&Math.max(tt,Ut)>gt&&!me.B(tt,Ut)){ot.x=Et,ot.y=gt,ut=!0;break t}ot.x=0,ot.y=0,ut=!1}ut&&(b?x.push(ot.x):x.push(ot.y)),tt=lt}Wt.free(ot)}function qd(a){return a=a.curve,a===_f||a===Fh}function Xm(a,y){(y||qd(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()))}Ln.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 Ln&&(rt===this?z=!0:z&&tS(this,rt,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)ot=z[tt],ot instanceof Ln&&tS(this,ot,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&qd(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Ln.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},Ln.prototype.isVisible=function(){if(!ai.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},Ln.prototype.Zb=function(a){if(ai.prototype.Zb.call(this,a),a&&Xm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Ln.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?ip:this.qk};function ep(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 lt=tt[rt];(lt.ef===y&&lt.ff===E&&lt.uf===x&&lt.vf===b||lt.ef===x&&lt.ff===b&&lt.uf===y&&lt.vf===E)&&(z===null?z=lt:(a===null&&(a=[],a.push(z)),a.push(lt)))}if(a!==null){for(z=G1(y,x,E,b),z===null&&(z=new e0(y,E,x,b),H1(y,z),H1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function np(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(vi(y.links,a),y.Sl()))}Ln.prototype.ph=function(){return!0},re.Object.defineProperties(Ln.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&&Zm(y,this,x),np(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&&Wm(a,this,b),ep(this),this.C(1)),this.g("fromNode",y,a),jf(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&ja(x),np(this),this.ff=a;var E=this.fromPort;E!==null&&ja(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))),ep(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&&Zm(y,this,x),np(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&&Wm(a,this,b),ep(this),this.C(1)),this.g("toNode",y,a),jf(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&ja(x),np(this),this.vf=a;var E=this.toPort;E!==null&&ja(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))),ep(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:Ge},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&&ja(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&&Mn(a,">= 0",Ln,"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:Ge},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&&ja(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",Ln,"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?fo: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&&tp(this.fromNode),this.toNode!==null&&tp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Ai?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()===Qa&&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),me.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);me.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 Wt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Um(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);me.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):me.$(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 pn,E=0;E<a.length/2;E++)b=new Wt(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(!_e(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new pn,E=0;E<a.length;E++)b=a[E],x.add(new Wt(b.x,b.y).freeze())}}else if(a instanceof pn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else xe("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Um(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&hf(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||!zf(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!zf(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(),Xm(this,y===Fh||y===_f||a===Fh||a===_f),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(),Xm(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)}}}),Ln.prototype.invalidateOtherJumpOvers=Ln.prototype.Xo,Ln.prototype.findClosestSegment=Ln.prototype.ez,Ln.prototype.updateRoute=Ln.prototype.vg,Ln.prototype.invalidateRoute=Ln.prototype.bb,Ln.prototype.rollbackRoute=Ln.prototype.rv,Ln.prototype.commitRoute=Ln.prototype.zf,Ln.prototype.startRoute=Ln.prototype.uh,Ln.prototype.clearPoints=Ln.prototype.Fj,Ln.prototype.removePoint=Ln.prototype.pv,Ln.prototype.addPointAt=Ln.prototype.yf,Ln.prototype.addPoint=Ln.prototype.ne,Ln.prototype.insertPointAt=Ln.prototype.m,Ln.prototype.insertPoint=Ln.prototype.Kz,Ln.prototype.setPointAt=Ln.prototype.L,Ln.prototype.setPoint=Ln.prototype.dd,Ln.prototype.getPoint=Ln.prototype.i,Ln.prototype.getOtherPort=Ln.prototype.Cz,Ln.prototype.getOtherNode=Ln.prototype.To;var Rc=null,jc=null,Xv=new Oe(Ln,"Normal",1),Lx=new Oe(Ln,"Orthogonal",2),Fx=new Oe(Ln,"AvoidsNodes",6),eS=new Oe(Ln,"AvoidsNodesStraight",7),ra=new Oe(Ln,"None",0),Qa=new Oe(Ln,"Bezier",9),Fh=new Oe(Ln,"JumpGap",10),_f=new Oe(Ln,"JumpOver",11),ip=new Oe(Ln,"End",17),Jm=new Oe(Ln,"Scale",18),Qm=new Oe(Ln,"Stretch",19),op=new Oe(Ln,"OrientAlong",21),rp=new Oe(Ln,"OrientPlus90",22),sp=new Oe(Ln,"OrientMinus90",23),Jv=new Oe(Ln,"OrientOpposite",24),qm=new Oe(Ln,"OrientUpright",25),ap=new Oe(Ln,"OrientPlus90Upright",26),lp=new Oe(Ln,"OrientMinus90Upright",27),t0=new Oe(Ln,"OrientUpright45",28),nS=16,iS=14,up=8;Ln.className="Link",Ln.Normal=Xv,Ln.Orthogonal=Lx,Ln.AvoidsNodes=Fx,Ln.AvoidsNodesStraight=eS,Ln.None=ra,Ln.Bezier=Qa,Ln.JumpGap=Fh,Ln.JumpOver=_f,Ln.End=ip,Ln.Scale=Jm,Ln.Stretch=Qm,Ln.OrientAlong=op,Ln.OrientPlus90=rp,Ln.OrientMinus90=sp,Ln.OrientOpposite=Jv,Ln.OrientUpright=qm,Ln.OrientPlus90Upright=ap,Ln.OrientMinus90Upright=lp,Ln.OrientUpright45=t0,Ln.EndSegmentStep=8,Ln.CurvinessStart=nS,Ln.SpacingMin=iS,Ln.OrthoShortCut=up;function e0(a,y,x,E){po(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}e0.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},e0.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))}},e0.className="LinkBundle";function hp(a){po(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}hp.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 Hf(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Fu(a,y,x){return Hf(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):Qv}function oS(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]>=tc&&(x[E]=Qv)}hp.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]===Bh)return!1}return!0};function Bu(a,y,x,E,b,z,tt,ot,rt){if(!(y<z||y>tt||x<ot||x>rt)){var lt=y|0,ut=x|0,gt=a.ac[lt][ut];if(gt>=tc&&gt<Gf)for(b?ut+=E:lt+=E,gt+=1;z<=lt&&lt<=tt&&ot<=ut&&ut<=rt&&!(gt>=a.ac[lt][ut]);)a.ac[lt][ut]=gt,gt+=1,b?ut+=E:lt+=E;if(lt=b?ut:lt,b)if(0<E)for(x+=E;x<lt;x+=E)Bu(a,y,x,1,!b,z,tt,ot,rt),Bu(a,y,x,-1,!b,z,tt,ot,rt);else for(x+=E;x>lt;x+=E)Bu(a,y,x,1,!b,z,tt,ot,rt),Bu(a,y,x,-1,!b,z,tt,ot,rt);else if(0<E)for(y+=E;y<lt;y+=E)Bu(a,y,x,1,!b,z,tt,ot,rt),Bu(a,y,x,-1,!b,z,tt,ot,rt);else for(y+=E;y>lt;y+=E)Bu(a,y,x,1,!b,z,tt,ot,rt),Bu(a,y,x,-1,!b,z,tt,ot,rt)}}function n0(a,y,x,E,b,z,tt,ot,rt){y|=0,x|=0;var lt=Bh,ut=tc;for(a.ac[y][x]=ut;lt===Bh&&y>z&&y<tt&&x>ot&&x<rt;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,lt=a.ac[y][x]}function i0(a,y,x,E,b,z,tt,ot,rt){y|=0,x|=0;var lt=Bh,ut=Gf;for(a.ac[y][x]=ut;lt===Bh&&y>z&&y<tt&&x>ot&&x<rt;)a.ac[y][x]=ut,b?x+=E:y+=E,lt=a.ac[y][x]}function rS(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var ot=y.x,rt=y.y;if(Hf(a,ot,rt)){ot-=a.Nd,ot/=a.rc,rt-=a.Od,rt/=a.sc;var lt=E.x,ut=E.y;if(Hf(a,lt,ut))if(lt-=a.Nd,lt/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(ot-lt)&&1>=Math.abs(rt-ut))a.abort=!0;else{var gt=z.x;E=z.y,y=z.x+z.width;var St=z.y+z.height;gt-=a.Nd,gt/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,St-=a.Od,St/=a.sc,z=Math.max(0,Math.min(a.di,gt|0)),y=Math.min(a.di,Math.max(0,y|0)),gt=Math.max(0,Math.min(a.ei,E|0)),St=Math.min(a.ei,Math.max(0,St|0)),E=a.ac,ot|=0,rt|=0,lt|=0,ut|=0;var wt=x===0||x===90?1:-1;if(x=x===90||x===270,E[ot][rt]===Bh?(n0(a,ot,rt,wt,x,z,y,gt,St),n0(a,ot,rt,1,!x,z,y,gt,St),n0(a,ot,rt,-1,!x,z,y,gt,St)):n0(a,ot,rt,wt,x,ot,rt,ot,rt),E[lt][ut]===Bh?(i0(a,lt,ut,b===0||b===90?1:-1,b===90||b===270,z,y,gt,St),i0(a,lt,ut,1,!(b===90||b===270),z,y,gt,St),i0(a,lt,ut,-1,!(b===90||b===270),z,y,gt,St)):i0(a,lt,ut,wt,x,lt,ut,lt,ut),x=Kn(),tt&&sS(a,lt,ut,b,ot,rt,x))for((x[0]!==lt||x[1]!==ut)&&(x.unshift(ut),x.unshift(lt)),(x[x.length-2]!==ot||x[x.length-1]!==rt)&&(x.push(ot),x.push(rt)),a=tc,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],lt=x[z+1];y>b?b++:y<b?b--:lt>tt?tt++:lt<tt&&tt--,E[b][tt]=a++,b!==y||tt!==lt;);else Bu(a,ot,rt,1,!1,z,y,gt,St),Bu(a,ot,rt,-1,!1,z,y,gt,St),Bu(a,ot,rt,1,!0,z,y,gt,St),Bu(a,ot,rt,-1,!0,z,y,gt,St);oi(x)}}}}function sS(a,y,x,E,b,z,tt){for(var ot=a.ac,rt=y,lt=x;;){if(rt===b&&lt===z)return!0;var ut=rt,gt=lt;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(gt<z)gt++;else break;else if(E===180)if(ut>b)ut--;else break;else if(gt>z)gt--;else break;var St=ot[ut][gt];if(St===0||St===qv)break;rt=ut,lt=gt}for(;;){if(ut=E,gt=rt,St=lt,E===0?St<z?(ut=90,St++):St>z&&(ut=270,St--):E===90?gt<b?(ut=0,gt++):gt>b&&(ut=180,gt--):E===180?St<z?(ut=90,St++):St>z&&(ut=270,St--):gt<b?(ut=0,gt++):gt>b&&(ut=180,gt--),gt=ot[gt][St],ut!==E&&gt!==0&&gt!==qv){if(tt.push(rt),tt.push(lt),sS(a,rt,lt,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(ot[rt][lt]=qv,E===0){if(rt===y)return!1;rt--}else if(E===90){if(lt===x)return!1;lt--}else if(E===180){if(rt===y)return!1;rt++}else{if(lt===x)return!1;lt++}}}re.Object.defineProperties(hp.prototype,{bounds:{get:function(){return new on(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 Bh=0,tc=1,Gf=999999,Qv=Gf+1,qv=Gf+2;hp.className="PositionArray";function zc(){po(this),this.port=this.node=null,this.pe=[],this.ap=!1}zc.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 Bx(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}zc.prototype.Sl=function(){this.pe.length=0};function aS(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof bi?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,Wt.alloc()),rt=a.port.ga(Hs,Wt.alloc());for(b=on.allocAt(ot.x,ot.y,0,0),b.Ye(rt),Wt.free(ot),Wt.free(rt),ot=Wt.allocAt(b.x+b.width/2,b.y+b.height/2),rt=a.port.li(),tt=tt.iterator;tt.next();){var lt=tt.value;if(lt.isVisible()&&lt.fromPort!==lt.toPort){var ut=lt.fromPort===a.port||lt.fromNode!==null&&lt.fromNode.Td(E),gt=lt.computeSpot(ut,a.port);if(gt.$c()&&(ut=ut?lt.toPort:lt.fromPort,ut!==null)){var St=ut.part;if(St!==null){var wt=St.findVisibleNode();wt!==null&&wt!==St&&(St=wt,ut=St.port),ut=lt.computeOtherPoint(St,ut),St=ot.ab(ut),St-=rt,0>St?St+=360:360<=St&&(St-=360),gt=Bx(b,gt,St,lt.isOrthogonal),gt===0?(gt=4,180<St&&(St-=360)):gt===90?(gt=8,270<St&&(St-=360)):gt===180?gt=2:(gt=1,90>St&&(St+=360)),wt=a.pe[z],wt===void 0?(wt=new ty(lt,St,gt),a.pe[z]=wt):(wt.link=lt,wt.angle=St,wt.Nc=gt),wt.hv.set(ut),z++}}}}for(Wt.free(ot),a.pe.sort(zc.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,gt=a.port,E=a.node.portSpreading,ot=Wt.alloc(),rt=Wt.alloc(),tt=Wt.alloc(),lt=Wt.alloc(),gt.ga(is,ot),gt.ga(iu,rt),gt.ga(Hs,tt),gt.ga(bs,lt),wt=St=ut=gt=0,E===Wv)for(var Et=0;Et<z.length;Et++){var Nt=z[Et];if(Nt!==null){var Ut=Nt.link.computeThickness();switch(Nt.Nc){case 8:St+=Ut;break;case 2:wt+=Ut;break;case 1:gt+=Ut;break;default:case 4:ut+=Ut}}}var jt=Et=0,ee=1,oe=Nt=0;for(Ut=0;Ut<z.length;Ut++){var ae=z[Ut];if(ae!==null){if(Et!==ae.Nc){switch(Et=ae.Nc,Et){case 8:var Se=tt;jt=lt;break;case 2:Se=lt,jt=ot;break;case 1:Se=ot,jt=rt;break;default:case 4:Se=rt,jt=tt}switch(Nt=jt.x-Se.x,oe=jt.y-Se.y,Et){case 8:St>Math.abs(Nt)?(ee=Math.abs(Nt)/St,St=Math.abs(Nt)):ee=1;break;case 2:wt>Math.abs(oe)?(ee=Math.abs(oe)/wt,wt=Math.abs(oe)):ee=1;break;case 1:gt>Math.abs(Nt)?(ee=Math.abs(Nt)/gt,gt=Math.abs(Nt)):ee=1;break;default:case 4:ut>Math.abs(oe)?(ee=Math.abs(oe)/ut,ut=Math.abs(oe)):ee=1}jt=0}var je=ae.Zo;if(E===Wv){switch(ae=ae.link.computeThickness(),ae*=ee,je.set(Se),Et){case 8:je.x=Se.x+Nt/2+St/2-jt-ae/2;break;case 2:je.y=Se.y+oe/2+wt/2-jt-ae/2;break;case 1:je.x=Se.x+Nt/2-gt/2+jt+ae/2;break;default:case 4:je.y=Se.y+oe/2-ut/2+jt+ae/2}jt+=ae}else{var Dn=.5;E===Vm&&(Dn=(ae.Uo+1)/(ae.Gl+1)),je.x=Se.x+Nt*Dn,je.y=Se.y+oe*Dn}}}for(Wt.free(ot),Wt.free(rt),Wt.free(tt),Wt.free(lt),Se=a.pe,z=0;z<Se.length;z++)E=Se[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,on.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}zc.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},zc.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,kr,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)},zc.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Wt,this.Gl=this.Uo=0,this.Zo=new Wt,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 mr(a){po(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Wt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}mr.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},mr.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},mr.prototype.qb=function(){},mr.prototype.toString=function(){var a=ui(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},mr.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())}}},mr.prototype.createNetwork=function(){return new qo(this)},mr.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof ze?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof bi?y.lg(a.memberParts):y.lg(a.iterator),y},mr.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")}},mr.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()}},mr.prototype.doLayout=function(a){var y=new mn;a instanceof ze?(ud(this,y,a.nodes,!0,this.rh,!0,!1,!0),ud(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof bi?ud(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},mr.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;dp(ot);var rt=ot.measuredBounds,lt=rt.width;rt=rt.height,ot.moveTo(E,b),ot instanceof bi&&(ot.rh=!1),E+=Math.max(lt,50)+20,tt=Math.max(tt,Math.max(rt,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},mr.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 Ln)&&(dp(ot),this.rh(ot))){var rt=ot.measuredBounds,lt=rt.width;rt=rt.height,ot.moveTo(x,E),ot instanceof bi&&(ot.rh=!1),x+=Math.max(lt,50)+20,z=Math.max(z,Math.max(rt,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},mr.prototype.rh=function(a){return!!(!a.location.w()||a instanceof bi&&a.rh)};function ud(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 Rn?rt.isLinkLabel||(rt instanceof bi&&rt.layout===null?ud(a,y,rt.memberParts,!1,b,z,tt,ot):(dp(rt),y.add(rt))):tt&&rt instanceof Ln?y.add(rt):!ot||!rt.Zc()||rt instanceof Rn||(dp(rt),y.add(rt)))}}function dp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}mr.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new on),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},mr.prototype.ex=function(a){var y=new mn;return a instanceof ze?(ud(this,y,a.nodes,!0,null,!0,!0,!0),ud(this,y,a.links,!0,null,!0,!0,!0),ud(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof bi?ud(this,y,a.memberParts,!1,null,!0,!0,!0):ud(this,y,a.iterator,!1,null,!0,!0,!0),y},mr.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},re.Object.defineProperties(mr.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())}}}),mr.prototype.collectParts=mr.prototype.ex,mr.prototype.getLayoutBounds=mr.prototype.ni,mr.prototype.invalidateLayout=mr.prototype.C,mr.className="Layout";function qo(a){po(this),this.Sc=a,this.wf=new mn,this.ye=new mn,this.Es=new Yn,this.zs=new Yn}qo.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 mn,this.ye=new mn,this.Es=new Yn,this.zs=new Yn},qo.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},qo.prototype.createVertex=function(){return new ns(this)},qo.prototype.createEdge=function(){return new za(this)},qo.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 Rn)return!tt.isLinkLabel;if(tt instanceof Ln){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 Rn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof bi&&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 Ln&&(!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))}}},qo.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},bt=qo.prototype,bt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},bt.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},bt.Iu=function(a){if(a!==null&&lS(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 lS(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}bt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},bt.ki=function(a){return a===null?null:this.Es.I(a)},bt.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}}bt.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},bt.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))}bt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},bt.Lo=function(a){return a===null?null:this.zs.I(a)},bt.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},bt.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))}},bt.Ko=function(){for(var a=Kn(),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]);oi(a)},qo.prototype.deleteArtificialVertexes=function(){for(var a=Kn(),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=Kn(),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]);oi(a),oi(y)};function Nx(a){for(var y=Kn(),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]);oi(y)}qo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new pn;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){lS(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))}}qo.prototype.dz=function(){for(var a=new mn,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},re.Object.defineProperties(qo.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}}}),qo.prototype.findAllParts=qo.prototype.dz,qo.prototype.splitIntoSubNetworks=qo.prototype.Zx,qo.prototype.deleteSelfEdges=qo.prototype.Ko,qo.prototype.reverseEdge=qo.prototype.gm,qo.prototype.linkVertexes=qo.prototype.Zj,qo.prototype.findEdge=qo.prototype.Lo,qo.prototype.deleteLink=qo.prototype.Yy,qo.prototype.deleteEdge=qo.prototype.Mj,qo.prototype.addLink=qo.prototype.Dy,qo.prototype.addEdge=qo.prototype.Bo,qo.prototype.findVertex=qo.prototype.ki,qo.prototype.deleteNode=qo.prototype.Zy,qo.prototype.deleteVertex=qo.prototype.Iu,qo.prototype.addNode=qo.prototype.Bl,qo.prototype.addVertex=qo.prototype.dh,qo.prototype.addParts=qo.prototype.lg,qo.className="LayoutNetwork";function ns(a){po(this),this.ob=a,this.j=new on(0,0,10,10).freeze(),this.o=new Wt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new pn,this.mg=new pn}ns.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new pn,this.mg=new pn},ns.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Si(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},ns.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;_e(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 bi)){x=on.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(wo);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),on.free(x);return}on.free(x)}a.moveTo(y.x,y.y)}},ns.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ns.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ns.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ns.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}re.Object.defineProperties(ns.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=on.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),on.free(x),!(a instanceof bi)&&(a=a.locationObject.ga(wo),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 mn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new mn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new mn,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 pn,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}}}),ns.prototype.deleteDestinationEdge=ns.prototype.Jl,ns.prototype.addDestinationEdge=ns.prototype.zl,ns.prototype.deleteSourceEdge=ns.prototype.Kl,ns.prototype.addSourceEdge=ns.prototype.Cl,ns.className="LayoutVertex",ns.standardComparer=oy,ns.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 za(a){po(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}za.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},za.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Si(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},za.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},za.prototype.commit=function(){},za.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},re.Object.defineProperties(za.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)}}}),za.prototype.getOtherVertex=za.prototype.Ax,za.className="LayoutEdge";function xs(a){mr.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Nn(NaN,NaN).freeze(),this.tf=new Nn(10,10).freeze(),this.Jb=cp,this.Rb=r0,this.nd=fp,this.hd=uS,a&&Object.assign(this,a)}Le(xs,mr),xs.prototype.cloneProtected=function(a){mr.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},xs.prototype.qb=function(a){a.classType===xs?a===fp||a===a0||a===ry||a===s0?this.sorting=a:a===r0||a===$l?this.arrangement=a:a===cp||a===o0?this.alignment=a:xe("Unknown enum value: "+a):mr.prototype.qb.call(this,a)},xs.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 bi)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 s0:b.reverse();break;case fp:b.sort(this.comparer);break;case a0: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 o0:var ot=y,rt=x,lt=on.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var gt=ut=0;gt<b.length;gt++){var St=this.ni(b[gt],lt);ut=Math.max(ut,St.width)}if(ut=Math.max(ut+ot,1),gt=Math.max(this.cellSize.height,1),!isFinite(gt))for(St=gt=0;St<b.length;St++){var wt=this.ni(b[St],lt);gt=Math.max(gt,wt.height)}gt=Math.max(gt+rt,1),St=this.arrangement;for(var Et=wt=this.arrangementOrigin.x,Nt=this.arrangementOrigin.y,Ut=0,jt=0,ee=0;ee<b.length;ee++){var oe=b[ee],ae=this.ni(oe,lt),Se=Math.ceil((ae.width+ot)/ut)*ut,je=Math.ceil((ae.height+rt)/gt)*gt;switch(St){case $l:var Dn=Math.abs(Et-ae.width);break;default:Dn=Et+ae.width}switch((0<z&&Ut>z-1||0<tt&&0<Ut&&Dn-wt>tt)&&(E.push(new on(0,Nt,tt+ot,jt)),Ut=0,Et=wt,Nt+=jt,jt=0),jt=Math.max(jt,je),St){case $l:ae=-ae.width;break;default:ae=0}switch(oe.moveTo(Et+ae,Nt),St){case $l:Et-=Se;break;default:Et+=Se}Ut++}E.push(new on(0,Nt,tt+ot,jt)),on.free(lt);break;case cp:for(rt=tt,ut=z,gt=y,St=x,tt=on.alloc(),wt=Math.max(this.cellSize.width,1),z=Nt=lt=0,ot=Wt.alloc(),Et=0;Et<b.length;Et++)jt=b[Et],Ut=this.ni(jt,tt),jt=bh(jt,jt.locationObject,jt.locationSpot,ot),lt=Math.max(lt,jt.x),Nt=Math.max(Nt,Ut.width-jt.x),z=Math.max(z,jt.y);switch(Et=this.arrangement,Et){case $l:lt+=gt;break;default:Nt+=gt}wt=isFinite(wt)?Math.max(wt+gt,1):Math.max(lt+Nt,1);var Un=jt=this.arrangementOrigin.x;for(ee=this.arrangementOrigin.y,Nt=0,rt>=lt&&(rt-=lt),lt=oe=0,Se=Math.max(this.cellSize.height,1),ae=z=0,je=!0,Ut=Wt.alloc(),Dn=0;Dn<b.length;Dn++){var _n=b[Dn],bn=this.ni(_n,tt),dn=bh(_n,_n.locationObject,_n.locationSpot,ot);if(0<Nt)switch(Et){case $l:Un=(Un-jt-(bn.width-dn.x))/wt,Un=me.$(Math.round(Un),Un)?Math.round(Un):Math.floor(Un),Un=Un*wt+jt;break;default:Un=(Un-jt+dn.x)/wt,Un=me.$(Math.round(Un),Un)?Math.round(Un):Math.ceil(Un),Un=Un*wt+jt}else switch(Et){case $l:oe=Un+dn.x+bn.width;break;default:oe=Un-dn.x}switch(Et){case $l:var Ei=-(Un+dn.x)+oe;break;default:Ei=Un+bn.width-dn.x-oe}if(0<ut&&Nt>ut-1||0<rt&&0<Nt&&Ei>rt){for(E.push(new on(0,je?ee-z:ee,rt+gt,ae+z+St)),Un=0;Un<Nt&&Dn!==Nt;Un++){Ei=b[Dn-Nt+Un];var Pi=bh(Ei,Ei.locationObject,Ei.locationSpot,Ut);Ei.moveTo(Ei.position.x,Ei.position.y+z-Pi.y)}ae+=St,ee=je?ee+ae:ee+(ae+z),Nt=ae=z=0,Un=jt,je=!1}switch(Un===jt&&(lt=Et===$l?Math.max(lt,bn.width-dn.x):Math.min(lt,-dn.x)),z=Math.max(z,dn.y),ae=Math.max(ae,bn.height-dn.y),isFinite(Se)&&(ae=Math.max(ae,Math.max(bn.height,Se)-dn.y)),je?_n.moveTo(Un-dn.x,ee-dn.y):_n.moveTo(Un-dn.x,ee),Et){case $l:Un-=dn.x+gt;break;default:Un+=bn.width-dn.x+gt}Nt++}if(E.push(new on(0,ee,rt+gt,(je?ae:ae+z)+St)),b.length!==Nt)for(rt=0;rt<Nt;rt++)ut=b[b.length-Nt+rt],gt=bh(ut,ut.locationObject,ut.locationSpot,ot),ut.moveTo(ut.position.x,ut.position.y+z-gt.y);if(Wt.free(ot),Wt.free(Ut),Et===$l)for(b=0;b<E.length;b++)z=E[b],z.width+=lt,z.x-=lt;else for(b=0;b<E.length;b++)z=E[b],z.x>lt&&(z.width+=z.x-lt,z.x=lt);on.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===$l?this.commitLayers(E,new Wt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Wt(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},xs.prototype.commitLayers=function(){};function uS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}re.Object.defineProperties(xs.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==cp&&a!==o0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==r0&&a!==$l||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ry&&a!==s0&&a!==fp&&a!==a0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var o0=new Oe(xs,"Position",0),cp=new Oe(xs,"Location",1),r0=new Oe(xs,"LeftToRight",2),$l=new Oe(xs,"RightToLeft",3),ry=new Oe(xs,"Forward",4),s0=new Oe(xs,"Reverse",5),fp=new Oe(xs,"Ascending",6),a0=new Oe(xs,"Descending",7);xs.className="GridLayout",xs.standardComparer=uS,xs.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},xs.Position=o0,xs.Location=cp,xs.LeftToRight=r0,xs.RightToLeft=$l,xs.Forward=ry,xs.Reverse=s0,xs.Ascending=fp,xs.Descending=a0;function jo(){this.On=new mn,this.Dn=new mn,this.Pa=new mn,this.cf=new Yn,this.bf=new Yn,this.aj=new Yn,this.H=null,this.tp=!1}bt=jo.prototype,bt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},bt.Xe=function(a){this.H=a},bt.oi=function(a){if(a instanceof Rn){if(this.On.add(a),a instanceof bi){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 Ln?this.Dn.add(a):a instanceof Eo||this.Pa.add(a);y=a.data,y===null||a instanceof Eo||(a instanceof Ln?this.bf.add(y,a):this.cf.add(y,a))},bt.pc=function(a){if(a.Ej(),a instanceof Rn){if(this.On.remove(a),a instanceof bi){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 Ln?this.Dn.remove(a):a instanceof Eo||this.Pa.remove(a);y=a.data,y===null||a instanceof Eo||(a instanceof Ln?this.bf.remove(y):this.cf.remove(y))},bt.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 bi)&&xe('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 bi||xe('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 Ln||xe('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Kn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Kn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Kn(),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]);oi(y),oi(x),oi(a)}},jo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},jo.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hS(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&vf(this.diagram,!1)};function hS(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=dS(a,y,E);if(b!==null&&(Cl(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)}}jo.prototype.insertLink=function(){return null},jo.prototype.resolveReferencesForData=function(){},jo.prototype.Ro=function(a){return this.H.model.Ro(a)};function dS(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&&(gS||(gS=!0,Vn('No Group template found for category "'+x+'"'),Vn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fS||(fS=!0,Vn('No Node template found for category "'+x+'"'),Vn(" Using default node template")),y=a.ny))),y}jo.prototype.getLinkCategoryForData=function(){return""},jo.prototype.setLinkCategoryForData=function(){},jo.prototype.setFromNodeForLink=function(){},jo.prototype.setToNodeForLink=function(){},jo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(pS||(pS=!0,Vn('No Link template found for category "'+a+'"'),Vn(" Using default link template")),x=y.my)),x},jo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},jo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},jo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Lg(this.diagram,a,!1),this.unresolveReferencesForPart(a))},jo.prototype.unresolveReferencesForPart=function(){},jo.prototype.removeDataForLink=function(){},jo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},jo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Rn?a:null)},jo.prototype.findLinkForKey=function(){return null},bt=jo.prototype,bt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},bt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Rn?a:null)},bt.Kc=function(a){return a===null?null:this.bf.I(a)},bt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new mn;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(_e(tt)&&sy(this,b,tt)){y.add(E);break}}}return y.iterator},bt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new mn;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(_e(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(Je(z)){if(!Je(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var ot=z[tt];if(ot!==void 0&&!cS(a,b[tt],ot))return!1}}else if(!cS(a,b,z))return!1}return!0}function cS(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(_e(y)&&_e(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}jo.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===ar){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===wr){var tt=a.newValue;E==="nodeDataArray"&&_e(tt)&&hS(this,tt),y.isModified=!0}else if(x===Rr){var ot=a.oldValue;E==="nodeDataArray"&&_e(ot)&&this.ip(ot),y.isModified=!0}else x===Ds&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===ar){var rt=a.propertyName,lt=a.object;lt===y.model?(rt==="nodeKeyProperty"||rt==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(lt,rt),y.isModified=!0}else if(x===wr||x===Rr){var ut=a.change===wr,gt=ut?a.newParam:a.oldParam,St=ut?a.newValue:a.oldValue,wt=this.aj.I(a.object);if(Array.isArray(wt))for(a=0;a<wt.length;a++){var Et=wt[a];if(ut)Mm(Et,St,gt,!0);else if(!(0>gt)){var Nt=gt+Kg(Et);Et.pc(Nt,!0),xv(Et,Nt,gt)}}y.isModified=!0}}finally{y.aa=!0}}}}},jo.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)},jo.prototype.rp=function(){for(var a=this.H.model,y=new mn,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){ES(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&CS(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()},jo.prototype.refreshDataBoundLinks=function(){},jo.prototype.updateRelationshipsFromData=function(){},jo.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=Kn()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);oi(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ay(a,y){var x=y.Hh;if(Je(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){Yd(y,function(tt){tt=tt.O.s;for(var ot=tt.length,rt=0;rt<ot;rt++)Ag(x,tt[rt])});var E=y.Hh;if(Je(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}}}}jo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Yn;if(Je(a))for(var b=0;b<a.length;b++)l0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)l0(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 mn;for(var z=new Yn,tt=E.iterator;tt.next();){var ot=tt.value;if(ot instanceof Ln)a||ot.fromNode!==null&&ot.toNode!==null||b.add(ot);else if(ot instanceof Rn&&ot.data!==null&&x.Tl()){var rt=ot;ot=tt.key;var lt=ot.pg();lt!==null&&(lt=E.I(lt),lt!==null?(x.qe(rt.data,x.wa(lt.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 Yn;E.each(function(gt){gt.key.data!==null&&ut.add(gt.key.data,gt.value.data)}),x(ut,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function l0(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 ai))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Rn){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 bi&&z instanceof bi)for(y=y.memberParts;y.next();)tt=l0(a,y.value,x,E,b),tt instanceof Ln||tt===null||(tt.containingGroup=z)}else if(y instanceof Ln&&z instanceof Ln)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=l0(a,y.value,x,E,b),tt!==null&&tt instanceof Rn&&(tt.labeledLink=z);return z}jo.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Ln||(E=b.copyNodeData(E),_e(E)&&(b.xf(E),x=y.Lc(E)))}else Cl(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 Ln||(b=y.copyNodeData(E)),_e(b)&&(x.data=b)));return x},re.Object.defineProperties(jo.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}}}),jo.prototype.updateAllRelationshipsFromData=jo.prototype.rp,jo.prototype.findLinksByExample=jo.prototype.ls,jo.prototype.findNodesByExample=jo.prototype.ms,jo.prototype.findLinkForData=jo.prototype.Kc,jo.prototype.findNodeForData=jo.prototype.ii,jo.prototype.findPartForData=jo.prototype.Lc,jo.prototype.findNodeForKey=jo.prototype.Vb,jo.prototype.removeModeledPart=jo.prototype.ip,jo.prototype.removeModeledParts=jo.prototype.Gs,jo.prototype.rebuildParts=jo.prototype.Wd;var fS=!1,gS=!1,pS=!1;jo.className="PartManager";function us(a){jo.apply(this,arguments)}Le(us,jo),us.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mS(this,a.linkDataArray)},us.prototype.addModeledParts=function(a){for(jo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)jf(a.value);vf(this.diagram,!1)};function mS(a,y){y.forEach(function(x){vS(a,x)}),vf(a.diagram,!1)}function vS(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){Cl(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=c0(x,y,!0);z!==""&&(b.fromPortId=z),z=qa(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Rn&&(b.fromNode=z)),z=c0(x,y,!1),z!==""&&(b.toPortId=z),z=qa(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Rn&&(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}}}}us.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yS(a,y){y.forEach(function(x){a.ip(x)})}us.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},us.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},us.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},us.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},us.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},us.prototype.findPartForKey=function(a){var y=jo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},us.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},us.prototype.doModelChanged=function(a){var y=this;if(jo.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===ar){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 lt=this.Kc(a.object);if(lt!==null){var ut=a.newValue;typeof ut=="string"&&(lt.fromPortId=ut)}}else if(b==="linkToPortId"){var gt=this.Kc(a.object);if(gt!==null){var St=a.newValue;typeof St=="string"&&(gt.toPortId=St)}}else if(b==="nodeGroupKey"){var wt=this.Lc(a.object);if(wt!==null){var Et=a.newValue;if(Et!==void 0){var Nt=this.Vb(Et);Nt instanceof bi?wt.containingGroup=Nt:wt.containingGroup=null}else wt.containingGroup=null}}else if(b==="linkLabelKeys"){var Ut=this.Kc(a.object);if(Ut!==null){var jt=a.oldValue,ee=a.newValue;Array.isArray(jt)&&jt.forEach(function(dn){0<=ee.indexOf(dn)||(dn=y.Vb(dn),dn!==null&&(dn.labeledLink=null))}),Array.isArray(ee)&&ee.forEach(function(dn){dn=y.Vb(dn),dn!==null&&(dn.labeledLink=Ut)})}}else if(b==="linkCategory"){var oe=this.Kc(a.object),ae=a.newValue;oe!==null&&typeof ae=="string"&&(oe.category=ae)}else b==="linkDataArray"&&(yS(this,a.oldValue),mS(this,a.newValue));x.isModified=!0}else if(E===wr){var Se=a.newValue;if(b==="linkDataArray"&&typeof Se=="object"&&Se!==null)vS(this,Se);else if(b==="linkLabelKeys"&&dd(Se)){var je=this.Kc(a.object),Dn=this.Vb(Se);je!==null&&Dn!==null&&(Dn.labeledLink=je)}x.isModified=!0}else if(E===Rr){var Un=a.oldValue;if(b==="linkDataArray"&&typeof Un=="object"&&Un!==null)this.ip(Un);else if(b==="linkLabelKeys"&&dd(Un)){var _n=this.Vb(Un);_n!==null&&(_n.labeledLink=null)}x.isModified=!0}}else if(E===ar){var bn=a.propertyName;a.object!==x.model||bn!=="linkFromKeyProperty"&&bn!=="linkToKeyProperty"&&bn!=="linkFromPortIdProperty"&&bn!=="linkToPortIdProperty"&&bn!=="linkLabelKeysProperty"&&bn!=="nodeIsGroupProperty"&&bn!=="nodeGroupKeyProperty"&&bn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},us.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new mn,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){NS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&BS(y,z,!1)})},us.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 Ln){var b=qa(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=qa(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 mn().addAll(y);var tt=new mn;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 Eo)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof bi)&&(a.containingGroup=y)}}},us.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=gp(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 bi&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof Rn&&(qa(y,tt,!0)===x&&(z.link.fromNode=b),qa(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}}Yl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof bi&&(b.containingGroup=a))}},us.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Rn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)Kl(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&Kl(y,x,E.data)),a instanceof bi)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&Kl(y,x,E)}}},us.prototype.copyPartData=function(a,y){var x=jo.prototype.copyPartData.call(this,a,y);if(a instanceof Ln)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},us.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 Ln){if(Cl(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 Rn&&(Cl(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&&Zf(z,E,z.wa(a.data),!0),Vf(z,E,ot,!0),x!==null&&Zf(z,E,z.wa(x.data),!1),Vf(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof Rn||(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},us.prototype.findLinkForKey=us.prototype.findLinkForKey,us.prototype.findPartForKey=us.prototype.findPartForKey,us.prototype.removeAllModeledParts=us.prototype.removeAllModeledParts,us.prototype.addModeledParts=us.prototype.addModeledParts,us.prototype.addAllModeledParts=us.prototype.addAllModeledParts,us.className="GraphLinksPartManager";function fl(){jo.apply(this,arguments),this.Sg=null}Le(fl,jo);function u0(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||!Xs(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Cl(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}}}fl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},fl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},fl.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}},fl.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))},fl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},fl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},fl.prototype.doModelChanged=function(a){if(jo.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===ar){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:u0(this,z,tt)}}else if(E==="parentLinkCategory"){var rt=this.ii(a.object),lt=a.newValue;if(rt!==null&&typeof lt=="string"){var ut=rt.kh();ut!==null&&(ut.category=lt)}}y.isModified=!0}}else if(x===ar){var gt=a.propertyName;a.object===y.model&&gt==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},fl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof Rn&&(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:u0(this,y,a):E!==null&&Lg(x,E,!1)))}}},fl.prototype.updateDataBindings=function(a,y){jo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},fl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=gp(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 Rn&&y.mh(z)===x&&u0(this,b,this.ii(z))}Yl(y,x)}a=y.mh(a),a!==void 0&&b instanceof Rn&&(a=this.Vb(a),u0(this,a,b))}},fl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Rn){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(Rr,"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)&&Kl(y,x,b)}},fl.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},fl.prototype.findLinkForKey=fl.prototype.findLinkForKey,fl.className="TreePartManager";function Jn(a,y){this.kl=new mn,this.il=new mn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,po(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Yn,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 Yn,this.Lt=new pn,this.Wg=!1,this.o=null,this.undoManager=new Sr,a!==void 0&&(Je(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Jn.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},Jn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Jn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Jn.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)+":"+xi(b)}}return y},Jn.prototype.xA=function(a){a.change!==Ds&&xe("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof os?(xS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Jn.prototype.Qv=function(a,y){var x=this,E=!1,b=new mn,z=new mn,tt=new mn,ot=this.vh;a.changes.each(function(gt){gt.model===x&&(gt.modelChange==="nodeDataArray"?gt.change===wr?b.add(gt.newValue):gt.change===Rr&&tt.add(gt.oldValue):x.lb(gt.object)?z.add(gt.object):gt.change!==ar||x.modelData!==gt.object&&gt.propertyName!=="modelData"?gt.object!==null&&(ot&&ot.contains(gt.object)?ot.get(gt.object).each(function(St){x.lb(St)&&z.add(St)}):gt.object instanceof Jn||x.ri()&&x.Jc(gt.object)||PS(x,gt.object).each(function(St){z.add(St)})):E=!0)});var rt=this.il;rt.clear(),b.each(function(gt){rt.add(x.wa(gt)),y||z.add(gt)});var lt=this.kl;lt.clear(),tt.each(function(gt){lt.add(x.wa(gt)),y&&z.add(gt)}),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<lt.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=lt.Fa():ut.removedNodeKeys=lt.Fa()),lt.clear(),rt.clear(),ut},Jn.prototype.cloneDeep=function(a){return Wf(this,a,!0)};function Wf(a,y,x,E,b,z){function tt(gt,St){ot?(gt.__gohashid===void 0&&z.push(gt),E.set(gt,St)):(gt=Dr++,E.set(gt,St),b.set(gt,y))}if(!_e(y))return y;z||(z=[]);var ot=Object.isExtensible(y);if(E||(E=new Yn),ot){var rt=E.get(y);if(rt)return rt}else for(b||(b=new Yn),rt=b.iterator;rt.next();){var lt=rt.key;if(rt.value===y&&(lt=E.get(lt)))return lt}if(Array.isArray(y)){rt=[],tt(y,rt);for(var ut=0;ut<y.length;ut++)rt.push(Wf(a,y[ut],!1,E,b,z))}else if(y instanceof Wt||y instanceof Nn||y instanceof on||y instanceof ci||y instanceof Qn)rt=y.copy(),tt(y,rt);else{if(y instanceof Io||y instanceof hn||y instanceof Oe)return y;if(y instanceof pn)rt=new pn().addAll(Wf(a,y.Fa(),!1,E,b,z)),tt(y,rt);else if(y instanceof mn)rt=new mn().addAll(Wf(a,y.Fa(),!1,E,b,z)),tt(y,rt);else if(y instanceof Yn)rt=new Yn().addAll(Wf(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]=Wf(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(gt){delete gt.__gohashid}),rt}bt=Jn.prototype,bt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},bt.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},bt.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 SS(a,y){y=y.modelData,_e(y)&&(a.dm(y),a.modelData=y)}bt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!wS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+uy(this,this.modelData)),a+`,
"nodeDataArray": `+hd(this,this.nodeDataArray,!0)},bt.kv=function(a){SS(this,a),a=a.nodeDataArray,Je(a)&&(this.dm(a),this.nodeDataArray=a)};function xS(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new mn,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new Yn,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===ar?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===wr||z===Rr)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function PS(a,y){for(var x=new mn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];h0(a,y,b,b,x)}return x}function h0(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(h0(a,y,tt,E,b))return!0}else if(_e(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(h0(a,y,tt,E,b))return!0}return!1}bt.Pv=function(a,y){var x=this,E=!1,b=new mn,z=new mn,tt=new mn,ot=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===wr?b.add(ut.newValue):ut.change===Rr&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==ar||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(gt){x.lb(gt)&&z.add(gt)}):ut.object instanceof Jn||x.ri()&&x.Jc(ut.object)||PS(x,ut.object).each(function(gt){z.add(gt)})):E=!0)});var rt=this.il;rt.clear(),b.each(function(ut){rt.add(x.wa(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
"modelData": `+uy(this,this.modelData)),0<rt.count&&(a+=(y?this.Yv:this.Wv)+hd(this,rt.Fa(),!0)),0<z.count&&(a+=this.jy+hd(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+hd(this,lt.Fa(),!0)),lt.clear(),rt.clear(),a},bt.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)&&xe("applyIncrementalJson cannot change Model properties"),SS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Yn;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)},bt.$x=function(a,y){a.change!==Ds&&xe("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof os?(y===void 0&&(y=pp(this,this)),xS(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 }'},bt.yA=function(a,y){return this.$x(a,y)},bt.np=function(a){return a===void 0&&(a=pp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},bt.toJSON=function(a){return this.np(a)},bt.Zw=function(a){var y=null;if(typeof a=="string")try{y=Yt.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:xe("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&xe("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},bt.Ky=function(a){return this.Zw(a)},Jn.constructGraphLinksModel=function(){return new Jn},bt=Jn.prototype,bt.dm=function(a){if(Je(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(_e(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:xe("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(_e(a)){for(y in a)if(x=a[y],_e(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 pn,E=0;E<x.length/2;E++)b.add(new Wt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return kx(a)}return a},bt.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()):Je(a)?hd(this,a):_e(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function hd(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new yi;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 wS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function sa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof Wt)y={class:"go.Point",x:sa(x.x),y:sa(x.y)};else if(x instanceof Nn)y={class:"go.Size",width:sa(x.width),height:sa(x.height)};else if(x instanceof on)y={class:"go.Rect",x:sa(x.x),y:sa(x.y),width:sa(x.width),height:sa(x.height)};else if(x instanceof ci)y={class:"go.Margin",top:sa(x.top),right:sa(x.right),bottom:sa(x.bottom),left:sa(x.left)};else if(x instanceof Qn)x.sb()?y={class:"go.Spot",x:sa(x.x),y:sa(x.y),offsetX:sa(x.offsetX),offsetY:sa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Io){if(y={class:"go.Brush",type:x.type.name},x.type===wh?y.color=x.color:(x.type===$u||x.type===dl)&&(y.start=x.start,y.end=x.end,x.type===dl&&(x.startRadius!==0&&(y.startRadius=sa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=sa(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 hn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=sa(x.startX)),x.startY!==0&&(y.startY=sa(x.startY)),x.endX!==0&&(y.endX=sa(x.endX)),x.endY!==0&&(y.endY=sa(x.endY)),x.spot1.D(is)||(y.spot1=x.spot1),x.spot2.D(Hs)||(y.spot2=x.spot2),x.type===hn.o&&(y.path=hn.ia(x))):x instanceof Oe&&(y={class:"go.EnumValue",classType:pp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=zr(y,b);if(!wS(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof pn){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 aa(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function kx(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 Wt(aa(a.x),aa(a.y));else if(y==="Size")x=new Nn(aa(a.width),aa(a.height));else if(y==="Rect")x=new on(aa(a.x),aa(a.y),aa(a.width),aa(a.height));else if(y==="Margin")x=new ci(aa(a.top),aa(a.right),aa(a.bottom),aa(a.left));else if(y==="Spot")typeof a.enum=="string"?x=ko(a.enum):x=new Qn(aa(a.x),aa(a.y),aa(a.offsetX),aa(a.offsetY));else if(y==="Brush"){if(x=new Io,x.type=Wn(Io,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Qn&&(x.start=a.start),a.end instanceof Qn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=aa(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=aa(a.endRadius)),a=a.colorStops,_e(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=hn.parse(a.path):x=new hn,x.type=Wn(hn,a.type),typeof a.startX=="number"&&(x.startX=aa(a.startX)),typeof a.startY=="number"&&(x.startY=aa(a.startY)),typeof a.endX=="number"&&(x.endX=aa(a.endX)),typeof a.endY=="number"&&(x.endY=aa(a.endY)),a.spot1 instanceof Qn&&(x.spot1=a.spot1),a.spot2 instanceof Qn&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=dy(E),typeof E=="function"&&(x=Wn(E,a.name)));return x}bt.Pe=function(a){return this.Lt.add(a),this},bt.ik=function(a){this.Lt.remove(a)},bt.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)},bt.cb=function(a,y,x,E,b,z,tt){Qr(this,"",a,y,x,E,b,z,tt)},bt.g=function(a,y,x,E,b){Qr(this,"",ar,a,this,y,x,E,b)},bt.Fs=function(a,y,x,E,b,z){Qr(this,"",ar,y,a,x,E,b,z)};function Qr(a,y,x,E,b,z,tt,ot,rt){ot===void 0&&(ot=null),rt===void 0&&(rt=null);var lt=new sr;lt.model=a,lt.change=x,lt.modelChange=y,lt.propertyName=E,lt.object=b,lt.oldValue=z,lt.oldParam=ot,lt.newValue=tt,lt.newParam=rt,a.ds(lt)}Jn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===ar){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)),gr(x,E,b)}else a.change===wr?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,_e(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&vi(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&qn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Je(E)&&a.propertyName&&(E=zr(a.object,a.propertyName)),Je(E)&&typeof x=="number"&&(a=a.newValue,y?vi(E,x):qn(E,x,a))):xe("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Rr?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,_e(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&qn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&vi(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Je(E)&&a.propertyName&&(E=zr(a.object,a.propertyName)),Je(E)&&typeof x=="number"&&(a=a.oldValue,y?qn(E,x,a):vi(E,x))):xe("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ds&&xe("unknown ChangedEvent: "+a.toString())},Jn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Jn.prototype.eb=function(a){return this.undoManager.eb(a)},Jn.prototype.Kf=function(){return this.undoManager.Kf()},Jn.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}},bt=Jn.prototype,bt.La=function(a,y){y===void 0&&(y=""),Qr(this,"SourceChanged",Ds,y,a,null,null)},bt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=zr(a,y),y!==void 0)){if(dd(y))return y;xe("Key value for node data "+a+" is not a number or a string: "+y)}}},bt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=zr(a,x);E!==y&&this.hc(y)===null&&(gr(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Qr(this,"nodeKey",ar,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else gr(a,x,y)}};function dd(a){return typeof a=="number"||typeof a=="string"}bt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},bt.hc=function(a){return a===null&&xe("Model.findNodeDataForKey:key must not be null"),a!==void 0&&dd(a)?this.kb.I(a):null},bt.$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))){gr(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;gr(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;gr(a,y,x)}}}}},bt.xf=function(a){a!==null&&(vr(a),this.lb(a)||CS(this,a,!0))};function CS(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&&xe("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,qn(a.Tc,E,y)),Qr(a,"nodeDataArray",wr,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}bt.Fy=function(a){if(Je(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)},bt.cm=function(a){a!==null&&ES(this,a,!0)};function ES(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;vi(a.Tc,E)}Qr(a,"nodeDataArray",Rr,"nodeDataArray",a,y,null,E,null),a.qp(y)}bt.nA=function(a){if(Je(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)},bt.$z=function(a){if(a!==this.nodeDataArray&&Je(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()}},bt.jp=function(a,y){y!==void 0&&(a=gp(this,a),a instanceof mn&&this.Vf.add(y,a))},bt.Lv=function(){},bt.fm=function(){},bt.em=function(){},bt.qp=function(){};function Kl(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new mn,a.Vf.add(y,E)),E.add(x)}}function Yl(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof mn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function gp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof mn?a:null)}bt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Jn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):d0(this,a,!0),_e(a)&&po(a),a};function d0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=d0(a,y[x],a.copiesArrayObjects);E.push(b)}return po(E),E}if(x&&_e(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=zr(y,E),tt=pp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof Jn||z instanceof Sr||z instanceof os||z instanceof sr||(z=d0(a,z,!1)),gr(x,E,z)}return po(x),x}return y instanceof Wt||y instanceof Nn||y instanceof on||y instanceof Qn||y instanceof ci?y.copy():y}Jn.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!bS&&a instanceof Pe&&(bS=!0,Vn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Vn(" Is that really your intent?"));var E=zr(a,y);E!==x&&(gr(a,y,x),this.Fs(a,y,E,x))},bt=Jn.prototype,bt.set=function(a,y,x){this.setDataProperty(a,y,x)},bt.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])}},bt.Ay=function(a,y){this.ts(a,-1,y)},bt.ts=function(a,y,x){0>y&&(y=a.length),qn(a,y,x),Qr(this,"",wr,"",a,null,x,null,y)},bt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&xe("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];vi(a,y),Qr(this,"",Rr,"",a,x,null,y,null)},bt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=zr(a,y),y===void 0))return"";if(typeof y=="string")return y;xe("getCategoryForNodeData found a non-string category for "+a+": "+y)},bt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=zr(a,x);E===void 0&&(E=""),E!==y&&(gr(a,x,y),Qr(this,"nodeCategory",ar,x,a,E,y))}else gr(a,x,y)}},bt.lm=function(a,y){this.jm(y,this.Ro(a))},bt.Tl=function(){return!1},bt.Wj=function(){return!1},bt.ri=function(){return!1},bt.xs=function(){return!1},bt.Xj=function(){return!1};function hy(){return new Jn}function pp(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 pp(a,y.constructor);return typeof y}function dy(a){return jl[a]?jl[a]:Yt.go!==void 0&&Yt.go[a]?Yt.go[a]:null}function zr(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 gr(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){}}re.Object.defineProperties(Jn.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===""&&xe("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&xe("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];_e(b)||xe("Model.nodeDataArray must only contain Objects, not: "+b),vr(b)}for(this.Tc=a,E=new pn,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(Qr(this,"nodeDataArray",ar,"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"}}}),Jn.prototype.setCategoryForNodeData=Jn.prototype.jm,Jn.prototype.getCategoryForNodeData=Jn.prototype.Ro,Jn.prototype.removeArrayItem=Jn.prototype.ov,Jn.prototype.insertArrayItem=Jn.prototype.ts,Jn.prototype.addArrayItem=Jn.prototype.Ay,Jn.prototype.assignAllDataProperties=Jn.prototype.Do,Jn.prototype.set=Jn.prototype.set,Jn.prototype.clearUnresolvedReferences=Jn.prototype.Qy,Jn.prototype.mergeNodeDataArray=Jn.prototype.$z,Jn.prototype.removeNodeDataCollection=Jn.prototype.nA,Jn.prototype.removeNodeData=Jn.prototype.cm,Jn.prototype.addNodeDataCollection=Jn.prototype.Fy,Jn.prototype.addNodeData=Jn.prototype.xf,Jn.prototype.makeNodeDataKeyUnique=Jn.prototype.$u,Jn.prototype.findNodeDataForKey=Jn.prototype.hc,Jn.prototype.containsNodeData=Jn.prototype.lb,Jn.prototype.setKeyForNodeData=Jn.prototype.km,Jn.prototype.getKeyForNodeData=Jn.prototype.wa,Jn.prototype.updateTargetBindings=Jn.prototype.La,Jn.prototype.commit=Jn.prototype.commit,Jn.prototype.rollbackTransaction=Jn.prototype.Kf,Jn.prototype.commitTransaction=Jn.prototype.eb,Jn.prototype.startTransaction=Jn.prototype.Ea,Jn.prototype.raiseDataChanged=Jn.prototype.Fs,Jn.prototype.raiseChanged=Jn.prototype.g,Jn.prototype.raiseChangedEvent=Jn.prototype.cb,Jn.prototype.removeChangedListener=Jn.prototype.ik,Jn.prototype.addChangedListener=Jn.prototype.Pe,Jn.prototype.writeJsonValue=Jn.prototype.sm,Jn.prototype.replaceJsonObjects=Jn.prototype.dm,Jn.prototype.applyIncrementalJSON=Jn.prototype.Ky,Jn.prototype.applyIncrementalJson=Jn.prototype.Zw,Jn.prototype.toJSON=Jn.prototype.toJSON,Jn.prototype.toJson=Jn.prototype.np,Jn.prototype.toIncrementalJSON=Jn.prototype.yA,Jn.prototype.toIncrementalJson=Jn.prototype.$x,Jn.prototype.toIncrementalData=Jn.prototype.xA,Jn.prototype.clear=Jn.prototype.clear;var bS=!1,jl={};Jn.className="Model",Jn.fromJSON=Jn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Yt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:xe("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=Yt[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Jn?y=a:xe("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Jn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Jn.safePropertyValue=zr,Jn.safePropertySet=gr,jl.Brush=Io,jl.ChangedEvent=sr,jl.Geometry=hn,jl.Margin=ci,jl.Panel=Cn,jl.Point=Wt,jl.Rect=on,jl.Size=Nn,jl.Spot=Qn,jl.Transaction=os,jl.UndoManager=Sr;function Gr(a,y,x,E){po(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=LS,this.wk=null):(this.el=mp,this.wk=E),this.st=new mn}Gr.prototype.copy=function(){var a=new Gr;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},bt=Gr.prototype,bt.qb=function(a){a.classType===Gr&&(this.mode=a)},bt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.Kx=function(a){return a===void 0&&(a=null),this.mode=mp,this.backConverter=a,this},bt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},bt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}bt.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==="")Vn("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=zr(y,E)),z!==void 0)if(b===null)x!==""&&gr(a,x,z);else try{if(x!==""){var tt=b(z,a);gr(a,x,tt)}else b(z,a)}catch(ot){}}}},bt.sp=function(a,y,x,E){if(this.el===mp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=zr(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):gr(y,x,tt);else if(rt!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var lt=E.itemIndex,ut=E.panel.itemArray;rt.ov(ut,lt),rt.ts(ut,lt,tt)}}else try{if(x!==""){var gt=z(tt,y,rt);rt!==null?rt.setDataProperty(y,x,gt):gr(y,x,gt)}else{var St=z(tt,y,rt);if(St!==void 0&&rt!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var wt=E.itemIndex,Et=E.panel.itemArray;rt.ov(Et,wt),rt.ts(Et,wt,St)}}}catch(Nt){}}finally{this.st.remove(a)}}}},re.Object.defineProperties(Gr.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&an(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&an(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&an(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&an(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&an(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&an(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&an(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&an(this),this.el=a}}}),Gr.prototype.updateSource=Gr.prototype.sp,Gr.prototype.updateTarget=Gr.prototype.Mv,Gr.prototype.ofModel=Gr.prototype.dA,Gr.prototype.ofObject=Gr.prototype.cp,Gr.prototype.makeTwoWay=Gr.prototype.Kx;var Ax="Binding",LS=new Oe(Gr,"OneWay",1),mp=new Oe(Gr,"TwoWay",2);Gr.className="Binding",Gr.parseEnum=function(a,y){return function(x){return x=Wn(a,x),x===null?y:x}},Gr.toString=xi,Gr.OneWay=LS,Gr.TwoWay=mp;function ao(a,y,x){Jn.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new mn,this.wb=new Yn,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&&(Je(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Le(ao,Jn),ao.constructGraphLinksModel=Jn.constructGraphLinksModel,ao.prototype.cloneProtected=function(a){Jn.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},bt=ao.prototype,bt.clear=function(){Jn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},bt.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)+":"+xi(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+qa(this,b,!0)+"-->"+qa(this,b,!1)}return y},bt.Qv=function(a,y){this.linkKeyProperty===""&&xe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Jn.prototype.Qv.call(this,a,y),E=this,b=new mn,z=new mn,tt=new mn,ot=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===wr?b.add(ut.newValue):ut.change===Rr&&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(gt){E.Jc(gt)&&z.add(gt)}):ut.object instanceof Jn||E.lb(ut.object)||FS(E,ut.object).each(function(gt){z.add(gt)})))});var rt=this.il;rt.clear(),b.each(function(ut){rt.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<rt.count&&(x===null&&(x={}),y?x.removedLinkKeys=rt.Fa():x.insertedLinkKeys=rt.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<lt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=lt.Fa():x.removedLinkKeys=lt.Fa()),lt.clear(),rt.clear(),x},bt.rm=function(){var a=Jn.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},bt.gp=function(a){Jn.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)},bt.Rv=function(){var a=Jn.prototype.Rv.call(this),y=`,
"linkDataArray": `+hd(this,this.linkDataArray,!0);return a+y},bt.kv=function(a){Jn.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function FS(a,y){for(var x=new mn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];h0(a,y,b,b,x)}return x}bt.Pv=function(a,y){this.linkKeyProperty===""&&xe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Jn.prototype.Pv.call(this,a,y),E=this,b=new mn,z=new mn,tt=new mn,ot=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===wr?b.add(ut.newValue):ut.change===Rr&&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(gt){E.Jc(gt)&&z.add(gt)}):ut.object instanceof Jn||E.lb(ut.object)||FS(E,ut.object).each(function(gt){z.add(gt)})))});var rt=this.il;rt.clear(),b.each(function(ut){rt.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<rt.count&&(a+=(y?this.Xv:this.Vv)+hd(this,rt.Fa(),!0)),0<z.count&&(a+=this.iy+hd(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+hd(this,lt.Fa(),!0)),lt.clear(),rt.clear(),a},bt.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)&&xe("applyIncrementalJson cannot change Model properties"),Jn.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]);kS(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)},ao.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===ar){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),gr(x,E,b);return}}else if(a.change===wr){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,_e(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===Rr){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,_e(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}}Jn.prototype.changeState.call(this,a,y)}},bt=ao.prototype,bt.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),gr(x,this.nodeKeyProperty,a),this.xf(x))}return a}},bt.yx=function(a){return qa(this,a,!0)},bt.wv=function(a,y){Zf(this,a,y,!0)},bt.Bx=function(a){return qa(this,a,!1)},bt.Bv=function(a,y){Zf(this,a,y,!1)};function qa(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=zr(y,a),a!==void 0))){if(dd(a))return a;xe((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Zf(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=zr(y,b);z!==x&&(Yl(a,z,y),gr(y,b,x),a.hc(x)===null&&Kl(a,x,y),Qr(a,E?"linkFromKey":"linkToKey",ar,b,y,z,x),typeof b=="string"&&a.La(y,b))}else gr(y,b,x)}}bt.zx=function(a){return c0(this,a,!0)},bt.xv=function(a,y){Vf(this,a,y,!0)},bt.Cx=function(a){return c0(this,a,!1)},bt.Cv=function(a,y){Vf(this,a,y,!1)};function c0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=zr(y,a),y===void 0?"":y)}function Vf(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=zr(y,b);z===void 0&&(z=""),z!==x&&(gr(y,b,x),Qr(a,E?"linkFromPortId":"linkToPortId",ar,b,y,z,x),typeof b=="string"&&a.La(y,b))}else gr(y,b,x)}}bt.Ef=function(a){if(a===null)return f0;var y=this.je;return y===""?f0:(a=zr(a,y),a===void 0?f0:a)},bt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=zr(a,x);if(E===void 0&&(E=f0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)Yl(this,E[z],a);for(gr(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&Kl(this,tt,a)}Qr(this,"linkLabelKeys",ar,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else gr(a,x,y)}},bt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=zr(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&&Kl(this,y,a),Qr(this,"linkLabelKeys",wr,x,a,null,y,null,b)))}else xe(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},bt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=zr(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(Yl(this,y,a),Qr(this,"linkLabelKeys",Rr,x,a,y,null,b,null)))}else E!==void 0&&xe(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},bt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=zr(a,y),y!==void 0)){if(dd(y))return y;xe("Key value for link data "+a+" is not a number or a string: "+y)}}},bt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=zr(a,x);E!==y&&this.jh(y)===null&&(gr(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Qr(this,"linkKey",ar,x,a,E,y),typeof x=="string"&&this.La(a,x))}else gr(a,x,y)}},bt.jh=function(a){return a===null&&xe("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&dd(a)?this.wb.I(a):null},bt.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))){gr(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;gr(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;gr(a,y,x)}}}}},bt.Jc=function(a){return a===null?!1:this.$f.contains(a)},bt.fi=function(a){a!==null&&(vr(a),this.Jc(a)||BS(this,a,!0))};function BS(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&&xe("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)),Qr(a,"linkDataArray",wr,"linkDataArray",a,null,y,null,E),cy(a,y)}bt.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)},bt.bm=function(a){a!==null&&NS(this,a,!0)};function NS(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(Qr(a,"linkDataArray",Rr,"linkDataArray",a,y,null,E,null),x=qa(a,y,!0),Yl(a,x,y),x=qa(a,y,!1),Yl(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],Yl(a,x,y)}bt.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)},bt.Zz=function(a){if(this.linkKeyProperty===""&&xe("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Je(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),kS(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=qa(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Kl(a,x,y),x=qa(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Kl(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&&Kl(a,x,y)}bt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):d0(this,a,!0),_e(a)&&(po(a),this.lf!==""&&gr(a,this.lf,void 0),this.mf!==""&&gr(a,this.mf,void 0),this.je!==""&&gr(a,this.je,[])),a},bt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!zr(a,y)},bt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=zr(a,y),y!==void 0)){if(dd(y))return y;xe("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},bt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=zr(a,x);E!==y&&(Yl(this,E,a),gr(a,x,y),this.hc(y)===null&&Kl(this,y,a),Qr(this,"nodeGroupKey",ar,x,a,E,y),typeof x=="string"&&this.La(a,x))}else gr(a,x,y)}},ao.prototype.copyNodeData=function(a){return a===null?null:(a=Jn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||zr(a,this.Je)===void 0||gr(a,this.Je,void 0),a)},ao.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){Zf(this,a,x,!0);return}if(y===this.linkToKeyProperty){Zf(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Vf(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Vf(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=zr(a,y);E!==x&&(gr(a,y,x),this.Fs(a,y,E,x))},bt=ao.prototype,bt.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&&zr(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},bt.jp=function(a,y){Jn.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(qa(this,E,!0)===b){var tt=this.lf;gr(E,tt,z),Qr(this,"linkFromKey",ar,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(qa(this,E,!1)===b&&(tt=this.mf,gr(E,tt,z),Qr(this,"linkToKey",ar,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,lt=0;lt<ot;lt++)tt[lt]===b&&(tt[lt]=z,Qr(this,"linkLabelKeys",wr,rt,E,b,z,lt,lt))}},bt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;gr(a,E,x),Qr(this,"nodeGroupKey",ar,E,a,y,x),typeof E=="string"&&this.La(a,E)}},bt.Lv=function(){Jn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)cy(this,a[x])},bt.fm=function(a){Jn.prototype.fm.call(this,a),a=this.wa(a);var y=gp(this,a);if(y!==null){var x=Kn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Qr(this,"nodeGroupKey",ar,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(qa(this,E,!0)===a&&(b=this.lf,Qr(this,"linkFromKey",ar,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),qa(this,E,!1)===a&&(b=this.mf,Qr(this,"linkToKey",ar,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&&(Qr(this,"linkLabelKeys",wr,tt,E,a,a,ot,ot),x.push(E))}for(y=0;y<x.length;y++)Yl(this,a,x[y]);oi(x)}},bt.em=function(a){Jn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Kl(this,y,a)},bt.qp=function(a){Jn.prototype.qp.call(this,a);var y=this.lh(a);Yl(this,y,a)},bt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=zr(a,y),y===void 0))return"";if(typeof y=="string")return y;xe("getCategoryForLinkData found a non-string category for "+a+": "+y)},ao.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ao.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=zr(a,x);E===void 0&&(E=""),E!==y&&(gr(a,x,y),Qr(this,"linkCategory",ar,x,a,E,y),typeof x=="string"&&this.La(a,x))}else gr(a,x,y)}},ao.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},bt=ao.prototype,bt.lm=function(a,y){Jn.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function kS(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))}bt.Wj=function(){return!0},bt.ri=function(){return!0},bt.xs=function(){return!0},bt.Xj=function(){return!0},re.Object.defineProperties(ao.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];_e(b)||xe("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),vr(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new pn,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 mn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Qr(this,"linkDataArray",ar,"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"}}}),ao.prototype.setCategoryForLinkData=ao.prototype.lp,ao.prototype.getCategoryForLinkData=ao.prototype.ps,ao.prototype.assignAllDataProperties=ao.prototype.Do,ao.prototype.setGroupKeyForNodeData=ao.prototype.mp,ao.prototype.getGroupKeyForNodeData=ao.prototype.lh,ao.prototype.isGroupForNodeData=ao.prototype.Yu,ao.prototype.copyLinkData=ao.prototype.Jo,ao.prototype.mergeLinkDataArray=ao.prototype.Zz,ao.prototype.removeLinkDataCollection=ao.prototype.lA,ao.prototype.removeLinkData=ao.prototype.bm,ao.prototype.addLinkDataCollection=ao.prototype.Ey,ao.prototype.addLinkData=ao.prototype.fi,ao.prototype.containsLinkData=ao.prototype.Jc,ao.prototype.makeLinkDataKeyUnique=ao.prototype.Bs,ao.prototype.findLinkDataForKey=ao.prototype.jh,ao.prototype.setKeyForLinkData=ao.prototype.Ks,ao.prototype.getKeyForLinkData=ao.prototype.Ac,ao.prototype.removeLabelKeyForLinkData=ao.prototype.Qx,ao.prototype.addLabelKeyForLinkData=ao.prototype.Bu,ao.prototype.setLabelKeysForLinkData=ao.prototype.Ls,ao.prototype.getLabelKeysForLinkData=ao.prototype.Ef,ao.prototype.setToPortIdForLinkData=ao.prototype.Cv,ao.prototype.getToPortIdForLinkData=ao.prototype.Cx,ao.prototype.setFromPortIdForLinkData=ao.prototype.xv,ao.prototype.getFromPortIdForLinkData=ao.prototype.zx,ao.prototype.setToKeyForLinkData=ao.prototype.Bv,ao.prototype.getToKeyForLinkData=ao.prototype.Bx,ao.prototype.setFromKeyForLinkData=ao.prototype.wv,ao.prototype.getFromKeyForLinkData=ao.prototype.yx,ao.prototype.clear=ao.prototype.clear;var f0=Object.freeze([]);ao.className="GraphLinksModel",jl.GraphLinksModel=ao,Jn.constructGraphLinksModel=Jn.constructGraphLinksModel=function(){return new ao},Jn.initDiagramModel=hy=function(){return new ao};function la(a,y){Jn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Je(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Le(la,Jn),la.constructGraphLinksModel=Jn.constructGraphLinksModel,la.prototype.cloneProtected=function(a){Jn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},bt=la.prototype,bt.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)+":"+xi(b)}}return y},bt.rm=function(){var a=Jn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},bt.gp=function(a){Jn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},bt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&xe("applyIncrementalJson cannot change Model properties"),Jn.prototype.fp.call(this,a)},bt.Vl=function(a){return a},bt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=zr(a,y),y!==void 0)){if(dd(y))return y;xe("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},bt.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=zr(a,x);E!==y&&(Yl(this,E,a),gr(a,x,y),this.hc(y)===null&&Kl(this,y,a),Qr(this,"nodeParentKey",ar,x,a,E,y),typeof x=="string"&&this.La(a,x))}else gr(a,x,y)}},bt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=zr(a,y),y===void 0)?"":typeof y=="string"?y:(xe("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},la.prototype.getLinkCategoryForData=function(a){return this.ss(a)},la.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=zr(a,x);E===void 0&&(E=""),E!==y&&(gr(a,x,y),Qr(this,"parentLinkCategory",ar,x,a,E,y),typeof x=="string"&&this.La(a,x))}else gr(a,x,y)}},la.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},la.prototype.copyNodeData=function(a){return a===null?null:(a=Jn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||zr(a,this.Ke)===void 0||gr(a,this.Ke,void 0),a)},la.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=zr(a,y);E!==x&&(gr(a,y,x),this.Fs(a,y,E,x))},bt=la.prototype,bt.jp=function(a,y){Jn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},bt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;gr(a,E,x),Qr(this,"nodeParentKey",ar,E,a,y,x),typeof E=="string"&&this.La(a,E)}},bt.fm=function(a){Jn.prototype.fm.call(this,a),a=this.wa(a);var y=gp(this,a);if(y!==null){var x=Kn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Qr(this,"nodeParentKey",ar,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)Yl(this,a,x[y]);oi(x)}},bt.em=function(a){Jn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Kl(this,y,a)},bt.qp=function(a){Jn.prototype.qp.call(this,a);var y=this.mh(a);Yl(this,y,a)},bt.lm=function(a,y){Jn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},bt.Tl=function(){return!0},bt.xs=function(){return!0},re.Object.defineProperties(la.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"}}}),la.prototype.setParentLinkCategoryForNodeData=la.prototype.Ms,la.prototype.getParentLinkCategoryForNodeData=la.prototype.ss,la.prototype.setParentKeyForNodeData=la.prototype.qe,la.prototype.getParentKeyForNodeData=la.prototype.mh,la.className="TreeModel",jl.TreeModel=la;function Pr(a){mr.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=zl,this.Ti=0,this.Zv=new Wt,this.Jp=this.me=0,this.Xr=new xp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=zl,this.K=ua,this.nd=$f,this.hd=oy,this.tf=6,this.Nn=x0,a&&Object.assign(this,a)}Le(Pr,mr),Pr.prototype.cloneProtected=function(a){mr.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},Pr.prototype.qb=function(a){a.classType===Pr?a===y0||a===S0||a===m0||a===v0||a===$f?this.sorting=a:a===ec||a===Uf||a===ua||a===fd?this.direction=a:a===Nh||a===cd||a===zl||a===_l?this.arrangement=a:(a===_c||a===x0)&&(this.nodeDiameterFormula=a):mr.prototype.qb.call(this,a)},Pr.prototype.createNetwork=function(){return new Kf(this)},Pr.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 pn;y.addAll(a.iterator),a=new pn;var x=new pn,E=this.sort(y),b,z,tt=this.Jp,ot=this.arrangement,rt=this.nodeDiameterFormula,lt=this.radius;(!isFinite(lt)||0>=lt)&&(lt=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var gt=this.startAngle;isFinite(gt)||(gt=0);var St=this.sweepAngle;if((!isFinite(St)||360<St||1>St)&&(St=360),y=this.spacing,isFinite(y)||(y=NaN),ot===_l&&rt===_c?ot=zl:ot===_l&&rt!==_c&&(ot=this.arrangement),(this.direction===ec||this.direction===Uf)&&this.sorting!==$f){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===ec?(this.arrangement===_l&&a.reverse(),E=new pn,E.addAll(a),E.addAll(x)):(this.arrangement===_l&&x.reverse(),E=new pn,E.addAll(x),E.addAll(a))}rt=E.length;for(var wt=z=b=0;wt<E.length;wt++){var Et=gt+St*z*(this.direction===ua?1:-1)/rt,Nt=E.M(wt).diameter;isNaN(Nt)&&(Nt=gd(E.M(wt),Et)),360>St&&(wt===0||wt===E.length-1)&&(Nt/=2),b+=Nt,z++}if(isNaN(lt)||ot===_l){if(isNaN(y)&&(y=6),ot!==zl&&ot!==_l){for(z=-1/0,tt=0;tt<rt;tt++)wt=E.M(tt),b=E.M(tt===rt-1?0:tt+1),isNaN(wt.diameter)&&gd(wt,0),isNaN(b.diameter)&&gd(b,0),z=Math.max(z,(wt.diameter+b.diameter)/2);tt=z+y,ot===Nh?lt=(z+y)/(2*Math.PI/rt):lt=g0(this,tt*(360<=St?rt:rt-1),ut,gt*Math.PI/180,St*Math.PI/180)}else lt=g0(this,b+(360<=St?rt:rt-1)*(ot!==_l?y:1.6*y),ut,gt*Math.PI/180,St*Math.PI/180);z=lt*ut}else if(z=lt*ut,wt=fy(this,lt,z,gt*Math.PI/180,St*Math.PI/180),isNaN(y))(ot===zl||ot===_l)&&(y=(wt-b)/(360<=St?rt:rt-1));else if(ot===zl||ot===_l)wt=(wt-b)/(360<=St?rt:rt-1),wt<y?(lt=g0(this,b+y*(360<=St?rt:rt-1),ut,gt*Math.PI/180,St*Math.PI/180),z=lt*ut):y=wt;else{for(tt=-1/0,b=0;b<rt;b++)Et=E.M(b),Nt=E.M(b===rt-1?0:b+1),isNaN(Et.diameter)&&gd(Et,0),isNaN(Nt.diameter)&&gd(Nt,0),tt=Math.max(tt,(Et.diameter+Nt.diameter)/2);tt+=y,b=g0(this,tt*(360<=St?rt:rt-1),ut,gt*Math.PI/180,St*Math.PI/180),b>lt?(lt=b,z=lt*ut):tt=wt/(360<=St?rt:rt-1)}if(this.kw=ot,this.lc=lt,this.Zm=ut,this.lw=gt,this.Wp=St,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,ot=this.lc,lt=this.lw,ut=this.Wp,gt=this.Ti,St=this.me,rt=this.Jp,this.direction!==ec&&this.direction!==Uf||E!==_l)if(this.direction===ec||this.direction===Uf){switch(tt=0,E){case cd:tt=180*p0(this,ot,St,lt,rt)/Math.PI;break;case zl:rt=y=0,tt=a.first(),tt!==null&&(y=gd(tt,Math.PI/2)),tt=x.first(),tt!==null&&(rt=gd(tt,Math.PI/2)),tt=180*p0(this,ot,St,lt,gt+(y+rt)/2)/Math.PI;break;case Nh:tt=ut/y.length}if(this.direction===ec){switch(E){case cd:Sp(this,a,lt,fd);break;case zl:yp(this,a,lt,fd);break;case Nh:vp(this,a,ut/2,lt,fd)}switch(E){case cd:Sp(this,x,lt+tt,ua);break;case zl:yp(this,x,lt+tt,ua);break;case Nh:vp(this,x,ut/2,lt+tt,ua)}}else{switch(E){case cd:Sp(this,x,lt,fd);break;case zl:yp(this,x,lt,fd);break;case Nh:vp(this,x,ut/2,lt,fd)}switch(E){case cd:Sp(this,a,lt+tt,ua);break;case zl:yp(this,a,lt+tt,ua);break;case Nh:vp(this,a,ut/2,lt+tt,ua)}}}else switch(E){case cd:Sp(this,y,lt,this.direction);break;case zl:yp(this,y,lt,this.direction);break;case Nh:vp(this,y,ut,lt,this.direction);break;case _l:AS(this,y,ut,lt,this.direction)}else AS(this,y,ut,lt-ut/2,ua)}this.updateParts(),this.network=null,this.isValidLayout=!0};function vp(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 lt=E+(b===ua?rt*x/(360<=z?ot:ot-1):-(rt*x)/ot),ut=y.M(rt),gt=tt*Math.tan(lt)/a;gt=Math.sqrt((tt*tt+a*a*gt*gt)/(1+gt*gt)),ut.centerX=gt*Math.cos(lt),ut.centerY=gt*Math.sin(lt),ut.actualAngle=180*lt/Math.PI}}function yp(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 lt=y.M(rt),ut=y.M(rt===ot-1?0:rt+1),gt=z*Math.sin(x);lt.centerX=b*Math.cos(x),lt.centerY=gt,lt.actualAngle=180*x/Math.PI,isNaN(lt.diameter)&&gd(lt,0),isNaN(ut.diameter)&&gd(ut,0),lt=p0(a,b,z,E===ua?x:-x,(lt.diameter+ut.diameter)/2+tt),x+=E===ua?lt:-lt}}function Sp(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 lt=y.M(rt);lt.centerX=b*Math.cos(x),lt.centerY=z*Math.sin(x),lt.actualAngle=180*x/Math.PI,lt=p0(a,b,z,E===ua?x:-x,tt),x+=E===ua?lt:-lt}}function AS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new xp,360>x){for(z=E+(b===ua?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,OS(a,y,x,E,b)}else TS(a,y,x,E,b);a.Xr.commit(y)}function TS(a,y,x,E,b){var z=a.lc,tt=a.Ti,ot=a.Zm,rt=z*Math.cos(E*Math.PI/180),lt=a.me*Math.sin(E*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=Wt.alloc();for(var gt=0;gt<ut.length&&(ut[gt].centerX=rt,ut[gt].centerY=lt,!(gt>=ut.length-1));gt++)DS(a,rt,lt,ut,gt,b,z)||IS(a,rt,lt,ut,gt,b,z),rt=z.x,lt=z.y;if(Wt.free(z),a.mj++,!(23<a.mj)){rt=ut[0].centerX,lt=ut[0].centerY,z=ut[ut.length-1].centerX,gt=ut[ut.length-1].centerY;var St=Math.abs(rt-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),wt=Math.abs(lt-gt)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(wt)?Math.abs(rt-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<wt?wt:1>Math.abs(St)?0:St,rt=Math.abs(z)>Math.abs(gt)?0<z!=lt>gt:0<gt!=rt<z,(rt=b===ua?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,TS(a,y,x,E,b))}}}function OS(a,y,x,E,b){for(var z=a.lc,tt=a.me,ot=a.Zm,rt=z*Math.cos(E*Math.PI/180),lt=tt*Math.sin(E*Math.PI/180),ut=Wt.alloc(),gt=y.Fa(),St=0;St<gt.length&&(gt[St].centerX=rt,gt[St].centerY=lt,!(St>=gt.length-1));St++)DS(a,rt,lt,gt,St,b,ut)||IS(a,rt,lt,gt,St,b,ut),rt=ut.x,lt=ut.y;if(Wt.free(ut),a.mj++,!(23<a.mj)){if(rt=Math.atan2(lt,rt),rt=b===ua?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<gt.length;rt++)tt.mk[rt]=gt[rt].bounds.x,tt.tm[rt]=gt[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,OS(a,y,x,E,b))}}function DS(a,y,x,E,b,z,tt){var ot=a.lc,rt=a.me,lt=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===ua)){if(z=y+a,z>ot){if(z=y-a,z<-ot)return tt.x=z,tt.y=lt,!1;ut=!0}}else if(z=y-a,z<-ot){if(z=y+a,z>ot)return tt.x=z,tt.y=lt,!1;ut=!0}return lt=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>x!==ut&&(lt=-lt),Math.abs(x-lt)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=lt,!1):(tt.x=z,tt.y=lt,!0)}function IS(a,y,x,E,b,z,tt){var ot=a.lc,rt=a.me,lt=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===ua)){if(z=x-a,z<-rt){if(z=x+a,z>rt){tt.x=lt,tt.y=z;return}E=!0}}else if(z=x+a,z>rt){if(z=x-a,z<-rt){tt.x=lt,tt.y=z;return}E=!0}lt=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>y!==E&&(lt=-lt),tt.x=lt,tt.y=z}Pr.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Pr.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 Wt(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))},Pr.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,lt=0;lt<=z;lt++){E!==void 0&&b!==void 0?rt=E+lt*b/z:rt=lt*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 g0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function p0(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}}Pr.prototype.sort=function(a){switch(this.sorting){case m0:break;case v0:a.reverse();break;case y0:a.sort(this.comparer);break;case S0:a.sort(this.comparer),a.reverse();break;case $f:return this.ak(Tx(a));default:xe("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new pn;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}Pr.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 pn;for(var rt=0,lt=0;lt<y.length;lt++){var ut=y[lt].length;if(ut===1)E.push(lt);else if(ut===0)b.add(a.M(lt));else{if(rt===0)x.push(lt);else{for(var gt=ut=1/0,St=-1,wt=[],Et=0;Et<x.length;Et++)0>y[x[Et]].indexOf(x[Et===x.length-1?0:Et+1])&&wt.push(Et===x.length-1?0:Et+1);if(wt.length===0)for(Et=0;Et<x.length;Et++)wt.push(Et);for(Et=0;Et<wt.length;Et++){for(var Nt=wt[Et],Ut=y[lt],jt=0,ee=0;ee<tt.length;ee++){var oe=z[tt[ee]],ae=z[ot[ee]];if(oe<ae){var Se=oe;oe=ae}else Se=ae;if(Se<Nt&&Nt<=oe)for(ae=0;ae<Ut.length;ae++){var je=Ut[ae];0>x.indexOf(je)||Se<z[je]&&z[je]<oe||Se===z[je]||oe===z[je]||jt++}else for(ae=0;ae<Ut.length;ae++)je=Ut[ae],0>x.indexOf(je)||Se<z[je]&&z[je]<oe&&Se!==z[je]&&oe!==z[je]&&jt++}for(Ut=jt,ee=jt=0;ee<y[lt].length;ee++)Se=x.indexOf(y[lt][ee]),0<=Se&&(Se=Math.abs(Nt-(Se>=Nt?Se+1:Se)),jt+=Se<x.length+1-Se?Se:x.length+1-Se);for(ee=0;ee<tt.length;ee++)Se=z[tt[ee]],oe=z[ot[ee]],Se>=Nt&&Se++,oe>=Nt&&oe++,Se>oe&&(ae=oe,oe=Se,Se=ae),oe-Se<(x.length+2)/2==(Se<Nt&&Nt<=oe)&&jt++;(Ut<ut||Ut===ut&&jt<gt)&&(ut=Ut,gt=jt,St=Nt)}for(x.splice(St,0,lt),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[lt].length;ut++)gt=y[lt][ut],0<=x.indexOf(gt)&&(tt.push(lt),ot.push(gt))}rt++}}for(tt=x.length;;){for(z=!0,ot=0;ot<E.length;ot++)if(rt=E[ot],lt=y[rt][0],ut=x.indexOf(lt),0<=ut){for(St=gt=0;St<y[lt].length;St++)wt=x.indexOf(y[lt][St]),0>wt||wt===ut||(Et=wt>ut?wt-ut:ut-wt,gt+=wt<ut!=Et>tt-Et?1:-1);x.splice(0>gt?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},re.Object.defineProperties(Pr.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!==_l&&a!==zl&&a!==cd&&a!==Nh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ua&&a!==fd&&a!==ec&&a!==Uf||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==m0&&a!==v0&&a!==y0&&!S0&&a!==$f||(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!==x0&&a!==_c||(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 zl=new Oe(Pr,"ConstantSpacing",0),cd=new Oe(Pr,"ConstantDistance",1),Nh=new Oe(Pr,"ConstantAngle",2),_l=new Oe(Pr,"Packed",3),ua=new Oe(Pr,"Clockwise",4),fd=new Oe(Pr,"Counterclockwise",5),ec=new Oe(Pr,"BidirectionalLeft",6),Uf=new Oe(Pr,"BidirectionalRight",7),m0=new Oe(Pr,"Forwards",8),v0=new Oe(Pr,"Reverse",9),y0=new Oe(Pr,"Ascending",10),S0=new Oe(Pr,"Descending",11),$f=new Oe(Pr,"Optimized",12),x0=new Oe(Pr,"Pythagorean",13),_c=new Oe(Pr,"Circular",14);Pr.className="CircularLayout",Pr.ConstantSpacing=zl,Pr.ConstantDistance=cd,Pr.ConstantAngle=Nh,Pr.Packed=_l,Pr.Clockwise=ua,Pr.Counterclockwise=fd,Pr.BidirectionalLeft=ec,Pr.BidirectionalRight=Uf,Pr.Forwards=m0,Pr.Reverse=v0,Pr.Ascending=y0,Pr.Descending=S0,Pr.Optimized=$f,Pr.Pythagorean=x0,Pr.Circular=_c;function xp(){this.Pl=-1/0,this.tm=this.mk=null}xp.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},xp.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]}},xp.className="VertexArrangement";function Kf(a){qo.call(this,a)}Le(Kf,qo),Kf.prototype.createVertex=function(){return new Pp(this)},Kf.prototype.createEdge=function(){return new P0(this)},Kf.className="CircularNetwork";function Pp(a){ns.call(this,a),this.u=this.Si=NaN}Le(Pp,ns);function gd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===_l)if(x.nodeDiameterFormula===_c)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===_c?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}re.Object.defineProperties(Pp.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)}}}),Pp.className="CircularVertex";function P0(a){za.call(this,a)}Le(P0,za),P0.className="CircularEdge";function Bs(a){mr.call(this),this.ah=null,this.An=0,this.$d=new Nn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Le(Bs,mr),Bs.prototype.cloneProtected=function(a){mr.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},Bs.prototype.createNetwork=function(){return new Hc(this)},Bs.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}RS(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 lt=Kn(),ut=0;ut<ot+y.vertexes.count+2;ut++)lt[ut]=null;ot=0,tt.reset();for(var gt=on.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,gt),rt)rt=!1,b=gt.x+gt.width/2,z=gt.y+gt.height/2,lt[0]=new Wt(gt.x+gt.width+E.width,gt.y),lt[1]=new Wt(gt.x,gt.y+gt.height+E.height),ot=2;else{var St=jS(lt,ot,b,z,gt.width,gt.height,E),wt=lt[St],Et=new Wt(wt.x+gt.width+E.width,wt.y),Nt=new Wt(wt.x,wt.y+gt.height+E.height);for(St+1<ot&&lt.splice(St+1,0,null),lt[St]=Et,lt[St+1]=Nt,ot++,St=wt.x-gt.x,wt=wt.y-gt.y,ut=ut.vertexes.iterator;ut.next();)Et=ut.value,Et.centerX+=St,Et.centerY+=wt}for(on.free(gt),ut=y.vertexes.iterator;ut.next();)tt=ut.value,St=tt.bounds,2>ot?(b=St.x+St.width/2,z=St.y+St.height/2,lt[0]=new Wt(St.x+St.width+E.width,St.y),lt[1]=new Wt(St.x,St.y+St.height+E.height),ot=2):(rt=jS(lt,ot,b,z,St.width,St.height,E),gt=lt[rt],wt=new Wt(gt.x+St.width+E.width,gt.y),St=new Wt(gt.x,gt.y+St.height+E.height),rt+1<ot&&lt.splice(rt+1,0,null),lt[rt]=wt,lt[rt+1]=St,ot++,tt.centerX=gt.x+tt.width/2,tt.centerY=gt.y+tt.height/2);for(oi(lt),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}_S(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Bs.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},Bs.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 RS(a,y,x){if(Ox(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Dx(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,RS(a,y+1,x),_S(a,z),Ix(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++)Rx(a,y[x]);a.Zf=E}}function Ox(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 Dx(a,y){for(var x=a.network,E=new Hc(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new HS;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 pn),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 pn,b.Hj=ot),ot.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(ot=tt.Hj,ot===null&&(ot=new pn,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,me.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 lt=ot=0,ut=rt.count-tt;ut<rt.count;ut++){var gt=rt.M(ut),St=null;for(z=gt.edges.iterator;z.next();){var wt=z.value;if(wt.Ax(gt)===b){St=wt;break}}St!==null&&(lt+=St.length,ot+=gt.width*gt.height)}z=b.centerX,rt=b.centerY,ut=b.width,gt=b.height,St=b.focus,wt=ut*gt,1>wt&&(wt=1),ot=me.sqrt((ot+wt+lt*lt*4/(tt*tt))/wt),tt=(ot-1)*ut/2,ot=(ot-1)*gt/2,b.bounds=new on(z-St.x-tt,rt-St.y-ot,ut+2*tt,gt+2*ot),b.focus=new Wt(St.x+tt,St.y+ot)}}return a.network=E,x}function Ix(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 on(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Wt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var 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=me.sqrt(z*z+tt*tt)/2;for(var ot=!1,rt=tt=0,lt=0,ut=y.vertexes.iterator;ut.next();){var gt=ut.value;1>=gt.Vd?rt++:(ot=!0,lt++,tt+=Math.atan2(y.centerY-gt.centerY,y.centerX-gt.centerX))}if(rt!==0){for(0<lt&&(tt/=lt),lt=y=0,y=ot?2*Math.PI/(rt+1):2*Math.PI/rt,rt%2===0&&(lt=y/2),1<x.count&&x.sort(function(wt,Et){return wt===null||Et===null||wt===Et?0:Et.width*Et.height-wt.width*wt.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,gt=rt.edges.iterator;gt.next();){ut=gt.value;break}gt=rt.width;var St=rt.height;gt=me.sqrt(gt*gt+St*St)/2,ut=z+ut.length+gt,gt=tt+(y*(ot/2>>1)+lt)*(ot%2===0?1:-1),rt.centerX=E+ut*Math.cos(gt),rt.centerY=b+ut*Math.sin(gt),ot++}}}}function jS(a,y,x,E,b,z,tt){var ot=9e19,rt=-1,lt=0;t:for(;lt<y;lt++){var ut=a[lt],gt=ut.x-x,St=ut.y-E;if(gt=gt*gt+St*St,gt<ot){for(St=lt-1;0<=St;St--)if(a[St].y>ut.y&&a[St].x-ut.x<b+tt.width)continue t;for(St=lt+1;St<y;St++)if(a[St].x>ut.x&&a[St].y-ut.y<z+tt.height)continue t;rt=lt,ot=gt}}return rt}Bs.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Bs.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 zS(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,me.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,me.sqrt(E*E+a*a)):tt-(E+b):E>tt+ot?a>y+z?(x=E-tt-ot,a=a-y-z,me.sqrt(x*x+a*a)):a+x<y?(E=E-tt-ot,a=a+x-y,me.sqrt(E*E+a*a)):E-(tt+ot):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function _S(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(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(Nt,Ut){return Nt===null||Ut===null||Nt===Ut?0:Nt.centerX-Ut.centerX}):y.sort(function(Nt,Ut){return Nt===null||Ut===null||Nt===Ut?0:Nt.centerY-Ut.centerY}),x=a.Zf;var lt=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),lt=tt.charge*a.electricalFieldY(rt,ut),E+=tt.mass*a.gravitationalFieldX(rt,ut),lt+=tt.mass*a.gravitationalFieldY(rt,ut),tt.forceX+=E,tt.forceY+=lt;for(var gt=z+1;gt<y.length;gt++){var St=y[gt];if(St!==tt){E=St.bounds,ot=St.focus,lt=E.x+ot.x;var wt=E.y+ot.y;if(rt-lt>x||lt-rt>x){if(b)break}else if(ut-wt>x||wt-ut>x){if(!b)break}else{var Et=zS(tt,St);1>Et?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new w0),Et=E.random(),ot=E.random(),rt>lt?(E=Math.abs(St.bounds.right-tt.bounds.x),E=(1+E)*Et):rt<lt?(E=Math.abs(St.bounds.x-tt.bounds.right),E=-(1+E)*Et):(E=Math.max(St.width,tt.width),E=(1+E)*Et-E/2),ut>wt?(lt=Math.abs(St.bounds.bottom-tt.bounds.y),lt=(1+lt)*ot):rt<lt?(lt=Math.abs(St.bounds.y-tt.bounds.bottom),lt=-(1+lt)*ot):(lt=Math.max(St.height,tt.height),lt=(1+lt)*ot-lt/2)):(ot=-(tt.charge*St.charge)/(Et*Et),E=(lt-rt)/Et*ot,lt=(wt-ut)/Et*ot),tt.forceX+=E,tt.forceY+=lt,St.forceX-=E,St.forceY-=lt}}}}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,gt=z.focus,rt=ut.x+gt.x,ut=ut.y+gt.y,gt=zS(x,z),1>gt?(gt=a.randomNumberGenerator,gt===null&&(a.randomNumberGenerator=gt=new w0),ot=gt.random(),gt=gt.random(),E=(E>rt?1:-1)*(1+(z.width>x.width?z.width:x.width))*ot,lt=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*gt):(ot=ot.stiffness*(gt-ot.length),E=(rt-E)/gt*ot,lt=(ut-tt)/gt*ot),x.forceX+=E,x.forceY+=lt,z.forceX-=E,z.forceY-=lt;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}Bs.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},Bs.prototype.moveFixedVertex=function(){},Bs.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Bs.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Ge,y.toSpot=Ge)}},Bs.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=on.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,on.free(x)}x=on.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()}on.free(x)},Bs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Bs.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Bs.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Bs.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Bs.prototype.electricalFieldX=function(){return 0},Bs.prototype.electricalFieldY=function(){return 0},Bs.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Bs.prototype.gravitationalFieldX=function(){return 0},Bs.prototype.gravitationalFieldY=function(){return 0},Bs.prototype.isFixed=function(a){return a.isFixed},re.Object.defineProperties(Bs.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"&&xe('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())}}}),Bs.className="ForceDirectedLayout";function HS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}HS.className="ForceDirectedSubnet";function Hc(a){qo.call(this,a)}Le(Hc,qo),Hc.prototype.createVertex=function(){return new wp(this)},Hc.prototype.createEdge=function(){return new Cp(this)},Hc.className="ForceDirectedNetwork";function wp(a){ns.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}Le(wp,ns),re.Object.defineProperties(wp.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)}}}),wp.className="ForceDirectedVertex";function Cp(a){za.call(this,a),this.j=this.o=NaN}Le(Cp,za),re.Object.defineProperties(Cp.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)}}}),Cp.className="ForceDirectedEdge";function w0(){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()}w0.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},w0.className="RandomNumberGenerator";function zo(a){mr.call(this),this.kc=this.ie=25,this.K=0,this.Dk=L0,this.Zk=F0,this.Qk=B0,this.bj=4,this.rk=N0,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 Wt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Le(zo,mr),zo.prototype.cloneProtected=function(a){mr.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},zo.prototype.qb=function(a){a.classType===zo?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:xe("Unknown enum value: "+a):mr.prototype.qb.call(this,a)},zo.prototype.createNetwork=function(){return new Xf(this)},zo.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!==bp&&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===bp&&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,lt=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 gt=ot.fromNode;rt=ot.toNode;for(var St=ot.fromPort;St!==null&&!St.Ed();)St=St.panel;for(ot=ot.toPort;ot!==null&&!ot.Ed();)ot=ot.panel;if(E.rev){lt=gt;var wt=St;gt=rt,St=ot,rt=lt,ot=wt}var Et=b.focus;lt=z.focus;var Nt=E.rev?z.bounds:b.bounds;wt=Wt.alloc(),ut!==gt?Nt.w()&&gt.isVisible()?gt.actualBounds.w()?(bh(gt,St,wo,wt),wt.x+=gt.actualBounds.x-Nt.x,wt.y+=gt.actualBounds.y-Nt.y):(bh(gt,St,wo,wt),wt.w()||wt.assign(Et)):wt.assign(Et):Nt.w()?(bh(gt,St,wo,wt),wt.w()||wt.assign(Et)):wt.assign(Et),gt=E.rev?b.bounds:z.bounds,ut=Wt.alloc(),tt!==rt?gt.w()&&rt.isVisible()?rt.actualBounds.w()?(bh(rt,ot,wo,ut),ut.x+=rt.actualBounds.x-gt.x,ut.y+=rt.actualBounds.y-gt.y):(bh(rt,ot,wo,ut),ut.w()||ut.assign(lt)):ut.assign(lt):gt.w()?(bh(rt,ot,wo,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((wt.x-Et.x)/this.kc),rt=wt.x,ot=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((wt.y-Et.y)/this.kc),rt=wt.y,ot=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),Wt.free(wt),Wt.free(ut),E.portFromColOffset=tt,E.portFromPos=rt,E.portToColOffset=ot,E.portToPos=lt}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(wt=b.layer,ut=z.layer,gt=0,Nt=E.link,Nt!==null){var Ut=Nt.fromPort,jt=Nt.toPort;if(Ut!==null&&jt!==null){var ee=Nt.fromNode;if(St=Nt.toNode,ee!==null&&St!==null){var oe=M0(this,!0),ae=M0(this,!1),Se=this.setsPortSpots?oe:Nt.computeSpot(!0,Ut);Et=this.setsPortSpots?ae:Nt.computeSpot(!1,jt);var je=Nt.isOrthogonal;Se.$c()&&Se.Hf(ae)&&Et.$c()&&Et.Hf(oe)?gt=0:(oe=Nt.getLinkPoint(ee,Ut,Se,!0,je,St,jt,Wt.alloc()),ae=Nt.getLinkDirection(ee,Ut,oe,Se,!0,je,St,jt),Wt.free(oe),Se.ys()||ae!==XS(this,E,!0)?this.setsPortSpots&&ee!==null&&ee.ports.count===1&&E.rev&&(gt+=1):gt+=1,Se=Nt.getLinkPoint(St,jt,Et,!1,je,ee,Ut,Wt.alloc()),Nt=Nt.getLinkDirection(St,jt,Se,Et,!1,je,ee,Ut),Wt.free(Se),Et.ys()||Nt!==XS(this,E,!1)?this.setsPortSpots&&St!==null&&St.ports.count===1&&E.rev&&(gt+=2):gt+=2)}}}if(St=gt,gt=St===1||St===3,(St=St===2||St===3)&&(Et=a.createVertex(),Et.node=null,Et.Dj=1,Et.layer=wt,Et.near=b,a.dh(Et),b=a.Zj(b,Et,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=rt,b.portToPos=0,b=Et),Nt=1,gt&&Nt--,wt-ut>Nt&&0<wt){for(E.valid=!1,Et=a.createVertex(),Et.node=null,Et.Dj=2,Et.layer=wt-1,a.dh(Et),b=a.Zj(b,Et,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=St?0:tt,b.portToColOffset=0,b.portFromPos=St?0:rt,b.portToPos=0,b=Et,wt--;wt-ut>Nt&&0<wt;)Et=a.createVertex(),Et.node=null,Et.Dj=3,Et.layer=wt-1,a.dh(Et),b=a.Zj(b,Et,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Et,wt--;b=a.Zj(Et,z,E.link),b.valid=!gt,gt&&(Et.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=ot,b.portFromPos=0,b.portToPos=lt}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=pd(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),md(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},zo.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}zo.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},zo.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 wa(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 gl(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 GS(a,y,x){var E=pd(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],lt=rt.near;if(lt!==null&&lt.layer===rt.layer)if(rt=lt.index,rt>tt)for(var ut=tt+1;ut<rt;ut++){var gt=E[ut];gt.near===lt&&gt.Dj===lt.Dj||ot++}else for(ut=tt-1;ut>rt;ut--)gt=E[ut],gt.near===lt&&gt.Dj===lt.Dj||ot++;var St;if(0<=x)for(rt=E[tt].sourceEdgesArrayAccess,lt=0;lt<rt.length;lt++){var wt=rt[lt];if(wt.valid&&wt.fromVertex.layer!==y)for(gt=wt.fromVertex.index,ut=wt.portToPos,wt=wt.portFromPos,St=lt+1;St<rt.length;St++){var Et=rt[St];if(Et.valid&&Et.fromVertex.layer!==y){var Nt=Et.fromVertex.index,Ut=Et.portToPos;Et=Et.portFromPos,ut<Ut&&(gt>Nt||gt===Nt&&wt>Et)&&ot++,Ut<ut&&(Nt>gt||Nt===gt&&Et>wt)&&ot++}}}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(wt=rt[lt],wt.valid&&wt.toVertex.layer!==y)for(gt=wt.toVertex.index,ut=wt.portToPos,wt=wt.portFromPos,St=lt+1;St<rt.length;St++)Et=rt[St],Et.valid&&Et.toVertex.layer!==y&&(Nt=Et.toVertex.index,Ut=Et.portToPos,Et=Et.portFromPos,wt<Et&&(gt>Nt||gt===Nt&&ut>Ut)&&ot++,Et<wt&&(Nt>gt||Nt===gt&&Ut>ut)&&ot++)}for(z[tt*b+tt]=ot,rt=tt+1;rt<b;rt++){var jt=0,ee=0;if(0<=x){ot=E[tt].sourceEdgesArrayAccess;var oe=E[rt].sourceEdgesArrayAccess;for(lt=0;lt<ot.length;lt++)if(wt=ot[lt],wt.valid&&wt.fromVertex.layer!==y)for(gt=wt.fromVertex.index,wt=wt.portFromPos,St=0;St<oe.length;St++)Et=oe[St],Et.valid&&Et.fromVertex.layer!==y&&(Nt=Et.fromVertex.index,Et=Et.portFromPos,(gt<Nt||gt===Nt&&wt<Et)&&ee++,(Nt<gt||Nt===gt&&Et<wt)&&jt++)}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,oe=E[rt].destinationEdgesArrayAccess,lt=0;lt<ot.length;lt++)if(wt=ot[lt],wt.valid&&wt.toVertex.layer!==y)for(gt=wt.toVertex.index,ut=wt.portToPos,St=0;St<oe.length;St++)Et=oe[St],Et.valid&&Et.toVertex.layer!==y&&(Nt=Et.toVertex.index,Ut=Et.portToPos,(gt<Nt||gt===Nt&&ut<Ut)&&ee++,(Nt<gt||Nt===gt&&Ut<ut)&&jt++)}z[tt*b+rt]=jt,z[rt*b+tt]=ee}}return md(a,y,E),z}zo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=GS(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 C0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=pd(E,b),tt=E.tc[b],ot=0,rt=0;rt<tt;rt++){var lt=z[rt].destinationEdgesArrayAccess;if(lt!==null)for(var ut=0;ut<lt.length;ut++){var gt=lt[ut];if(gt.valid&&gt.toVertex.layer!==b){var St=gt.fromVertex.column+gt.portFromColOffset,wt=gt.toVertex.column+gt.portToColOffset;ot+=(Math.abs(St-wt)+1)*gy(gt)}}}md(E,b,z),y+=ot}return y}zo.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=pd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var ot=E[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=ot.destinationEdgesArrayAccess);var ut=0,gt=0,St=ot.near;if(St!==null&&St.layer===ot.layer&&(ut+=St.column-1,gt++),rt!==null)for(St=0;St<rt.length;St++){ot=rt[St];var wt=ot.fromVertex;ot.valid&&!ot.rev&&wt.layer!==y&&(ut+=wt.column,gt++)}if(lt!==null)for(rt=0;rt<lt.length;rt++)ot=lt[rt],St=ot.toVertex,ot.valid&&!ot.rev&&St.layer!==y&&(ut+=St.column,gt++);z[tt]=gt===0?-1:ut/gt}return md(a,y,E),z}function WS(a,y,x){for(var E=pd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var ot=E[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=ot.destinationEdgesArrayAccess);var ut=0,gt=[],St=ot.near;if(St!==null&&St.layer===ot.layer&&(gt[ut]=St.column-1,ut++),ot=void 0,rt!==null)for(St=0;St<rt.length;St++){ot=rt[St];var wt=ot.fromVertex;ot.valid&&!ot.rev&&wt.layer!==y&&(gt[ut]=wt.column+ot.portFromColOffset,ut++)}if(lt!==null)for(rt=0;rt<lt.length;rt++)ot=lt[rt],St=ot.toVertex,ot.valid&&!ot.rev&&St.layer!==y&&(gt[ut]=St.column+ot.portToColOffset,ut++);ut===0?z[tt]=-1:(gt.sort(function(Et,Nt){return Et-Nt}),lt=ut>>1,z[tt]=ut&1?gt[lt]:gt[lt-1]+gt[lt]>>1)}return md(a,y,E),z}function Ep(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,lt=y.layer-rt.layer;ot=a.linkMinLength(ot),lt===ot&&Ep(a,rt,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)ot=tt.value,rt=ot.fromVertex,lt=rt.layer-y.layer,ot=a.linkMinLength(ot),lt===ot&&Ep(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)}}zo.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(;zx(a)!==null;){for(b=ZS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=ZS(a);for(b=VS(a);b!==null;)E[y]=b,y++,b.valid=!1,b=VS(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,lt=ot.destinationEdges;lt.next();)lt.value.toVertex.valid&&rt++;lt=0;for(var ut=ot.sourceEdges;ut.next();)ut.value.fromVertex.valid&&lt++;(b===null||z<rt-lt)&&(b=ot,z=rt-lt)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case L0: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 bp: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 zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function ZS(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 VS(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++}zo.prototype.assignLayers=function(){switch(this.Zk){case xy:US(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=KS(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 F0:for(US(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&YS(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 US(a){for(var y=a.network.vertexes.iterator;y.next();){var x=$S(a,y.value);a.Ia=Math.max(x,a.Ia)}}function $S(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,$S(a,z)+b)}y.layer=x}else x=y.layer;return x}function KS(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,KS(a,z)+b)}y.layer=x}else x=y.layer;return x}function YS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)YS(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&&Ep(a,ot,0,-1,!0,!1)}for(Ep(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 lt=tt.value;if(lt.component===1){var ut=0,gt=!1,St=lt.sourceEdgesArrayAccess;b=St.length;for(var wt=0;wt<b;wt++){var Et=St[wt],Nt=Et.fromVertex;ut+=1,Nt.component!==1&&(z+=1,Nt=Nt.layer-lt.layer,Et=a.linkMinLength(Et),E=Math.min(E,Nt-Et))}for(St=lt.destinationEdgesArrayAccess,b=St.length,wt=0;wt<b;wt++)Et=St[wt].toVertex,--ut,Et.component!==1?--z:gt=!0;(rt===null||ut<ot)&&!gt&&(rt=lt,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(Ep(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(lt=0,ut=!1,St=tt.sourceEdgesArrayAccess,gt=St.length,wt=0;wt<gt;wt++)Et=St[wt].fromVertex,lt+=1,Et.component!==1?E+=1:ut=!0;for(St=tt.destinationEdgesArrayAccess,gt=St.length,wt=0;wt<gt;wt++)Et=St[wt],Nt=Et.toVertex,--lt,Nt.component!==1&&(--E,Nt=tt.layer-Nt.layer,Et=a.linkMinLength(Et),b=Math.min(b,Nt-Et));(ot===null||lt>z)&&!ut&&(ot=tt,z=lt)}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 XS(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}zo.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 B0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&JS(this,x);break;case wy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x)}};function JS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var 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&&JS(a,E))}function QS(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&&QS(a,E))}zo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=wa(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)E0(this,E,1),El(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=wa(this)),E=this.Ia;0<=E;E--)E0(this,E,-1),El(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=wa(this))}for(gl(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)E0(this,E,0),El(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=wa(this)),E=this.Ia;0<=E;E--)E0(this,E,0),El(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=wa(this))}gl(this,y);var z,tt,ot;switch(this.rk){case Ey:break;case by: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=El(this,E,-1)||z;for(b=this.countCrossings(),b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=El(this,E,1)||z;for(b=this.countCrossings(),b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=El(this,E,1)||z;for(b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=El(this,E,-1)||z;for(b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=El(this,E,0)||z;for(b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=El(this,E,0)||z;b>=a?gl(this,y):(a=b,y=wa(this))}break;default:case N0: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=El(this,E,-1)||z;for(b=this.countCrossings(),b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=El(this,E,1)||z;for(b=this.countCrossings(),b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=El(this,E,1)||z;for(b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=El(this,E,-1)||z;for(b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=El(this,E,0)||z;for(b>=a?gl(this,y):(a=b,y=wa(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=El(this,E,0)||z;b>=a?gl(this,y):(a=b,y=wa(this))}}gl(this,y)};function E0(a,y,x){var E=pd(a,y),b=a.tc[y],z=WS(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);md(a,y,E)}function El(a,y,x){var E=pd(a,y),b=a.tc[y];x=GS(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,lt=!0;lt;)for(lt=!1,z=0;z<b-1;z++){var ut=x[E[z].index*b+E[z+1].index],gt=x[E[z+1].index*b+E[z].index],St=0,wt=0,Et=E[z].column,Nt=E[z+1].column,Ut=a.nodeMinColumnSpace(E[z],!0),jt=a.nodeMinColumnSpace(E[z],!1),ee=a.nodeMinColumnSpace(E[z+1],!0),oe=a.nodeMinColumnSpace(E[z+1],!1);Ut=Et-Ut+ee,jt=Nt-jt+oe;var ae=E[z].sourceEdges.iterator;for(ae.reset();ae.next();)if(ee=ae.value,oe=ee.fromVertex,ee.valid&&oe.layer===y){for(ee=0;E[ee]!==oe;)ee++;ee<z&&(St+=2*(z-ee),wt+=2*(z+1-ee)),ee===z+1&&(St+=1),ee>z+1&&(St+=4*(ee-z),wt+=4*(ee-(z+1)))}for(ae=E[z].destinationEdges.iterator,ae.reset();ae.next();)if(ee=ae.value,oe=ee.toVertex,ee.valid&&oe.layer===y){for(ee=0;E[ee]!==oe;)ee++;ee===z+1&&(wt+=1)}for(ae=E[z+1].sourceEdges.iterator,ae.reset();ae.next();)if(ee=ae.value,oe=ee.fromVertex,ee.valid&&oe.layer===y){for(ee=0;E[ee]!==oe;)ee++;ee<z&&(St+=2*(z+1-ee),wt+=2*(z-ee)),ee===z&&(wt+=1),ee>z+1&&(St+=4*(ee-(z+1)),wt+=4*(ee-z))}for(ae=E[z+1].destinationEdges.iterator,ae.reset();ae.next();)if(ee=ae.value,oe=ee.toVertex,ee.valid&&oe.layer===y){for(ee=0;E[ee]!==oe;)ee++;ee===z&&(St+=1)}ee=oe=0,ae=tt[E[z].index];var Se=ot[E[z].index],je=tt[E[z+1].index],Dn=ot[E[z+1].index];ae!==-1&&(oe+=Math.abs(ae-Et),ee+=Math.abs(ae-jt)),Se!==-1&&(oe+=Math.abs(Se-Et),ee+=Math.abs(Se-jt)),je!==-1&&(oe+=Math.abs(je-Nt),ee+=Math.abs(je-Ut)),Dn!==-1&&(oe+=Math.abs(Dn-Nt),ee+=Math.abs(Dn-Ut)),(wt<St-.5||wt===St&&gt<ut-.5||wt===St&&gt===ut&&ee<oe-.5)&&(lt=rt=!0,E[z].column=jt,E[z+1].column=Ut,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return md(a,y,E),rt}zo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&$x)!==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=Yf(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Yf(this,y,-1)||x;x=Yf(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&(qS(this,-1),qS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Yf(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Yf(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Yf(this,y,0)||x}}else Wx(this)};function Yf(a,y,x){for(var E=!1;_x(a,y,x);)E=!0;return E}function _x(a,y,x){var E,b=pd(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,lt=!0;lt;)for(lt=!1,E=0;E<z;E++){var ut=b[E].column,gt=a.nodeMinColumnSpace(b[E],!0),St=a.nodeMinColumnSpace(b[E],!1),wt=0;0>E-1||ut-b[E-1].column-1>gt+a.nodeMinColumnSpace(b[E-1],!1)?wt=ut-1:wt=ut,gt=E+1>=z||b[E+1].column-ut-1>St+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Et=St=0,Nt=0;if(0>=x)for(var Ut=b[E].sourceEdges.iterator;Ut.next();){var jt=Ut.value,ee=jt.fromVertex;if(jt.valid&&ee.layer!==y){var oe=gy(jt),ae=jt.portFromColOffset;jt=jt.portToColOffset,ee=ee.column,St+=(Math.abs(ut+jt-(ee+ae))+1)*oe,Et+=(Math.abs(wt+jt-(ee+ae))+1)*oe,Nt+=(Math.abs(gt+jt-(ee+ae))+1)*oe}}if(0<=x)for(Ut=b[E].destinationEdges.iterator;Ut.next();)jt=Ut.value,ee=jt.toVertex,jt.valid&&ee.layer!==y&&(oe=gy(jt),ae=jt.portFromColOffset,jt=jt.portToColOffset,ee=ee.column,St+=(Math.abs(ut+ae-(ee+jt))+1)*oe,Et+=(Math.abs(wt+ae-(ee+jt))+1)*oe,Nt+=(Math.abs(gt+ae-(ee+jt))+1)*oe);jt=ae=oe=0,Ut=tt[b[E].index],ee=ot[b[E].index],Ut!==-1&&(oe+=Math.abs(Ut-ut),ae+=Math.abs(Ut-wt),jt+=Math.abs(Ut-gt)),ee!==-1&&(oe+=Math.abs(ee-ut),ae+=Math.abs(ee-wt),jt+=Math.abs(ee-gt)),Et<St||Et===St&&ae<oe?(lt=rt=!0,b[E].column=wt):(Nt<St||Nt===St&&jt<oe)&&(lt=rt=!0,b[E].column=gt)}return md(a,y,b),a.normalize(),rt}function yy(a,y,x){var E=pd(a,y),b=a.tc[y],z=WS(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),lt=a.nodeMinColumnSpace(E[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=ot;else if(x===0){var gt=E[x+1].column;gt-ot===lt+a.nodeMinColumnSpace(E[x+1],!0)?ut=ot-1:ut=ot}else x===b-1?(gt=E[x-1].column,ut=ot-gt===rt+a.nodeMinColumnSpace(E[x-1],!1)?ot+1:ot):(gt=E[x-1].column,rt=gt+a.nodeMinColumnSpace(E[x-1],!1)+rt+1,gt=E[x+1].column,lt=gt-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ut=(rt+lt)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(gt=E[x+1].column,lt=gt-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ut=Math.min(tt[x],lt)):x===b-1?(gt=E[x-1].column,rt=gt+a.nodeMinColumnSpace(E[x-1],!1)+rt+1,ut=Math.max(tt[x],rt)):(gt=E[x-1].column,rt=gt+a.nodeMinColumnSpace(E[x-1],!1)+rt+1,gt=E[x+1].column,lt=gt-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,rt<tt[x]&&tt[x]<lt?ut=tt[x]:rt>=tt[x]?ut=rt:lt<=tt[x]&&(ut=lt));ut!==ot&&(z=!0,E[x].column=ut)}md(a,y,E),a.normalize()}function Hx(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 Gx(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 qS(a,y){for(var x=0;x<=a.Ra;x++)for(;Hx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Gx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=wa(a),z=C0(a);for(E=z+1;z<E;){E=z,tx(a,x,1);var tt=C0(a);tt>z?gl(a,b):tt<z&&(z=tt,b=wa(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=wa(a),z=C0(a),E=z+1;z<E;)E=z,tx(a,x,-1),tt=C0(a),tt>z?gl(a,b):tt<z&&(z=tt,b=wa(a));a.normalize()}function tx(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 Wx(a){for(var y=Kn(),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 mn,Zx(y,x);var z=null,tt=null,ot=null,rt=null,lt=(a.ve&1)!==0,ut=(a.ve&2)!==0,gt=(a.ve&4)!==0,St=(a.ve&8)!==0;for(lt&&(a.verticalAlignment(y,x,!0),z=b0(a,y,!0,!1)),y.reverse(),gt&&(a.verticalAlignment(y,x,!1),ot=b0(a,y,!1,!1)),E=Fi(y),b=E.next();!b.done;b=E.next())b.value.reverse();St&&(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)),oi(y),a.u(z,tt,ot,rt),a.network.vertexes.each(function(wt){var Et=Kn();lt&&Et.push(z.get(wt)),ut&&Et.push(tt.get(wt)),gt&&Et.push(ot.get(wt)),St&&Et.push(rt.get(wt)),Et.sort(function(Ut,jt){return Ut-jt});var Nt=Et.length;Nt=(Et[Math.floor((Nt-1)/2)]+Et[Math.ceil((Nt-1)/2)])/2,oi(Et),wt.zc=Nt})}function Zx(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 lt=ot[rt];t:{if(lt.node===null){var ut=My(lt);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var gt=ut;if(rt===ot.length-1||gt){for(ut=tt.length-1,gt&&(ut=My(lt)[0].index);z<=rt;){if(lt=ot[z],!lt.bo){gt=[];for(var St=Fi(lt.sourceEdgesArrayAccess),wt=St.next();!wt.done;wt=St.next())wt=wt.value,wt.valid&&gt.push(wt);lt.bo=gt}for(lt=Fi(lt.bo),gt=lt.next();!gt.done;gt=lt.next())gt=gt.value,St=gt.fromVertex.index,(St<b||St>ut)&&y.add(gt);z++}b=ut}}}zo.prototype.verticalAlignment=function(a,y,x){Vx(a),a=Fi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Fi(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?My(z):Kx(z),ot=tt.length;if(0<ot){tt.sort(function(gt,St){return gt.vi-St.vi});var rt=(ot-1)/2;for(ot=Math.floor(rt),rt=Math.ceil(rt);ot<=rt;ot++)if(z.align===z){var lt=tt[ot],ut=void 0;ut=x?k0(lt,z):k0(z,lt),!y.contains(ut)&&b<lt.vi&&(lt.align=z,z.root=lt.root,z.align=lt.root,b=lt.vi)}}}}};function Vx(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=Fi(y),tt=z.next();!tt.done;tt=z.next()){var ot=Fi(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=Fi(y),ot=z.next();!ot.done;ot=z.next()){ot=Fi(ot.value);for(var rt=ot.next();!rt.done;rt=ot.next())if(rt=rt.value,rt.root===rt){for(var lt=0,ut=rt;ut.align!==rt;){var gt=ut.align,St=tt?ut.width:ut.height,wt=tt?gt.width:gt.height;if(x){var Et=k0(ut,gt),Nt=Et.portFromPos,Ut=Et.portToPos;Et.link!==null&&(ut.node&&ut.node!==Et.link.fromNode&&(Nt=tt?ut.focusX:ut.focusY),gt.node&&gt.node!==Et.link.toNode&&(Ut=tt?gt.focusX:gt.focusY))}else Et=k0(gt,ut),Nt=Et.portToPos,Ut=Et.portFromPos,Et.link!==null&&(ut.node&&ut.node!==Et.link.toNode&&(Nt=tt?ut.focusX:ut.focusY),gt.node&&gt.node!==Et.link.fromNode&&(Ut=tt?gt.focusX:gt.focusY));St=E?ut.qg+(St-Nt)-(wt-Ut):ut.qg+Nt-Ut,gt.qg=St,lt=Math.min(lt,St),ut=ut.align}ut=rt;do ut.qg=ut.qg-lt,ut=ut.align;while(ut!==rt)}}for(x=Fi(y),tt=x.next();!tt.done;tt=x.next())for(z=Fi(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ex(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=nx(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 Yn,y=Fi(y),tt=y.next();!tt.done;tt=y.next())for(x=Fi(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 ex(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=nx(E,x),z=b.root;ex(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 nx(a,y){var x=a.Tz;return a=a.vi,1>a&&xe("Could not determine previous vertex in layer"),y[x][a-1]}zo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Kn(),b=Kn(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var ot=Ux(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(lt){lt.value+=rt.delta}}(z)));oi(E),oi(b)};function Ux(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}zo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=M0(this,!0),y=M0(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 M0(a,y){return a.K===270?y?Ri:Qi:a.K===90?y?Qi:Ri:a.K===180?y?Gi:Bo:y?Bo:Gi}zo.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,lt=rt.layer,ut=rt.column|0;E?(tt=y.x+this.kc*ut,lt=this.Kd[lt]):(tt=this.Kd[lt],lt=y.y+this.kc*ut),rt.centerX=tt,rt.centerY=lt,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 Wt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},zo.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 on(0,0,x,Math.abs(this.Ta[0]))):y.push(new on(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new on(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new on(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new on(0,0,Math.abs(this.Ta[0]),x)):y.push(new on(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new on(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new on(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},zo.prototype.commitLayers=function(){},zo.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 lt=y.computeSpot(!0,tt);rt=y.computeSpot(!1,ot);var ut=x.fromVertex,gt=x.toVertex;if(x.valid)y.curve===Qa&&y.pointsCount===4&&(ut.column===gt.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,lt,!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&&lt===kr&&(E=!0),ot!==null&&rt===kr&&(x=!0),(E||x)&&(rt=null,E&&(rt=y.getLinkPointFromPoint(b,tt,tt.ga(wo),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(wo),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===gt.layer)y.zf();else{var St=!1,wt=!1,Et=this.ie,Nt=y.firstPickIndex+1;if(y.isOrthogonal){wt=!0;var Ut=y.pointsCount;4<Ut&&y.points.removeRange(2,Ut-3)}else if(y.curve===Qa)St=!0,Ut=y.pointsCount,4<Ut&&y.points.removeRange(2,Ut-3),Ut===4&&(Nt=2);else{Ut=y.pointsCount;var jt=lt===kr,ee=rt===kr;2<Ut&&jt&&ee?y.points.removeRange(1,Ut-2):3<Ut&&jt&&!ee?y.points.removeRange(1,Ut-3):3<Ut&&!jt&&ee?y.points.removeRange(2,Ut-2):4<Ut&&!jt&&!ee&&y.points.removeRange(2,Ut-3)}if(x.rev){for(;gt!==null&&ut!==gt;){var oe=Ut=null;for(jt=gt.sourceEdges.iterator;jt.next()&&(ee=jt.value,ee.link!==x.link||(Ut=ee.fromVertex,oe=ee.toVertex,Ut.node!==null)););if(Ut===null)break;if(Ut!==ut){jt=y.i(Nt-1).x,ee=y.i(Nt-1).y;var ae=Ut.centerX,Se=Ut.centerY;if(wt)this.K===180||this.K===0?Nt===y.firstPickIndex+1?(y.m(Nt++,jt,ee),y.m(Nt++,jt,Se)):(oe!==null?oe.centerY:ee)!==Se&&(oe=this.Ta[Ut.layer-1]+this.Rf.x,y.m(Nt++,oe,ee),y.m(Nt++,oe,Se)):Nt===y.firstPickIndex+1?(y.m(Nt++,jt,ee),y.m(Nt++,ae,ee)):(oe!==null?oe.centerX:jt)!==ae&&(oe=this.Ta[Ut.layer-1]+this.Rf.y,y.m(Nt++,jt,oe),y.m(Nt++,ae,oe));else if(Nt===y.firstPickIndex+1){oe=Math.max(10,this.he[gt.layer]);var je=Math.max(10,this.Ld[gt.layer]);if(St)this.K===180?ae<=gt.bounds.x?(gt=gt.bounds.x,y.m(Nt++,gt-oe,Se),y.m(Nt++,gt,Se),y.m(Nt++,gt+je,Se)):(y.m(Nt++,ae-oe,Se),y.m(Nt++,ae,Se),y.m(Nt++,ae+je,Se)):this.K===90?Se>=gt.bounds.bottom?(gt=gt.bounds.y+gt.bounds.height,y.m(Nt++,ae,gt+je),y.m(Nt++,ae,gt),y.m(Nt++,ae,gt-oe)):(y.m(Nt++,ae,Se+je),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se-oe)):this.K===270?Se<=gt.bounds.y?(gt=gt.bounds.y,y.m(Nt++,ae,gt-oe),y.m(Nt++,ae,gt),y.m(Nt++,ae,gt+je)):(y.m(Nt++,ae,Se-oe),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se+je)):this.K===0&&(ae>=gt.bounds.right?(gt=gt.bounds.x+gt.bounds.width,y.m(Nt++,gt+je,Se),y.m(Nt++,gt,Se),y.m(Nt++,gt-oe,Se)):(y.m(Nt++,ae+je,Se),y.m(Nt++,ae,Se),y.m(Nt++,ae-oe,Se)));else{y.m(Nt++,jt,ee);var Dn=0;this.K===180||this.K===0?((this.K===180?ae>=gt.bounds.right:ae<=gt.bounds.x)&&(Dn=(this.K===0?-oe:je)/2),y.m(Nt++,jt+Dn,Se)):((this.K===270?Se>=gt.bounds.bottom:Se<=gt.bounds.y)&&(Dn=(this.K===90?-oe:je)/2),y.m(Nt++,ae,ee+Dn)),y.m(Nt++,ae,Se)}}else oe=Math.max(10,this.he[Ut.layer]),je=Math.max(10,this.Ld[Ut.layer]),St?this.K===180?(y.m(Nt++,ae-oe-Et,Se),y.m(Nt++,Math.min(ae-oe+Et/2,ae),Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,Math.max(ae+je-Et/2,ae),Se),y.m(Nt++,ae+je+Et,Se)):this.K===90?(y.m(Nt++,ae,Se+je+Et),y.m(Nt++,ae,Math.max(Se+je-Et/2,Se)),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Math.min(Se-oe+Et/2,Se)),y.m(Nt++,ae,Se-oe-Et)):this.K===270?(y.m(Nt++,ae,Se-oe-Et),y.m(Nt++,ae,Math.min(Se-oe+Et/2,Se)),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Math.max(Se+je-Et/2,Se)),y.m(Nt++,ae,Se+je+Et)):(y.m(Nt++,ae+je+Et,Se),y.m(Nt++,Math.max(ae+je-Et/2,ae),Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,Math.min(ae-oe+Et/2,ae),Se),y.m(Nt++,ae-oe-Et,Se)):y.m(Nt++,ae,Se)}gt=Ut}(ot===null||lt!==kr||wt)&&(jt=y.i(Nt-1).x,ee=y.i(Nt-1).y,ae=y.i(Nt).x,Se=y.i(Nt).y,wt?(Et=this.Ld[ut.layer],this.K===180||this.K===0?(wt=ee,wt>=ut.bounds.y&&wt<=ut.bounds.bottom&&(this.K===180?ae>=ut.bounds.x:ae<=ut.bounds.right)&&(gt=ut.centerX+(this.K===180?-Et:Et),wt<ut.bounds.y+ut.bounds.height/2?wt=ut.bounds.y-this.kc/2:wt=ut.bounds.bottom+this.kc/2,y.m(Nt++,gt,ee),y.m(Nt++,gt,wt)),y.m(Nt++,ae,wt)):(wt=jt,wt>=ut.bounds.x&&wt<=ut.bounds.right&&(this.K===270?Se>=ut.bounds.y:Se<=ut.bounds.bottom)&&(gt=ut.centerY+(this.K===270?-Et:Et),wt<ut.bounds.x+ut.bounds.width/2?wt=ut.bounds.x-this.kc/2:wt=ut.bounds.right+this.kc/2,y.m(Nt++,jt,gt),y.m(Nt++,wt,gt)),y.m(Nt++,wt,Se)),y.m(Nt++,ae,Se)):St?(oe=Math.max(10,this.he[ut.layer]),je=Math.max(10,this.Ld[ut.layer]),this.K===180&&ae>=ut.bounds.x?(gt=ut.bounds.x+ut.bounds.width,y.L(Nt-2,gt,ee),y.L(Nt-1,gt+je,ee)):this.K===90&&Se<=ut.bounds.bottom?(gt=ut.bounds.y,y.L(Nt-2,jt,gt),y.L(Nt-1,jt,gt-oe)):this.K===270&&Se>=ut.bounds.y?(gt=ut.bounds.y+ut.bounds.height,y.L(Nt-2,jt,gt),y.L(Nt-1,jt,gt+je)):this.K===0&&ae<=ut.bounds.right&&(gt=ut.bounds.x,y.L(Nt-2,gt,ee),y.L(Nt-1,gt-oe,ee))):(oe=Math.max(10,this.he[ut.layer]),je=Math.max(10,this.Ld[ut.layer]),wt=0,this.K===180||this.K===0?((this.K===180?ae<=ut.bounds.x:ae>=ut.bounds.right)&&(wt=(this.K===0?je:-oe)/2),y.m(Nt++,ae+wt,ee)):((this.K===270?Se<=ut.bounds.y:Se>=ut.bounds.bottom)&&(wt=(this.K===90?je:-oe)/2),y.m(Nt++,jt,Se+wt)),y.m(Nt++,ae,Se)))}else{for(;ut!==null&&ut!==gt;){for(oe=Ut=null,ut=ut.destinationEdges.iterator;ut.next()&&(jt=ut.value,jt.link!==x.link||(Ut=jt.toVertex,oe=jt.fromVertex,oe.node!==null&&(oe=null),Ut.node!==null)););if(Ut===null)break;Ut!==gt&&(jt=y.i(Nt-1).x,ee=y.i(Nt-1).y,ae=Ut.centerX,Se=Ut.centerY,wt?this.K===180||this.K===0?(oe!==null?oe.centerY:ee)!==Se&&(oe=this.Ta[Ut.layer]+this.Rf.x,Nt===y.firstPickIndex+1&&(oe=this.K===0?Math.max(oe,jt):Math.min(oe,jt)),y.m(Nt++,oe,ee),y.m(Nt++,oe,Se)):(oe!==null?oe.centerX:jt)!==ae&&(oe=this.Ta[Ut.layer]+this.Rf.y,Nt===y.firstPickIndex+1&&(oe=this.K===90?Math.max(oe,ee):Math.min(oe,ee)),y.m(Nt++,jt,oe),y.m(Nt++,ae,oe)):(oe=Math.max(10,this.he[Ut.layer]),je=Math.max(10,this.Ld[Ut.layer]),St?this.K===180?(y.m(Nt++,ae+je+Et,Se),y.m(Nt++,Math.max(ae+je-Et/2,ae),Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,Math.min(ae-oe+Et/2,ae),Se),y.m(Nt++,ae-oe-Et,Se)):this.K===90?(y.m(Nt++,ae,Se-oe-Et),y.m(Nt++,ae,Math.min(Se-oe+Et/2,Se)),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Math.max(Se+je-Et/2,Se)),y.m(Nt++,ae,Se+je+Et)):this.K===270?(y.m(Nt++,ae,Se+je+Et),y.m(Nt++,ae,Math.max(Se+je-Et/2,Se)),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Math.min(Se-oe+Et/2,Se)),y.m(Nt++,ae,Se-oe-Et)):(y.m(Nt++,ae-oe-Et,Se),y.m(Nt++,Math.min(ae-oe+Et/2,ae),Se),y.m(Nt++,ae,Se),y.m(Nt++,ae,Se),y.m(Nt++,Math.max(ae+je-Et/2,ae),Se),y.m(Nt++,ae+je+Et,Se)):this.K===180?(y.m(Nt++,ae+je,Se),y.m(Nt++,ae-oe,Se)):this.K===90?(y.m(Nt++,ae,Se-oe),y.m(Nt++,ae,Se+je)):this.K===270?(y.m(Nt++,ae,Se+je),y.m(Nt++,ae,Se-oe)):(y.m(Nt++,ae-oe,Se),y.m(Nt++,ae+je,Se)))),ut=Ut}wt&&(jt=y.i(Nt-1).x,ee=y.i(Nt-1).y,ae=y.i(Nt).x,Se=y.i(Nt).y,this.K===180||this.K===0?ee!==Se&&(oe=this.K===0?Math.min(Math.max((ae+jt)/2,this.Ta[gt.layer]+this.Rf.x),ae):Math.max(Math.min((ae+jt)/2,this.Ta[gt.layer]+this.Rf.x),ae),y.m(Nt++,oe,ee),y.m(Nt++,oe,Se)):jt!==ae&&(oe=this.K===90?Math.min(Math.max((Se+ee)/2,this.Ta[gt.layer]+this.Rf.y),Se):Math.max(Math.min((Se+ee)/2,this.Ta[gt.layer]+this.Rf.y),Se),y.m(Nt++,jt,oe),y.m(Nt++,ae,oe)))}E!==null&&St&&4<=y.pointsCount&&(tt!==null&&(tt=lt===kr?y.getLinkPointFromPoint(b,tt,tt.ga(wo),y.i(3),!0):y.i(0),lt===kr&&(lt=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+lt.x)/2,lt.y),y.L(2,E.x,(lt.y+E.y)/2)):(y.L(1,lt.x,(tt.y+lt.y)/2),y.L(2,(lt.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),ot!==null&&(b=rt===kr?y.getLinkPointFromPoint(z,ot,ot.ga(wo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),rt===kr&&(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()},zo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new pn,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 vd;ot.layer=Math.floor(z.y/2);var rt=E.i(0),lt=E.i(E.pointsCount-1);if(ot.first=rt.x*rt.x+rt.y,ot.jc=lt.x*lt.x+lt.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),lt=E.i(b+2);var ut=0;rt.y<z.y?ut=lt.y<z.y?3:z.x<tt.x?2:1:rt.y>z.y&&(ut=lt.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++)lt=x[rt],lt.jc!==ot&&(ut++,ot=lt.jc);this.zi(x,this.Ux,z,z+tt);var gt=1;for(ot=x[z].first,rt=z;rt<b;rt++)lt=x[rt],lt.first!==ot&&(gt++,ot=lt.first);for(rt=!0,lt=gt,ut<gt?(rt=!1,lt=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,gt=z;gt<b;gt++){var St=x[gt];(rt?St.first:St.jc)!==ot&&(ut++,ot=rt?St.first:St.jc);var wt=St.link;z=wt.i(St.index),tt=wt.i(St.index+1);var Et=this.linkSpacing*(ut-(lt-1)/2);y++,wt.uh(),wt.L(St.index,z.x,z.y+Et),wt.L(St.index+1,tt.x,tt.y+Et),wt.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 vd,ot.layer=Math.floor(z.x/2),rt=E.i(0),lt=E.i(E.pointsCount-1),ot.first=rt.x+rt.y*rt.y,ot.jc=lt.x+lt.y*lt.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),lt=E.i(b+2),ut=0,rt.x<z.x?ut=lt.x<z.x?3:z.y<tt.y?2:1:rt.x>z.x&&(ut=lt.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++)lt=x[rt],lt.jc!==ot&&(ut++,ot=lt.jc);for(this.zi(x,this.Ux,z,z+tt),gt=1,ot=x[z].first,rt=z;rt<b;rt++)lt=x[rt],lt.first!==ot&&(gt++,ot=lt.first);for(rt=!0,lt=gt,ut<gt?(rt=!1,lt=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,gt=z;gt<b;gt++)St=x[gt],(rt?St.first:St.jc)!==ot&&(ut++,ot=rt?St.first:St.jc),wt=St.link,z=wt.i(St.index),tt=wt.i(St.index+1),Et=this.linkSpacing*(ut-(lt-1)/2),y++,wt.uh(),wt.L(St.index,z.x+Et,z.y),wt.L(St.index+1,tt.x+Et,tt.y),wt.zf()}z=b}a=E}}}},bt=zo.prototype,bt.Vx=function(a,y){return a instanceof vd&&y instanceof vd&&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},bt.Ux=function(a,y){return a instanceof vd&&y instanceof vd&&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},bt.Js=function(a,y){return a instanceof vd&&y instanceof vd&&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},bt.B=function(a,y){return a-=y,-1<a&&1>a},bt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&xe("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 pd(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 md(a,y,x){a.He[a.tc[y]]=x}re.Object.defineProperties(zo.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()):xe("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==L0&&a!==bp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==F0&&a!==xy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==B0&&a!==wy&&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!==Ey&&a!==N0&&a!==by||(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 L0=new Oe(zo,"CycleDepthFirst",0),Sy=new Oe(zo,"CycleGreedy",1),bp=new Oe(zo,"CycleFromLayers",2),F0=new Oe(zo,"LayerOptimalLinkLength",0),xy=new Oe(zo,"LayerLongestPathSink",1),Py=new Oe(zo,"LayerLongestPathSource",2),B0=new Oe(zo,"InitDepthFirstOut",0),wy=new Oe(zo,"InitDepthFirstIn",1),Cy=new Oe(zo,"InitNaive",2),Ey=new Oe(zo,"AggressiveNone",0),N0=new Oe(zo,"AggressiveLess",1),by=new Oe(zo,"AggressiveMore",2),$x=8;zo.className="LayeredDigraphLayout",zo.CycleDepthFirst=L0,zo.CycleGreedy=Sy,zo.CycleFromLayers=bp,zo.LayerOptimalLinkLength=F0,zo.LayerLongestPathSink=xy,zo.LayerLongestPathSource=Py,zo.InitDepthFirstOut=B0,zo.InitDepthFirstIn=wy,zo.InitNaive=Cy,zo.AggressiveNone=Ey,zo.AggressiveLess=N0,zo.AggressiveMore=by,zo.PackNone=0,zo.PackExpand=1,zo.PackStraighten=2,zo.PackMedian=4,zo.PackAll=15,zo.AlignNone=0,zo.AlignUpperLeft=1,zo.AlignUpperRight=2,zo.AlignLowerLeft=4,zo.AlignLowerRight=8,zo.AlignAll=15;function vd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}vd.className="SegInfo";function Xf(a){qo.call(this,a)}Le(Xf,qo),Xf.prototype.createVertex=function(){return new pl(this)},Xf.prototype.createEdge=function(){return new Mp(this)},Xf.className="LayeredDigraphNetwork";function pl(a){ns.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}Le(pl,ns);function ix(a,y){return a.index-y.index}function k0(a,y){if(!a.$n){for(var x=[],E=Fi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Fi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;xe("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Fi(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(ix),a.co=y}return a.co}function Kx(a){if(!a.ao){for(var y=[],x=Fi(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(ix),a.ao=y}return a.ao}pl.prototype.Cl=function(a){ns.prototype.Cl.call(this,a),this.bo=this.co=null},pl.prototype.Kl=function(a){ns.prototype.Kl.call(this,a),this.bo=this.co=null},pl.prototype.zl=function(a){ns.prototype.zl.call(this,a),this.$n=this.ao=null},pl.prototype.Jl=function(a){ns.prototype.Jl.call(this,a),this.$n=this.ao=null},re.Object.defineProperties(pl.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)}}}),pl.prototype.deleteDestinationEdge=pl.prototype.Jl,pl.prototype.addDestinationEdge=pl.prototype.zl,pl.prototype.deleteSourceEdge=pl.prototype.Kl,pl.prototype.addSourceEdge=pl.prototype.Cl,pl.className="LayeredDigraphVertex";function Mp(a){za.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Le(Mp,za),re.Object.defineProperties(Mp.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)}}}),Mp.className="LayeredDigraphEdge";function qi(a){mr.call(this),this.Ub=new mn,this.Wn=D0,this.ud=Nu,this.vo=R0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=j0,this.$d=new Nn(10,10).freeze();var y=new Vc(this);this.W=new bl(y),this.Y=new bl(y),this.ru=[],a&&Object.assign(this,a)}Le(qi,mr),qi.prototype.cloneProtected=function(a){mr.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)},qi.prototype.qb=function(a){a.classType===qi?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:xe("Unknown enum value: "+a):mr.prototype.qb.call(this,a)},qi.prototype.createNetwork=function(){return new Vc(this)},qi.prototype.makeNetwork=function(a){function y(E){if(E instanceof Rn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Ln){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 ze?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof bi?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},qi.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==z0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof ze&&(y=a),this.path===D0&&y!==null?this.ud=y.isTreePathToChildren?Nu:Wc:this.ud=this.path===D0?Nu: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 mn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Rn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof bl&&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,Ly(this,y));for(y=this.network.vertexes,a=null;a=Yx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ly(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof bl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof bl&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof bl&&lx(this,y);if(this.Cu(),this.layerStyle===_0){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 bl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new mn,this.isValidLayout=!0};function Yx(a){var y=new mn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}qi.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Nu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Wc:x.destinationEdges.count===0&&this.Ub.add(x);break;default:xe("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case Nu:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Wc:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:xe("Unhandled path value "+a.ud.toString())}}return E}function Ly(a,y){if(y!==null){switch(a.ud){case Nu:if(0<y.destinationEdges.count){for(var x=new pn,E=y.destinationVertexes;E.next();){var b=E.value;rx(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Wc:if(0<y.sourceEdges.count){for(x=new pn,E=y.sourceVertexes;E.next();)b=E.value,rx(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:xe("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++)Ly(a,x[y])}}function rx(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}qi.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 sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Tu&&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];sx(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 Xx(a,y){switch(a.vo){default:case R0: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 Oy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Ty: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}}qi.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Xx(this,a)),a.parent!==null&&a.parent.alignment===Tu){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 ax(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)ax(a,y[E])}}qi.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==Tu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}qi.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Jf:break;case Fp:a.children.reverse();break;case Bp:a.children.sort(a.comparer);break;case Np:a.children.sort(a.comparer),a.children.reverse();break;default:xe("Unhandled sorting value "+a.sorting.toString())}},qi.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},qi.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=yd(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 lt=a.node.Mu();lt.next();){var ut=lt.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(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=on.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,on.free(b))};function yd(a){return a===kh||a===Tu||a===Ah||a===Xu}function Lp(a){return a===kh||a===Tu}function Fy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(yd(x)){if(Lp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Ah)return!0}}return!1}qi.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=yd(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,ot=Fy(a),rt=0,lt=a.comments,ut=lt.length,gt=Wt.alloc(),St=0;St<ut;St++){var wt=lt[St],Et=wt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&ot)if(0<=a.commentMargin)for(gt.h(a.bounds.x-a.commentMargin-Et.width,a.bounds.y+rt),wt.move(gt),wt=wt.Sd();wt.next();){var Nt=wt.value;Nt.fromSpot=Gi,Nt.toSpot=Bo}else for(gt.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+rt),wt.move(gt),wt=wt.Sd();wt.next();)Nt=wt.value,Nt.fromSpot=Bo,Nt.toSpot=Gi;else if(0<=a.commentMargin)for(gt.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+rt),wt.move(gt),wt=wt.Sd();wt.next();)Nt=wt.value,Nt.fromSpot=Bo,Nt.toSpot=Gi;else for(gt.h(a.bounds.x+a.commentMargin-Et.width,a.bounds.y+rt),wt.move(gt),wt=wt.Sd();wt.next();)Nt=wt.value,Nt.fromSpot=Gi,Nt.toSpot=Bo;rt=0<=a.commentSpacing?rt+(Et.height+a.commentSpacing):rt+(a.commentSpacing-Et.height)}else{if(135<b&&!z||!x&&ot)if(0<=a.commentMargin)for(gt.h(a.bounds.x+rt,a.bounds.y-a.commentMargin-Et.height),wt.move(gt),wt=wt.Sd();wt.next();)Nt=wt.value,Nt.fromSpot=Ri,Nt.toSpot=Qi;else for(gt.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y-a.commentMargin),wt.move(gt),wt=wt.Sd();wt.next();)Nt=wt.value,Nt.fromSpot=Qi,Nt.toSpot=Ri;else if(0<=a.commentMargin)for(gt.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y+a.commentMargin),wt.move(gt),wt=wt.Sd();wt.next();)Nt=wt.value,Nt.fromSpot=Qi,Nt.toSpot=Ri;else for(gt.h(a.bounds.x+rt,a.bounds.y+a.commentMargin-Et.height),wt.move(gt),wt=wt.Sd();wt.next();)Nt=wt.value,Nt.fromSpot=Ri,Nt.toSpot=Qi;rt=0<=a.commentSpacing?rt+(Et.width+a.commentSpacing):rt+(a.commentSpacing-Et.width)}}if(Wt.free(gt),y=rt-a.commentSpacing-(E?y.height:y.width),this.ud===Nu)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)}},qi.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 I0:ux(this,a);break;case kp:if(a.alignment===Tu)ux(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=yd(x)),E=Fy(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=Hl(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===ku;var lt=rt===Au,ut=yd(rt),gt=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var St=a.nodeSpacing,wt=this.computeNodeIndent(a),Et=a.rowSpacing,Nt=0;(E||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(Nt=Math.max(0,a.rowIndent)),E=a.width;var Ut=a.height,jt=0,ee=0,oe=0,ae=null,Se=null,je=0,Dn=0,Un=0,_n=0,bn=0,dn=0,Ei=0,Pi=0;if(ut&&!Lp(rt)&&135<b&&tt.reverse(),Lp(rt))if(1<ot)for(var No=0;No<ot;No++)No%2===0&&No!==ot-1&&(Pi=Math.max(Pi,y?tt[No].Da.width:tt[No].Da.height));else ot===1&&(Pi=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(rt){case kh:ee=135>b?hx(this,a,tt,Pi,jt,ee):dx(this,a,tt,Pi,jt,ee),Pi=ee.x,jt=ee.width,ee=ee.height;break;case Ah:for(ae=0;ae<ot;ae++)Se=tt[ae],gt=Se.Da,oe=dn===0?0:Et,y?(Se.S.h(z-gt.width,_n+oe),jt=Math.max(jt,gt.width),ee=Math.max(ee,_n+oe+gt.height),_n+=oe+gt.height):(Se.S.h(Un+oe,z-gt.height),jt=Math.max(jt,Un+oe+gt.width),ee=Math.max(ee,gt.height),Un+=oe+gt.width),dn++;break;case Xu:for(ae=0;ae<ot;ae++)Se=tt[ae],z=Se.Da,gt=dn===0?0:Et,y?(Se.S.h(St/2+a.focus.x,_n+gt),jt=Math.max(jt,z.width),ee=Math.max(ee,_n+gt+z.height),_n+=gt+z.height):(Se.S.h(Un+gt,St/2+a.focus.y),jt=Math.max(jt,Un+gt+z.width),ee=Math.max(ee,z.height),Un+=gt+z.width),dn++}ae=Ma(this,2),Se=Ma(this,2),y?(ae[0].h(0,0),ae[1].h(0,ee),Se[0].h(jt,0)):(ae[0].h(0,0),ae[1].h(jt,0),Se[0].h(0,ee)),Se[1].h(jt,ee)}else for(No=0;No<ot;No++){var Yo=tt[No],ss=Yo.Da;if(y){0<gt&&0<dn&&Un+St+ss.width>gt&&(Un<z&&nc(a,rt,z-Un,0,Ei,No-1),bn++,dn=0,Ei=No,oe=ee,Un=0,_n=135<b?-ee-Et:ee+Et),T0(this,Yo,0,_n);var hs=0;if(dn===0)ae=Yo.Yo,Se=Yo.kp,je=ss.width,Dn=ss.height,(ae===null||Se===null||b!==Hl(Yo))&&(ae=Ma(this,2),Se=Ma(this,2),ae[0].h(0,0),ae[1].h(0,Dn),Se[0].h(je,0),Se[1].h(je,Dn));else{var Vs=Kn();Dn=cx(this,a,Yo,ae,Se,je,Dn,Vs),hs=Dn.x,ae=Vs[0],Se=Vs[1],je=Dn.width,Dn=Dn.height,oi(Vs),Un<ss.width&&0>hs&&(Gc(a,-hs,0,Ei,No-1),O0(ae,-hs,0),O0(Se,-hs,0),hs=0)}Yo.S.h(hs,_n),jt=Math.max(jt,je),ee=Math.max(ee,oe+(bn===0?0:Et)+ss.height),Un=je}else 0<gt&&0<dn&&_n+St+ss.height>gt&&(_n<z&&nc(a,rt,0,z-_n,Ei,No-1),bn++,dn=0,Ei=No,oe=jt,_n=0,Un=135<b?-jt-Et:jt+Et),T0(this,Yo,Un,0),hs=0,dn===0?(ae=Yo.Yo,Se=Yo.kp,je=ss.width,Dn=ss.height,(ae===null||Se===null||b!==Hl(Yo))&&(ae=Ma(this,2),Se=Ma(this,2),ae[0].h(0,0),ae[1].h(je,0),Se[0].h(0,Dn),Se[1].h(je,Dn))):(Vs=Kn(),Dn=cx(this,a,Yo,ae,Se,je,Dn,Vs),hs=Dn.x,ae=Vs[0],Se=Vs[1],je=Dn.width,Dn=Dn.height,oi(Vs),_n<ss.height&&0>hs&&(Gc(a,0,-hs,Ei,No-1),O0(ae,0,-hs),O0(Se,0,-hs),hs=0)),Yo.S.h(Un,hs),ee=Math.max(ee,Dn),jt=Math.max(jt,oe+(bn===0?0:Et)+ss.width),_n=Dn;dn++}switch(0<bn&&(y?(ee+=Math.max(0,x),Un<jt&&nc(a,rt,jt-Un,0,Ei,ot-1),0<Nt&&(lt||Gc(a,Nt,0,0,ot-1),jt+=Nt)):(jt+=Math.max(0,x),_n<ee&&nc(a,rt,0,ee-_n,Ei,ot-1),0<Nt&&(lt||Gc(a,0,Nt,0,ot-1),ee+=Nt))),Nt=lt=0,rt){case Qf:y?lt+=jt/2-a.focus.x-wt/2:Nt+=ee/2-a.focus.y-wt/2;break;case Zc:0<bn?y?lt+=jt/2-a.focus.x-wt/2:Nt+=ee/2-a.focus.y-wt/2:y?(Pi=tt[0].S.x+tt[0].la.x,lt+=Pi+(tt[ot-1].S.x+tt[ot-1].la.x+2*tt[ot-1].focus.x-Pi)/2-a.focus.x-wt/2):(Pi=tt[0].S.y+tt[0].la.y,Nt+=Pi+(tt[ot-1].S.y+tt[ot-1].la.y+2*tt[ot-1].focus.y-Pi)/2-a.focus.y-wt/2);break;case ku:y?(lt-=wt,jt+=wt):(Nt-=wt,ee+=wt);break;case Au:y?(lt+=jt-a.width+wt,jt+=wt):(Nt+=ee-a.height+wt,ee+=wt);break;case kh:y?1<ot?lt+=Pi+St/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<ot?Nt+=Pi+St/2-a.focus.y:Nt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ah:y?lt+=jt+St/2-a.focus.x:Nt+=ee+St/2-a.focus.y;break;case Xu:break;default:ee=this.customAlignment(a,lt,Nt,jt,ee),lt=ee[0],Nt=ee[1],jt=ee[2],ee=ee[3]}for(wt=0;wt<ot;wt++)Pi=tt[wt],y?Pi.S.h(Pi.S.x+Pi.la.x-lt,Pi.S.y+(135<b?(ut?-ee:-Pi.Da.height)+Pi.la.y-x:Ut+x+Pi.la.y)):Pi.S.h(Pi.S.x+(135<b?(ut?-jt:-Pi.Da.width)+Pi.la.x-x:E+x+Pi.la.x),Pi.S.y+Pi.la.y-Nt);if(ot=tt=0,ut?y?(jt=By(a,jt,lt),0>lt&&(lt=0),135<b&&(Nt+=ee+x),ee+=Ut+x,rt===Xu&&(tt+=St/2+a.focus.x),ot+=Ut+x):(135<b&&(lt+=jt+x),jt+=E+x,ee=Ny(a,ee,Nt),0>Nt&&(Nt=0),rt===Xu&&(ot+=St/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>jt&&(jt=ky(rt,E-jt,0),tt=jt.x,ot=jt.y,jt=E,lt=0):jt=By(a,jt,lt),0>lt&&(tt-=lt,lt=0),135<b&&(Nt+=ee+x),ee=Math.max(Math.max(ee,Ut),ee+Ut+x),ot+=Ut+x):(135<b&&(lt+=jt+x),jt=Math.max(Math.max(jt,E),jt+E+x),a.comments===null?Ut>ee&&(ee=ky(rt,0,Ut-ee),tt=ee.x,ot=ee.y,ee=Ut,Nt=0):ee=Ny(a,ee,Nt),0>Nt&&(ot-=Nt,Nt=0),tt+=E+x),0<bn)b=Ma(this,4),bn=Ma(this,4),y?(b[2].h(0,Ut+x),b[3].h(b[2].x,ee),bn[2].h(jt,b[2].y),bn[3].h(bn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(jt,b[2].y),bn[2].h(b[2].x,ee),bn[3].h(b[3].x,bn[2].y));else{for(b=Ma(this,ae.length+2),bn=Ma(this,Se.length+2),rt=0;rt<ae.length;rt++)ut=ae[rt],b[rt+2].h(ut.x+tt,ut.y+ot);for(rt=0;rt<Se.length;rt++)ut=Se[rt],bn[rt+2].h(ut.x+tt,ut.y+ot)}y?(b[0].h(lt,0),b[1].h(b[0].x,Ut),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])),bn[0].h(lt+E,0),bn[1].h(bn[0].x,Ut),bn[2].y<bn[1].y&&(bn[2].x<bn[0].x?bn[2].assign(bn[1]):bn[1].assign(bn[2])),bn[3].y<bn[2].y&&(bn[3].x<bn[0].x?bn[3].assign(bn[2]):bn[2].assign(bn[3])),b[2].y-=x/2,bn[2].y-=x/2):(b[0].h(0,Nt),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])),bn[0].h(0,Nt+Ut),bn[1].h(E,bn[0].y),bn[2].x<bn[1].x&&(bn[2].y<bn[0].y?bn[2].assign(bn[1]):bn[1].assign(bn[2])),bn[3].x<bn[2].x&&(bn[3].y<bn[0].y?bn[3].assign(bn[2]):bn[2].assign(bn[3])),b[2].x-=x/2,bn[2].x-=x/2),Xl(this,ae),Xl(this,Se),a.Yo=b,a.kp=bn,a.la.h(lt,Nt),a.Da.h(jt,ee)}break;default:xe("Unhandled compaction value "+a.compaction.toString())}}};function ux(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=yd(x));var b=Fy(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=Hl(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 lt=y.alignment,ut=lt===ku,gt=lt===Au;ot=yd(lt);var St=Math.max(0,y.breadthLimit);rt=a.computeLayerSpacing(y);var wt=y.nodeSpacing,Et=a.computeNodeIndent(y),Nt=ut||gt?0:Et/2,Ut=y.rowSpacing,jt=0;(ut||gt||y.hm||y.im&&y.maxGenerationCount===1)&&(jt=Math.max(0,y.rowIndent)),ut=y.width;var ee=y.height,oe=0,ae=0,Se=0,je=0,Dn=0,Un=0,_n=0,bn=0,dn=0,Ei=0;if(ot&&!Lp(lt)&&135<E&&b.reverse(),Lp(lt))if(1<tt)for(var Pi=0;Pi<tt;Pi++){var No=b[Pi],Yo=No.Da;Pi%2===0&&Pi!==tt-1?dn=Math.max(dn,(x?Yo.width:Yo.height)+a.computeBusNodeSpacing(No)-wt):Pi%2!==0&&(Ei=Math.max(Ei,(x?Yo.width:Yo.height)+a.computeBusNodeSpacing(No)-wt))}else tt===1&&(dn=x?b[0].Da.width:b[0].Da.height);if(ot)switch(lt){case kh:case Tu:ae=135>E?hx(a,y,b,dn,oe,ae):dx(a,y,b,dn,oe,ae),dn=ae.x,oe=ae.width,ae=ae.height;break;case Ah:for(St=0;St<tt;St++)Nt=b[St],Se=Nt.Da,Ei=_n===0?0:Ut,x?(Nt.S.h(z-Se.width,Dn+Ei),oe=Math.max(oe,Se.width),ae=Math.max(ae,Dn+Ei+Se.height),Dn+=Ei+Se.height):(Nt.S.h(je+Ei,z-Se.height),oe=Math.max(oe,je+Ei+Se.width),ae=Math.max(ae,Se.height),je+=Ei+Se.width),_n++;break;case Xu:for(z=0;z<tt;z++)St=b[z],Nt=St.Da,Se=_n===0?0:Ut,x?(St.S.h(wt/2+y.focus.x,Dn+Se),oe=Math.max(oe,Nt.width),ae=Math.max(ae,Dn+Se+Nt.height),Dn+=Se+Nt.height):(St.S.h(je+Se,wt/2+y.focus.y),oe=Math.max(oe,je+Se+Nt.width),ae=Math.max(ae,Nt.height),je+=Se+Nt.width),_n++}else for(Ei=0;Ei<tt;Ei++)Pi=b[Ei],No=Pi.Da,x?(0<St&&0<_n&&je+wt+No.width>St&&(je<z&&nc(y,lt,z-je,0,bn,Ei-1),Un++,_n=0,bn=Ei,Se=ae,je=0,Dn=135<E?-ae-Ut:ae+Ut),Yo=_n===0?Nt:wt,T0(a,Pi,0,Dn),Pi.S.h(je+Yo,Dn),oe=Math.max(oe,je+Yo+No.width),ae=Math.max(ae,Se+(Un===0?0:Ut)+No.height),je+=Yo+No.width):(0<St&&0<_n&&Dn+wt+No.height>St&&(Dn<z&&nc(y,lt,0,z-Dn,bn,Ei-1),Un++,_n=0,bn=Ei,Se=oe,Dn=0,je=135<E?-oe-Ut:oe+Ut),Yo=_n===0?Nt:wt,T0(a,Pi,je,0),Pi.S.h(je,Dn+Yo),ae=Math.max(ae,Dn+Yo+No.height),oe=Math.max(oe,Se+(Un===0?0:Ut)+No.width),Dn+=Yo+No.height),_n++;switch(0<Un&&(x?(ae+=Math.max(0,rt),je<oe&&nc(y,lt,oe-je,0,bn,tt-1),0<jt&&(gt||Gc(y,jt,0,0,tt-1),oe+=jt)):(oe+=Math.max(0,rt),Dn<ae&&nc(y,lt,0,ae-Dn,bn,tt-1),0<jt&&(gt||Gc(y,0,jt,0,tt-1),ae+=jt))),jt=gt=0,lt){case Qf:x?gt+=oe/2-y.focus.x-Et/2:jt+=ae/2-y.focus.y-Et/2;break;case Zc:0<Un?x?gt+=oe/2-y.focus.x-Et/2:jt+=ae/2-y.focus.y-Et/2:x?(a=b[0].S.x+b[0].la.x,gt+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Et/2):(a=b[0].S.y+b[0].la.y,jt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Et/2);break;case ku:x?(gt-=Et,oe+=Et):(jt-=Et,ae+=Et);break;case Au:x?(gt+=oe-y.width+Et,oe+=Et):(jt+=ae-y.height+Et,ae+=Et);break;case kh:case Tu:x?1<tt?gt+=dn+wt/2-y.focus.x:gt+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?jt+=dn+wt/2-y.focus.y:jt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ah:x?gt+=oe+wt/2-y.focus.x:jt+=ae+wt/2-y.focus.y;break;case Xu:break;default:a=a.customAlignment(y,gt,jt,oe,ae),gt=a[0],jt=a[1],oe=a[2],ae=a[3]}for(a=0;a<tt;a++)Et=b[a],x?Et.S.h(Et.S.x+Et.la.x-gt,Et.S.y+(135<E?(ot?-ae:-Et.Da.height)+Et.la.y-rt:ee+rt+Et.la.y)):Et.S.h(Et.S.x+(135<E?(ot?-oe:-Et.Da.width)+Et.la.x-rt:ut+rt+Et.la.x),Et.S.y+Et.la.y-jt);x?(oe=By(y,oe,gt),0>gt&&(gt=0),135<E&&(jt+=ae+rt),ae=Math.max(Math.max(ae,ee),ae+ee+rt)):(135<E&&(gt+=oe+rt),oe=Math.max(Math.max(oe,ut),oe+ut+rt),ae=Ny(y,ae,jt),0>jt&&(jt=0)),y.la.h(gt,jt),y.Da.h(oe,ae)}}qi.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new on(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new on(E,0,b,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,lt=Hl(y)===90,ut=0,gt=0,St=0,wt=0;wt<tt;wt++)if(!(wt%2!==0||1<tt&&wt===tt-1)){var Et=x[wt],Nt=Et.Da,Ut=ut===0?0:rt;if(lt){var jt=a.computeBusNodeSpacing(Et)-ot;Et.S.h(E-(Nt.width+jt),St+Ut),b=Math.max(b,Nt.width+jt),z=Math.max(z,St+Ut+Nt.height),St+=Ut+Nt.height}else jt=a.computeBusNodeSpacing(Et)-ot,Et.S.h(gt+Ut,E-(Nt.height+jt)),z=Math.max(z,Nt.height+jt),b=Math.max(b,gt+Ut+Nt.width),gt+=Ut+Nt.width;ut++}for(ut=0,Et=gt,wt=St,lt?(gt=E+ot,St=0):(gt=0,St=E+ot),Nt=0;Nt<tt;Nt++)if(Nt%2!==0){Ut=x[Nt],jt=Ut.Da;var ee=ut===0?0:rt;if(lt){var oe=a.computeBusNodeSpacing(Ut)-ot;Ut.S.h(gt+oe,St+ee),b=Math.max(b,gt+jt.width+oe),z=Math.max(z,St+ee+jt.height),St+=ee+jt.height}else oe=a.computeBusNodeSpacing(Ut)-ot,Ut.S.h(gt+ee,St+oe),b=Math.max(b,gt+ee+jt.width),z=Math.max(z,St+jt.height+oe),gt+=ee+jt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,lt?Math.max(Math.abs(wt),Math.abs(St)):Math.max(Math.abs(Et),Math.abs(gt))),lt?(x.S.h(E+ot/2-x.focus.x-x.la.x,z+a),lt=E+ot/2-x.focus.x-x.la.x,b=Math.max(b,lt+tt.width),0>lt&&(b-=lt),z=Math.max(z,Math.max(wt,St)+a+tt.height),0>x.S.x&&(E=A0(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(Et,gt)+a+tt.width),St=E+ot/2-x.focus.y-x.la.y,z=Math.max(z,St+tt.height),0>St&&(z-=St),0>x.S.y&&(E=A0(y,x.S.y,!0,E,ot)))),new on(E,0,b,z)}function dx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new on(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new on(E,0,b,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,lt=Hl(y)===270,ut=0,gt=0,St=0,wt=0;wt<tt;wt++)if(!(wt%2!==0||1<tt&&wt===tt-1)){var Et=x[wt],Nt=Et.Da,Ut=ut===0?0:rt;if(lt){var jt=a.computeBusNodeSpacing(Et)-ot;St-=Ut+Nt.height,Et.S.h(E-(Nt.width+jt),St),b=Math.max(b,Nt.width+jt),z=Math.max(z,Math.abs(St))}else jt=a.computeBusNodeSpacing(Et)-ot,gt-=Ut+Nt.width,Et.S.h(gt,E-(Nt.height+jt)),z=Math.max(z,Nt.height+jt),b=Math.max(b,Math.abs(gt));ut++}for(ut=0,Et=gt,wt=St,lt?(gt=E+ot,St=0):(gt=0,St=E+ot),Nt=0;Nt<tt;Nt++)if(Nt%2!==0){Ut=x[Nt],jt=Ut.Da;var ee=ut===0?0:rt;if(lt){var oe=a.computeBusNodeSpacing(Ut)-ot;St-=ee+jt.height,Ut.S.h(gt+oe,St),b=Math.max(b,gt+jt.width+oe),z=Math.max(z,Math.abs(St))}else oe=a.computeBusNodeSpacing(Ut)-ot,gt-=ee+jt.width,Ut.S.h(gt,St+oe),z=Math.max(z,St+jt.height+oe),b=Math.max(b,Math.abs(gt));ut++}for(1<tt&&tt%2===1&&(rt=x[tt-1],ut=rt.Da,a=a.computeBusLastRowSpacing(rt,lt?Math.max(Math.abs(wt),Math.abs(St)):Math.max(Math.abs(Et),Math.abs(gt))),lt?(rt.S.h(E+ot/2-rt.focus.x-rt.la.x,-z-ut.height-a),gt=E+ot/2-rt.focus.x-rt.la.x,b=Math.max(b,gt+ut.width),0>gt&&(b-=gt),z=Math.max(z,Math.abs(Math.min(wt,St))+a+ut.height),0>rt.S.x&&(E=A0(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(Et,gt))+a+ut.width),St=E+ot/2-rt.focus.y-rt.la.y,z=Math.max(z,St+ut.height),0>St&&(z-=St),0>rt.S.y&&(E=A0(y,rt.S.y,!0,E,ot)))),y=0;y<tt;y++)ot=x[y],lt?ot.S.h(ot.S.x,ot.S.y+z):ot.S.h(ot.S.x+b,ot.S.y);return new on(E,0,b,z)}qi.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},qi.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function A0(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 By(a,y,x){switch(a.alignment){case Zc:case Qf:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ku:return a.width>y?a.width:y;case Au:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case kh:case Tu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Ah:return a.width-a.focus.x+a.nodeSpacing/2+y;case Xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case Zc:case Qf:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ku:return a.height>y?a.height:y;case Au:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case kh:case Tu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Ah:return a.height-a.focus.y+a.nodeSpacing/2+y;case Xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function ky(a,y,x){switch(a){case Qf:y/=2,x/=2;break;case Zc:y/=2,x/=2;break;case ku:x=y=0;break;case Au:break;default:xe("Unhandled alignment value "+a.toString())}return new Wt(y,x)}function nc(a,y,x,E,b,z){y=ky(y,x,E),Gc(a,y.x,y.y,b,z)}function Gc(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 T0(a,y,x,E){var b=y.parent;switch(a.ud){case Nu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Wc:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:xe("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 cx(a,y,x,E,b,z,tt,ot){var rt=Hl(y),lt=rt===90||rt===270,ut=y.nodeSpacing;y=E;var gt=b;E=z;var St=tt,wt=x.Yo,Et=x.kp;tt=x.Da;var Nt=lt?Math.max(St,tt.height):Math.max(E,tt.width);if((wt===null||rt!==Hl(x))&&(wt=Ma(a,2),Et=Ma(a,2),lt?(wt[0].h(0,0),wt[1].h(0,tt.height),Et[0].h(tt.width,0),Et[1].h(Et[0].x,wt[1].y)):(wt[0].h(0,0),wt[1].h(tt.width,0),Et[0].h(0,tt.height),Et[1].h(wt[1].x,Et[0].y))),lt){if(St=9999999,!(gt===null||2>gt.length||wt===null||2>wt.length))for(b=x=0;x<gt.length&&b<wt.length;){z=gt[x];var Ut=wt[b];rt=Ut.x,lt=Ut.y,rt+=E;var jt=z;x+1<gt.length&&(jt=gt[x+1]);var ee=Ut;Ut=ee.x,ee=ee.y,b+1<wt.length&&(ee=wt[b+1],Ut=ee.x,ee=ee.y,Ut+=E);var oe=St;z.y===lt?oe=rt-z.x:z.y>lt&&z.y<ee?oe=rt+(z.y-lt)/(ee-lt)*(Ut-rt)-z.x:lt>z.y&&lt<jt.y&&(oe=rt-(z.x+(lt-z.y)/(jt.y-z.y)*(jt.x-z.x))),oe<St&&(St=oe),jt.y<=z.y?x++:ee<=lt?b++:(jt.y<=ee&&x++,ee<=jt.y&&b++)}if(St=E-St,St+=ut,x=wt,b=St,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Ma(a,y.length+x.length),E=z=rt=0;z<x.length&&x[z].y<y[0].y;)lt=x[z++],ut[E++].h(lt.x+b,lt.y);for(;rt<y.length;)lt=y[rt++],ut[E++].h(lt.x,lt.y);for(rt=y[y.length-1].y;z<x.length&&x[z].y<=rt;)z++;for(;z<x.length&&x[z].y>rt;)lt=x[z++],ut[E++].h(lt.x+b,lt.y);for(x=Ma(a,E),rt=0;rt<E;rt++)x[rt].assign(ut[rt]);Xl(a,ut),E=x}if(z=Et,rt=St,gt===null||2>gt.length||z===null||2>z.length)b=null;else{for(ut=Ma(a,gt.length+z.length),b=lt=x=0;x<gt.length&&gt[x].y<z[0].y;)jt=gt[x++],ut[b++].h(jt.x,jt.y);for(;lt<z.length;)jt=z[lt++],ut[b++].h(jt.x+rt,jt.y);for(z=z[z.length-1].y;x<gt.length&&gt[x].y<=z;)x++;for(;x<gt.length&&gt[x].y>z;)rt=gt[x++],ut[b++].h(rt.x,rt.y);for(z=Ma(a,b),x=0;x<b;x++)z[x].assign(ut[x]);Xl(a,ut),b=z}return z=Math.max(0,St)+tt.width,tt=Nt,Xl(a,y),Xl(a,wt),Xl(a,gt),Xl(a,Et),ot[0]=E,ot[1]=b,new on(St,0,z,tt)}if(E=9999999,!(gt===null||2>gt.length||wt===null||2>wt.length))for(b=x=0;x<gt.length&&b<wt.length;)z=gt[x],Ut=wt[b],rt=Ut.x,lt=Ut.y,lt+=St,jt=z,x+1<gt.length&&(jt=gt[x+1]),ee=Ut,Ut=ee.x,ee=ee.y,b+1<wt.length&&(ee=wt[b+1],Ut=ee.x,ee=ee.y,ee+=St),oe=E,z.x===rt?oe=lt-z.y:z.x>rt&&z.x<Ut?oe=lt+(z.x-rt)/(Ut-rt)*(ee-lt)-z.y:rt>z.x&&rt<jt.x&&(oe=lt-(z.y+(rt-z.x)/(jt.x-z.x)*(jt.y-z.y))),oe<E&&(E=oe),jt.x<=z.x?x++:Ut<=rt?b++:(jt.x<=Ut&&x++,Ut<=jt.x&&b++);if(St-=E,St+=ut,x=wt,b=St,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Ma(a,y.length+x.length),E=z=rt=0;z<x.length&&x[z].x<y[0].x;)lt=x[z++],ut[E++].h(lt.x,lt.y+b);for(;rt<y.length;)lt=y[rt++],ut[E++].h(lt.x,lt.y);for(rt=y[y.length-1].x;z<x.length&&x[z].x<=rt;)z++;for(;z<x.length&&x[z].x>rt;)lt=x[z++],ut[E++].h(lt.x,lt.y+b);for(x=Ma(a,E),rt=0;rt<E;rt++)x[rt].assign(ut[rt]);Xl(a,ut),E=x}if(z=Et,rt=St,gt===null||2>gt.length||z===null||2>z.length)b=null;else{for(ut=Ma(a,gt.length+z.length),b=lt=x=0;x<gt.length&&gt[x].x<z[0].x;)jt=gt[x++],ut[b++].h(jt.x,jt.y);for(;lt<z.length;)jt=z[lt++],ut[b++].h(jt.x,jt.y+rt);for(z=z[z.length-1].x;x<gt.length&&gt[x].x<=z;)x++;for(;x<gt.length&&gt[x].x>z;)rt=gt[x++],ut[b++].h(rt.x,rt.y);for(z=Ma(a,b),x=0;x<b;x++)z[x].assign(ut[x]);Xl(a,ut),b=z}return z=Nt,tt=Math.max(0,St)+tt.height,Xl(a,y),Xl(a,wt),Xl(a,gt),Xl(a,Et),ot[0]=E,ot[1]=b,new on(St,0,z,tt)}function Ma(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 Wt;return a}function Xl(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}qi.prototype.arrangeTrees=function(){if(this.Rb===z0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof bl){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),Ay(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof bl&&a.push(x);switch(this.sorting){case Jf:break;case Fp:a.reverse();break;case Bp:a.sort(this.comparer);break;case Np:a.sort(this.comparer),a.reverse();break;default:xe("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(Ay(this,b,y+b.la.x,x+b.la.y),this.Rb){case j0:x+=b.Da.height+this.$d.height;break;case Iy:y+=b.Da.width+this.$d.width;break;default:xe("Unhandled arrangement value "+this.Rb.toString())}}}};function Ay(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];Ay(a,tt,x+tt.S.x,E+tt.S.y)}}}qi.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},qi.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},qi.prototype.Gu=function(){if(this.layerStyle===_0){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 Wt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Wt(-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 on(0,z,x,ot))):this.angle===90?(b.push(new on(0,z,x,ot)),z+=ot):this.angle===180?(z-=ot,b.push(new on(z,0,ot,x))):(b.push(new on(z,0,ot,x)),z+=ot)}this.commitLayers(b,E)}},qi.prototype.commitLayers=function(){},qi.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},qi.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof bl&&fx(this,y)}};function fx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)fx(a,y[E])}}qi.prototype.setPortSpots=function(a){var y=a.alignment;if(yd(y)){var x=this.ud===Nu,E=Hl(a);switch(E){case 0:var b=Bo;break;case 90:b=Qi;break;case 180:b=Gi;break;default:b=Ri}var z=a.children,tt=z.length;switch(y){case kh:case Tu: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?Gi:Ri;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:rt=Gi;break;case 90:rt=Ri;break;case 180:rt=Bo;break;default:rt=Qi}else y%2===0&&(rt=E===90||E===270?Bo:Qi);x?(a.setsPortSpot&&(ot.fromSpot=b),a.setsChildPortSpot&&(ot.toSpot=rt)):(a.setsPortSpot&&(ot.fromSpot=rt),a.setsChildPortSpot&&(ot.toSpot=b))}}break;case Ah:for(E=E===90||E===270?Bo:Qi,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 Xu:for(E=E===90||E===270?Gi:Ri,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=Hl(a),this.ud===Nu){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=Bo;break;case 90:E.fromSpot=Qi;break;case 180:E.fromSpot=Gi;break;default:E.fromSpot=Ri}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=Gi;break;case 90:E.toSpot=Ri;break;case 180:E.toSpot=Bo;break;default:E.toSpot=Qi}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=Bo;break;case 90:E.toSpot=Qi;break;case 180:E.toSpot=Gi;break;default:E.toSpot=Ri}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=Gi;break;case 90:E.fromSpot=Ri;break;case 180:E.fromSpot=Bo;break;default:E.fromSpot=Qi}else E.fromSpot=a.childPortSpot}};function Hl(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}qi.prototype.computeLayerSpacing=function(a){var y=Hl(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},qi.prototype.computeNodeIndent=function(a){var y=Hl(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)},re.Object.defineProperties(qi.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!==R0&&a!==Oy&&a!==Ty&&a!==Dy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==jy&&a!==_0||(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!==j0&&a!==Iy&&a!==z0||(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!==Jf&&a!==Fp&&a!==Bp&&!Np||(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()):xe("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!==I0&&a!==kp||(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!==Jf&&a!==Fp&&a!==Bp&&!Np||(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!==I0&&a!==kp||(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 D0=new Oe(qi,"PathDefault",-1),Nu=new Oe(qi,"PathDestination",0),Wc=new Oe(qi,"PathSource",1),Jf=new Oe(qi,"SortingForwards",10),Fp=new Oe(qi,"SortingReverse",11),Bp=new Oe(qi,"SortingAscending",12),Np=new Oe(qi,"SortingDescending",13),Qf=new Oe(qi,"AlignmentCenterSubtrees",20),Zc=new Oe(qi,"AlignmentCenterChildren",21),ku=new Oe(qi,"AlignmentStart",22),Au=new Oe(qi,"AlignmentEnd",23),kh=new Oe(qi,"AlignmentBus",24),Tu=new Oe(qi,"AlignmentBusBranching",25),Ah=new Oe(qi,"AlignmentTopLeftBus",26),Xu=new Oe(qi,"AlignmentBottomRightBus",27),I0=new Oe(qi,"CompactionNone",30),kp=new Oe(qi,"CompactionBlock",31),R0=new Oe(qi,"StyleLayered",40),Ty=new Oe(qi,"StyleLastParents",41),Oy=new Oe(qi,"StyleAlternating",42),Dy=new Oe(qi,"StyleRootOnly",43),j0=new Oe(qi,"ArrangementVertical",50),Iy=new Oe(qi,"ArrangementHorizontal",51),z0=new Oe(qi,"ArrangementFixedRoots",52),Ry=new Oe(qi,"LayerIndividual",60),jy=new Oe(qi,"LayerSiblings",61),_0=new Oe(qi,"LayerUniform",62);qi.className="TreeLayout",qi.PathDefault=D0,qi.PathDestination=Nu,qi.PathSource=Wc,qi.SortingForwards=Jf,qi.SortingReverse=Fp,qi.SortingAscending=Bp,qi.SortingDescending=Np,qi.AlignmentCenterSubtrees=Qf,qi.AlignmentCenterChildren=Zc,qi.AlignmentStart=ku,qi.AlignmentEnd=Au,qi.AlignmentBus=kh,qi.AlignmentBusBranching=Tu,qi.AlignmentTopLeftBus=Ah,qi.AlignmentBottomRightBus=Xu,qi.CompactionNone=I0,qi.CompactionBlock=kp,qi.StyleLayered=R0,qi.StyleLastParents=Ty,qi.StyleAlternating=Oy,qi.StyleRootOnly=Dy,qi.ArrangementVertical=j0,qi.ArrangementHorizontal=Iy,qi.ArrangementFixedRoots=z0,qi.LayerIndividual=Ry,qi.LayerSiblings=jy,qi.LayerUniform=_0;function Vc(a){qo.call(this,a)}Le(Vc,qo),Vc.prototype.createVertex=function(){return new bl(this)},Vc.prototype.createEdge=function(){return new qf(this)},Vc.className="TreeNetwork";function bl(a){ns.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 Wt(0,0),this.Da=new Nn(0,0),this.la=new Wt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Jf,this.hd=oy,this.Kb=0,this.Jb=Zc,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=kp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Ge,this.wr=!0,this.Dp=Ge}Le(bl,ns),bl.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)},re.Object.defineProperties(bl.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)}}}),bl.className="TreeVertex";function qf(a){za.call(this,a),this.$t=new Wt(0,0)}Le(qf,za),qf.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 Nu:x=this.fromVertex,E=this.toVertex;break;case Wc:x=this.toVertex,E=this.fromVertex;break;default:xe("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=Hl(x),tt=y.computeLayerSpacing(x),ot=x.rowSpacing;a.vg();var rt=a.curve===Qa,lt=a.isOrthogonal,ut;if(a.uh(),lt||rt){for(ut=2;4<a.pointsCount;)a.pv(2);var gt=a.i(1),St=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);gt=a.i(0),St=a.i(a.pointsCount-1)}var wt=a.i(a.pointsCount-1);z===0?(x.alignment===Au?(z=E.bottom+b.y,b.y===0&&gt.y>wt.y+x.rowIndent&&(z=Math.min(z,Math.max(gt.y,z-y.computeNodeIndent(x))))):x.alignment===ku?(z=E.top+b.y,b.y===0&&gt.y<wt.y-x.rowIndent&&(z=Math.max(z,Math.min(gt.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,gt.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,St.x,z)):(lt&&(a.m(ut,E.right+tt/2,gt.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(lt?ot/2:ot),z),ut++,lt&&a.m(ut,a.i(ut-1).x,St.y))):z===90?(x.alignment===Au?(z=E.right+b.x,b.x===0&&gt.x>wt.x+x.rowIndent&&(z=Math.min(z,Math.max(gt.x,z-y.computeNodeIndent(x))))):x.alignment===ku?(z=E.left+b.x,b.x===0&&gt.x<wt.x-x.rowIndent&&(z=Math.max(z,Math.min(gt.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,gt.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,St.y)):(lt&&(a.m(ut,gt.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(lt?ot/2:ot)),ut++,lt&&a.m(ut,St.x,a.i(ut-1).y))):z===180?(x.alignment===Au?(z=E.bottom+b.y,b.y===0&&gt.y>wt.y+x.rowIndent&&(z=Math.min(z,Math.max(gt.y,z-y.computeNodeIndent(x))))):x.alignment===ku?(z=E.top+b.y,b.y===0&&gt.y<wt.y-x.rowIndent&&(z=Math.max(z,Math.min(gt.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,gt.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,St.x,z)):(lt&&(a.m(ut,E.left-tt/2,gt.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(lt?ot/2:ot),z),ut++,lt&&a.m(ut,a.i(ut-1).x,St.y))):z===270?(x.alignment===Au?(z=E.right+b.x,b.x===0&&gt.x>wt.x+x.rowIndent&&(z=Math.min(z,Math.max(gt.x,z-y.computeNodeIndent(x))))):x.alignment===ku?(z=E.left+b.x,b.x===0&&gt.x<wt.x-x.rowIndent&&(z=Math.max(z,Math.min(gt.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,gt.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,St.y)):(lt&&(a.m(ut,gt.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(lt?ot/2:ot)),ut++,lt&&a.m(ut,St.x,a.i(ut-1).y))):xe("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=Hl(x),y!==Hl(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===Qa,b=a.isOrthogonal,E=yd(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()))}}},re.Object.defineProperties(qf.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)}}}),qf.className="TreeEdge",fr.prototype.initializeStandardTools=function(){this.gb("Action",new yl,this.mouseDownTools),this.gb("Relinking",new $a,this.mouseDownTools),this.gb("LinkReshaping",new _r,this.mouseDownTools),this.gb("Rotating",new qs,this.mouseDownTools),this.gb("Resizing",new As,this.mouseDownTools),this.gb("Linking",new Qs,this.mouseMoveTools),this.gb("Dragging",new wi,this.mouseMoveTools),this.gb("DragSelecting",new rl,this.mouseMoveTools),this.gb("Panning",new Ms,this.mouseMoveTools),this.gb("ContextMenu",new ta,this.mouseUpTools),this.gb("TextEditing",new lr,this.mouseUpTools),this.gb("ClickCreating",new ch,this.mouseUpTools),this.gb("ClickSelecting",new Vh,this.mouseUpTools)},cu("Horizontal",new pm),cu("Spot",new vm),cu("Table",new Sm),cu("Viewbox",new wm),cu("TableRow",new xm),cu("TableColumn",new Pm),cu("Graduated",new $g),cu("Grid",new Ug),wf.add("GraphLinksModel",us),wf.add("TreeModel",fl);var H0=Yt.go,zy={get licenseKey(){return ze.licenseKey},set licenseKey(a){ze.licenseKey=a},get version(){return ze.version},Group:bi,EnumValue:Oe,List:pn,Set:mn,Map:Yn,Point:Wt,Size:Nn,Rect:on,Margin:ci,Spot:Qn,Geometry:hn,PathFigure:tr,PathSegment:si,InputEvent:fs,DiagramEvent:Nl,ChangedEvent:sr,Model:Jn,GraphLinksModel:ao,TreeModel:la,Binding:Gr,Transaction:os,UndoManager:Sr,CommandHandler:Vt,Tool:So,DraggingTool:wi,DraggingInfo:Zu,DraggingOptions:st,LinkingBaseTool:Tr,LinkingTool:Qs,RelinkingTool:$a,LinkReshapingTool:_r,ResizingTool:As,RotatingTool:qs,ClickSelectingTool:Vh,ActionTool:yl,ClickCreatingTool:ch,HTMLInfo:au,ContextMenuTool:ta,DragSelectingTool:rl,PanningTool:Ms,TextEditingTool:lr,ToolManager:fr,Animation:Ls,AnimationManager:Ia,AnimationTrigger:Tl,Layer:ps,Diagram:ze,Palette:ct,Overview:pt,Brush:Io,GraphObject:Pe,Panel:Cn,RowColumnDefinition:Jr,Shape:Ai,TextBlock:Qo,Picture:xa,Part:ai,Adornment:Eo,Node:Rn,Link:Ln,Placeholder:oa,Layout:mr,LayoutNetwork:qo,LayoutVertex:ns,LayoutEdge:za,GridLayout:xs,PanelLayout:es,CircularLayout:Pr,CircularNetwork:Kf,CircularVertex:Pp,CircularEdge:P0,ForceDirectedLayout:Bs,ForceDirectedNetwork:Hc,ForceDirectedVertex:wp,ForceDirectedEdge:Cp,LayeredDigraphLayout:zo,LayeredDigraphNetwork:Xf,LayeredDigraphVertex:pl,LayeredDigraphEdge:Mp,TreeLayout:qi,TreeNetwork:Vc,TreeVertex:bl,TreeEdge:qf};typeof H0=="object"&&H0.version&&Vn("WARNING: a `go` object on the root object is already defined. "+("Debug"in H0?"debug ":"")+"version: "+H0.version+", replaced with version: "+zy.version),ze.prototype.go=zy,Yt.go=zy,typeof xn.exports=="object"&&(xn.exports=typeof Pt.g!="undefined"?Pt.g.go:self.go)}();var mt=typeof Pt.g!="undefined"?Pt.g.go:self.go;const It=typeof Pt.g!="undefined"?Pt.g.go:self.go,Zt=It.Group,we=It.EnumValue,Ht=It.List,he=It.Set,Rt=It.Map,be=It.Point,ge=It.Size,Kt=It.Rect,ue=It.Margin,de=It.Spot,ve=It.Geometry,At=It.PathFigure,nt=It.PathSegment,et=It.InputEvent,ht=It.DiagramEvent,at=It.ChangedEvent,ft=It.Model,vt=It.GraphLinksModel,Ct=It.TreeModel,Bt=It.Binding,Ft=It.Transaction,Ot=It.UndoManager,_t=It.CommandHandler,te=It.Tool,Xt=It.DraggingTool,Me=It.DraggingInfo,qt=It.LinkingBaseTool,Ne=It.LinkingTool,ne=It.RelinkingTool,Ce=It.LinkReshapingTool,Ue=It.ResizingTool,Ze=It.RotatingTool,tn=It.ClickSelectingTool,ln=It.ActionTool,ie=It.ClickCreatingTool,Gt=It.HTMLInfo,Ae=It.ContextMenuTool,Sn=It.DragSelectingTool,gn=It.PanningTool,Fe=It.TextEditingTool,Ke=It.ToolManager,rn=It.Animation,Fn=It.AnimationManager,Pn=It.AnimationTrigger,We=It.Layer,fe=It.Diagram,An=It.Palette,Hn=It.Overview,un=It.Brush,De=It.GraphObject,He=It.Panel,Ee=It.RowColumnDefinition,Jt=It.Shape,ye=It.TextBlock,Re=It.TextBlockMetrics,Be=It.Picture,Qt=It.Part,ce=It.Adornment,Tt=It.Node,xt=It.Link,yt=It.Placeholder,kt=It.Layout,zt=It.LayoutNetwork,Mt=It.LayoutVertex,se=It.LayoutEdge,$e=It.GridLayout,cn=It.PanelLayout,sn=It.CircularLayout,En=It.CircularNetwork,Gn=It.CircularVertex,zn=It.CircularEdge,Zn=It.ForceDirectedLayout,$n=It.ForceDirectedNetwork,ni=It.ForceDirectedVertex,ei=It.ForceDirectedEdge,Bi=It.LayeredDigraphLayout,Ki=It.LayeredDigraphNetwork,jn=It.LayeredDigraphVertex,Tn=It.LayeredDigraphEdge,In=It.TreeLayout,li=It.TreeNetwork,gi=It.TreeVertex,Yi=It.TreeEdge,Ci=It.version},24334:function(xn,vn,Pt){var mt,It;(function(Zt,we){xn.exports=we(Zt)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Pt.g!="undefined"?Pt.g:this,function(Zt){"use strict";Zt=Zt||{};var we=Zt.Base64,Ht="2.6.4",he="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rt=function(ne){for(var Ce={},Ue=0,Ze=ne.length;Ue<Ze;Ue++)Ce[ne.charAt(Ue)]=Ue;return Ce}(he),be=String.fromCharCode,ge=function(ne){if(ne.length<2){var Ce=ne.charCodeAt(0);return Ce<128?ne:Ce<2048?be(192|Ce>>>6)+be(128|Ce&63):be(224|Ce>>>12&15)+be(128|Ce>>>6&63)+be(128|Ce&63)}else{var Ce=65536+(ne.charCodeAt(0)-55296)*1024+(ne.charCodeAt(1)-56320);return be(240|Ce>>>18&7)+be(128|Ce>>>12&63)+be(128|Ce>>>6&63)+be(128|Ce&63)}},Kt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ue=function(ne){return ne.replace(Kt,ge)},de=function(ne){var Ce=[0,2,1][ne.length%3],Ue=ne.charCodeAt(0)<<16|(ne.length>1?ne.charCodeAt(1):0)<<8|(ne.length>2?ne.charCodeAt(2):0),Ze=[he.charAt(Ue>>>18),he.charAt(Ue>>>12&63),Ce>=2?"=":he.charAt(Ue>>>6&63),Ce>=1?"=":he.charAt(Ue&63)];return Ze.join("")},ve=Zt.btoa&&typeof Zt.btoa=="function"?function(ne){return Zt.btoa(ne)}:function(ne){if(ne.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ne.replace(/[\s\S]{1,3}/g,de)},At=function(ne){return ve(ue(String(ne)))},nt=function(ne){return ne.replace(/[+\/]/g,function(Ce){return Ce=="+"?"-":"_"}).replace(/=/g,"")},et=function(ne,Ce){return Ce?nt(At(ne)):At(ne)},ht=function(ne){return et(ne,!0)},at;Zt.Uint8Array&&(at=function(ne,Ce){for(var Ue="",Ze=0,tn=ne.length;Ze<tn;Ze+=3){var ln=ne[Ze],ie=ne[Ze+1],Gt=ne[Ze+2],Ae=ln<<16|ie<<8|Gt;Ue+=he.charAt(Ae>>>18)+he.charAt(Ae>>>12&63)+(typeof ie!="undefined"?he.charAt(Ae>>>6&63):"=")+(typeof Gt!="undefined"?he.charAt(Ae&63):"=")}return Ce?nt(Ue):Ue});var ft=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,vt=function(ne){switch(ne.length){case 4:var Ce=(7&ne.charCodeAt(0))<<18|(63&ne.charCodeAt(1))<<12|(63&ne.charCodeAt(2))<<6|63&ne.charCodeAt(3),Ue=Ce-65536;return be((Ue>>>10)+55296)+be((Ue&1023)+56320);case 3:return be((15&ne.charCodeAt(0))<<12|(63&ne.charCodeAt(1))<<6|63&ne.charCodeAt(2));default:return be((31&ne.charCodeAt(0))<<6|63&ne.charCodeAt(1))}},Ct=function(ne){return ne.replace(ft,vt)},Bt=function(ne){var Ce=ne.length,Ue=Ce%4,Ze=(Ce>0?Rt[ne.charAt(0)]<<18:0)|(Ce>1?Rt[ne.charAt(1)]<<12:0)|(Ce>2?Rt[ne.charAt(2)]<<6:0)|(Ce>3?Rt[ne.charAt(3)]:0),tn=[be(Ze>>>16),be(Ze>>>8&255),be(Ze&255)];return tn.length-=[0,0,2,1][Ue],tn.join("")},Ft=Zt.atob&&typeof Zt.atob=="function"?function(ne){return Zt.atob(ne)}:function(ne){return ne.replace(/\S{1,4}/g,Bt)},Ot=function(ne){return Ft(String(ne).replace(/[^A-Za-z0-9\+\/]/g,""))},_t=function(ne){return Ct(Ft(ne))},te=function(ne){return String(ne).replace(/[-_]/g,function(Ce){return Ce=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Xt=function(ne){return _t(te(ne))},Me;Zt.Uint8Array&&(Me=function(ne){return Uint8Array.from(Ot(te(ne)),function(Ce){return Ce.charCodeAt(0)})});var qt=function(){var ne=Zt.Base64;return Zt.Base64=we,ne};if(Zt.Base64={VERSION:Ht,atob:Ot,btoa:ve,fromBase64:Xt,toBase64:et,utob:ue,encode:et,encodeURI:ht,btou:Ct,decode:Xt,noConflict:qt,fromUint8Array:at,toUint8Array:Me},typeof Object.defineProperty=="function"){var Ne=function(ne){return{value:ne,enumerable:!1,writable:!0,configurable:!0}};Zt.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Ne(function(){return Xt(this)})),Object.defineProperty(String.prototype,"toBase64",Ne(function(ne){return et(this,ne)})),Object.defineProperty(String.prototype,"toBase64URI",Ne(function(){return et(this,!0)}))}}return Zt.Meteor&&(Base64=Zt.Base64),xn.exports?xn.exports.Base64=Zt.Base64:(mt=[],It=function(){return Zt.Base64}.apply(vn,mt),It!==void 0&&(xn.exports=It)),{Base64:Zt.Base64}})},17115:function(xn,vn,Pt){"use strict";Pt.d(vn,{ZP:function(){return Rt}});var mt=Pt(29043),It=Pt(59301),Zt=Pt(87746),we=0,Ht=(0,Zt.Z)();function he(){var be;return Ht?(be=we,we+=1):be="TEST_OR_SSR",be}function Rt(be){var ge=It.useState(),Kt=(0,mt.Z)(ge,2),ue=Kt[0],de=Kt[1];return It.useEffect(function(){de("rc_select_".concat(he()))},[]),be||ue}},77861:function(xn,vn,Pt){"use strict";Pt.d(vn,{Ac:function(){return kt},Xo:function(){return ei},Wx:function(){return Ki},ZP:function(){return Qe},lk:function(){return Ct}});var mt=Pt(5891),It=Pt(26390),Zt=Pt(80962),we=Pt(57259),Ht=Pt(29043),he=Pt(19149),Rt=Pt(80665),be=Pt(35788),ge=Pt(51395),Kt=Pt(59301),ue=Pt(92310),de=Pt.n(ue),ve=Pt(28800),At=Pt(93144),nt=Pt(85108),et=Pt(20475),ht=function(Yt){var Ve=Yt.className,en=Yt.customizeIcon,Bn=Yt.customizeIconProps,qe=Yt.onMouseDown,xe=Yt.onClick,an=Yt.children,Mn;return typeof en=="function"?Mn=en(Bn):Mn=en,Kt.createElement("span",{className:Ve,onMouseDown:function(_e){_e.preventDefault(),qe&&qe(_e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:xe,"aria-hidden":!0},Mn!==void 0?Mn:Kt.createElement("span",{className:de()(Ve.split(/\s+/).map(function(Vn){return"".concat(Vn,"-icon")}))},an))},at=ht;function ft(pe,Yt,Ve,en,Bn){var qe=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,xe=arguments.length>6?arguments[6]:void 0,an=arguments.length>7?arguments[7]:void 0,Mn=Kt.useMemo(function(){if((0,Rt.Z)(en)==="object")return en.clearIcon;if(Bn)return Bn},[en,Bn]),Vn=Kt.useMemo(function(){return!!(!qe&&en&&(Ve.length||xe)&&!(an==="combobox"&&xe===""))},[en,qe,Ve.length,xe,an]);return{allowClear:Vn,clearIcon:Kt.createElement(at,{className:"".concat(pe,"-clear"),onMouseDown:Yt,customizeIcon:Mn},"\xD7")}}var vt=Kt.createContext(null);function Ct(){return Kt.useContext(vt)}function Bt(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Yt=Kt.useState(!1),Ve=(0,Ht.Z)(Yt,2),en=Ve[0],Bn=Ve[1],qe=Kt.useRef(null),xe=function(){window.clearTimeout(qe.current)};Kt.useEffect(function(){return xe},[]);var an=function(Vn,_e){xe(),qe.current=window.setTimeout(function(){Bn(Vn),_e&&_e()},pe)};return[en,an,xe]}function Ft(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Yt=Kt.useRef(null),Ve=Kt.useRef(null);Kt.useEffect(function(){return function(){window.clearTimeout(Ve.current)}},[]);function en(Bn){(Bn||Yt.current===null)&&(Yt.current=Bn),window.clearTimeout(Ve.current),Ve.current=window.setTimeout(function(){Yt.current=null},pe)}return[function(){return Yt.current},en]}function Ot(pe,Yt,Ve,en){var Bn=Kt.useRef(null);Bn.current={open:Yt,triggerOpen:Ve,customizedTrigger:en},Kt.useEffect(function(){function qe(xe){var an;if(!((an=Bn.current)!==null&&an!==void 0&&an.customizedTrigger)){var Mn=xe.target;Mn.shadowRoot&&xe.composed&&(Mn=xe.composedPath()[0]||Mn),Bn.current.open&&pe().filter(function(Vn){return Vn}).every(function(Vn){return!Vn.contains(Mn)&&Vn!==Mn})&&Bn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",qe),function(){return window.removeEventListener("mousedown",qe)}},[])}var _t=Pt(36994),te=Pt(11780),Xt=function(Yt,Ve){var en,Bn,qe=Yt.prefixCls,xe=Yt.id,an=Yt.inputElement,Mn=Yt.disabled,Vn=Yt.tabIndex,_e=Yt.autoFocus,Je=Yt.autoComplete,hi=Yt.editable,qn=Yt.activeDescendantId,vi=Yt.value,Kn=Yt.maxLength,oi=Yt.onKeyDown,ui=Yt.onMouseDown,xi=Yt.onChange,to=Yt.onPaste,On=Yt.onCompositionStart,ri=Yt.onCompositionEnd,lo=Yt.open,Ao=Yt.attrs,Ii=an||Kt.createElement("input",null),Oe=Ii,Wn=Oe.ref,yi=Oe.props,di=yi.onKeyDown,no=yi.onChange,ji=yi.onMouseDown,fo=yi.onCompositionStart,Hi=yi.onCompositionEnd,Ti=yi.style;return(0,ge.Kp)(!("maxLength"in Ii.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ii=Kt.cloneElement(Ii,(0,we.Z)((0,we.Z)((0,we.Z)({type:"search"},yi),{},{id:xe,ref:(0,et.sQ)(Ve,Wn),disabled:Mn,tabIndex:Vn,autoComplete:Je||"off",autoFocus:_e,className:de()("".concat(qe,"-selection-search-input"),(en=Ii)===null||en===void 0||(Bn=en.props)===null||Bn===void 0?void 0:Bn.className),role:"combobox","aria-label":"Search","aria-expanded":lo||!1,"aria-haspopup":"listbox","aria-owns":"".concat(xe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(xe,"_list"),"aria-activedescendant":lo?qn:void 0},Ao),{},{value:hi?vi:"",maxLength:Kn,readOnly:!hi,unselectable:hi?null:"on",style:(0,we.Z)((0,we.Z)({},Ti),{},{opacity:hi?null:0}),onKeyDown:function(pn){oi(pn),di&&di(pn)},onMouseDown:function(pn){ui(pn),ji&&ji(pn)},onChange:function(pn){xi(pn),no&&no(pn)},onCompositionStart:function(pn){On(pn),fo&&fo(pn)},onCompositionEnd:function(pn){ri(pn),Hi&&Hi(pn)},onPaste:to})),Ii},Me=Kt.forwardRef(Xt);Me.displayName="Input";var qt=Me;function Ne(pe){return Array.isArray(pe)?pe:pe!==void 0?[pe]:[]}var ne=typeof window!="undefined"&&window.document&&window.document.documentElement,Ce=ne;function Ue(pe){return pe!=null}function Ze(pe){return!pe&&pe!==0}function tn(pe){return["string","number"].includes((0,Rt.Z)(pe))}function ln(pe){var Yt=void 0;return pe&&(tn(pe.title)?Yt=pe.title.toString():tn(pe.label)&&(Yt=pe.label.toString())),Yt}function ie(pe,Yt){Ce?Kt.useLayoutEffect(pe,Yt):Kt.useEffect(pe,Yt)}function Gt(pe){var Yt;return(Yt=pe.key)!==null&&Yt!==void 0?Yt:pe.value}var Ae=function(Yt){Yt.preventDefault(),Yt.stopPropagation()},Sn=function(Yt){var Ve=Yt.id,en=Yt.prefixCls,Bn=Yt.values,qe=Yt.open,xe=Yt.searchValue,an=Yt.autoClearSearchValue,Mn=Yt.inputRef,Vn=Yt.placeholder,_e=Yt.disabled,Je=Yt.mode,hi=Yt.showSearch,qn=Yt.autoFocus,vi=Yt.autoComplete,Kn=Yt.activeDescendantId,oi=Yt.tabIndex,ui=Yt.removeIcon,xi=Yt.maxTagCount,to=Yt.maxTagTextLength,On=Yt.maxTagPlaceholder,ri=On===void 0?function(Fo){return"+ ".concat(Fo.length," ...")}:On,lo=Yt.tagRender,Ao=Yt.onToggleOpen,Ii=Yt.onRemove,Oe=Yt.onInputChange,Wn=Yt.onInputPaste,yi=Yt.onInputKeyDown,di=Yt.onInputMouseDown,no=Yt.onInputCompositionStart,ji=Yt.onInputCompositionEnd,fo=Kt.useRef(null),Hi=(0,Kt.useState)(0),Ti=(0,Ht.Z)(Hi,2),Po=Ti[0],pn=Ti[1],Vo=(0,Kt.useState)(!1),mn=(0,Ht.Z)(Vo,2),po=mn[0],vr=mn[1],Si="".concat(en,"-selection"),Dr=qe||Je==="multiple"&&an===!1||Je==="tags"?xe:"",hr=Je==="tags"||Je==="multiple"&&an===!1||hi&&(qe||po);ie(function(){pn(fo.current.scrollWidth)},[Dr]);function ki(Fo,br,Fr,qr,eo){return Kt.createElement("span",{className:de()("".concat(Si,"-item"),(0,Zt.Z)({},"".concat(Si,"-item-disabled"),Fr)),title:ln(Fo)},Kt.createElement("span",{className:"".concat(Si,"-item-content")},br),qr&&Kt.createElement(at,{className:"".concat(Si,"-item-remove"),onMouseDown:Ae,onClick:eo,customizeIcon:ui},"\xD7"))}function Oi(Fo,br,Fr,qr,eo){var $i=function(ir){Ae(ir),Ao(!qe)};return Kt.createElement("span",{onMouseDown:$i},lo({label:br,value:Fo,disabled:Fr,closable:qr,onClose:eo}))}function bo(Fo){var br=Fo.disabled,Fr=Fo.label,qr=Fo.value,eo=!_e&&!br,$i=Fr;if(typeof to=="number"&&(typeof Fr=="string"||typeof Fr=="number")){var Do=String($i);Do.length>to&&($i="".concat(Do.slice(0,to),"..."))}var ir=function(yr){yr&&yr.stopPropagation(),Ii(Fo)};return typeof lo=="function"?Oi(qr,$i,br,eo,ir):ki(Fo,$i,br,eo,ir)}function Oo(Fo){var br=typeof ri=="function"?ri(Fo):ri;return ki({title:br},br,!1)}var Yn=Kt.createElement("div",{className:"".concat(Si,"-search"),style:{width:Po},onFocus:function(){vr(!0)},onBlur:function(){vr(!1)}},Kt.createElement(qt,{ref:Mn,open:qe,prefixCls:en,id:Ve,inputElement:null,disabled:_e,autoFocus:qn,autoComplete:vi,editable:hr,activeDescendantId:Kn,value:Dr,onKeyDown:yi,onMouseDown:di,onChange:Oe,onPaste:Wn,onCompositionStart:no,onCompositionEnd:ji,tabIndex:oi,attrs:(0,_t.Z)(Yt,!0)}),Kt.createElement("span",{ref:fo,className:"".concat(Si,"-search-mirror"),"aria-hidden":!0},Dr,"\xA0")),Wt=Kt.createElement(te.Z,{prefixCls:"".concat(Si,"-overflow"),data:Bn,renderItem:bo,renderRest:Oo,suffix:Yn,itemKey:Gt,maxCount:xi});return Kt.createElement(Kt.Fragment,null,Wt,!Bn.length&&!Dr&&Kt.createElement("span",{className:"".concat(Si,"-placeholder")},Vn))},gn=Sn,Fe=function(Yt){var Ve=Yt.inputElement,en=Yt.prefixCls,Bn=Yt.id,qe=Yt.inputRef,xe=Yt.disabled,an=Yt.autoFocus,Mn=Yt.autoComplete,Vn=Yt.activeDescendantId,_e=Yt.mode,Je=Yt.open,hi=Yt.values,qn=Yt.placeholder,vi=Yt.tabIndex,Kn=Yt.showSearch,oi=Yt.searchValue,ui=Yt.activeValue,xi=Yt.maxLength,to=Yt.onInputKeyDown,On=Yt.onInputMouseDown,ri=Yt.onInputChange,lo=Yt.onInputPaste,Ao=Yt.onInputCompositionStart,Ii=Yt.onInputCompositionEnd,Oe=Yt.title,Wn=Kt.useState(!1),yi=(0,Ht.Z)(Wn,2),di=yi[0],no=yi[1],ji=_e==="combobox",fo=ji||Kn,Hi=hi[0],Ti=oi||"";ji&&ui&&!di&&(Ti=ui),Kt.useEffect(function(){ji&&no(!1)},[ji,ui]);var Po=_e!=="combobox"&&!Je&&!Kn?!1:!!Ti,pn=Oe===void 0?ln(Hi):Oe,Vo=function(){if(Hi)return null;var po=Po?{visibility:"hidden"}:void 0;return Kt.createElement("span",{className:"".concat(en,"-selection-placeholder"),style:po},qn)};return Kt.createElement(Kt.Fragment,null,Kt.createElement("span",{className:"".concat(en,"-selection-search")},Kt.createElement(qt,{ref:qe,prefixCls:en,id:Bn,open:Je,inputElement:Ve,disabled:xe,autoFocus:an,autoComplete:Mn,editable:fo,activeDescendantId:Vn,value:Ti,onKeyDown:to,onMouseDown:On,onChange:function(po){no(!0),ri(po)},onPaste:lo,onCompositionStart:Ao,onCompositionEnd:Ii,tabIndex:vi,attrs:(0,_t.Z)(Yt,!0),maxLength:ji?xi:void 0})),!ji&&Hi?Kt.createElement("span",{className:"".concat(en,"-selection-item"),title:pn,style:Po?{visibility:"hidden"}:void 0},Hi.label):null,Vo())},Ke=Fe;function rn(pe){return![nt.Z.ESC,nt.Z.SHIFT,nt.Z.BACKSPACE,nt.Z.TAB,nt.Z.WIN_KEY,nt.Z.ALT,nt.Z.META,nt.Z.WIN_KEY_RIGHT,nt.Z.CTRL,nt.Z.SEMICOLON,nt.Z.EQUALS,nt.Z.CAPS_LOCK,nt.Z.CONTEXT_MENU,nt.Z.F1,nt.Z.F2,nt.Z.F3,nt.Z.F4,nt.Z.F5,nt.Z.F6,nt.Z.F7,nt.Z.F8,nt.Z.F9,nt.Z.F10,nt.Z.F11,nt.Z.F12].includes(pe)}var Fn=function(Yt,Ve){var en=(0,Kt.useRef)(null),Bn=(0,Kt.useRef)(!1),qe=Yt.prefixCls,xe=Yt.open,an=Yt.mode,Mn=Yt.showSearch,Vn=Yt.tokenWithEnter,_e=Yt.autoClearSearchValue,Je=Yt.onSearch,hi=Yt.onSearchSubmit,qn=Yt.onToggleOpen,vi=Yt.onInputKeyDown,Kn=Yt.domRef;Kt.useImperativeHandle(Ve,function(){return{focus:function(){en.current.focus()},blur:function(){en.current.blur()}}});var oi=Ft(0),ui=(0,Ht.Z)(oi,2),xi=ui[0],to=ui[1],On=function(Ti){var Po=Ti.which;(Po===nt.Z.UP||Po===nt.Z.DOWN)&&Ti.preventDefault(),vi&&vi(Ti),Po===nt.Z.ENTER&&an==="tags"&&!Bn.current&&!xe&&(hi==null||hi(Ti.target.value)),rn(Po)&&qn(!0)},ri=function(){to(!0)},lo=(0,Kt.useRef)(null),Ao=function(Ti){Je(Ti,!0,Bn.current)!==!1&&qn(!0)},Ii=function(){Bn.current=!0},Oe=function(Ti){Bn.current=!1,an!=="combobox"&&Ao(Ti.target.value)},Wn=function(Ti){var Po=Ti.target.value;if(Vn&&lo.current&&/[\r\n]/.test(lo.current)){var pn=lo.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Po=Po.replace(pn,lo.current)}lo.current=null,Ao(Po)},yi=function(Ti){var Po=Ti.clipboardData,pn=Po.getData("text");lo.current=pn},di=function(Ti){var Po=Ti.target;if(Po!==en.current){var pn=document.body.style.msTouchAction!==void 0;pn?setTimeout(function(){en.current.focus()}):en.current.focus()}},no=function(Ti){var Po=xi();Ti.target!==en.current&&!Po&&an!=="combobox"&&Ti.preventDefault(),(an!=="combobox"&&(!Mn||!Po)||!xe)&&(xe&&_e!==!1&&Je("",!0,!1),qn())},ji={inputRef:en,onInputKeyDown:On,onInputMouseDown:ri,onInputChange:Wn,onInputPaste:yi,onInputCompositionStart:Ii,onInputCompositionEnd:Oe},fo=an==="multiple"||an==="tags"?Kt.createElement(gn,(0,mt.Z)({},Yt,ji)):Kt.createElement(Ke,(0,mt.Z)({},Yt,ji));return Kt.createElement("div",{ref:Kn,className:"".concat(qe,"-selector"),onClick:di,onMouseDown:no},fo)},Pn=Kt.forwardRef(Fn);Pn.displayName="Selector";var We=Pn,fe=Pt(35593),An=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Hn=function(Yt){var Ve=Yt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ve,adjustY:1},htmlRegion:"scroll"}}},un=function(Yt,Ve){var en=Yt.prefixCls,Bn=Yt.disabled,qe=Yt.visible,xe=Yt.children,an=Yt.popupElement,Mn=Yt.animation,Vn=Yt.transitionName,_e=Yt.dropdownStyle,Je=Yt.dropdownClassName,hi=Yt.direction,qn=hi===void 0?"ltr":hi,vi=Yt.placement,Kn=Yt.builtinPlacements,oi=Yt.dropdownMatchSelectWidth,ui=Yt.dropdownRender,xi=Yt.dropdownAlign,to=Yt.getPopupContainer,On=Yt.empty,ri=Yt.getTriggerDOMNode,lo=Yt.onPopupVisibleChange,Ao=Yt.onPopupMouseEnter,Ii=(0,he.Z)(Yt,An),Oe="".concat(en,"-dropdown"),Wn=an;ui&&(Wn=ui(an));var yi=Kt.useMemo(function(){return Kn||Hn(oi)},[Kn,oi]),di=Mn?"".concat(Oe,"-").concat(Mn):Vn,no=typeof oi=="number",ji=Kt.useMemo(function(){return no?null:oi===!1?"minWidth":"width"},[oi,no]),fo=_e;no&&(fo=(0,we.Z)((0,we.Z)({},fo),{},{width:oi}));var Hi=Kt.useRef(null);return Kt.useImperativeHandle(Ve,function(){return{getPopupElement:function(){return Hi.current}}}),Kt.createElement(fe.Z,(0,mt.Z)({},Ii,{showAction:lo?["click"]:[],hideAction:lo?["click"]:[],popupPlacement:vi||(qn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:yi,prefixCls:Oe,popupTransitionName:di,popup:Kt.createElement("div",{ref:Hi,onMouseEnter:Ao},Wn),stretch:ji,popupAlign:xi,popupVisible:qe,getPopupContainer:to,popupClassName:de()(Je,(0,Zt.Z)({},"".concat(Oe,"-empty"),On)),popupStyle:fo,getTriggerDOMNode:ri,onPopupVisibleChange:lo}),xe)},De=Kt.forwardRef(un);De.displayName="SelectTrigger";var He=De,Ee=Pt(17953);function Jt(pe,Yt){var Ve=pe.key,en;return"value"in pe&&(en=pe.value),Ve!=null?Ve:en!==void 0?en:"rc-index-key-".concat(Yt)}function ye(pe,Yt){var Ve=pe||{},en=Ve.label,Bn=Ve.value,qe=Ve.options,xe=Ve.groupLabel,an=en||(Yt?"children":"label");return{label:an,value:Bn||"value",options:qe||"options",groupLabel:xe||an}}function Re(pe){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ve=Yt.fieldNames,en=Yt.childrenAsData,Bn=[],qe=ye(Ve,!1),xe=qe.label,an=qe.value,Mn=qe.options,Vn=qe.groupLabel;function _e(Je,hi){Je.forEach(function(qn){if(hi||!(Mn in qn)){var vi=qn[an];Bn.push({key:Jt(qn,Bn.length),groupOption:hi,data:qn,label:qn[xe],value:vi})}else{var Kn=qn[Vn];Kn===void 0&&en&&(Kn=qn.label),Bn.push({key:Jt(qn,Bn.length),group:!0,data:qn,label:Kn}),_e(qn[Mn],!0)}})}return _e(pe,!1),Bn}function Be(pe){var Yt=(0,we.Z)({},pe);return"props"in Yt||Object.defineProperty(Yt,"props",{get:function(){return(0,ge.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Yt}}),Yt}function Qt(pe,Yt){if(!Yt||!Yt.length)return null;var Ve=!1;function en(qe,xe){var an=(0,Ee.Z)(xe),Mn=an[0],Vn=an.slice(1);if(!Mn)return[qe];var _e=qe.split(Mn);return Ve=Ve||_e.length>1,_e.reduce(function(Je,hi){return[].concat((0,It.Z)(Je),(0,It.Z)(en(hi,Vn)))},[]).filter(function(Je){return Je})}var Bn=en(pe,Yt);return Ve?Bn:null}var ce=["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"],Tt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function xt(pe){return pe==="tags"||pe==="multiple"}var yt=Kt.forwardRef(function(pe,Yt){var Ve,en,Bn=pe.id,qe=pe.prefixCls,xe=pe.className,an=pe.showSearch,Mn=pe.tagRender,Vn=pe.direction,_e=pe.omitDomProps,Je=pe.displayValues,hi=pe.onDisplayValuesChange,qn=pe.emptyOptions,vi=pe.notFoundContent,Kn=vi===void 0?"Not Found":vi,oi=pe.onClear,ui=pe.mode,xi=pe.disabled,to=pe.loading,On=pe.getInputElement,ri=pe.getRawInputElement,lo=pe.open,Ao=pe.defaultOpen,Ii=pe.onDropdownVisibleChange,Oe=pe.activeValue,Wn=pe.onActiveValueChange,yi=pe.activeDescendantId,di=pe.searchValue,no=pe.autoClearSearchValue,ji=pe.onSearch,fo=pe.onSearchSplit,Hi=pe.tokenSeparators,Ti=pe.allowClear,Po=pe.suffixIcon,pn=pe.clearIcon,Vo=pe.OptionList,mn=pe.animation,po=pe.transitionName,vr=pe.dropdownStyle,Si=pe.dropdownClassName,Dr=pe.dropdownMatchSelectWidth,hr=pe.dropdownRender,ki=pe.dropdownAlign,Oi=pe.placement,bo=pe.builtinPlacements,Oo=pe.getPopupContainer,Yn=pe.showAction,Wt=Yn===void 0?[]:Yn,Fo=pe.onFocus,br=pe.onBlur,Fr=pe.onKeyUp,qr=pe.onKeyDown,eo=pe.onMouseDown,$i=(0,he.Z)(pe,ce),Do=xt(ui),ir=(an!==void 0?an:Do)||ui==="combobox",uo=(0,we.Z)({},$i);Tt.forEach(function(Ge){delete uo[Ge]}),_e==null||_e.forEach(function(Ge){delete uo[Ge]});var yr=Kt.useState(!1),Vi=(0,Ht.Z)(yr,2),Ni=Vi[0],Ji=Vi[1];Kt.useEffect(function(){Ji((0,At.Z)())},[]);var Nn=Kt.useRef(null),Ro=Kt.useRef(null),or=Kt.useRef(null),Ir=Kt.useRef(null),pr=Kt.useRef(null),Br=Bt(),ts=(0,Ht.Z)(Br,3),Ns=ts[0],ks=ts[1],ca=ts[2];Kt.useImperativeHandle(Yt,function(){var Ge,fn;return{focus:(Ge=Ir.current)===null||Ge===void 0?void 0:Ge.focus,blur:(fn=Ir.current)===null||fn===void 0?void 0:fn.blur,scrollTo:function(Ui){var mo;return(mo=pr.current)===null||mo===void 0?void 0:mo.scrollTo(Ui)}}});var Ts=Kt.useMemo(function(){var Ge;if(ui!=="combobox")return di;var fn=(Ge=Je[0])===null||Ge===void 0?void 0:Ge.value;return typeof fn=="string"||typeof fn=="number"?String(fn):""},[di,ui,Je]),on=ui==="combobox"&&typeof On=="function"&&On()||null,ds=typeof ri=="function"&&ri(),ka=(0,et.x1)(Ro,ds==null||(Ve=ds.props)===null||Ve===void 0?void 0:Ve.ref),el=Kt.useState(!1),cs=(0,Ht.Z)(el,2),Za=cs[0],nu=cs[1];(0,ve.Z)(function(){nu(!0)},[]);var Zl=(0,be.Z)(!1,{defaultValue:Ao,value:lo}),Mr=(0,Ht.Z)(Zl,2),_o=Mr[0],_s=Mr[1],Mo=Za?_o:!1,Ko=!Kn&&qn;(xi||Ko&&Mo&&ui==="combobox")&&(Mo=!1);var To=Ko?!1:Mo,ci=Kt.useCallback(function(Ge){var fn=Ge!==void 0?Ge:!Mo;xi||(_s(fn),Mo!==fn&&(Ii==null||Ii(fn)))},[xi,Mo,_s,Ii]),Ur=Kt.useMemo(function(){return(Hi||[]).some(function(Ge){return[`
`,`\r
`].includes(Ge)})},[Hi]),$r=function(fn,oo,Ui){var mo=!0,Ri=fn;Wn==null||Wn(null);var Gi=Ui?null:Qt(fn,Hi);return ui!=="combobox"&&Gi&&(Ri="",fo==null||fo(Gi),ci(!1),mo=!1),ji&&Ts!==Ri&&ji(Ri,{source:oo?"typing":"effect"}),mo},ws=function(fn){!fn||!fn.trim()||ji(fn,{source:"submit"})};Kt.useEffect(function(){!Mo&&!Do&&ui!=="combobox"&&$r("",!1,!1)},[Mo]),Kt.useEffect(function(){_o&&xi&&_s(!1),xi&&ks(!1)},[xi]);var Aa=Ft(),nl=(0,Ht.Z)(Aa,2),Qn=nl[0],kr=nl[1],is=function(fn){var oo=Qn(),Ui=fn.which;if(Ui===nt.Z.ENTER&&(ui!=="combobox"&&fn.preventDefault(),Mo||ci(!0)),kr(!!Ts),Ui===nt.Z.BACKSPACE&&!oo&&Do&&!Ts&&Je.length){for(var mo=(0,It.Z)(Je),Ri=null,Gi=mo.length-1;Gi>=0;Gi-=1){var Bo=mo[Gi];if(!Bo.disabled){mo.splice(Gi,1),Ri=Bo;break}}Ri&&hi(mo,{type:"remove",values:[Ri]})}for(var Qi=arguments.length,Uo=new Array(Qi>1?Qi-1:0),dr=1;dr<Qi;dr++)Uo[dr-1]=arguments[dr];if(Mo&&pr.current){var vo;(vo=pr.current).onKeyDown.apply(vo,[fn].concat(Uo))}qr==null||qr.apply(void 0,[fn].concat(Uo))},Ta=function(fn){for(var oo=arguments.length,Ui=new Array(oo>1?oo-1:0),mo=1;mo<oo;mo++)Ui[mo-1]=arguments[mo];if(Mo&&pr.current){var Ri;(Ri=pr.current).onKeyUp.apply(Ri,[fn].concat(Ui))}Fr==null||Fr.apply(void 0,[fn].concat(Ui))},iu=function(fn){var oo=Je.filter(function(Ui){return Ui!==fn});hi(oo,{type:"remove",values:[fn]})},Va=Kt.useRef(!1),wo=function(){ks(!0),xi||(Fo&&!Va.current&&Fo.apply(void 0,arguments),Wt.includes("focus")&&ci(!0)),Va.current=!0},Ru=function(){ks(!1,function(){Va.current=!1,ci(!1)}),!xi&&(Ts&&(ui==="tags"?ji(Ts,{source:"submit"}):ui==="multiple"&&ji("",{source:"blur"})),br&&br.apply(void 0,arguments))},bs=[];Kt.useEffect(function(){return function(){bs.forEach(function(Ge){return clearTimeout(Ge)}),bs.splice(0,bs.length)}},[]);var fa=function(fn){var oo,Ui=fn.target,mo=(oo=or.current)===null||oo===void 0?void 0:oo.getPopupElement();if(mo&&mo.contains(Ui)){var Ri=setTimeout(function(){var Uo=bs.indexOf(Ri);if(Uo!==-1&&bs.splice(Uo,1),ca(),!Ni&&!mo.contains(document.activeElement)){var dr;(dr=Ir.current)===null||dr===void 0||dr.focus()}});bs.push(Ri)}for(var Gi=arguments.length,Bo=new Array(Gi>1?Gi-1:0),Qi=1;Qi<Gi;Qi++)Bo[Qi-1]=arguments[Qi];eo==null||eo.apply(void 0,[fn].concat(Bo))},Hs=Kt.useState({}),Bl=(0,Ht.Z)(Hs,2),ou=Bl[1];function ga(){ou({})}var Oa;ds&&(Oa=function(fn){ci(fn)}),Ot(function(){var Ge;return[Nn.current,(Ge=or.current)===null||Ge===void 0?void 0:Ge.getPopupElement()]},To,ci,!!ds);var yu=Kt.useMemo(function(){return(0,we.Z)((0,we.Z)({},pe),{},{notFoundContent:Kn,open:Mo,triggerOpen:To,id:Bn,showSearch:ir,multiple:Do,toggleOpen:ci})},[pe,Kn,To,Mo,Bn,ir,Do,ci]),ih=!!Po||to,ju;ih&&(ju=Kt.createElement(at,{className:de()("".concat(qe,"-arrow"),(0,Zt.Z)({},"".concat(qe,"-arrow-loading"),to)),customizeIcon:Po,customizeIconProps:{loading:to,searchValue:Ts,open:Mo,focused:Ns,showSearch:ir}}));var oh=function(){var fn;oi==null||oi(),(fn=Ir.current)===null||fn===void 0||fn.focus(),hi([],{type:"clear",values:Je}),$r("",!1,!1)},Ca=ft(qe,oh,Je,Ti,pn,xi,Ts,ui),vl=Ca.allowClear,Ks=Ca.clearIcon,il=Kt.createElement(Vo,{ref:pr}),rh=de()(qe,xe,(en={},(0,Zt.Z)(en,"".concat(qe,"-focused"),Ns),(0,Zt.Z)(en,"".concat(qe,"-multiple"),Do),(0,Zt.Z)(en,"".concat(qe,"-single"),!Do),(0,Zt.Z)(en,"".concat(qe,"-allow-clear"),Ti),(0,Zt.Z)(en,"".concat(qe,"-show-arrow"),ih),(0,Zt.Z)(en,"".concat(qe,"-disabled"),xi),(0,Zt.Z)(en,"".concat(qe,"-loading"),to),(0,Zt.Z)(en,"".concat(qe,"-open"),Mo),(0,Zt.Z)(en,"".concat(qe,"-customize-input"),on),(0,Zt.Z)(en,"".concat(qe,"-show-search"),ir),en)),Ie=Kt.createElement(He,{ref:or,disabled:xi,prefixCls:qe,visible:To,popupElement:il,animation:mn,transitionName:po,dropdownStyle:vr,dropdownClassName:Si,direction:Vn,dropdownMatchSelectWidth:Dr,dropdownRender:hr,dropdownAlign:ki,placement:Oi,builtinPlacements:bo,getPopupContainer:Oo,empty:qn,getTriggerDOMNode:function(){return Ro.current},onPopupVisibleChange:Oa,onPopupMouseEnter:ga},ds?Kt.cloneElement(ds,{ref:ka}):Kt.createElement(We,(0,mt.Z)({},pe,{domRef:Ro,prefixCls:qe,inputElement:on,ref:Ir,id:Bn,showSearch:ir,autoClearSearchValue:no,mode:ui,activeDescendantId:yi,tagRender:Mn,values:Je,open:Mo,onToggleOpen:ci,activeValue:Oe,searchValue:Ts,onSearch:$r,onSearchSubmit:ws,onRemove:iu,tokenWithEnter:Ur}))),Xe;return ds?Xe=Ie:Xe=Kt.createElement("div",(0,mt.Z)({className:rh},uo,{ref:Nn,onMouseDown:fa,onKeyDown:is,onKeyUp:Ta,onFocus:wo,onBlur:Ru}),Ns&&!Mo&&Kt.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Je.map(function(Ge){var fn=Ge.label,oo=Ge.value;return["number","string"].includes((0,Rt.Z)(fn))?fn:oo}).join(", "))),Ie,ju,vl&&Ks),Kt.createElement(vt.Provider,{value:yu},Xe)}),kt=yt,zt=function(pe,Yt){var Ve=Kt.useRef({values:new Map,options:new Map}),en=Kt.useMemo(function(){var qe=Ve.current,xe=qe.values,an=qe.options,Mn=pe.map(function(Je){if(Je.label===void 0){var hi;return(0,we.Z)((0,we.Z)({},Je),{},{label:(hi=xe.get(Je.value))===null||hi===void 0?void 0:hi.label})}return Je}),Vn=new Map,_e=new Map;return Mn.forEach(function(Je){Vn.set(Je.value,Je),_e.set(Je.value,Yt.get(Je.value)||an.get(Je.value))}),Ve.current.values=Vn,Ve.current.options=_e,Mn},[pe,Yt]),Bn=Kt.useCallback(function(qe){return Yt.get(qe)||Ve.current.options.get(qe)},[Yt]);return[en,Bn]};function Mt(pe,Yt){return Ne(pe).join("").toUpperCase().includes(Yt)}var se=function(pe,Yt,Ve,en,Bn){return Kt.useMemo(function(){if(!Ve||en===!1)return pe;var qe=Yt.options,xe=Yt.label,an=Yt.value,Mn=[],Vn=typeof en=="function",_e=Ve.toUpperCase(),Je=Vn?en:function(qn,vi){return Bn?Mt(vi[Bn],_e):vi[qe]?Mt(vi[xe!=="children"?xe:"label"],_e):Mt(vi[an],_e)},hi=Vn?function(qn){return Be(qn)}:function(qn){return qn};return pe.forEach(function(qn){if(qn[qe]){var vi=Je(Ve,hi(qn));if(vi)Mn.push(qn);else{var Kn=qn[qe].filter(function(oi){return Je(Ve,hi(oi))});Kn.length&&Mn.push((0,we.Z)((0,we.Z)({},qn),{},(0,Zt.Z)({},qe,Kn)))}return}Je(Ve,hi(qn))&&Mn.push(qn)}),Mn},[pe,en,Bn,Ve,Yt])},$e=Pt(17115),cn=Pt(38298),sn=["children","value"],En=["children"];function Gn(pe){var Yt=pe,Ve=Yt.key,en=Yt.props,Bn=en.children,qe=en.value,xe=(0,he.Z)(en,sn);return(0,we.Z)({key:Ve,value:qe!==void 0?qe:Ve,children:Bn},xe)}function zn(pe){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,cn.Z)(pe).map(function(Ve,en){if(!Kt.isValidElement(Ve)||!Ve.type)return null;var Bn=Ve,qe=Bn.type.isSelectOptGroup,xe=Bn.key,an=Bn.props,Mn=an.children,Vn=(0,he.Z)(an,En);return Yt||!qe?Gn(Ve):(0,we.Z)((0,we.Z)({key:"__RC_SELECT_GRP__".concat(xe===null?en:xe,"__"),label:xe},Vn),{},{options:zn(Mn)})}).filter(function(Ve){return Ve})}function Zn(pe,Yt,Ve,en,Bn){return Kt.useMemo(function(){var qe=pe,xe=!pe;xe&&(qe=zn(Yt));var an=new Map,Mn=new Map,Vn=function(hi,qn,vi){vi&&typeof vi=="string"&&hi.set(qn[vi],qn)};function _e(Je){for(var hi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qn=0;qn<Je.length;qn+=1){var vi=Je[qn];!vi[Ve.options]||hi?(an.set(vi[Ve.value],vi),Vn(Mn,vi,Ve.label),Vn(Mn,vi,en),Vn(Mn,vi,Bn)):_e(vi[Ve.options],!0)}}return _e(qe),{options:qe,valueOptions:an,labelOptions:Mn}},[pe,Yt,Ve,en,Bn])}function $n(pe){var Yt=Kt.useRef();Yt.current=pe;var Ve=Kt.useCallback(function(){return Yt.current.apply(Yt,arguments)},[]);return Ve}var ni=function(){return null};ni.isSelectOptGroup=!0;var ei=ni,Bi=function(){return null};Bi.isSelectOption=!0;var Ki=Bi,jn=Pt(79722),Tn=Pt(64002),In=Pt(70318),li=Kt.createContext(null),gi=li;function Yi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Ci=["disabled","title","children","style","className"];function bt(pe){return typeof pe=="string"||typeof pe=="number"}var _i=function(Yt,Ve){var en=Ct(),Bn=en.prefixCls,qe=en.id,xe=en.open,an=en.multiple,Mn=en.mode,Vn=en.searchValue,_e=en.toggleOpen,Je=en.notFoundContent,hi=en.onPopupScroll,qn=Kt.useContext(gi),vi=qn.flattenOptions,Kn=qn.onActiveValue,oi=qn.defaultActiveFirstOption,ui=qn.onSelect,xi=qn.menuItemSelectedIcon,to=qn.rawValues,On=qn.fieldNames,ri=qn.virtual,lo=qn.direction,Ao=qn.listHeight,Ii=qn.listItemHeight,Oe="".concat(Bn,"-item"),Wn=(0,jn.Z)(function(){return vi},[xe,vi],function(ki,Oi){return Oi[0]&&ki[1]!==Oi[1]}),yi=Kt.useRef(null),di=function(Oi){Oi.preventDefault()},no=function(Oi){yi.current&&yi.current.scrollTo(typeof Oi=="number"?{index:Oi}:Oi)},ji=function(Oi){for(var bo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oo=Wn.length,Yn=0;Yn<Oo;Yn+=1){var Wt=(Oi+Yn*bo+Oo)%Oo,Fo=Wn[Wt],br=Fo.group,Fr=Fo.data;if(!br&&!Fr.disabled)return Wt}return-1},fo=Kt.useState(function(){return ji(0)}),Hi=(0,Ht.Z)(fo,2),Ti=Hi[0],Po=Hi[1],pn=function(Oi){var bo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Po(Oi);var Oo={source:bo?"keyboard":"mouse"},Yn=Wn[Oi];if(!Yn){Kn(null,-1,Oo);return}Kn(Yn.value,Oi,Oo)};(0,Kt.useEffect)(function(){pn(oi!==!1?ji(0):-1)},[Wn.length,Vn]);var Vo=Kt.useCallback(function(ki){return to.has(ki)&&Mn!=="combobox"},[Mn,(0,It.Z)(to).toString(),to.size]);(0,Kt.useEffect)(function(){var ki=setTimeout(function(){if(!an&&xe&&to.size===1){var bo=Array.from(to)[0],Oo=Wn.findIndex(function(Yn){var Wt=Yn.data;return Wt.value===bo});Oo!==-1&&(pn(Oo),no(Oo))}});if(xe){var Oi;(Oi=yi.current)===null||Oi===void 0||Oi.scrollTo(void 0)}return function(){return clearTimeout(ki)}},[xe,Vn,vi.length]);var mn=function(Oi){Oi!==void 0&&ui(Oi,{selected:!to.has(Oi)}),an||_e(!1)};if(Kt.useImperativeHandle(Ve,function(){return{onKeyDown:function(Oi){var bo=Oi.which,Oo=Oi.ctrlKey;switch(bo){case nt.Z.N:case nt.Z.P:case nt.Z.UP:case nt.Z.DOWN:{var Yn=0;if(bo===nt.Z.UP?Yn=-1:bo===nt.Z.DOWN?Yn=1:Yi()&&Oo&&(bo===nt.Z.N?Yn=1:bo===nt.Z.P&&(Yn=-1)),Yn!==0){var Wt=ji(Ti+Yn,Yn);no(Wt),pn(Wt,!0)}break}case nt.Z.ENTER:{var Fo=Wn[Ti];Fo&&!Fo.data.disabled?mn(Fo.value):mn(void 0),xe&&Oi.preventDefault();break}case nt.Z.ESC:_e(!1),xe&&Oi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Oi){no(Oi)}}}),Wn.length===0)return Kt.createElement("div",{role:"listbox",id:"".concat(qe,"_list"),className:"".concat(Oe,"-empty"),onMouseDown:di},Je);var po=Object.keys(On).map(function(ki){return On[ki]}),vr=function(Oi){return Oi.label};function Si(ki,Oi){var bo=ki.group;return{role:bo?"presentation":"option",id:"".concat(qe,"_list_").concat(Oi)}}var Dr=function(Oi){var bo=Wn[Oi];if(!bo)return null;var Oo=bo.data||{},Yn=Oo.value,Wt=bo.group,Fo=(0,_t.Z)(Oo,!0),br=vr(bo);return bo?Kt.createElement("div",(0,mt.Z)({"aria-label":typeof br=="string"&&!Wt?br:null},Fo,{key:Oi},Si(bo,Oi),{"aria-selected":Vo(Yn)}),Yn):null},hr={role:"listbox",id:"".concat(qe,"_list")};return Kt.createElement(Kt.Fragment,null,ri&&Kt.createElement("div",(0,mt.Z)({},hr,{style:{height:0,width:0,overflow:"hidden"}}),Dr(Ti-1),Dr(Ti),Dr(Ti+1)),Kt.createElement(In.Z,{itemKey:"key",ref:yi,data:Wn,height:Ao,itemHeight:Ii,fullHeight:!1,onMouseDown:di,onScroll:hi,virtual:ri,direction:lo,innerProps:ri?null:hr},function(ki,Oi){var bo,Oo=ki.group,Yn=ki.groupOption,Wt=ki.data,Fo=ki.label,br=ki.value,Fr=Wt.key;if(Oo){var qr,eo=(qr=Wt.title)!==null&&qr!==void 0?qr:bt(Fo)?Fo.toString():void 0;return Kt.createElement("div",{className:de()(Oe,"".concat(Oe,"-group")),title:eo},Fo!==void 0?Fo:Fr)}var $i=Wt.disabled,Do=Wt.title,ir=Wt.children,uo=Wt.style,yr=Wt.className,Vi=(0,he.Z)(Wt,Ci),Ni=(0,Tn.Z)(Vi,po),Ji=Vo(br),Nn="".concat(Oe,"-option"),Ro=de()(Oe,Nn,yr,(bo={},(0,Zt.Z)(bo,"".concat(Nn,"-grouped"),Yn),(0,Zt.Z)(bo,"".concat(Nn,"-active"),Ti===Oi&&!$i),(0,Zt.Z)(bo,"".concat(Nn,"-disabled"),$i),(0,Zt.Z)(bo,"".concat(Nn,"-selected"),Ji),bo)),or=vr(ki),Ir=!xi||typeof xi=="function"||Ji,pr=typeof or=="number"?or:or||br,Br=bt(pr)?pr.toString():void 0;return Do!==void 0&&(Br=Do),Kt.createElement("div",(0,mt.Z)({},(0,_t.Z)(Ni),ri?{}:Si(ki,Oi),{"aria-selected":Ji,className:Ro,title:Br,onMouseMove:function(){Ti===Oi||$i||pn(Oi)},onClick:function(){$i||mn(br)},style:uo}),Kt.createElement("div",{className:"".concat(Nn,"-content")},pr),Kt.isValidElement(xi)||Ji,Ir&&Kt.createElement(at,{className:"".concat(Oe,"-option-state"),customizeIcon:xi,customizeIconProps:{isSelected:Ji}},Ji?"\u2713":null))}))},Fi=Kt.forwardRef(_i);Fi.displayName="OptionList";var co=Fi;function xo(pe){var Yt=pe.mode,Ve=pe.options,en=pe.children,Bn=pe.backfill,qe=pe.allowClear,xe=pe.placeholder,an=pe.getInputElement,Mn=pe.showSearch,Vn=pe.onSearch,_e=pe.defaultOpen,Je=pe.autoFocus,hi=pe.labelInValue,qn=pe.value,vi=pe.inputValue,Kn=pe.optionLabelProp,oi=isMultiple(Yt),ui=Mn!==void 0?Mn:oi||Yt==="combobox",xi=Ve||convertChildrenToData(en);if(warning(Yt!=="tags"||xi.every(function(lo){return!lo.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Yt==="tags"||Yt==="combobox"){var to=xi.some(function(lo){return lo.options?lo.options.some(function(Ao){return typeof("value"in Ao?Ao.value:Ao.key)=="number"}):typeof("value"in lo?lo.value:lo.key)=="number"});warning(!to,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Yt!=="combobox"||!Kn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Yt==="combobox"||!Bn,"`backfill` only works with `combobox` mode."),warning(Yt==="combobox"||!an,"`getInputElement` only work with `combobox` mode."),noteOnce(Yt!=="combobox"||!an||!qe||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Vn&&!ui&&Yt!=="combobox"&&Yt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!_e||Je,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),qn!=null){var On=toArray(qn);warning(!hi||On.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(!oi||Array.isArray(qn),"`value` should be array when `mode` is `multiple` or `tags`")}if(en){var ri=null;toNodeArray(en).some(function(lo){if(!React.isValidElement(lo)||!lo.type)return!1;var Ao=lo,Ii=Ao.type;if(Ii.isSelectOption)return!1;if(Ii.isSelectOptGroup){var Oe=toNodeArray(lo.props.children).every(function(Wn){return!React.isValidElement(Wn)||!lo.type||Wn.type.isSelectOption?!0:(ri=Wn.type,!1)});return!Oe}return ri=Ii,!0}),ri&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ri.displayName||ri.name||ri,"`.")),warning(vi===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Go(pe,Yt){if(pe){var Ve=function en(Bn){for(var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=0;xe<Bn.length;xe++){var an=Bn[xe];if(an[Yt==null?void 0:Yt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!qe&&Array.isArray(an[Yt==null?void 0:Yt.options])&&en(an[Yt==null?void 0:Yt.options],!0))break}};Ve(pe)}}var io=null,ii=["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"],ke=["inputValue"];function Te(pe){return!pe||(0,Rt.Z)(pe)!=="object"}var Le=Kt.forwardRef(function(pe,Yt){var Ve=pe.id,en=pe.mode,Bn=pe.prefixCls,qe=Bn===void 0?"rc-select":Bn,xe=pe.backfill,an=pe.fieldNames,Mn=pe.inputValue,Vn=pe.searchValue,_e=pe.onSearch,Je=pe.autoClearSearchValue,hi=Je===void 0?!0:Je,qn=pe.onSelect,vi=pe.onDeselect,Kn=pe.dropdownMatchSelectWidth,oi=Kn===void 0?!0:Kn,ui=pe.filterOption,xi=pe.filterSort,to=pe.optionFilterProp,On=pe.optionLabelProp,ri=pe.options,lo=pe.children,Ao=pe.defaultActiveFirstOption,Ii=pe.menuItemSelectedIcon,Oe=pe.virtual,Wn=pe.direction,yi=pe.listHeight,di=yi===void 0?200:yi,no=pe.listItemHeight,ji=no===void 0?20:no,fo=pe.value,Hi=pe.defaultValue,Ti=pe.labelInValue,Po=pe.onChange,pn=(0,he.Z)(pe,ii),Vo=(0,$e.ZP)(Ve),mn=xt(en),po=!!(!ri&&lo),vr=Kt.useMemo(function(){return ui===void 0&&en==="combobox"?!1:ui},[ui,en]),Si=Kt.useMemo(function(){return ye(an,po)},[JSON.stringify(an),po]),Dr=(0,be.Z)("",{value:Vn!==void 0?Vn:Mn,postState:function(Ko){return Ko||""}}),hr=(0,Ht.Z)(Dr,2),ki=hr[0],Oi=hr[1],bo=Zn(ri,lo,Si,to,On),Oo=bo.valueOptions,Yn=bo.labelOptions,Wt=bo.options,Fo=Kt.useCallback(function(Mo){var Ko=Ne(Mo);return Ko.map(function(To){var ci,Ur,$r,ws,Aa;if(Te(To))ci=To;else{var nl;$r=To.key,Ur=To.label,ci=(nl=To.value)!==null&&nl!==void 0?nl:$r}var Qn=Oo.get(ci);if(Qn){var kr;if(Ur===void 0&&(Ur=Qn==null?void 0:Qn[On||Si.label]),$r===void 0&&($r=(kr=Qn==null?void 0:Qn.key)!==null&&kr!==void 0?kr:ci),ws=Qn==null?void 0:Qn.disabled,Aa=Qn==null?void 0:Qn.title,0)var is}return{label:Ur,value:ci,key:$r,disabled:ws,title:Aa}})},[Si,On,Oo]),br=(0,be.Z)(Hi,{value:fo}),Fr=(0,Ht.Z)(br,2),qr=Fr[0],eo=Fr[1],$i=Kt.useMemo(function(){var Mo,Ko=Fo(qr);return en==="combobox"&&Ze((Mo=Ko[0])===null||Mo===void 0?void 0:Mo.value)?[]:Ko},[qr,Fo,en]),Do=zt($i,Oo),ir=(0,Ht.Z)(Do,2),uo=ir[0],yr=ir[1],Vi=Kt.useMemo(function(){if(!en&&uo.length===1){var Mo=uo[0];if(Mo.value===null&&(Mo.label===null||Mo.label===void 0))return[]}return uo.map(function(Ko){var To;return(0,we.Z)((0,we.Z)({},Ko),{},{label:(To=Ko.label)!==null&&To!==void 0?To:Ko.value})})},[en,uo]),Ni=Kt.useMemo(function(){return new Set(uo.map(function(Mo){return Mo.value}))},[uo]);Kt.useEffect(function(){if(en==="combobox"){var Mo,Ko=(Mo=uo[0])===null||Mo===void 0?void 0:Mo.value;Oi(Ue(Ko)?String(Ko):"")}},[uo]);var Ji=$n(function(Mo,Ko){var To,ci=Ko!=null?Ko:Mo;return To={},(0,Zt.Z)(To,Si.value,Mo),(0,Zt.Z)(To,Si.label,ci),To}),Nn=Kt.useMemo(function(){if(en!=="tags")return Wt;var Mo=(0,It.Z)(Wt),Ko=function(ci){return Oo.has(ci)};return(0,It.Z)(uo).sort(function(To,ci){return To.value<ci.value?-1:1}).forEach(function(To){var ci=To.value;Ko(ci)||Mo.push(Ji(ci,To.label))}),Mo},[Ji,Wt,Oo,uo,en]),Ro=se(Nn,Si,ki,vr,to),or=Kt.useMemo(function(){return en!=="tags"||!ki||Ro.some(function(Mo){return Mo[to||"value"]===ki})||Ro.some(function(Mo){return Mo[Si.value]===ki})?Ro:[Ji(ki)].concat((0,It.Z)(Ro))},[Ji,to,en,Ro,ki,Si]),Ir=Kt.useMemo(function(){return xi?(0,It.Z)(or).sort(function(Mo,Ko){return xi(Mo,Ko)}):or},[or,xi]),pr=Kt.useMemo(function(){return Re(Ir,{fieldNames:Si,childrenAsData:po})},[Ir,Si,po]),Br=function(Ko){var To=Fo(Ko);if(eo(To),Po&&(To.length!==uo.length||To.some(function($r,ws){var Aa;return((Aa=uo[ws])===null||Aa===void 0?void 0:Aa.value)!==($r==null?void 0:$r.value)}))){var ci=Ti?To:To.map(function($r){return $r.value}),Ur=To.map(function($r){return Be(yr($r.value))});Po(mn?ci:ci[0],mn?Ur:Ur[0])}},ts=Kt.useState(null),Ns=(0,Ht.Z)(ts,2),ks=Ns[0],ca=Ns[1],Ts=Kt.useState(0),on=(0,Ht.Z)(Ts,2),ds=on[0],ka=on[1],el=Ao!==void 0?Ao:en!=="combobox",cs=Kt.useCallback(function(Mo,Ko){var To=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ci=To.source,Ur=ci===void 0?"keyboard":ci;ka(Ko),xe&&en==="combobox"&&Mo!==null&&Ur==="keyboard"&&ca(String(Mo))},[xe,en]),Za=function(Ko,To,ci){var Ur=function(){var Va,wo=yr(Ko);return[Ti?{label:wo==null?void 0:wo[Si.label],value:Ko,key:(Va=wo==null?void 0:wo.key)!==null&&Va!==void 0?Va:Ko}:Ko,Be(wo)]};if(To&&qn){var $r=Ur(),ws=(0,Ht.Z)($r,2),Aa=ws[0],nl=ws[1];qn(Aa,nl)}else if(!To&&vi&&ci!=="clear"){var Qn=Ur(),kr=(0,Ht.Z)(Qn,2),is=kr[0],Ta=kr[1];vi(is,Ta)}},nu=$n(function(Mo,Ko){var To,ci=mn?Ko.selected:!0;ci?To=mn?[].concat((0,It.Z)(uo),[Mo]):[Mo]:To=uo.filter(function(Ur){return Ur.value!==Mo}),Br(To),Za(Mo,ci),en==="combobox"?ca(""):(!xt||hi)&&(Oi(""),ca(""))}),Zl=function(Ko,To){Br(Ko);var ci=To.type,Ur=To.values;(ci==="remove"||ci==="clear")&&Ur.forEach(function($r){Za($r.value,!1,ci)})},Mr=function(Ko,To){if(Oi(Ko),ca(null),To.source==="submit"){var ci=(Ko||"").trim();if(ci){var Ur=Array.from(new Set([].concat((0,It.Z)(Ni),[ci])));Br(Ur),Za(ci,!0),Oi("")}return}To.source!=="blur"&&(en==="combobox"&&Br(Ko),_e==null||_e(Ko))},_o=function(Ko){var To=Ko;en!=="tags"&&(To=Ko.map(function(Ur){var $r=Yn.get(Ur);return $r==null?void 0:$r.value}).filter(function(Ur){return Ur!==void 0}));var ci=Array.from(new Set([].concat((0,It.Z)(Ni),(0,It.Z)(To))));Br(ci),ci.forEach(function(Ur){Za(Ur,!0)})},_s=Kt.useMemo(function(){var Mo=Oe!==!1&&oi!==!1;return(0,we.Z)((0,we.Z)({},bo),{},{flattenOptions:pr,onActiveValue:cs,defaultActiveFirstOption:el,onSelect:nu,menuItemSelectedIcon:Ii,rawValues:Ni,fieldNames:Si,virtual:Mo,direction:Wn,listHeight:di,listItemHeight:ji,childrenAsData:po})},[bo,pr,cs,el,nu,Ii,Ni,Si,Oe,oi,di,ji,po]);return Kt.createElement(gi.Provider,{value:_s},Kt.createElement(kt,(0,mt.Z)({},pn,{id:Vo,prefixCls:qe,ref:Yt,omitDomProps:ke,mode:en,displayValues:Vi,onDisplayValuesChange:Zl,direction:Wn,searchValue:ki,onSearch:Mr,autoClearSearchValue:hi,onSearchSplit:_o,dropdownMatchSelectWidth:oi,OptionList:co,emptyOptions:!pr.length,activeValue:ks,activeDescendantId:"".concat(Vo,"_list_").concat(ds)})))}),re=Le;re.Option=Ki,re.OptGroup=ei;var nn=re,Qe=nn},9296:function(xn,vn,Pt){"use strict";Pt.r(vn),Pt.d(vn,{ResizableTextArea:function(){return Me},default:function(){return Ze}});var mt=Pt(5891),It=Pt(57259),Zt=Pt(80962),we=Pt(80665),Ht=Pt(29043),he=Pt(19149),Rt=Pt(26390),be=Pt(92310),ge=Pt.n(be),Kt=Pt(93681),ue=Pt(5643),de=Pt(35788),ve=Pt(59301),At=Pt(29301),nt=Pt(28800),et=Pt(23073),ht=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,at=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ft={},vt;function Ct(tn){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ie=tn.getAttribute("id")||tn.getAttribute("data-reactid")||tn.getAttribute("name");if(ln&&ft[ie])return ft[ie];var Gt=window.getComputedStyle(tn),Ae=Gt.getPropertyValue("box-sizing")||Gt.getPropertyValue("-moz-box-sizing")||Gt.getPropertyValue("-webkit-box-sizing"),Sn=parseFloat(Gt.getPropertyValue("padding-bottom"))+parseFloat(Gt.getPropertyValue("padding-top")),gn=parseFloat(Gt.getPropertyValue("border-bottom-width"))+parseFloat(Gt.getPropertyValue("border-top-width")),Fe=at.map(function(rn){return"".concat(rn,":").concat(Gt.getPropertyValue(rn))}).join(";"),Ke={sizingStyle:Fe,paddingSize:Sn,borderSize:gn,boxSizing:Ae};return ln&&ie&&(ft[ie]=Ke),Ke}function Bt(tn){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Gt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;vt||(vt=document.createElement("textarea"),vt.setAttribute("tab-index","-1"),vt.setAttribute("aria-hidden","true"),document.body.appendChild(vt)),tn.getAttribute("wrap")?vt.setAttribute("wrap",tn.getAttribute("wrap")):vt.removeAttribute("wrap");var Ae=Ct(tn,ln),Sn=Ae.paddingSize,gn=Ae.borderSize,Fe=Ae.boxSizing,Ke=Ae.sizingStyle;vt.setAttribute("style","".concat(Ke,";").concat(ht)),vt.value=tn.value||tn.placeholder||"";var rn=void 0,Fn=void 0,Pn,We=vt.scrollHeight;if(Fe==="border-box"?We+=gn:Fe==="content-box"&&(We-=Sn),ie!==null||Gt!==null){vt.value=" ";var fe=vt.scrollHeight-Sn;ie!==null&&(rn=fe*ie,Fe==="border-box"&&(rn=rn+Sn+gn),We=Math.max(rn,We)),Gt!==null&&(Fn=fe*Gt,Fe==="border-box"&&(Fn=Fn+Sn+gn),Pn=We>Fn?"":"hidden",We=Math.min(Fn,We))}var An={height:We,overflowY:Pn,resize:"none"};return rn&&(An.minHeight=rn),Fn&&(An.maxHeight=Fn),An}var Ft=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ot=0,_t=1,te=2,Xt=ve.forwardRef(function(tn,ln){var ie=tn,Gt=ie.prefixCls,Ae=ie.onPressEnter,Sn=ie.defaultValue,gn=ie.value,Fe=ie.autoSize,Ke=ie.onResize,rn=ie.className,Fn=ie.style,Pn=ie.disabled,We=ie.onChange,fe=ie.onInternalAutoSize,An=(0,he.Z)(ie,Ft),Hn=(0,de.Z)(Sn,{value:gn,postState:function(ei){return ei!=null?ei:""}}),un=(0,Ht.Z)(Hn,2),De=un[0],He=un[1],Ee=function(ei){He(ei.target.value),We==null||We(ei)},Jt=ve.useRef();ve.useImperativeHandle(ln,function(){return{textArea:Jt.current}});var ye=ve.useMemo(function(){return Fe&&(0,we.Z)(Fe)==="object"?[Fe.minRows,Fe.maxRows]:[]},[Fe]),Re=(0,Ht.Z)(ye,2),Be=Re[0],Qt=Re[1],ce=!!Fe,Tt=function(){try{if(document.activeElement===Jt.current){var ei=Jt.current,Bi=ei.selectionStart,Ki=ei.selectionEnd,jn=ei.scrollTop;Jt.current.setSelectionRange(Bi,Ki),Jt.current.scrollTop=jn}}catch(Tn){}},xt=ve.useState(te),yt=(0,Ht.Z)(xt,2),kt=yt[0],zt=yt[1],Mt=ve.useState(),se=(0,Ht.Z)(Mt,2),$e=se[0],cn=se[1],sn=function(){zt(Ot)};(0,nt.Z)(function(){ce&&sn()},[gn,Be,Qt,ce]),(0,nt.Z)(function(){if(kt===Ot)zt(_t);else if(kt===_t){var ni=Bt(Jt.current,!1,Be,Qt);zt(te),cn(ni)}else Tt()},[kt]);var En=ve.useRef(),Gn=function(){et.Z.cancel(En.current)},zn=function(ei){kt===te&&(Ke==null||Ke(ei),Fe&&(Gn(),En.current=(0,et.Z)(function(){sn()})))};ve.useEffect(function(){return Gn},[]);var Zn=ce?$e:null,$n=(0,It.Z)((0,It.Z)({},Fn),Zn);return(kt===Ot||kt===_t)&&($n.overflowY="hidden",$n.overflowX="hidden"),ve.createElement(At.Z,{onResize:zn,disabled:!(Fe||Ke)},ve.createElement("textarea",(0,mt.Z)({},An,{ref:Jt,style:$n,className:ge()(Gt,rn,(0,Zt.Z)({},"".concat(Gt,"-disabled"),Pn)),disabled:Pn,value:De,onChange:Ee})))}),Me=Xt,qt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ne(tn,ln){return(0,Rt.Z)(tn||"").slice(0,ln).join("")}function ne(tn,ln,ie,Gt){var Ae=ie;return tn?Ae=Ne(ie,Gt):(0,Rt.Z)(ln||"").length<ie.length&&(0,Rt.Z)(ie||"").length>Gt&&(Ae=ln),Ae}var Ce=ve.forwardRef(function(tn,ln){var ie,Gt=tn.defaultValue,Ae=tn.value,Sn=tn.onFocus,gn=tn.onBlur,Fe=tn.onChange,Ke=tn.allowClear,rn=tn.maxLength,Fn=tn.onCompositionStart,Pn=tn.onCompositionEnd,We=tn.suffix,fe=tn.prefixCls,An=fe===void 0?"rc-textarea":fe,Hn=tn.classes,un=tn.showCount,De=tn.className,He=tn.style,Ee=tn.disabled,Jt=tn.hidden,ye=tn.classNames,Re=tn.styles,Be=tn.onResize,Qt=(0,he.Z)(tn,qt),ce=(0,de.Z)(Gt,{value:Ae,defaultValue:Gt}),Tt=(0,Ht.Z)(ce,2),xt=Tt[0],yt=Tt[1],kt=(0,ve.useRef)(null),zt=ve.useState(!1),Mt=(0,Ht.Z)(zt,2),se=Mt[0],$e=Mt[1],cn=ve.useState(!1),sn=(0,Ht.Z)(cn,2),En=sn[0],Gn=sn[1],zn=ve.useRef(),Zn=ve.useRef(0),$n=ve.useState(null),ni=(0,Ht.Z)($n,2),ei=ni[0],Bi=ni[1],Ki=function(){var Te;(Te=kt.current)===null||Te===void 0||Te.textArea.focus()};(0,ve.useImperativeHandle)(ln,function(){return{resizableTextArea:kt.current,focus:Ki,blur:function(){var Te;(Te=kt.current)===null||Te===void 0||Te.textArea.blur()}}}),(0,ve.useEffect)(function(){$e(function(ke){return!Ee&&ke})},[Ee]);var jn=Number(rn)>0,Tn=function(Te){Gn(!0),zn.current=xt,Zn.current=Te.currentTarget.selectionStart,Fn==null||Fn(Te)},In=function(Te){Gn(!1);var Le=Te.currentTarget.value;if(jn){var re,nn=Zn.current>=rn+1||Zn.current===((re=zn.current)===null||re===void 0?void 0:re.length);Le=ne(nn,zn.current,Le,rn)}Le!==xt&&(yt(Le),(0,ue.rJ)(Te.currentTarget,Te,Fe,Le)),Pn==null||Pn(Te)},li=function(Te){var Le=Te.target.value;if(!En&&jn){var re=Te.target.selectionStart>=rn+1||Te.target.selectionStart===Le.length||!Te.target.selectionStart;Le=ne(re,xt,Le,rn)}yt(Le),(0,ue.rJ)(Te.currentTarget,Te,Fe,Le)},gi=function(Te){var Le=Qt.onPressEnter,re=Qt.onKeyDown;Te.key==="Enter"&&Le&&Le(Te),re==null||re(Te)},Yi=function(Te){$e(!0),Sn==null||Sn(Te)},Ci=function(Te){$e(!1),gn==null||gn(Te)},bt=function(Te){var Le;yt(""),Ki(),(0,ue.rJ)((Le=kt.current)===null||Le===void 0?void 0:Le.textArea,Te,Fe)},_i=(0,ue.D7)(xt);!En&&jn&&Ae==null&&(_i=Ne(_i,rn));var Fi=We,co;if(un){var xo=(0,Rt.Z)(_i).length;(0,we.Z)(un)==="object"?co=un.formatter({value:_i,count:xo,maxLength:rn}):co="".concat(xo).concat(jn?" / ".concat(rn):""),Fi=ve.createElement(ve.Fragment,null,Fi,ve.createElement("span",{className:ge()("".concat(An,"-data-count"),ye==null?void 0:ye.count),style:Re==null?void 0:Re.count},co))}var Go=function(Te){var Le;Be==null||Be(Te),(Le=kt.current)!==null&&Le!==void 0&&Le.textArea.style.height&&Bi(!0)},io=!Qt.autoSize&&!un&&!Ke,ii=ve.createElement(Kt.BaseInput,{value:_i,allowClear:Ke,handleReset:bt,suffix:Fi,prefixCls:An,classes:{affixWrapper:ge()(Hn==null?void 0:Hn.affixWrapper,(ie={},(0,Zt.Z)(ie,"".concat(An,"-show-count"),un),(0,Zt.Z)(ie,"".concat(An,"-textarea-allow-clear"),Ke),ie))},disabled:Ee,focused:se,className:De,style:(0,It.Z)((0,It.Z)({},He),ei&&!io?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof co=="string"?co:void 0}},hidden:Jt,inputElement:ve.createElement(Me,(0,mt.Z)({},Qt,{onKeyDown:gi,onChange:li,onFocus:Yi,onBlur:Ci,onCompositionStart:Tn,onCompositionEnd:In,className:ye==null?void 0:ye.textarea,style:(0,It.Z)((0,It.Z)({},Re==null?void 0:Re.textarea),{},{resize:He==null?void 0:He.resize}),disabled:Ee,prefixCls:An,onResize:Go,ref:kt}))});return ii}),Ue=Ce,Ze=Ue},70318:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return un}});var mt=Pt(5891),It=Pt(80665),Zt=Pt(57259),we=Pt(80962),Ht=Pt(29043),he=Pt(19149),Rt=Pt(92310),be=Pt.n(Rt),ge=Pt(29301),Kt=Pt(80764),ue=Pt(28800),de=Pt(59301),ve=Pt(4676),At=de.forwardRef(function(De,He){var Ee=De.height,Jt=De.offsetY,ye=De.offsetX,Re=De.children,Be=De.prefixCls,Qt=De.onInnerResize,ce=De.innerProps,Tt=De.rtl,xt=De.extra,yt={},kt={display:"flex",flexDirection:"column"};return Jt!==void 0&&(yt={height:Ee,position:"relative",overflow:"hidden"},kt=(0,Zt.Z)((0,Zt.Z)({},kt),{},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)({transform:"translateY(".concat(Jt,"px)")},Tt?"marginRight":"marginLeft",-ye),"position","absolute"),"left",0),"right",0),"top",0))),de.createElement("div",{style:yt},de.createElement(ge.Z,{onResize:function(Mt){var se=Mt.offsetHeight;se&&Qt&&Qt()}},de.createElement("div",(0,mt.Z)({style:kt,className:be()((0,we.Z)({},"".concat(Be,"-holder-inner"),Be)),ref:He},ce),Re,xt)))});At.displayName="Filler";var nt=At;function et(De){var He=De.children,Ee=De.setRef,Jt=de.useCallback(function(ye){Ee(ye)},[]);return de.cloneElement(He,{ref:Jt})}function ht(De,He,Ee,Jt,ye,Re,Be,Qt){var ce=Qt.getKey;return De.slice(He,Ee+1).map(function(Tt,xt){var yt=He+xt,kt=Be(Tt,yt,{style:{width:Jt},offsetX:ye}),zt=ce(Tt);return de.createElement(et,{key:zt,setRef:function(se){return Re(Tt,se)}},kt)})}function at(De,He,Ee,Jt){var ye=Ee-De,Re=He-Ee,Be=Math.min(ye,Re)*2;if(Jt<=Be){var Qt=Math.floor(Jt/2);return Jt%2?Ee+Qt+1:Ee-Qt}return ye>Re?Ee-(Jt-Re):Ee+(Jt-ye)}function ft(De,He,Ee){var Jt=De.length,ye=He.length,Re,Be;if(Jt===0&&ye===0)return null;Jt<ye?(Re=De,Be=He):(Re=He,Be=De);var Qt={__EMPTY_ITEM__:!0};function ce(Mt){return Mt!==void 0?Ee(Mt):Qt}for(var Tt=null,xt=Math.abs(Jt-ye)!==1,yt=0;yt<Be.length;yt+=1){var kt=ce(Re[yt]),zt=ce(Be[yt]);if(kt!==zt){Tt=yt,xt=xt||kt!==ce(Be[yt+1]);break}}return Tt===null?null:{index:Tt,multiple:xt}}function vt(De,He,Ee){var Jt=de.useState(De),ye=(0,Ht.Z)(Jt,2),Re=ye[0],Be=ye[1],Qt=de.useState(null),ce=(0,Ht.Z)(Qt,2),Tt=ce[0],xt=ce[1];return de.useEffect(function(){var yt=ft(Re||[],De||[],He);(yt==null?void 0:yt.index)!==void 0&&(Ee==null||Ee(yt.index),xt(De[yt.index])),Be(De)},[De]),[Tt]}var Ct=Pt(23073),Bt=(typeof navigator=="undefined"?"undefined":(0,It.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ft=Bt,Ot=function(De,He,Ee,Jt){var ye=(0,de.useRef)(!1),Re=(0,de.useRef)(null);function Be(){clearTimeout(Re.current),ye.current=!0,Re.current=setTimeout(function(){ye.current=!1},50)}var Qt=(0,de.useRef)({top:De,bottom:He,left:Ee,right:Jt});return Qt.current.top=De,Qt.current.bottom=He,Qt.current.left=Ee,Qt.current.right=Jt,function(ce,Tt){var xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,yt=ce?Tt<0&&Qt.current.left||Tt>0&&Qt.current.right:Tt<0&&Qt.current.top||Tt>0&&Qt.current.bottom;return xt&&yt?(clearTimeout(Re.current),ye.current=!1):(!yt||ye.current)&&Be(),!ye.current&&yt}};function _t(De,He,Ee,Jt,ye,Re,Be){var Qt=(0,de.useRef)(0),ce=(0,de.useRef)(null),Tt=(0,de.useRef)(null),xt=(0,de.useRef)(!1),yt=Ot(He,Ee,Jt,ye);function kt(sn,En){if(Ct.Z.cancel(ce.current),!yt(!1,En)){var Gn=sn;if(!Gn._virtualHandled)Gn._virtualHandled=!0;else return;Qt.current+=En,Tt.current=En,Ft||Gn.preventDefault(),ce.current=(0,Ct.Z)(function(){var zn=xt.current?10:1;Be(Qt.current*zn,!1),Qt.current=0})}}function zt(sn,En){Be(En,!0),Ft||sn.preventDefault()}var Mt=(0,de.useRef)(null),se=(0,de.useRef)(null);function $e(sn){if(De){Ct.Z.cancel(se.current),se.current=(0,Ct.Z)(function(){Mt.current=null},2);var En=sn.deltaX,Gn=sn.deltaY,zn=sn.shiftKey,Zn=En,$n=Gn;(Mt.current==="sx"||!Mt.current&&zn&&Gn&&!En)&&(Zn=Gn,$n=0,Mt.current="sx");var ni=Math.abs(Zn),ei=Math.abs($n);Mt.current===null&&(Mt.current=Re&&ni>ei?"x":"y"),Mt.current==="y"?kt(sn,$n):zt(sn,Zn)}}function cn(sn){De&&(xt.current=sn.detail===Tt.current)}return[$e,cn]}function te(De,He,Ee,Jt){var ye=de.useMemo(function(){return[new Map,[]]},[De,Ee.id,Jt]),Re=(0,Ht.Z)(ye,2),Be=Re[0],Qt=Re[1],ce=function(xt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xt,kt=Be.get(xt),zt=Be.get(yt);if(kt===void 0||zt===void 0)for(var Mt=De.length,se=Qt.length;se<Mt;se+=1){var $e,cn=De[se],sn=He(cn);Be.set(sn,se);var En=($e=Ee.get(sn))!==null&&$e!==void 0?$e:Jt;if(Qt[se]=(Qt[se-1]||0)+En,sn===xt&&(kt=se),sn===yt&&(zt=se),kt!==void 0&&zt!==void 0)break}return{top:Qt[kt-1]||0,bottom:Qt[zt]}};return ce}var Xt=Pt(85899),Me=Pt(79545),qt=Pt(68550),Ne=function(){function De(){(0,Me.Z)(this,De),(0,we.Z)(this,"maps",void 0),(0,we.Z)(this,"id",0),(0,we.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,qt.Z)(De,[{key:"set",value:function(Ee,Jt){this.maps[Ee]=Jt,this.id+=1,this.diffKeys.add(Ee)}},{key:"get",value:function(Ee){return this.maps[Ee]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),De}(),ne=Ne;function Ce(De){var He=parseFloat(De);return isNaN(He)?0:He}function Ue(De,He,Ee){var Jt=de.useState(0),ye=(0,Ht.Z)(Jt,2),Re=ye[0],Be=ye[1],Qt=(0,de.useRef)(new Map),ce=(0,de.useRef)(new ne),Tt=(0,de.useRef)(0);function xt(){Tt.current+=1}function yt(){var zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;xt();var Mt=function(){Qt.current.forEach(function(cn,sn){if(cn&&cn.offsetParent){var En=(0,Xt.ZP)(cn),Gn=En.offsetHeight,zn=getComputedStyle(En),Zn=zn.marginTop,$n=zn.marginBottom,ni=Ce(Zn),ei=Ce($n),Bi=Gn+ni+ei;ce.current.get(sn)!==Bi&&ce.current.set(sn,Bi)}}),Be(function(cn){return cn+1})};if(zt)Mt();else{Tt.current+=1;var se=Tt.current;Promise.resolve().then(function(){se===Tt.current&&Mt()})}}function kt(zt,Mt){var se=De(zt),$e=Qt.current.get(se);Mt?(Qt.current.set(se,Mt),yt()):Qt.current.delete(se),!$e!=!Mt&&(Mt?He==null||He(zt):Ee==null||Ee(zt))}return(0,de.useEffect)(function(){return xt},[]),[kt,yt,ce.current,Re]}var Ze=14/15;function tn(De,He,Ee){var Jt=(0,de.useRef)(!1),ye=(0,de.useRef)(0),Re=(0,de.useRef)(0),Be=(0,de.useRef)(null),Qt=(0,de.useRef)(null),ce,Tt=function(zt){if(Jt.current){var Mt=Math.ceil(zt.touches[0].pageX),se=Math.ceil(zt.touches[0].pageY),$e=ye.current-Mt,cn=Re.current-se,sn=Math.abs($e)>Math.abs(cn);sn?ye.current=Mt:Re.current=se;var En=Ee(sn,sn?$e:cn,!1,zt);En&&zt.preventDefault(),clearInterval(Qt.current),En&&(Qt.current=setInterval(function(){sn?$e*=Ze:cn*=Ze;var Gn=Math.floor(sn?$e:cn);(!Ee(sn,Gn,!0)||Math.abs(Gn)<=.1)&&clearInterval(Qt.current)},16))}},xt=function(){Jt.current=!1,ce()},yt=function(zt){ce(),zt.touches.length===1&&!Jt.current&&(Jt.current=!0,ye.current=Math.ceil(zt.touches[0].pageX),Re.current=Math.ceil(zt.touches[0].pageY),Be.current=zt.target,Be.current.addEventListener("touchmove",Tt,{passive:!1}),Be.current.addEventListener("touchend",xt,{passive:!0}))};ce=function(){Be.current&&(Be.current.removeEventListener("touchmove",Tt),Be.current.removeEventListener("touchend",xt))},(0,ue.Z)(function(){return De&&He.current.addEventListener("touchstart",yt,{passive:!0}),function(){var kt;(kt=He.current)===null||kt===void 0||kt.removeEventListener("touchstart",yt),ce(),clearInterval(Qt.current)}},[De])}function ln(De){return Math.floor(Math.pow(De,.5))}function ie(De,He){var Ee="touches"in De?De.touches[0]:De;return Ee[He?"pageX":"pageY"]-window[He?"scrollX":"scrollY"]}function Gt(De,He,Ee){de.useEffect(function(){var Jt=He.current;if(De&&Jt){var ye=!1,Re,Be,Qt=function(){Ct.Z.cancel(Re)},ce=function kt(){Qt(),Re=(0,Ct.Z)(function(){Ee(Be),kt()})},Tt=function(zt){var Mt=zt;Mt._virtualHandled||(Mt._virtualHandled=!0,ye=!0)},xt=function(){ye=!1,Qt()},yt=function(zt){if(ye){var Mt=ie(zt,!1),se=Jt.getBoundingClientRect(),$e=se.top,cn=se.bottom;if(Mt<=$e){var sn=$e-Mt;Be=-ln(sn),ce()}else if(Mt>=cn){var En=Mt-cn;Be=ln(En),ce()}else Qt()}};return Jt.addEventListener("mousedown",Tt),Jt.ownerDocument.addEventListener("mouseup",xt),Jt.ownerDocument.addEventListener("mousemove",yt),function(){Jt.removeEventListener("mousedown",Tt),Jt.ownerDocument.removeEventListener("mouseup",xt),Jt.ownerDocument.removeEventListener("mousemove",yt),Qt()}}},[De])}var Ae=10;function Sn(De,He,Ee,Jt,ye,Re,Be,Qt){var ce=de.useRef(),Tt=de.useState(null),xt=(0,Ht.Z)(Tt,2),yt=xt[0],kt=xt[1];return(0,ue.Z)(function(){if(yt&&yt.times<Ae){if(!De.current){kt(function(bt){return(0,Zt.Z)({},bt)});return}Re();var zt=yt.targetAlign,Mt=yt.originAlign,se=yt.index,$e=yt.offset,cn=De.current.clientHeight,sn=!1,En=zt,Gn=null;if(cn){for(var zn=zt||Mt,Zn=0,$n=0,ni=0,ei=Math.min(He.length-1,se),Bi=0;Bi<=ei;Bi+=1){var Ki=ye(He[Bi]);$n=Zn;var jn=Ee.get(Ki);ni=$n+(jn===void 0?Jt:jn),Zn=ni}for(var Tn=zn==="top"?$e:cn-$e,In=ei;In>=0;In-=1){var li=ye(He[In]),gi=Ee.get(li);if(gi===void 0){sn=!0;break}if(Tn-=gi,Tn<=0)break}switch(zn){case"top":Gn=$n-$e;break;case"bottom":Gn=ni-cn+$e;break;default:{var Yi=De.current.scrollTop,Ci=Yi+cn;$n<Yi?En="top":ni>Ci&&(En="bottom")}}Gn!==null&&Be(Gn),Gn!==yt.lastTop&&(sn=!0)}sn&&kt((0,Zt.Z)((0,Zt.Z)({},yt),{},{times:yt.times+1,targetAlign:En,lastTop:Gn}))}},[yt,De.current]),function(zt){if(zt==null){Qt();return}if(Ct.Z.cancel(ce.current),typeof zt=="number")Be(zt);else if(zt&&(0,It.Z)(zt)==="object"){var Mt,se=zt.align;"index"in zt?Mt=zt.index:Mt=He.findIndex(function(sn){return ye(sn)===zt.key});var $e=zt.offset,cn=$e===void 0?0:$e;kt({times:0,index:Mt,offset:cn,originAlign:se})}}}var gn=de.forwardRef(function(De,He){var Ee=De.prefixCls,Jt=De.rtl,ye=De.scrollOffset,Re=De.scrollRange,Be=De.onStartMove,Qt=De.onStopMove,ce=De.onScroll,Tt=De.horizontal,xt=De.spinSize,yt=De.containerSize,kt=De.style,zt=De.thumbStyle,Mt=de.useState(!1),se=(0,Ht.Z)(Mt,2),$e=se[0],cn=se[1],sn=de.useState(null),En=(0,Ht.Z)(sn,2),Gn=En[0],zn=En[1],Zn=de.useState(null),$n=(0,Ht.Z)(Zn,2),ni=$n[0],ei=$n[1],Bi=!Jt,Ki=de.useRef(),jn=de.useRef(),Tn=de.useState(!1),In=(0,Ht.Z)(Tn,2),li=In[0],gi=In[1],Yi=de.useRef(),Ci=function(){clearTimeout(Yi.current),gi(!0),Yi.current=setTimeout(function(){gi(!1)},3e3)},bt=Re-yt||0,_i=yt-xt||0,Fi=de.useMemo(function(){if(ye===0||bt===0)return 0;var re=ye/bt;return re*_i},[ye,bt,_i]),co=function(nn){nn.stopPropagation(),nn.preventDefault()},xo=de.useRef({top:Fi,dragging:$e,pageY:Gn,startTop:ni});xo.current={top:Fi,dragging:$e,pageY:Gn,startTop:ni};var Go=function(nn){cn(!0),zn(ie(nn,Tt)),ei(xo.current.top),Be(),nn.stopPropagation(),nn.preventDefault()};de.useEffect(function(){var re=function(Yt){Yt.preventDefault()},nn=Ki.current,Qe=jn.current;return nn.addEventListener("touchstart",re,{passive:!1}),Qe.addEventListener("touchstart",Go,{passive:!1}),function(){nn.removeEventListener("touchstart",re),Qe.removeEventListener("touchstart",Go)}},[]);var io=de.useRef();io.current=bt;var ii=de.useRef();ii.current=_i,de.useEffect(function(){if($e){var re,nn=function(Yt){var Ve=xo.current,en=Ve.dragging,Bn=Ve.pageY,qe=Ve.startTop;Ct.Z.cancel(re);var xe=Ki.current.getBoundingClientRect(),an=yt/(Tt?xe.width:xe.height);if(en){var Mn=(ie(Yt,Tt)-Bn)*an,Vn=qe;!Bi&&Tt?Vn-=Mn:Vn+=Mn;var _e=io.current,Je=ii.current,hi=Je?Vn/Je:0,qn=Math.ceil(hi*_e);qn=Math.max(qn,0),qn=Math.min(qn,_e),re=(0,Ct.Z)(function(){ce(qn,Tt)})}},Qe=function(){cn(!1),Qt()};return window.addEventListener("mousemove",nn,{passive:!0}),window.addEventListener("touchmove",nn,{passive:!0}),window.addEventListener("mouseup",Qe,{passive:!0}),window.addEventListener("touchend",Qe,{passive:!0}),function(){window.removeEventListener("mousemove",nn),window.removeEventListener("touchmove",nn),window.removeEventListener("mouseup",Qe),window.removeEventListener("touchend",Qe),Ct.Z.cancel(re)}}},[$e]),de.useEffect(function(){return Ci(),function(){clearTimeout(Yi.current)}},[ye]),de.useImperativeHandle(He,function(){return{delayHidden:Ci}});var ke="".concat(Ee,"-scrollbar"),Te={position:"absolute",visibility:li?null:"hidden"},Le={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Tt?(Te.height=8,Te.left=0,Te.right=0,Te.bottom=0,Le.height="100%",Le.width=xt,Bi?Le.left=Fi:Le.right=Fi):(Te.width=8,Te.top=0,Te.bottom=0,Bi?Te.right=0:Te.left=0,Le.width="100%",Le.height=xt,Le.top=Fi),de.createElement("div",{ref:Ki,className:be()(ke,(0,we.Z)((0,we.Z)((0,we.Z)({},"".concat(ke,"-horizontal"),Tt),"".concat(ke,"-vertical"),!Tt),"".concat(ke,"-visible"),li)),style:(0,Zt.Z)((0,Zt.Z)({},Te),kt),onMouseDown:co,onMouseMove:Ci},de.createElement("div",{ref:jn,className:be()("".concat(ke,"-thumb"),(0,we.Z)({},"".concat(ke,"-thumb-moving"),$e)),style:(0,Zt.Z)((0,Zt.Z)({},Le),zt),onMouseDown:Go}))}),Fe=gn,Ke=20;function rn(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ee=De/He*De;return isNaN(Ee)&&(Ee=0),Ee=Math.max(Ee,Ke),Math.floor(Ee)}var Fn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Pn=[],We={overflowY:"auto",overflowAnchor:"none"};function fe(De,He){var Ee=De.prefixCls,Jt=Ee===void 0?"rc-virtual-list":Ee,ye=De.className,Re=De.height,Be=De.itemHeight,Qt=De.fullHeight,ce=Qt===void 0?!0:Qt,Tt=De.style,xt=De.data,yt=De.children,kt=De.itemKey,zt=De.virtual,Mt=De.direction,se=De.scrollWidth,$e=De.component,cn=$e===void 0?"div":$e,sn=De.onScroll,En=De.onVirtualScroll,Gn=De.onVisibleChange,zn=De.innerProps,Zn=De.extraRender,$n=De.styles,ni=(0,he.Z)(De,Fn),ei=de.useCallback(function(eo){return typeof kt=="function"?kt(eo):eo==null?void 0:eo[kt]},[kt]),Bi=Ue(ei,null,null),Ki=(0,Ht.Z)(Bi,4),jn=Ki[0],Tn=Ki[1],In=Ki[2],li=Ki[3],gi=!!(zt!==!1&&Re&&Be),Yi=de.useMemo(function(){return Object.values(In.maps).reduce(function(eo,$i){return eo+$i},0)},[In.id,In.maps]),Ci=gi&&xt&&(Math.max(Be*xt.length,Yi)>Re||!!se),bt=Mt==="rtl",_i=be()(Jt,(0,we.Z)({},"".concat(Jt,"-rtl"),bt),ye),Fi=xt||Pn,co=(0,de.useRef)(),xo=(0,de.useRef)(),Go=(0,de.useRef)(),io=(0,de.useState)(0),ii=(0,Ht.Z)(io,2),ke=ii[0],Te=ii[1],Le=(0,de.useState)(0),re=(0,Ht.Z)(Le,2),nn=re[0],Qe=re[1],pe=(0,de.useState)(!1),Yt=(0,Ht.Z)(pe,2),Ve=Yt[0],en=Yt[1],Bn=function(){en(!0)},qe=function(){en(!1)},xe={getKey:ei};function an(eo){Te(function($i){var Do;typeof eo=="function"?Do=eo($i):Do=eo;var ir=no(Do);return co.current.scrollTop=ir,ir})}var Mn=(0,de.useRef)({start:0,end:Fi.length}),Vn=(0,de.useRef)(),_e=vt(Fi,ei),Je=(0,Ht.Z)(_e,1),hi=Je[0];Vn.current=hi;var qn=de.useMemo(function(){if(!gi)return{scrollHeight:void 0,start:0,end:Fi.length-1,offset:void 0};if(!Ci){var eo;return{scrollHeight:((eo=xo.current)===null||eo===void 0?void 0:eo.offsetHeight)||0,start:0,end:Fi.length-1,offset:void 0}}for(var $i=0,Do,ir,uo,yr=Fi.length,Vi=0;Vi<yr;Vi+=1){var Ni=Fi[Vi],Ji=ei(Ni),Nn=In.get(Ji),Ro=$i+(Nn===void 0?Be:Nn);Ro>=ke&&Do===void 0&&(Do=Vi,ir=$i),Ro>ke+Re&&uo===void 0&&(uo=Vi),$i=Ro}return Do===void 0&&(Do=0,ir=0,uo=Math.ceil(Re/Be)),uo===void 0&&(uo=Fi.length-1),uo=Math.min(uo+1,Fi.length-1),{scrollHeight:$i,start:Do,end:uo,offset:ir}},[Ci,gi,ke,Fi,li,Re]),vi=qn.scrollHeight,Kn=qn.start,oi=qn.end,ui=qn.offset;Mn.current.start=Kn,Mn.current.end=oi,de.useLayoutEffect(function(){var eo=In.getRecord();if(eo.size===1){var $i=Array.from(eo)[0],Do=ei(Fi[Kn]);if(Do===$i){var ir=In.get($i),uo=ir-Be;an(function(yr){return yr+uo})}}In.resetRecord()},[vi]);var xi=de.useState({width:0,height:Re}),to=(0,Ht.Z)(xi,2),On=to[0],ri=to[1],lo=function($i){ri({width:$i.offsetWidth,height:$i.offsetHeight})},Ao=(0,de.useRef)(),Ii=(0,de.useRef)(),Oe=de.useMemo(function(){return rn(On.width,se)},[On.width,se]),Wn=de.useMemo(function(){return rn(On.height,vi)},[On.height,vi]),yi=vi-Re,di=(0,de.useRef)(yi);di.current=yi;function no(eo){var $i=eo;return Number.isNaN(di.current)||($i=Math.min($i,di.current)),$i=Math.max($i,0),$i}var ji=ke<=0,fo=ke>=yi,Hi=nn<=0,Ti=nn>=se,Po=Ot(ji,fo,Hi,Ti),pn=function(){return{x:bt?-nn:nn,y:ke}},Vo=(0,de.useRef)(pn()),mn=(0,Kt.useEvent)(function(eo){if(En){var $i=(0,Zt.Z)((0,Zt.Z)({},pn()),eo);(Vo.current.x!==$i.x||Vo.current.y!==$i.y)&&(En($i),Vo.current=$i)}});function po(eo,$i){var Do=eo;$i?((0,ve.flushSync)(function(){Qe(Do)}),mn()):an(Do)}function vr(eo){var $i=eo.currentTarget.scrollTop;$i!==ke&&an($i),sn==null||sn(eo),mn()}var Si=function($i){var Do=$i,ir=se?se-On.width:0;return Do=Math.max(Do,0),Do=Math.min(Do,ir),Do},Dr=(0,Kt.useEvent)(function(eo,$i){$i?((0,ve.flushSync)(function(){Qe(function(Do){var ir=Do+(bt?-eo:eo);return Si(ir)})}),mn()):an(function(Do){var ir=Do+eo;return ir})}),hr=_t(gi,ji,fo,Hi,Ti,!!se,Dr),ki=(0,Ht.Z)(hr,2),Oi=ki[0],bo=ki[1];tn(gi,co,function(eo,$i,Do,ir){var uo=ir;return Po(eo,$i,Do)?!1:!uo||!uo._virtualHandled?(uo&&(uo._virtualHandled=!0),Oi({preventDefault:function(){},deltaX:eo?$i:0,deltaY:eo?0:$i}),!0):!1}),Gt(Ci,co,function(eo){an(function($i){return $i+eo})}),(0,ue.Z)(function(){function eo(Do){var ir=ji&&Do.detail<0,uo=fo&&Do.detail>0;gi&&!ir&&!uo&&Do.preventDefault()}var $i=co.current;return $i.addEventListener("wheel",Oi,{passive:!1}),$i.addEventListener("DOMMouseScroll",bo,{passive:!0}),$i.addEventListener("MozMousePixelScroll",eo,{passive:!1}),function(){$i.removeEventListener("wheel",Oi),$i.removeEventListener("DOMMouseScroll",bo),$i.removeEventListener("MozMousePixelScroll",eo)}},[gi,ji,fo]),(0,ue.Z)(function(){if(se){var eo=Si(nn);Qe(eo),mn({x:eo})}},[On.width,se]);var Oo=function(){var $i,Do;($i=Ao.current)===null||$i===void 0||$i.delayHidden(),(Do=Ii.current)===null||Do===void 0||Do.delayHidden()},Yn=Sn(co,Fi,In,Be,ei,function(){return Tn(!0)},an,Oo);de.useImperativeHandle(He,function(){return{nativeElement:Go.current,getScrollInfo:pn,scrollTo:function($i){function Do(ir){return ir&&(0,It.Z)(ir)==="object"&&("left"in ir||"top"in ir)}Do($i)?($i.left!==void 0&&Qe(Si($i.left)),Yn($i.top)):Yn($i)}}}),(0,ue.Z)(function(){if(Gn){var eo=Fi.slice(Kn,oi+1);Gn(eo,Fi)}},[Kn,oi,Fi]);var Wt=te(Fi,ei,In,Be),Fo=Zn==null?void 0:Zn({start:Kn,end:oi,virtual:Ci,offsetX:nn,offsetY:ui,rtl:bt,getSize:Wt}),br=ht(Fi,Kn,oi,se,nn,jn,yt,xe),Fr=null;Re&&(Fr=(0,Zt.Z)((0,we.Z)({},ce?"height":"maxHeight",Re),We),gi&&(Fr.overflowY="hidden",se&&(Fr.overflowX="hidden"),Ve&&(Fr.pointerEvents="none")));var qr={};return bt&&(qr.dir="rtl"),de.createElement("div",(0,mt.Z)({ref:Go,style:(0,Zt.Z)((0,Zt.Z)({},Tt),{},{position:"relative"}),className:_i},qr,ni),de.createElement(ge.Z,{onResize:lo},de.createElement(cn,{className:"".concat(Jt,"-holder"),style:Fr,ref:co,onScroll:vr,onMouseEnter:Oo},de.createElement(nt,{prefixCls:Jt,height:vi,offsetX:nn,offsetY:ui,scrollWidth:se,onInnerResize:Tn,ref:xo,innerProps:zn,rtl:bt,extra:Fo},br))),Ci&&vi>Re&&de.createElement(Fe,{ref:Ao,prefixCls:Jt,scrollOffset:ke,scrollRange:vi,rtl:bt,onScroll:po,onStartMove:Bn,onStopMove:qe,spinSize:Wn,containerSize:On.height,style:$n==null?void 0:$n.verticalScrollBar,thumbStyle:$n==null?void 0:$n.verticalScrollBarThumb}),Ci&&se>On.width&&de.createElement(Fe,{ref:Ii,prefixCls:Jt,scrollOffset:nn,scrollRange:se,rtl:bt,onScroll:po,onStartMove:Bn,onStopMove:qe,spinSize:Oe,containerSize:On.width,horizontal:!0,style:$n==null?void 0:$n.horizontalScrollBar,thumbStyle:$n==null?void 0:$n.horizontalScrollBarThumb}))}var An=de.forwardRef(fe);An.displayName="List";var Hn=An,un=Hn},93314:function(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(xn,vn,Pt){"use strict";Pt.d(vn,{Z:function(){return be}});const mt=ge=>typeof ge=="object"&&ge!=null&&ge.nodeType===1,It=(ge,Kt)=>(!Kt||ge!=="hidden")&&ge!=="visible"&&ge!=="clip",Zt=(ge,Kt)=>{if(ge.clientHeight<ge.scrollHeight||ge.clientWidth<ge.scrollWidth){const ue=getComputedStyle(ge,null);return It(ue.overflowY,Kt)||It(ue.overflowX,Kt)||(de=>{const ve=(At=>{if(!At.ownerDocument||!At.ownerDocument.defaultView)return null;try{return At.ownerDocument.defaultView.frameElement}catch(nt){return null}})(de);return!!ve&&(ve.clientHeight<de.scrollHeight||ve.clientWidth<de.scrollWidth)})(ge)}return!1},we=(ge,Kt,ue,de,ve,At,nt,et)=>At<ge&&nt>Kt||At>ge&&nt<Kt?0:At<=ge&&et<=ue||nt>=Kt&&et>=ue?At-ge-de:nt>Kt&&et<ue||At<ge&&et>ue?nt-Kt+ve:0,Ht=ge=>{const Kt=ge.parentElement;return Kt==null?ge.getRootNode().host||null:Kt},he=(ge,Kt)=>{var ue,de,ve,At;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:ht,boundary:at,skipOverflowHiddenElements:ft}=Kt,vt=typeof at=="function"?at:gn=>gn!==at;if(!mt(ge))throw new TypeError("Invalid target");const Ct=document.scrollingElement||document.documentElement,Bt=[];let Ft=ge;for(;mt(Ft)&&vt(Ft);){if(Ft=Ht(Ft),Ft===Ct){Bt.push(Ft);break}Ft!=null&&Ft===document.body&&Zt(Ft)&&!Zt(document.documentElement)||Ft!=null&&Zt(Ft,ft)&&Bt.push(Ft)}const Ot=(de=(ue=window.visualViewport)==null?void 0:ue.width)!=null?de:innerWidth,_t=(At=(ve=window.visualViewport)==null?void 0:ve.height)!=null?At:innerHeight,{scrollX:te,scrollY:Xt}=window,{height:Me,width:qt,top:Ne,right:ne,bottom:Ce,left:Ue}=ge.getBoundingClientRect(),{top:Ze,right:tn,bottom:ln,left:ie}=(gn=>{const Fe=window.getComputedStyle(gn);return{top:parseFloat(Fe.scrollMarginTop)||0,right:parseFloat(Fe.scrollMarginRight)||0,bottom:parseFloat(Fe.scrollMarginBottom)||0,left:parseFloat(Fe.scrollMarginLeft)||0}})(ge);let Gt=et==="start"||et==="nearest"?Ne-Ze:et==="end"?Ce+ln:Ne+Me/2-Ze+ln,Ae=ht==="center"?Ue+qt/2-ie+tn:ht==="end"?ne+tn:Ue-ie;const Sn=[];for(let gn=0;gn<Bt.length;gn++){const Fe=Bt[gn],{height:Ke,width:rn,top:Fn,right:Pn,bottom:We,left:fe}=Fe.getBoundingClientRect();if(nt==="if-needed"&&Ne>=0&&Ue>=0&&Ce<=_t&&ne<=Ot&&(Fe===Ct&&!Zt(Fe)||Ne>=Fn&&Ce<=We&&Ue>=fe&&ne<=Pn))return Sn;const An=getComputedStyle(Fe),Hn=parseInt(An.borderLeftWidth,10),un=parseInt(An.borderTopWidth,10),De=parseInt(An.borderRightWidth,10),He=parseInt(An.borderBottomWidth,10);let Ee=0,Jt=0;const ye="offsetWidth"in Fe?Fe.offsetWidth-Fe.clientWidth-Hn-De:0,Re="offsetHeight"in Fe?Fe.offsetHeight-Fe.clientHeight-un-He:0,Be="offsetWidth"in Fe?Fe.offsetWidth===0?0:rn/Fe.offsetWidth:0,Qt="offsetHeight"in Fe?Fe.offsetHeight===0?0:Ke/Fe.offsetHeight:0;if(Ct===Fe)Ee=et==="start"?Gt:et==="end"?Gt-_t:et==="nearest"?we(Xt,Xt+_t,_t,un,He,Xt+Gt,Xt+Gt+Me,Me):Gt-_t/2,Jt=ht==="start"?Ae:ht==="center"?Ae-Ot/2:ht==="end"?Ae-Ot:we(te,te+Ot,Ot,Hn,De,te+Ae,te+Ae+qt,qt),Ee=Math.max(0,Ee+Xt),Jt=Math.max(0,Jt+te);else{Ee=et==="start"?Gt-Fn-un:et==="end"?Gt-We+He+Re:et==="nearest"?we(Fn,We,Ke,un,He+Re,Gt,Gt+Me,Me):Gt-(Fn+Ke/2)+Re/2,Jt=ht==="start"?Ae-fe-Hn:ht==="center"?Ae-(fe+rn/2)+ye/2:ht==="end"?Ae-Pn+De+ye:we(fe,Pn,rn,Hn,De+ye,Ae,Ae+qt,qt);const{scrollLeft:ce,scrollTop:Tt}=Fe;Ee=Qt===0?0:Math.max(0,Math.min(Tt+Ee/Qt,Fe.scrollHeight-Ke/Qt+Re)),Jt=Be===0?0:Math.max(0,Math.min(ce+Jt/Be,Fe.scrollWidth-rn/Be+ye)),Gt+=Tt-Ee,Ae+=ce-Jt}Sn.push({el:Fe,top:Ee,left:Jt})}return Sn},Rt=ge=>ge===!1?{block:"end",inline:"nearest"}:(Kt=>Kt===Object(Kt)&&Object.keys(Kt).length!==0)(ge)?ge:{block:"start",inline:"nearest"};function be(ge,Kt){if(!ge.isConnected||!(ve=>{let At=ve;for(;At&&At.parentNode;){if(At.parentNode===document)return!0;At=At.parentNode instanceof ShadowRoot?At.parentNode.host:At.parentNode}return!1})(ge))return;const ue=(ve=>{const At=window.getComputedStyle(ve);return{top:parseFloat(At.scrollMarginTop)||0,right:parseFloat(At.scrollMarginRight)||0,bottom:parseFloat(At.scrollMarginBottom)||0,left:parseFloat(At.scrollMarginLeft)||0}})(ge);if((ve=>typeof ve=="object"&&typeof ve.behavior=="function")(Kt))return Kt.behavior(he(ge,Kt));const de=typeof Kt=="boolean"||Kt==null?void 0:Kt.behavior;for(const{el:ve,top:At,left:nt}of he(ge,Rt(Kt))){const et=At-ue.top+ue.bottom,ht=nt-ue.left+ue.right;ve.scroll({top:et,left:ht,behavior:de})}}}}]);