|
|
(self.webpackChunk=self.webpackChunk||[]).push([[337],{89489:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},59477:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},40001:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},49198:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},87169:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},73331:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},15277:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},52671:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},8657:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},56082:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},33853:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},12893:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},15075:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},32134:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},43531:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},61485:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},38819:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},47472:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(He,st){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:st,icon:wt}))},Me=De.forwardRef(ht),yt=Me},37036:function(){"use strict"},88010:function(Cn,un){"use strict";un.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},43809:function(Cn,un){"use strict";un.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"}},42678:function(Cn,un,ve){"use strict";var ce=ve(59301),De=Object.defineProperty,ze=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,ht=(ct,He,st)=>He in ct?De(ct,He,{enumerable:!0,configurable:!0,writable:!0,value:st}):ct[He]=st,Me=(ct,He)=>{for(var st in He||(He={}))wt.call(He,st)&&ht(ct,st,He[st]);if(ze)for(var st of ze(He))Ze.call(He,st)&&ht(ct,st,He[st]);return ct};const yt=ct=>React.createElement("svg",Me({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},ct),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"})));un.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},74413:function(){"use strict";function Cn(Ae,te,ee,he){ee===void 0&&(ee=0),he===void 0&&(he=1/0),this._name=Ae,this._defaultValue=te,this._minimum=ee,this._maximum=he}Object.defineProperty(Cn.prototype,"name",{get:function(){return this._name},set:function(Ae){if(typeof Ae!="string"||Ae==="")throw new Error("Shape name must be a valid string.");this._name=Ae}}),Object.defineProperty(Cn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("The default value must be a real number, not: "+Ae);this._defaultValue=Ae}}),Object.defineProperty(Cn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Minimum must be a real number, not: "+Ae);this._minimum=Ae}}),Object.defineProperty(Cn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Maximum must be a real number, not: "+Ae);this._maximum=Ae}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ae,te){var ee=go.Shape._FigureParameters[Ae];return ee?ee[te]:null},go.Shape.setFigureParameter=function(Ae,te,ee){if(!(ee instanceof Cn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var he=go.Shape._FigureParameters[Ae];he||(he=[],go.Shape._FigureParameters[Ae]=he),he[te]=ee};var un=[];function ve(Ae,te){var ee=un.pop();return ee===void 0?new go.Point(Ae,te):(ee.x=Ae,ee.y=te,ee)}function ce(){var Ae=un.pop();return Ae===void 0?new go.Point:Ae}function De(Ae){un.push(Ae)}function ze(Ae,te,ee,he,se,de,me,we,Ne){Ne||(Ne=new go.Point);var Fe=Ae-ee,Ie=se-me,je=NaN,Je=NaN;if(Fe===0)if(Ie===0)Ae===ee&&(je=Ae,Je=te);else{var Ke=(de-we)/Ie,gt=de-Ke*se;je=Ae,Je=Ke*je+gt}else if(Ie===0){var Re=(te-he)/Fe,At=te-Re*Ae;je=se,Je=Re*je+At}else{var Re=(te-he)/Fe,Ke=(de-we)/Ie,At=te-Re*Ae,gt=de-Ke*se;je=(gt-At)/(Re-Ke),Je=Re*je+At}return Ne.x=je,Ne.y=Je,Ne}function wt(Ae,te,ee,he,se,de,me,we,Ne,Fe,Ie,je,Je,Ke){var gt=1-Ne,Re=Ne,At=Ae*gt+ee*Re,qe=te*gt+he*Re,Et=ee*gt+se*Re,kt=he*gt+de*Re,Bt=se*gt+me*Re,Gt=de*gt+we*Re,Ut=At*gt+Et*Re,lt=qe*gt+kt*Re,$e=Et*gt+Bt*Re,Nt=kt*gt+Gt*Re,cn=Ut*gt+$e*Re,sn=lt*gt+Nt*Re;Fe.x=At,Fe.y=qe,Ie.x=Ut,Ie.y=lt,je.x=cn,je.y=sn,Je.x=$e,Je.y=Nt,Ke.x=Bt,Ke.y=Gt}var Ze=new go.Spot(.156,.156),ht=new go.Spot(.844,.844),Me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Cn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=5),he=Math.min(he,te/3),he=Math.min(he,ee/3);var se=he*Me,de=new go.Geometry().add(new go.PathFigure(he,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-he,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,he,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-he)).add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,he)).add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,se,se,0).close()));return se>1&&(de.spot1=new go.Spot(0,0,se,se),de.spot2=new go.Spot(1,1,-se,-se)),de}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=0,he.startY=ee/2,he.endX=te,he.endY=ee/2,he}),go.Shape.defineFigureGenerator("LineV",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=te/2,he.startY=0,he.endX=te/2,he.endY=ee,he}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.25*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.75*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ae,te,ee){var he=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(he*te,(1-he)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,he*ee)).add(new go.PathSegment(go.PathSegment.Move,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ae,te,ee){var he=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,he,he,he,he).close()));return se.spot1=Ze,se.spot2=ht,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}),go.Shape.defineFigureGenerator("Line2",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=te,he.startY=0,he.endX=0,he.endY=ee,he}),go.Shape.defineFigureGenerator("Curve1",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Me*te,0,te,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Me*ee,(1-Me)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Me*ee,Me*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Me)*te,0,0,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Cn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=.1:he<-1?he=-1:he>1&&(he=1);var se=Math.abs(he)*te;if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=10:he<-te?he=-te:he>te&&(he=te);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.setFigureParameter("Trapezoid1",0,new Cn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=.2:he<.5?he=-.5:he>.5&&(he=.5);var se=Math.abs(he)*te;if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Cn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=20:he<-te?he=-te/2:he>te&&(he=te/2);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.setFigureParameter("ManualOperation",0,new Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=10:he<-te?he=-te/2:he>te&&(he=te/2);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}});var yt=[];function ct(){var Ae=yt.pop();return Ae===void 0?[]:Ae}function He(Ae){Ae.length=0,yt.push(Ae)}function st(Ae){for(var te=ct(),ee=.5,he=.5,se=Math.PI*1.5,de=0,me=0;me<Ae;me++)de=2*Math.PI/Ae*me+se,te[me]=new go.Point(he+ee*Math.cos(de),he+ee*Math.sin(de));return te.push(te[0]),te}function mt(Ae){var te=dt(Ae),ee=ct();ee[0]=te[0];for(var he=1,se=1;he<te.length;he+=2,se+=3)ee[se]=te[he],ee[se+1]=te[he],ee[se+2]=te[he+1];return He(te),ee}function dt(Ae){for(var te=st(Ae),ee=ct(),he=Math.floor(te.length/2),se=te.length-1,de=Ae%2===0?2:1,me=0;me<se;me++){var we=te[me],Ne=te[me+1],Fe=te[(he+me-1)%se],Ie=te[(he+me+de)%se];ee[me*2]=we,ee[me*2+1]=ze(we.x,we.y,Fe.x,Fe.y,Ne.x,Ne.y,Ie.x,Ie.y,new go.Point)}return ee[ee.length]=ee[0],He(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(Ae,te,ee){var he=st(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<5;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Ae,te,ee){var he=st(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<6;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Ae,te,ee){var he=st(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<7;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Ae,te,ee){var he=st(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<8;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Ae,te,ee){var he=st(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<9;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Ae,te,ee){var he=st(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<10;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Ae,te,ee){var he=st(12),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<12;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ae,te,ee){var he=dt(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<10;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ae,te,ee){var he=dt(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<12;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ae,te,ee){var he=dt(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<14;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ae,te,ee){var he=dt(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<16;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ae,te,ee){var he=dt(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<18;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ae,te,ee){var he=dt(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<20;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ae,te,ee){var he=mt(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ae,te,ee){var he=mt(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ae,te,ee){var he=mt(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ae,te,ee){var he=mt(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ae,te,ee){var he=mt(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ae,te,ee){var he=mt(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Cn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Cn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(he)&&(he=8),isNaN(se)&&(se=8);var de=new go.Geometry,me=new go.PathFigure(0,0,!0);return de.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he<te/2&&se<ee/2&&(me.add(new go.PathSegment(go.PathSegment.Move,he,se)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee-se)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,ee-se)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,se).close())),de.setSpots(0,0,1,1,he,se,-he,-se),de}),go.Shape.setFigureParameter("Ring",0,new Cn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=8);var se=te/2,de=new go.Geometry,me=new go.PathFigure(te,te/2,!0);de.add(me),me.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var we=Math.max(se-he,0);return we>0&&(me.add(new go.PathSegment(go.PathSegment.Move,te/2+we,te/2)),me.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,we,we).close())),de.spot1=Ze,de.spot2=ht,de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Cloud",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.08034461*te,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*te,.05349299*ee,-.09239631*te,.07836421*ee,.1406031*te,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*te,.074219*ee,.2450511*te,-.00697547*ee,.3776197*te,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*te,.07004196*ee,.4539471*te,0,.6066018*te,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*te,.08370865*ee,.6914277*te,-.01904177*ee,.8921095*te,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*te,.3194596*ee,1.036446*te,.04105738*ee,1.020377*te,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*te,.562044*ee,1.04448*te,.360238*ee,.992256*te,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*te,.8217117*ee,1.032337*te,.5771781*ee,1.018411*te,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*te,.9156953*ee,1.028411*te,.9571472*ee,.8556702*te,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*te,.9310455*ee,.7431877*te,1.009325*ee,.5624123*te,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*te,.9344623*ee,.4820677*te,1.031761*ee,.3030112*te,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.870098*ee,.2329994*te,1.01518*ee,.03213784*te,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*te,.6545475*ee,-.02812061*te,.9032597*ee,-.01205169*te,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*te,.4265613*ee,-.01812061*te,.6089503*ee,-.00606892*te,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.1944299*ee,-.01606892*te,.3892545*ee,-.01205169*te,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ae,te,ee){var he=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(he*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,he*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,he*ee).close())).setSpots(he/2,he/2,1-he/2,1-he/2)}),go.Shape.setFigureParameter("Pie",0,new Cn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Cn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(he)&&(he=0),isNaN(se)&&(se=315);var de=he%360;de<0&&(de+=360);var me=se%360,we=Math.min(te,ee)/2;return new go.Geometry().add(new go.PathFigure(we,we).add(new go.PathSegment(go.PathSegment.Arc,de,me,we,we,we,we).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ae,te,ee){var he=Me/Math.SQRT2*.5,se=Math.SQRT2/2,de=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*te,de*ee,te,(1-he)*ee,(se+he)*te,(de+he)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=30);var se=Math.min(he,te)/2,de=te/2,me=ee/2;return new go.Geometry().add(new go.PathFigure(de-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,de+se,0)).add(new go.PathSegment(go.PathSegment.Line,de+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,de-se,me-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=10);var se=Math.min(he,te)/2,de=te/2,me=ee/2;return new go.Geometry().add(new go.PathFigure(de-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,de+se,0)).add(new go.PathSegment(go.PathSegment.Line,de+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,de-se,me-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;if((isNaN(he)||he<0)&&(he=30),te===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=te,se.endY=ee,se}else{var de=te/2,me=ee/2,we=Math.atan2(ee,te),Ne=he-Math.min(Math.cos(we)*he/2,de),Fe=he-Math.min(Math.sin(we)*he/2,me),se=new go.Geometry,Ie=new go.PathFigure(Ne,0,!0);return se.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,de,.2*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,te-Ne,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,te,Fe)),Ie.add(new go.PathSegment(go.PathSegment.Line,.8*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,te,ee-Fe)),Ie.add(new go.PathSegment(go.PathSegment.Line,te-Ne,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,de,.8*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,Ne,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,ee-Fe)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,Fe).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=10);var se=new go.Geometry,de=new go.PathFigure(.1*te,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Cn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.2);var se=new go.Geometry,de=new go.PathFigure(0,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5+he/2)*te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5+he/2)*te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5-he/2)*te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5-he/2)*te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,he*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Cn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.5);var se=new go.Geometry,de=new go.PathFigure(0,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-he)*te,.25*ee,Math.abs(1-he)*te,.75*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,0,0,he*te,.75*ee,he*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,Me*te,0,te,(.5-Me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,(.5+Me/2)*ee,Me*te,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,0,te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*te,.75*ee,.5*te,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*te,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,0,0,.45*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.55*te,0,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.5*ee,.9*te,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*te,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.6*te,.2*ee,te,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.7*ee,te,.8*ee,.6*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,.5*te,.75*ee,.55*te,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.7*ee,.45*te,.95*ee,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*te,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*te,.01*ee,0,.25*ee,.4*te,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*te,ee,.5*te,.75*ee,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.6*ee,.55*te,.95*ee,.5*te,.75*ee));var de=.2,me=.3,we=0,Ne=de*Me;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+Ne+we)*ee,(.5-Ne+me)*te,(.5+de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+de+me)*te,(.5+we)*ee,(.5+Ne+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+Ne+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me)*te,(.5-Ne+we)*ee,(.5+Ne+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-Ne+me)*te,(.5-de+we)*ee,(.5-de+me+.05)*te,(.5-Ne+we-.02)*ee)),de=.2,me=0,we=-.3,Ne=de*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+de+me)*te,(.5+we)*ee,(.5+Ne+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+Ne+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me)*te,(.5-Ne+we)*ee,(.5+Ne+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-de+me)*te,(.5+we)*ee,(.5-Ne+me)*te,(.5-de+we)*ee,(.5-de+me)*te,(.5-Ne+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ne+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+Ne+we)*ee,(.5-Ne+me)*te,(.5+de+we)*ee)),de=.2,me=-.3,we=0,Ne=de*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me-.05)*te,(.5-Ne+we-.02)*ee,(.5+Ne+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-de+me)*te,(.5+we)*ee,(.5-Ne+me)*te,(.5-de+we)*ee,(.5-de+me)*te,(.5-Ne+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+Ne+we)*ee,(.5-Ne+me)*te,(.5+de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+Ne+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+Ne+we)*ee).close()),he.setSpots(.06,.33,.93,.68),he}),go.Shape.defineFigureGenerator("YinYang",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*.5,te*.5,te*.5,te*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,te*.5,te*.75,te*.25,te*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,te*.5,te*.25,te*.25,te*.25));var de=.1,me=.5,we=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(me+de)*te,we*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,te*me,ee*we,de*te,de*te).close()),se=new go.PathFigure(te*.5,0,!1),he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*.5,te*.5,te*.5,te*.5)),we=.75,se=new go.PathFigure((me+de)*te,we*ee,!0),he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*me,ee*we,de*te,de*te).close()),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Peace",function(Ae,te,ee){var he=.8535533905932737,se=.5*te,de=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,de,se,de)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,de)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,he*ee)).add(new go.PathSegment(go.PathSegment.Move,se,de)).add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=.5,me=.5,we=.5,Ne=new go.PathFigure(me*te,(we-de)*ee);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),de=.4,se=Me*.4;var Fe=ce(),Ie=ce(),je=ce(),Je=ce();wt(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.42,Fe,Ie,je,Je,Je);var Ke=ce(),gt=ce(),Re=ce();wt(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.58,Je,Je,Re,Ke,gt);var At=ce(),qe=ce(),Et=ce();wt(me,we+de,me-se,we+de,me-de,we+se,me-de,we,.42,At,qe,Et,Je,Je);var kt=ce(),Bt=ce(),Gt=ce();return wt(me,we+de,me-se,we+de,me-de,we+se,me-de,we,.58,Je,Je,Gt,kt,Bt),Ne.add(new go.PathSegment(go.PathSegment.Move,Gt.x*te,Gt.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,kt.x*te,kt.y*ee,Bt.x*te,Bt.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,je.x*te,je.y*ee,Fe.x*te,Fe.y*ee,Ie.x*te,Ie.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Gt.x*te,Gt.y*ee).close()),Ne.add(new go.PathSegment(go.PathSegment.Move,Et.x*te,Et.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Re.x*te,Re.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,Ke.x*te,Ke.y*ee,gt.x*te,gt.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Et.x*te,Et.y*ee,At.x*te,At.y*ee,qe.x*te,qe.y*ee).close()),De(Fe),De(Ie),De(je),De(Je),De(Ke),De(gt),De(Re),De(At),De(qe),De(Et),De(kt),De(Bt),De(Gt),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Fragile",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*te,0)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*te,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.5*ee,te,.25*ee,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=30),he>te&&(he=te);var se=(te-he)/2,de=se+he;return new go.Geometry().add(new go.PathFigure(de,.5*ee).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,se,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*te,0)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ae,te,ee){var he=new go.Geometry,se=Me*.4,de=.4,me=.5,we=.5,Ne=ce(),Fe=ce(),Ie=ce(),je=ce(),Je=new go.PathFigure((me-de)*te,we*ee,!1);he.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),wt(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.44,Ie,je,Fe,Ne,Ne),Je.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*te,Fe.y*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee));var Ke=ve(Fe.x,Fe.y);wt(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.56,Ne,Ne,Fe,Ie,je);var gt=ve(Fe.x,Fe.y);Je.add(new go.PathSegment(go.PathSegment.Line,(Ke.x*.1+.95*.9)*te,Ke.y*.1*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*te,Ke.y*.1*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),Je.add(new go.PathSegment(go.PathSegment.Line,te,0)),Je.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,(gt.x*.1+.9)*te,.15*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,(gt.x*.1+.9)*te,(gt.y*.1+.05*.9)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,gt.x*te,gt.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),de=.35,se=Me*.35;var Re=new go.PathFigure(me*te,(we-de)*ee,!1);he.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee));var At=new go.PathFigure((me-de)*te,we*ee,!1);return he.add(At),De(Ne),De(Fe),De(Ie),De(je),De(Ke),De(gt),he.spot1=new go.Spot(.202,.257),he.spot2=new go.Spot(.792,.739),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("GenderFemale",function(Ae,te,ee){var he=new go.Geometry,se=.375,de=0,me=-.125,we=se*Me,Ne=new go.PathFigure((.525+de)*te,(.5+se+me)*ee,!1);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+de)*te,(.5+me)*ee,(.5+we+de)*te,(.5+se+me)*ee,(.5+se+de)*te,(.5+we+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5-se+me)*ee,(1-.5+se+de)*te,(.5-we+me)*ee,(.5+we+de)*te,(.5-se+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.475+de)*te,(.5+se+me)*ee,(.5-se+de)*te,(.5+we+me)*ee,(.5-we+de)*te,(.5+se+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,de=0,me=-.125,we=se*Me;var Ne=new go.PathFigure((1-.5+se+de)*te,(.5+me)*ee,!1);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5+se+me)*ee,(.5+se+de)*te,(.5+we+me)*ee,(.5+we+de)*te,(.5+se+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5+se+me)*ee,(.5-se+de)*te,(.5+we+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee,(.5-we+de)*te,(.5-se+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+de)*te,(.5+me)*ee,(.5+we+de)*te,(.5-se+me)*ee,(1-.5+se+de)*te,(.5-we+me)*ee));var Ne=new go.PathFigure((.525+de)*te,(.5+se+me)*ee,!1);return he.add(Ne),he.spot1=new go.Spot(.232,.136),he.spot2=new go.Spot(.682,.611),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("LogicImplies",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;return isNaN(he)&&(he=.2),new go.Geometry().add(new go.PathFigure((1-he)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;return isNaN(he)&&(he=.2),new go.Geometry().add(new go.PathFigure((1-he)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,he*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,he*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ae,te,ee){var he=new go.Geometry().add(new go.PathFigure(.5*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*te,.5*ee,.5*te,.5*ee)));return he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("LogicTruth",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ae,te,ee){var he=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,he*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,he*te,he*ee,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ae,te,ee){var he=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,he*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,he*te,he*ee,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Cn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Cn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.3);var de=(1-he)*te,me=(.5-se/2)*ee,we=(.5+se/2)*ee,Ne=new go.Geometry,Fe=new go.PathFigure(0,me,!0);Ne.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,de,me)),Fe.add(new go.PathSegment(go.PathSegment.Line,de,0)),Fe.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,de,ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,de,we)),Fe.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),Ne.spot1=new go.Spot(0,me/ee);var Ie=ze(0,we/ee,1,we/ee,de/te,1,1,.5,ce());return Ne.spot2=new go.Spot(Ie.x,Ie.y),De(Ie),Ne}),go.Shape.setFigureParameter("Arrow2",0,new Cn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Cn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=30),he>te&&(he=te);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var de=te-he,me=(ee-se)/2,we=me+se,Ne=new go.Geometry,Fe=new go.PathFigure(0,me,!0);Ne.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,de,me)),Fe.add(new go.PathSegment(go.PathSegment.Line,de,0)),Fe.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,de,ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,de,we)),Fe.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),Ne.spot1=new go.Spot(0,me/ee);var Ie=ze(0,we/ee,1,we/ee,de/te,1,1,.5,ce());return Ne.spot2=new go.Spot(Ie.x,Ie.y),De(Ie),Ne}),go.Shape.defineFigureGenerator("Chevron",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),he}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Cn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close());var Ne=ze(0,.5,.3,0,0,se/ee,.1,se/ee,ce());return me.spot1=new go.Spot(Ne.x,Ne.y),Ne=ze(.7,1,1,.5,0,de/ee,1,de/ee,Ne),me.spot2=new go.Spot(Ne.x,Ne.y),De(Ne),me}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Cn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Cn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var de=(ee-he)/2,me=de+he,we=(ee-se)/2,Ne=we+se;(he>ee||se>ee)&&(se>he?(he=he*ee/se,de=(ee-he)/2,me=de+he,we=0,Ne=ee):(de=0,me=ee,we=0,Ne=ee));var Fe=new go.Geometry,Ie=new go.PathFigure(te,.5*ee,!0);Fe.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ne)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,Ne)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,we).close());var je=ze(0,.5,.3,we/ee,0,de/ee,1,de/ee,ce());return Fe.spot1=new go.Spot(je.x,je.y),je=ze(.7,Ne/ee,1,.5,0,me/ee,1,me/ee,je),Fe.spot2=new go.Spot(je.x,je.y),De(je),Fe}),go.Shape.setFigureParameter("IBeamArrow",0,new Cn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(0,se/ee);var Ne=ze(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(Ne.x,Ne.y),De(Ne),me}),go.Shape.setFigureParameter("IBeamArrow2",0,new Cn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Cn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var de=(ee-he)/2,me=de+he,we=(ee-se)/2,Ne=we+se;(he>ee||se>ee)&&(se>he?(he=he*ee/se,de=(ee-he)/2,me=de+he,we=0,Ne=ee):(de=0,me=ee,we=0,Ne=ee));var Fe=new go.Geometry,Ie=new go.PathFigure(te,.5*ee,!0);Fe.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ne)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,Ne)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,Ne)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,we).close()),Fe.spot1=new go.Spot(0,de/ee);var je=ze(.7,Ne/ee,1,.5,0,me/ee,1,me/ee,ce());return Fe.spot2=new go.Spot(je.x,je.y),De(je),Fe}),go.Shape.setFigureParameter("Pointer",0,new Cn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.1);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(he,.35);var me=ze(.2,.65,1,.65,0,1,1,.5,ce());return se.spot2=new go.Spot(me.x,me.y),De(me),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Cn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,0,0,he*te,.75*ee,he*te,.25*ee).close()),se.spot1=new go.Spot(he,.35);var me=ze(0,.65,1,.65,0,1,1,.5,ce());return se.spot2=new go.Spot(me.x,me.y),De(me),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Cn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.4);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,0,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(.2,.3);var Ne=ze(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(Ne.x,Ne.y),De(Ne),me}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Cn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=50);var se=(ee-he)/2,de=se+he;he>ee&&(se=0,de=ee);var me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,0,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(.2,se/ee);var Ne=ze(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(Ne.x,Ne.y),De(Ne),me}),go.Shape.setFigureParameter("SquareArrow",0,new Cn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.7);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,he*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,0)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(he,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=Me*.1,me=new go.PathFigure(0,.9*ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee).close()),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.97),he}),go.Shape.defineFigureGenerator("Cone2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,ee,.85/.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var de=new go.PathFigure(0,.9*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.82),he}),go.Shape.defineFigureGenerator("Cube1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var de=new go.PathFigure(.5*te,ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.5*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(.5,.85),he}),go.Shape.defineFigureGenerator("Cube2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0).close());var de=new go.PathFigure(0,.3*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Move,.7*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(.7,1),he}),go.Shape.defineFigureGenerator("Cylinder1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,ee/3);var se=new go.Geometry,de=Me*.5,me=new go.PathFigure(0,he,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*he,(.5-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,1*te,he,(.5+de)*te,0,1*te,Me*he)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Me*he,(.5+de)*te,1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,(.5-de)*te,1*ee,0,ee-Me*he)),me.add(new go.PathSegment(go.PathSegment.Line,0,he));var we=new go.PathFigure(te,he,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*he,1*te,2*he-Me*he,(.5+de)*te,2*he)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,he,(.5-de)*te,2*he,0,2*he-Me*he)),se.spot1=new go.Spot(0,0,0,2*he),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,ee/3);var se=new go.Geometry,de=Me*.5,me=new go.PathFigure(0,ee-he,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*he,(.5-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,he,(.5+de)*te,0,te,Me*he)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Me*he,(.5+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,(.5-de)*te,ee,0,ee-Me*he));var we=new go.PathFigure(0,ee-he,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*he,0,ee-he-Me*he,(.5-de)*te,ee-2*he)),we.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-he,(.5+de)*te,ee-2*he,te,ee-he-Me*he)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*he),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,te/3);var se=new go.Geometry,de=Me*.5,me=new go.PathFigure(he,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te-he,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*he,0,te,(.5-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,(.5+de)*ee,te-Me*he,ee)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*he,ee,0,(.5+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,(.5-de)*ee,Me*he,0));var we=new go.PathFigure(he,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,2*he,.5*ee,he+Me*he,0,2*he,(.5-de)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,he,ee,2*he,(.5+de)*ee,he+Me*he,ee)),se.spot1=new go.Spot(0,0,2*he,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,te/3);var se=new go.Geometry,de=Me*.5,me=new go.PathFigure(te-he,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*he,0,te,(.5-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,(.5+de)*ee,te-Me*he,ee)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*he,ee,0,(.5+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,(.5-de)*ee,Me*he,0)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,0));var we=new go.PathFigure(te-he,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,te-2*he,.5*ee,te-he-Me*he,0,te-2*he,(.5-de)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te-2*he,(.5+de)*ee,te-he-Me*he,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*he,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(.25*te,.25*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.408,.172),he.spot2=new go.Spot(.833,.662),he}),go.Shape.defineFigureGenerator("Prism2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(0,ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("Pyramid1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var de=new go.PathFigure(.5*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.25,.367),he.spot2=new go.Spot(.75,.875),he}),go.Shape.defineFigureGenerator("Pyramid2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var de=new go.PathFigure(.5*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),he.spot1=new go.Spot(.25,.367),he.spot2=new go.Spot(.75,.875),he}),go.Shape.defineFigureGenerator("Actor",function(Ae,te,ee){var he=new go.Geometry,se=.2,de=.1,me=Me*se,we=Me*de,Ne=.5,Fe=.1,Ie=new go.PathFigure(Ne*te,(Fe+de)*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-se)*te,Fe*ee,(Ne-me)*te,(Fe+de)*ee,(Ne-se)*te,(Fe+we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-de)*ee,(Ne-se)*te,(Fe-we)*ee,(Ne-me)*te,(Fe-de)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+se)*te,Fe*ee,(Ne+me)*te,(Fe-de)*ee,(Ne+se)*te,(Fe-we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+de)*ee,(Ne+se)*te,(Fe+we)*ee,(Ne+me)*te,(Fe+de)*ee));var je=.05,Je=Me*je;Ne=.05,Fe=.25;var Ke=new go.PathFigure(.5*te,.2*ee,!0);return he.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),Ne=.95,Fe=.25,Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+je)*te,Fe*ee,(Ne+Je)*te,(Fe-je)*ee,(Ne+je)*te,(Fe-Je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.85*te,.35*ee)),je=.025,Je=Me*je,Ne=.825,Fe=.35,Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-je)*ee,(Ne+je)*te,(Fe-Je)*ee,(Ne+Je)*te,(Fe-je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-je)*te,Fe*ee,(Ne-Je)*te,(Fe-je)*ee,(Ne-je)*te,(Fe-Je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee)),je=.05,Je=Me*je,Ne=.5,Fe=.7,Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-je)*ee,(Ne+je)*te,(Fe-Je)*ee,(Ne+Je)*te,(Fe-je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-je)*te,Fe*ee,(Ne-Je)*te,(Fe-je)*ee,(Ne-je)*te,(Fe-Je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.45*te,ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.2*te,.35*ee)),je=.025,Je=Me*je,Ne=.175,Fe=.35,Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-je)*ee,(Ne+je)*te,(Fe-Je)*ee,(Ne+Je)*te,(Fe-je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-je)*te,Fe*ee,(Ne-Je)*te,(Fe-je)*ee,(Ne-je)*te,(Fe-Je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),je=.05,Je=Me*je,Ne=.05,Fe=.25,Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-je)*ee,(Ne-je)*te,(Fe-Je)*ee,(Ne-Je)*te,(Fe-je)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),he.spot1=new go.Spot(.2,.2),he.spot2=new go.Spot(.8,.65),he}),go.Shape.setFigureParameter("Card",0,new Cn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.2);var se=new go.Geometry,de=new go.PathFigure(te,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,0).close()),se.spot1=new go.Spot(0,he),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee));var de=new go.PathFigure(.5*te,.5*ee,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),he.spot1=new go.Spot(.25,0),he.spot2=new go.Spot(.75,.25),he}),go.Shape.defineFigureGenerator("CreateRequest",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(0,se*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),he}),go.Shape.defineFigureGenerator("Database",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=Me*.1,me=new go.PathFigure(te,.1*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-de)*ee,(.5-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-de)*ee));var we=new go.PathFigure(te,.1*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+de)*ee,(.5+se)*te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+de)*ee,(.5+se)*te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.4*ee,te,(.3+de)*ee,(.5+se)*te,.4*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*te,.4*ee,0,(.3+de)*ee)),he.spot1=new go.Spot(0,.4),he.spot2=new go.Spot(1,.9),he}),go.Shape.defineFigureGenerator("DataStorage",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.9*ee,.25*te,.1*ee).close()),he.spot1=new go.Spot(.226,0),he.spot2=new go.Spot(.81,1),he}),go.Shape.defineFigureGenerator("DiskStorage",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=Me*.1,me=new go.PathFigure(te,.1*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-de)*ee,(.5-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-de)*ee));var we=new go.PathFigure(te,.1*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+de)*ee,(.5+se)*te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+de)*ee,(.5+se)*te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+de)*ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(1,.9),he}),go.Shape.defineFigureGenerator("Display",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),he.spot1=new go.Spot(.25,0),he.spot2=new go.Spot(.75,1),he}),go.Shape.defineFigureGenerator("DividedEvent",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var de=Me*.2,me=new go.PathFigure(0,.2*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,0,(.2-de)*ee,(.2-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.2*ee,(.8+de)*te,0,te,(.2-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,ee,te,(.8+de)*ee,(.8+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-de)*te,ee,0,(.8+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var we=new go.PathFigure(0,se*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),he}),go.Shape.defineFigureGenerator("DividedProcess",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(0,se*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),he}),go.Shape.defineFigureGenerator("Document",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(1,.6),he}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),me.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),he}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var de=new go.PathFigure(.1*te,.4*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.9*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.6*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.4*te,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.9*ee)),he.spot1=new go.Spot(.25,.25),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("File",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(.75*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("Interrupt",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee));var de=new go.PathFigure(te,.5*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee));var me=new go.PathFigure(te,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("InternalStorage",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.1);var me=new go.PathFigure(0,0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var we=new go.PathFigure(se*te,0,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),we.add(new go.PathSegment(go.PathSegment.Move,0,de*ee)),we.add(new go.PathSegment(go.PathSegment.Line,te,de*ee)),he}),go.Shape.defineFigureGenerator("Junction",function(Ae,te,ee){var he=new go.Geometry,se=1/Math.SQRT2,de=(1-1/Math.SQRT2)/2,me=Me*.5,we=.5,Ne=new go.PathFigure(te,we*ee,!0);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*te,ee,te,(we+me)*ee,(we+me)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,we*ee,(we-me)*te,ee,0,(we+me)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*te,0,0,(we-me)*ee,(we-me)*te,0)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,te,we*ee,(we+me)*te,0,te,(we-me)*ee));var Fe=new go.PathFigure((de+se)*te,(de+se)*ee,!1);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,de*te,de*ee)),Fe.add(new go.PathSegment(go.PathSegment.Move,de*te,(de+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,(de+se)*te,de*ee)),he}),go.Shape.defineFigureGenerator("LinedDocument",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close());var de=new go.PathFigure(.1*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),he.spot1=new go.Spot(.1,0),he.spot2=new go.Spot(1,.6),he}),go.Shape.defineFigureGenerator("LoopLimit",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("MagneticTape",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=.5,me=new go.PathFigure(.5*te,ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,(de+.1)*te,.9*ee,te,(de+se)*ee,(de+se)*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.15,.15),he.spot2=new go.Spot(.85,.8),he}),go.Shape.defineFigureGenerator("ManualInput",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.7);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,se*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,se*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,(1-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(1,.75),he}),go.Shape.defineFigureGenerator("MultiDocument",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.44*ee,.96*te,.47*ee,.93*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.54*ee,.86*te,.57*ee,.83*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*te,.4*ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0).close());var de=new go.PathFigure(.1*te,.2*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.44*ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.8,.77),he}),go.Shape.defineFigureGenerator("MultiProcess",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close());var de=new go.PathFigure(.2*te,.1*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.1*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),he.spot1=new go.Spot(0,.2),he.spot2=new go.Spot(.8,1),he}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=1-se,me=new go.PathFigure(0,0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close());var we=new go.PathFigure(.5*se*te,se*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),he}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(.75,1),he}),go.Shape.defineFigureGenerator("Or",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=.5,me=new go.PathFigure(te,de*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,ee,te,(de+se)*ee,(de+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee));var we=new go.PathFigure(te,.5*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),he}),go.Shape.defineFigureGenerator("PaperTape",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.5*te,.6*ee,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),he.spot1=new go.Spot(0,.49),he.spot2=new go.Spot(1,.75),he}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.3);var me=new go.PathFigure(0,0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.3);var me=new go.PathFigure(0,0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("Procedure",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure((1-se)*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,se*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),he}),go.Shape.defineFigureGenerator("Process",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("Sort",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var de=new go.PathFigure(0,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),he.spot1=new go.Spot(.25,.25),he.spot2=new go.Spot(.75,.5),he}),go.Shape.defineFigureGenerator("Start",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var de=new go.PathFigure(se*te,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee));var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),he.spot1=new go.Spot(se,0),he.spot2=new go.Spot(1-se,1),he}),go.Shape.defineFigureGenerator("Terminator",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee)),he.spot1=new go.Spot(.23,0),he.spot2=new go.Spot(.77,1),he}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,(1-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),he.spot1=go.Spot.TopLeft,he}),go.Shape.defineFigureGenerator("AndGate",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(.5+se)*te,0,te,(.5-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.5+se)*ee,(.5+se)*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(.55,1),he}),go.Shape.defineFigureGenerator("Buffer",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("Clock",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=.5,me=new go.PathFigure(te,de*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,ee,te,(de+se)*ee,(de+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee));var we=new go.PathFigure(te,de*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,de*ee));var Ne=new go.PathFigure(.8*te,.75*ee,!1);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),he}),go.Shape.defineFigureGenerator("Ground",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),he}),go.Shape.defineFigureGenerator("Inverter",function(Ae,te,ee){var he=new go.Geometry,se=Me*.1,de=.1,me=.9,we=.5,Ne=new go.PathFigure(.8*te,.5*ee,!0);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee));var Fe=new go.PathFigure((me+de)*te,we*ee,!0);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we-de)*ee,(me+de)*te,(we-se)*ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.4,.75),he}),go.Shape.defineFigureGenerator("NandGate",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=Me*.4,me=Me*.1,we=.1,Ne=.9,Fe=.5,Ie=new go.PathFigure(.8*te,.5*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,.8*te,(.5+de)*ee,(.4+se)*te,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(.4+se)*te,0,.8*te,(.5-de)*ee));var je=new go.PathFigure((Ne+we)*te,Fe*ee,!0);return he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+we)*ee,(Ne+we)*te,(Fe+me)*ee,(Ne+me)*te,(Fe+we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-we)*te,Fe*ee,(Ne-me)*te,(Fe+we)*ee,(Ne-we)*te,(Fe+me)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-we)*ee,(Ne-we)*te,(Fe-me)*ee,(Ne-me)*te,(Fe-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+we)*te,Fe*ee,(Ne+me)*te,(Fe-we)*ee,(Ne+we)*te,(Fe-me)*ee)),he.spot1=new go.Spot(0,.05),he.spot2=new go.Spot(.55,.95),he}),go.Shape.defineFigureGenerator("NorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Me*se,me=0,we=.5,Ne=new go.PathFigure(.8*te,.5*ee,!0);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(me+de)*te,(we-se)*ee,.7*te,(we-de)*ee)),se=.1,de=Me*.1,me=.9,we=.5;var Fe=new go.PathFigure((me-se)*te,we*ee,!0);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),he.spot1=new go.Spot(.2,.25),he.spot2=new go.Spot(.6,.75),he}),go.Shape.defineFigureGenerator("OrGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Me*se,me=0,we=.5,Ne=new go.PathFigure(0,0,!0);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(me+de+de)*te,(we-se)*ee,.8*te,(we-de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(we+de)*ee,(me+de+de)*te,(we+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),he.spot1=new go.Spot(.2,.25),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("XnorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Me*se,me=.2,we=.5,Ne=new go.PathFigure(.1*te,0,!1);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Fe=new go.PathFigure(.8*te,.5*ee,!0);he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(me+de)*te,(we-se)*ee,.7*te,(we-de)*ee)),se=.1,de=Me*.1,me=.9,we=.5;var Ie=new go.PathFigure((me-se)*te,we*ee,!0);return he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),he.spot1=new go.Spot(.4,.25),he.spot2=new go.Spot(.65,.75),he}),go.Shape.defineFigureGenerator("XorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Me*se,me=.2,we=.5,Ne=new go.PathFigure(.1*te,0,!1);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Fe=new go.PathFigure(.2*te,0,!0);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(me+de)*te,(we-se)*ee,.9*te,(we-de)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),he.spot1=new go.Spot(.4,.25),he.spot2=new go.Spot(.8,.75),he}),go.Shape.defineFigureGenerator("Capacitor",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("Resistor",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Inductor",function(Ae,te,ee){var he=new go.Geometry,se=Me*.1,de=.1,me=.1,we=.5,Ne=new go.PathFigure((me-se*.5)*te,ee,!1);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.3,Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.5,Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.7,Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.9,Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+se*.5)*te,ee,(me+de)*te,0,(me+se)*te,ee)),he}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ae,te,ee){var he=new go.Geometry,se=Me*.5,de=.5,me=.5,we=.5,Ne=new go.PathFigure((me-de)*te,we*ee,!1);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we-de)*ee,(me+de)*te,(we-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Move,(me-de+.1)*te,we*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+de-.1)*te,we*ee,me*te,(we-de)*ee,me*te,(we+de)*ee)),he}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("Diode",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("Wifi",function(Ae,te,ee){var he=new go.Geometry,se=te,de=ee;te=te*.38,ee=ee*.6;var me=Me*.8,we=.8,Ne=0,Fe=.5,Ie=(se-te)/2,je=(de-ee)/2,Je=new go.PathFigure(Ne*te+Ie,(Fe+we)*ee+je,!0);he.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-we)*te+Ie,Fe*ee+je,(Ne-me)*te+Ie,(Fe+we)*ee+je,(Ne-we)*te+Ie,(Fe+me)*ee+je)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe-we)*ee+je,(Ne-we)*te+Ie,(Fe-me)*ee+je,(Ne-me)*te+Ie,(Fe-we)*ee+je)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-we+me*.5)*te+Ie,Fe*ee+je,Ne*te+Ie,(Fe-we)*ee+je,(Ne-we+me*.5)*te+Ie,(Fe-me)*ee+je)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe+we)*ee+je,(Ne-we+me*.5)*te+Ie,(Fe+me)*ee+je,Ne*te+Ie,(Fe+we)*ee+je).close()),me=Me*.4,we=.4,Ne=.2,Fe=.5;var Ke=new go.PathFigure(Ne*te+Ie,(Fe+we)*ee+je,!0);he.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-we)*te+Ie,Fe*ee+je,(Ne-me)*te+Ie,(Fe+we)*ee+je,(Ne-we)*te+Ie,(Fe+me)*ee+je)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe-we)*ee+je,(Ne-we)*te+Ie,(Fe-me)*ee+je,(Ne-me)*te+Ie,(Fe-we)*ee+je)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-we+me*.5)*te+Ie,Fe*ee+je,Ne*te+Ie,(Fe-we)*ee+je,(Ne-we+me*.5)*te+Ie,(Fe-me)*ee+je)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe+we)*ee+je,(Ne-we+me*.5)*te+Ie,(Fe+me)*ee+je,Ne*te+Ie,(Fe+we)*ee+je).close()),me=Me*.2,we=.2,Ne=.5,Fe=.5;var gt=new go.PathFigure((Ne-we)*te+Ie,Fe*ee+je,!0);he.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe-we)*ee+je,(Ne-we)*te+Ie,(Fe-me)*ee+je,(Ne-me)*te+Ie,(Fe-we)*ee+je)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+we)*te+Ie,Fe*ee+je,(Ne+me)*te+Ie,(Fe-we)*ee+je,(Ne+we)*te+Ie,(Fe-me)*ee+je)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe+we)*ee+je,(Ne+we)*te+Ie,(Fe+me)*ee+je,(Ne+me)*te+Ie,(Fe+we)*ee+je)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-we)*te+Ie,Fe*ee+je,(Ne-me)*te+Ie,(Fe+we)*ee+je,(Ne-we)*te+Ie,(Fe+me)*ee+je)),me=Me*.4,we=.4,Ne=.8,Fe=.5;var Re=new go.PathFigure(Ne*te+Ie,(Fe-we)*ee+je,!0);he.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+we)*te+Ie,Fe*ee+je,(Ne+me)*te+Ie,(Fe-we)*ee+je,(Ne+we)*te+Ie,(Fe-me)*ee+je)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe+we)*ee+je,(Ne+we)*te+Ie,(Fe+me)*ee+je,(Ne+me)*te+Ie,(Fe+we)*ee+je)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+we-me*.5)*te+Ie,Fe*ee+je,Ne*te+Ie,(Fe+we)*ee+je,(Ne+we-me*.5)*te+Ie,(Fe+me)*ee+je)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe-we)*ee+je,(Ne+we-me*.5)*te+Ie,(Fe-me)*ee+je,Ne*te+Ie,(Fe-we)*ee+je).close()),me=Me*.8,we=.8,Ne=1,Fe=.5;var At=new go.PathFigure(Ne*te+Ie,(Fe-we)*ee+je,!0);return he.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+we)*te+Ie,Fe*ee+je,(Ne+me)*te+Ie,(Fe-we)*ee+je,(Ne+we)*te+Ie,(Fe-me)*ee+je)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe+we)*ee+je,(Ne+we)*te+Ie,(Fe+me)*ee+je,(Ne+me)*te+Ie,(Fe+we)*ee+je)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+we-me*.5)*te+Ie,Fe*ee+je,Ne*te+Ie,(Fe+we)*ee+je,(Ne+we-me*.5)*te+Ie,(Fe+me)*ee+je)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+Ie,(Fe-we)*ee+je,(Ne+we-me*.5)*te+Ie,(Fe-me)*ee+je,Ne*te+Ie,(Fe-we)*ee+je).close()),he}),go.Shape.defineFigureGenerator("Email",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Move,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Move,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.55*te,.54*ee)),he}),go.Shape.defineFigureGenerator("Ethernet",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,0).close());var de=new go.PathFigure(.1*te,ee,!0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var me=new go.PathFigure(.6*te,ee,!0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.6*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee).close());var we=new go.PathFigure(0,.5*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.75*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.75*te,.6*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.25*te,.6*ee)),he}),go.Shape.defineFigureGenerator("Power",function(Ae,te,ee){var he=new go.Geometry,se=Me*.4,de=.4,me=.5,we=.5,Ne=ce(),Fe=ce(),Ie=ce(),je=ce();wt(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.5,Ne,Ne,Fe,Ie,je);var Je=ve(Fe.x,Fe.y),Ke=new go.PathFigure(Fe.x*te,Fe.y*ee,!0);he.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),wt(me-de,we,me-de,we-se,me-se,we-de,me,we-de,.5,Ie,je,Fe,Ne,Ne),Ke.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*te,Fe.y*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee)),se=Me*.3,de=.3,wt(me-de,we,me-de,we-se,me-se,we-de,me,we-de,.5,Ie,je,Fe,Ne,Ne),Ke.add(new go.PathSegment(go.PathSegment.Line,Fe.x*te,Fe.y*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,je.x*te,je.y*ee,Ie.x*te,Ie.y*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),wt(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.5,Ne,Ne,Fe,Ie,je),Ke.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*te,Fe.y*ee,je.x*te,je.y*ee,Ie.x*te,Ie.y*ee).close());var Ke=new go.PathFigure(.45*te,0,!0);return he.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.55*te,.5*ee)),Ke.add(new go.PathSegment(go.PathSegment.Line,.55*te,0).close()),De(Ne),De(Fe),De(Ie),De(je),De(Je),he.spot1=new go.Spot(.25,.45),he.spot2=new go.Spot(.75,.8),he}),go.Shape.defineFigureGenerator("Fallout",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function de(me,we,Ne){me.add(new go.PathSegment(go.PathSegment.Move,(.3+we)*te,(.8+Ne)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.5+we)*te,(.5+Ne)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.1+we)*te,(.5+Ne)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.3+we)*te,(.8+Ne)*ee).close())}return de(se,0,0),de(se,.4,0),de(se,.2,-.3),he}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),he.spot1=new go.Spot(.3,.3),he.spot2=new go.Spot(.7,.7),he}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*te,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),he}),go.Shape.defineFigureGenerator("FireHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*te,0,-.25*te,.63*ee,.45*te,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*te,.42*ee,.48*te,.17*ee,.54*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*te,.18*ee,.59*te,.29*ee,.58*te,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,.6*ee,.8*te,.34*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*te,.31*ee,.87*te,.48*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,1.17*te,.76*ee,.82*te,.8*ee).close()),he.spot1=new go.Spot(.07,.445),he.spot2=new go.Spot(.884,.958),he}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=0,me=0,we=se*Me,Ne=.4*Math.SQRT2/2+.5,Fe=.5-.5*Math.SQRT2/2,Ie=1,je=.5,Je=.5,Ke=0,gt=new go.PathFigure(Ne*te,(1-Fe)*ee,!1);return he.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,je*ee,Ie*te,.7*ee,Ie*te,je*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Je+de)*te,(Ke+de)*ee,(.5+se+de)*te,(.5-we+de)*ee,(.5+we+de)*te,(.5-se+de)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+de)*te,.9*ee,(.5-se+de)*te,(.5+we+me)*ee,(.5-we+de)*te,.9*ee)),gt.add(new go.PathSegment(go.PathSegment.Move,(.25+de)*te,.8*ee)),gt.add(new go.PathSegment(go.PathSegment.Line,(.35+de)*te,.9*ee)),gt.add(new go.PathSegment(go.PathSegment.Line,(.2+de)*te,.95*ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(te,ee,!1);he.add(de);var me=new go.PathFigure(0,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.2*te,.35*ee,.3*te,.35*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.7*te,.65*ee,.8*te,.65*ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close()),he}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var se=new go.PathFigure(0,.2*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),he}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,0,.6*te,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,ee,.4*te,.5*ee,te,.5*ee).close());var de=new go.PathFigure(.45*te,.73*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,.73*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.38*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.63*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.31*te,.27*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.56*te,.27*ee)),he}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(.335*te,(1-.555)*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.68*ee,(1-.12)*te,.46*ee,(1-.02)*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.335*te,(1-.555)*ee,.02*te,.54*ee,.12*te,.46*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.365*te,(1-.595)*ee));var me=.5-.285,we=.5,Ne=me,Fe=Math.PI/4,Ie=4*(1-Math.cos(Fe))/(3*Math.sin(Fe)),je=Ie*.5,Je=me,Ke=me,gt=Ie*Je,Re=Ie*Ke;de.add(new go.PathSegment(go.PathSegment.Bezier,(we-Je)*te,Ne*ee,(we-(gt+Je)/2)*te,(Ne+(Ke+Re)/2)*ee,(we-Je)*te,(Ne+Re)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,we*te,(Ne-Ke)*ee,(we-Je)*te,(Ne-Re)*ee,(we-gt)*te,(Ne-Ke)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,(we+Je)*te,Ne*ee,(we+gt)*te,(Ne-Ke)*ee,(we+Je)*te,(Ne-Re)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(we+Je)*te,(Ne+Re)*ee,(we+(gt+Je)/2)*te,(Ne+(Ke+Re)/2)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*te,(1-.595)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee));var At=new go.PathFigure(.2*te,ee,!1);he.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var qe=new go.PathFigure(.8*te,ee,!1);return he.add(qe),qe.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var de=new go.PathFigure(.2*te,.2*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(te,ee,!1);he.add(de);var me=new go.PathFigure(.1*te,ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("Caution",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.1*ee,.5*te,0,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,te,ee,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,ee));var de=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-de)*te,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*te,.875*ee,de*te,de*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.325*ee,.575*te,.725*ee,.625*te,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.75*ee,.375*te,.375*ee,.425*te,.725*ee)),he}),go.Shape.defineFigureGenerator("Recycle",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*te,.85*ee,.17*te,.95*ee,.15*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*te,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*te,.775*ee));var de=new go.PathFigure(.475*te,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.225*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.275*te,.175*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.325*te,.05*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.05*ee,.35*te,0,.375*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.575*te,.375*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.525*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,.475*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.85*te,.315*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.32*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.65*te,.05*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,0,.65*te,.05*ee,.625*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.38*te,.0105*ee));var me=new go.PathFigure(.675*te,.575*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.875*te,.525*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.85*te,.95*ee,te,.8*ee,te,.85*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.95*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.85*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.725*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.7*te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Move,.675*te,.575*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.775*te,.775*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Me*.5,me=new go.PathFigure(te,se*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,se*te,ee,te,(se+de)*ee,(se+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-de)*te,ee,0,(se+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,se*te,0,0,(se-de)*ee,(se-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,se*ee,(se+de)*te,0,te,(se-de)*ee));var we=new go.PathFigure(se*te,0,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*te,.15*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,se*te,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.15*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.85*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.58*te,.1*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.78*te,.54*ee)),he}),go.Shape.defineFigureGenerator("Package",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(0,.15*ee,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,0)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.65*te,.15*ee).close()),he.spot1=new go.Spot(0,.1),he.spot2=new go.Spot(1,1),he}),go.Shape.defineFigureGenerator("Class",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var me=new go.PathFigure(0,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("Component",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close());var de=new go.PathFigure(0,.2*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var me=new go.PathFigure(0,.6*ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.45*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.45*te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),he}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee));var de=new go.PathFigure(.15*te,.6*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),he}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he}),go.Shape.defineFigureGenerator("Workcell",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("Supermarket",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he}),go.Shape.defineFigureGenerator("TruckShipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(te,.8*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee).close());var me=.1,we=Me*.1,Ne=.2,Fe=.9,Ie=new go.PathFigure((Ne-me)*te,Fe*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-me)*ee,(Ne-me)*te,(Fe-we)*ee,(Ne-we)*te,(Fe-me)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+me)*te,Fe*ee,(Ne+we)*te,(Fe-me)*ee,(Ne+me)*te,(Fe-we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+me)*ee,(Ne+me)*te,(Fe+we)*ee,(Ne+we)*te,(Fe+me)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-me)*te,Fe*ee,(Ne-we)*te,(Fe+me)*ee,(Ne-me)*te,(Fe+we)*ee).close()),me=.1,we=Me*.1,Ne=.8,Fe=.9;var je=new go.PathFigure((Ne-me)*te,Fe*ee,!0);return he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-me)*ee,(Ne-me)*te,(Fe-we)*ee,(Ne-we)*te,(Fe-me)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+me)*te,Fe*ee,(Ne+we)*te,(Fe-me)*ee,(Ne+me)*te,(Fe-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+me)*ee,(Ne+me)*te,(Fe+we)*ee,(Ne+we)*te,(Fe+me)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-me)*te,Fe*ee,(Ne-we)*te,(Fe+me)*ee,(Ne-me)*te,(Fe+we)*ee).close()),he}),go.Shape.defineFigureGenerator("KanbanPost",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),he}),go.Shape.defineFigureGenerator("Forklift",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var de=new go.PathFigure(0,.5*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var me=new go.PathFigure(.5*te,.8*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee));var we=new go.PathFigure(.5*te,.7*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var Ne=.1,Fe=Me*.1,Ie=.1,je=.9,Je=new go.PathFigure((Ie-Ne)*te,je*ee,!0);he.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je-Ne)*ee,(Ie-Ne)*te,(je-Fe)*ee,(Ie-Fe)*te,(je-Ne)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ne)*te,je*ee,(Ie+Fe)*te,(je-Ne)*ee,(Ie+Ne)*te,(je-Fe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je+Ne)*ee,(Ie+Ne)*te,(je+Fe)*ee,(Ie+Fe)*te,(je+Ne)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ne)*te,je*ee,(Ie-Fe)*te,(je+Ne)*ee,(Ie-Ne)*te,(je+Fe)*ee)),Ne=.1,Fe=Me*.1,Ie=.4,je=.9;var Ke=new go.PathFigure((Ie-Ne)*te,je*ee,!0);return he.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je-Ne)*ee,(Ie-Ne)*te,(je-Fe)*ee,(Ie-Fe)*te,(je-Ne)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ne)*te,je*ee,(Ie+Fe)*te,(je-Ne)*ee,(Ie+Ne)*te,(je-Fe)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je+Ne)*ee,(Ie+Ne)*te,(je+Fe)*ee,(Ie+Fe)*te,(je+Ne)*ee)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ne)*te,je*ee,(Ie-Fe)*te,(je+Ne)*ee,(Ie-Ne)*te,(je+Fe)*ee)),he}),go.Shape.defineFigureGenerator("RailShipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.4*ee).close());var de=new go.PathFigure(.45*te,.7*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var me=new go.PathFigure(.55*te,.4*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.4*ee).close());var Ie=.05,je=Me*.05,Je=.175,Ke=.95,we=new go.PathFigure((Je-Ie)*te,Ke*ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke-Ie)*ee,(Je-Ie)*te,(Ke-je)*ee,(Je-je)*te,(Ke-Ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(Je+Ie)*te,Ke*ee,(Je+je)*te,(Ke-Ie)*ee,(Je+Ie)*te,(Ke-je)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke+Ie)*ee,(Je+Ie)*te,(Ke+je)*ee,(Je+je)*te,(Ke+Ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(Je-Ie)*te,Ke*ee,(Je-je)*te,(Ke+Ie)*ee,(Je-Ie)*te,(Ke+je)*ee));var Ie=.05,je=Me*.05,Je=.375,Ke=.95,Ne=new go.PathFigure((Je-Ie)*te,Ke*ee,!0);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke-Ie)*ee,(Je-Ie)*te,(Ke-je)*ee,(Je-je)*te,(Ke-Ie)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Je+Ie)*te,Ke*ee,(Je+je)*te,(Ke-Ie)*ee,(Je+Ie)*te,(Ke-je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke+Ie)*ee,(Je+Ie)*te,(Ke+je)*ee,(Je+je)*te,(Ke+Ie)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Je-Ie)*te,Ke*ee,(Je-je)*te,(Ke+Ie)*ee,(Je-Ie)*te,(Ke+je)*ee));var Ie=.05,je=Me*.05,Je=.625,Ke=.95,Fe=new go.PathFigure((Je-Ie)*te,Ke*ee,!0);he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke-Ie)*ee,(Je-Ie)*te,(Ke-je)*ee,(Je-je)*te,(Ke-Ie)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Je+Ie)*te,Ke*ee,(Je+je)*te,(Ke-Ie)*ee,(Je+Ie)*te,(Ke-je)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke+Ie)*ee,(Je+Ie)*te,(Ke+je)*ee,(Je+je)*te,(Ke+Ie)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Je-Ie)*te,Ke*ee,(Je-je)*te,(Ke+Ie)*ee,(Je-Ie)*te,(Ke+je)*ee));var Ie=.05,je=Me*.05,Je=.825,Ke=.95,gt=new go.PathFigure((Je-Ie)*te,Ke*ee,!0);he.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke-Ie)*ee,(Je-Ie)*te,(Ke-je)*ee,(Je-je)*te,(Ke-Ie)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Je+Ie)*te,Ke*ee,(Je+je)*te,(Ke-Ie)*ee,(Je+Ie)*te,(Ke-je)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Ke+Ie)*ee,(Je+Ie)*te,(Ke+je)*ee,(Je+je)*te,(Ke+Ie)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Je-Ie)*te,Ke*ee,(Je-je)*te,(Ke+Ie)*ee,(Je-Ie)*te,(Ke+je)*ee).close());var Re=new go.PathFigure(0,ee,!1);return he.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he}),go.Shape.defineFigureGenerator("Warehouse",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var me=new go.PathFigure(.15*te,ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.15*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee).close());var we=.05,Ne=Me*.05,Fe=.35,Ie=.775,je=new go.PathFigure((Fe-we)*te,Ie*ee,!0);return he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Fe*te,(Ie-we)*ee,(Fe-we)*te,(Ie-Ne)*ee,(Fe-Ne)*te,(Ie-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Fe+we)*te,Ie*ee,(Fe+Ne)*te,(Ie-we)*ee,(Fe+we)*te,(Ie-Ne)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Fe*te,(Ie+we)*ee,(Fe+we)*te,(Ie+Ne)*ee,(Fe+Ne)*te,(Ie+we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Fe-we)*te,Ie*ee,(Fe-Ne)*te,(Ie+we)*ee,(Fe-we)*te,(Ie+Ne)*ee).close()),he}),go.Shape.defineFigureGenerator("ControlCenter",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee).close()),he}),go.Shape.defineFigureGenerator("Bluetooth",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),he}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he}),go.Shape.defineFigureGenerator("Globe",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.75*te,0,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.75*ee,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*te,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,.25*ee,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,.15*te,.25*ee,.15*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.85*te,.75*ee,.85*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.15*ee,.35*te,.3*ee,.65*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.85*ee,.35*te,.7*ee,.65*te,.7*ee)),he}),go.Shape.defineFigureGenerator("Wave",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.25*ee,.1*te,0,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.25*ee,.425*te,.5*ee,.575*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.25*ee,.8*te,0,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.75*ee,.1*te,.5*ee,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.75*ee,.425*te,ee,.575*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.75*ee,.8*te,.5*ee,.9*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Operator",function(Ae,te,ee){var he=new go.Geometry,se=.3,de=Me*.3,me=.5,we=.7,Ne=new go.PathFigure((me-se)*te,we*ee,!0);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee));var Fe=new go.PathFigure(0,.7*ee,!1);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),he}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.65*te,.3*ee,.65*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.35*te,.5*ee,.35*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*te,.6*ee,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.2*te,ee,.35*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,.7*te,.6*ee,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.8*te,ee,.65*te,.95*ee)),he}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,0,ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.4*ee,.8*te,ee,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),he}),go.Shape.defineFigureGenerator("Battery",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.1*ee));var de=new go.PathFigure(0,.6*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),he}),go.Shape.defineFigureGenerator("Delete",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Me*.5,me=.5,we=.5,Ne=new go.PathFigure((me-se)*te,we*ee,!0);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee));var Fe=new go.PathFigure(.15*te,.5*ee,!1);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Flag",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.1*ee,.15*te,0,.35*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,.65*te,.2*ee,.85*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.85*te,.6*ee,.65*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*te,.4*ee,.15*te,.4*ee).close()),he}),go.Shape.defineFigureGenerator("Help",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Me*.5,me=.5,we=.5,Ne=new go.PathFigure((me-se)*te,we*ee,!1);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee).close()),se=.05,de=Me*.05,me=.5,we=.8;var Fe=new go.PathFigure((me-se)*te,we*ee,!1);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee).close()),Fe.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),he}),go.Shape.defineFigureGenerator("Location",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.975*te,.025*ee,.5*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*te,.5*ee,.5*te,0,.025*te,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*te,.3*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var de=new go.PathFigure(.2*te,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.3*ee)),he}),go.Shape.defineFigureGenerator("Unlocked",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var de=new go.PathFigure(.2*te,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.35*ee)),he}),go.Shape.defineFigureGenerator("Gear",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.9375*te,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*te,.3316875*ee,.79840625*te,.39915625*ee,.7834375*te,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*te,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*te,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*te,.19378125*ee,.64228125*te,.2188125*ee,.603875*te,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*te,.239375*ee,.39759375*te,.20190625*ee,.36053125*te,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*te,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*te,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*te,.4375*ee,.21765625*te,.36059375*ee,.201875*te,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*te,.67596875*ee,.20221875*te,.603875*ee,.21884375*te,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*te,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*te,.80621875*ee,.36353125*te,.78340625*ee,.3991875*te,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*te,.760625*ee,.602375*te,.79809375*ee,.63946875*te,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*te,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*te,.56246875*ee,.78234375*te,.63940625*ee,.798125*te,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*te,.5*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.3*ee,0,.375*ee,.05*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.075*ee,.3*te,.225*ee,.4*te,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*te,.075*ee,.46*te,.05*ee,.525*te,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.4*ee,.525*te,.275*ee,.475*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.55*ee,te,.4*ee,te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.7*ee,.675*te,.55*ee,.675*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,.85*ee,.65*te,.7*ee,.65*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*te,ee,.61*te,.85*ee,.61*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*te,ee,0,ee).close()),he}),go.Shape.defineFigureGenerator("Map",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),he}),go.Shape.defineFigureGenerator("Eject",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var de=new go.PathFigure(0,ee*.6,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close()),he}),go.Shape.defineFigureGenerator("Pencil",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.85).close());var de=new go.PathFigure(.126*te,.85*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.126*te,.45*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.322*te,.45*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.322*te,.85*ee).close());var me=new go.PathFigure(.402*te,.85*ee,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.402*te,.45*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.598*te,.45*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.598*te,.85*ee).close());var we=new go.PathFigure(.678*te,.85*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.678*te,.45*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.874*te,.45*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.874*te,.85*ee).close());var Ne=new go.PathFigure(.5*te,.1*ee,!1);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),he}),go.Shape.defineFigureGenerator("Staircase",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),he}),go.Shape.defineFigureGenerator("5Bars",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*(1-.184)).close());var de=new go.PathFigure(te*.204,ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.204,ee*(1-.184))),de.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*(1-.184*2))),de.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*1).close());var me=new go.PathFigure(te*.408,ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.408,ee*(1-.184*2))),me.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*(1-.184*3))),me.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*1).close());var we=new go.PathFigure(te*.612,ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.612,ee*(1-.184*3))),we.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*(1-.184*4))),we.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*1).close());var Ne=new go.PathFigure(te*.816,ee,!0);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),Ne.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),Ne.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),he}),go.Shape.defineFigureGenerator("PC",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,0).close());var de=new go.PathFigure(te*.055,.07*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.07)),de.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.1).close());var me=new go.PathFigure(te*.055,.13*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.13)),me.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.16)),me.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.16).close());var we=new go.PathFigure(te*.055,.18*ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.18)),we.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.21)),we.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.21).close());var Ne=new go.PathFigure(te*1,0,!0);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),he}),go.Shape.defineFigureGenerator("Plane",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*te,.525*ee,0,.4*ee,.225*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.2*ee,.975*te,0,te,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee).close()),he}),go.Shape.defineFigureGenerator("Key",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*te,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*te,.5*ee,.075*te,.075*ee).close()),he}),go.Shape.defineFigureGenerator("FilmTape",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*0,te*.3,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var de=new go.PathFigure(0,0,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*0)),de.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*1,te*.3,te*.055)),de.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var me=new go.PathFigure(te*.11,ee*.1,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.1)),me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.8)),me.add(new go.PathSegment(go.PathSegment.Line,te*.11,ee*.8).close());var we=new go.PathFigure(te*(.11+.24133333*1+.028*1),ee*.1,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.1)),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.8)),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*1),ee*.8).close());var Ne=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),he}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ae,te,ee){var he=new go.Geometry,se=8,de=se*Me,me=new go.PathFigure(se,0,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.86,0)),me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.14)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-de,te-de,ee)),me.add(new go.PathSegment(go.PathSegment.Line,se,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,de,ee,0,ee-de)),me.add(new go.PathSegment(go.PathSegment.Line,0,se)),me.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,de,de,0).close());var we=new go.PathFigure(te*.83,0,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.3)),we.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.3)),we.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*0).close());var Ne=new go.PathFigure(te*.83,ee*1,!1);he.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var Fe=new go.PathFigure(te*.78,ee*.05,!1);return he.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),Fe.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),Fe.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),he}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=15),he=Math.min(he,te/3),he=Math.min(he,ee/3);var se=he*Me,de=ee*.8,me=new go.Geometry,we=new go.PathFigure(he,0,!0);return me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te-he,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,te,he,te-se,0,te,se)),we.add(new go.PathSegment(go.PathSegment.Line,te,de-he)),we.add(new go.PathSegment(go.PathSegment.Bezier,te-he,de,te,de-se,te-se,de)),we.add(new go.PathSegment(go.PathSegment.Line,te*.7,de)),we.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee)),we.add(new go.PathSegment(go.PathSegment.Line,te*.55,de)),we.add(new go.PathSegment(go.PathSegment.Line,he,de)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,de-he,se,de,0,de-se)),we.add(new go.PathSegment(go.PathSegment.Line,0,he)),we.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,se,se,0).close()),se>1?(me.spot1=new go.Spot(0,0,se,se),me.spot2=new go.Spot(1,.8,-se,-se)):(me.spot1=go.Spot.TopLeft,me.spot2=new go.Spot(1,.8)),me}),go.Shape.defineFigureGenerator("Repeat",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.45).close());var de=new go.PathFigure(te*1,ee*.55,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.55)),de.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.55)),de.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*0)),de.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),de.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.55).close()),he}),go.Shape.defineFigureGenerator("Windows",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*te,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.9).close());var de=new go.PathFigure(te*.1,ee*.2,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.25)),de.add(new go.PathSegment(go.PathSegment.Line,te*.22,ee*.285)),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.32)),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.37)),de.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.32)),de.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.25).close());var me=new go.PathFigure(te*.28,ee*.37,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.37)),me.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.41)),me.add(new go.PathSegment(go.PathSegment.Line,te*.28,ee*.41).close()),he}),go.Shape.defineFigureGenerator("Beaker",function(Ae,te,ee){var he=new go.Geometry,se=15,de=se*Me,me=new go.PathFigure(te*.62,ee*.475,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-de,te-de,ee)),me.add(new go.PathSegment(go.PathSegment.Line,se,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,de,ee,0,ee-de)),me.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.475)),me.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.03)),me.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*0)),me.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*0)),me.add(new go.PathSegment(go.PathSegment.Line,te*.62,ee*.03).close()),de>1?(he.spot1=new go.Spot(0,0,de,de),he.spot2=new go.Spot(1,1,-de,-de)):(he.spot1=go.Spot.TopLeft,he.spot2=go.Spot.BottomRight),he}),go.Shape.defineFigureGenerator("Download",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close());var me=new go.PathFigure(te*.4,ee*0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.66)),me.add(new go.PathSegment(go.PathSegment.Line,te*(1-.26),ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*0).close()),he}),go.Shape.defineFigureGenerator("Bin",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close()),he}),go.Shape.defineFigureGenerator("Upload",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close());var me=new go.PathFigure(te*.5,ee*0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.63)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.63)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.74,ee*.25).close()),he}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close()),he}),go.Shape.defineFigureGenerator("Drink",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close());var de=new go.PathFigure(te*.235,ee*.28,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.765,ee*.28)),de.add(new go.PathSegment(go.PathSegment.Line,te*.655,ee*.97)),de.add(new go.PathSegment(go.PathSegment.Line,te*.345,ee*.97).close()),he}),go.Shape.defineFigureGenerator("4Arrows",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.25).close()),he}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Cn={},un="5.0",ve={},ce=null,De=!1,ze=!1,wt=null,Ze=!1,ht=null,Me=null,yt=0;yt<arguments.length;yt++){var ct=arguments[yt];if(ct!==null)switch(typeof ct){case"number":un=ct.toFixed(1);break;case"string":ct.match(new RegExp("^[0-9]\\.[0-9]+$"))?un=ct:wt=ct;break;case"object":typeof ct.is3D!="undefined"?ce=ct:ve=ct;break;case"boolean":De=ct,ze=!0;break}}ce===null&&(ce={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ve.material_id!==void 0&&!ze&&(De=!0)),wt!==null&&ve.id===void 0&&(ve.id=wt);var He="",st="",mt=!1,dt=null,Ae=null,te=null,ee=!1,he=null,se=null,de=null,me=null,we=null;ve.height!==void 0&&(ve.height=Math.round(ve.height)),ve.width!==void 0&&(ve.width=Math.round(ve.width));var Ne=function(Ft){return parseFloat(Ft)>4?parseFloat(Ft):5};Cn.setHTML5Codebase=function(Ft,$t){Me=Ft,Nt(Ft,$t)},Cn.setJavaCodebase=Cn.setJavaCodebaseVersion=Cn.isCompiledInstalled=Cn.setPreCompiledScriptPath=Cn.setPreCompiledResourcePath=function(){},Cn.setHTML5CodebaseVersion=function(Ft,$t){var en=parseFloat(Ft);if(en!==NaN&&en<5){console.log("The GeoGebra HTML5 codebase version "+en+" is deprecated. Using version latest instead.");return}ht=Ft,$e(Ft,$t)},Cn.getHTML5CodebaseVersion=function(){return Ae},Cn.getParameters=function(){return ve},Cn.setFontsCSSURL=function(Ft){me=Ft},Cn.setGiacJSURL=function(Ft){},Cn.setJNLPFile=function(Ft){He=Ft},Cn.setJNLPBaseDir=function(Ft){},Cn.inject=function(){function Ft(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var $t="auto",en=ve.id,Nn,fn=!1,Mn=0;Mn<arguments.length;Mn++){var pt=arguments[Mn];typeof pt=="string"?(pt=pt.toLowerCase(),pt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?$t=pt:en=arguments[Mn]):typeof pt=="boolean"?fn=pt:pt instanceof HTMLElement&&(Nn=pt)}Ln();function Ln(){if(!Ze){setTimeout(Ln,200);return}$t=Ut($t);var Un=Nn||document.getElementById(en);if(!Un){console.log("possibly bug on ajax loading? ");return}if(Cn.removeExistingApplet(Un,!1),ve.width===void 0&&Un.clientWidth&&(ve.width=Un.clientWidth),ve.height===void 0&&Un.clientHeight&&(ve.height=Un.clientHeight),!(ve.width&&ve.height)&&$t==="html5"&&(delete ve.width,delete ve.height),dt=$t,$t==="screenshot")qe(Un,ve);else{var Zt=!1;ve.hasOwnProperty("playButton")&&ve.playButton||ve.hasOwnProperty("clickToLoad")&&ve.clickToLoad?Zt=!0:ve.hasOwnProperty("playButtonAutoDecide")&&ve.playButtonAutoDecide&&(Zt=(!Fe()||Ft())&&Ie()),Zt?(dt="screenshot",kt(Un,ve,fn,$t)):At(Un,ve,fn)}}};function Fe(){try{return window.self!==window.top}catch(Ft){return!0}}function Ie(){return ve.hasOwnProperty("screenshotGenerator")&&ve.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Cn.getViews=function(){return ce},Cn.isJavaInstalled=function(){return!1};var je=function(Ft){var $t=function(Mn){var pt=JSON.parse(Mn),Ln=function(tn){return tn.type=="G"||tn.type=="E"},Un=pt.elements?pt.elements.filter(Ln)[0]:pt;if(!Un||!Un.url){en();return}ve.fileName=Un.url,Je(Un.settings||{}),ce.is3D=!0;var Zt="https://www.geogebra.org/images/";Cn.setPreviewImage(he||Un.previewUrl,Zt+"GeoGebra_loading.png",Zt+"applet_play.png"),Ft()},en=function(){ve.onError&&ve.onError(),cn("Error: Fetching material (id "+ve.material_id+") failed.",ve)},Nn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",fn="/materials/"+ve.material_id+"?scope=basic";Ke("https://"+Nn+"/api/proxy.php?path="+encodeURIComponent(fn),$t,en)};function Je(Ft){var $t=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(en){Ft[en]=!!Ft[en]}),$t.forEach(function(en){ve[en]===void 0&&Ft[en]!==void 0&&(ve[en]=Ft[en])}),ve.showToolBarHelp===void 0&&(ve.showToolBarHelp=ve.showToolBar)}function Ke(Ft,$t,en){var Nn=new XMLHttpRequest;Nn.open("GET",Ft),Nn.onload=function(){$t(Nn.responseText)},Nn.onerror=en,Nn.send()}Cn.isHTML5Installed=function(){return!0},Cn.getLoadedAppletType=function(){return dt},Cn.setPreviewImage=function(Ft,$t,en){he=Ft,se=$t,de=en},Cn.removeExistingApplet=function(Ft,$t){var en;typeof Ft=="string"&&(Ft=document.getElementById(Ft)),dt=null;var Nn=null;for(en=0;en<Ft.childNodes.length;en++){var fn=Ft.childNodes[en],Mn=fn.className;Mn==="applet_screenshot"?$t?(fn.style.display="block",dt="screenshot"):fn.style.display="none":Mn!=="applet_scaler prerender"&&(Ft.removeChild(fn),Nn=Mn&&Mn.indexOf("appletParameters")!=-1?fn.id:null,en--)}var pt=ve.id!==void 0?ve.id:Nn,Ln=window[pt];Ln&&typeof Ln.getBase64=="function"&&(Ln.remove(),window[pt]=null)},Cn.refreshHitPoints=function(){if(Ne(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ft=Cn.getAppletObject();return Ft&&typeof Ft.recalculateEnvironments=="function"?(Ft.recalculateEnvironments(),!0):!1},Cn.startAnimation=function(){var Ft=Cn.getAppletObject();return Ft&&typeof Ft.startAnimation=="function"?(Ft.startAnimation(),!0):!1},Cn.stopAnimation=function(){var Ft=Cn.getAppletObject();return Ft&&typeof Ft.stopAnimation=="function"?(Ft.stopAnimation(),!0):!1},Cn.getAppletObject=function(){var Ft=ve.id!==void 0?ve.id:"ggbApplet";return window[Ft]},Cn.resize=function(){};var gt=function(Ft,$t,en){var Nn=document.createElement("param");Nn.setAttribute("name",$t),Nn.setAttribute("value",en),Ft.appendChild(Nn)},Re=function(Ft){return Ft&&Ft!=="false"},At=function(Ft,$t,en){Ne(Ae)<=4.2&&(en=!0);var Nn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ae||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Nn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var fn=document.createElement("div");fn.classList.add("appletParameters","notranslate");var Mn=$t.width,pt=$t.height;if($t.disableAutoScale=$t.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():$t.disableAutoScale,$t.width!==void 0)if(Ne(Ae)<=4.4)Re($t.showToolBar)&&($t.height-=7),Re($t.showAlgebraInput)&&($t.height-=37),$t.width<605&&Re($t.showToolBar)&&($t.width=605,Mn=605);else{var Ln=100;(Re($t.showToolBar)||Re($t.showMenuBar))&&($t.hasOwnProperty("customToolBar")&&($t.customToolbar=$t.customToolBar),Ln=Re($t.showMenuBar)?245:155),Mn<Ln&&($t.width=Ln,Mn=Ln)}fn.style.border="none",fn.style.display="inline-block";for(var Un in $t)$t.hasOwnProperty(Un)&&Un!=="appletOnLoad"&&fn.setAttribute("data-param-"+Un,$t[Un]);me&&fn.setAttribute("data-param-fontscssurl",me),Cn.resize=function(){GGBAppletUtils.responsiveResize(Ft,$t)},window.addEventListener("resize",function(Se){Cn.resize()});var Zt=typeof $t.appletOnLoad=="function"?$t.appletOnLoad:function(){};if(!en&&$t.width!==void 0){$t.hasOwnProperty("showSplash")||fn.setAttribute("data-param-showSplash","false");var tn=Ft.querySelector(".applet_scaler.prerender"),Rt=tn!==null;if(Rt)var Lt=tn.querySelector(".ggb_preview");else{var Lt=Gt(Mn,pt,$t.borderColor,!1);tn=document.createElement("div"),tn.className="applet_scaler",tn.style.position="relative",tn.style.display="block",tn.style.width=Mn+"px",tn.style.height=pt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(tn,"66%"),Ne(Ae)>=5?($t.appletOnLoad=function(Se){var Be=Ft.querySelector(".ggb_preview");Be&&Be.parentNode.removeChild(Be),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(tn),window.GGBT_wsf_view&&$(window).trigger("resize"),Zt(Se)},Rt||tn.appendChild(Lt)):fn.appendChild(Lt),tn.appendChild(fn),Rt||Ft.appendChild(tn),setTimeout(function(){Cn.resize()},1)}else{var ut=document.createElement("div");ut.className="applet_scaler",ut.style.position="relative",ut.style.display="block",ut.appendChild(fn),Ft.appendChild(ut),$t.appletOnLoad=function(Se){Cn.resize(),Zt(Se)}}function Ge(Se,Be){Be&&typeof Be.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Se,Be.appletOnLoad):renderGGBElement(Se),cn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Be)}function Dt(Se,Be){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Se,params:Be}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(_e){Ge(_e.article,_e.params)}),html5AppletsToProcess=null)},Ne(Ae)<5&&(Se.className+=" geogebraweb")):Ge(Se,Be)}if(Nn){scriptLoadStarted=!0;for(var Tt=0;Tt<fn.childNodes.length;Tt++){var ot=fn.childNodes[Tt].tagName;ot==="TABLE"&&(fn.removeChild(fn.childNodes[Tt]),Tt--)}if(ggbHTML5LoadedScript!==null){var et=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');et!=null&&et.parentNode.removeChild(et)}var Te=document.createElement("script"),xe=function(){Dt(fn,$t)};Te.src=st+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Ae,ggbHTML5LoadedScript=Te.src,cn("GeoGebra HTML5 codebase loaded: '"+st+"'.",$t),!Me&&(!ht||ht=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),xe()):st.requirejs?__webpack_require__.e(4184).then(function(){var Se=[__webpack_require__(74620)];xe.apply(null,Se)}.bind(this)).catch(__webpack_require__.oe):(Te.onload=xe,Ft.appendChild(Te))}else Dt(fn,$t);$t.height=pt,$t.width=Mn},qe=function(Ft,$t,en){var Nn=Gt($t.width,$t.height,$t.borderColor,en),fn=document.createElement("div");fn.style.position="relative",fn.style.display="block",fn.style.width=$t.width+"px",fn.style.height=$t.height+"px",fn.className="applet_screenshot applet_scaler"+(en?" applet_screenshot_play":""),fn.appendChild(Nn);var Mn=GGBAppletUtils.getScale($t,Ft,en);en?(Ft.appendChild(Bt()),window.GGBT_wsf_view||(Ft.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(fn,"66%"),Ft.appendChild(fn),Mn!==1&&!isNaN(Mn)&&(GGBAppletUtils.scaleElement(fn,Mn),fn.style.width=$t.width+"px",fn.style.height=$t.height+"px",fn.parentNode.style.width=$t.width*Mn+"px",fn.parentNode.style.height=$t.height*Mn+"px"),Cn.resize=function(){Et(Ft,Nn,fn,en)},window.addEventListener("resize",function(pt){Cn.resize()}),Cn.resize()};function Et(Ft,$t,en,Nn){if(Ft.contains($t)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ft.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ft)}var fn=GGBAppletUtils.getScale(ve,Ft,Nn);en.parentNode!==null&&(!isNaN(fn)&&fn!==1?(GGBAppletUtils.scaleElement(en,fn),en.parentNode.style.width=ve.width*fn+"px",en.parentNode.style.height=ve.height*fn+"px"):(GGBAppletUtils.scaleElement(en,1),en.parentNode.style.width=ve.width+"px",en.parentNode.style.height=ve.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ft),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Cn.onExitFullscreen=function(Ft,$t){$t.appendChild(Ft)};var kt=function(Ft,$t,en,Nn){qe(Ft,$t,!0);for(var fn=function(){var Ln=[];for(pt=0;pt<Ft.childNodes.length;pt++)Ln.push(Ft.childNodes[pt]);if(window.GGBT_wsf_view){var Un=window.GGBT_wsf_view.renderFullScreen(Ft,$t.id),Zt=document.getElementById("fullscreencontainer"),tn=jQuery(Ft).find(".fullscreencontent");tn.length>0?(Un.remove(),tn.attr("id","fullscreencontent").show(),jQuery(Zt).append(tn),window.dispatchEvent(new Event("resize"))):At(Un,$t,!1),window.GGBT_wsf_view.launchFullScreen(Zt)}else dt=Nn,At(Ft,$t,!1);if(!window.GGBT_wsf_view)for(pt=0;pt<Ln.length;pt++)Ft.removeChild(Ln[pt])},Mn=Ft.getElementsByClassName("ggb_preview_play"),pt=0;pt<Mn.length;pt++)Mn[pt].addEventListener("click",fn,!1),Mn[pt].addEventListener("ontouchstart",fn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ft),Ie()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Bt=function(){var Ft=document.createElement("div");if(Ft.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var $t='.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");}',en=document.createElement("style");en.styleSheet?en.styleSheet.cssText=$t:en.appendChild(document.createTextNode($t)),document.getElementsByTagName("head")[0].appendChild(en)}return Ft},Gt=function(Ft,$t,en,Nn){var fn=document.createElement("div");fn.className="ggb_preview",fn.style.position="absolute",fn.style.zIndex="90",fn.style.width=Ft-2+"px",fn.style.height=$t-2+"px",fn.style.top="0px",fn.style.left="0px",fn.style.overflow="hidden",fn.style.backgroundColor="white";var Mn="lightgrey";en!==void 0&&(en==="none"?Mn="transparent":Mn=en),fn.style.border="1px solid "+Mn;var pt=document.createElement("img");if(pt.style.position="relative",pt.style.zIndex="1000",pt.style.top="-1px",pt.style.left="-1px",he!==null&&pt.setAttribute("src",he),pt.style.opacity=.7,se!==null){var Ln,Un,Zt;if(!Nn){Ln=document.createElement("img"),Ln.style.position="absolute",Ln.style.zIndex="1001",Ln.style.opacity=1,pt.style.opacity=.3,Un=360,Un>Ft/4*3&&(Un=Ft/4*3),Zt=Un/5.8,Ln.setAttribute("src",se),Ln.setAttribute("width",Un),Ln.setAttribute("height",Zt);var tn=(Ft-Un)/2,Rt=($t-Zt)/2;Ln.style.left=tn+"px",Ln.style.top=Rt+"px",fn.appendChild(Ln)}}return fn.appendChild(pt),fn},Ut=function(Ft){return Ft=Ft.toLowerCase(),Ft==="html5"||Ft==="screenshot"?Ft:"html5"},lt=["web","webSimple","web3d","tablet","tablet3d","phone"],$e=function(Ft,$t){if(Ae=Ft,$t){Nt(Ae,!0);return}var en=!De;if(en){var Nn=Ne(Ae);!isNaN(Nn)&&Nn<4.4&&(en=!1)}var fn,Mn;window.location.protocol.substr(0,4)==="http"?fn=window.location.protocol:fn="http:";var pt=Ae.indexOf("//");pt>0?Mn=Ae:pt===0?Mn=fn+Ae:Mn="https://www.geogebra.org/apps/5.2.814.0/";for(var Ln in lt)if(Ae.slice(lt[Ln].length*-1)===lt[Ln]||Ae.slice((lt[Ln].length+1)*-1)===lt[Ln]+"/"){Nt(Mn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&en&&!ce.is3D&&!ce.AV&&!ce.SV&&!ce.CV&&!ce.EV2&&!ce.CP&&!ce.PC&&!ce.DA&&!ce.FI&&!ce.PV&&!Re(ve.showToolBar)&&!Re(ve.showMenuBar)&&!Re(ve.showAlgebraInput)&&!Re(ve.enableRightClick)&&(!ve.appName||ve.appName=="classic")?Mn+="webSimple/":Mn+="web3d/",Nt(Mn,!1)},Nt=function(Ft,$t){if(Ft.requirejs){st=Ft;return}Ft.slice(-1)!=="/"&&(Ft+="/"),st=Ft,$t===null&&($t=Ft.indexOf("http")===-1),mt=$t,te="web.nocache.js",ee=!1;var en=st.split("/");en.length>1&&(!$t&&en[en.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):lt.indexOf(en[en.length-2])>=0&&(te=en[en.length-2]+".nocache.js")),en=Ft.split("/"),Ae=en[en.length-3],Ae.substr(0,4)==="test"?Ae=Ae.substr(4,1)+"."+Ae.substr(5,1):(Ae.substr(0,3)==="war"||Ae.substr(0,4)==="beta")&&(Ae="5.0");var Nn=parseFloat(Ae);Nn!==NaN&&Nn<5&&Ft.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Nn+" is deprecated. Using version latest instead."),$e("5.0",$t))},cn=function(Ft,$t){window.console&&window.console.log&&(!$t||typeof $t.showLogging=="undefined"||$t.showLogging&&$t.showLogging!=="false")&&console.log(Ft)};ve.material_id!==void 0?je(sn):sn();function sn(){var Ft=un;ht!==null?Ft=ht:parseFloat(Ft)<5&&(Ft="5.0"),$e(Ft,!1),Me!==null&&Nt(Me,mt),Ze=!0}return Cn},GGBAppletUtils=function(){"use strict";function Cn(){return window.GGBT_wsf_edit!==void 0}function un(Ze,ht){ht!=1?(Ze.style.transformOrigin="0% 0% 0px",Ze.style.webkitTransformOrigin="0% 0% 0px",Ze.style.transform="scale("+ht+","+ht+")",Ze.style.webkitTransform="scale("+ht+","+ht+")",Ze.style.maxWidth="initial",Ze.querySelector(".ggb_preview")!==null&&(Ze.querySelector(".ggb_preview").style.maxWidth="initial"),Ze.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ze.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ze.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ze.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ze.style.transform="none",Ze.style.webkitTransform="none")}function ve(Ze,ht,Me,yt,ct,He){var st=null;if(He!=null&&He!="")for(var mt=Ze.parentNode;mt!=null;)if((" "+mt.className+" ").indexOf(" "+He+" ")>-1){st=mt;break}else mt=mt.parentNode;var dt=0,Ae=0,te=0,ee=0,he=0,se=0,de=0;if(st)dt=st.offsetWidth,Ae=Math.max(yt?st.offsetWidth:0,st.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(dt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),te=dt):(dt=window.innerWidth,Ae=window.innerHeight,te=window.innerWidth),Ze){var me=Ze.getBoundingClientRect();me.left>0&&me.left<=dt&&(ct===void 0||!ct)&&(document.dir==="rtl"?(he=dt-me.width-me.left,se=te<=480?10:30):(se=me.left,he=te<=480?10:30),ee=se+he)}if(Ze&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var we=Ze.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,de=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,de=40)}}return Ze&&((Me===void 0||!Me)&&ht>0&&ht+ee<dt?dt=ht:dt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(Ae-=de)),{width:dt,height:Ae}}function ce(Ze,ht,Me,yt,ct){if(Ze.isScreenshoGenerator)return 1;var He=yt!==void 0&&yt,st=Ze.noScaleMargin!=null&&Ze.noScaleMargin,mt=function(we){return we&&we!=="false"},dt=mt(Ze.autoHeight),Ae=ve(ht,Ze.width,Me,dt,He&&window.GGBT_wsf_view||st,ct),te=parseInt(Ae.width),ee=Ze.width,he=Ze.height;if(ee===void 0){var se=ht.querySelector(".appletParameters");se&&(ee=se.offsetWidth,he=se.offsetHeight)}var de=te/ee,me=He?1:Ae.height/he;return Me!==void 0&&!Me&&(de=Math.min(1,de),me=Math.min(1,me)),Math.min(de,me)}function De(Ze,ht,Me){var yt=1,ct,He=!1;if(Ze.hasOwnProperty("allowUpscale")&&(He=Ze.allowUpscale),Ze.hasOwnProperty("scale")&&(yt=parseFloat(Ze.scale),(isNaN(yt)||yt===null||yt===0)&&(yt=1),yt>1&&(He=!0)),ht&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(He=!0),!(Ze.hasOwnProperty("disableAutoScale")&&Ze.disableAutoScale))ct=ce(Ze,ht,He,Me,Ze.scaleContainerClass);else return yt;return He&&(!Ze.hasOwnProperty("scale")||yt===1)?ct:Math.min(yt,ct)}function ze(Ze){var ht=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),yt=Ze.getBoundingClientRect(),ct=(ht-yt.width)/2,He=(Me-yt.height)/2;He<0&&(He=0),Ze.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ct<40?Ze.style.left="40px":Ze.style.left=ct+"px",Ze.style.top=He+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(He<40?Ze.style.top="40px":Ze.style.top=He+"px",Ze.style.left=ct+"px")}function wt(Ze,ht){var Me=Ze.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ht.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ze)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var yt=De(ht,Ze);Cn()&&Me.setAttribute("data-param-scale",yt);for(var ct=null,He=0;He<Ze.childNodes.length;He++)if(Ze.childNodes[He].className!==void 0&&Ze.childNodes[He].className.match(/^applet_scaler/)){ct=Ze.childNodes[He];break}if(ct!==null&&ct.querySelector(".noscale")!==null)return;var st=ht.id!==void 0?ht.id:"ggbApplet",mt=window[st];(mt==null||!mt.recalculateEnvironments)&&ct!==null&&!ct.className.match(/fullscreen/)&&(ct.parentNode.style.transform="",!isNaN(yt)&&yt!==1?(ct.parentNode.style.width=ht.width*yt+"px",ct.parentNode.style.height=ht.height*yt+"px",un(ct,yt)):(un(ct,1),ct.parentNode.style.width=ht.width+"px",ct.parentNode.style.height=ht.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ze(Ze),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Me).parents(".content-added-content"))}}return{responsiveResize:wt,isFlexibleWorksheetEditor:Cn,positionCenter:ze,getScale:De,scaleElement:un}}();__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 Cn=n.location.search;return Cn.indexOf(J)!=-1||Cn.indexOf(K)!=-1}function q(Cn,un){}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(Cn){var un=s[L].bindings;s[L].bindings=function(){for(var ve=un?un():{},ce=Cn[webModule.__softPermutationId],De=O;De<ce.length;De++){var ze=ce[De];ve[ze[O]]=ze[P]}return ve}};var t;function u(){return v(),t}function v(){if(!t){var Cn=o.createElement(Q);if(Cn.id=L,Cn.style.cssText=R+S,Cn.tabIndex=-1,o.body.appendChild(Cn),t=Cn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var un=document.compatMode==U?V:W;t.write(un+X),t.close()}}}function w(Cn){function un(ce){function De(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ze=De();if(ze){ce();return}function wt(){if(!ze){if(!De())return;ze=!0,ce(),o.removeEventListener&&o.removeEventListener(Z,wt,!1),Ze&&clearInterval(Ze)}}o.addEventListener&&o.addEventListener(Z,wt,!1);var Ze=setInterval(function(){wt()},$)}function ve(ce){var De=u(),ze=De.body,wt=De.createElement(_);wt.language=ab,wt.crossOrigin=W,wt.src=ce,webModule.__errFn&&(wt.onerror=function(){webModule.__errFn(L,new Error(bb+ce))}),ze.appendChild(wt)}un(function(){ve(Cn)})}webModule.__startLoadingFragment=function(Cn){return C(Cn)},webModule.__installRunAsyncCode=function(Cn){var un=u(),ve=un.body,ce=un.createElement(_);ce.language=ab,ce.text=Cn,ve.appendChild(ce),ve.removeChild(ce)};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(Cn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Cn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Cn){var un=c[Cn];return un==null?null:un},r=d,webModule.__errFn=e}function B(){function Cn(Ze){var ht=Ze.lastIndexOf(rb);ht==-1&&(ht=Ze.length);var Me=Ze.indexOf(sb);Me==-1&&(Me=Ze.length);var yt=Ze.lastIndexOf(tb,Math.min(Me,ht));return yt>=O?Ze.substring(O,yt+P):W}function un(Ze){if(!Ze.match(/^\w+:\/\//)){var ht=o.createElement(ub);ht.src=Ze+vb,Ze=Cn(ht.src)}return Ze}function ve(){var Ze=__gwt_getMetaProperty(wb);return Ze!=null?Ze:W}function ce(){for(var Ze=o.getElementsByTagName(_),ht=O;ht<Ze.length;++ht)if(Ze[ht].src.indexOf(xb)!=-1)return Cn(Ze[ht].src);return W}function De(){var Ze=o.getElementsByTagName(yb);return Ze.length>O?Ze[Ze.length-P].href:W}function ze(){var Ze=o.location;return Ze.href==Ze.protocol+zb+Ze.host+Ze.pathname+Ze.search+Ze.hash}var wt=ve();return wt==W&&(wt=ce()),wt==W&&(wt=De()),wt==W&&ze()&&(wt=Cn(o.location.href)),wt=un(wt),wt}function C(Cn){return Cn.match(/^\//)||Cn.match(/^[a-zA-Z]+:\/\//)?Cn:webModule.__moduleBase+Cn}function D(){var Cn=[],un=O,ve=[],ce=[];function De(Ze){var ht=ce[Ze](),Me=ve[Ze];if(ht in Me)return ht;var yt=[];for(var ct in Me)yt[Me[ct]]=ct;throw r&&r(Ze,yt,ht),null}if(__gwt_isKnownPropertyValue=function(Ze,ht){return ht in ve[Ze]},webModule.__getPropMap=function(){var Ze={};for(var ht in ve)ve.hasOwnProperty(ht)&&(Ze[ht]=De(ht));return Ze},webModule.__computePropValue=De,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ze;try{ze=Cb;var wt=ze.indexOf(Db);wt!=-1&&(un=parseInt(ze.substring(wt+P),$),ze=ze.substring(O,wt))}catch(Ze){}return webModule.__softPermutationId=un,C(ze+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(Cn,un,ve){"use strict";ve.d(un,{Ax:function(){return wt},Ds:function(){return Ze},KI:function(){return Me},SI:function(){return ze},f1:function(){return De}});var ce=ve(3294);function De(yt){let ct=!0;if(yt.length>0){for(let He=0;He<yt.length;He++)if(yt[He].compile_success==0||!yt[He].compile_success){ct=!1;break}}else ct=!1;return ct}function ze(yt,ct=""){let He=[];for(let st=0;st<yt.length;st++){let mt=yt[st],dt=ct?`${ct}/${mt.name}`:`${mt.name}`;He.push({title:mt.name,type:mt.type,isLeaf:mt.type!=="tree",key:dt})}return He}function wt(yt,ct,He){for(let st=0;st<yt.length;st++){let mt=yt[st];if(mt.key===ct){mt.children=He;break}mt.children&&wt(mt.children,ct,He)}return yt}function Ze(yt,ct,He){let st;return function(){let mt=this,dt=arguments,Ae=function(){st=null,He||yt.apply(mt,dt)},te=He&&!st;clearTimeout(st),st=setTimeout(Ae,ct),te&&yt.apply(mt,dt)}}const ht=!0,Me=ce.Z.API_SERVER},6021:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Ae}});var ce=ve(3113),De=ve(59301),ze=Object.defineProperty,wt=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,ct=(te,ee,he)=>ee in te?ze(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:he}):te[ee]=he,He=(te,ee)=>{for(var he in ee||(ee={}))Me.call(ee,he)&&ct(te,he,ee[he]);if(ht)for(var he of ht(ee))yt.call(ee,he)&&ct(te,he,ee[he]);return te},st=(te,ee)=>wt(te,Ze(ee)),mt=(te,ee)=>{var he={};for(var se in te)Me.call(te,se)&&ee.indexOf(se)<0&&(he[se]=te[se]);if(te!=null&&ht)for(var se of ht(te))ee.indexOf(se)<0&&yt.call(te,se)&&(he[se]=te[se]);return he},dt=(te,ee,he)=>new Promise((se,de)=>{var me=Fe=>{try{Ne(he.next(Fe))}catch(Ie){de(Ie)}},we=Fe=>{try{Ne(he.throw(Fe))}catch(Ie){de(Ie)}},Ne=Fe=>Fe.done?se(Fe.value):Promise.resolve(Fe.value).then(me,we);Ne((he=he.apply(te,ee)).next())});const Ae=te=>{var ee=te,{children:he}=ee,se=mt(ee,["children"]);const[de,me]=(0,De.useState)(!1);return De.createElement(ce.ZP,st(He({},se),{loading:de,onClick:we=>dt(void 0,null,function*(){try{me(!0),yield se.onClick(we),me(!1)}catch(Ne){console.error(Ne),me(!1)}})}),he)}},59155:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return dt}});var ce=ve(59301),De=ve(8591),ze=ve(92832),wt={codeBox:"codeBox___WpkVl"},Ze=ve(92310),ht=ve.n(Ze),Me=Object.defineProperty,yt=(Ae,te,ee)=>te in Ae?Me(Ae,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ae[te]=ee,ct=(Ae,te,ee)=>yt(Ae,typeof te!="symbol"?te+"":te,ee),He=(Ae,te,ee)=>new Promise((he,se)=>{var de=Ne=>{try{we(ee.next(Ne))}catch(Fe){se(Fe)}},me=Ne=>{try{we(ee.throw(Ne))}catch(Fe){se(Fe)}},we=Ne=>Ne.done?he(Ne.value):Promise.resolve(Ne.value).then(de,me);we((ee=ee.apply(Ae,te)).next())});class st extends ce.Component{constructor(te){super(te),ct(this,"canvas"),ct(this,"randomNum",(ee,he)=>Math.floor(Math.random()*(he-ee)+ee)),ct(this,"drawPic",()=>{this.randomCode()}),ct(this,"reloadPic",()=>{this.drawPic()}),ct(this,"changeCode",ee=>{console.log(ee.target.value,222),this.setState({value:ee.target.value,showError:!1})}),ct(this,"onVerify",()=>{let ee;return this.state.value.toLowerCase()!==""&&this.state.value.toLowerCase()!==this.state.code.toLowerCase()?(ee=!0,De.ZP.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801"),this.reloadPic()):this.state.value.toLowerCase()===""?(ee=!0,De.ZP.error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):this.state.value.toLowerCase()===this.state.code.toLowerCase()&&(ee=!1),this.setState({showError:ee}),ee}),this.canvas=ce.createRef(),this.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1}}componentDidMount(){this.drawPic()}randomColor(te,ee){const he=this.randomNum(te,ee),se=this.randomNum(te,ee),de=this.randomNum(te,ee);return`rgb(${he}, ${se}, ${de})`}drawText(te,ee,he){te.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);const se=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);te.font=se+"px SimHei";const de=10,me=(this.state.contentWidth-40)/(this.state.code.length-1);let we=de;he>0&&(we=de+he*me);let Ne=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Ne=40);const Fe=this.randomNum(-10,10);te.translate(we,Ne),te.rotate(Fe*Math.PI/180),te.fillText(ee,0,0),te.rotate(-Fe*Math.PI/180),te.translate(-we,-Ne)}drawLine(te){for(let ee=0;ee<1;ee++)te.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),te.beginPath(),te.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.stroke()}drawDot(te){for(let ee=0;ee<100;ee++)te.fillStyle=this.randomColor(0,255),te.beginPath(),te.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),te.fill()}randomCode(){let te="";const ee="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890";for(let he=0;he<this.state.codeLength;he++){const se=Math.floor(Math.random()*57);te+=ee[se]}this.setState({code:te},()=>{const se=this.canvas.current.getContext("2d");se.textBaseline="bottom",se.fillStyle=this.randomColor(this.state.backgroundColorMin,this.state.backgroundColorMax),se.fillRect(0,0,this.state.contentWidth,this.state.contentHeight);for(let de=0;de<this.state.code.length;de++)this.drawText(se,this.state.code[de],de);this.drawLine(se),this.drawDot(se)})}render(){const{className:te,width:ee=300}=this.props;return ce.createElement("div",{className:ht()(wt.codeBox,te),style:{width:ee}},ce.createElement("aside",null,ce.createElement(ze.default,{value:this.state.value,onChange:this.changeCode,placeholder:"\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u9A8C\u8BC1\u7801"})),ce.createElement("div",null,ce.createElement("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),ce.createElement("div",{className:"current",onClick:this.reloadPic},"\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u5F20")))}}const mt=(Ae,te)=>{let ee;Modal.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:React.createElement("div",null,React.createElement("p",null,te),React.createElement(st,{ref:he=>ee=he})),onOk:()=>He(void 0,null,function*(){if(ee.onVerify())return Promise.reject();Ae()})})};var dt=st},10672:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return ct}});var ce=ve(59301),De=ve(92832),ze=ve(12563),wt=ve(8591),Ze={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},ht=ve(62772);const{TextArea:Me}=De.default;class yt extends ce.Component{constructor(st){super(st),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:st,onAnswerChange:mt,addChildAnswer:dt,exerciseIsPublish:Ae,answers:te,activeOptionErrorIndex:ee,flex:he="0 0 1000px"}=this.props;console.log("----",te);let{inputVisible:se,EditInputIndex:de}=this.state;return ce.createElement("div",{className:Ze.flex},ce.createElement("div",{className:`${Ze.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",st+1,"):"),ce.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},te==null?void 0:te.map((me,we)=>ce.createElement(ce.Fragment,null,de!==we?(me==null?void 0:me.length)>0?ce.createElement(ze.default,{className:"edit-tag",key:me,closable:!((te==null?void 0:te.length)===1&&we===0),onClose:Ne=>{Ne.preventDefault(),(te==null?void 0:te.length)===1&&we===0?this.props.deleteChildAnswermain(st,we):this.props.deleteChildAnswer(st,we)}},ce.createElement("span",{onDoubleClick:Ne=>{this.setState({EditInputIndex:we}),Ne.preventDefault()}},me)):ce.createElement(De.default,{defaultValue:me,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ne=>{if(Ne.target.value.replaceAll(" ","").length<=0){wt.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}mt(st,we,Ne.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):ce.createElement(De.default,{defaultValue:me,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ne=>{if(Ne.target.value.replaceAll(" ","").length<=0){wt.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}mt(st,we,Ne.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&ce.createElement(ze.default,{className:"site-tag-plus",onClick:()=>{dt(st),this.setState({inputVisible:!0})}},ce.createElement(ht.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var ct=yt},65158:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Ae}});var ce=ve(59301),De=ve(12290),ze=Object.defineProperty,wt=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,ct=(te,ee,he)=>ee in te?ze(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:he}):te[ee]=he,He=(te,ee)=>{for(var he in ee||(ee={}))Me.call(ee,he)&&ct(te,he,ee[he]);if(ht)for(var he of ht(ee))yt.call(ee,he)&&ct(te,he,ee[he]);return te},st=(te,ee)=>wt(te,Ze(ee)),mt=(te,ee,he)=>ct(te,typeof ee!="symbol"?ee+"":ee,he);const dt="\u2581";class Ae extends ce.Component{constructor(){super(...arguments),mt(this,"getChCountBeforeCursor",(ee,he)=>{const se=he.line;let de=0;for(let we=0;we<se;we++)de+=ee.getLine(we).split(dt).length-1;const me=ee.getLine(se).substring(0,he.ch);return de+=me.split(dt).length-1,de}),mt(this,"onCMBeforeChange",(ee,he)=>{const se=ee.getRange(he.from,he.to);let de=0;if(he.text.forEach(me=>{de+=me.split(dt).length-1}),se&&se.indexOf(dt)!=-1){const me=se.split(dt).length-1,we=this.getChCountBeforeCursor(ee,he.from);console.log(`\u5220\u9664${me}\u4E2A\uFF0C \u4E4B\u524D\u6709${we}\u4E2A\uFF0C\u65B0\u589E${de}\u4E2A`),this.props.deleteEmptyDisabled?he.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(we,me,de)}else if(de){const me=this.getChCountBeforeCursor(ee,he.from);console.log(`\u65B0\u589E${de}\u4E2A\uFF0C\u4E4B\u524D\u6709${me}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(me,0,de)}})}render(){return ce.createElement(De.Z,st(He({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},32570:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return ht}});var ce=ve(60324),De={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},ze=ve(32637),wt=ve(59301),ht=({type:Me,style:yt})=>{const ct=wt.createElement("div",{className:De.wrap,onClick:He=>{He.preventDefault(),He.stopPropagation()}},wt.createElement("p",null,Me==="shixun"||Me==="paths"?"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u662F\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002":"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",wt.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Me==="paths"?"\u53D1\u9001\u5230\u8BFE\u5802":"\u53D1\u5E03","\u4F7F\u7528\u4E4B\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),wt.createElement("div",{className:De.contact},wt.createElement("div",{className:De.img},wt.createElement("img",{src:ze,width:"124px",height:"124px"})),wt.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return wt.createElement(ce.Z,{content:ct},wt.createElement("span",{className:De.text,style:yt},"\u9AD8\u6D88\u8017"))}},16406:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return et}});var ce=ve(59301),De={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ze=ve(92310),wt=ve.n(ze),Ze=ve(71418);var ht=function(Te,xe){return(ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Se,Be){Se.__proto__=Be}||function(Se,Be){for(var _e in Be)Object.prototype.hasOwnProperty.call(Be,_e)&&(Se[_e]=Be[_e])})(Te,xe)};function Me(Te,xe){function Se(){this.constructor=Te}ht(Te,xe),Te.prototype=xe===null?Object.create(xe):(Se.prototype=xe.prototype,new Se)}function yt(Te,xe,Se,Be){return new(Se||(Se=Promise))(function(_e,Ee){function ft(Qt){try{an(Be.next(Qt))}catch(En){Ee(En)}}function Xt(Qt){try{an(Be.throw(Qt))}catch(En){Ee(En)}}function an(Qt){var En;Qt.done?_e(Qt.value):(En=Qt.value,En instanceof Se?En:new Se(function(Yn){Yn(En)})).then(ft,Xt)}an((Be=Be.apply(Te,xe||[])).next())})}function ct(Te,xe){var Se,Be,_e,Ee,ft={label:0,sent:function(){if(1&_e[0])throw _e[1];return _e[1]},trys:[],ops:[]};return Ee={next:Xt(0),throw:Xt(1),return:Xt(2)},typeof Symbol=="function"&&(Ee[Symbol.iterator]=function(){return this}),Ee;function Xt(an){return function(Qt){return function(En){if(Se)throw new TypeError("Generator is already executing.");for(;ft;)try{if(Se=1,Be&&(_e=2&En[0]?Be.return:En[0]?Be.throw||((_e=Be.return)&&_e.call(Be),0):Be.next)&&!(_e=_e.call(Be,En[1])).done)return _e;switch(Be=0,_e&&(En=[2&En[0],_e.value]),En[0]){case 0:case 1:_e=En;break;case 4:return ft.label++,{value:En[1],done:!1};case 5:ft.label++,Be=En[1],En=[0];continue;case 7:En=ft.ops.pop(),ft.trys.pop();continue;default:if(_e=ft.trys,!((_e=_e.length>0&&_e[_e.length-1])||En[0]!==6&&En[0]!==2)){ft=0;continue}if(En[0]===3&&(!_e||En[1]>_e[0]&&En[1]<_e[3])){ft.label=En[1];break}if(En[0]===6&&ft.label<_e[1]){ft.label=_e[1],_e=En;break}if(_e&&ft.label<_e[2]){ft.label=_e[2],ft.ops.push(En);break}_e[2]&&ft.ops.pop(),ft.trys.pop();continue}En=xe.call(Te,ft)}catch(Yn){En=[6,Yn],Be=0}finally{Se=_e=0}if(5&En[0])throw En[1];return{value:En[0]?En[1]:void 0,done:!0}}([an,Qt])}}}function He(){for(var Te=0,xe=0,Se=arguments.length;xe<Se;xe++)Te+=arguments[xe].length;var Be=Array(Te),_e=0;for(xe=0;xe<Se;xe++)for(var Ee=arguments[xe],ft=0,Xt=Ee.length;ft<Xt;ft++,_e++)Be[_e]=Ee[ft];return Be}var st=function(){function Te(){}return Te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Te.setAttributes=function(xe,Se){for(var Be=0,_e=Se;Be<_e.length;Be++){var Ee=_e[Be],ft=Ee[0],Xt=Ee[1];xe.setAttribute(ft,Xt)}},Te.createRect=function(xe,Se,Be){var _e=document.createElementNS("http://www.w3.org/2000/svg","rect");return _e.setAttribute("width",xe.toString()),_e.setAttribute("height",Se.toString()),Be&&Te.setAttributes(_e,Be),_e},Te.createLine=function(xe,Se,Be,_e,Ee){var ft=document.createElementNS("http://www.w3.org/2000/svg","line");return ft.setAttribute("x1",xe.toString()),ft.setAttribute("y1",Se.toString()),ft.setAttribute("x2",Be.toString()),ft.setAttribute("y2",_e.toString()),Ee&&Te.setAttributes(ft,Ee),ft},Te.createPolygon=function(xe,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Be.setAttribute("points",xe),Se&&Te.setAttributes(Be,Se),Be},Te.createCircle=function(xe,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","circle");return Be.setAttribute("cx",(xe/2).toString()),Be.setAttribute("cy",(xe/2).toString()),Be.setAttribute("r",xe.toString()),Se&&Te.setAttributes(Be,Se),Be},Te.createEllipse=function(xe,Se,Be){var _e=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return _e.setAttribute("cx",(xe/2).toString()),_e.setAttribute("cy",(Se/2).toString()),_e.setAttribute("rx",(xe/2).toString()),_e.setAttribute("ry",(Se/2).toString()),Be&&Te.setAttributes(_e,Be),_e},Te.createGroup=function(xe){var Se=document.createElementNS("http://www.w3.org/2000/svg","g");return xe&&Te.setAttributes(Se,xe),Se},Te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Te.createMarker=function(xe,Se,Be,_e,Ee,ft,Xt){var an=document.createElementNS("http://www.w3.org/2000/svg","marker");return Te.setAttributes(an,[["id",xe],["orient",Se],["markerWidth",Be.toString()],["markerHeight",_e.toString()],["refX",Ee.toString()],["refY",ft.toString()]]),an.appendChild(Xt),an},Te.createText=function(xe){var Se=document.createElementNS("http://www.w3.org/2000/svg","text");return Se.setAttribute("x","0"),Se.setAttribute("y","0"),xe&&Te.setAttributes(Se,xe),Se},Te.createTSpan=function(xe,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Be.textContent=xe,Se&&Te.setAttributes(Be,Se),Be},Te.createImage=function(xe){var Se=document.createElementNS("http://www.w3.org/2000/svg","image");return xe&&Te.setAttributes(Se,xe),Se},Te.createPoint=function(xe,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Be.x=xe,Be.y=Se,Be},Te.createPath=function(xe,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","path");return Be.setAttribute("d",xe),Se&&Te.setAttributes(Be,Se),Be},Te}(),mt=function(){function Te(){}return Te.addKey=function(xe){Te.key=xe},Object.defineProperty(Te,"isLicensed",{get:function(){return!!Te.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Te.key)},enumerable:!1,configurable:!0}),Te}(),dt=function(){function Te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Te.prototype.rasterize=function(xe,Se,Be){var _e=this;return new Promise(function(Ee){var ft=Be!==void 0?Be:document.createElement("canvas");xe===null&&(_e.markersOnly=!0,_e.naturalSize=!1);var Xt=document.createElementNS("http://www.w3.org/2000/svg","svg");Xt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Xt.setAttribute("width",Se.width.baseVal.valueAsString),Xt.setAttribute("height",Se.height.baseVal.valueAsString),Xt.setAttribute("viewBox","0 0 "+Se.viewBox.baseVal.width.toString()+" "+Se.viewBox.baseVal.height.toString()),Xt.innerHTML=Se.innerHTML,_e.naturalSize===!0?(Xt.width.baseVal.value=xe.naturalWidth,Xt.height.baseVal.value=xe.naturalHeight):_e.width!==void 0&&_e.height!==void 0&&(Xt.width.baseVal.value=_e.width,Xt.height.baseVal.value=_e.height),ft.width=Xt.width.baseVal.value,ft.height=Xt.height.baseVal.value;var an=Xt.outerHTML,Qt=ft.getContext("2d");_e.markersOnly!==!0&&Qt.drawImage(xe,0,0,ft.width,ft.height);var En=window.URL,Yn=new Image(ft.width,ft.height);Yn.setAttribute("crossOrigin","anonymous");var zn=new Blob([an],{type:"image/svg+xml"}),Dn=En.createObjectURL(zn);Yn.onload=function(){Qt.drawImage(Yn,0,0),En.revokeObjectURL(Dn);var ii=ft.toDataURL(_e.imageType,_e.imageQuality);Ee(ii)},Yn.src=Dn})},Te}(),Ae=function(){},te=function(){function Te(xe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+xe+"_"}return Object.defineProperty(Te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Te.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(Te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Te.prototype.addClass=function(xe){return this.styleSheet===void 0&&this.addStyleSheet(),xe.name=""+this.classNamePrefix+xe.localName,this.classes.push(xe),this.styleSheet.sheet.insertRule("."+xe.name+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length),xe},Te.prototype.addRule=function(xe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(xe),this.styleSheet.sheet.insertRule(xe.selector+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length)},Te.prototype.addStyleSheet=function(){var xe;this.styleSheet=document.createElement("style"),((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).appendChild(this.styleSheet),this.addRule(new ee("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new he("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new he("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Te.prototype.removeStyleSheet=function(){var xe;this.styleSheet&&(((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Te}(),ee=function(Te,xe){this.selector=Te,this.style=xe},he=function(Te,xe){this.localName=Te,this.style=xe},se=function(){function Te(xe,Se,Be,_e,Ee){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=xe,this.displayMode=Se,this.markerItems=Be,this.uiStyleSettings=_e,this.styles=Ee,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Te.prototype.show=function(xe){var Se=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Be=document.createElement("div");Be.className=this.toolbarBlockStyleClass.name,Be.style.whiteSpace="nowrap",this.uiContainer.appendChild(Be),this.addActionButton(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Ee){var ft=document.createElement("div");ft.className=""+Se.toolbarButtonStyleClass.name,ft.setAttribute("data-type-name",Ee.typeName),ft.innerHTML=Ee.icon,ft.addEventListener("click",function(){Se.markerToolbarButtonClicked(ft,Ee)}),Se.buttons.push(ft),Se.markerButtons.push(ft)}),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 _e=document.createElement("div");_e.className=this.toolbarBlockStyleClass.name,_e.style.whiteSpace="nowrap",_e.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(_e),this.addActionButton(_e,'<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(_e,'<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()},Te.prototype.addButtonClickListener=function(xe){this.buttonClickListeners.push(xe)},Te.prototype.removeButtonClickListener=function(xe){this.buttonClickListeners.indexOf(xe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(xe),1)},Te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var xe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Se=0;Se<this.markerButtons.length;Se++)Se<xe||Se===xe&&this.markerButtons.length-1===xe?this.markerButtonBlock.appendChild(this.markerButtons[Se]):(Se===xe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Se]))}},Te.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")},Te.prototype.resetButtonStyles=function(){var xe=this;this.buttons.forEach(function(Se){Se.className=Se.className.replace(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name,"").trim(),Se.className=Se.className.replace(xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:xe.toolbarActiveButtonStyleColorsClass.name,"").trim(),Se.className+=" "+(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name)})},Te.prototype.addActionButton=function(xe,Se,Be){var _e=this,Ee=document.createElement("div");switch(Ee.className=""+this.toolbarButtonStyleClass.name,Ee.innerHTML=Se,Ee.setAttribute("data-action",Be),Ee.addEventListener("click",function(){_e.actionToolbarButtonClicked(Ee,Be)}),Be){case"select":Ee.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ee.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ee.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ee.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ee.style.fill=this.uiStyleSettings.closeButtonColor}xe.appendChild(Ee),this.buttons.push(Ee)},Te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new he("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 he("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new he("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new he("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 he("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var xe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new he("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
|
|
|
padding: `+xe+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new he("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new he("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Te.prototype.markerToolbarButtonClicked=function(xe,Se){this.setActiveButton(xe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("marker",Se)}),this.markerButtonOverflowBlock.style.display="none"},Te.prototype.actionToolbarButtonClicked=function(xe,Se){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("action",Se)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Te.prototype.setActiveButton=function(xe){this.resetButtonStyles(),xe.className=xe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),xe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Te.prototype.setActiveMarkerButton=function(xe){var Se=this.markerButtons.find(function(Be){return Be.getAttribute("data-type-name")===xe});Se&&this.setActiveButton(Se)},Te.prototype.setCurrentMarker=function(xe){var Se=this;this.currentMarker=xe,this.buttons.filter(function(Be){return/delete|notes/.test(Be.getAttribute("data-action"))}).forEach(function(Be){Se.currentMarker===void 0?(Be.style.fillOpacity="0.4",Be.style.pointerEvents="none"):(Be.style.fillOpacity="1",Be.style.pointerEvents="all")})},Te}(),de=function(){function Te(xe,Se,Be,_e){this.panels=[],this.panelButtons=[],this.markerjsContainer=xe,this.displayMode=Se,this.uiStyleSettings=Be,this.styles=_e,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Te.prototype.addStyles=function(){var xe;this.toolboxStyleClass=this.styles.addClass(new he("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 he("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Se=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new he("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new he("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new he("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 he("toolbox-panel-row_colors",`
|
|
|
background-color: `+((xe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&xe!==void 0?xe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new he("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Se)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Se)+`px;
|
|
|
padding: `+Se+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new he("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new he("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Te.prototype.show=function(xe){var Se;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Se=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Se!==void 0?Se:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Te.prototype.setPanelButtons=function(xe){var Se,Be,_e=this;this.panels=xe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Se=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Se!==void 0?Se:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ee){var ft;Ee.uiStyleSettings=_e.uiStyleSettings;var Xt=document.createElement("div");Xt.className=_e.toolboxButtonStyleClass.name+" "+((ft=_e.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ft!==void 0?ft:_e.toolboxButtonStyleColorsClass.name),Xt.innerHTML=Ee.icon,Xt.title=Ee.title,Xt.addEventListener("click",function(){_e.panelButtonClick(Ee)}),_e.panelButtons.push(Xt),_e.buttonRow.appendChild(Xt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Te.prototype.panelButtonClick=function(xe){var Se=this,Be=-1;if(xe!==this.activePanel){Be=this.panels.indexOf(xe),this.panelRow.innerHTML="";var _e=xe.getUi();_e.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(_e),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=xe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Se.displayMode==="inline"?Se.panelRow.style.display="none":Se.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ee,ft){var Xt,an;Ee.className=Se.toolboxButtonStyleClass.name+" "+(ft===Be?""+((Xt=Se.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Xt!==void 0?Xt:Se.toolboxActiveButtonStyleColorsClass.name):""+((an=Se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&an!==void 0?an:Se.toolboxButtonStyleColorsClass.name))})},Te}(),me=function(Te,xe){this.title=Te,this.icon=xe},we=function(Te){function xe(Se,Be,_e,Ee){var ft=Te.call(this,Se,Ee||'<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 ft.colors=[],ft.addTransparent=!1,ft.colorBoxes=[],ft.colors=Be,ft.currentColor=_e,ft.setCurrentColor=ft.setCurrentColor.bind(ft),ft.getColorBox=ft.getColorBox.bind(ft),ft}return Me(xe,Te),xe.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.whiteSpace="nowrap",this.colors.forEach(function(_e){var Ee=Se.getColorBox(_e);Be.appendChild(Ee),Se.colorBoxes.push(Ee)}),Be},xe.prototype.getColorBox=function(Se){var Be=this,_e=this.uiStyleSettings.toolbarHeight/4,Ee=this.uiStyleSettings.toolbarHeight-_e,ft=document.createElement("div");ft.style.display="inline-block",ft.style.boxSizing="content-box",ft.style.width=Ee-2+"px",ft.style.height=Ee-2+"px",ft.style.padding="1px",ft.style.marginRight="2px",ft.style.marginBottom="2px",ft.style.borderWidth="2px",ft.style.borderStyle="solid",ft.style.borderRadius=(Ee+2)/2+"px",ft.style.borderColor=Se===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ft.addEventListener("click",function(){Be.setCurrentColor(Se,ft)});var Xt=document.createElement("div");return Xt.style.display="inline-block",Xt.style.width=Ee-2+"px",Xt.style.height=Ee-2+"px",Xt.style.backgroundColor=Se,Xt.style.borderRadius=Ee/2+"px",Se==="transparent"&&(Xt.style.fill=this.uiStyleSettings.toolboxAccentColor,Xt.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>`),ft.appendChild(Xt),ft},xe.prototype.setCurrentColor=function(Se,Be){var _e=this;this.currentColor=Se,this.colorBoxes.forEach(function(Ee){Ee.style.borderColor=Ee===Be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Se)},xe}(me),Ne=function(){function Te(xe,Se,Be){this._state="new",this._isSelected=!1,this._container=xe,this._overlayContainer=Se,this.globalSettings=Be,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Te.prototype.ownsTarget=function(xe){return!1},Object.defineProperty(Te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Te.prototype.pointerDown=function(xe,Se){},Te.prototype.dblClick=function(xe,Se){},Te.prototype.manipulate=function(xe){},Te.prototype.pointerUp=function(xe){this.stateChanged()},Te.prototype.dispose=function(){},Te.prototype.addMarkerVisualToContainer=function(xe){this.container.childNodes.length>0?this.container.insertBefore(xe,this.container.childNodes[0]):this.container.appendChild(xe)},Te.prototype.getState=function(){return{typeName:Te.typeName,state:this.state,notes:this.notes}},Te.prototype.restoreState=function(xe){this._state=xe.state,this.notes=xe.notes},Te.prototype.scale=function(xe,Se){},Te.prototype.colorChanged=function(xe){this.onColorChanged&&this.onColorChanged(xe),this.stateChanged()},Te.prototype.fillColorChanged=function(xe){this.onFillColorChanged&&this.onFillColorChanged(xe),this.stateChanged()},Te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var xe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),xe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(xe)&&this.onStateChanged(this)}},Te.typeName="MarkerBase",Te}(),Fe=function(){function Te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Te.prototype.findGripByVisual=function(xe){return this.topLeft.ownsTarget(xe)?this.topLeft:this.topCenter.ownsTarget(xe)?this.topCenter:this.topRight.ownsTarget(xe)?this.topRight:this.centerLeft.ownsTarget(xe)?this.centerLeft:this.centerRight.ownsTarget(xe)?this.centerRight:this.bottomLeft.ownsTarget(xe)?this.bottomLeft:this.bottomCenter.ownsTarget(xe)?this.bottomCenter:this.bottomRight.ownsTarget(xe)?this.bottomRight:void 0},Te}(),Ie=function(){function Te(){this.GRIP_SIZE=10,this.visual=st.createGroup(),this.visual.appendChild(st.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(st.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Te.prototype.ownsTarget=function(xe){return xe===this.visual||xe===this.visual.childNodes[0]||xe===this.visual.childNodes[1]},Te}(),je=function(){function Te(){}return Te.toITransformMatrix=function(xe){return{a:xe.a,b:xe.b,c:xe.c,d:xe.d,e:xe.e,f:xe.f}},Te.toSVGMatrix=function(xe,Se){return xe.a=Se.a,xe.b=Se.b,xe.c=Se.c,xe.d=Se.d,xe.e=Se.e,xe.f=Se.f,xe},Te}(),Je=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.left=0,Ee.top=0,Ee.width=0,Ee.height=0,Ee.defaultSize={x:50,y:20},Ee.offsetX=0,Ee.offsetY=0,Ee.rotationAngle=0,Ee.CB_DISTANCE=10,Ee._suppressMarkerCreateEvent=!1,Ee.container.transform.baseVal.appendItem(st.createTransform()),Ee.setupControlBox(),Ee}return Me(xe,Te),Object.defineProperty(xe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"visual",{get:function(){return this._visual},set:function(Se){this._visual=Se;var Be=st.createTransform();this._visual.transform.baseVal.appendItem(Be)},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Se){return!!Te.prototype.ownsTarget.call(this,Se)||!!(this.controlGrips.findGripByVisual(Se)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Se))},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.left=Se.x,this.top=Se.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var _e=this.unrotatePoint(Se);if(this.manipulationStartX=_e.x,this.manipulationStartY=_e.y,this.offsetX=_e.x-this.left,this.offsetY=_e.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Be),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be)){this.activeGrip=this.rotatorGrip;var Ee=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ee.x-this.width/2,this.top=Ee.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ft=this.container.transform.baseVal.getItem(0);ft.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ft,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},xe.prototype.pointerUp=function(Se){var Be=this.state;Te.prototype.pointerUp.call(this,Se),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Se),this._state="select",Be==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},xe.prototype.moveVisual=function(Se){this.visual.style.transform="translate("+Se.x+"px, "+Se.y+"px)"},xe.prototype.manipulate=function(Se){var Be=this.unrotatePoint(Se);this.state==="creating"?this.resize(Se):this.state==="move"?(this.left=this.manipulationStartLeft+(Be.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Be.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Be):this.state==="rotate"&&this.rotate(Se)},xe.prototype.resize=function(Se){var Be=this.manipulationStartLeft,_e=this.manipulationStartWidth,Ee=this.manipulationStartTop,ft=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Be=this.manipulationStartLeft+Se.x-this.manipulationStartX,_e=this.manipulationStartWidth+this.manipulationStartLeft-Be;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:_e=this.manipulationStartWidth+Se.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ee=this.manipulationStartTop+Se.y-this.manipulationStartY,ft=this.manipulationStartHeight+this.manipulationStartTop-Ee;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ft=this.manipulationStartHeight+Se.y-this.manipulationStartY}_e>=0?(this.left=Be,this.width=_e):(this.left=Be+_e,this.width=-_e),ft>=0?(this.top=Ee,this.height=ft):(this.top=Ee+ft,this.height=-ft),this.setSize()},xe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},xe.prototype.rotate=function(Se){if(Math.abs(Se.x-this.centerX)>.1){var Be=Math.sign(Se.x-this.centerX);this.rotationAngle=180*Math.atan((Se.y-this.centerY)/(Se.x-this.centerX))/Math.PI+90*Be,this.applyRotation()}},xe.prototype.applyRotation=function(){var Se=this.container.transform.baseVal.getItem(0);Se.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Se,0)},xe.prototype.rotatePoint=function(Se){if(this.rotationAngle===0)return Se;var Be=this.container.getCTM(),_e=st.createPoint(Se.x,Se.y);return{x:(_e=_e.matrixTransform(Be)).x,y:_e.y}},xe.prototype.unrotatePoint=function(Se){if(this.rotationAngle===0)return Se;var Be=this.container.getCTM();Be=Be.inverse();var _e=st.createPoint(Se.x,Se.y);return{x:(_e=_e.matrixTransform(Be)).x,y:_e.y}},xe.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=st.createGroup();var Se=st.createTransform();Se.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Se),this.container.appendChild(this.controlBox),this.controlRect=st.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=st.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 Fe,this.addControlGrips(),this.controlBox.style.display="none"},xe.prototype.adjustControlBox=function(){var Se=this.controlBox.transform.baseVal.getItem(0);Se.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Se,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()},xe.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()},xe.prototype.createGrip=function(){var Se=new Ie;return Se.visual.transform.baseVal.appendItem(st.createTransform()),this.controlBox.appendChild(Se.visual),Se},xe.prototype.positionGrips=function(){var Se=this.controlGrips.topLeft.GRIP_SIZE,Be=-Se/2,_e=Be,Ee=(this.width+this.CB_DISTANCE)/2-Se/2,ft=(this.height+this.CB_DISTANCE)/2-Se/2,Xt=this.height+this.CB_DISTANCE-Se/2,an=this.width+this.CB_DISTANCE-Se/2;this.positionGrip(this.controlGrips.topLeft.visual,Be,_e),this.positionGrip(this.controlGrips.topCenter.visual,Ee,_e),this.positionGrip(this.controlGrips.topRight.visual,an,_e),this.positionGrip(this.controlGrips.centerLeft.visual,Be,ft),this.positionGrip(this.controlGrips.centerRight.visual,an,ft),this.positionGrip(this.controlGrips.bottomLeft.visual,Be,Xt),this.positionGrip(this.controlGrips.bottomCenter.visual,Ee,Xt),this.positionGrip(this.controlGrips.bottomRight.visual,an,Xt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ee,_e-3*this.CB_DISTANCE)},xe.prototype.positionGrip=function(Se,Be,_e){var Ee=Se.transform.baseVal.getItem(0);Ee.setTranslate(Be,_e),Se.transform.baseVal.replaceItem(Ee,0)},xe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},xe.prototype.showControlBox=function(){this.controlBox.style.display=""},xe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:je.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:je.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Te.prototype.getState.call(this))},xe.prototype.restoreState=function(Se){Te.prototype.restoreState.call(this,Se);var Be=Se;this.left=Be.left,this.top=Be.top,this.width=Be.width,this.height=Be.height,this.rotationAngle=Be.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(je.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Be.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(je.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Be.containerTransformMatrix))},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be);var _e=this.rotatePoint({x:this.left,y:this.top}),Ee=this.unrotatePoint({x:_e.x*Se,y:_e.y*Be});this.left=Ee.x,this.top=Ee.y,this.width=this.width*Se,this.height=this.height*Be,this.adjustControlBox()},xe}(Ne),Ke=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.fillColor="transparent",Ee.strokeColor="transparent",Ee.strokeWidth=0,Ee.strokeDasharray="",Ee.opacity=1,Ee.setStrokeColor=Ee.setStrokeColor.bind(Ee),Ee.setFillColor=Ee.setFillColor.bind(Ee),Ee.setStrokeWidth=Ee.setStrokeWidth.bind(Ee),Ee.setStrokeDasharray=Ee.setStrokeDasharray.bind(Ee),Ee.createVisual=Ee.createVisual.bind(Ee),Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.visual)},xe.prototype.createVisual=function(){this.visual=st.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)},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},xe.prototype.manipulate=function(Se){Te.prototype.manipulate.call(this,Se)},xe.prototype.resize=function(Se){Te.prototype.resize.call(this,Se),this.setSize()},xe.prototype.setSize=function(){Te.prototype.setSize.call(this),st.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Se){Te.prototype.pointerUp.call(this,Se),this.setSize()},xe.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.visual&&st.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Se),this.stateChanged()},xe.prototype.setFillColor=function(Se){this.fillColor=Se,this.visual&&st.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},xe.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.visual&&st.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.visual&&st.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this))},xe.prototype.restoreState=function(Se){var Be=Se;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),Te.prototype.restoreState.call(this,Se),this.setSize()},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be),this.setSize()},xe.title="Rectangle marker",xe}(Je),gt=function(Te){function xe(Se,Be,_e,Ee){var ft=Te.call(this,Se,Ee||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ft.widths=[],ft.widthBoxes=[],ft.widths=Be,ft.currentWidth=_e,ft.setCurrentWidth=ft.setCurrentWidth.bind(ft),ft}return Me(xe,Te),xe.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.widths.forEach(function(_e){var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.flexGrow="2",Ee.style.alignItems="center",Ee.style.justifyContent="space-between",Ee.style.padding="5px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.borderColor=_e===Se.currentWidth?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){Se.setCurrentWidth(_e,Ee)}),Be.appendChild(Ee);var ft=document.createElement("div");ft.innerText=_e.toString(),ft.style.marginRight="5px",Ee.appendChild(ft);var Xt=document.createElement("div");Xt.style.minHeight="20px",Xt.style.flexGrow="2",Xt.style.display="flex",Xt.style.alignItems="center";var an=document.createElement("hr");an.style.minWidth="20px",an.style.border="0px",an.style.borderTop=_e+"px solid "+Se.uiStyleSettings.toolboxColor,an.style.flexGrow="2",Xt.appendChild(an),Ee.appendChild(Xt),Se.widthBoxes.push(Ee)}),Be},xe.prototype.setCurrentWidth=function(Se,Be){var _e=this;this.currentWidth=Se,this.widthBoxes.forEach(function(Ee){Ee.style.borderColor=Ee===Be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},xe}(me),Re=function(Te){function xe(Se,Be,_e,Ee){var ft=Te.call(this,Se,Ee||'<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 ft.styles=[],ft.styleBoxes=[],ft.styles=Be,ft.currentStyle=_e,ft.setCurrentStyle=ft.setCurrentStyle.bind(ft),ft}return Me(xe,Te),xe.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.styles.forEach(function(_e){var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.alignItems="center",Ee.style.justifyContent="space-between",Ee.style.padding="5px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.overflow="hidden",Ee.style.maxWidth=100/Se.styles.length-5+"%",Ee.style.borderColor=_e===Se.currentStyle?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){Se.setCurrentStyle(_e,Ee)}),Be.appendChild(Ee);var ft=document.createElement("div");ft.style.minHeight="20px",ft.style.flexGrow="2",ft.style.overflow="hidden";var Xt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Se.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(_e!==""?'stroke-dasharray="'+_e+'"':"")+` />
|
|
|
</svg>`;ft.innerHTML=Xt,Ee.appendChild(ft),Se.styleBoxes.push(Ee)}),Be},xe.prototype.setCurrentStyle=function(Se,Be){var _e=this;this.currentStyle=Se,this.styleBoxes.forEach(function(Ee){Ee.style.borderColor=Ee===Be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},xe}(me),At=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.strokeColor=_e.defaultColor,Ee.strokeWidth=_e.defaultStrokeWidth,Ee.strokeDasharray=_e.defaultStrokeDasharray,Ee.strokePanel=new we("Line color",_e.defaultColorSet,_e.defaultColor),Ee.strokePanel.onColorChanged=Ee.setStrokeColor,Ee.strokeWidthPanel=new gt("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),Ee.strokeWidthPanel.onWidthChanged=Ee.setStrokeWidth,Ee.strokeStylePanel=new Re("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),Ee.strokeStylePanel.onStyleChanged=Ee.setStrokeDasharray,Ee}return Me(xe,Te),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Te.prototype.getState.call(this);return Se.typeName=xe.typeName,Se},xe.typeName="FrameMarker",xe.title="Frame marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',xe}(Ke),qe=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"},Et=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.x1=0,Ee.y1=0,Ee.x2=0,Ee.y2=0,Ee.defaultLength=50,Ee.manipulationStartX=0,Ee.manipulationStartY=0,Ee.manipulationStartX1=0,Ee.manipulationStartY1=0,Ee.manipulationStartX2=0,Ee.manipulationStartY2=0,Ee.setupControlBox(),Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!!Te.prototype.ownsTarget.call(this,Se)||!(!this.grip1.ownsTarget(Se)&&!this.grip2.ownsTarget(Se))},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.manipulationStartX=Se.x,this.manipulationStartY=Se.y,this.state==="new"&&(this.x1=Se.x,this.y1=Se.y,this.x2=Se.x,this.y2=Se.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(Be)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Be)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},xe.prototype.pointerUp=function(Se){var Be=this.state;Te.prototype.pointerUp.call(this,Se),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(Se),this._state="select",Be==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},xe.prototype.adjustVisual=function(){},xe.prototype.manipulate=function(Se){this.state==="creating"?this.resize(Se):this.state==="move"?(this.x1=this.manipulationStartX1+Se.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Se.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Se.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Se.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Se)},xe.prototype.resize=function(Se){switch(this.activeGrip){case this.grip1:this.x1=Se.x,this.y1=Se.y;break;case this.grip2:case void 0:this.x2=Se.x,this.y2=Se.y}this.adjustVisual(),this.adjustControlBox()},xe.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=st.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},xe.prototype.adjustControlBox=function(){this.positionGrips()},xe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},xe.prototype.createGrip=function(){var Se=new Ie;return Se.visual.transform.baseVal.appendItem(st.createTransform()),this.controlBox.appendChild(Se.visual),Se},xe.prototype.positionGrips=function(){var Se=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Se/2,this.y1-Se/2),this.positionGrip(this.grip2.visual,this.x2-Se/2,this.y2-Se/2)},xe.prototype.positionGrip=function(Se,Be,_e){var Ee=Se.transform.baseVal.getItem(0);Ee.setTranslate(Be,_e),Se.transform.baseVal.replaceItem(Ee,0)},xe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Te.prototype.getState.call(this))},xe.prototype.restoreState=function(Se){Te.prototype.restoreState.call(this,Se);var Be=Se;this.x1=Be.x1,this.y1=Be.y1,this.x2=Be.x2,this.y2=Be.y2},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be),this.x1=this.x1*Se,this.y1=this.y1*Be,this.x2=this.x2*Se,this.y2=this.y2*Be,this.adjustVisual(),this.adjustControlBox()},xe}(Ne),kt=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.strokeColor="transparent",Ee.strokeWidth=0,Ee.strokeDasharray="",Ee.setStrokeColor=Ee.setStrokeColor.bind(Ee),Ee.setStrokeWidth=Ee.setStrokeWidth.bind(Ee),Ee.setStrokeDasharray=Ee.setStrokeDasharray.bind(Ee),Ee.strokeColor=_e.defaultColor,Ee.strokeWidth=_e.defaultStrokeWidth,Ee.strokeDasharray=_e.defaultStrokeDasharray,Ee.strokePanel=new we("Line color",_e.defaultColorSet,_e.defaultColor),Ee.strokePanel.onColorChanged=Ee.setStrokeColor,Ee.strokeWidthPanel=new gt("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),Ee.strokeWidthPanel.onWidthChanged=Ee.setStrokeWidth,Ee.strokeStylePanel=new Re("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),Ee.strokeStylePanel.onStyleChanged=Ee.setStrokeDasharray,Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.selectorLine&&Se!==this.visibleLine)},xe.prototype.createVisual=function(){this.visual=st.createGroup(),this.selectorLine=st.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=st.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)},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},xe.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()),st.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),st.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),st.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.adjustVisual(),this.colorChanged(Se)},xe.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Te.prototype.getState.call(this));return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){Te.prototype.restoreState.call(this,Se);var Be=Se;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.createVisual(),this.adjustVisual()},xe.typeName="LineMarker",xe.title="Line marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',xe}(Et),Bt=function(Te){function xe(Se,Be,_e,Ee){var ft=Te.call(this,Se,Ee||'<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 ft.fonts=[],ft.fontBoxes=[],ft.fonts=Be,ft.currentFont=_e,ft.setCurrentFont=ft.setCurrentFont.bind(ft),ft}return Me(xe,Te),xe.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.flexGrow="2",this.fonts.forEach(function(_e){var Ee=document.createElement("div");Ee.style.display="inline-block",Ee.style.alignItems="center",Ee.style.justifyContent="space-between",Ee.style.padding="5px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.overflow="hidden",Ee.style.maxWidth=100/Se.fonts.length-5+"%",Ee.style.borderColor=_e===Se.currentFont?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){Se.setCurrentFont(_e,Ee)}),Be.appendChild(Ee);var ft=document.createElement("div");ft.style.display="flex",ft.style.minHeight="20px",ft.style.flexGrow="2",ft.style.fontFamily=_e,ft.style.overflow="hidden";var Xt=document.createElement("div");Xt.style.whiteSpace="nowrap",Xt.style.overflow="hidden",Xt.style.textOverflow="ellipsis",Xt.innerHTML="The quick brown fox jumps over the lazy dog",ft.appendChild(Xt),Ee.appendChild(ft),Se.fontBoxes.push(Ee)}),Be},xe.prototype.setCurrentFont=function(Se,Be){var _e=this;this.currentFont=Se,this.fontBoxes.forEach(function(Ee){Ee.style.borderColor=Ee===Be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},xe}(me),Gt=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.color="transparent",Ee.padding=5,Ee.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ee.text=Ee.DEFAULT_TEXT,Ee.isMoved=!1,Ee.color=_e.defaultColor,Ee.fontFamily=_e.defaultFontFamily,Ee.defaultSize={x:100,y:30},Ee.setColor=Ee.setColor.bind(Ee),Ee.setFont=Ee.setFont.bind(Ee),Ee.renderText=Ee.renderText.bind(Ee),Ee.sizeText=Ee.sizeText.bind(Ee),Ee.textEditDivClicked=Ee.textEditDivClicked.bind(Ee),Ee.showTextEditor=Ee.showTextEditor.bind(Ee),Ee.setSize=Ee.setSize.bind(Ee),Ee.positionTextEditor=Ee.positionTextEditor.bind(Ee),Ee.colorPanel=new we("Color",_e.defaultColorSet,_e.defaultColor),Ee.colorPanel.onColorChanged=Ee.setColor,Ee.fontFamilyPanel=new Bt("Font",_e.defaultFontFamilies,_e.defaultFontFamily),Ee.fontFamilyPanel.onFontChanged=Ee.setFont,Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){if(Te.prototype.ownsTarget.call(this,Se)||Se===this.visual||Se===this.textElement||Se===this.bgRectangle)return!0;var Be=!1;return this.textElement.childNodes.forEach(function(_e){_e===Se&&(Be=!0)}),Be},xe.prototype.createVisual=function(){this.visual=st.createGroup(),this.bgRectangle=st.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=st.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(st.createTransform()),this.textElement.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.isMoved=!1,this.pointerDownPoint=Se,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},xe.prototype.renderText=function(){var Se=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(Be){Se.textElement.appendChild(st.createTSpan(Be.trim()===""?" ":Be.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},xe.prototype.getTextScale=function(){var Se=this.textElement.getBBox(),Be=1;if(Se.width>0&&Se.height>0){var _e=(1*this.width-this.width*this.padding*2/100)/Se.width,Ee=(1*this.height-this.height*this.padding*2/100)/Se.height;Be=Math.min(_e,Ee)}return Be},xe.prototype.getTextPosition=function(Se){var Be=this.textElement.getBBox(),_e=0,Ee=0;return Be.width>0&&Be.height>0&&(_e=(this.width-Be.width*Se)/2,Ee=this.height/2-Be.height*Se/2),{x:_e,y:Ee}},xe.prototype.sizeText=function(){var Se=this.textElement.getBBox(),Be=this.getTextScale(),_e=this.getTextPosition(Be);_e.y-=Se.y*Be,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+_e.x+"px, "+_e.y+"px) scale("+Be+", "+Be+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(_e.x,_e.y),this.textElement.transform.baseVal.getItem(1).setScale(Be,Be))},xe.prototype.manipulate=function(Se){Te.prototype.manipulate.call(this,Se),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Se.x-this.pointerDownPoint.x)>5||Math.abs(Se.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Se){Te.prototype.resize.call(this,Se),this.isMoved=!0,this.setSize(),this.sizeText()},xe.prototype.setSize=function(){Te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(st.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),st.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},xe.prototype.pointerUp=function(Se){var Be=this.state;Be==="creating"&&(this._suppressMarkerCreateEvent=!0),Te.prototype.pointerUp.call(this,Se),this.setSize(),(Be==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.showTextEditor=function(){var Se=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(Be){Be.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Be=Number.parseFloat(Se.textEditor.style.fontSize);Se.textEditor.clientWidth>=Number.parseInt(Se.textEditor.style.maxWidth)&&Be>.9;)Be-=.1,Se.textEditor.style.fontSize=Math.max(Be,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Be){if(Be.clipboardData){var _e=Be.clipboardData.getData("text"),Ee=window.getSelection();if(!Ee.rangeCount)return!1;Ee.deleteFromDocument(),Ee.getRangeAt(0).insertNode(document.createTextNode(_e)),Be.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Se.textEditDivClicked(Se.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},xe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Se=this.getTextScale(),Be=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),_e=this.textElement.getBBox(),Ee={x:_e.width*Se,y:_e.height*Se};Be.x-=Ee.x/2,Be.y-=Ee.y/2,this.textEditor.style.top=Be.y+"px",this.textEditor.style.left=Be.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Be.x+"px",this.textEditor.style.fontSize=Math.max(16*Se,12)+"px",this.textElement.style.display="none"}},xe.prototype.textEditDivClicked=function(Se){this.text=Se.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},xe.prototype.select=function(){Te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},xe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Te.prototype.deselect.call(this)},xe.prototype.dblClick=function(Se,Be){Te.prototype.dblClick.call(this,Se,Be),this.showTextEditor()},xe.prototype.setColor=function(Se){this.textElement&&st.setAttributes(this.textElement,[["fill",Se]]),this.color=Se,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Se)},xe.prototype.setFont=function(Se){this.textElement&&st.setAttributes(this.textElement,[["font-family",Se]]),this.fontFamily=Se,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},xe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},xe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Te.prototype.getState.call(this));return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){var Be=Se;this.color=Be.color,this.fontFamily=Be.fontFamily,this.padding=Be.padding,this.text=Be.text,this.createVisual(),Te.prototype.restoreState.call(this,Se),this.setSize()},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be),this.setSize(),this.sizeText(),this.positionTextEditor()},xe.typeName="TextMarker",xe.title="Text marker",xe.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>',xe}(Je),Ut=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.color="transparent",Ee.lineWidth=3,Ee.drawing=!1,Ee.pixelRatio=1,Ee.color=_e.defaultColor,Ee.lineWidth=_e.defaultStrokeWidth,Ee.pixelRatio=_e.freehandPixelRatio,Ee.setColor=Ee.setColor.bind(Ee),Ee.addCanvas=Ee.addCanvas.bind(Ee),Ee.finishCreation=Ee.finishCreation.bind(Ee),Ee.setLineWidth=Ee.setLineWidth.bind(Ee),Ee.colorPanel=new we("Color",_e.defaultColorSet,_e.defaultColor),Ee.colorPanel.onColorChanged=Ee.setColor,Ee.lineWidthPanel=new gt("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),Ee.lineWidthPanel.onWidthChanged=Ee.setLineWidth,Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.drawingImage)},xe.prototype.createVisual=function(){this.visual=st.createGroup(),this.drawingImage=st.createImage(),this.visual.appendChild(this.drawingImage);var Se=st.createTransform();this.visual.transform.baseVal.appendItem(Se),this.addMarkerVisualToContainer(this.visual)},xe.prototype.pointerDown=function(Se,Be){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(Se.x,Se.y),this.drawing=!0):Te.prototype.pointerDown.call(this,Se,Be)},xe.prototype.manipulate=function(Se){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Se.x,Se.y),this.canvasContext.stroke()):Te.prototype.manipulate.call(this,Se)},xe.prototype.resize=function(Se){Te.prototype.resize.call(this,Se),st.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),st.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Se){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Te.prototype.pointerUp.call(this,Se)},xe.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)},xe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.select.call(this)},xe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.deselect.call(this)},xe.prototype.finishCreation=function(){for(var Se=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Be=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],_e=Be[0],Ee=Be[1],ft=Be[2],Xt=Be[3],an=!1,Qt=0;Qt<this.canvasElement.height;Qt++)for(var En=0;En<this.canvasElement.width;En++)Se.data[Qt*this.canvasElement.width*4+4*En+3]>0&&(an=!0,Qt<Ee&&(Ee=Qt),En<_e&&(_e=En),Qt>Xt&&(Xt=Qt),En>ft&&(ft=En));if(an){this.left=_e/this.pixelRatio,this.top=Ee/this.pixelRatio,this.width=(ft-_e)/this.pixelRatio,this.height=(Xt-Ee)/this.pixelRatio;var Yn=document.createElement("canvas");Yn.width=ft-_e,Yn.height=Xt-Ee,Yn.getContext("2d").putImageData(this.canvasContext.getImageData(_e,Ee,ft-_e,Xt-Ee),0,0),this.drawingImgUrl=Yn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},xe.prototype.setDrawingImage=function(){st.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),st.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},xe.prototype.setColor=function(Se){this.color=Se,this.colorChanged(Se)},xe.prototype.setLineWidth=function(Se){this.lineWidth=Se},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Object.assign({drawingImgUrl:this.drawingImgUrl},Te.prototype.getState.call(this));return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){this.createVisual(),Te.prototype.restoreState.call(this,Se),this.drawingImgUrl=Se.drawingImgUrl,this.setDrawingImage()},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be),this.setDrawingImage()},xe.typeName="FreehandMarker",xe.title="Freehand marker",xe.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>',xe}(Je),lt=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,_e||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ee.typeBoxes=[],Ee.currentType=Be,Ee.setCurrentType=Ee.setCurrentType.bind(Ee),Ee}return Me(xe,Te),xe.prototype.getUi=function(){var Se=this,Be=document.createElement("div");Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2";for(var _e=function(Xt){var an="both";switch(Xt){case 0:an="both";break;case 1:an="start";break;case 2:an="end";break;case 3:an="none"}var Qt=document.createElement("div");if(Qt.style.display="flex",Qt.style.flexGrow="2",Qt.style.alignItems="center",Qt.style.justifyContent="space-between",Qt.style.padding="5px",Qt.style.borderWidth="2px",Qt.style.borderStyle="solid",Qt.style.borderColor=an===Ee.currentType?Ee.uiStyleSettings.toolboxAccentColor:"transparent",Qt.addEventListener("click",function(){Se.setCurrentType(an,Qt)}),Be.appendChild(Qt),an==="both"||an==="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="`+(Ee.uiStyleSettings!==void 0?Ee.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,En.style.marginLeft="5px",Qt.appendChild(En)}var Yn=document.createElement("div");Yn.style.display="flex",Yn.style.alignItems="center",Yn.style.minHeight="20px",Yn.style.flexGrow="2";var zn=document.createElement("hr");if(zn.style.minWidth="20px",zn.style.border="0px",zn.style.borderTop="3px solid "+(Ee.uiStyleSettings!==void 0?Ee.uiStyleSettings.toolboxColor:"#eeeeee"),zn.style.flexGrow="2",Yn.appendChild(zn),Qt.appendChild(Yn),an==="both"||an==="end"){var Dn=document.createElement("div");Dn.style.display="flex",Dn.style.alignItems="center",Dn.style.minHeight="20px",Dn.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="`+(Ee.uiStyleSettings!==void 0?Ee.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Dn.style.marginRight="5px",Qt.appendChild(Dn)}Ee.typeBoxes.push(Qt)},Ee=this,ft=0;ft<4;ft++)_e(ft);return Be},xe.prototype.setCurrentType=function(Se,Be){var _e=this;this.currentType=Se,this.typeBoxes.forEach(function(Ee){Ee.style.borderColor=Ee===Be?_e.uiStyleSettings!==void 0?_e.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},xe}(me),$e=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.arrowType="end",Ee.arrowBaseHeight=10,Ee.arrowBaseWidth=10,Ee.getArrowPoints=Ee.getArrowPoints.bind(Ee),Ee.setArrowType=Ee.setArrowType.bind(Ee),Ee.arrowTypePanel=new lt("Arrow type","end"),Ee.arrowTypePanel.onArrowTypeChanged=Ee.setArrowType,Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.arrow1&&Se!==this.arrow2)},xe.prototype.getArrowPoints=function(Se,Be){var _e=this.arrowBaseWidth+2*this.strokeWidth,Ee=this.arrowBaseHeight+2*this.strokeWidth;return Se-_e/2+","+(Be+Ee/2)+" "+Se+","+(Be-Ee/2)+" "+(Se+_e/2)+","+(Be+Ee/2)},xe.prototype.createTips=function(){this.arrow1=st.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=st.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.arrow2)},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Te.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",st.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),st.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Se=0;Math.abs(this.x1-this.x2)>.1&&(Se=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Be=this.arrow1.transform.baseVal.getItem(0);Be.setRotate(Se,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Be,0);var _e=this.arrow2.transform.baseVal.getItem(0);_e.setRotate(Se+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(_e,0)}},xe.prototype.setArrowType=function(Se){this.arrowType=Se,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Object.assign({arrowType:this.arrowType},Te.prototype.getState.call(this));return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){Te.prototype.restoreState.call(this,Se);var Be=Se;this.arrowType=Be.arrowType,this.createTips(),this.adjustVisual()},xe.typeName="ArrowMarker",xe.title="Arrow marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',xe}(kt),Nt=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.fillColor=_e.defaultFillColor,Ee.strokeWidth=0,Ee.fillPanel=new we("Color",_e.defaultColorSet,_e.defaultFillColor),Ee.fillPanel.onColorChanged=Ee.setFillColor,Ee}return Me(xe,Te),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Te.prototype.getState.call(this);return Se.typeName=xe.typeName,Se},xe.typeName="CoverMarker",xe.title="Cover marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',xe}(Ke),cn=function(Te){function xe(Se,Be,_e,Ee){var ft=Te.call(this,Se,Ee||'<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 ft.opacities=[],ft.opacityBoxes=[],ft.opacities=Be,ft.currentOpacity=_e,ft.setCurrentOpacity=ft.setCurrentOpacity.bind(ft),ft}return Me(xe,Te),xe.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",Be.style.justifyContent="space-between",this.opacities.forEach(function(_e){var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.alignItems="center",Ee.style.justifyContent="center",Ee.style.padding="5px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.borderColor=_e===Se.currentOpacity?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){Se.setCurrentOpacity(_e,Ee)}),Be.appendChild(Ee);var ft=document.createElement("div");ft.innerText=100*_e+"%",Ee.appendChild(ft),Se.opacityBoxes.push(Ee)}),Be},xe.prototype.setCurrentOpacity=function(Se,Be){var _e=this;this.currentOpacity=Se,this.opacityBoxes.forEach(function(Ee){Ee.style.borderColor=Ee===Be?_e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},xe}(me),sn=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.setOpacity=Ee.setOpacity.bind(Ee),Ee.fillColor=_e.defaultHighlightColor,Ee.strokeWidth=0,Ee.opacity=_e.defaultHighlightOpacity,Ee.fillPanel=new we("Color",_e.defaultColorSet,Ee.fillColor),Ee.fillPanel.onColorChanged=Ee.setFillColor,Ee.opacityPanel=new cn("Opacity",_e.defaultOpacitySteps,Ee.opacity),Ee.opacityPanel.onOpacityChanged=Ee.setOpacity,Ee}return Me(xe,Te),xe.prototype.setOpacity=function(Se){this.opacity=Se,this.visual&&st.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Te.prototype.getState.call(this);return Se.typeName=xe.typeName,Se},xe.typeName="HighlightMarker",xe.title="Highlight marker",xe.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>',xe}(Nt),Ft='<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>',$t='<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>',en=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.bgColor="transparent",Ee.tipPosition={x:0,y:0},Ee.tipBase1Position={x:0,y:0},Ee.tipBase2Position={x:0,y:0},Ee.tipMoving=!1,Ee.color=_e.defaultStrokeColor,Ee.bgColor=_e.defaultFillColor,Ee.fontFamily=_e.defaultFontFamily,Ee.defaultSize={x:100,y:30},Ee.setBgColor=Ee.setBgColor.bind(Ee),Ee.getTipPoints=Ee.getTipPoints.bind(Ee),Ee.positionTip=Ee.positionTip.bind(Ee),Ee.setTipPoints=Ee.setTipPoints.bind(Ee),Ee.colorPanel=new we("Text color",_e.defaultColorSet,Ee.color,Ft),Ee.colorPanel.onColorChanged=Ee.setColor,Ee.bgColorPanel=new we("Fill color",_e.defaultColorSet,Ee.bgColor,$t),Ee.bgColorPanel.onColorChanged=Ee.setBgColor,Ee.fontFamilyPanel=new Bt("Font",_e.defaultFontFamilies,_e.defaultFontFamily),Ee.fontFamilyPanel.onFontChanged=Ee.setFont,Ee.tipGrip=new Ie,Ee.tipGrip.visual.transform.baseVal.appendItem(st.createTransform()),Ee.controlBox.appendChild(Ee.tipGrip.visual),Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return Te.prototype.ownsTarget.call(this,Se)||this.tipGrip.ownsTarget(Se)||this.tip===Se},xe.prototype.createTip=function(){st.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=st.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},xe.prototype.pointerDown=function(Se,Be){this.state==="new"&&Te.prototype.pointerDown.call(this,Se,Be),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Be)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Te.prototype.pointerDown.call(this,Se,Be)},xe.prototype.pointerUp=function(Se){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Te.prototype.pointerUp.call(this,Se);else{var Be=this.state==="creating";Te.prototype.pointerUp.call(this,Se),this.setTipPoints(Be),this.positionTip()}},xe.prototype.manipulate=function(Se){if(this.tipMoving){var Be=this.unrotatePoint(Se);this.tipPosition={x:Be.x-this.manipulationStartLeft,y:Be.y-this.manipulationStartTop},this.positionTip()}else Te.prototype.manipulate.call(this,Se)},xe.prototype.setBgColor=function(Se){this.bgRectangle&&this.tip&&(st.setAttributes(this.bgRectangle,[["fill",Se]]),st.setAttributes(this.tip,[["fill",Se]])),this.bgColor=Se,this.fillColorChanged(Se)},xe.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},xe.prototype.setTipPoints=function(Se){Se===void 0&&(Se=!1);var Be=Math.min(this.height/2,15),_e=this.height/5;Se&&(this.tipPosition={x:Be+_e/2,y:this.height+20});var Ee=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ee<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(_e=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:0},this.tipBase2Position={x:Be+_e,y:0}):(this.tipBase1Position={x:0,y:Be},this.tipBase2Position={x:0,y:Be+_e}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ee<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(_e=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-_e,y:0},this.tipBase2Position={x:this.width-Be,y:0}):(this.tipBase1Position={x:this.width,y:Be},this.tipBase2Position={x:this.width,y:Be+_e}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ee<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(_e=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-_e,y:this.height},this.tipBase2Position={x:this.width-Be,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Be-_e},this.tipBase2Position={x:this.width,y:this.height-Be}):Ee<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(_e=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:this.height},this.tipBase2Position={x:Be+_e,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Be},this.tipBase2Position={x:0,y:this.height-Be-_e})},xe.prototype.resize=function(Se){Te.prototype.resize.call(this,Se),this.positionTip()},xe.prototype.positionTip=function(){st.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Se=this.tipGrip.visual.transform.baseVal.getItem(0);Se.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Se,0)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.select=function(){this.positionTip(),Te.prototype.select.call(this)},xe.prototype.getState=function(){var Se=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Te.prototype.getState.call(this));return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){var Be=Se;this.bgColor=Be.bgColor,this.tipPosition=Be.tipPosition,Te.prototype.restoreState.call(this,Se),this.createTip(),this.setTipPoints()},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be),this.tipPosition={x:this.tipPosition.x*Se,y:this.tipPosition.y*Be},this.positionTip()},xe.typeName="CalloutMarker",xe.title="Callout marker",xe.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>',xe}(Gt),Nn=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.fillColor="transparent",Ee.strokeColor="transparent",Ee.strokeWidth=0,Ee.strokeDasharray="",Ee.opacity=1,Ee.strokeColor=_e.defaultColor,Ee.strokeWidth=_e.defaultStrokeWidth,Ee.strokeDasharray=_e.defaultStrokeDasharray,Ee.fillColor=_e.defaultFillColor,Ee.setStrokeColor=Ee.setStrokeColor.bind(Ee),Ee.setFillColor=Ee.setFillColor.bind(Ee),Ee.setStrokeWidth=Ee.setStrokeWidth.bind(Ee),Ee.setStrokeDasharray=Ee.setStrokeDasharray.bind(Ee),Ee.setOpacity=Ee.setOpacity.bind(Ee),Ee.createVisual=Ee.createVisual.bind(Ee),Ee.strokePanel=new we("Line color",He(_e.defaultColorSet,["transparent"]),_e.defaultColor),Ee.strokePanel.onColorChanged=Ee.setStrokeColor,Ee.fillPanel=new we("Fill color",He(_e.defaultColorSet,["transparent"]),Ee.fillColor,$t),Ee.fillPanel.onColorChanged=Ee.setFillColor,Ee.strokeWidthPanel=new gt("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),Ee.strokeWidthPanel.onWidthChanged=Ee.setStrokeWidth,Ee.strokeStylePanel=new Re("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),Ee.strokeStylePanel.onStyleChanged=Ee.setStrokeDasharray,Ee.opacityPanel=new cn("Opacity",_e.defaultOpacitySteps,Ee.opacity),Ee.opacityPanel.onOpacityChanged=Ee.setOpacity,Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.visual)},xe.prototype.createVisual=function(){this.visual=st.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)},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},xe.prototype.manipulate=function(Se){Te.prototype.manipulate.call(this,Se)},xe.prototype.resize=function(Se){Te.prototype.resize.call(this,Se),this.setSize()},xe.prototype.setSize=function(){Te.prototype.setSize.call(this),st.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},xe.prototype.pointerUp=function(Se){Te.prototype.pointerUp.call(this,Se),this.setSize()},xe.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.visual&&st.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Se),this.stateChanged()},xe.prototype.setFillColor=function(Se){this.fillColor=Se,this.visual&&st.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Se),this.stateChanged()},xe.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.visual&&st.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.visual&&st.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.setOpacity=function(Se){this.opacity=Se,this.visual&&st.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this));return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){var Be=Se;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),Te.prototype.restoreState.call(this,Se),this.setSize()},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be),this.setSize()},xe.typeName="EllipseMarker",xe.title="Ellipse marker",xe.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>',xe}(Je),fn=function(Te){function xe(Se,Be,_e){return Te.call(this,Se,Be,_e)||this}return Me(xe,Te),Object.defineProperty(xe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.tip1&&Se!==this.tip2)},xe.prototype.createTips=function(){this.tip1=st.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(st.createTransform()),this.visual.appendChild(this.tip1),this.tip2=st.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(st.createTransform()),this.visual.appendChild(this.tip2)},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Te.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(st.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()]]),st.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 Se=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Be=this.tip1.transform.baseVal.getItem(0);Be.setRotate(Se,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Be,0);var _e=this.tip2.transform.baseVal.getItem(0);_e.setRotate(Se+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(_e,0)}},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Te.prototype.getState.call(this);return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){Te.prototype.restoreState.call(this,Se),this.createTips(),this.adjustVisual()},xe.typeName="MeasurementMarker",xe.title="Measurement marker",xe.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>',xe}(kt),Mn=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.strokePanel.colors=_e.defaultColorSet,Ee.fillColor="transparent",Ee}return Me(xe,Te),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Te.prototype.getState.call(this);return Se.typeName=xe.typeName,Se},xe.typeName="EllipseFrameMarker",xe.title="Ellipse frame marker",xe.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>',xe}(Nn),pt=function(){function Te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Te.prototype.addUndoStep=function(xe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(xe)||(this.undoStack.push(xe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(xe)&&this.redoStack.splice(0,this.redoStack.length))},Te.prototype.replaceLastUndoStep=function(xe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=xe)},Te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Te.prototype.undo=function(){if(this.undoStack.length>1){var xe=this.undoStack.pop();return xe!==void 0&&this.redoStack.push(xe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Te}(),Ln=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.strokeColor="transparent",Ee.strokeWidth=0,Ee.strokeDasharray="",Ee.curveX=0,Ee.curveY=0,Ee.manipulationStartCurveX=0,Ee.manipulationStartCurveY=0,Ee.setStrokeColor=Ee.setStrokeColor.bind(Ee),Ee.setStrokeWidth=Ee.setStrokeWidth.bind(Ee),Ee.setStrokeDasharray=Ee.setStrokeDasharray.bind(Ee),Ee.positionGrips=Ee.positionGrips.bind(Ee),Ee.addControlGrips=Ee.addControlGrips.bind(Ee),Ee.adjustVisual=Ee.adjustVisual.bind(Ee),Ee.setupControlBox=Ee.setupControlBox.bind(Ee),Ee.resize=Ee.resize.bind(Ee),Ee.strokeColor=_e.defaultColor,Ee.strokeWidth=_e.defaultStrokeWidth,Ee.strokeDasharray=_e.defaultStrokeDasharray,Ee.strokePanel=new we("Line color",_e.defaultColorSet,_e.defaultColor),Ee.strokePanel.onColorChanged=Ee.setStrokeColor,Ee.strokeWidthPanel=new gt("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),Ee.strokeWidthPanel.onWidthChanged=Ee.setStrokeWidth,Ee.strokeStylePanel=new Re("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),Ee.strokeStylePanel.onStyleChanged=Ee.setStrokeDasharray,Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.selectorCurve&&Se!==this.visibleCurve&&!this.curveGrip.ownsTarget(Se))},xe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},xe.prototype.createVisual=function(){this.visual=st.createGroup(),this.selectorCurve=st.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=st.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)},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Se.x,this.curveY=Se.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Be)&&(this.activeGrip=this.curveGrip,this._state="resize")},xe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),st.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),st.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),st.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setupControlBox=function(){Te.prototype.setupControlBox.call(this),this.curveControlLine1=st.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=st.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)},xe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Te.prototype.addControlGrips.call(this)},xe.prototype.positionGrips=function(){Te.prototype.positionGrips.call(this);var Se=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Se/2,this.curveY-Se/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()))},xe.prototype.manipulate=function(Se){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Se.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Se.y-this.manipulationStartY),Te.prototype.manipulate.call(this,Se)},xe.prototype.resize=function(Se){this.activeGrip===this.curveGrip&&(this.curveX=Se.x,this.curveY=Se.y),Te.prototype.resize.call(this,Se),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},xe.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.adjustVisual(),this.colorChanged(Se)},xe.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.adjustVisual()},xe.prototype.scale=function(Se,Be){this.curveX=this.curveX*Se,this.curveY=this.curveY*Be,Te.prototype.scale.call(this,Se,Be)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Te.prototype.getState.call(this));return Se.typeName=xe.typeName,Se},xe.prototype.restoreState=function(Se){Te.prototype.restoreState.call(this,Se);var Be=Se;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.curveX=Be.curveX,this.curveY=Be.curveY,this.createVisual(),this.adjustVisual()},xe.typeName="CurveMarker",xe.title="Curve marker",xe.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>',xe}(Et),Un=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,Be,_e)||this;return Ee.fillColor="transparent",Ee.strokeColor="transparent",Ee.strokeWidth=0,Ee.strokeDasharray="",Ee.textColor="transparent",Ee.fontSize="1rem",Ee.isMoved=!1,Ee.captionText="Caption",Ee.PADDING=5,Ee.captionBoxWidth=0,Ee.captionBoxHeight=0,Ee.strokeColor=_e.defaultColor,Ee.strokeWidth=_e.defaultStrokeWidth,Ee.strokeDasharray=_e.defaultStrokeDasharray,Ee.fillColor=_e.defaultFillColor,Ee.textColor=_e.defaultStrokeColor,Ee.fontFamily=_e.defaultFontFamily,Ee.fontSize=_e.defaultCaptionFontSize,Ee.captionText=_e.defaultCaptionText,Ee.setStrokeColor=Ee.setStrokeColor.bind(Ee),Ee.setFillColor=Ee.setFillColor.bind(Ee),Ee.setStrokeWidth=Ee.setStrokeWidth.bind(Ee),Ee.setStrokeDasharray=Ee.setStrokeDasharray.bind(Ee),Ee.createVisual=Ee.createVisual.bind(Ee),Ee.sizeCaption=Ee.sizeCaption.bind(Ee),Ee.setCaptionText=Ee.setCaptionText.bind(Ee),Ee.showTextEditor=Ee.showTextEditor.bind(Ee),Ee.positionTextEditor=Ee.positionTextEditor.bind(Ee),Ee.finishTextEditing=Ee.finishTextEditing.bind(Ee),Ee.setFont=Ee.setFont.bind(Ee),Ee.setTextColor=Ee.setTextColor.bind(Ee),Ee.strokePanel=new we("Line color",He(_e.defaultColorSet,["transparent"]),Ee.strokeColor),Ee.strokePanel.onColorChanged=Ee.setStrokeColor,Ee.fillPanel=new we("Fill color",He(_e.defaultColorSet,["transparent"]),Ee.fillColor,$t),Ee.fillPanel.onColorChanged=Ee.setFillColor,Ee.strokeWidthPanel=new gt("Line width",_e.defaultStrokeWidths,_e.defaultStrokeWidth),Ee.strokeWidthPanel.onWidthChanged=Ee.setStrokeWidth,Ee.strokeStylePanel=new Re("Line style",_e.defaultStrokeDasharrays,_e.defaultStrokeDasharray),Ee.strokeStylePanel.onStyleChanged=Ee.setStrokeDasharray,Ee.fontFamilyPanel=new Bt("Font",_e.defaultFontFamilies,_e.defaultFontFamily),Ee.fontFamilyPanel.onFontChanged=Ee.setFont,Ee.textColorPanel=new we("Text color",_e.defaultColorSet,Ee.textColor,Ft),Ee.textColorPanel.onColorChanged=Ee.setTextColor,Ee}return Me(xe,Te),xe.prototype.ownsTarget=function(Se){return!(!Te.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.frame&&Se!==this.captionBg&&Se!==this.captionElement)},xe.prototype.createVisual=function(){this.visual=st.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=st.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=st.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=st.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()},xe.prototype.setCaptionText=function(Se){this.captionText=Se,this.captionElement.textContent=this.captionText,this.sizeCaption()},xe.prototype.pointerDown=function(Se,Be){Te.prototype.pointerDown.call(this,Se,Be),this.isMoved=!1,this.pointerDownPoint=Se,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},xe.prototype.manipulate=function(Se){Te.prototype.manipulate.call(this,Se),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Se.x-this.pointerDownPoint.x)>5||Math.abs(Se.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Se){Te.prototype.resize.call(this,Se),this.setSize()},xe.prototype.sizeCaption=function(){var Se=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Se.width+2*this.PADDING,this.captionBoxHeight=Se.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),st.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')"]]),st.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')"]])},xe.prototype.showTextEditor=function(){var Se=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(Be){Be.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Be){Be.key==="Enter"&&Se.finishTextEditing(Se.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Se.finishTextEditing(Se.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Se.finishTextEditing(Se.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},xe.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"))},xe.prototype.finishTextEditing=function(Se){this.setCaptionText(Se.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},xe.prototype.setFont=function(Se){this.captionElement&&st.setAttributes(this.captionElement,[["font-family",Se]]),this.fontFamily=Se,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},xe.prototype.setTextColor=function(Se){this.captionElement&&st.setAttributes(this.captionElement,[["fill",Se]]),this.textColor=Se,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},xe.prototype.setSize=function(){Te.prototype.setSize.call(this),st.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},xe.prototype.pointerUp=function(Se){Te.prototype.pointerUp.call(this,Se),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.dblClick=function(Se,Be){Te.prototype.dblClick.call(this,Se,Be),this.showTextEditor()},xe.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.frame&&st.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Se),this.stateChanged()},xe.prototype.setFillColor=function(Se){this.fillColor=Se,this.captionBg&&st.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Se),this.stateChanged()},xe.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.frame&&st.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.frame&&st.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Se=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},Te.prototype.getState.call(this));return Se.typeName=this.typeName,Se},xe.prototype.restoreState=function(Se){var Be=Se;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.textColor=Be.textColor,this.fontFamily=Be.fontFamily,this.captionText=Be.captionText,this.fontSize=Be.fontSize,this.createVisual(),Te.prototype.restoreState.call(this,Se),this.setSize()},xe.prototype.scale=function(Se,Be){Te.prototype.scale.call(this,Se,Be),this.setSize()},xe.typeName="CaptionFrameMarker",xe.title="Caption frame marker",xe.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>',xe}(Je),Zt=function(){function Te(xe,Se){Se===void 0&&(Se=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=xe,this.cancelable=Se}return Object.defineProperty(Te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Te.prototype.preventDefault=function(){this._defaultPrevented=!0},Te}(),tn=function(Te){function xe(Se,Be,_e){var Ee=Te.call(this,Se,!1)||this;return Ee.dataUrl=Be,Ee.state=_e,Ee}return Me(xe,Te),xe}(Zt),Rt=function(Te){function xe(Se,Be,_e){_e===void 0&&(_e=!1);var Ee=Te.call(this,Se,_e)||this;return Ee.marker=Be,Ee}return Me(xe,Te),xe}(Zt),Lt=function(){function Te(){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 Te.prototype.addEventListener=function(xe,Se){this[xe].push(Se)},Te.prototype.removeEventListener=function(xe,Se){var Be=this[xe].indexOf(Se);Be>-1&&this[xe].splice(Be,1)},Te}(),ut=function(){function Te(xe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new qe,this._isOpen=!1,this.undoRedoManager=new pt,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 Lt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Te.instanceCounter++,this.styles=new te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=xe,this.targetRoot=document.body,this.width=xe.clientWidth,this.height=xe.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(Te.prototype,"ALL_MARKER_TYPES",{get:function(){return[At,Ut,$e,Gt,Mn,Nn,sn,en,fn,Nt,kt,Ln,Un]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[At,Ut,$e,Gt,Nn,sn,en]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[At,Ut,$e,Gt,sn]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(xe){var Se=this;this._availableMarkerTypes.splice(0),xe.forEach(function(Be){if(typeof Be=="string"){var _e=Se.ALL_MARKER_TYPES.find(function(Ee){return Ee.typeName===Be});_e!==void 0&&Se._availableMarkerTypes.push(_e)}else Se._availableMarkerTypes.push(Be)})},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(xe){this._zoomLevel=xe,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(Te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),mt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Te.prototype.show=function(){var xe=this;this.styles.styleSheetRoot===void 0&&Ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Se){return Se(new Zt(xe))})},Te.prototype.render=function(){return yt(this,void 0,void 0,function(){var xe;return ct(this,function(Se){switch(Se.label){case 0:return this.setCurrentMarker(),(xe=new dt).naturalSize=this.renderAtNaturalSize,xe.imageType=this.renderImageType,xe.imageQuality=this.renderImageQuality,xe.markersOnly=this.renderMarkersOnly,xe.width=this.renderWidth,xe.height=this.renderHeight,[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Se.sent(),[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Se.sent()]}})})},Te.prototype.close=function(xe){var Se=this;if(xe===void 0&&(xe=!1),this.isOpen){var Be=!1;xe||this.eventListeners.beforeclose.forEach(function(_e){var Ee=new Zt(Se,!0);_e(Ee),Ee.defaultPrevented&&(Be=!0)}),Be||(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(_e){return _e(new Zt(Se))}),this.detachEvents(),this._isOpen=!1)}},Te.prototype.addMarkersToToolbar=function(){for(var xe,Se=[],Be=0;Be<arguments.length;Be++)Se[Be]=arguments[Be];(xe=this._availableMarkerTypes).push.apply(xe,Se)},Te.prototype.addRenderEventListener=function(xe){this.addEventListener("render",function(Se){xe(Se.dataUrl,Se.state)})},Te.prototype.removeRenderEventListener=function(xe){},Te.prototype.addCloseEventListener=function(xe){this.addEventListener("close",function(){xe()})},Te.prototype.removeCloseEventListener=function(xe){},Te.prototype.setupResizeObserver=function(){var xe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){xe.resize(xe.target.clientWidth,xe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return xe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Te.prototype.onPopupTargetResize=function(){var xe=1*this.target.clientWidth/this.target.clientHeight,Se=this.editorCanvas.clientWidth/xe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*xe:this.editorCanvas.clientWidth,Be=Se<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/xe;this.resize(Se,Be)},Te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Te.prototype.resize=function(xe,Se){this._isResizing=!0;var Be=xe/this.imageWidth,_e=Se/this.imageHeight;this.imageWidth=Math.round(xe),this.imageHeight=Math.round(Se),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(Be,_e),this._isResizing=!1},Te.prototype.scaleMarkers=function(xe,Se){var Be,_e=this;this._currentMarker&&this._currentMarker instanceof Gt?this._currentMarker.scale(xe,Se):(Be=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ee){Ee!==_e._currentMarker&&Ee.scale(xe,Se)}),Be!==void 0&&this.setCurrentMarker(Be)},Te.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"},Te.prototype.setTopLeft=function(){var xe=this.editingTarget.getBoundingClientRect(),Se=this.editorCanvas.getBoundingClientRect();this.left=xe.left-Se.left,this.top=xe.top-Se.top},Te.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)},Te.prototype.addDefs=function(){for(var xe,Se=[],Be=0;Be<arguments.length;Be++)Se[Be]=arguments[Be];this.defs=st.createDefs(),this.addDefsToImage(),(xe=this.defs).append.apply(xe,Se)},Te.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Te.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)},Te.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Te.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Te.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)},Te.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Te.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)},Te.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 xe=document.createElement("a");xe.href="https://markerjs.com/",xe.target="_blank",xe.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>',xe.title="Powered by marker.js",xe.style.display="grid",xe.style.alignItems="center",xe.style.justifyItems="center",xe.style.padding="3px",xe.style.width="20px",xe.style.height="20px",this.logoUI.appendChild(xe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Te.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")},Te.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"},Te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Te.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 xe=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=xe+"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 se(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 de(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Te.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Te.prototype.removeMarker=function(xe){this.markerImage.removeChild(xe.container),this.markers.indexOf(xe)>-1&&this.markers.splice(this.markers.indexOf(xe),1),xe.dispose()},Te.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())},Te.prototype.toolbarButtonClicked=function(xe,Se){if(xe==="marker"&&Se!==void 0)this.createNewMarker(Se);else if(xe==="action")switch(Se){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()}},Te.prototype.deleteSelectedMarker=function(){var xe=this;if(this._currentMarker!==void 0){var Se=!1;if(this.eventListeners.markerbeforedelete.forEach(function(_e){var Ee=new Rt(xe,xe._currentMarker,!0);_e(Ee),Ee.defaultPrevented&&(Se=!0)}),!Se){var Be=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(_e){return _e(new Rt(xe,Be))})}}},Te.prototype.clear=function(){var xe=this,Se=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ft){var Xt=new Rt(xe,void 0,!0);ft(Xt),Xt.defaultPrevented&&(Se=!0)}),!Se)){this.setCurrentMarker();for(var Be=function(ft){var Xt=_e.markers[ft];_e.setCurrentMarker(_e.markers[ft]),_e._currentMarker.dispose(),_e.markerImage.removeChild(_e._currentMarker.container),_e.markers.splice(_e.markers.indexOf(_e._currentMarker),1),_e.eventListeners.markerdelete.forEach(function(an){return an(new Rt(xe,Xt))})},_e=this,Ee=this.markers.length-1;Ee>=0;Ee--)Be(Ee);this.addUndoStep()}},Object.defineProperty(Te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Te.prototype.showNotesEditor=function(){var xe;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=(xe=this._currentMarker.notes)!==null&&xe!==void 0?xe:"",this.overlayContainer.appendChild(this.notesArea))},Te.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)},Te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Te.prototype.addUndoStep=function(){var xe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Se=this.getState(),Be=this.undoRedoManager.getLastUndoStep();if(!Be||Be.width===Se.width&&Be.height===Se.height){var _e=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Se),_e<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ee){return Ee(new Zt(xe))})}else this.undoRedoManager.replaceLastUndoStep(Se),this.eventListeners.statechange.forEach(function(Ee){return Ee(new Zt(xe))})}},Te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Te.prototype.undoStep=function(){var xe=this,Se=this.undoRedoManager.undo();Se!==void 0&&(this.restoreState(Se),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new Zt(xe))}))},Te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Te.prototype.redoStep=function(){var xe=this,Se=this.undoRedoManager.redo();Se!==void 0&&(this.restoreState(Se),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new Zt(xe))}))},Te.prototype.stepZoom=function(){var xe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=xe<this.zoomSteps.length-1?this.zoomSteps[xe+1]:this.zoomSteps[0]},Te.prototype.panTo=function(xe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-xe.x,top:this.prevPanPoint.y-xe.y}),this.prevPanPoint=xe},Te.prototype.startRenderAndClose=function(){return yt(this,void 0,void 0,function(){var xe,Se,Be=this;return ct(this,function(_e){switch(_e.label){case 0:return[4,this.render()];case 1:return xe=_e.sent(),Se=this.getState(),this.eventListeners.render.forEach(function(Ee){return Ee(new tn(Be,xe,Se))}),this.close(!0),[2]}})})},Te.prototype.getState=function(xe){xe===!0&&this.setCurrentMarker();var Se={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Be){return Se.markers.push(Be.getState())}),Se},Te.prototype.restoreState=function(xe){var Se=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);xe.markers.forEach(function(Be){var _e=Se._availableMarkerTypes.find(function(ft){return ft.typeName===Be.typeName});if(_e!==void 0){var Ee=Se.addNewMarker(_e);Ee.restoreState(Be),Se.markers.push(Ee)}}),xe.width&&xe.height&&(xe.width!==this.imageWidth||xe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/xe.width,this.imageHeight/xe.height),this.eventListeners.restorestate.forEach(function(Be){return Be(new Zt(Se))})},Te.prototype.addNewMarker=function(xe){var Se=st.createGroup();return this.markerImage.appendChild(Se),new xe(Se,this.overlayContainer,this.settings)},Te.prototype.createNewMarker=function(xe){var Se,Be=this;(Se=typeof xe=="string"?this._availableMarkerTypes.find(function(_e){return _e.typeName===xe}):xe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Se),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(Se.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(_e){return _e(new Rt(Be,Be._currentMarker))}))},Te.prototype.markerCreated=function(xe){var Se=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(xe),this.setCurrentMarker(xe),xe instanceof Ut&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ut):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Be){return Be(new Rt(Se,Se._currentMarker))})},Te.prototype.colorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=xe,this.settings.defaultStrokeColor=xe)},Te.prototype.fillColorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=xe)},Te.prototype.markerStateChanged=function(xe){var Se=this;this.eventListeners.markerchange.forEach(function(Be){return Be(new Rt(Se,xe))})},Te.prototype.setCurrentMarker=function(xe){var Se=this;this._currentMarker!==xe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Be){return Be(new Rt(Se,Se._currentMarker))})),this._currentMarker=xe,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(Be){return Be(new Rt(Se,Se._currentMarker))}))},Te.prototype.onPointerDown=function(xe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||xe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Se=this.markers.find(function(Be){return Be.ownsTarget(xe.target)});Se!==void 0?(this.setCurrentMarker(Se),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:xe.clientX,y:xe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY))},Te.prototype.onDblClick=function(xe){if(this._isFocused||this.focus(),this.mode==="select"){var Se=this.markers.find(function(Be){return Be.ownsTarget(xe.target)});Se!==void 0&&Se!==this._currentMarker&&this.setCurrentMarker(Se),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target):this.setCurrentMarker()}},Te.prototype.onPointerMove=function(xe){this.touchPoints!==1&&xe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||xe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(xe.clientX,xe.clientY)):this.zoomLevel>1&&this.panTo({x:xe.clientX,y:xe.clientY}))},Te.prototype.onPointerUp=function(xe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(xe.clientX,xe.clientY)),this.isDragging=!1,this.addUndoStep()},Te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Te.prototype.onKeyUp=function(xe){this._currentMarker===void 0||this.notesArea!==void 0||xe.key!=="Delete"&&xe.key!=="Backspace"||this.deleteSelectedMarker()},Te.prototype.clientToLocalCoordinates=function(xe,Se){var Be=this.markerImage.getBoundingClientRect();return{x:(xe-Be.left)/this.zoomLevel,y:(Se-Be.top)/this.zoomLevel}},Te.prototype.onWindowResize=function(){this.positionUI()},Te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var xe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=xe+"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()},Te.prototype.addLicenseKey=function(xe){mt.addKey(xe)},Te.prototype.addEventListener=function(xe,Se){this.eventListeners.addEventListener(xe,Se)},Te.prototype.removeEventListener=function(xe,Se){this.eventListeners.removeEventListener(xe,Se)},Te.prototype.renderState=function(xe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(xe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Te.prototype.focus=function(){var xe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Se){return Se(new Zt(xe))}))},Te.prototype.blur=function(){var xe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Se){return Se(new Zt(xe))}))},Te.instanceCounter=0,Te}(),Ge=ve(99064),Dt=ve(955),Tt=(Te,xe,Se)=>new Promise((Be,_e)=>{var Ee=an=>{try{Xt(Se.next(an))}catch(Qt){_e(Qt)}},ft=an=>{try{Xt(Se.throw(an))}catch(Qt){_e(Qt)}},Xt=an=>an.done?Be(an.value):Promise.resolve(an.value).then(Ee,ft);Xt((Se=Se.apply(Te,xe)).next())}),et=({data:Te,className:xe,fullWidth:Se,style:Be={},onClose:_e,onOk:Ee,showFullTools:ft,noAssociationId:Xt})=>{const an=(0,ce.useRef)(null),Qt=(0,ce.useRef)(null),En=(0,ce.useRef)(null),Yn=(0,ce.useRef)(null),[zn,Dn]=(0,ce.useState)(!1),[ii,gi]=(0,ce.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ce.useEffect)(()=>(En.current||(En.current=document.createElement("style"),document.head.appendChild(En.current)),Te!=null&&Te.visible?(document.body.setAttribute("data-custom","y-hidden"),En.current.innerHTML=" html { overflow-y: hidden; }",Te!=null&&Te.src&&pi()):(document.body.removeAttribute("data-custom"),En.current&&(document.head.removeChild(En.current),En.current=null)),()=>{document.body.removeAttribute("data-custom"),En.current&&(document.head.removeChild(En.current),En.current=null)}),[Te==null?void 0:Te.visible]);const pi=()=>Tt(void 0,null,function*(){Dn(!0),gi("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Wn=yield(0,Dt.ZJ)(Te==null?void 0:Te.src);an.current.src="",an.current.src=Wn,an.current.onload=function(){Jn()},Dn(!1),gi("")}),Ii=Wn=>Tt(void 0,null,function*(){Dn(!0),gi("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ti=yield(0,Ge.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Te.title,file:Wn.dataUrl}});ti!=null&&ti.id&&!Xt?(yield(0,Ge.ZP)(`/api/attachments/${Te.id}/add_subitem.json`,{method:"post",body:{subitem_id:ti==null?void 0:ti.id,settings:JSON.stringify(Wn.state)}})).status===0&&Ee():ti!=null&&ti.id&&Ee(ti),Dn(!1),gi("")}),Yi=()=>{const Wn=document.querySelector('a[href="https://markerjs.com/"]');Wn&&Wn.parentNode&&(Wn.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(yi=>{const mi=document.querySelector(yi.name);mi&&mi.setAttribute("title",yi.title)})},Jn=()=>{Qt.current=new ut(an.current),Qt.current.targetRoot=Yn.current,Qt.current.addEventListener("render",Ii),Qt.current.addEventListener("beforeclose",_e),ft&&(Qt.current.availableMarkerTypes=Qt.current.ALL_MARKER_TYPES,Qt.current.uiStyleSettings.redoButtonVisible=!0,Qt.current.uiStyleSettings.notesButtonVisible=!0,Qt.current.uiStyleSettings.zoomButtonVisible=!0,Qt.current.uiStyleSettings.zoomOutButtonVisible=!0,Qt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Qt.current.uiStyleSettings,Qt.current.show(),Te!=null&&Te.snapshotData&&Qt.current.restoreState(Te.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Yi()},300)};return ce.createElement(ce.Fragment,null,(Te==null?void 0:Te.visible)&&ce.createElement(Ze.Z,{spinning:zn,tip:ii,style:{position:"absolute",width:"100vw"}},ce.createElement("div",{ref:Yn,className:wt()(De.imageDimensions,xe,Se?De.fullWidth:""),style:Be},ce.createElement("img",{className:De.img,ref:an}))))}},59879:function(Cn,un,ve){"use strict";var ce=ve(59301),De=ve(88010),ze=ve(48136),wt=ve(41588),Ze=ve(43418),ht=ve(59301);const Me=(0,ce.forwardRef)(({callback:yt,width:ct,onChange:He,disabled:st,readOnly:mt,type:dt="",value:Ae="",style:te={}},ee)=>{const he=(0,ce.useRef)(),se=(0,ce.useRef)(),[de,me]=(0,ce.useState)(0),[we,Ne]=(0,ce.useState)(0),[Fe,Ie]=(0,ce.useState)(!1),je=()=>{var Re=document.createElement("div");Re.innerHTML=he.current.getValue();var At=Re.innerText;return yt&&yt(At),At};(0,ce.useImperativeHandle)(ee,()=>({getData:je}));const Je=Re=>{Re.preventDefault();const At=Re.clientX-de,qe=Re.clientY-we;document.body.onmousemove=Et=>{let kt=Et.clientX-At,Bt=Et.clientY-qe;const Gt=document.getElementsByClassName("markdown-popup-form")[0],Ut=window.innerWidth-Gt.offsetWidth,lt=window.innerHeight-Gt.offsetHeight;kt=Math.max(0,Math.min(kt,Ut)),Bt=Math.max(0,Math.min(Bt,lt)),Ke(Et.clientX,Et.clientY,At,qe)&&(me(kt),Ne(Bt))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ke=(Re,At,qe,Et)=>{const kt=document.body.clientHeight,Bt=document.body.clientWidth;return Re<20&&qe>Re||Re>Bt-20&&qe<Re||At<20&&Et>At||At>kt-20&&Et<At?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,ce.useEffect)(()=>{Fe&&setTimeout(()=>{const Re=document.getElementsByClassName("markdown-popup-form")[0],At=window.innerWidth/2-Re.offsetWidth/2,qe=window.innerHeight/2-Re.offsetHeight/2;me(At),Ne(qe)},0)},[Fe]);const gt=()=>{st||mt||Ie(!0)};return ht.createElement("div",{style:te},ht.createElement("div",{style:{width:ct||"100%",position:"relative"},className:`${De.Z.mathFillWrap} ${st||mt?"cursorDefault":""}`,onClick:()=>gt()},ht.createElement("math-field",{disabled:st,locale:"zh_cn",class:`${De.Z.mathField} ${dt}`,readOnly:mt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:he,style:{width:"100%",fontSize:Ae?18:14},value:Ae||""})),ht.createElement(Ze.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:de,top:we},title:ht.createElement("div",{style:{cursor:"move"},onMouseDown:Je},"\u8F93\u5165\u516C\u5F0F"),open:Fe,onOk:()=>{const Re=se.current.getData();he.current.setValue(Re),He(Re),Ie(!1)},onCancel:()=>{Ie(!1)},destroyOnClose:!0,className:"markdown-popup-form"},ht.createElement(wt.Z,{value:Ae,ref:se,onChange:He,showSaveButton:!1})))});un.Z=Me},41588:function(Cn,un,ve){"use strict";var ce=ve(59301),De=ve(95237),ze=ve(43604),wt=ve(99313),Ze=ve(3113),ht=ve(85149),Me=ve(88010),yt=ve(48136),ct=ve(59301);const He=(0,ce.forwardRef)(({callback:st,showSaveButton:mt,value:dt=""},Ae)=>{const te=(0,ce.useRef)(),ee=[{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 "}]}]}],he=[{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}`}]}]}],se=we=>{te.current.setValue(te.current.getValue()+" "+we.value+" ")},de=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ct.createElement(De.Z,{className:Me.Z.lists,gutter:[10,10]},ee.map((we,Ne)=>ct.createElement(ze.Z,{flex:"110px",className:Me.Z.item},ct.createElement("div",null,ct.createElement(ht.Z,{value:`$$${we.value}$$`}),we.name),ct.createElement("div",{className:Me.Z.children},we.children.map((Fe,Ie)=>ct.createElement("div",{key:Ie},ct.createElement("h1",null,Fe.name),ct.createElement(De.Z,{gutter:[10,10]},Fe.data.map((je,Je)=>ct.createElement(ze.Z,{key:Je,onClick:()=>se(je),className:Me.Z.diamond},ct.createElement(ht.Z,{value:"`$$"+je.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ct.createElement(De.Z,{className:Me.Z.lists,gutter:[10,10]},he.map((we,Ne)=>ct.createElement(ze.Z,{flex:"110px",className:Me.Z.item},ct.createElement("div",null,ct.createElement(ht.Z,{value:"`$$"+we.value+"$$`"}),we.name),ct.createElement("div",{className:Me.Z.children},we.children.map((Fe,Ie)=>ct.createElement("div",{key:Ie},Fe.name&&ct.createElement("h1",null,Fe.name),ct.createElement(De.Z,{gutter:[10,10]},Fe.data.map((je,Je)=>ct.createElement(ze.Z,{key:Je,onClick:()=>se(je),className:Me.Z.diamond},ct.createElement(ht.Z,{value:"`$$"+je.value+"$$`"}))))))))))}],me=()=>{var we=document.createElement("div");we.innerHTML=te.current.getValue();var Ne=we.innerText;return st&&st(Ne),Ne};return(0,ce.useImperativeHandle)(Ae,()=>({getData:me})),ct.createElement("div",{className:Me.Z.mathWrap},ct.createElement(wt.default,{defaultActiveKey:"1",items:de}),ct.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:te,style:{width:800,marginTop:30,fontSize:18}},dt||""),mt&&ct.createElement("div",{className:Me.Z.button},ct.createElement(Ze.ZP,{size:"large",onClick:me,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});un.Z=He},8797:function(Cn,un,ve){"use strict";var ce=ve(59301),De=ve(93314),ze=ve(3113),wt=Object.defineProperty,Ze=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,He=(Ae,te,ee)=>te in Ae?wt(Ae,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ae[te]=ee,st=(Ae,te)=>{for(var ee in te||(te={}))yt.call(te,ee)&&He(Ae,ee,te[ee]);if(Me)for(var ee of Me(te))ct.call(te,ee)&&He(Ae,ee,te[ee]);return Ae},mt=(Ae,te)=>Ze(Ae,ht(te));const dt=({img:Ae,buttonProps:te={},styles:ee={},customText:he,ButtonText:se,ButtonClick:de,Buttonclass:me,ButtonTwo:we,imgStyles:Ne,loading:Fe=!1,className:Ie=""})=>ce.createElement("section",{className:`tc animated fadeIn ${Ie}`,style:st({color:"#999",margin:"100px auto",visibility:Fe?"hidden":"visible"},ee)},ce.createElement("img",{src:Ae||De,style:mt(st({},Ne),{pointerEvents:"none",userSelect:"none"})}),ce.createElement("p",{className:"mt20 font14"},he||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ce.createElement(ze.ZP,st({className:me,onClick:de},te),se),we&&we);un.Z=dt},23210:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return me}});var ce=ve(59301),De={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ze=ve(3113),wt=ve(70557),Ze=ve(23954),ht=ve(6848),Me=ve(955),yt=ve(94941),ct=ve(8797),He=ve(3294),st=ve(19381),mt=ve(59301),dt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(we,Ne,Fe)=>Ne in we?dt(we,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):we[Ne]=Fe,se=(we,Ne)=>{for(var Fe in Ne||(Ne={}))te.call(Ne,Fe)&&he(we,Fe,Ne[Fe]);if(Ae)for(var Fe of Ae(Ne))ee.call(Ne,Fe)&&he(we,Fe,Ne[Fe]);return we},de=(we,Ne,Fe)=>new Promise((Ie,je)=>{var Je=Re=>{try{gt(Fe.next(Re))}catch(At){je(At)}},Ke=Re=>{try{gt(Fe.throw(Re))}catch(At){je(At)}},gt=Re=>Re.done?Ie(Re.value):Promise.resolve(Re.value).then(Je,Ke);gt((Fe=Fe.apply(we,Ne)).next())}),me=({editOffice:we="view",data:Ne,theme:Fe,type:Ie,filename:je,monacoEditor:Je,className:Ke,style:gt,close:Re,onClose:At,hasMask:qe,disabledDownload:Et,onImgDimensions:kt,showNodata:Bt,recordInfo:Gt})=>{const[Ut,lt]=(0,ce.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[$e,Nt]=(0,ce.useState)(""),[cn,sn]=(0,ce.useState)(),Ft=window.ENV==="build"?"/react/build":"",$t=location.host.startsWith("localhost")?He.Z.PROXY_SERVER:He.Z.API_SERVER,Nn=10*(1024*1024),fn=(0,ce.useRef)();Ne!=null&&Ne.startsWith("/api")&&Ie!=="txt"&&(Ne=He.Z.API_SERVER+Ne);const Mn=Zt=>Zt.substring(Zt.lastIndexOf("/")+1).split(".").pop();je&&Je&&(Je.filename=je),(0,ce.useEffect)(()=>{var Zt,tn;const Rt=(tn=(Zt=document.cookie)==null?void 0:Zt.replace(/\s/g,""))==null?void 0:tn.split(";");Rt==null||Rt.map(Lt=>{let ut=Lt.split("=");ut[0]==="_educoder_session"&&Nt(ut[1])})},[]),(0,ce.useEffect)(()=>{Ie==="office"&&(Ne.indexOf("bigfilescdn.")>-1||Ne.indexOf("bigfiles1")>-1?sn({url:Ne,fileType:Mn(Ne),model:Ne.indexOf("model=edit")?"edit":"view"}):pt())},[Ie,Ne]);const pt=()=>de(void 0,null,function*(){console.log("data:",Ne);let Zt=Ne;Ne.startsWith("http")||(Zt=location.origin+Zt);let tn=new URL(Zt).pathname.split("/").pop();const Rt=yield(0,yt.gJ)({attachment_id:tn});Rt.url=$t+Rt.url,sn(Rt)}),Ln=()=>{if(Ne.startsWith("http")||Ne.startsWith("blob:")){Un();return}(0,Me.Sv)(je||"educoder",Ne,je)},Un=()=>{Gt&&(0,st.fc)({id:Gt==null?void 0:Gt.id,watch_type:1,course_id:Gt==null?void 0:Gt.course_id}),(0,Me.Nd)(je||"educoder",decodeURIComponent(Ne))};return mt.createElement("div",{style:se({},gt||{}),className:`${qe&&De.bgBlack} ${Ie?De.wrp:"hide"}`},Re&&mt.createElement("div",{className:De.close,ref:fn},!!kt&&mt.createElement(ht.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>fn.current},mt.createElement("span",{onClick:()=>{At(),kt()}},mt.createElement("i",{className:"icon-yulanpizhu"}))),!Et&&mt.createElement(ht.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>fn.current},mt.createElement("span",{onClick:Un},mt.createElement("i",{className:"icon-quxiaozhiding"}))),mt.createElement(ht.Z,{title:"\u5173\u95ED",getPopupContainer:()=>fn.current},mt.createElement("span",{className:"",onClick:At},mt.createElement("i",{className:"icon-guanbi1"})))),mt.createElement("div",{className:`${De[Ke]} ${Ke} ${De.monaco} ${Ie==="txt"?"show":"hide"}`},Ie==="txt"&&mt.createElement(mt.Fragment,null,mt.createElement(Ze.ZP,se({},Je)))),Ie==="audio"&&mt.createElement("audio",{src:`${(Ne==null?void 0:Ne.indexOf("http://"))>-1||(Ne==null?void 0:Ne.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ne}`,autoPlay:!0}),Ie==="video"&&mt.createElement(mt.Fragment,null,(Ne==null?void 0:Ne.indexOf("http"))>-1?mt.createElement("video",{controls:!0,src:`${Ne}`,autoPlay:!0}):mt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ne}`,autoPlay:!0})),Ie==="office"&&cn&&mt.createElement("iframe",{src:`${Ft}/office.html?key=${cn.key}&url=${btoa(cn.url)}&callbackUrl=${$t+(cn.callbackUrl||"")}&fileType=${cn.fileType}&title=${cn.title||""}&model=${we}&officeServer=${He.Z.ONLYOFFICE}&disabledDownload=${!!Et}`}),Ie==="html"&&mt.createElement("iframe",{src:Ne+"&disposition=inline"}),Ie==="pdf"&&mt.createElement("iframe",{src:`${Ft}/js/pdfview/index.html?filename=${je||"educoder.pdf"}&url=${encodeURIComponent(Ne)}&disabledDownload=${!!Et}`}),Ie==="image"&&mt.createElement("img",{src:`${(Ne==null?void 0:Ne.indexOf("http://"))>-1||(Ne==null?void 0:Ne.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ne}`}),(Ie==="other"||Ie==="download")&&mt.createElement(mt.Fragment,null,Bt?mt.createElement(ct.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:mt.createElement(ze.ZP,{icon:mt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ln,disabled:Et},"\u4E0B\u8F7D")}):mt.createElement(ze.ZP,{type:"primary",size:"middle",onClick:Ln,disabled:Et},mt.createElement(wt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},90502:function(Cn,un,ve){"use strict";ve.d(un,{t:function(){return Rt}});var ce=ve(59301),De=ve(92832),ze=ve(78241),wt=ve(43418),Ze=ve(95237),ht=ve(43604),Me=ve(5871),yt=ve(57809),ct=ve(5112),He=ve(41984),st=ve(89070),mt=ve(43809),dt=ve(8591),Ae=ve(3113),te=ve(71418),ee=ve(24334),he={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"},se=ve(99064),de=ve(88264),me=ve(12290),we=ve(56102),Ne=ve(74440),Fe=ve(59301),Ie=Object.defineProperty,je=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,At=(Lt,ut,Ge)=>ut in Lt?Ie(Lt,ut,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Lt[ut]=Ge,qe=(Lt,ut)=>{for(var Ge in ut||(ut={}))gt.call(ut,Ge)&&At(Lt,Ge,ut[Ge]);if(Ke)for(var Ge of Ke(ut))Re.call(ut,Ge)&&At(Lt,Ge,ut[Ge]);return Lt},Et=(Lt,ut)=>je(Lt,Je(ut)),kt=(Lt,ut,Ge)=>new Promise((Dt,Tt)=>{var ot=xe=>{try{Te(Ge.next(xe))}catch(Se){Tt(Se)}},et=xe=>{try{Te(Ge.throw(xe))}catch(Se){Tt(Se)}},Te=xe=>xe.done?Dt(xe.value):Promise.resolve(xe.value).then(ot,et);Te((Ge=Ge.apply(Lt,ut)).next())}),Gt=({buttonProps:Lt,buttonText:ut,form:Ge,hackIdentifier:Dt="",answerKey:Tt,data:ot})=>{const[et,Te]=(0,ce.useState)(!1),[xe,Se]=(0,ce.useState)(!1),[Be,_e]=(0,ce.useState)(!1),[Ee,ft]=(0,ce.useState)({}),[Xt,an]=(0,ce.useState)(""),[Qt,En]=(0,ce.useState)(""),Yn=(0,ce.useRef)(Dt),zn=(0,ce.useRef)(""),Dn=(0,ce.useRef)(!1);(0,ce.useEffect)(()=>{Be&&Ii()},[Be]),(0,ce.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const ii=()=>new Date().getTime(),gi=ot==null?void 0:ot.code,pi=()=>{var Wn,ti;let yi=gi?ot==null?void 0:ot.code:(Wn=Ge.getFieldValue("hack_codes"))==null?void 0:Wn.code,mi=gi?ot==null?void 0:ot.answer_content:Ge.getFieldValue(Tt),dr=gi?ot==null?void 0:ot.input:(ti=Ge.getFieldValue("hack_sets"))==null?void 0:ti.input;mi==null||mi.forEach(mr=>{const be=mr.value||mr.answer_text||"";yi=yi.replace(/(@▁@|@▁▁@)/,be)}),En(dr),an(yi),ft({}),_e(!0)},Ii=()=>kt(void 0,null,function*(){var Wn,ti,yi,mi;const dr=ii(),mr=gi?ot==null?void 0:ot.time_limit:(Wn=Ge.getFieldsValue())==null?void 0:Wn.hack.time_limit,be=gi?(ti=ot==null?void 0:ot.answer_content)==null?void 0:ti.length:(mi=(yi=Ge.getFieldsValue())==null?void 0:yi.standard_answers)==null?void 0:mi.length;Te(!0),yield(0,de.bM)(zn.current,{test_hack_code:Xt,test_input:Qt});function ci(){return kt(this,null,function*(){const{status:Hi,data:dn}=yield(0,de.rX)(zn.current,"submit"),vi=ii()-dr>(mr+3)*1e3*be;if(Dn.current){if(vi){dt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Te(!1);return}if(Hi===0){Te(!1),ft(Et(qe({},dn),{showText:!0}));return}setTimeout(ci,1e3)}})}ci()}),Yi=()=>kt(void 0,null,function*(){var Wn,ti,yi,mi,dr,mr,be;if(!ot){try{yield Ge.validateFields()}catch(oi){(yi=(ti=(Wn=oi==null?void 0:oi.errorFields)==null?void 0:Wn[0])==null?void 0:ti.name)!=null&&yi.includes("standard_answers")?dt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):dt.ZP.error(oi.errorFields[0].errors[0]),Ge.scrollToField(oi.errorFields[0].name,{behavior:"smooth",block:"center"});return}Se(!0);let Hi="";const dn=Ge.getFieldsValue();Yn.current?Hi=yield(0,se.ZP)(`/api/problems/${Yn.current}.json`,{method:"put",body:Et(qe({},dn),{hack:Et(qe({},dn==null?void 0:dn.hack),{sub_discipline_id:(be=(mr=dn==null?void 0:dn.hack)==null?void 0:mr.sub_discipline_id)==null?void 0:be[1],difficult:dn.difficulty,item_banks_group_id:dn.item_banks_group_id}),hack_codes:Et(qe({},dn.hack_codes),{code:ee.Base64.encode(dn.hack_codes.code)}),update_hack_sets:[qe({},dn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}):(Hi=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Et(qe({},dn),{hack:Et(qe({},dn==null?void 0:dn.hack),{sub_discipline_id:(dr=(mi=dn==null?void 0:dn.hack)==null?void 0:mi.sub_discipline_id)==null?void 0:dr[1],difficult:dn.difficulty,item_banks_group_id:dn.item_banks_group_id}),hack_codes:Et(qe({},dn.hack_codes),{code:ee.Base64.encode(dn.hack_codes.code)}),hack_sets:[qe({},dn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}),Yn.current=Hi==null?void 0:Hi.identifier,sessionStorage.projectFill=Hi==null?void 0:Hi.identifier)}const ci=yield(0,se.ZP)(`/api/problems/${Yn.current}/start.json`,{method:"get"});if((ci==null?void 0:ci.status)===0){zn.current=ci==null?void 0:ci.identifier,Dn.current=!0,Se(!1),pi();return}Se(!1)}),Jn=Wn=>{const{status:ti,error_msg:yi,execute_time:mi,output:dr,input:mr,expected_output:be}=Wn;let ci=null;switch(ti){case Ne.h.OK:ci=Fe.createElement(Fe.Fragment,null,Fe.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",mi/1e3,"\u79D2"),Fe.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Ne.h.NOMATCH:ci=Fe.createElement(Fe.Fragment,null,Fe.createElement("div",null,"\u8F93\u5165\uFF1A"),Fe.createElement("pre",{style:{fontFamily:"initial"}},mr),Fe.createElement("div",null,"\u8F93\u51FA\uFF1A"),Fe.createElement("pre",{style:{fontFamily:"initial"}},dr&&ee.Base64.decode(dr)),Fe.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Fe.createElement("pre",{style:{fontFamily:"initial"}},be&&ee.Base64.decode(be)));break;case Ne.h.EXECUTEFAILURE:ci=Fe.createElement(Fe.Fragment,null,Fe.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Fe.createElement("pre",null,mr)),Fe.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Fe.createElement("pre",{className:"error"},ee.Base64.decode(yi)));break;case Ne.h.COMPILEFAILURE:ci=Fe.createElement(Fe.Fragment,null,Fe.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Fe.createElement("pre",null,mr)),Fe.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Fe.createElement("pre",{className:"error"},ee.Base64.decode(yi)));break;case Ne.h.PODFAILURE:ci=Fe.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Ne.h.TIMEOUT:ci=Fe.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Fe.createElement(Fe.Fragment,null," ",ci," ")};return Fe.createElement("div",null,Fe.createElement(Ae.ZP,Et(qe({loading:xe},Lt),{onClick:Yi}),ut),Fe.createElement(wt.default,{open:Be,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:et,cancelButtonProps:{style:{display:"none"}},onOk:()=>Ii(),onCancel:()=>{Dn.current=!1,_e(!1)}},Fe.createElement("div",{className:he.result},Fe.createElement("div",{className:he.left},Fe.createElement("div",{className:"mb20"},Fe.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!ot&&Fe.createElement(we.CopyToClipboard,{text:Xt,onCopy:()=>dt.ZP.success("\u590D\u5236\u6210\u529F")},Fe.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Fe.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Fe.createElement(me.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:Xt,onChange:Wn=>an(Wn)})),Fe.createElement("div",{className:he.right},Fe.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Fe.createElement("div",{className:he.box},Fe.createElement("div",{className:he.li},Fe.createElement(De.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:Qt,onChange:Wn=>En(Wn.target.value),bordered:!1,style:{height:180}}))),Fe.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Fe.createElement("div",{className:he.box},Fe.createElement(te.Z,{spinning:et,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Fe.createElement("div",{className:he.li,style:{height:196,overflow:"auto",padding:10}},Jn(Ee))))))))},Ut=ve(87169),lt=ve(59301),$e=Object.defineProperty,Nt=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,en=(Lt,ut,Ge)=>ut in Lt?$e(Lt,ut,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Lt[ut]=Ge,Nn=(Lt,ut)=>{for(var Ge in ut||(ut={}))Ft.call(ut,Ge)&&en(Lt,Ge,ut[Ge]);if(sn)for(var Ge of sn(ut))$t.call(ut,Ge)&&en(Lt,Ge,ut[Ge]);return Lt},fn=(Lt,ut)=>Nt(Lt,cn(ut)),Mn=(Lt,ut)=>{var Ge={};for(var Dt in Lt)Ft.call(Lt,Dt)&&ut.indexOf(Dt)<0&&(Ge[Dt]=Lt[Dt]);if(Lt!=null&&sn)for(var Dt of sn(Lt))ut.indexOf(Dt)<0&&$t.call(Lt,Dt)&&(Ge[Dt]=Lt[Dt]);return Ge};const{TextArea:pt}=De.default,Ln=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Un=({value:Lt,onChange:ut})=>lt.createElement(Switch,{checked:Lt,onChange:Ge=>{ut(Ge)}}),Zt="@\u2581@",tn="@\u2581\u2581@",Rt=({questionTitlePlaceholder:Lt,form:ut,scoreByBlank:Ge=!1,hackidentifier:Dt,answerKey:Tt})=>{const[ot,et]=(0,ce.useState)(!1),[Te,xe]=(0,ce.useState)(!1),Be=(0,st.useParams)().type==="edit",_e=(zn,Dn)=>{const ii=Dn.line;let gi=0;for(let Ii=0;Ii<ii;Ii++)gi+=zn.getLine(Ii).split(Zt).length-1;for(let Ii=0;Ii<ii;Ii++)gi+=zn.getLine(Ii).split(tn).length-1;const pi=zn.getLine(ii).substring(0,Dn.ch);return gi+=pi.split(Zt).length-1,gi+=pi.split(tn).length-1,gi},Ee=(zn,Dn,ii,gi)=>{const pi=zn.getRange(Dn.from,Dn.to);let Ii=0;if(Dn.text.forEach(Yi=>{Ii+=Yi.split(Zt).length-1}),Dn.text.forEach(Yi=>{Ii+=Yi.split(tn).length-1}),Dn.origin!=="setValue"){if(pi&&(pi.indexOf(Zt)!==-1||pi.indexOf(tn)!==-1)){const Yi=pi.split(Zt).length-1+pi.split(tn).length-1,Jn=_e(zn,Dn.from);if(console.log(`\u5220\u9664${Yi}\u4E2A\uFF0C \u524D\u9762\u6709${Jn}\u4E2A\uFF0C\u65B0\u589E${Ii}\u4E2A`),Yi>1){const Wn=Array.from({length:Yi},(ti,yi)=>Jn+yi);gi(Wn)}else gi(Jn)}else if(Ii>0){const Yi=_e(zn,Dn.from);console.log(`\u65B0\u589E${Ii}\u4E2A\uFF0C\u4E4B\u524D\u6709${Yi}\u4E2A`),ii(Ii,Yi)}}},ft=()=>{const zn=ut.getFieldValue(Tt);ut.setFieldsValue({[Tt]:zn==null?void 0:zn.map((Dn,ii)=>fn(Nn({},Dn),{position:ii+1}))})},Xt=(0,ce.useRef)(),an=(zn,Dn)=>{for(let ii=0;ii<zn;ii++)Xt.current({position:null,answer_text:""},Dn+ii);ft()},Qt=(0,ce.useRef)(),En=zn=>{Qt.current(zn),ft()},Yn=ze.default.useWatch(Tt,ut);return lt.createElement("div",{className:mt.Z.wrap},lt.createElement(ze.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},lt.createElement(He.h,{scrollId:"name",watch:!0,height:140})),lt.createElement("div",{className:mt.Z.questionTitleEditorWrap},lt.createElement(ze.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},lt.createElement(He.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(zn,Dn)=>{const ii=ut.getFieldValue(Tt);console.log("--preAnswerData",ii,Dn),ut.setFieldsValue({[Tt]:ii==null?void 0:ii.map((gi,pi)=>{var Ii;return fn(Nn({},gi),{position:pi+1,multi_line:(Ii=Dn==null?void 0:Dn[pi])==null?void 0:Ii.multiLine})})})},placeholder:Lt,onCMBeforeChange:(zn,Dn)=>{Ee(zn,Dn,an,En)}}))),lt.createElement(ze.default.List,{name:Tt,rules:[{validator(zn,Dn){if(!(Dn!=null&&Dn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const ii of Dn){const{answer_text:gi}=ii||{};if((gi==null?void 0:gi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(zn,{add:Dn,remove:ii},{errors:gi})=>(Xt.current=Dn,Qt.current=ii,lt.createElement(lt.Fragment,null,lt.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},lt.createElement(ze.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),lt.createElement("div",{onClick:()=>{wt.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:lt.createElement("div",null,lt.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",lt.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),lt.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"}},lt.createElement(Ut.Z,{style:{marginRight:3,color:"#3061D0"}}),lt.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),zn.map((pi,Ii)=>{var Yi=pi,{key:Jn,name:Wn}=Yi,ti=Mn(Yi,["key","name"]),yi,mi;return lt.createElement(Ze.Z,{className:"mb20",key:Jn,align:"middle",wrap:!1},lt.createElement(ht.Z,{flex:"0 0 auto",className:`${mt.Z.blankIndex}`},"\u586B\u7A7A\u9879",Ii+1),lt.createElement(ht.Z,{flex:1},lt.createElement(Ze.Z,{align:"top",justify:"space-between",wrap:!1},lt.createElement(ht.Z,null,lt.createElement(ze.default.Item,fn(Nn({},ti),{name:[Wn,"answer_text"],noStyle:!0}),(yi=Yn==null?void 0:Yn[Wn])!=null&&yi.multi_line||(mi=Yn==null?void 0:Yn[Wn])!=null&&mi.multiLine?lt.createElement(pt,{spellCheck:!1,style:{marginLeft:10,width:550}}):lt.createElement(De.default,{style:{marginLeft:10,width:550},className:mt.Z.blankInput,size:"large",maxLength:1e3,onBlur:dr=>{}}))),Ge&<.createElement(ht.Z,{flex:"224px"},lt.createElement(ze.default.Item,fn(Nn({},ti),{name:[Wn,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),lt.createElement(Me.Z,{size:"large",className:mt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),lt.createElement("div",{onClick:()=>et(!0)},lt.createElement(ze.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},lt.createElement(He.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ot}))),lt.createElement(ze.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"}]},lt.createElement(yt.default,{size:"large"},Ln.map(zn=>lt.createElement(yt.default.Option,{key:zn.title,value:zn.key}," ",zn.title)))),lt.createElement(ze.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},lt.createElement(ze.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},lt.createElement(Me.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),lt.createElement("span",{className:"ml10 font14"},"\u79D2")),lt.createElement(ze.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"}]},lt.createElement(ct.ZP.Group,{style:{marginTop:-10}},lt.createElement(ct.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),lt.createElement(ct.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),lt.createElement(ct.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),lt.createElement(ze.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),lt.createElement("div",{style:{background:"#F6F7F9",padding:15}},lt.createElement(ze.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},lt.createElement(pt,{rows:4})),lt.createElement(ze.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},lt.createElement(pt,{rows:4}))),lt.createElement(Gt,{form:ut,answerKey:Tt,hackIdentifier:Dt,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:lt.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"}}}))}},65357:function(Cn,un,ve){"use strict";ve.d(un,{u:function(){return Fe}});var ce=ve(59301),De=ve(95237),ze=ve(43604),wt=ve(6848),Ze=ve(78241),ht=ve(43809),Me=ve(32134),yt=ve(12893),ct=ve(41984),He=ve(59301),st=Object.defineProperty,mt=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(Ie,je,Je)=>je in Ie?st(Ie,je,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Ie[je]=Je,se=(Ie,je)=>{for(var Je in je||(je={}))te.call(je,Je)&&he(Ie,Je,je[Je]);if(Ae)for(var Je of Ae(je))ee.call(je,Je)&&he(Ie,Je,je[Je]);return Ie},de=(Ie,je)=>mt(Ie,dt(je)),me=(Ie,je)=>{var Je={};for(var Ke in Ie)te.call(Ie,Ke)&&je.indexOf(Ke)<0&&(Je[Ke]=Ie[Ke]);if(Ie!=null&&Ae)for(var Ke of Ae(Ie))je.indexOf(Ke)<0&&ee.call(Ie,Ke)&&(Je[Ke]=Ie[Ke]);return Je};const we=["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"],Ne=({value:Ie,onChange:je,choiceTextKey:Je,answerKey:Ke,index:gt,isEdit:Re,setInputActive:At,form:qe,choiceOptionsPath:Et,allowChangeMode:kt,showAddIcon:Bt,addItem:Gt,deleteItem:Ut})=>{console.log(Ie,"value");const lt=(Ie==null?void 0:Ie[Ke])===1,$e=()=>{const cn=qe.getFieldValue(Et);qe.setFieldValue(Et,cn.map(sn=>de(se({},sn),{[Ke]:0})))},Nt=()=>{lt?je(de(se({},Ie),{[Ke]:0})):(kt||$e(),je(de(se({},Ie),{[Ke]:1})))};return He.createElement(De.Z,{className:ht.Z.choiceWrap,align:"middle",wrap:!1},He.createElement(ze.Z,{onClick:Nt,className:`${ht.Z.choiceIndex} ${lt?ht.Z.activeAnswer:""}`},we[gt]),He.createElement(ze.Z,{flex:1,className:`${ht.Z.editorWrap} ml15`,onClick:At},He.createElement(ct.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Re,value:Ie==null?void 0:Ie[Je],onChange:cn=>{je(de(se({},Ie),{[Je]:cn}))}})),He.createElement(ze.Z,{flex:"0 0 auto",className:"ml15"},He.createElement("div",{onClick:Nt,className:`${ht.Z.setAnswerBtn} ${lt?ht.Z.activeAnswer:""}`},lt?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),He.createElement(ze.Z,{className:ht.Z.actionWrapper},He.createElement(wt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},He.createElement(Me.Z,{className:ht.Z.addIcon,onClick:Gt,style:{visibility:Bt?"visible":"hidden"}})),He.createElement(wt.Z,{title:"\u5220\u9664"},He.createElement(yt.Z,{className:ht.Z.deleteIcon,onClick:Ut,style:{visibility:gt>1?"visible":"hidden"}}))))},Fe=({questionTitlePlaceholder:Ie,titleKey:je,choiceKey:Je,analysisKey:Ke,choiceTextKey:gt,answerKey:Re,choiceOptionsPath:At,allowChangeMode:qe=!0,form:Et,showAnalysis:kt=!0})=>{const[Bt,Gt]=(0,ce.useState)(),[Ut,lt]=(0,ce.useState)(!1);return He.createElement("div",{className:ht.Z.wrap},He.createElement("div",{className:ht.Z.questionTitleEditorWrap},He.createElement(Ze.default.Item,{label:"\u9898\u5E72",name:je,labelCol:{span:24},rules:[{required:!0}]},He.createElement(ct.h,{scrollId:Array.isArray(je)?je.join("_"):`${je}`,watch:!0,height:140,placeholder:Ie}))),He.createElement(Ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),He.createElement(Ze.default.List,{name:Je,rules:[{validator($e,Nt){const cn=Nt.some(Ft=>Ft[Re]===1),sn=Nt.findIndex(Ft=>{var $t;return(($t=Ft[gt])==null?void 0:$t.length)<=0});return sn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[sn]}\u9009\u9879\u7684\u5185\u5BB9`)):cn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},($e,{add:Nt,remove:cn})=>He.createElement("div",{id:Array.isArray(At)?At.join("_"):`${At}`},$e.map((sn,Ft)=>{var $t=sn,{key:en,name:Nn}=$t,fn=me($t,["key","name"]);const Mn=Bt===en,pt=()=>{Gt(en)},Ln=Ft<7&&Ft===$e.length-1,Un=()=>Nt({[gt]:"",[Re]:0}),Zt=()=>cn(Nn);return He.createElement(Ze.default.Item,de(se({},fn),{key:en,name:Nn,className:ht.Z.choiceListWrap,rules:[{validator(tn,Rt){return Rt!=null&&Rt.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[Ft]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),He.createElement(Ne,{choiceTextKey:gt,answerKey:Re,index:Ft,isEdit:Mn,setInputActive:pt,form:Et,choiceOptionsPath:At,allowChangeMode:qe,showAddIcon:Ln,addItem:Un,deleteItem:Zt}))}),$e.length<8&&He.createElement("div",{className:`${ht.Z.addBtn} mb30`,onClick:()=>Nt({[gt]:"",[Re]:0})},"\u6DFB\u52A0\u9009\u9879"))),kt&&He.createElement("div",{onClick:()=>lt(!0)},He.createElement(Ze.default.Item,{name:Ke,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},He.createElement(ct.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},70472:function(Cn,un,ve){"use strict";ve.d(un,{u:function(){return qe}});var ce=ve(59301),De=ve(43418),ze=ve(95237),wt=ve(43604),Ze=ve(92832),ht=ve(6848),Me=ve(78673),yt=ve(78241),ct=ve(5112),He=ve(5871),st=ve(41984),mt=ve(12893),dt=ve(61485),Ae=ve(43809),te=ve(59879),ee=ve(59301),he=Object.defineProperty,se=Object.defineProperties,de=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Fe=(Et,kt,Bt)=>kt in Et?he(Et,kt,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):Et[kt]=Bt,Ie=(Et,kt)=>{for(var Bt in kt||(kt={}))we.call(kt,Bt)&&Fe(Et,Bt,kt[Bt]);if(me)for(var Bt of me(kt))Ne.call(kt,Bt)&&Fe(Et,Bt,kt[Bt]);return Et},je=(Et,kt)=>se(Et,de(kt)),Je=(Et,kt)=>{var Bt={};for(var Gt in Et)we.call(Et,Gt)&&kt.indexOf(Gt)<0&&(Bt[Gt]=Et[Gt]);if(Et!=null&&me)for(var Gt of me(Et))kt.indexOf(Gt)<0&&Ne.call(Et,Gt)&&(Bt[Gt]=Et[Gt]);return Bt};const Ke=({value:Et,onChange:kt})=>{const Bt=Ut=>{De.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:Ae.Z.modal,onOk:()=>{const lt=[...Et];lt.splice(Ut,1),kt(lt)}})},Gt=()=>{const Ut=[...Et];Ut.push(""),kt(Ut)};return ee.createElement(ze.Z,{className:"ml20"},ee.createElement(wt.Z,{flex:1},Et==null?void 0:Et.map((Ut,lt)=>ee.createElement(ze.Z,{key:`${Ut}_${lt}`,className:"mb20"},ee.createElement(Ze.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Ut,autoSize:{maxRows:3},maxLength:1e3,onBlur:$e=>{const Nt=[...Et],cn=$e.target.value.trim();Nt[lt]=cn,kt(Nt)}}),ee.createElement(ht.Z,{title:"\u5220\u9664"},ee.createElement(mt.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:lt>0?"visible":"hidden"},onClick:()=>Bt(lt)}))))),ee.createElement(wt.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Gt()}},"\u65B0\u589E\u7B54\u6848")))},gt=({value:Et,onChange:kt})=>{const Bt=Ut=>{De.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:Ae.Z.modal,onOk:()=>{const lt=[...Et];lt.splice(Ut,1),kt(lt)}})},Gt=()=>{const Ut=[...Et];Ut.push(""),kt(Ut)};return ee.createElement(ze.Z,{className:"ml20"},ee.createElement(wt.Z,{flex:1},Et==null?void 0:Et.map((Ut,lt)=>ee.createElement(ze.Z,{key:`${Ut}_${lt}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:Ut,style:{flex:1},onChange:$e=>{const Nt=[...Et];Nt[lt]=$e,kt(Nt)}}),ee.createElement(ht.Z,{title:"\u5220\u9664"},ee.createElement(mt.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:lt>0?"visible":"hidden"},onClick:()=>Bt(lt)}))))),ee.createElement(wt.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Gt()}},"\u65B0\u589E\u7B54\u6848")))},Re=({value:Et=!0,onChange:kt})=>ee.createElement(Me.Z,{checked:!Et,onChange:Bt=>{kt(!Bt)}}),At="\u2581",qe=({questionTitlePlaceholder:Et,form:kt,scoreByBlank:Bt=!1,answerKey:Gt})=>{const[Ut,lt]=(0,ce.useState)(!1),$e=(fn,Mn)=>{const pt=Mn.line;let Ln=0;for(let Zt=0;Zt<pt;Zt++)Ln+=fn.getLine(Zt).split(At).length-1;const Un=fn.getLine(pt).substring(0,Mn.ch);return Ln+=Un.split(At).length-1,Ln},Nt=(fn,Mn,pt,Ln)=>{const Un=fn.getRange(Mn.from,Mn.to);let Zt=0;if(Mn.text.forEach(tn=>{Zt+=tn.split(At).length-1}),Mn.origin!=="setValue"){if(Un&&Un.indexOf(At)!==-1){const tn=Un.split(At).length-1,Rt=$e(fn,Mn.from);if(console.log(`\u5220\u9664${tn}\u4E2A\uFF0C \u524D\u9762\u6709${Rt}\u4E2A\uFF0C\u65B0\u589E${Zt}\u4E2A`),tn>1){const Lt=Array.from({length:tn},(ut,Ge)=>Rt+Ge);Ln(Lt)}else Ln(Rt)}else if(Zt>0){const tn=$e(fn,Mn.from);console.log(`\u65B0\u589E${Zt}\u4E2A\uFF0C\u4E4B\u524D\u6709${tn}\u4E2A`),pt(Zt,tn)}}},cn=()=>{const fn=kt.getFieldValue(Gt);kt.setFieldsValue({[Gt]:fn.map((Mn,pt)=>je(Ie({},Mn),{position:pt+1}))})},sn=(0,ce.useRef)(),Ft=(fn,Mn)=>{for(let pt=0;pt<fn;pt++)sn.current({position:null,answer_text:[""],model:1},Mn+pt);cn()},$t=(0,ce.useRef)(),en=fn=>{$t.current(fn),cn()},Nn=yt.default.useWatch(Gt,kt);return ee.createElement("div",{className:Ae.Z.wrap},ee.createElement("div",{className:Ae.Z.questionTitleEditorWrap},ee.createElement(yt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(st.h,{scrollId:"name",watch:!0,height:140,placeholder:Et,showNullButton:!0,onCMBeforeChange:(fn,Mn)=>{Nt(fn,Mn,Ft,en)}}))),ee.createElement(yt.default.List,{name:Gt,rules:[{validator(fn,Mn){if(!(Mn!=null&&Mn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const pt of Mn){const{answer_text:Ln}=pt||{};if(Ln!=null&&Ln.some(Un=>(Un==null?void 0:Un.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(fn,{add:Mn,remove:pt},{errors:Ln})=>(sn.current=Mn,$t.current=pt,ee.createElement(ee.Fragment,null,ee.createElement(yt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(fn!=null&&fn.length)&&ee.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),fn.map((Un,Zt)=>{var tn=Un,{key:Rt,name:Lt}=tn,ut=Je(tn,["key","name"]),Ge,Dt;return ee.createElement("div",{style:{marginBottom:10},key:Rt},ee.createElement(ze.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(wt.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Ae.Z.blankIndex}`},"\u586B\u7A7A\u9879",Zt+1),ee.createElement(yt.default.Item,je(Ie({},ut),{name:[Lt,"model"],noStyle:!0}),ee.createElement(ct.ZP.Group,{onChange:()=>{const Tt=kt.getFieldValue(Gt);kt.setFieldsValue({[Gt]:Tt.map((ot,et)=>je(Ie({},ot),{answer_text:Lt===et?[""]:ot.answer_text}))})}},ee.createElement(ct.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(ht.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(dt.Z,null))),ee.createElement(ct.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(ht.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(dt.Z,null)))))),ee.createElement(ze.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(wt.Z,{flex:1},ee.createElement(ze.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(wt.Z,{flex:1},ee.createElement(yt.default.Item,je(Ie({},ut),{name:[Lt,"answer_text"],noStyle:!0}),((Dt=(Ge=kt.getFieldValue(Gt))==null?void 0:Ge[Lt])==null?void 0:Dt.model)===1?ee.createElement(Ke,null):ee.createElement(gt,null))),Bt&&ee.createElement(wt.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(yt.default.Item,je(Ie({},ut),{name:[Lt,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ae.Z.blankInputNumberWrapper}),ee.createElement(He.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(yt.default.Item,je(Ie({},ut),{name:[Lt,"position"],noStyle:!0}),ee.createElement(Ze.default,{type:"hidden"})))))})))),ee.createElement(ze.Z,{align:"middle"},ee.createElement(yt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(wt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(ze.Z,{align:"middle"},ee.createElement(yt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(wt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Nn==null?void 0:Nn.length)>1&&ee.createElement(ze.Z,{align:"middle",className:(Nn==null?void 0:Nn.length)>1?"mb30":`${Ae.Z.hide}`},ee.createElement(yt.default.Item,{name:"is_ordered"},ee.createElement(Re,null)),ee.createElement(wt.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")),ee.createElement("div",{onClick:()=>lt(!0)},ee.createElement(yt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(st.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},11832:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return me}});var ce=ve(59301),De=ve(95237),ze=ve(43604),wt=ve(78241),Ze=ve(43809),ht=ve(41984),Me=ve(59301),yt=Object.defineProperty,ct=Object.defineProperties,He=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Ae=(we,Ne,Fe)=>Ne in we?yt(we,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):we[Ne]=Fe,te=(we,Ne)=>{for(var Fe in Ne||(Ne={}))mt.call(Ne,Fe)&&Ae(we,Fe,Ne[Fe]);if(st)for(var Fe of st(Ne))dt.call(Ne,Fe)&&Ae(we,Fe,Ne[Fe]);return we},ee=(we,Ne)=>ct(we,He(Ne)),he=(we,Ne)=>{var Fe={};for(var Ie in we)mt.call(we,Ie)&&Ne.indexOf(Ie)<0&&(Fe[Ie]=we[Ie]);if(we!=null&&st)for(var Ie of st(we))Ne.indexOf(Ie)<0&&dt.call(we,Ie)&&(Fe[Ie]=we[Ie]);return Fe};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},de=({value:we,onChange:Ne,form:Fe})=>{const Ie=(we==null?void 0:we.is_answer)===1,je=we==null?void 0:we.choice_text,Je=()=>{const Ke=Fe.getFieldsValue().choices.map(gt=>({choice_text:gt.choice_text,is_answer:0}));Fe.setFieldsValue({choices:Ke}),Ne(ee(te({},we),{is_answer:1}))};return Me.createElement(De.Z,{className:Ze.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Me.createElement(ze.Z,{onClick:Je,className:`${Ze.Z.choiceIndex} ${Ze.Z.judgementIndex} ${Ie?Ze.Z.activeAnswer:""}`},se[je]),Me.createElement(ze.Z,{flex:1,className:`${Ze.Z.editorWrap} ml15`},Me.createElement("div",{className:`${Ze.Z.inputBorder} ${Ze.Z.placeholder} ${Ie?Ze.Z.activeJudgementAnswer:""}`},je)),Me.createElement(ze.Z,{flex:"0 0 auto",className:"ml15"},Me.createElement("div",{onClick:Je,className:`${Ze.Z.setAnswerBtn} ${Ie?Ze.Z.activeAnswer:""}`},Ie?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},me=({questionTitlePlaceholder:we,choiceKey:Ne,form:Fe})=>{const[Ie,je]=(0,ce.useState)(!1);return Me.createElement("div",{className:Ze.Z.wrap},Me.createElement("div",{className:Ze.Z.questionTitleEditorWrap},Me.createElement(wt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Me.createElement(ht.h,{scrollId:"name",watch:!0,height:140,placeholder:we}))),Me.createElement(wt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Me.createElement(wt.default.List,{name:"choices",rules:[{validator(Je,Ke){return Ke.some(Re=>(Re==null?void 0:Re.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Je=>Me.createElement("div",{id:"choices"},Je.map(Ke=>{var gt=Ke,{key:Re,name:At}=gt,qe=he(gt,["key","name"]);return Me.createElement(wt.default.Item,ee(te({},qe),{key:Re,name:At,noStyle:!0}),Me.createElement(de,{form:Fe}))})))),Me.createElement("div",{onClick:()=>je(!0)},Me.createElement(wt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Me.createElement(ht.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ie}))))}},41984:function(Cn,un,ve){"use strict";ve.d(un,{h:function(){return te},x:function(){return ee}});var ce=ve(12290),De=ve(43809),ze=ve(85149),wt=ve(59301),Ze=Object.defineProperty,ht=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,st=(he,se,de)=>se in he?Ze(he,se,{enumerable:!0,configurable:!0,writable:!0,value:de}):he[se]=de,mt=(he,se)=>{for(var de in se||(se={}))ct.call(se,de)&&st(he,de,se[de]);if(yt)for(var de of yt(se))He.call(se,de)&&st(he,de,se[de]);return he},dt=(he,se)=>ht(he,Me(se)),Ae=(he,se)=>{var de={};for(var me in he)ct.call(he,me)&&se.indexOf(me)<0&&(de[me]=he[me]);if(he!=null&&yt)for(var me of yt(he))se.indexOf(me)<0&&He.call(he,me)&&(de[me]=he[me]);return de};const te=he=>{var se=he,{value:de,onChange:me,scrollId:we}=se,Ne=Ae(se,["value","onChange","scrollId"]);return wt.createElement("div",{id:we||""},wt.createElement(ce.Z,dt(mt({},Ne),{defaultValue:de,onChange:(Fe,Ie)=>{Ie!=null&&Ie.length?me(Fe,Ie):me(Fe)}})))},ee=({value:he,onChange:se,placeholder:de,height:me=140,isEdit:we,miniToolbar:Ne,watch:Fe=!0})=>we?wt.createElement(ce.Z,{watch:Fe,isFocus:!0,height:me||void 0,placeholder:de,defaultValue:he,onChange:se,miniToolbar:Ne}):wt.createElement("div",{style:{cursor:"pointer"}},he?wt.createElement(ze.Z,{className:De.Z.inputBorder,value:he}):wt.createElement("div",{className:`${De.Z.inputBorder} ${De.Z.placeholder} inputBorderError`},de))},35173:function(Cn,un,ve){"use strict";ve.d(un,{W:function(){return gt}});var ce=ve(59301),De=ve(8591),ze=ve(12563),wt=ve(78241),Ze=ve(78673),ht=ve(95237),Me=ve(43604),yt=ve(6848),ct=ve(92832),He=ve(5871),st=ve(43809),mt=ve(41984),dt=ve(12290),Ae=ve(61485),te=Object.defineProperty,ee=Object.defineProperties,he=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,we=(Re,At,qe)=>At in Re?te(Re,At,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Re[At]=qe,Ne=(Re,At)=>{for(var qe in At||(At={}))de.call(At,qe)&&we(Re,qe,At[qe]);if(se)for(var qe of se(At))me.call(At,qe)&&we(Re,qe,At[qe]);return Re},Fe=(Re,At)=>ee(Re,he(At)),Ie=(Re,At)=>{var qe={};for(var Et in Re)de.call(Re,Et)&&At.indexOf(Et)<0&&(qe[Et]=Re[Et]);if(Re!=null&&se)for(var Et of se(Re))At.indexOf(Et)<0&&me.call(Re,Et)&&(qe[Et]=Re[Et]);return qe};const je=Re=>{var At=Re,{value:qe,onChange:Et}=At,kt=Ie(At,["value","onChange"]);const Bt=Gt=>{Et([Gt])};return ce.createElement(dt.Z,Fe(Ne({},kt),{defaultValue:qe==null?void 0:qe[0],onChange:Bt}))},Je=Re=>{if(!Re)return!1;if(/^s*$/.test(Re)||Re.trim()===""){De.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let At=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 Re==="|"?(De.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Ke=({value:Re=[],onClose:At})=>ce.createElement(ze.default,{closable:!0,onClose:At,className:st.Z.keywordTag},ce.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Re.join(" \u6216 "))),gt=({questionTitlePlaceholder:Re,form:At,showKeywords:qe,isMustKeyWords:Et=qe})=>{const[kt,Bt]=(0,ce.useState)(!1),[Gt,Ut]=(0,ce.useState)(""),lt=wt.default.useWatch("use_keywords",At),$e=wt.default.useWatch("question_score",At);return ce.createElement("div",{className:st.Z.wrap},ce.createElement("div",{className:st.Z.questionTitleEditorWrap},ce.createElement(wt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ce.createElement(mt.h,{scrollId:"name",watch:!0,height:140,placeholder:Re}))),ce.createElement(wt.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},ce.createElement(je,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),qe&&!Et&&ce.createElement(wt.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},ce.createElement(Ze.Z,{defaultChecked:!0})),qe&&Et&&ce.createElement(ht.Z,{align:"middle",className:"mb30"},ce.createElement(wt.default.Item,{name:"use_keywords",valuePropName:"checked"},ce.createElement(Ze.Z,null)),ce.createElement(Me.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ce.createElement(Me.Z,null,ce.createElement(yt.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"},ce.createElement(Ae.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(lt||!Et)&&ce.createElement(wt.default.List,{name:"keywords",rules:[{validator(Nt,cn){return Et?cn!=null&&cn.length?(cn==null?void 0:cn.reduce((Ft,$t)=>Ft+$t.score,0))>parseFloat($e)?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()}}]},(Nt,{add:cn,remove:sn})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:`${st.Z.title} mb10`},Et?"\u5173\u952E\u8BCD":ce.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ce.createElement(ht.Z,{align:"middle",className:"font14 mb30"},ce.createElement(Me.Z,{flex:1},ce.createElement(ct.default,{value:Gt,onChange:Ft=>{Ut(Ft.target.value)},maxLength:50,allowClear:!0,onPressEnter:Ft=>{var $t,en,Nn,fn;const Mn=`${($t=Ft.target)==null?void 0:$t.value}`,pt=(Nn=(en=Mn==null?void 0:Mn.split("|"))==null?void 0:en.filter(Zt=>!!Zt))==null?void 0:Nn.map(Zt=>Zt==null?void 0:Zt.trim()),Ln=At.getFieldValue("keywords"),Un=((fn=Ln==null?void 0:Ln.map(Zt=>Zt==null?void 0:Zt.keyword))==null?void 0:fn.flat())||[];for(const Zt of pt)if(Un.includes(Zt)){De.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Je(Mn)&&(cn({keyword:pt,score:1}),Ut(""))},className:st.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"})),ce.createElement(Me.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Nt.map(Ft=>{var $t=Ft,{key:en,name:Nn}=$t,fn=Ie($t,["key","name"]);return ce.createElement(ht.Z,{key:en,className:"mb20",style:{marginRight:148}},ce.createElement(Me.Z,{flex:1},ce.createElement(ht.Z,{align:"middle",justify:"space-between"},ce.createElement(wt.default.Item,Fe(Ne({},fn),{name:[Nn,"keyword"]}),ce.createElement(Ke,{onClose:()=>sn(Nn)})),Et&&ce.createElement(wt.default.Item,Fe(Ne({},fn),{name:[Nn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:st.Z.blankInputNumberWrapper}),ce.createElement(He.Z,{className:st.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ce.createElement("div",{onClick:()=>Bt(!0)},ce.createElement(wt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(mt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:kt}))))}},94734:function(Cn,un,ve){"use strict";ve.d(un,{tc:function(){return Yi.t},uh:function(){return ce.u},rL:function(){return Ii},u8:function(){return ze.u},ZZ:function(){return De.Z},Wk:function(){return wt.W}});var ce=ve(65357),De=ve(11832),ze=ve(70472),wt=ve(35173),Ze=ve(59301),ht=ve(36381),Me=ve(78241),yt=ve(95237),ct=ve(43604),He=ve(5871),st=ve(6848),mt=ve(38854),dt=ve(43809),Ae=ve(12893),te=ve(41984),ee=ve(43418),he=ve(92832),se=ve(78673),de=ve(59301),me=Object.defineProperty,we=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Je=(Jn,Wn,ti)=>Wn in Jn?me(Jn,Wn,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Jn[Wn]=ti,Ke=(Jn,Wn)=>{for(var ti in Wn||(Wn={}))Ie.call(Wn,ti)&&Je(Jn,ti,Wn[ti]);if(Fe)for(var ti of Fe(Wn))je.call(Wn,ti)&&Je(Jn,ti,Wn[ti]);return Jn},gt=(Jn,Wn)=>we(Jn,Ne(Wn)),Re=(Jn,Wn)=>{var ti={};for(var yi in Jn)Ie.call(Jn,yi)&&Wn.indexOf(yi)<0&&(ti[yi]=Jn[yi]);if(Jn!=null&&Fe)for(var yi of Fe(Jn))Wn.indexOf(yi)<0&&je.call(Jn,yi)&&(ti[yi]=Jn[yi]);return ti};const At=({value:Jn,onChange:Wn})=>{const ti=mi=>{ee.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:dt.Z.modal,onOk:()=>{const dr=[...Jn];dr.splice(mi,1),Wn(dr)}})},yi=()=>{const mi=[...Jn];mi.push(""),Wn(mi)};return de.createElement(yt.Z,{className:"ml20"},de.createElement(ct.Z,{flex:1},Jn==null?void 0:Jn.map((mi,dr)=>de.createElement(yt.Z,{key:`${mi}_${dr}`,align:"middle",className:"mb20"},de.createElement(he.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:mi,autoSize:{maxRows:3},maxLength:1e3,onBlur:mr=>{const be=[...Jn],ci=mr.target.value.trim();be[dr]=ci,Wn(be)}}),de.createElement(st.Z,{title:"\u5220\u9664"},de.createElement(Ae.Z,{className:dt.Z.deleteIcon,style:{marginLeft:15,visibility:dr>0?"visible":"hidden"},onClick:()=>ti(dr)}))))),de.createElement(ct.Z,null,de.createElement("div",{className:`${dt.Z.addBtn}`,onClick:()=>{yi()}},"\u65B0\u589E\u7B54\u6848")))},qe=({value:Jn=!0,onChange:Wn})=>de.createElement(se.Z,{checked:!Jn,onChange:ti=>{Wn(!ti)}}),Et="\u2581",kt=({questionTitlePlaceholder:Jn,form:Wn,name:ti,scoreByBlank:yi=!1,answerKey:mi,titleKey:dr="name",analysisKey:mr="analysis",isOrdered:be="is_ordered"})=>{var ci,Hi;const[dn,oi]=(0,Ze.useState)(!1),vi=(qt,xt)=>{const nt=xt.line;let Kt=0;for(let xn=0;xn<nt;xn++)Kt+=qt.getLine(xn).split(Et).length-1;const ln=qt.getLine(nt).substring(0,xt.ch);return Kt+=ln.split(Et).length-1,Kt},Fi=(qt,xt,nt,Kt)=>{const ln=qt.getRange(xt.from,xt.to);let xn=0;if(xt.text.forEach(On=>{xn+=On.split(Et).length-1}),xt.origin!=="setValue"){if(ln&&ln.indexOf(Et)!==-1){const On=ln.split(Et).length-1,St=vi(qt,xt.from);if(console.log(`\u5220\u9664${On}\u4E2A\uFF0C \u524D\u9762\u6709${St}\u4E2A\uFF0C\u65B0\u589E${xn}\u4E2A`),On>1){const gn=Array.from({length:On},(Rn,ai)=>St+ai);Kt(gn)}else Kt(St)}else if(xn>0){const On=vi(qt,xt.from);console.log(`\u65B0\u589E${xn}\u4E2A\uFF0C\u4E4B\u524D\u6709${On}\u4E2A`),nt(xn,On)}}},Vn=()=>{const qt=Wn.getFieldValue(["sub_item_banks",...mi]);Wn.setFieldValue(["sub_item_banks",...mi],qt==null?void 0:qt.map((xt,nt)=>gt(Ke({},xt),{position:nt+1})))},bn=(0,Ze.useRef)(),Mt=(qt,xt)=>{for(let nt=0;nt<qt;nt++)bn.current({position:null,answer_text:[""]},xt+nt);Vn()},Ot=(0,Ze.useRef)(),Ve=qt=>{Ot.current(qt),Vn()},Yt=(Hi=(ci=Wn.getFieldValue("sub_item_banks"))==null?void 0:ci[mi==null?void 0:mi[0]])==null?void 0:Hi[mi==null?void 0:mi[1]];return(0,Ze.useEffect)(()=>{console.log("========",Wn.getFieldsValue())},[Wn]),de.createElement("div",{className:dt.Z.wrap},de.createElement("div",{className:dt.Z.questionTitleEditorWrap},de.createElement(Me.default.Item,{label:"\u9898\u5E72",name:dr,labelCol:{span:24},rules:[{required:!0}]},de.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Jn,showNullButton:!0,onCMBeforeChange:(qt,xt)=>{Fi(qt,xt,Mt,Ve)}}))),de.createElement(Me.default.List,{name:mi,rules:[{validator(qt,xt){if((xt==null?void 0:xt.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const nt of xt){const{answer_text:Kt}=nt||{};if(Kt!=null&&Kt.some(ln=>(ln==null?void 0:ln.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(qt,{add:xt,remove:nt},{errors:Kt})=>(bn.current=xt,Ot.current=nt,de.createElement(de.Fragment,null,de.createElement(Me.default.Item,{label:de.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(qt!=null&&qt.length)&&de.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),qt.map((ln,xn)=>{var On=ln,{key:St,name:gn}=On,Rn=Re(On,["key","name"]);return de.createElement(yt.Z,{align:"top",key:St},de.createElement(ct.Z,{className:`${dt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",xn+1),de.createElement(ct.Z,{flex:1},de.createElement(yt.Z,{align:"top",justify:"space-between"},de.createElement(ct.Z,{flex:1},de.createElement(Me.default.Item,gt(Ke({},Rn),{name:[gn,"answer_text"],noStyle:!0}),de.createElement(At,null))),yi&&de.createElement(ct.Z,{flex:"224px"},de.createElement(Me.default.Item,gt(Ke({},Rn),{name:[gn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:dt.Z.blankInputNumberWrapper}),de.createElement(He.Z,{className:dt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),de.createElement(Me.default.Item,gt(Ke({},Rn),{name:[gn,"position"],noStyle:!0}),de.createElement(he.default,{type:"hidden"}))))})))),de.createElement(yt.Z,{align:"middle"},de.createElement(Me.default.Item,{name:[ti,"downcase"],valuePropName:"checked"},de.createElement(se.Z,null)),de.createElement(ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),de.createElement(yt.Z,{align:"middle"},de.createElement(Me.default.Item,{name:[ti,"no_space"],valuePropName:"checked"},de.createElement(se.Z,null)),de.createElement(ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Yt==null?void 0:Yt.length)>1&&de.createElement(yt.Z,{align:"middle",className:(Yt==null?void 0:Yt.length)>1?"mb30":`${dt.Z.hide}`},de.createElement(Me.default.Item,{name:be},de.createElement(qe,null)),de.createElement(ct.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")),de.createElement("div",{className:"mt30",onClick:()=>oi(!0)},de.createElement(Me.default.Item,{name:mr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},de.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:dn}))))};var Bt=ve(59301),Gt=Object.defineProperty,Ut=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,sn=(Jn,Wn,ti)=>Wn in Jn?Gt(Jn,Wn,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Jn[Wn]=ti,Ft=(Jn,Wn)=>{for(var ti in Wn||(Wn={}))Nt.call(Wn,ti)&&sn(Jn,ti,Wn[ti]);if($e)for(var ti of $e(Wn))cn.call(Wn,ti)&&sn(Jn,ti,Wn[ti]);return Jn},$t=(Jn,Wn)=>Ut(Jn,lt(Wn)),en=(Jn,Wn)=>{var ti={};for(var yi in Jn)Nt.call(Jn,yi)&&Wn.indexOf(yi)<0&&(ti[yi]=Jn[yi]);if(Jn!=null&&$e)for(var yi of $e(Jn))Wn.indexOf(yi)<0&&cn.call(Jn,yi)&&(ti[yi]=Jn[yi]);return ti};const Nn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},fn=({value:Jn,onChange:Wn,form:ti,choiceKey:yi})=>{const mi=(Jn==null?void 0:Jn.is_answer)===1,dr=Jn==null?void 0:Jn.choice_text,mr=()=>{var be;const ci=(be=ti==null?void 0:ti.getFieldValue(["sub_item_banks",...yi]))==null?void 0:be.map(Hi=>({choice_text:Hi.choice_text,is_answer:0}));ti==null||ti.setFieldValue(["sub_item_banks",...yi],ci),Wn($t(Ft({},Jn),{is_answer:1}))};return Bt.createElement(yt.Z,{className:dt.Z.choiceWrap,align:"middle",wrap:!1},Bt.createElement(ct.Z,{onClick:mr,className:`${dt.Z.choiceIndex} ${dt.Z.judgementIndex} ${mi?dt.Z.activeAnswer:""}`},Nn[dr]),Bt.createElement(ct.Z,{flex:1,className:`${dt.Z.editorWrap} ml15`},Bt.createElement("div",{className:`${dt.Z.inputBorder} ${dt.Z.placeholder} ${mi?dt.Z.activeJudgementAnswer:""}`},dr)),Bt.createElement(ct.Z,{flex:"0 0 auto",className:"ml15"},Bt.createElement("div",{onClick:mr,className:`${dt.Z.setAnswerBtn} ${mi?dt.Z.activeAnswer:""}`},mi?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},Mn=({questionTitlePlaceholder:Jn,choiceKey:Wn="choices",form:ti,titleKey:yi="name",analysisKey:mi="analysis"})=>{const[dr,mr]=(0,Ze.useState)(!1);return Bt.createElement("div",{className:dt.Z.wrap},Bt.createElement("div",{className:dt.Z.questionTitleEditorWrap},Bt.createElement(Me.default.Item,{label:"\u9898\u5E72",name:yi,labelCol:{span:24},rules:[{required:!0}]},Bt.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Jn}))),Bt.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Bt.createElement(Me.default.List,{name:Wn,rules:[{validator(be,ci){return ci.some(dn=>(dn==null?void 0:dn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},be=>Bt.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},be.map(ci=>{var Hi=ci,{key:dn,name:oi}=Hi,vi=en(Hi,["key","name"]);return Bt.createElement(Me.default.Item,$t(Ft({},vi),{key:dn,name:oi,noStyle:!0}),Bt.createElement(fn,{form:ti,choiceKey:Wn}))})))),Bt.createElement("div",{className:"mt30",onClick:()=>mr(!0)},Bt.createElement(Me.default.Item,{name:mi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Bt.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:dr}))))};var pt=ve(8591),Ln=ve(12563),Un=ve(12290),Zt=ve(61485),tn=Object.defineProperty,Rt=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,Tt=(Jn,Wn,ti)=>Wn in Jn?tn(Jn,Wn,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Jn[Wn]=ti,ot=(Jn,Wn)=>{for(var ti in Wn||(Wn={}))Ge.call(Wn,ti)&&Tt(Jn,ti,Wn[ti]);if(ut)for(var ti of ut(Wn))Dt.call(Wn,ti)&&Tt(Jn,ti,Wn[ti]);return Jn},et=(Jn,Wn)=>Rt(Jn,Lt(Wn)),Te=(Jn,Wn)=>{var ti={};for(var yi in Jn)Ge.call(Jn,yi)&&Wn.indexOf(yi)<0&&(ti[yi]=Jn[yi]);if(Jn!=null&&ut)for(var yi of ut(Jn))Wn.indexOf(yi)<0&&Dt.call(Jn,yi)&&(ti[yi]=Jn[yi]);return ti};const xe=Jn=>{var Wn=Jn,{value:ti,onChange:yi}=Wn,mi=Te(Wn,["value","onChange"]);const dr=mr=>{yi([mr])};return Ze.createElement(Un.Z,et(ot({},mi),{defaultValue:ti==null?void 0:ti[0],onChange:dr}))},Se=Jn=>{if(!Jn)return!1;let Wn=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==="|"?(pt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Be=({value:Jn=[],onClose:Wn})=>Ze.createElement(Ln.default,{closable:!0,onClose:Wn,className:dt.Z.keywordTag},Ze.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Jn.join(" \u6216 "))),_e=({questionTitlePlaceholder:Jn,form:Wn,showKeywords:ti,isMustKeyWords:yi=ti,titleKey:mi="name",analysisKey:dr="analysis",answerTexts:mr="answer_texts",keywords:be="keywords",useKeywords:ci="use_keywords",indexs:Hi})=>{const[dn,oi]=(0,Ze.useState)(!1),[vi,Fi]=(0,Ze.useState)(""),[Vn,bn]=(0,Ze.useState)(!1),Mt=Me.default.useWatch("question_score",Wn);return Ze.createElement("div",{className:dt.Z.wrap},Ze.createElement("div",{className:dt.Z.questionTitleEditorWrap},Ze.createElement(Me.default.Item,{label:"\u9898\u5E72",name:mi,labelCol:{span:24},rules:[{required:!0}]},Ze.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Jn}))),Ze.createElement(Me.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:mr,labelCol:{span:24}},Ze.createElement(xe,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),ti&&!yi&&Ze.createElement(Me.default.Item,{hidden:!0,name:ci,valuePropName:"checked"},Ze.createElement(se.Z,{defaultChecked:!0})),ti&&yi&&Ze.createElement(yt.Z,{align:"middle",className:"mb30"},Ze.createElement(Me.default.Item,{name:ci,valuePropName:"checked"},Ze.createElement(se.Z,{onChange:()=>{var Ot,Ve,Yt,qt,xt,nt;console.log(Wn.getFieldsValue()),bn((Yt=(Ve=(Ot=Wn.getFieldsValue())==null?void 0:Ot.sub_item_banks)==null?void 0:Ve[Hi])==null?void 0:Yt.use_keywords),console.log((nt=(xt=(qt=Wn.getFieldsValue())==null?void 0:qt.sub_item_banks)==null?void 0:xt[Hi])==null?void 0:nt.use_keywords),console.log(Vn)}})),Ze.createElement(ct.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Ze.createElement(ct.Z,null,Ze.createElement(st.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"},Ze.createElement(Zt.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Vn||!yi)&&Ze.createElement(Me.default.List,{name:be,rules:[{validator(Ot,Ve){return yi?Ve!=null&&Ve.length?(Ve==null?void 0:Ve.reduce((qt,xt)=>qt+xt.score,0))>parseFloat(Mt)?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()}}]},(Ot,{add:Ve,remove:Yt})=>Ze.createElement(Ze.Fragment,null,Ze.createElement("div",{className:`${dt.Z.title} mb10`},yi?"\u5173\u952E\u8BCD":Ze.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),Ze.createElement(yt.Z,{align:"middle",className:"font14 mb30"},Ze.createElement(ct.Z,{flex:1},Ze.createElement(he.default,{value:vi,onChange:qt=>{Fi(qt.target.value)},maxLength:50,allowClear:!0,onPressEnter:qt=>{var xt,nt,Kt,ln;const xn=`${(xt=qt.target)==null?void 0:xt.value}`,On=(Kt=(nt=xn==null?void 0:xn.split("|"))==null?void 0:nt.filter(Rn=>!!Rn))==null?void 0:Kt.map(Rn=>Rn==null?void 0:Rn.trim()),St=Wn.getFieldValue(["sub_item_banks",...be]),gn=((ln=St==null?void 0:St.map(Rn=>Rn==null?void 0:Rn.keyword))==null?void 0:ln.flat())||[];for(const Rn of On)if(gn.includes(Rn)){pt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Se(xn)&&(Ve({keyword:On,score:1}),Fi(""))},className:dt.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"})),Ze.createElement(ct.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ot.map(qt=>{var xt=qt,{key:nt,name:Kt}=xt,ln=Te(xt,["key","name"]);return Ze.createElement(yt.Z,{key:nt,className:"mb20",style:{marginRight:148}},Ze.createElement(ct.Z,{flex:1},Ze.createElement(yt.Z,{align:"middle",justify:"space-between"},Ze.createElement(Me.default.Item,et(ot({},ln),{name:[Kt,"keyword"]}),Ze.createElement(Be,{onClose:()=>Yt(Kt)})),yi&&Ze.createElement(Me.default.Item,et(ot({},ln),{name:[Kt,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:dt.Z.blankInputNumberWrapper}),Ze.createElement(He.Z,{className:dt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),Ze.createElement("div",{onClick:()=>oi(!0)},Ze.createElement(Me.default.Item,{name:dr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ze.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:dn}))))};var Ee=ve(59301),ft=Object.defineProperty,Xt=Object.defineProperties,an=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,Yn=Object.prototype.propertyIsEnumerable,zn=(Jn,Wn,ti)=>Wn in Jn?ft(Jn,Wn,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Jn[Wn]=ti,Dn=(Jn,Wn)=>{for(var ti in Wn||(Wn={}))En.call(Wn,ti)&&zn(Jn,ti,Wn[ti]);if(Qt)for(var ti of Qt(Wn))Yn.call(Wn,ti)&&zn(Jn,ti,Wn[ti]);return Jn},ii=(Jn,Wn)=>Xt(Jn,an(Wn)),gi=(Jn,Wn)=>{var ti={};for(var yi in Jn)En.call(Jn,yi)&&Wn.indexOf(yi)<0&&(ti[yi]=Jn[yi]);if(Jn!=null&&Qt)for(var yi of Qt(Jn))Wn.indexOf(yi)<0&&Yn.call(Jn,yi)&&(ti[yi]=Jn[yi]);return ti};const{Panel:pi}=ht.default,Ii=({questionTitlePlaceholder:Jn,choiceKey:Wn,form:ti,withScore:yi})=>{const[mi,dr]=(0,Ze.useState)([]),mr=be=>{dr(be)};return Ee.createElement("div",{className:dt.Z.wrap},Ee.createElement("div",{className:dt.Z.questionTitleEditorWrap},Ee.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Ee.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Jn}))),Ee.createElement(Me.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),Ee.createElement(Me.default.List,{name:"sub_item_banks",rules:[{validator(be,ci){return ci?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(be,{add:ci,remove:Hi,move:dn})=>{const oi=ti.getFieldValue("sub_item_banks");return Ee.createElement(Ee.Fragment,null,Ee.createElement(ht.default,{className:be.length>0?dt.Z.collapseWrapper:"",bordered:!1,activeKey:mi,onChange:mr,expandIcon:({isActive:vi})=>Ee.createElement("i",{className:`iconfont icon-weizhankai ${vi?dt.Z.open:dt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},be.map((vi,Fi)=>{var Vn=vi,{key:bn,name:Mt}=Vn,Ot=gi(Vn,["key","name"]),Ve,Yt,qt,xt,nt,Kt,ln,xn,On,St;return Ee.createElement(pi,{className:dt.Z.panel,forceRender:!0,header:Ee.createElement("div",{className:dt.Z.panelHeader},"\u7B2C",Fi+1,"\u5C0F\u9898",Ee.createElement("span",null,"\uFF08",((Ve=oi==null?void 0:oi[Mt])==null?void 0:Ve.item_type)=="SINGLE"?"\u5355\u9009\u9898":((Yt=oi==null?void 0:oi[Mt])==null?void 0:Yt.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((qt=oi==null?void 0:oi[Mt])==null?void 0:qt.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((xt=oi==null?void 0:oi[Mt])==null?void 0:xt.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Mt,extra:Ee.createElement(yt.Z,{align:"middle",onClick:gn=>gn.stopPropagation()},yi&&Ee.createElement(ct.Z,null,Ee.createElement(Me.default.Item,ii(Dn({},Ot),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Mt,"question_score"],className:dt.Z.blankInputNumberWrapper}),Ee.createElement(He.Z,{className:dt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),Ee.createElement(ct.Z,null,Ee.createElement(yt.Z,{align:"middle",className:"pl40",justify:"end"},Fi!==0&&Ee.createElement("div",{onClick:()=>{var gn;dn(Fi,Fi-1);const Rn=(gn=ti.getFieldValue("sub_item_banks"))==null?void 0:gn.map((ai,hn)=>(be.map((Jt,Xn)=>{hn===Xn&&(ai.q_position=Number(Jt.name)+1)}),ai));ti.setFieldValue("sub_item_banks",Rn)}},Ee.createElement(st.Z,{title:"\u4E0A\u79FB"},Ee.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),Fi<be.length-1&&Ee.createElement("div",{onClick:()=>{var gn;dn(Fi,Fi+1);const Rn=(gn=ti.getFieldValue("sub_item_banks"))==null?void 0:gn.map((ai,hn)=>(be.map((Jt,Xn)=>{hn===Xn&&(ai.q_position=Number(Jt.name)+1)}),ai));ti.setFieldValue("sub_item_banks",Rn)},className:Fi===0?"":"ml15"},Ee.createElement(st.Z,{title:"\u4E0B\u79FB"},Ee.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),Ee.createElement(ct.Z,null,Ee.createElement(st.Z,{title:"\u5220\u9664"},Ee.createElement(Ae.Z,{className:`${dt.Z.deleteIcon} ml15`,onClick:()=>Hi(Mt)}))))},Ee.createElement(Me.default.Item,ii(Dn({},Ot),{name:Mt}),(((nt=oi==null?void 0:oi[Mt])==null?void 0:nt.item_type)=="SINGLE"||((Kt=oi==null?void 0:oi[Mt])==null?void 0:Kt.item_type)=="MULTIPLE")&&Ee.createElement(ce.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((ln=oi==null?void 0:oi[Mt])==null?void 0:ln.item_type)=="MULTIPLE",form:ti,choiceKey:[Mt,"choices"],titleKey:[Mt,"name"],analysisKey:[Mt,"analysis"],choiceOptionsPath:["sub_item_banks",Mt,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((xn=oi==null?void 0:oi[Mt])==null?void 0:xn.item_type)=="COMPLETION"&&Ee.createElement(kt,{form:ti,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:Mt,titleKey:[Mt,"name"],analysisKey:[Mt,"analysis"],isOrdered:[Mt,"is_ordered"],answerKey:[Mt,"standard_answers"]}),((On=oi==null?void 0:oi[Mt])==null?void 0:On.item_type)=="JUDGMENT"&&Ee.createElement(Mn,{form:ti,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Mt,"name"],analysisKey:[Mt,"analysis"],choiceKey:[Mt,"choices"]}),((St=oi==null?void 0:oi[Mt])==null?void 0:St.item_type)=="SUBJECTIVE"&&Ee.createElement(_e,{showKeywords:!0,isMustKeyWords:!1,form:ti,titleKey:[Mt,"name"],analysisKey:[Mt,"analysis"],answerTexts:[Mt,"answer_texts"],useKeywords:[Mt,"use_keywords"],keywords:[Mt,"keywords"],indexs:Mt,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),be.length<20&&Ee.createElement(mt.Z,{menu:{items:[{label:Ee.createElement("div",{onClick:()=>{ci({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),dr([be==null?void 0:be.length,...mi])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:Ee.createElement("div",{onClick:()=>{ci({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),dr([be==null?void 0:be.length,...mi])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:Ee.createElement("div",{onClick:()=>{ci({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),dr([be==null?void 0:be.length,...mi])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:Ee.createElement("div",{onClick:()=>{ci({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),dr([be==null?void 0:be.length,...mi])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:Ee.createElement("div",{onClick:()=>{ci({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),dr([be==null?void 0:be.length,...mi])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(vi=>vi.show).map(vi=>({label:vi.label,key:vi.key}))}},Ee.createElement("div",{className:`${dt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var Yi=ve(90502)},85149:function(Cn,un,ve){"use strict";ve.d(un,{z:function(){return Ie},Z:function(){return je}});var ce=ve(59301),De=ve(50304),ze=ve(24768),wt=ve(64018),Ze=ve(65157),ht=ve(3294),Me=ve(955),yt=ve(15342),ct=ve(1012),He=ve(23210),st=ve(59301),dt=({html:Je})=>{const Ke=(0,ce.useRef)(null),gt=(0,ce.useRef)(null),Re=`.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,ce.useEffect)(()=>{const At=Ke.current.attachShadow({mode:"open"});gt.current=document.createElement("div"),gt.current.className="markdown-body",gt.current.innerHTML=Je,At.appendChild(gt.current);const qe=document.createElement("style");return qe.textContent=Re,At.appendChild(qe),()=>{At.innerHTML=""}},[]),(0,ce.useEffect)(()=>{gt.current&&(gt.current.innerHTML=Je)},[Je]),st.createElement("div",{ref:Ke})},Ae=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,se=(Je,Ke,gt)=>Ke in Je?Ae(Je,Ke,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Je[Ke]=gt,de=(Je,Ke)=>{for(var gt in Ke||(Ke={}))ee.call(Ke,gt)&&se(Je,gt,Ke[gt]);if(te)for(var gt of te(Ke))he.call(Ke,gt)&&se(Je,gt,Ke[gt]);return Je};const me="@\u2581\u2581@",we="@\u2581@",Ne=/<pre[^>]*>/g;function Fe(Je){let Ke=document.createElement("div");return Ke.innerHTML=Je,Ke.childNodes.length===0?"":Ke.childNodes[0].nodeValue}const Ie=(Je,Ke)=>{Je=Je||"";const gt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Re=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,At=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,qe=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ke?Je.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(gt,(Et,kt,Bt,Gt,Ut,lt,$e)=>{const Nt=kt||Gt||lt,cn=Bt||Ut||$e||"?";return ht.Z.API_SERVER+"/api/attachments/"+Nt+cn+"&t="+(0,Me.Jn)(Nt,Date.now())+(Et.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Je=Je.replace(qe,(Et,kt,Bt,Gt,Ut,lt,$e)=>{const Nt=kt||Gt||lt,cn=Bt||Ut||$e||"?";return ht.Z.API_SERVER+"/attachments/download/"+Nt+cn+"&t="+(0,Me.Jn)(Nt,Date.now())+(Et.indexOf(")")>-1?")":"&")}).replace(gt,(Et,kt,Bt,Gt,Ut,lt,$e)=>{const Nt=kt||Gt||lt,cn=Bt||Ut||$e||"?";return ht.Z.API_SERVER+"/api/attachments/"+Nt+cn+"&t="+(0,Me.Jn)(Nt,Date.now())+(Et.indexOf(")")>-1?")":"&")}).replace(Re,(Et,kt,Bt,Gt,Ut)=>{const lt=kt||Gt,$e=Bt||Ut||"";return'"'+ht.Z.API_SERVER+"/api/attachments/"+lt+$e+lt+$e+"&t="+(0,Me.Jn)(lt,Date.now())}).replace(At,(Et,kt,Bt,Gt,Ut)=>{const lt=kt||Gt,$e=Bt||Ut||"";return"("+ht.Z.API_SERVER+"/files/uploads/"+lt+$e+lt+$e+"&t="+(0,Me.Jn)(lt,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,`
|
|
|
`),Je)};var je=({value:Je="",className:Ke,showTextOnly:gt,showLines:Re,style:At={},stylesPrev:qe={},highlightKeywords:Et,showProgramFill:kt,isProgramFill:Bt,disabledFill:Gt=!1,programFillValue:Ut,onFillChange:lt=cn=>{},onFillBlur:$e=()=>{},onFillFocus:Nt=()=>{}})=>{let cn=String(Je);const[sn,Ft]=(0,ce.useState)(""),[$t,en]=(0,ce.useState)("office"),[Nn,fn]=(0,ce.useState)([]),Mn=(0,ce.useRef)("a"+(0,ct.Z)()),pt={},Ln=(Te,xe,Se)=>{const Be=document.createElement(Te===we?"input":"textarea");Be.style.width="100%",Be.style.height=Te===we?"40px":"151px",Be.rows=5,Be.spellcheck=!1,Be.name="edu-program-fill",Be.placeholder="\u8BF7\u8F93\u5165",Be.dataset.id=xe;const _e=Object.keys(pt).length;return pt[_e]=Be,`<span class="edu-program-fill-wrap ${Te===we?"":"show"}" style="width:${Te===we?"400px":"100%"}" title=${Se||""}><span>${Be.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Un(Te){return Te=Te.replace(/!\[.*?\]\(.*?\)/g,""),Te=Te.replace(/\[.*?\]\(.*?\)/g,""),Te=Te.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Te=Te.replace(/<embed.*?>/g,""),Te=Te.replace(/<img.*?>/g,""),Te=Te.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Te=Te.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Te=Te.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Te=Te.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Te}const Zt=Te=>Te.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(xe,Se){let Be=Se.replace(/(\n|\r)/g,"").split("}"),_e=[];return Be.map(Ee=>{Ee!=""&&_e.push(`.${Mn.current} ${Ee}`)}),`<style>${_e.join("}")}</style>`}),tn=(0,ce.useMemo)(()=>{try{const Be=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,_e=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ee=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,ft=/\(\/attachments\/download\//g;cn=cn.replace(ft,"("+ht.Z.API_SERVER+"/attachments/download/").replace(Be,"("+ht.Z.API_SERVER+"/api/attachments/").replace(_e,'"'+ht.Z.API_SERVER+"/api/attachments/").replace(Ee,'"'+ht.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`)}catch(Be){}if(kt){let Be=-1;return cn=cn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(_e,Ee,ft){var Xt;return++Be,Ln(_e,Be,(Xt=Ut==null?void 0:Ut[Be])==null?void 0:Xt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Zt(cn||"")}</pre>`}let Te=Zt(cn);Te=(0,ze.ZP)(Te);const xe=(0,ze.ez)();cn.match(/\[TOC\]/)&&(Te=Te.replace("<p>[TOC]</p>",(0,ze.Qv)()),(0,ze.Iy)()),Te=Te.replace(/(__special_katext_id_\d+__)/g,(Be,_e)=>{const{type:Ee,expression:ft}=xe[_e];return(0,yt.renderToString)(Fe(ft)||"",{displayMode:Ee==="block",throwOnError:!1,output:"html"})}),Te=Te.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ze.AL)();const Se=document.createElement("div");if(Se.innerHTML=Te,gt)return Se.innerText;if(Et){const Be=Et.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ge(Se,Be),Se.innerHTML}return setTimeout(()=>ot(),500),Se.innerHTML},[cn,Et]);(0,ce.useEffect)(()=>{Dt.current&&Dt.current.querySelectorAll(["input","textarea"]).forEach(xe=>{xe.oninput=Rt,xe.onblur=Lt,xe.onfocus=ut})},[Nn]),(0,ce.useEffect)(()=>{var Te,xe,Se,Be,_e;if(Ut!=null&&Ut.length)try{const Ee=Dt.current.querySelectorAll(".edu-program-fill-score"),ft=Dt.current.querySelectorAll('[name="edu-program-fill"]');for(const[Xt,an]of ft.entries())an.value=((Te=Ut==null?void 0:Ut[Xt])==null?void 0:Te.value)||"",((xe=Ut==null?void 0:Ut[Xt])==null?void 0:xe.type)==="warning"?an.className="program-fill-warning":((Se=Ut==null?void 0:Ut[Xt])==null?void 0:Se.type)==="success"?an.className="program-fill-success":an.className="";for(const[Xt,an]of Ee.entries())an.innerHTML=(Be=Ut==null?void 0:Ut[Xt])!=null&&Be.score?`${(_e=Ut==null?void 0:Ut[Xt])==null?void 0:_e.score}\u5206`:"";fn(Ut)}catch(Ee){console.log(Ee,"error")}},[Ut]);const Rt=Te=>{Nn[Te.target.dataset.id]=Nn[Te.target.dataset.id]||{},Nn[Te.target.dataset.id].value=Te.target.value,fn([...Nn]),lt(Nn,Te.target.dataset.id)},Lt=Te=>{Nn[Te.target.dataset.id]=Nn[Te.target.dataset.id]||{},Nn[Te.target.dataset.id].value=Te.target.value,fn([...Nn]),$e(Nn,Te.target.dataset.id)},ut=Te=>{Nn[Te.target.dataset.id]=Nn[Te.target.dataset.id]||{},Nn[Te.target.dataset.id].value=Te.target.value,fn([...Nn]),Nt(Nn,Te.target.dataset.id)};function Ge(Te,xe){return Te.childNodes.forEach(Se=>{var Be;if(Se.childNodes.length>0)Ge(Se,xe);else if(Se.nodeName!=="IMG")if(Se.innerHTML)Se.innerHTML=(Be=Se.innerHTML)==null?void 0:Be.replace(new RegExp(xe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const _e=document.createElement("span");_e.innerHTML=Se.textContent.replace(new RegExp(xe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Se.replaceWith(_e)}})}const Dt=(0,ce.useRef)();ze.jb.WebkitLineClamp=Re,Re&&(At=de(de({},At),ze.jb));function Tt(Te){let xe=Te.target;if(xe.tagName.toUpperCase()==="A"){let Se=xe.getAttribute("href");if(Se.indexOf("office")>-1)Te.preventDefault(),Ft(Se),en("office");else if(Se.indexOf("application/pdf")>-1)Te.preventDefault(),Ft(Se),en("pdf");else if(Se.indexOf("text/html")>-1)Te.preventDefault(),Ft(Se),en("html");else if(Se.startsWith("#")){Te.preventDefault();let Be=document.getElementById(Se.replace("#",""));Be&&Be.scrollIntoView(!0)}}}const ot=()=>{var Te;const xe=(Te=Dt.current)==null?void 0:Te.querySelectorAll("video");xe==null||xe.forEach(Se=>{if(Se.oncontextmenu=()=>!1,Se.src.indexOf(".m3u8")>-1&&!Se.canPlayType("application/vnd.apple.mpegurl")){if(Ze.ZP.isSupported()){var Be=new Ze.ZP;Be.loadSource(Se.src),Be.attachMedia(Se)}}})};(0,ce.useEffect)(()=>{if(Dt.current&&tn&&tn.match(Ne)&&window.PR.prettyPrint(),Dt.current)return Dt.current.addEventListener("click",Tt),()=>{var Te;(Te=Dt.current)==null||Te.removeEventListener("click",Tt),(0,ze.AL)(),(0,ze.Iy)()}},[tn,Dt.current,Tt]),(0,ce.useEffect)(()=>{var Te;const xe=Se=>{Se.preventDefault(),Se.clipboardData.setData("text",window.getSelection().toString())};return(Te=Dt.current)==null||Te.addEventListener("copy",xe),()=>{var Se;(Se=Dt.current)==null||Se.removeEventListener("copy",xe)}},[Dt.current]);const et=Te=>/<style[\s\S]*?>/i.test(Te||"");return ce.createElement(ce.Fragment,null,gt&&ce.createElement("div",{ref:Dt},tn),!gt&&!et(tn)&&ce.createElement("div",{ref:Dt,style:de({},At),className:`${Ke||""} ${Gt?"disabled-fill":""} markdown-body ${Mn.current}`,dangerouslySetInnerHTML:{__html:tn}}),!gt&&et(tn)&&ce.createElement(dt,{html:tn}),ce.createElement(He.Z,{close:!0,data:sn,type:sn!=null&&sn.length?$t:"",style:de({},qe),onClose:()=>Ft("")}))}},68042:function(Cn,un,ve){"use strict";ve.d(un,{C:function(){return kt}});var ce=ve(59301),De={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},ze=ve(92310),wt=ve.n(ze),Ze=ve(24905),ht=ve(95237),Me=ve(8591),yt=ve(6848),ct=ve(3113),He=ve(43418),st=ve(1710),mt=ve(5871),dt=ve(78241),Ae=ve(71418),te=ve(955),ee=ve(99064),he=ve(24065),se=ve(59155),de=ve(85057),me=Object.defineProperty,we=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Je=(Bt,Gt,Ut)=>Gt in Bt?me(Bt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Bt[Gt]=Ut,Ke=(Bt,Gt)=>{for(var Ut in Gt||(Gt={}))Ie.call(Gt,Ut)&&Je(Bt,Ut,Gt[Ut]);if(Fe)for(var Ut of Fe(Gt))je.call(Gt,Ut)&&Je(Bt,Ut,Gt[Ut]);return Bt},gt=(Bt,Gt)=>we(Bt,Ne(Gt)),Re=(Bt,Gt,Ut)=>new Promise((lt,$e)=>{var Nt=Ft=>{try{sn(Ut.next(Ft))}catch($t){$e($t)}},cn=Ft=>{try{sn(Ut.throw(Ft))}catch($t){$e($t)}},sn=Ft=>Ft.done?lt(Ft.value):Promise.resolve(Ft.value).then(Nt,cn);sn((Ut=Ut.apply(Bt,Gt)).next())});const At=Ze.default.Group,qe=({className:Bt,title:Gt,items:Ut=[],value:lt,onChange:$e})=>{const Nt=(Ut==null?void 0:Ut.length)===(lt==null?void 0:lt.length),cn=(lt==null?void 0:lt.length)>0&&(lt==null?void 0:lt.length)<(Ut==null?void 0:Ut.length),sn=Ft=>{const $t=Ut.map(en=>en.id);$e(Ft.target.checked?$t:[])};return ce.createElement(ht.Z,{align:"middle",className:Bt},!!Gt&&ce.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Gt),ce.createElement(Ze.default,{indeterminate:cn,onChange:sn,checked:Nt},"\u5168\u90E8"),ce.createElement(At,{value:lt,onChange:$e},Ut.map(Ft=>ce.createElement(Ze.default,{className:"ml30 c-black",key:Ft.id,value:Ft.id},Ft.name,ce.createElement("span",null,`(${Ft.count})`)))))};var kt=({className:Bt,style:Gt,dataSource:Ut})=>{var lt,$e,Nt,cn,sn,Ft,$t;const[en,Nn]=(0,ce.useState)({}),[fn,Mn]=(0,ce.useState)(!0),[pt,Ln]=(0,ce.useState)(!1),[Un,Zt]=(0,ce.useState)(!1),[tn,Rt]=(0,ce.useState)(null),[Lt,ut]=(0,ce.useState)(0),[Ge,Dt]=(0,ce.useState)({}),[Tt,ot]=(0,ce.useState)(!0),[et,Te]=(0,ce.useState)(0),[xe,Se]=(0,ce.useState)(0),[Be,_e]=(0,ce.useState)(!1),Ee=(0,ce.useRef)(null),[ft,Xt]=(0,ce.useState)(!1),[an,Qt]=(0,ce.useState)(!0),[En,Yn]=(0,ce.useState)([]),zn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[Dn,ii]=(0,ce.useState)(Ke({},zn));(0,ce.useEffect)(()=>{Ut!=null&&Ut.question_id&&Nn(Ut)},[Ut==null?void 0:Ut.question_id]),(0,ce.useEffect)(()=>{var ci;if(((ci=en==null?void 0:en.exercise_question_resubmit)==null?void 0:ci.status)==="running"){const Hi=setInterval(()=>{Ii()},3e3);return()=>clearInterval(Hi)}},[(lt=en==null?void 0:en.exercise_question_resubmit)==null?void 0:lt.status]),(0,ce.useEffect)(()=>{var ci;Un&&(Un===1&&(Dn.question_status=Yi.map(Hi=>Hi.value),Dn.review=Jn.map(Hi=>Hi.value)),Un===2&&(Dn.exercise_question_resubmit_id=(ci=en==null?void 0:en.exercise_question_resubmit)==null?void 0:ci.id,tn===1&&(Dn.success_status=[1]),tn===2&&(Dn.success_status=[0])),ii(Ke({},Dn)),gi(Dn),Se(en!=null&&en.is_mirror?3:10),Te(en!=null&&en.is_mirror?1:5))},[Un]),(0,ce.useEffect)(()=>{ft&&pi()},[ft]);const gi=ci=>Re(void 0,null,function*(){Mn(!0);const Hi=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit_student_list.json`,{method:"get",params:ci});(Hi==null?void 0:Hi.status)==0&&(Dt(Hi||[]),ut(Hi==null?void 0:Hi.count)),Mn(!1)}),pi=()=>Re(void 0,null,function*(){Qt(!0);const ci=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit_history.json`,{method:"get"});(ci==null?void 0:ci.status)==0&&Yn((ci==null?void 0:ci.data)||[]),Qt(!1)}),Ii=()=>Re(void 0,null,function*(){const ci=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit_status.json`,{method:"get"});(ci==null?void 0:ci.status)==0&&Nn(gt(Ke({},en),{show_resubmit_history:!0,exercise_question_resubmit:(ci==null?void 0:ci.data)||{}}))}),Yi=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],Jn=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],Wn=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],ti=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(ci,Hi,dn)=>ce.createElement("span",{className:"c-black"},dn+1+(Dn.page-1)*Dn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:ci=>ce.createElement("span",{className:"c-black"},ci)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:ci=>ce.createElement("span",{className:"c-grey-666"},ci||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:ci=>ce.createElement("span",{className:"c-black"},ci)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:ci=>{const{label:Hi,color:dn}=Yi.find(oi=>oi.value===ci)||{};return ce.createElement("span",{style:{color:dn}},Hi)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:ci=>ce.createElement("span",{className:"c-black"},ci)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:ci=>ce.createElement("span",{className:"c-black"},ci)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:ci=>{const{label:Hi,color:dn}=Jn.find(oi=>oi.value===ci)||{};return ce.createElement("span",{style:{color:dn}},Hi)}},Un===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:ci=>{const{label:Hi,color:dn}=Wn.find(oi=>oi.value===ci)||{};return ce.createElement("span",{style:{color:dn}},Hi)}}].filter(Boolean),yi=(ci,Hi,dn)=>{Dn.page=ci==null?void 0:ci.current,Dn.per_page=ci==null?void 0:ci.pageSize,dn!=null&&dn.order?(Dn.sort_by=dn==null?void 0:dn.field,Dn.direction=(dn==null?void 0:dn.order)==="ascend"?"asc":"desc"):(Dn.sort_by=null,Dn.direction=null),ii(Ke({},Dn)),gi(Dn)},mi=()=>{if(!et){Me.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}_e(!0)},dr=()=>Re(void 0,null,function*(){var ci,Hi;if((ci=Ee.current)!=null&&ci.onVerify())return;Ln(!0);const dn=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit.json`,{method:"post",body:{keyword:Dn.keyword,question_status:Dn.question_status,review:Dn.review_status,success_status:Dn.success_status,use_max_score:Tt,permits:et,exercise_question_resubmit_id:Un===1?null:(Hi=en==null?void 0:en.exercise_question_resubmit)==null?void 0:Hi.id}});(dn==null?void 0:dn.status)==0&&(yield Ii(),Me.ZP.success("\u64CD\u4F5C\u6210\u529F"),_e(!1),Zt(!1)),Ln(!1)}),mr=(ci,Hi)=>{Dn.page=1,Dn[Hi]=ci,ii(Ke({},Dn)),gi(Dn)},be=["","\u5F53\u524D\u9898\u76EE\u7684\u5B9E\u9A8C\u8D44\u6E90\u4E3A\u4E13\u6709\u4E91\uFF0C\u4E0D\u652F\u6301\u91CD\u65B0\u8BC4\u6D4B~","\u8BE5\u529F\u80FD\u4EC5\u8BFE\u5802\u7BA1\u7406\u5458\u548C\u8003\u8BD5\u7684\u521B\u5EFA\u8005\u53EF\u4EE5\u64CD\u4F5C~"];return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:wt()(De.recalculation,Bt),style:Gt},ce.createElement(yt.Z,{title:be[(en==null?void 0:en.disable_resubmit_reason)||0]},ce.createElement(ct.ZP,{disabled:(en==null?void 0:en.disable_resubmit)||(($e=en==null?void 0:en.exercise_question_resubmit)==null?void 0:$e.status)==="running",onClick:()=>Zt(1),icon:ce.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(en==null?void 0:en.show_resubmit_history)&&ce.createElement(ce.Fragment,null,((Nt=en==null?void 0:en.exercise_question_resubmit)==null?void 0:Nt.status)==="running"?ce.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",ce.createElement("span",{className:"c-light-primary ml3"},(cn=en==null?void 0:en.exercise_question_resubmit)==null?void 0:cn.rate)):ce.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",ce.createElement("span",{onClick:()=>{Zt(2),Rt(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(sn=en==null?void 0:en.exercise_question_resubmit)==null?void 0:sn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",ce.createElement("span",{onClick:()=>{Zt(2),Rt(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(Ft=en==null?void 0:en.exercise_question_resubmit)==null?void 0:Ft.fail_count),"\u4EBA"),ce.createElement(yt.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},ce.createElement("i",{onClick:()=>Xt(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),ce.createElement(He.default,{centered:!0,open:!!Un,title:`\u91CD\u65B0\u8BC4\u6D4B${Un===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>Zt(!1),onOk:mi,afterClose:()=>{ot(!0),Rt(null),ii(Ke({},zn))}},ce.createElement("div",{className:De.filter},Un===1&&ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.tips},ce.createElement("div",{className:"mb5",style:{color:"#FF9D18"}},ce.createElement("i",{className:"iconfont icon-tishi9 mr10 font14"}),"\u6E29\u99A8\u63D0\u793A"),ce.createElement("div",null,"1.\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206\u6D41\u7A0B\uFF1A \u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6\u5B66\u751F\u5728\u8003\u8BD5\u9875\u9762\u4FDD\u5B58\u7684\u6700\u65B0\u4EE3\u7801\uFF0C\u5E76\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\uFF0C\u4ECE\u800C\u7CBE\u51C6\u8BA1\u7B97\u51FA\u5B66\u751F\u7684\u6700\u7EC8\u5F97\u5206\uFF1B"),ce.createElement("div",{style:{margin:"2px 0"}},"2.\u91CD\u65B0\u8BC4\u6D4B\u6761\u4EF6\uFF1A \u8003\u8BD5\u7ED3\u675F\u540E\uFF0C\u4EC5\u5BF9\u5DF2\u63D0\u4EA4\u8BD5\u5377\u4E14\u5DF2\u4F5C\u7B54\u8BE5\u9898\u76EE\u7684\u5B66\u751F\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\u4E0E\u7B97\u5206\uFF1B"),ce.createElement("div",null,"3.\u91CD\u65B0\u8BC4\u6D4B\u65F6\uFF0C\u8BF7\u786E\u4FDD\u5B9E\u9A8C\u73AF\u5883\u80FD\u6B63\u5E38\u542F\u52A8\u5E76\u53EF\u8FD0\u884C\u8BC4\u6D4B\u3002")),ce.createElement(qe,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(Ge==null?void 0:Ge.question_status)||[],value:Dn.question_status,onChange:ci=>mr(ci,"question_status")}),ce.createElement(qe,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(Ge==null?void 0:Ge.review_status)||[],value:Dn.review,onChange:ci=>mr(ci,"review")})),Un===2&&ce.createElement(ce.Fragment,null,ce.createElement(qe,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(Ge==null?void 0:Ge.success_status)||[],value:Dn.success_status,onChange:ci=>mr(ci,"success_status")})),ce.createElement(de.t7,{className:De.input,style:{bottom:Un===1?10:-5},value:Dn.keyword,onChange:ci=>mr(ci,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),ce.createElement(st.default,{className:"mt20",columns:ti,scroll:(($t=Ge==null?void 0:Ge.data)==null?void 0:$t.length)>7?{y:300}:{},dataSource:(Ge==null?void 0:Ge.data)||[],loading:fn,onChange:yi,pagination:{total:Lt,pageSize:Dn.per_page,current:Dn.page,hideOnSinglePage:!Lt,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:te.rU}}),ce.createElement(ht.Z,{justify:"space-between",align:"middle",className:"mt10"},ce.createElement(Ze.default,{className:"c-black",checked:Tt,onChange:ci=>ot(ci.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,he.Ny)()&&ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",ce.createElement(mt.Z,{className:"ml10 mr10",value:et,max:xe,min:1,precision:0,onChange:ci=>Te(ci)}),"\u4EBA",ce.createElement(yt.Z,{overlayStyle:{maxWidth:450},title:"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A20\u4EBA\uFF08\u81EA\u5B9A\u4E49\u955C\u50CF\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A3\u4EBA\uFF09\u3002"},ce.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),ce.createElement(He.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:Be,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:pt,destroyOnClose:!0,onOk:dr,onCancel:()=>_e(!1)},ce.createElement(dt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},ce.createElement(se.Z,{ref:ci=>Ee.current=ci}))),ce.createElement(He.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:ft,width:710,onCancel:()=>Xt(!1),footer:null},ce.createElement(Ae.Z,{spinning:an},ce.createElement("div",{className:De.operating},En.map((ci,Hi)=>ce.createElement("div",{key:Hi,className:De.operatingItem},ce.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},ci==null?void 0:ci.created_at),ce.createElement("div",{className:"c-black"},ci==null?void 0:ci.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(ci==null?void 0:ci.status)==="running"?ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",ce.createElement("span",{className:"c-light-primary ml3"},ci==null?void 0:ci.rate)):ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",ce.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},ci==null?void 0:ci.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",ce.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},ci==null?void 0:ci.fail_count),"\u4EBA")))),ce.createElement("div",{style:{height:20}}))))}},82438:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(59301),De={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},ze=ve(43418),wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",Ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",ht=(ct,He,st)=>new Promise((mt,dt)=>{var Ae=he=>{try{ee(st.next(he))}catch(se){dt(se)}},te=he=>{try{ee(st.throw(he))}catch(se){dt(se)}},ee=he=>he.done?mt(he.value):Promise.resolve(he.value).then(Ae,te);ee((st=st.apply(ct,He)).next())}),yt=({type:ct,resdata:He,onok:st,oktext:mt,okloading:dt})=>{const[Ae,te]=(0,ce.useState)(!1),{can_copy_list:ee,can_copy_num:he,challenge_type:se,course_data_list:de,no_copy_list:me,no_copy_num:we,no_use_list:Ne,no_use_num:Fe,repeat_shixun_num:Ie,student_count:je,total_num:Je,use_num:Ke}=He;let gt=he>0||ct==="exercise";(0,ce.useEffect)(()=>{(He==null?void 0:He.student_count)>0&&te(!0)},[He]),console.log("---11",dt),(0,ce.useEffect)(()=>{dt||te(!1)},[dt]);const Re=()=>{if(ct==="exercise"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},Ke),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(ct==="exercise"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},Ke),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixun"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixun"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="subject"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},Ke),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="subject"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",ce.createElement("span",{className:De.orangeColor},je)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",ce.createElement("span",{className:De.orangeColor},Ke)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="exercisepush")return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},Ke),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(ct==="shixunpush"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},Ke),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixunpush"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",ce.createElement("span",{className:De.orangeColor},Ke),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},At=()=>{if(ct==="exercise"||ct==="subject"||ct==="exercisepush"||ct==="shixunpush")return ce.createElement("div",{style:{marginTop:20}},we>0&&ce.createElement("div",null,ce.createElement("span",{className:De.flex},ce.createElement("img",{src:Ze,style:{width:14}}),ce.createElement("span",{className:De.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ce.createElement("div",{className:De.statusbody},ct==="exercise"&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(ct==="subject"||ct==="exercisepush")&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",gt&&ce.createElement("span",{className:De.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ct==="shixunpush"&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",gt&&ce.createElement("span",{className:De.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ce.createElement("div",null,me==null?void 0:me.map((qe,Et)=>ce.createElement("a",{href:`/shixuns/${qe.identifier}/challenges`,target:"_blank"},"\u300A",qe==null?void 0:qe.name,"\u300B",Et+1!==we&&"\u3001"))))),he>0&&ce.createElement("div",{style:{marginTop:20}},ce.createElement("span",{className:De.flex},ce.createElement("img",{src:wt,style:{width:14}}),ce.createElement("span",{className:De.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ce.createElement("div",{className:De.statusbody},ct==="exercise"&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(ct==="subject"||ct==="exercisepush")&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ct==="shixunpush"&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ce.createElement("div",null,ee==null?void 0:ee.map((qe,Et)=>ce.createElement("a",{href:`/shixuns/${qe.identifier}/challenges`,target:"_blank"},"\u300A",qe==null?void 0:qe.name,"\u300B",Et+1!==he&&"\u3001"))))));if(ct==="shixun")return ce.createElement("div",{style:{marginTop:20}},he>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return ce.createElement(ze.default,{open:Ae,onCancel:()=>{te(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!gt&&"none"}},zIndex:1003,confirmLoading:dt,okText:gt?mt:"\u6211\u77E5\u9053\u4E86",onOk:()=>ht(void 0,null,function*(){gt?yield st([...ee,...Ne]):te(!1)})},ce.createElement("div",{style:{maxHeight:600,overflow:"auto"}},Re(),At()))}},69304:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return ht}});var ce=ve(59301),De={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},ze=ve(92310),wt=ve.n(ze),ht=({className:Me,style:yt,state:ct,onClick:He})=>{var st,mt;return ce.createElement("div",{onClick:He,className:wt()(ct?(st=De)==null?void 0:st.redBtn:(mt=De)==null?void 0:mt.btn,Me),style:yt},ct?ce.createElement(ce.Fragment,null,ce.createElement("i",{className:"iconfont icon-biaoji1"}),ce.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):ce.createElement(ce.Fragment,null,ce.createElement("i",{className:"iconfont icon-biaojigaiti"}),ce.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},53932:function(Cn,un,ve){"use strict";ve.d(un,{h:function(){return we},Z:function(){return me}});var ce=ve(59301),De=ve(57809),ze=ve(78241),wt=ve(3113),Ze=ve(89780),ht=ve.n(Ze),Me=ve(37036),yt=Object.defineProperty,ct=Object.defineProperties,He=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Ae=(Ne,Fe,Ie)=>Fe in Ne?yt(Ne,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Ne[Fe]=Ie,te=(Ne,Fe)=>{for(var Ie in Fe||(Fe={}))mt.call(Fe,Ie)&&Ae(Ne,Ie,Fe[Ie]);if(st)for(var Ie of st(Fe))dt.call(Fe,Ie)&&Ae(Ne,Ie,Fe[Ie]);return Ne},ee=(Ne,Fe)=>ct(Ne,He(Fe));const he=De.default.Option,se={labelCol:{span:4},wrapperCol:{span:20}},de={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 me=({callback:Ne,onCancel:Fe})=>{const[Ie,je]=(0,ce.useState)("python");function Je(gt){je(de[gt][1])}function Ke(gt){Ne(gt)}return ce.createElement(ze.default,ee(te({},se),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ke,style:{width:500}}),ce.createElement(ze.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ce.createElement(De.default,{getPopupContainer:gt=>gt.parentNode,onChange:Je},Object.keys(de).map(gt=>ce.createElement(he,{key:gt,value:gt},de[gt][0])))),ce.createElement(ze.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ce.createElement(we,{mode:Ie})),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(wt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(wt.ZP,{type:"ghost",onClick:Fe},"\u53D6\u6D88")))};function we({value:Ne,onChange:Fe,mode:Ie,options:je={}}){const Je=(0,ce.useRef)(),[Ke,gt]=(0,ce.useState)();return(0,ce.useEffect)(()=>{if(Ke){let Re=function(At){const qe=At.getValue();Fe&&Fe(qe)};return Ke.on("change",Re),()=>{Ke.off("change",Re)}}},[Ke,Fe]),(0,ce.useEffect)(()=>{Ke&&Ke.setOption("mode",Ie)},[Ke,Ie]),(0,ce.useEffect)(()=>{Ke&&(Ne!==Ke.getValue()||Ne==="")&&setTimeout(()=>{Ke.setValue(Ne||"")},300)},[Ke,Ne]),(0,ce.useEffect)(()=>{if(Je.current&&!Ke){const Re=ht().fromTextArea(Je.current,te({mode:Ie,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},je));gt(Re)}},[Je.current,Ke]),ce.createElement("div",{className:"my-codemirror-container"},ce.createElement("textarea",{ref:Je}))}},12290:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return bn}});var ce=ve(59301),De=ve(89780),ze=ve.n(De),wt=ve(76374),Ze=ve(37036),ht=ve(6313),Me=ve(25717),yt=ve(99498),ct=ve(25419),He=ve(67549),st=ve(85149),mt=({value:Mt="",className:Ot,showTextOnly:Ve,showLines:Yt,style:qt={}})=>{const xt=(0,ce.useMemo)(()=>"",[Mt]);return ce.createElement(ce.Fragment,null,ce.createElement("div",{dangerouslySetInnerHTML:{__html:xt}}))},dt=ve(59301),Ae=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,me=(Mt,Ot,Ve)=>Ot in Mt?Ae(Mt,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Mt[Ot]=Ve,we=(Mt,Ot)=>{for(var Ve in Ot||(Ot={}))se.call(Ot,Ve)&&me(Mt,Ve,Ot[Ve]);if(he)for(var Ve of he(Ot))de.call(Ot,Ve)&&me(Mt,Ve,Ot[Ve]);return Mt},Ne=(Mt,Ot)=>te(Mt,ee(Ot));let Fe=[{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 Ie({onActionCallback:Mt,title:Ot,icon:Ve,actionName:Yt,className:qt="",children:xt}){function nt(){Mt(Yt)}return dt.createElement("a",{title:Ot,className:qt,onClick:nt},dt.createElement("i",{className:`${Ve}`}),xt)}var je=({watch:Mt,showNullButton:Ot,showNullProgramButton:Ve,onActionCallback:Yt,fullScreen:qt,insertTemp:xt,hidetoolBar:nt,extraUse:Kt})=>{const ln=[...Fe,{title:`${Mt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Mt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return dt.createElement("ul",{className:"markdown-toolbar-container"},!nt&&ln.map((xn,On)=>dt.createElement("li",{key:On},xn.actionName?dt.createElement(Ie,Ne(we({},xn),{onActionCallback:Yt})):dt.createElement("span",{className:"v-line"}))),Ot?dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ve?dt.createElement(dt.Fragment,null,dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,xt&&dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${xt}`,onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Kt&&dt.createElement("li",null,Kt),dt.createElement("li",{className:"btn-full-screen"},dt.createElement(Ie,{icon:`${qt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:qt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Yt})))},Je=ve(79346),Ke=ve(78241),gt=ve(92832),Re=ve(3113),At=Object.defineProperty,qe=Object.defineProperties,Et=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,Ut=(Mt,Ot,Ve)=>Ot in Mt?At(Mt,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Mt[Ot]=Ve,lt=(Mt,Ot)=>{for(var Ve in Ot||(Ot={}))Bt.call(Ot,Ve)&&Ut(Mt,Ve,Ot[Ve]);if(kt)for(var Ve of kt(Ot))Gt.call(Ot,Ve)&&Ut(Mt,Ve,Ot[Ve]);return Mt},$e=(Mt,Ot)=>qe(Mt,Et(Ot));const Nt={labelCol:{span:4},wrapperCol:{span:20}};var cn=({callback:Mt,onCancel:Ot})=>{function Ve(Yt){Mt(Yt)}return ce.createElement(Ke.default,$e(lt({},Nt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ve,style:{width:500}}),ce.createElement(Ke.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ce.createElement(gt.default,null)),ce.createElement(Ke.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ce.createElement(gt.default,null)),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Re.ZP,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))},sn=ve(53932),Ft=ve(28451),$t=ve(43418),en=ve(95237),Nn=ve(16406),fn=ve(59301),Mn=({callback:Mt,onCancel:Ot})=>{const Ve=document.createElement("canvas"),Yt=Ve.getContext("2d");Ve.width=1e3,Ve.height=800,Yt.fillStyle="#ffffff",Yt.fillRect(0,0,Ve.width,Ve.height);const qt=Ve.toDataURL("image/png");return fn.createElement($t.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},fn.createElement(en.Z,{style:{height:"100vh"}},fn.createElement(Nn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:qt,visible:!0,title:String(Date.now())},onOk:xt=>{Mt({src:xt.url})},onClose:Ot})))},pt=ve(12378);function Ln(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Ln,go.CommandHandler),Ln.prototype.canAlignSelection=function(){var Mt=this.diagram;return!(Mt===null||Mt.isReadOnly||Mt.isModelReadOnly||Mt.selection.count<2)},Ln.prototype.alignLeft=function(){var Mt=this.diagram;Mt.startTransaction("aligning left");var Ot=1/0;Mt.selection.each(function(Ve){Ve instanceof go.Link||(Ot=Math.min(Ve.position.x,Ot))}),Mt.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ot,Ve.position.y))}),Mt.commitTransaction("aligning left")},Ln.prototype.alignRight=function(){var Mt=this.diagram;Mt.startTransaction("aligning right");var Ot=-1/0;Mt.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var Yt=Ve.actualBounds.x+Ve.actualBounds.width;Ot=Math.max(Yt,Ot)}}),Mt.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ot-Ve.actualBounds.width,Ve.position.y))}),Mt.commitTransaction("aligning right")},Ln.prototype.alignTop=function(){var Mt=this.diagram;Mt.startTransaction("alignTop");var Ot=1/0;Mt.selection.each(function(Ve){Ve instanceof go.Link||(Ot=Math.min(Ve.position.y,Ot))}),Mt.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.position.x,Ot))}),Mt.commitTransaction("alignTop")},Ln.prototype.alignBottom=function(){var Mt=this.diagram;Mt.startTransaction("aligning bottom");var Ot=-1/0;Mt.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var Yt=Ve.actualBounds.y+Ve.actualBounds.height;Ot=Math.max(Yt,Ot)}}),Mt.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.actualBounds.x,Ot-Ve.actualBounds.height))}),Mt.commitTransaction("aligning bottom")},Ln.prototype.alignCenterX=function(){var Mt=this.diagram,Ot=Mt.selection.first();if(Ot){Mt.startTransaction("aligning Center X");var Ve=Ot.actualBounds.x+Ot.actualBounds.width/2;Mt.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(Ve-Yt.actualBounds.width/2,Yt.actualBounds.y))}),Mt.commitTransaction("aligning Center X")}},Ln.prototype.alignCenterY=function(){var Mt=this.diagram,Ot=Mt.selection.first();if(Ot){Mt.startTransaction("aligning Center Y");var Ve=Ot.actualBounds.y+Ot.actualBounds.height/2;Mt.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(Yt.actualBounds.x,Ve-Yt.actualBounds.height/2))}),Mt.commitTransaction("aligning Center Y")}},Ln.prototype.alignColumn=function(Mt){var Ot=this.diagram;Ot.startTransaction("align Column"),Mt===void 0&&(Mt=0),Mt=parseFloat(Mt);var Ve=new Array;Ot.selection.each(function(Kt){Kt instanceof go.Link||Ve.push(Kt)});for(var Yt=0;Yt<Ve.length-1;Yt++){var qt=Ve[Yt],xt=qt.actualBounds.y+qt.actualBounds.height+Mt,nt=Ve[Yt+1];nt.move(new go.Point(qt.actualBounds.x,xt))}Ot.commitTransaction("align Column")},Ln.prototype.alignRow=function(Mt){Mt===void 0&&(Mt=0),Mt=parseFloat(Mt);var Ot=this.diagram;Ot.startTransaction("align Row");var Ve=new Array;Ot.selection.each(function(Kt){Kt instanceof go.Link||Ve.push(Kt)});for(var Yt=0;Yt<Ve.length-1;Yt++){var qt=Ve[Yt],xt=qt.actualBounds.x+qt.actualBounds.width+Mt,nt=Ve[Yt+1];nt.move(new go.Point(xt,qt.actualBounds.y))}Ot.commitTransaction("align Row")},Ln.prototype.canRotate=function(Mt){var Ot=this.diagram;return!(Ot===null||Ot.isReadOnly||Ot.isModelReadOnly||Ot.selection.count<1)},Ln.prototype.rotate=function(Mt){Mt===void 0&&(Mt=90);var Ot=this.diagram;Ot.startTransaction("rotate "+Mt.toString());var Ot=this.diagram;Ot.selection.each(function(Ve){Ve instanceof go.Link||Ve instanceof go.Group||(Ve.angle+=Mt)}),Ot.commitTransaction("rotate "+Mt.toString())},Ln.prototype.pullToFront=function(){var Mt=this.diagram;Mt.startTransaction("pullToFront");var Ot=new go.Map;Mt.selection.each(function(Ve){Ot.set(Ve.layer,0)}),Ot.iteratorKeys.each(function(Ve){var Yt=0;Ve.parts.each(function(qt){if(!qt.isSelected){var xt=qt.zOrder;isNaN(xt)?qt.zOrder=0:Yt=Math.max(Yt,xt)}}),Ot.set(Ve,Yt)}),Mt.selection.each(function(Ve){Ln._assignZOrder(Ve,Ot.get(Ve.layer)+1)}),Mt.commitTransaction("pullToFront")},Ln.prototype.pushToBack=function(){var Mt=this.diagram;Mt.startTransaction("pushToBack");var Ot=new go.Map;Mt.selection.each(function(Ve){Ot.set(Ve.layer,0)}),Ot.iteratorKeys.each(function(Ve){var Yt=0;Ve.parts.each(function(qt){if(!qt.isSelected){var xt=qt.zOrder;isNaN(xt)?qt.zOrder=0:Yt=Math.min(Yt,xt)}}),Ot.set(Ve,Yt)}),Mt.selection.each(function(Ve){Ln._assignZOrder(Ve,Ot.get(Ve.layer)-1-Ln._findGroupDepth(Ve))}),Mt.commitTransaction("pushToBack")},Ln._assignZOrder=function(Mt,Ot,Ve){Ve===void 0&&(Ve=Mt),Mt.layer===Ve.layer&&(Mt.zOrder=Ot),Mt instanceof go.Group&&Mt.memberParts.each(function(Yt){Ln._assignZOrder(Yt,Ot+1,Ve)})},Ln._findGroupDepth=function(Mt){if(Mt instanceof go.Group){var Ot=0;return Mt.memberParts.each(function(Ve){Ot=Math.max(Ot,Ln._findGroupDepth(Ve))}),Ot+1}else return 0},Ln.prototype.doKeyDown=function(){var Mt=this.diagram;if(Mt!==null){var Ot=Mt.lastInput;if(Ot.key==="Up"||Ot.key==="Down"||Ot.key==="Left"||Ot.key==="Right"){var Ve=this.arrowKeyBehavior;if(Ve==="none")return;if(Ve==="select"){this._arrowKeySelect();return}else if(Ve==="move"){this._arrowKeyMove();return}else if(Ve==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Ln.prototype._getAllParts=function(){var Mt=new Array;return this.diagram.nodes.each(function(Ot){Mt.push(Ot)}),this.diagram.parts.each(function(Ot){Mt.push(Ot)}),Mt},Ln.prototype._arrowKeyMove=function(){var Mt=this.diagram,Ot=Mt.lastInput,Ve=0,Yt=0;if(Ot.control||Ot.meta)Ve=1,Yt=1;else if(Mt.grid!==null){var qt=Mt.grid.gridCellSize;Yt=qt.width,Ve=qt.height}Mt.startTransaction("arrowKeyMove"),Mt.selection.each(function(xt){Ot.key==="Up"?xt.move(new go.Point(xt.actualBounds.x,xt.actualBounds.y-Ve)):Ot.key==="Down"?xt.move(new go.Point(xt.actualBounds.x,xt.actualBounds.y+Ve)):Ot.key==="Left"?xt.move(new go.Point(xt.actualBounds.x-Yt,xt.actualBounds.y)):Ot.key==="Right"&&xt.move(new go.Point(xt.actualBounds.x+Yt,xt.actualBounds.y))}),Mt.commitTransaction("arrowKeyMove")},Ln.prototype._arrowKeySelect=function(){var Mt=this.diagram,Ot=Mt.lastInput,Ve=null;Ot.key==="Up"?Ve=this._findNearestPartTowards(270):Ot.key==="Down"?Ve=this._findNearestPartTowards(90):Ot.key==="Left"?Ve=this._findNearestPartTowards(180):Ot.key==="Right"&&(Ve=this._findNearestPartTowards(0)),Ve!==null&&(Ot.shift?Ve.isSelected=!0:Ot.control||Ot.meta?Ve.isSelected=!Ve.isSelected:Mt.select(Ve))},Ln.prototype._findNearestPartTowards=function(Mt){var Ot=this.diagram.selection.first();if(Ot===null)return null;for(var Ve=Ot.actualBounds.center,Yt=this._getAllParts(),qt=1/0,xt=Ot,nt=0;nt<Yt.length;nt++){var Kt=Yt[nt];if(Kt!==Ot&&Kt.canSelect()){var ln=Kt.actualBounds.center,xn=Ve.directionPoint(ln),On=this._angleCloseness(xn,Mt);if(On<=45){var St=Ve.distanceSquaredPoint(ln);St*=1+Math.sin(On*Math.PI/180),St<qt&&(qt=St,xt=Kt)}}}return xt},Ln.prototype._angleCloseness=function(Mt,Ot){return Math.min(Math.abs(Ot-Mt),Math.min(Math.abs(Ot+360-Mt),Math.abs(Ot-360-Mt)))},Ln.prototype._arrowKeyTree=function(){var Mt=this.diagram,Ot=Mt.selection.first();if(Ot instanceof go.Node){var Ve=Mt.lastInput;if(Ve.key==="Right"){if(!Ot.isTreeLeaf)if(!Ot.isTreeExpanded)Mt.commandHandler.canExpandTree(Ot)&&Mt.commandHandler.expandTree(Ot);else{var Yt=this._sortTreeChildrenByY(Ot).first();Yt!==null&&Mt.select(Yt)}}else if(Ve.key==="Left")if(!Ot.isTreeLeaf&&Ot.isTreeExpanded)Mt.commandHandler.canCollapseTree(Ot)&&Mt.commandHandler.collapseTree(Ot);else{var qt=Ot.findTreeParentNode();qt!==null&&Mt.select(qt)}else if(Ve.key==="Up"){var qt=Ot.findTreeParentNode();if(qt!==null){var xt=this._sortTreeChildrenByY(qt),nt=xt.indexOf(Ot);if(nt>0){for(var Kt=xt.elt(nt-1);Kt!==null&&Kt.isTreeExpanded&&!Kt.isTreeLeaf;){var ln=this._sortTreeChildrenByY(Kt);Kt=ln.last()}Kt!==null&&Mt.select(Kt)}else Mt.select(qt)}}else if(Ve.key==="Down")if(Ot.isTreeExpanded&&!Ot.isTreeLeaf){var Yt=this._sortTreeChildrenByY(Ot).first();Yt!==null&&Mt.select(Yt)}else for(;Ot!==null;){var qt=Ot.findTreeParentNode();if(qt===null)break;var xt=this._sortTreeChildrenByY(qt),nt=xt.indexOf(Ot);if(nt<xt.length-1){Mt.select(xt.elt(nt+1));break}else Ot=qt}var xn=Mt.selection.first();xn!==null&&Mt.scrollToRect(xn.actualBounds)}},Ln.prototype._sortTreeChildrenByY=function(Mt){var Ot=new go.List().addAll(Mt.findTreeChildrenNodes());return Ot.sort(function(Ve,Yt){var qt=Ve.location,xt=Yt.location;return qt.y<xt.y?-1:qt.y>xt.y?1:qt.x<xt.x?-1:qt.x>xt.x?1:0}),Ot},Ln.prototype.copyToClipboard=function(Mt){go.CommandHandler.prototype.copyToClipboard.call(this,Mt),this._lastPasteOffset.set(this.pasteOffset)},Ln.prototype.pasteFromClipboard=function(){var Mt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Mt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Mt},Object.defineProperty(Ln.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Mt){if(Mt!=="move"&&Mt!=="select"&&Mt!=="scroll"&&Mt!=="tree"&&Mt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Mt);this._arrowKeyBehavior=Mt}}),Object.defineProperty(Ln.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Mt){if(!(Mt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Mt);this._pasteOffset.set(Mt)}});var Un=Ln,Zt=ve(74413),tn=ve(43604),Rt=ve(99064),Lt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ut=ve(24065),Ge=ve(59301),Dt=(Mt,Ot,Ve)=>new Promise((Yt,qt)=>{var xt=ln=>{try{Kt(Ve.next(ln))}catch(xn){qt(xn)}},nt=ln=>{try{Kt(Ve.throw(ln))}catch(xn){qt(xn)}},Kt=ln=>ln.done?Yt(ln.value):Promise.resolve(ln.value).then(xt,nt);Kt((Ve=Ve.apply(Mt,Ot)).next())});function Tt({onCancel:Mt,callback:Ot}){let Ve=(0,ce.useRef)(),Yt=(0,ce.useRef)(),qt=(0,ce.useRef)(),xt=(0,ce.useRef)(!1);const nt=(0,ce.useRef)(!1),[Kt,ln]=(0,ce.useState)(0);function xn(){const St=pt.bx.make,gn={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"};Ve.current=new pt.S0(Yt.current,{padding:20,grid:St(pt.s_,"Grid",St(pt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(pt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:_n=>{var Si=_n.diagram.commandHandler.addTopLevelParts(_n.diagram.selection,!0);Si||_n.diagram.currentTool.doCancel()},commandHandler:St(Un),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:_n=>{var Si=_n.subject;Si.location=Si.location.copy().snapToGridPoint(_n.diagram.grid.gridOrigin,_n.diagram.grid.gridCellSize),setTimeout(()=>{_n.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:_n=>{var Si=_n.subject;setTimeout(()=>{_n.diagram.commandHandler.editTextBlock()})},LinkRelinked:_n=>{var Si=_n.parameter.part;Si.invalidateConnectedLinks();var zi=_n.subject;_n.diagram.toolManager.linkingTool.isForwards?zi.toNode.invalidateConnectedLinks():zi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ve.current.nodeTemplate=St(pt.NB,"Auto",{locationSpot:pt.z6.Center,locationObjectName:"SHAPE",desiredSize:new pt.$u(120,60),minSize:new pt.$u(40,40),resizable:!0,resizeCellSize:new pt.$u(10,10),rotatable:!0},new pt.KX("location","loc",pt.E9.parse).makeTwoWay(pt.E9.stringify),new pt.KX("desiredSize","size",pt.$u.parse).makeTwoWay(pt.$u.stringify),St(pt.bn,{name:"SHAPE",fill:gn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:pt.z6.AllSides,toSpot:pt.z6.AllSides},new pt.KX("figure"),new pt.KX("fill"),new pt.KX("stroke","borderColor"),new pt.KX("strokeWidth","thickness"),new pt.KX("strokeDashArray","dash")),St(pt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),St(pt.al,{margin:1,textAlign:"center",overflow:pt.al.OverflowEllipsis,editable:!0},new pt.KX("text").makeTwoWay(),new pt.KX("stroke","color"))),Ve.current.nodeTemplate.toolTip=St("ToolTip",St(pt.s_,"Vertical",{maxSize:new pt.$u(200,NaN)},St(pt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new pt.KX("text")),St(pt.al,{font:"10pt sans-serif",textAlign:"center"},new pt.KX("text","details"))));function Rn(_n,Si){var zi=(Ni,ji)=>{Ni.handled=!0,Ni.diagram.model.commit(ar=>{var Qi=ji.part.adornedPart,nr=new pt.E9().setRectSpot(Qi.actualBounds,_n);nr.subtract(Qi.location),nr.scale(2,2),nr.x+=Math.sign(nr.x)*130,nr.y+=Math.sign(nr.y)*130,nr.add(Qi.location),nr.snapToGridPoint(Ni.diagram.grid.gridOrigin,Ni.diagram.grid.gridCellSize);var hr=ar.copyNodeData(Qi.data);ar.setGroupKeyForNodeData(hr,ar.getGroupKeyForNodeData(Qi.data)),ar.addNodeData(hr);var An={from:Qi.key,to:ar.getKeyForNodeData(hr)};ar.addLinkData(An);var Jr=Ni.diagram.findNodeForData(hr);Jr.location=nr,Ni.diagram.select(Jr),setTimeout(()=>{Ni.diagram.commandHandler.editTextBlock()},20)})};return St(pt.bn,{figure:Si,alignment:_n,alignmentFocus:_n.opposite(),width:_n.equals(pt.z6.Top)||_n.equals(pt.z6.Bottom)?25:18,height:_n.equals(pt.z6.Top)||_n.equals(pt.z6.Bottom)?18:25,fill:"orange",stroke:gn.white,strokeWidth:4,mouseEnter:(Ni,ji)=>ji.fill="dodgerblue",mouseLeave:(Ni,ji)=>ji.fill="orange",isActionable:!0,click:zi,contextClick:zi})}function ai(_n){return St(pt.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(Si,zi)=>zi.fill="dodgerblue",mouseLeave:(Si,zi)=>zi.fill="orange",click:(Si,zi)=>{Si.diagram.commandHandler.showContextMenu(zi.part.adornedPart)}},_n||{})}Ve.current.nodeTemplate.selectionAdornmentTemplate=St(pt.uz,"Spot",St(pt.Vm,{padding:10}),Rn(pt.z6.Top,"TriangleUp"),Rn(pt.z6.Left,"TriangleLeft"),Rn(pt.z6.Right,"TriangleRight"),Rn(pt.z6.Bottom,"TriangleDown"),ai({alignment:new pt.z6(.75,0)}));function hn(_n,Si){return(zi,Ni)=>{zi.handled=!0,zi.diagram.model.commit(ji=>{ji.set(Ni.part.adornedPart.data,_n,Si)})}}function Jt(_n,Si){return Si||(Si="color"),St(pt.bn,{width:16,height:16,stroke:"lightgray",fill:_n,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.stroke="dodgerblue",mouseLeave:(zi,Ni)=>Ni.stroke="lightgray",click:hn(Si,_n),contextClick:hn(Si,_n)})}function Xn(){return[St("ContextMenuButton",St(pt.s_,"Horizontal",Jt(gn.white,"fill"),Jt(gn.beige,"fill"),Jt(gn.extralightblue,"fill"),Jt(gn.extralightred,"fill"))),St("ContextMenuButton",St(pt.s_,"Horizontal",Jt(gn.lightgray,"fill"),Jt(gn.lightgreen,"fill"),Jt(gn.lightblue,"fill"),Jt(gn.lightred,"fill")))]}function si(){return[St("ContextMenuButton",St(pt.s_,"Horizontal",Jt(gn.black),Jt(gn.green),Jt(gn.blue),Jt(gn.red))),St("ContextMenuButton",St(pt.s_,"Horizontal",Jt(gn.white),Jt(gn.magenta),Jt(gn.purple),Jt(gn.orange)))]}function ui(_n,Si){return Si||(Si="thickness"),St(pt.bn,"LineH",{width:16,height:16,strokeWidth:_n,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:hn(Si,_n),contextClick:hn(Si,_n)})}function Qn(_n,Si){return Si||(Si="dash"),St(pt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:_n,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:hn(Si,_n),contextClick:hn(Si,_n)})}function di(){return[St("ContextMenuButton",St(pt.s_,"Horizontal",ui(1),ui(2),ui(3),ui(4))),St("ContextMenuButton",St(pt.s_,"Horizontal",Qn(null),Qn([2,4]),Qn([4,4])))]}function hi(_n,Si){return Si||(Si="figure"),St(pt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:_n,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.fill="dodgerblue",mouseLeave:(zi,Ni)=>Ni.fill="lightgray",click:hn(Si,_n),contextClick:hn(Si,_n)})}Ve.current.nodeTemplate.contextMenu=St("ContextMenu",St("ContextMenuButton",St(pt.s_,"Horizontal",hi("Rectangle"),hi("RoundedRectangle"),hi("Ellipse"),hi("Diamond"))),St("ContextMenuButton",St(pt.s_,"Horizontal",hi("Parallelogram2"),hi("ManualOperation"),hi("Procedure"),hi("Cylinder1"))),St("ContextMenuButton",St(pt.s_,"Horizontal",hi("Terminator"),hi("CreateRequest"),hi("Document"),hi("TriangleDown"))),Xn(),si(),di()),Ve.current.groupTemplate=St(pt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:pt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(_n,Si)=>{var zi=Si.addMembers(Si.diagram.selection,!0);zi||Si.diagram.currentTool.doCancel()},avoidable:!1},new pt.KX("location","loc",pt.E9.parse).makeTwoWay(pt.E9.stringify),St(pt.s_,"Auto",{name:"BODY"},St(pt.bn,{parameter1:10,fill:gn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:pt.z6.AllSides,toSpot:pt.z6.AllSides},new pt.KX("fill"),new pt.KX("stroke","color"),new pt.KX("strokeWidth","thickness"),new pt.KX("strokeDashArray","dash")),St(pt.Vm,{background:"transparent",margin:20})),St(pt.al,{alignment:pt.z6.Top,alignmentFocus:pt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new pt.KX("text"),new pt.KX("stroke","color"))),Ve.current.groupTemplate.selectionAdornmentTemplate=St(pt.uz,"Spot",St(pt.s_,"Auto",St(pt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),St(pt.Vm,{margin:1.5})),ai({alignment:pt.z6.TopRight,alignmentFocus:pt.z6.BottomRight})),Ve.current.groupTemplate.contextMenu=St("ContextMenu",Xn(),si(),di()),Ve.current.linkTemplate=St(pt.rU,{layerName:"Foreground",routing:pt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new pt.KX("fromSpot","fromSpot",pt.z6.parse),new pt.KX("toSpot","toSpot",pt.z6.parse),new pt.KX("fromShortLength","dir",_n=>_n>=1?10:0),new pt.KX("toShortLength","dir",_n=>_n>=1?10:0),new pt.KX("points").makeTwoWay(),St(pt.bn,{strokeWidth:2},new pt.KX("stroke","color"),new pt.KX("strokeWidth","thickness"),new pt.KX("strokeDashArray","dash")),St(pt.bn,{segmentIndex:0,segmentOffset:new pt.E9(15,0),segmentOrientation:pt.rU.OrientAlong,alignmentFocus:pt.z6.Right,figure:"circle",width:10,strokeWidth:0},new pt.KX("fill","color"),new pt.KX("visible","dir",_n=>_n===1)),St(pt.bn,{segmentIndex:-1,segmentOffset:new pt.E9(-10,6),segmentOrientation:pt.rU.OrientPlus90,alignmentFocus:pt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new pt.KX("fill","color"),new pt.KX("visible","dir",_n=>_n>=1),new pt.KX("width","thickness",_n=>7+3*_n),new pt.KX("height","thickness",_n=>7+3*_n),new pt.KX("segmentOffset","thickness",_n=>new pt.E9(-15,4+1.5*_n))),St(pt.bn,{segmentIndex:0,segmentOffset:new pt.E9(15,-6),segmentOrientation:pt.rU.OrientMinus90,alignmentFocus:pt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new pt.KX("fill","color"),new pt.KX("visible","dir",_n=>_n===2),new pt.KX("width","thickness",_n=>7+3*_n),new pt.KX("height","thickness",_n=>7+3*_n),new pt.KX("segmentOffset","thickness",_n=>new pt.E9(-15,4+1.5*_n))),St(pt.al,{alignmentFocus:new pt.z6(0,1,-4,0),editable:!0},new pt.KX("text").makeTwoWay(),new pt.KX("stroke","color"))),Ve.current.linkTemplate.selectionAdornmentTemplate=St(pt.uz,St(pt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ri(2)},new pt.KX("pathPattern","thickness",Ri)),ai({alignmentFocus:new pt.z6(0,0,-6,-4)}));function Ri(_n){return St(pt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(_n+4).toString()+" H3"})}function Xi(_n){var Si="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return _n===0?Si="M0 0 M16 16 M0 8 L16 8":_n===2&&(Si="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),St(pt.bn,{geometryString:Si,margin:2,background:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:hn("dir",_n),contextClick:hn("dir",_n)})}function tr(_n){var Si=(zi,Ni)=>{zi.handled=!0,zi.diagram.model.commit(ji=>{var ar=Ni.part.adornedPart;ji.set(ar.data,_n?"toSpot":"fromSpot",pt.z6.stringify(pt.z6.AllSides)),(_n?ar.toNode:ar.fromNode).invalidateConnectedLinks()})};return St(pt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:Si,contextClick:Si})}function yn(_n,Si){var zi=0,Ni=pt.z6.RightSide;_n.equals(pt.z6.Top)?(zi=270,Ni=pt.z6.TopSide):_n.equals(pt.z6.Left)?(zi=180,Ni=pt.z6.LeftSide):_n.equals(pt.z6.Bottom)&&(zi=90,Ni=pt.z6.BottomSide),Si||(zi-=180);var ji=(ar,Qi)=>{ar.handled=!0,ar.diagram.model.commit(nr=>{var hr=Qi.part.adornedPart;nr.set(hr.data,Si?"toSpot":"fromSpot",pt.z6.stringify(Ni)),(Si?hr.toNode:hr.fromNode).invalidateConnectedLinks()})};return St(pt.bn,{alignment:_n,alignmentFocus:_n.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:zi,background:"transparent",mouseEnter:(ar,Qi)=>Qi.background="dodgerblue",mouseLeave:(ar,Qi)=>Qi.background="transparent",click:ji,contextClick:ji})}Ve.current.linkTemplate.contextMenu=St("ContextMenu",si(),di(),St("ContextMenuButton",St(pt.s_,"Horizontal",Xi(0),Xi(1),Xi(2))),St("ContextMenuButton",St(pt.s_,"Horizontal",St(pt.s_,"Spot",tr(!1),yn(pt.z6.Top,!1),yn(pt.z6.Left,!1),yn(pt.z6.Right,!1),yn(pt.z6.Bottom,!1)),St(pt.s_,"Spot",{margin:new pt.Zt(0,0,0,2)},tr(!0),yn(pt.z6.Top,!0),yn(pt.z6.Left,!0),yn(pt.z6.Right,!0),yn(pt.z6.Bottom,!0)))));const Br=`{ "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 br=["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 Wr(_n){return console.log("shapeName:",_n),br.indexOf(_n)>=0}var mn=new pt.YI(qt.current,{maxSelectionCount:1,linkTemplate:St(pt.rU,{locationSpot:pt.z6.Center,selectionAdornmentTemplate:St(pt.uz,"Link",{locationSpot:pt.z6.Center},St(pt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),St(pt.bn,{toArrow:"Standard",stroke:null}))},{routing:pt.rU.AvoidsNodes,curve:pt.rU.JumpOver,corner:5,toShortLength:4},new pt.KX("points"),St(pt.bn,{isPanelMain:!0,strokeWidth:2}),St(pt.bn,{toArrow:"Standard",stroke:null})),model:new pt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...pt.bn.getFigureGenerators().toArray().map(_n=>({text:"\u672A\u547D\u540D",size:"100 100",figure:_n.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ve.current.addDiagramListener("TextEdited",function(_n){var Si;const zi=_n.subject.part;var Ni=(Si=document.activeElement)==null?void 0:Si.value;typeof Ni=="string"&&Ni.trim()===""&&Ve.current.model.commit(function(ji){ji.set(zi.data,"text","\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}),mn.nodeTemplate=St(pt.NB,"Auto",{locationSpot:pt.z6.Center},new pt.KX("location","location",pt.E9.parse).makeTwoWay(pt.E9.stringify),St(pt.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 pt.KX("stroke").makeTwoWay(),new pt.KX("fill").makeTwoWay(),new pt.KX("figure")),St(pt.al,{margin:new pt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new pt.$u(16,16),maxSize:new pt.$u(10,NaN),textAlign:"center",editable:!0},new pt.KX("key").makeTwoWay())),setTimeout(()=>{Ve.current.grid=St(pt.s_,"Grid",St(pt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(pt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ve.current.grid.visible=!0,Ve.current.grid.gridCellStroke="darkgray",Ve.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ve.current,Ve.current}const On=()=>Dt(this,null,function*(){var St,gn=Ve.current.makeImage();const Rn=yield(0,Rt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:gn.src,file_data:JSON.stringify({login:(St=(0,ut.eY)())==null?void 0:St.login,data:JSON.parse(Ve.current.model.toJson())})}});Ot({src:Rn.url})});return(0,ce.useEffect)(()=>(setTimeout(()=>{xn()},500),ln(Kt+1),()=>{Ve.current=null}),[]),Ge.createElement("div",{ref:nt,className:xt.current?`${Lt.maxH60} body-overflow-initial`:"body-overflow-initial"},Ge.createElement($t.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Kt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ge.createElement(en.Z,null,Ge.createElement(tn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ge.createElement(tn.Z,{onClick:()=>{var St,gn,Rn=Ve.current.selection.first();if(xt.current=!xt.current,document.activeElement&&Rn){let ai=(gn=(St=document.activeElement)==null?void 0:St.value)==null?void 0:gn.trim();typeof ai=="string"&&Ve.current.model.commit(function(hn){hn.set(Rn.data,"text",ai||"\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}ln(Kt+1)}},Ge.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Mt},Ge.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Lt.flowChartWrp},Ge.createElement("div",{style:{display:"flex",height:"100%"}},Ge.createElement("div",{style:{width:"300px",height:"100%"}},Ge.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ge.createElement("div",{style:{height:"calc(100% - 50px)"},className:Lt.myPaletteDiv,ref:qt})),Ge.createElement("div",{style:{flex:1,position:"relative"}},Ge.createElement("div",{ref:Yt,style:{height:"80vh"}}))),Ge.createElement("div",{className:"tr"},Ge.createElement(Re.ZP,{size:"large",onClick:On,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ot=Tt,et=ve(5112),Te=ve(5871);const xe=et.ZP.Group,Se={margin:"0 8px"};var Be=({callback:Mt,onCancel:Ot})=>{function Ve(Yt){Mt(Yt)}return ce.createElement(Ke.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ve},ce.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ce.createElement("span",{style:Se},"\u5355\u5143\u683C\u6570\uFF1A"),ce.createElement("span",{style:Se},"\u884C\u6570"),ce.createElement(Ke.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ce.createElement(Te.Z,null)),ce.createElement("span",{style:Se},"\u5217\u6570"),ce.createElement(Ke.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ce.createElement(Te.Z,null))),ce.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ce.createElement("span",{style:Se},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ce.createElement(Ke.default.Item,{name:"align"},ce.createElement(xe,null,ce.createElement(et.ZP,{value:"default"},ce.createElement("i",{className:"fa fa-align-justify"})),ce.createElement(et.ZP,{value:"left"},ce.createElement("i",{className:"fa fa-align-left"})),ce.createElement(et.ZP,{value:"center"},ce.createElement("i",{className:"fa fa-align-center"})),ce.createElement(et.ZP,{value:"right"},ce.createElement("i",{className:"fa fa-align-right"}))))),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Re.ZP,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))},_e=ve(78673),Ee=ve(80727),ft=ve.n(Ee),an=(0,ce.forwardRef)(({use3d:Mt,width:Ot,height:Ve,callback:Yt,showSaveButton:qt},xt)=>{const nt=(0,ce.useRef)(),Kt=(0,ce.useRef)(),[ln,xn]=(0,ce.useState)(!1),On=(0,ce.useRef)({id:nt,appName:"graphing",width:Ot||1e3,height:Ve||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ce.useEffect)(()=>{Kt.current=new(ft())(On.current,!0),window.onload=function(){Kt.current.inject("applet_container")}},[]);const St=()=>{var gn=window.ggbApplet.getPNGBase64(1,!0,72);return Yt&&Yt(gn),gn};return(0,ce.useEffect)(()=>{On.current.appName=ln?"3D":"graphing",Kt.current.inject("applet_container")},[ln]),(0,ce.useEffect)(()=>{xn(Mt)},[Mt]),(0,ce.useImperativeHandle)(xt,()=>({getImgData:St})),ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:nt}),ce.createElement(en.Z,{align:"middle"},ce.createElement(tn.Z,{flex:1},ce.createElement(_e.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:ln,onChange:gn=>xn(gn)})),ce.createElement(tn.Z,null,ce.createElement(Re.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Qt=ve(41588),En=ve(8591);const Yn="link",zn="upload-image",Dn="add-flowchart",ii="draw-image",gi="add-flowchart",pi="code-block",Ii="add-table",Yi="------------",Jn={default:Yi,left:`:${Yi}`,center:`:${Yi}:`,right:`${Yi}:`};var Wn=ve(58856);function ti(){}let yi=0;const mi=1e4,dr="\u2581",mr="@\u2581\u2581@",be="@\u2581@",ci=`
|
|
|
**\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`,Hi=["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 dn(Mt){return/^\d+$/.test(Mt)?`${Mt}px`:Mt}const vi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Fi={[vi+"-B"]:"bold",[vi+"-I"]:"italic"},Vn={[Yn]:"\u6DFB\u52A0\u94FE\u63A5",[pi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[zn]:"\u6DFB\u52A0\u56FE\u7247",[ii]:"\u6DFB\u52A0\u753B\u56FE",[Dn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ii]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var bn=({defaultValue:Mt="",onChange:Ot,width:Ve="100%",height:Yt=400,miniToolbar:qt=!1,isFocus:xt=!1,watch:nt,insertTemp:Kt,mode:ln="markdown",id:xn="markdown-editor-id",showResizeBar:On=!1,noStorage:St=!1,showNullButton:gn=!1,showNullProgramButton:Rn=!1,hidetoolBar:ai=!1,fullScreen:hn=!1,onBlur:Jt,onCMBeforeChange:Xn,onFullScreen:si,className:ui="",disablePaste:Qn=!1,disabled:di=!1,disabledFill:hi=!1,placeholder:Ri="",values:Xi="",extraUse:tr})=>{const[yn,Br]=(0,ce.useState)(null),[br,Wr]=(0,ce.useState)(Mt),[mn,_n]=(0,ce.useState)(nt),[Si,zi]=(0,ce.useState)(hn),[Ni,ji]=(0,ce.useState)(""),[ar,Qi]=(0,ce.useState)(0),[nr,hr]=(0,ce.useState)(Yt),[An,Jr]=(0,ce.useState)(!1),[Bn,_r]=(0,ce.useState)(0),[co,Bi]=(0,ce.useState)(0),Po=(0,ce.useRef)(),ao=(0,ce.useRef)(),Ki=(0,ce.useRef)(),qi=(0,ce.useRef)();(0,ce.useEffect)(()=>{const Mr=window.scrollY||window.pageYOffset;Wr(Xi),yn==null||yn.setValue(Xi),window.scrollTo(0,Mr)},[Xi]),(0,ce.useEffect)(()=>{si==null||si(Si)},[Si]),(0,ce.useEffect)(()=>{if(Po.current){let Mr=function(qn,vr){var wo;if(Qn){vr.preventDefault();return}const ua=vr.clipboardData;if(ua){const Bo=ua.types.toString(),yo=ua.items;if(Bo==="Files"||ua.types.indexOf("Files")>-1){if(vr.preventDefault(),ln=="stex")return;try{let ta=yo[1];((wo=yo[0])==null?void 0:wo.kind)==="file"&&(ta=yo[0]);const na=ta.getAsFile(),Ba=na.name.split(".").pop();(0,Ft.I)(na,ka=>{var is,vn,Oa;ka.id?((is=na==null?void 0:na.type)==null?void 0:is.indexOf("image"))>-1?sr.replaceSelection(`<img width="100%" src="/api/attachments/${ka.id}?type=${ka.content_type})" alt="" />`):((vn=na==null?void 0:na.type)==null?void 0:vn.indexOf("video"))>-1?sr.replaceSelection(`<video width="100%" controls src="/api/attachments/${ka.id}"></video>`):((Oa=na==null?void 0:na.type)==null?void 0:Oa.indexOf("pdf"))>-1?sr.replaceSelection(`<a href="/api/attachments/${ka.id}?type=${na.type}&disposition=inline" target="_blank">${na.name}</a>`):Hi.includes(Ba)?sr.replaceSelection(`<a href="/api/attachments/${ka.id}?type=office&disposition=inline" target="_blank">${na.name}</a>`):sr.replaceSelection(`[${na.name}](/api/attachments/${ka.id}?type=${ka.content_type})`):(ka==null?void 0:ka.status)===401&&(document.location.href="/user/login")})}catch(ta){En.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const sr=ze().fromTextArea(Po.current,{mode:ln,lineNumbers:!qt,lineWrapping:!0,value:Mt,autoCloseTags:!0,autoCloseBrackets:!0});return sr.on("keyup",function(qn,vr){vr.keyCode===8&&(qn.getValue()==""?sr.setOption("placeholder",Ri):sr.setOption("placeholder",null))}),sr.on("keydown",function(qn,vr){if(vr.keyCode===8){var wo=ro(qn);wo&&vr.preventDefault()}}),xt&&sr.focus(),sr.on("paste",Mr),di&&sr.on("beforeChange",function(qn,vr){(vr.origin==="paste"||vr.origin==="+input")&&vr.cancel()}),Br(sr),()=>{sr.off("paste",Mr)}}},[]);const Zr=(0,ce.useCallback)(()=>{if(ao.current)try{}catch(Mr){console.log(Mr,"---- to set md editor body height")}},[nr,ao,Si]);(0,ce.useEffect)(()=>{function Mr(){let sr=new wt.Z(qn=>{for(let vr of qn)(vr.target.offsetHeight>0||vr.target.offsetWidth>0)&&(Zr(),yn.setSize("100%","100%"),yn.refresh())});return sr.observe(Po.current.parentElement),sr}if(yn){const sr=Mr();return()=>{var qn,vr;(qn=Po.current)!=null&&qn.parentElement&&sr.unobserve((vr=Po.current)==null?void 0:vr.parentElement)}}},[yn,Zr]),(0,ce.useEffect)(()=>{if(yn){let Mr=[];for(const[sr,qn]of Object.entries(Fi)){let vr={[sr]:()=>{wi(qn)}};Mr.push(vr),yn.addKeyMap(vr)}return()=>{for(let sr of Mr)yn.removeKeyMap(sr)}}},[yn]),(0,ce.useEffect)(()=>{hn!==Si&&zi(hn)},[hn]),(0,Wn.Z)(()=>{if(!St&&ar>0){let Mr=new Date().getTime(),sr=window.sessionStorage.getItem(xn);Mr>=ar+mi&&(!sr||sr!==br)&&(window.sessionStorage.setItem(xn,br),Jr(!0))}},mi),(0,ce.useEffect)(()=>{_n(nt)},[yn,nt]),(0,ce.useEffect)(()=>{yn&&xt&&yn.focus()},[yn,xt]),(0,ce.useEffect)(()=>{if(mn&&yn){let Mr=function(qn){let vr=qn.target;if(qi.current){let wo=vr.scrollTop/vr.scrollHeight;qi.current.scrollTop=qi.current.scrollHeight*wo}};const sr=yn.getScrollerElement();return sr.addEventListener("scroll",Mr),()=>{sr.removeEventListener("scroll",Mr)}}},[yn,mn]),(0,ce.useEffect)(()=>{if(yn&&Xn){let Mr=function(sr,qn){Xn(sr,qn)};return yn.on("beforeChange",Mr),()=>{yn.off("beforeChange",Mr)}}},[yn,Xn]),(0,ce.useEffect)(()=>{if(yn&&Jt){let Mr=function(){Jt(yn.getValue())};return yn.on("blur",Mr),()=>{yn.off("blur",Mr)}}},[yn,Jt]);function ro(Mr,sr){var qn=Mr.getDoc(),vr=qn.getCursor(),wo=qn.getLine(vr.line),ua=wo.charAt(vr.ch-1),Bo=wo.lastIndexOf("@\u2581@",vr.ch),yo=wo.lastIndexOf("@\u2581\u2581@",vr.ch),ta=Bo>yo?Bo:yo,na=Bo>yo?3:4;if(mr.indexOf(ua)===-1)return null;if(console.log("change1:",sr,Mr,wo,vr,ta,Bo,yo,ua),ta>=0&&vr.ch-ta<5){var Ba=ta+na;return qn.replaceRange("",{line:vr.line,ch:ta},{line:vr.line,ch:Ba}),{line:vr.line,ch:Ba}}return null}(0,ce.useEffect)(()=>{if(yn){let Mr=function(sr,qn){const vr=sr.getValue();Wr(vr),Qi(new Date().getTime()),sr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ot&&(Rn?Ot(vr,kr(vr)):Ot(vr))};return yn.on("change",Mr),()=>{yn.off("change",Mr)}}},[yn,Ot]),(0,ce.useEffect)(()=>{if(yn)if(Mt==null)yn.setValue(""),Wr("");else{const Mr=window.scrollY||window.pageYOffset;Mt!==yn.getValue()&&(yn.setValue(Mt),Wr(Mt),yn.setCursor(di?1:yn.lineCount(),0),window.scrollTo(0,Mr))}},[yn,Mt]);const wi=(0,ce.useCallback)(Mr=>{const sr=yn.getCursor(),qn=yn.getSelection();let vr=qn.split(`
|
|
|
`);switch(Mr){case"bold":return yn.replaceSelection("**"+qn+"**"),qn===""&&yn.setCursor(sr.line,sr.ch+2),yn.focus();case"italic":return yn.replaceSelection("*"+qn+"*"),qn===""&&yn.setCursor(sr.line,sr.ch+1),yn.focus();case"code":return yn.replaceSelection("`"+qn+"`"),qn===""&&yn.setCursor(sr.line,sr.ch+1),yn.focus();case"inline-latex":return ji("inline-latex"),yn.focus();case"latex":return yn.replaceSelection("```latex\n"+qn+"\n```"),yn.setCursor(sr.line+1,qn.length+1),yn.focus();case"line-break":return yn.replaceSelection(`<br/>
|
|
|
`),yn.focus();case"list-ul":return qn===""?yn.replaceSelection("- "+qn):yn.replaceSelection(vr.map(wo=>wo===""?"":`- ${wo}`).join(`
|
|
|
`)),yn.focus();case"list-ol":return qn===""?yn.replaceSelection("1. "+qn):yn.replaceSelection(vr.map((wo,ua)=>wo===""?"":`${ua+1}. ${wo}`).join(`
|
|
|
`)),yn.focus();case"add-null-ch":return qn===""&&yn.setCursor(sr.line,sr.ch),yn.replaceSelection(dr),yn.focus();case"add-signal":return qn===""&&yn.setCursor(sr.line,sr.ch),yn.replaceSelection(be),yn.focus();case"add-multiple":return qn===""&&yn.setCursor(sr.line,sr.ch),yn.replaceSelection(mr),yn.focus();case"inster-template-1":return qn===""&&yn.setCursor(sr.line,sr.ch),yn.replaceSelection(ci),yn.focus();case"eraser":return yn.setValue(""),yn.focus();case"trigger-watch":return _n(!mn),yn.focus();case"trigger-full-screen":return zi(!Si),yn.focus();case Yn:ji(Yn);return;case pi:ji(pi);return;case zn:ji(zn);return;case ii:ji(ii);return;case"maths-latex":ji("maths-latex");return;case Dn:ji(Dn);return;case Ii:ji(Ii);return;default:throw new Error}},[yn,mn,Si]),Qe=(0,ce.useCallback)((Mr,sr)=>{var qn,vr,wo,ua,Bo,yo;switch(ji(""),Ni){case Yn:const{title:is,link:vn}=Mr;return yn.replaceSelection(`[${is}](${vn})`),yn.focus();case pi:const{language:Oa,content:Vl}=Mr;return yn.replaceSelection(["```"+Oa,Vl,"```"].join(`
|
|
|
`)),yn.focus();case"maths-latex":for(var ta=atob(Mr),na=new Uint8Array(ta.length),Ba=0;Ba<ta.length;Ba++)na[Ba]=ta.charCodeAt(Ba);var ka=new Blob([na],{type:"image/png"});(0,Ft.I)(ka,$r=>{$r.id?yn.replaceSelection(``):($r==null?void 0:$r.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":yn.replaceSelection("`$$"+Mr+"$$`");break;case zn:case ii:case gi:const{src:Hs,alt:wl}=Mr,Ma=sr,yu=(wo=(vr=(qn=Ma==null?void 0:Ma.name)==null?void 0:qn.split("."))==null?void 0:vr.pop)==null?void 0:wo.call(vr);return((ua=Ma==null?void 0:Ma.type)==null?void 0:ua.indexOf("image"))>-1||!(Ma!=null&&Ma.type)?Ma!=null&&Ma.align||Ma!=null&&Ma.width?yn.replaceSelection(`<p style="text-align:${Ma.align||"initial"}"><img width="${Ma.width?Ma.width+"%":"initial"}" src="${Hs}" alt="${wl||""}" /></p>`):yn.replaceSelection(`<img width="100%" src="${Hs}" alt="${wl||""}" />`):((Bo=Ma==null?void 0:Ma.type)==null?void 0:Bo.indexOf("video"))>-1?yn.replaceSelection(`<video width="100%" controls src="${Hs}"></video>`):((yo=Ma==null?void 0:Ma.type)==null?void 0:yo.indexOf("pdf"))>-1?yn.replaceSelection(`<a href="${Hs}?type=${Ma.type}&disposition=inline" target="_blank">${Ma.name}</a>`):Hi.includes(yu)?yn.replaceSelection(`<a href="${Hs}?type=office&disposition=inline" target="_blank">${Ma.name}</a>`):yn.replaceSelection(`[${Ma.name}](${Hs})`),yn.focus();case Ii:const{row:Cl,col:ma,align:Fo}=Mr;let Ul=`
|
|
|
`;for(let $r=0;$r<Cl;$r++){let Ko=[],So=[];for(let Ti=0;Ti<ma;Ti++)$r===1&&So.push(Jn[Fo]),Ko.push(" ");$r===1&&(Ul+=`| ${So.join(" | ")} |
|
|
|
`),Ul+=`| ${Ko.join(ma===1?"":" | ")} |
|
|
|
`}return yn.replaceSelection(Ul+`
|
|
|
`),yn.focus();default:throw new Error}},[yn,Ni]),uo=(0,ce.useMemo)(()=>{switch(Ni){case Yn:return ce.createElement(cn,{callback:Qe,onCancel:Zo});case pi:return ce.createElement(sn.Z,{callback:Qe,onCancel:Zo});case zn:return ce.createElement(Ft.Z,{callback:Qe,onCancel:Zo});case Dn:return ce.createElement(ot,{callback:Qe,onCancel:Zo});case Ii:return ce.createElement(Be,{callback:Qe,onCancel:Zo});case"maths-latex":return ce.createElement(an,{showSaveButton:!0,callback:Qe});case"inline-latex":return ce.createElement(Qt.Z,{showSaveButton:!0,callback:Qe});default:return null}},[Ni]);function Zo(){ji("")}(0,ce.useEffect)(()=>{if(Ki.current){let Mr=function(Bo){wo=!0,ua=Bo.pageY},sr=function(){wo=!1},qn=function(Bo){if(wo){let yo=Bo.pageY-ua;yo<0&&(yo=0),yo>300&&(yo=300);let ta=Yt+yo+"px";hr(ta)}},vr=Ki.current,wo=!1,ua=0;return vr.addEventListener("mousedown",Mr),document.addEventListener("mousemove",qn),document.addEventListener("mouseup",sr),()=>{vr.removeEventListener("mousedown",Mr),document.removeEventListener("mousemove",qn),document.removeEventListener("mouseup",sr)}}},[yn,Ki]),(0,ce.useEffect)(()=>{hr(Yt)},[Yt]);const ga=dn(Ve),Pa=dn(nr),ia={width:ga,height:Pa},Dr=(0,ce.useMemo)(()=>{if(ar){let Mr=new Date(ar),sr=Mr.getHours(),qn=Mr.getMinutes(),vr=Mr.getSeconds();return sr=sr<10?"0"+sr:sr,qn=qn<10?"0"+qn:qn,vr=vr<10?"0"+vr:vr,`${sr}:${qn}:${vr}`}return 0},[ar]),kr=Mr=>{const sr=[];if(Rn){let qn=-1;Mr=Mr.replace(/(@▁▁@|@▁@)/g,function(vr,wo,ua){sr.push({multiLine:vr!==be})})}return sr};function fo(){window.sessionStorage.removeItem(xn),Jr(!1),Qi(0)}function Rr(){Jr(!1),Qi(0),yn.setValue(window.sessionStorage.getItem(xn))}(0,ce.useEffect)(()=>{Vn[Ni]&&Ni!==ii&&Ni!==Dn&&setTimeout(()=>{const Mr=document.getElementsByClassName("markdown-popup-form")[0],sr=window.innerWidth/2-Mr.offsetWidth/2,qn=window.innerHeight/2-Mr.offsetHeight/2;_r(sr),Bi(qn)},0)},[Ni]);const To=Mr=>{Mr.preventDefault();const sr=Mr.clientX-Bn,qn=Mr.clientY-co;document.body.onmousemove=vr=>{let wo=vr.clientX-sr,ua=vr.clientY-qn;const Bo=document.getElementsByClassName("markdown-popup-form")[0],yo=window.innerWidth-Bo.offsetWidth,ta=window.innerHeight-Bo.offsetHeight;wo=Math.max(0,Math.min(wo,yo)),ua=Math.max(0,Math.min(ua,ta)),qa(vr.clientX,vr.clientY,sr,qn)&&(_r(wo),Bi(ua))},document.body.onmouseup=function(){document.body.onmousemove=null}},qa=(Mr,sr,qn,vr)=>{const wo=document.body.clientHeight,ua=document.body.clientWidth;return Mr<20&&qn>Mr||Mr>ua-20&&qn<Mr||sr<20&&vr>sr||sr>wo-20&&vr<sr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"markdown-editor-wrapper",ref:ao},ce.createElement("div",{className:`markdown-editor-container ${ui} ${mn?"on-preview":""} ${qt?"mini":""} ${Si?"full-screen":""}`,style:ia},ce.createElement(je,{insertTemp:Kt,watch:mn,fullScreen:Si,showNullButton:gn,showNullProgramButton:Rn,onActionCallback:wi,hidetoolBar:ai,extraUse:tr}),ce.createElement("div",{className:"markdown-editor-body"},ce.createElement("div",{className:"codemirror-container"},ce.createElement("textarea",{ref:Po,placeholder:Ri})),mn?ce.createElement("div",{ref:qi,className:"preview-container"},ln==="stex"&&ce.createElement(mt,{value:br}),ln!=="stex"&&ce.createElement(st.Z,{disabledFill:hi,showProgramFill:Rn,value:br})):null))),On?ce.createElement("a",{ref:Ki,className:"editor-resize"}):null,Ni===ii&&ce.createElement(Mn,{callback:Qe,onCancel:Zo}),Ni===Dn&&ce.createElement(ot,{callback:Qe,onCancel:Zo}),ce.createElement(Je.Z,null,Vn[Ni]&&Ni!==ii&&Ni!==Dn?ce.createElement($t.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Bn,top:co},title:ce.createElement("div",{style:{cursor:"move"},onMouseDown:To},Vn[Ni]),open:!0,onCancel:Zo,footer:null,destroyOnClose:!0,width:Ni===Dn?"1200px":null,height:Ni===Dn?"80vh":null,className:"markdown-popup-form"},uo):null))}},28451:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Fe},I:function(){return je}});var ce=ve(78241),De=ve(8591),ze=ve(92832),wt=ve(81327),Ze=ve(5871),ht=ve(5112),Me=ve(3113),yt=ve(77903),ct=ve(59301),He=ve(59301),st=Object.defineProperty,mt=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(Je,Ke,gt)=>Ke in Je?st(Je,Ke,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Je[Ke]=gt,se=(Je,Ke)=>{for(var gt in Ke||(Ke={}))te.call(Ke,gt)&&he(Je,gt,Ke[gt]);if(Ae)for(var gt of Ae(Ke))ee.call(Ke,gt)&&he(Je,gt,Ke[gt]);return Je},de=(Je,Ke)=>mt(Je,dt(Ke));const{useForm:me}=ce.default,we={width:280,marginRight:10},Ne={labelCol:{span:5},wrapperCol:{span:19}};var Fe=({callback:Je,onCancel:Ke})=>{const[gt]=me();let Re=(0,ct.useRef)();function At(kt){Re.current.width=gt.getFieldValue("width"),Re.current.align=gt.getFieldValue("align"),Je(kt,Re.current)}function qe(kt,Bt){if(kt.status===-1){De.ZP.error(kt.message);return}gt.setFieldsValue({src:`/api/attachments/${kt.id}`,type:Bt.type})}function Et(kt){let Bt=kt.target.files[0];Re.current=Bt,je(Bt,qe)}return He.createElement(ce.default,de(se({form:gt},Ne),{className:"upload-image-panel",onFinish:At,style:{width:470,overflow:"hidden"}}),He.createElement(ce.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},He.createElement("div",{className:"flex-container"},He.createElement(ce.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},He.createElement(ze.default,{style:we})),He.createElement(Ie,{onFileChange:Et}))),He.createElement(ce.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},He.createElement(ze.default,{style:{width:264}})),He.createElement(ce.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},He.createElement(wt.Z,null,He.createElement(ce.default.Item,{name:"width",style:{margin:0}},He.createElement(Ze.Z,{style:{width:264}})),He.createElement("span",{className:"ml8"},"%"))),He.createElement(ce.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},He.createElement(ht.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),He.createElement("aside",null,He.createElement(ce.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},He.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),He.createElement(Me.ZP,{type:"default",onClick:Ke},"\u53D6\u6D88"))))};function Ie({onFileChange:Je}){return He.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",He.createElement("input",{type:"file",onChange:Je}))}function je(Je,Ke){if(!Je)throw new String("\u6CA1\u6709\u6587\u4EF6");let gt=new FormData;gt.append("editormd-image-file",Je),gt.append("file_param_name","editormd-image-file"),gt.append("byxhr","true");var Re=new window.XMLHttpRequest;Re.withCredentials=!0,Re.addEventListener("load",function(At){Ke(JSON.parse(At.target.responseText),Je)},!1),Re.addEventListener("error",function(At){console.error(At)},!1),Re.open("POST",`${yt.KI}/api/attachments.json`),Re.send(gt)}},79346:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return ze}});var ce=ve(59301),De=ve(4676);class ze extends ce.Component{constructor(Ze){super(Ze);const ht=window.document;this.node=ht.createElement("div"),ht.body.appendChild(this.node)}render(){const{children:Ze}=this.props;return(0,De.createPortal)(Ze,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Cn,un,ve){"use strict";ve.d(un,{SV:function(){return Dt},ZP:function(){return Ge}});var ce=ve(59301),De=ve(76374);const ze={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"]},wt={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"]},Ze={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},ht={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},Me={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 yt=ve(53184),ct=ve.n(yt),He=Object.defineProperty,st=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Tt,ot,et)=>ot in Tt?He(Tt,ot,{enumerable:!0,configurable:!0,writable:!0,value:et}):Tt[ot]=et,he=(Tt,ot)=>{for(var et in ot||(ot={}))Ae.call(ot,et)&&ee(Tt,et,ot[et]);if(dt)for(var et of dt(ot))te.call(ot,et)&&ee(Tt,et,ot[et]);return Tt},se=(Tt,ot)=>st(Tt,mt(ot)),de=(Tt,ot,et)=>new Promise((Te,xe)=>{var Se=Ee=>{try{_e(et.next(Ee))}catch(ft){xe(ft)}},Be=Ee=>{try{_e(et.throw(Ee))}catch(ft){xe(ft)}},_e=Ee=>Ee.done?Te(Ee.value):Promise.resolve(Ee.value).then(Se,Be);_e((et=et.apply(Tt,ot)).next())});const me={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"]}},we=(Tt,ot)=>ot.map(et=>({label:et,kind:Tt.languages.CompletionItemKind.Keyword,insertText:et})),Ne=Tt=>Object.keys(me.tables).map(ot=>({label:ot,kind:Tt.languages.CompletionItemKind.Variable,insertText:ot})),Fe=(Tt,ot)=>{const et=me.tables[Tt];return et?et.map(Te=>({label:Te,kind:ot.languages.CompletionItemKind.Field,insertText:Te})):[]};function Ie(Tt,ot,et,Te,xe){let Se=ot.getWordUntilPosition(et),Be={startLineNumber:et.lineNumber,endLineNumber:et.lineNumber,startColumn:Se.startColumn,endColumn:Se.endColumn},_e=Te.map(Ee=>({label:Ee,kind:Tt.languages.CompletionItemKind.Keyword,insertText:Ee,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}));return xe.map(Ee=>{_e.push(se(he({},Ee),{range:Be}))}),_e}var je=Tt=>{me.languages.map(xe=>(Tt.languages.registerDocumentFormattingEditProvider(xe,{provideDocumentFormattingEdits(Se,Be,_e){return de(this,null,function*(){const Ee=ct()(Se.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:Se.getFullModelRange(),text:Ee}]})}}),xe));const ot=Ze.quickKey.map(xe=>({label:xe.label,kind:Tt.languages.CompletionItemKind.Method,insertText:xe.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),et=ht.quickKey.map(xe=>({label:xe.label,kind:Tt.languages.CompletionItemKind.Method,insertText:xe.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Te=wt.quickKey.map(xe=>({label:xe.label,kind:Tt.languages.CompletionItemKind.Method,insertText:xe.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Tt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(xe,Se){var Be=xe.getWordUntilPosition(Se),_e={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ee=xe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...Ze.keywords.map(ft=>({label:ft,kind:Tt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e})),...Ze.quickKey.map(ft=>({label:ft.label,kind:Tt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ee.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}))]}}}),Tt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(xe,Se){var Be=xe.getWordUntilPosition(Se),_e={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn};return{suggestions:[...ze.keywords.map(Ee=>({label:Ee,kind:Tt.languages.CompletionItemKind.Function,documentation:Ee,insertText:Ee,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}))]}}}),Tt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(xe,Se){var Be=xe.getWordUntilPosition(Se),_e={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ee=xe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...wt.keywords.map(ft=>({label:ft,kind:Tt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e})),...wt.quickKey.map(ft=>({label:ft.label,kind:Tt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ee.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}))]}}}),Tt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(xe,Se){var Be=xe.getWordUntilPosition(Se),_e={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ee=xe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...Me.keywords.map(ft=>({label:ft,kind:Tt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e})),...Me.quickKey.map(ft=>({label:ft.label,kind:Tt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ee.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}))]}}}),Tt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(xe,Se){var Be=xe.getWordUntilPosition(Se),_e={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ee=xe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...ht.keywords.map(ft=>({label:ft,kind:Tt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e})),...ht.quickKey.map(ft=>({label:ft.label,kind:Tt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ee.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}))]}}})};const Je="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ke=Object.defineProperty,gt=(Tt,ot,et)=>ot in Tt?Ke(Tt,ot,{enumerable:!0,configurable:!0,writable:!0,value:et}):Tt[ot]=et,Re=(Tt,ot,et)=>gt(Tt,typeof ot!="symbol"?ot+"":ot,et);const At=class px{constructor(ot,et,Te){this.placeholder=ot,this.editor=et,this.monaco=Te,et.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)}};Re(At,"ID","editor.widget.placeholderHint");var Et=At,kt=ve(96236),Bt=ve(8591),Gt=ve(6848),Ut=ve(89392),lt=ve(34604),$e=ve(56102),Nt=Object.defineProperty,cn=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Nn=(Tt,ot,et)=>ot in Tt?Nt(Tt,ot,{enumerable:!0,configurable:!0,writable:!0,value:et}):Tt[ot]=et,fn=(Tt,ot)=>{for(var et in ot||(ot={}))$t.call(ot,et)&&Nn(Tt,et,ot[et]);if(Ft)for(var et of Ft(ot))en.call(ot,et)&&Nn(Tt,et,ot[et]);return Tt},Mn=(Tt,ot)=>cn(Tt,sn(ot)),pt=(Tt,ot)=>{var et={};for(var Te in Tt)$t.call(Tt,Te)&&ot.indexOf(Te)<0&&(et[Te]=Tt[Te]);if(Tt!=null&&Ft)for(var Te of Ft(Tt))ot.indexOf(Te)<0&&en.call(Tt,Te)&&(et[Te]=Tt[Te]);return et},Ln=(Tt,ot,et)=>new Promise((Te,xe)=>{var Se=Ee=>{try{_e(et.next(Ee))}catch(ft){xe(ft)}},Be=Ee=>{try{_e(et.throw(Ee))}catch(ft){xe(ft)}},_e=Ee=>Ee.done?Te(Ee.value):Promise.resolve(Ee.value).then(Se,Be);_e((et=et.apply(Tt,ot)).next())});function Un(Tt){return/^\d+$/.test(Tt)?`${Tt}px`:Tt}function Zt(){}let tn=!1;const Rt={"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 Lt(Tt=[]){let ot=Tt;if(Array.isArray(Tt)){for(let et=0;et<Tt.length;et++){let Te=Rt[Tt[et]];if(Te)return Te}return ot[0]}return Rt[ot]||ot}let ut=null;var Ge=Tt=>{var ot=Tt,{width:et="100%",height:Te="100%",value:xe,language:Se="javascript",style:Be={},options:_e={},overrideServices:Ee={},theme:ft="vs-dark",onEditBlur:Xt,isCopy:an=!1,onSave:Qt,autoHeight:En=!1,forbidCopy:Yn=!1,onChange:zn=Zt,editorDidMount:Dn=Zt,onFocus:ii=Zt,onBreakPoint:gi=Zt,breakPointValue:pi=[],filename:Ii="educoder.txt",errorLine:Yi,errorContent:Jn="",highlightLine:Wn,openBreakPoint:ti=!1,placeholder:yi="",showMiniMap:mi=!0}=ot,dr=pt(ot,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const mr=(0,ce.useRef)(),be=(0,ce.useRef)({}),ci=(0,ce.useRef)(),Hi=(0,ce.useRef)(),dn=(0,ce.useRef)([]),oi=(0,ce.useRef)(!1),vi=(0,ce.useRef)(),Fi=(0,ce.useRef)(),Vn=(0,ce.useRef)(!1),[bn,Mt]=(0,ce.useState)(!1);function Ot(){let Jt;return mr.current&&(Jt=new De.Z(Xn=>{for(let si of Xn)(si.target.offsetHeight>0||si.target.offsetWidth>0)&&be.current.instance.layout()}),Jt.observe(mr.current)),Jt}function Ve(){Bt.ZP.warning({content:decodeURIComponent(Je),key:"monaco-editor-tip"})}const Yt=()=>{let Jt=be.current.instance;if(xe!=null&&Jt&&bn){const Xn=Jt.getModel();Xn&&xe!==Xn.getValue()&&(tn=!0,Xn.setValue(xe),Jt.layout(),tn=!1)}};(0,ce.useEffect)(()=>{const Jt=lt.Z.subscribe("formatDocument",Xn=>{var si;let ui=be.current.instance;(si=ui==null?void 0:ui.getAction)==null||si.call(ui,"editor.action.formatDocument").run()});return window.updateMonacoValue=Xn=>{zn(Xn)},Jt},[]),(0,ce.useEffect)(()=>{var Jt;let Xn=be.current.instance;Hi.current&&clearTimeout(Hi.current),Hi.current=setTimeout(()=>{Yt()},500),xe&&(xe!=null&&xe.length)&&((Jt=Xn==null?void 0:Xn.updateOptions)==null||Jt.call(Xn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(xe.split(/\r\n|\r|\n/g).length))+3,5)}))},[xe,bn,be.current]),(0,ce.useEffect)(()=>{if(Yi&&be.current&&be.current.instance){let Xn=be.current.instance;Xn.changeViewZones(function(si){var ui=document.createElement("div");ui.style.padding="10px 20px",ui.style.width="calc(100% - 20px)",ui.className="my-error-line-wrp",ui.innerHTML=Jn,si.addZone({afterLineNumber:Yi||11,heightInLines:3,domNode:ui})});var Jt={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}};Xn.addOverlayWidget(Jt),Xn.revealPositionInCenter({lineNumber:20,column:1})}},[Yi,be.current,bn]);const qt=(Jt="",Xn)=>{if(!Jt||Jt.trim()==="")return!0;const ui=be.current.instance.getModel().getLineTokens(Xn);let Qn=!1;for(let di=0;di<2;di++)ui.getStandardTokenType(di)===1&&(Qn=!0);return Qn};(0,ce.useEffect)(()=>{var Jt;const Xn=(Jt=be.current)==null?void 0:Jt.instance;if(Xn&&bn&&Yn){const si=Xn.onDidBlurEditorWidget(()=>{Vn.current=!1}),ui=Xn.onDidFocusEditorText(()=>{Vn.current=!0});return()=>{si.dispose(),ui.dispose()}}},[be.current,bn,Yn]),(0,ce.useEffect)(()=>{var Jt;if((Jt=be.current)!=null&&Jt.instance&&bn&&ti){let Xn=be.current.instance,si=Xn.getModel();if(!si)return;(()=>{var mn;let _n=[],Si=[];const zi=si.getAllDecorations();for(let ji of zi)ji.options.className==="highlighted-line"&&(_n.push((mn=ji==null?void 0:ji.range)==null?void 0:mn.startLineNumber),Si.push(ji==null?void 0:ji.id));if(Wn===_n[0])return;si.deltaDecorations(Si,[]);const Ni=si.getLineCount();Wn&&Wn<=Ni&&(Xn.deltaDecorations([],[{range:new ut.Range(Wn,1,Wn,si.getLineMaxColumn(Wn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Xn.revealLineInCenter(Wn))})();const Qn=(mn=!1)=>{var _n;let Si=[],zi=[];const Ni=si.getAllDecorations();for(let ji of Ni)ji.options.linesDecorationsClassName==="breakpoints-select"&&(Si.push((_n=ji==null?void 0:ji.range)==null?void 0:_n.startLineNumber),zi.push(ji==null?void 0:ji.id));if(mn)return{lines:Si,ids:zi};gi(Si)},di=mn=>Ln(void 0,null,function*(){let _n={range:new ut.Range(mn,1,mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield si.deltaDecorations([],[_n]),Qn()}),hi=mn=>Ln(void 0,null,function*(){let _n=[];const Si=Xn.getLineDecorations(mn);for(let zi of Si)zi.options.linesDecorationsClassName==="breakpoints-select"&&_n.push(zi.id);yield si.deltaDecorations(_n,[]),Qn()}),Ri=mn=>{let _n=Xn.getLineDecorations(mn);for(let Si of _n)if(Si.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ut.isEqual)(pi,Qn(!0).lines)){si.deltaDecorations(Qn(!0).ids,[]);const mn=pi.map(_n=>({range:new ut.Range(_n,1,_n,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));si.deltaDecorations([],mn)}const Xi=Xn.onDidChangeModelContent(mn=>{let _n=Xn.getPosition();if(_n){let Si=_n.lineNumber;clearTimeout(Fi.current),Fi.current=setTimeout(()=>{qt(si.getLineContent(Si),Si)?hi(Si):Ri(Si)?(hi(Si),di(Si)):Qn()},100)}}),tr=Xn.onMouseDown(mn=>{var _n,Si,zi;if(mn.target.detail&&((zi=(Si=(_n=mn.target)==null?void 0:_n.element)==null?void 0:Si.className)!=null&&zi.includes("line-numbers"))){let Ni=mn.target.position.lineNumber;if(qt(si.getLineContent(Ni),Ni))return;Ri(Ni)?hi(Ni):di(Ni)}}),yn=mn=>{let _n={range:new ut.Range(mn,1,mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};dn.current=Xn.deltaDecorations(dn.current,[_n])},Br=()=>{dn.current=Xn.deltaDecorations(dn.current,[])},br=Xn.onMouseMove(mn=>{var _n,Si,zi;if(Br(),mn.target.detail&&((zi=(Si=(_n=mn.target)==null?void 0:_n.element)==null?void 0:Si.className)!=null&&zi.includes("line-numbers"))){let Ni=mn.target.position.lineNumber;if(qt(si.getLineContent(Ni),Ni))return;yn(Ni)}}),Wr=Xn.onMouseLeave(()=>{Br()});return()=>{Xi.dispose(),tr.dispose(),br.dispose(),Wr.dispose()}}},[be.current,bn,pi,Wn,ti,Se]),(0,ce.useEffect)(()=>{var Jt;(Jt=be.current)!=null&&Jt.instance&&ti&&be.current.instance.setPosition({lineNumber:0,column:0})},[Wn]);function xt(){let Jt=be.current.instance;if(Jt){const Xn=Jt.getSelection(),si=be.current.pastePos||{},ui=new ut.Range(si.startLineNumber||Xn.endLineNumber,si.startColumn||Xn.endColumn,si.endLineNumber||Xn.endLineNumber,si.endColumn||Xn.endColumn);setTimeout(()=>{Jt.executeEdits("",[{range:ui,text:""}])},300)}}function nt(Jt){(window.navigator.platform.match("Mac")?Jt.metaKey:Jt.ctrlKey)&&Jt.keyCode==83&&(Jt.preventDefault(),Qt())}const Kt=()=>{if(En&&be.current.instance){const Jt=be.current.instance.getContentHeight();ai(Jt<Te?Te:Jt)}else ai(Te)};function ln(Jt){var Xn=document.createEvent("MouseEvents");Xn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Jt.dispatchEvent(Xn)}const xn=Jt=>{if(!Vn.current)return;const{keyCode:Xn,ctrlKey:si,metaKey:ui,target:Qn,type:di}=Jt;return(di==="paste"||(Xn===67||Xn===86)&&(ui||si))&&Qn.nodeName==="TEXTAREA"&&(Ve(),Jt.preventDefault()),!1};function On(Jt,Xn){var si=window.URL||window.webkitURL||window,ui=new Blob([Xn]),Qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Qn.href=si.createObjectURL(ui),Qn.download=Jt,ln(Qn)}(0,ce.useEffect)(()=>{Kt()},[Kt]),(0,ce.useEffect)(()=>{mr.current&&!bn&&Promise.all([ve.e(8909),ve.e(3267)]).then(ve.bind(ve,71448)).then(Jt=>{try{ut=Jt,be.current.instance=ut.editor.create(mr.current,{value:xe,language:Lt(Se),theme:ft,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:mi||!1}},Ee);const Xn=be.current.instance;let Qn=[...kt.BH._menuItems].find(Xi=>Xi[0]._debugName=="EditorContext")[1],di=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],hi=(Xi,tr)=>{var yn,Br;let br=Xi._first;do tr.includes((Br=(yn=br.element)==null?void 0:yn.command)==null?void 0:Br.id)&&Xi._remove(br);while(br=br.next)};if(Dn(Xn,ut),setTimeout(()=>{Kt(),be.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{On(Ii||"educoder.txt",Xn.getValue())}})},500),be.current.subscription=Xn.onDidChangeModelContent(Xi=>{oi.current?clearTimeout(vi.current):(Kt(),zn(Xn.getValue(),Xi)),vi.current=setTimeout(()=>{oi.current=!1},500)}),window.Monaco||je(ut,Lt(Se)),Yn&&(hi(Qn,di),mr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",xn),window.removeEventListener("paste",xn),window.addEventListener("keydown",xn),window.addEventListener("paste",xn)),window.Monaco=ut,Xt&&Xn.onDidBlurEditorWidget(()=>{Xt(Xn.getValue())}),ii&&Xn.onDidFocusEditorText(()=>{ii(Xn.getValue())}),Yn)try{Xn.onDidPaste(Xi=>{const tr=Xn.getSelection(),yn=be.current.pastePos||{},Br=new ut.Range(yn.startLineNumber||tr.endLineNumber,yn.startColumn||tr.endColumn,yn.endLineNumber||tr.endLineNumber,yn.endColumn||tr.endColumn);Xn.executeEdits("",[{range:Xi.range,text:""}])})}catch(Xi){}let Ri=Ot();return yi&&typeof yi=="string"&&new Et(yi,Xn,ut),Mt(!0),()=>{const Xi=be.current.instance;Xi.dispose();const tr=Xi.getModel();tr&&tr.dispose(),be.current.subscription&&be.current.subscription.dispose(),Ri.unobserve(mr.current)}}catch(Xn){}})},[]),(0,ce.useEffect)(()=>{if(be.current.instance&&bn)return document.addEventListener("keydown",nt,!1),()=>{document.removeEventListener("keydown",nt)}},[Qt,bn]),(0,ce.useEffect)(()=>{let Jt=be.current.instance;if(Jt&&bn){let Xn=Lt(Se);ut.editor.setModelLanguage(Jt.getModel(),Xn)}},[Se,bn]),(0,ce.useEffect)(()=>{be.current.instance&&bn&&ut.editor.setTheme(ft)},[ft,bn]),(0,ce.useEffect)(()=>{let Jt=be.current.instance;ci.current=_e,Jt&&bn&&(Jt.updateOptions(fn({},_e)),setTimeout(()=>{Jt.getModel().updateOptions(fn({},_e))},200))},[JSON.stringify(_e),bn]),(0,ce.useEffect)(()=>{let Jt=be.current.instance;Jt&&bn&&Jt.layout()},[et,Te,bn]);const[St,gn]=(0,ce.useState)(Un(et)),[Rn,ai]=(0,ce.useState)(Un(Te)),hn=Mn(fn({},Be),{width:St,height:Rn,position:"relative"});return ce.createElement("div",{className:"my-monaco-editor",ref:mr,style:hn},an&&ce.createElement($e.CopyToClipboard,{text:xe,onCopy:()=>Bt.ZP.success("\u590D\u5236\u6210\u529F")},ce.createElement(Gt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ce.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ce.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Dt({width:Tt="100%",height:ot="100%",original:et,modified:Te,language:xe,options:Se={}}){const Be=(0,ce.useRef)(),[_e,Ee]=(0,ce.useState)(null);function ft(En){let Yn;return Be.current&&(Yn=new De.Z(zn=>{for(let Dn of zn)(Dn.target.offsetHeight>0||Dn.target.offsetWidth>0)&&En.layout()}),Yn.observe(Be.current)),Yn}(0,ce.useEffect)(()=>(Be.current&&Promise.all([ve.e(8909),ve.e(9404)]).then(ve.bind(ve,2550)).then(En=>{ut=En;const Yn=ut.editor.createDiffEditor(Be.current,Mn(fn({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},Se),{wordWrap:!0}));Ee(Yn);let zn=ft(Yn);return()=>{Yn.dispose();const Dn=Yn.getModel();Dn&&Dn.dispose(),zn.unobserve(Be.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ce.useEffect)(()=>{_e&&_e.setModel({original:ut.editor.createModel(et,xe),modified:ut.editor.createModel(Te,xe)})},[et,Te,xe,_e]);const Xt=Un(Tt),an=Un(ot),Qt={width:Xt,height:an};return ce.createElement("div",{className:"my-diff-editor",ref:Be,style:Qt})}},85057:function(Cn,un,ve){"use strict";ve.d(un,{jL:function(){return Ze},w9:function(){return $t},QD:function(){return zn},cQ:function(){return $e},op:function(){return ft},O5:function(){return Fi},_b:function(){return Yi},t7:function(){return se},Gi:function(){return Ln},YG:function(){return Mn},qp:function(){return st},vr:function(){return gi},qE:function(){return Qt},Je:function(){return we},wb:function(){return kt},cq:function(){return ut},tp:function(){return Ae}});var ce=ve(59301),De={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"},ze="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==",Ze=({dataSource:Vn=[],img:bn,imgWidth:Mt=346,title:Ot,sunTitle:Ve,bannerExtraContent:Yt})=>ce.createElement("div",{className:De.banner},ce.createElement("div",{className:De.content},ce.createElement("aside",null,ce.createElement("p",null,ce.createElement("b",null,Ot),ce.createElement("span",null,Ve)),Vn.length>0&&ce.createElement("div",{className:De.btns},Vn.map((qt,xt)=>ce.createElement("div",{key:xt,onClick:qt.click},qt.name,qt.sign?ce.createElement("img",{src:ze,width:39}):null))),Yt),bn&&ce.createElement("img",{style:{marginTop:33,marginRight:38},src:bn,width:Mt}))),ht={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Me=ve(92310),yt=ve.n(Me),ct=ve(89392),st=({dataSource:Vn=[],value:bn,onChange:Mt,onTitleChange:Ot,className:Ve,title:Yt,titleWidth:qt=41,style:xt={},fontColor:nt="#6A7283",showCount:Kt})=>{const[ln,xn]=(0,ce.useState)(0),[On,St]=(0,ce.useState)(!1),gn=(0,ce.useRef)(null),Rn=(0,ce.useRef)(null);return(0,ce.useEffect)(()=>{var ai;Vn.length!==0&&(((ai=gn==null?void 0:gn.current)==null?void 0:ai.clientHeight)>97?xn(1):xn(0)),Vn.length===0&&xn(0),St(!1)},[Vn]),ce.createElement("div",{className:yt()(ht.row,Ve),style:xt},ce.createElement("div",{onClick:(0,ct.throttle)(()=>Ot==null?void 0:Ot(),2e3),style:{width:qt,marginTop:On?12:4},className:`${ht.title} ${Ot?"current":""}`},Yt),ce.createElement("div",{className:On?`${ht.tagsWrap} ${ht.tagsBorderWrap}`:ht.tagsWrap},ce.createElement("div",{className:ht.bar,ref:Rn,style:ln>0?{height:ln===1?97:"auto",overflow:ln===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ce.createElement("div",{className:ht.tag,ref:gn},Vn==null?void 0:Vn.map(ai=>ce.createElement("span",{onClick:()=>Mt(ai.id),key:ai.id,style:{color:nt},className:bn===ai.id?ht.active:""},ce.createElement("span",{title:ai.name,className:ht.name},ai.name),!!Kt&&ce.createElement("span",{className:ht.num},ai.count))))),!!ln&&ce.createElement(ce.Fragment,null,ln===1?ce.createElement("div",{onClick:()=>{var ai;xn(2),((ai=gn==null?void 0:gn.current)==null?void 0:ai.clientHeight)>245?St(!0):St(!1)},className:ht.action},"\u5C55\u5F00",ce.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ce.createElement("div",{onClick:()=>{Rn.current.scrollTop=0,xn(1),St(!1)},className:ht.action},"\u6536\u8D77",ce.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},mt={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"},Ae=({dataSource:Vn=[],value:bn,onChange:Mt,className:Ot,style:Ve={}})=>ce.createElement("div",{style:Ve,className:yt()(mt.tabs,Ot)},Vn.map(Yt=>ce.createElement("span",{onClick:()=>Mt(Yt.id),className:bn===Yt.id?mt.active:"",key:Yt.id},Yt.name))),te={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"},ee=ve(92832),se=({dataSource:Vn=[],value:bn="",onChange:Mt,onInputChange:Ot=()=>{},className:Ve,style:Yt={},placeholder:qt,allowClear:xt=!1})=>{var nt;const[Kt,ln]=(0,ce.useState)(""),[xn,On]=(0,ce.useState)("");(0,ce.useEffect)(()=>{var Rn;let ai=bn;(Rn=JSON.stringify(bn))!=null&&Rn.includes("{")&&(ln(bn.id),ai=bn.value||"");try{On(decodeURIComponent(ai||""))}catch(hn){On(decodeURIComponent(ai||""))}},[bn]);const St=()=>{Mt(encodeURIComponent(xn),Kt||null)},gn=Rn=>{Rn!==Kt&&(ln(Rn),Mt(encodeURIComponent(xn),Rn))};return ce.createElement("div",{className:yt()(te.input,Ve),style:Yt},!!Vn.length&&ce.createElement("div",{className:te.dropdown},ce.createElement("div",{className:te.text},(nt=Vn.find(Rn=>Rn.id===Kt))==null?void 0:nt.name,ce.createElement("i",{className:"iconfont icon-zhankai4"}),ce.createElement("b",{className:te.b1}),ce.createElement("b",{className:te.b2})),ce.createElement("div",{className:te.menu},Vn.map((Rn,ai)=>ce.createElement("div",{key:ai,onClick:()=>gn(Rn.id)},Rn.name)))),ce.createElement(ee.default,{onPressEnter:St,value:xn,onChange:Rn=>{On(Rn.target.value),Ot(encodeURIComponent(Rn.target.value),Kt||null)},bordered:!1,placeholder:qt}),ce.createElement("i",{onClick:St,className:"iconfont icon-sousuo9 font14 pl10 current"}))},de={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"},we=({value:Vn,onChange:bn,className:Mt,total:Ot,pageSize:Ve,style:Yt={}})=>{const qt=Vn<2,xt=Vn>=Math.ceil(Ot/Ve);return Ot<=Ve?ce.createElement(ce.Fragment,null):ce.createElement("div",{className:yt()(de.quickPager,Mt),style:Yt},ce.createElement("div",{onClick:()=>{qt||bn(Vn-1,"prev")},className:qt?de.disabled:""},"\u4E0A\u4E00\u9875"),ce.createElement("div",{onClick:()=>{xt||bn(Vn+1,"next")},className:xt?de.disabled:""},"\u4E0B\u4E00\u9875"))},Ne={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"},Fe=ve(71418),Ie=ve(6848),je=ve(13570),Je=ve(3294),Ke=ve(955),gt=ve(96908),Re=ve(57177),At=ve(81378),qe=ve(8797),kt=({className:Vn,dataSource:bn=[],col:Mt=4,right:Ot,bottom:Ve=23,precision:Yt=0,wrapWidth:qt=1200,trackEventItems:xt,loading:nt})=>{const Kt=Math.floor((qt-(Mt-1)*Ot)/Mt);return ce.createElement(Fe.Z,{spinning:nt},ce.createElement("div",{className:yt()(Ne.list,Vn)},!!bn.length&&bn.map((ln,xn)=>{const{name:On,id:St,identifier:gn,power:Rn,cover_image_id:ai,pic:hn}=ln;return ce.createElement("div",{className:Ne.wrap,key:St,style:{width:Kt,marginRight:(1+xn)%Mt===0?0:Ot+Yt,marginBottom:Ve}},ce.createElement("a",{target:"_blank",href:`/shixuns/${gn}/challenges`,className:Ne.li,onClick:Jt=>{Jt.preventDefault(),xt&&(0,Ke.L9)([xt]),Rn&&(0,Ke.xg)(`/shixuns/${gn}/challenges`)}},ce.createElement("div",{className:Ne.img},ce.createElement("img",{className:Ne.cover,src:`${hn}`}),ln.is_jupyter&&ce.createElement("img",{className:Ne.sign,src:gt}),ln.is_jupyter_lab&&ce.createElement("img",{className:Ne.sign,src:Re}),ln.is_unity_3d&&ce.createElement("img",{className:Ne.sign,src:At})),ce.createElement("div",{className:Ne.name},ce.createElement(Ie.Z,{title:On||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ce.createElement("span",{className:Ne.e},On||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ce.createElement("div",{className:Ne.tags},ce.createElement(Ie.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ce.createElement("span",null,ln.challenges_count))),!!ln.myshixuns_count&&ce.createElement(Ie.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ce.createElement("span",null,ln.myshixuns_count))),ce.createElement(Ie.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ce.createElement("span",null,ce.createElement("span",null,ln.level))),ce.createElement("div",{className:Ne.rate},ce.createElement(je.Z,{allowHalf:!0,disabled:!0,defaultValue:ln.score_info}),ce.createElement("span",null,"\xA0",ln.score_info?`${ln.score_info}\u5206`:"5\u5206")))),!Rn&&ce.createElement("div",{className:Ne.lockWrap},ce.createElement("img",{src:`${Je.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ce.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!bn.length&&ce.createElement(qe.Z,null)))},Bt={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"},Gt=ve(24065),Ut=ve(59301),$e=({className:Vn,dataSource:bn=[],col:Mt=4,right:Ot,bottom:Ve=23,precision:Yt=0,wrapWidth:qt=1200,trackEventItems:xt,loading:nt,onRemove:Kt=()=>{},isCurrent:ln=!0,showAlias:xn=!1})=>{const On=Math.floor((qt-(Mt-1)*Ot)/Mt),St=[{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 Ut.createElement(Fe.Z,{spinning:nt},Ut.createElement("div",{className:yt()(Bt.list,Vn)},!!(bn!=null&&bn.length)&&(bn==null?void 0:bn.map((gn,Rn)=>{var ai;const{name:hn,id:Jt,identifier:Xn,featured:si,school_name:ui,image_url:Qn,excellent:di,is_plan:hi}=gn;return Ut.createElement("div",{key:Jt,className:Bt.wrap,style:{width:On,marginRight:(1+Rn)%Mt===0?0:Ot+Yt,marginBottom:Ve}},Ut.createElement("a",{className:Bt.li,onClick:Ri=>{Ri.preventDefault(),Ri.stopPropagation(),xt&&(0,Ke.L9)([xt]),(0,Ke.xg)(`/paths/${Xn}`)}},Ut.createElement("div",{className:Bt.img},Ut.createElement("img",{className:Bt.cover,src:`${Qn}`}),ln&&(0,Gt.bg)()&&(gn==null?void 0:gn.studying)&&Ut.createElement("div",{className:`${Bt.movebq} user-path-items`,onClick:Ri=>{Ri.stopPropagation(),Kt(gn)}},Ut.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Ut.createElement("span",{className:"c-red"},"\u79FB\u9664")),(ai=gn==null?void 0:gn.subject_tags)==null?void 0:ai.map((Ri,Xi)=>{var tr,yn;if(Xi===0){const br=(tr=St.find(Wr=>Wr.name==Ri))==null?void 0:tr.swimg;return Ut.createElement("img",{className:Bt.sign,src:br,style:{left:"-4px"}})}const Br=(yn=St.find(br=>br.name==Ri))==null?void 0:yn.ptimg;return Ut.createElement("img",{className:Bt.sign,src:Br,style:{left:`${48+52*(Xi-1)+2*Xi}px`}})}),Ut.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(gn==null?void 0:gn.excellent)&&Ut.createElement("div",{className:Bt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Ut.createElement("div",{className:Bt.name},Ut.createElement(Ie.Z,{title:xn&&(gn!=null&&gn.excellent_alias_name)?Ut.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${hn}`,Ut.createElement("br",null),Ut.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${gn==null?void 0:gn.excellent_alias_name}`)):hn},Ut.createElement("span",{className:Bt.e},xn&&(gn==null?void 0:gn.excellent_alias_name)||hn))),Ut.createElement(Ie.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ui}`},Ut.createElement("div",{className:Bt.unit},Ut.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ui)),Ut.createElement("div",{className:Bt.tags},Ut.createElement("div",null,Ut.createElement(Ie.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Ut.createElement("span",null,Ut.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Ut.createElement("span",null,gn.stages_count))),Ut.createElement(Ie.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Ut.createElement("span",null,Ut.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Ut.createElement("span",null,gn.members_count)))))))})),!bn.length&&Ut.createElement(qe.Z,null)))},Nt={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"},cn="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",sn=ve(59301),$t=({className:Vn,dataSource:bn=[],col:Mt=4,right:Ot,bottom:Ve=23,precision:Yt=0,wrapWidth:qt=1200,trackEventItems:xt,loading:nt,handleVery:Kt=()=>!0})=>{const ln=Math.floor((qt-(Mt-1)*Ot)/Mt);return sn.createElement(Fe.Z,{spinning:nt},sn.createElement("div",{className:yt()(Nt.list,Vn)},!!bn.length&&bn.map((xn,On)=>{const{subject_identifier:St,id:gn,identifier:Rn,power:ai}=xn,hn=xn.is_public!=0&&xn.is_public;return sn.createElement("div",{className:Nt.wrap,key:gn,style:{width:ln,marginRight:(1+On)%Mt===0?0:Ot+Yt,marginBottom:Ve}},sn.createElement("a",{className:Nt.li,onClick:Jt=>{Jt.preventDefault(),Kt(xn==null?void 0:xn.first_category_url)&&(xt&&(0,Ke.L9)([xt]),(0,Ke.xg)(xn.first_category_url))}},sn.createElement("div",{className:Nt.top},sn.createElement(Ie.Z,{title:xn.name},sn.createElement("div",{className:Nt.name},xn.name)),sn.createElement("img",{className:Nt.img,src:Je.Z.IMG_SERVER+"/images/"+xn.avatar_url}),sn.createElement("div",{className:Nt.text,title:xn.creator},xn.creator),St&&sn.createElement("div",{className:Nt.btns},sn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),sn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),hn&&sn.createElement("div",{className:Nt.sign},"\u516C\u5F00")),sn.createElement("div",{className:Nt.bottom},xn.visits>0&&sn.createElement(Ie.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},sn.createElement("span",null,sn.createElement("i",{className:"iconfont icon-liulanyan"}),sn.createElement("span",null,xn.visits))),xn.course_members_count>0&&sn.createElement(Ie.Z,{title:"\u6210\u5458",placement:"bottom"},sn.createElement("span",null,sn.createElement("i",{className:"iconfont icon-chengyuan"}),xn.course_members_count)),xn.tasks_count>0&&sn.createElement(Ie.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},sn.createElement("span",null,sn.createElement("i",{className:"iconfont icon-zuoye"}),xn.tasks_count)),xn.is_end?sn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):sn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!xn.is_accessible&&sn.createElement("div",{className:Nt.lockWrap},sn.createElement("img",{src:`${Je.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),sn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!bn.length&&sn.createElement(qe.Z,null)))},en={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"},Nn=ve(89070),Mn=({dataSource:Vn=[],value:bn,onChange:Mt,className:Ot,style:Ve={},tabBarExtraContent:Yt})=>ce.createElement("div",{className:yt()(en.tabs,Ot),style:Ve},ce.createElement("div",{className:en.tabsWrap},Vn.map((qt,xt)=>!(qt!=null&&qt.hide)&&ce.createElement("aside",{className:en.tab,onClick:()=>{Mt(qt.id),qt.link&&Nn.history.push(qt.link)},key:xt},ce.createElement("div",{className:bn===qt.id?en.active:""},qt.name),(qt==null?void 0:qt.resetCount)==null&&(qt==null?void 0:qt.total)!==void 0&&ce.createElement("span",null,"\uFF08",qt==null?void 0:qt.total,"\uFF09"),(qt==null?void 0:qt.resetCount)!==void 0&&(qt==null?void 0:qt.total)!==void 0&&ce.createElement(Ie.Z,{title:(qt==null?void 0:qt.tip)!=null?qt==null?void 0:qt.tip:""},ce.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ce.createElement("span",{style:{color:"#000"}},qt==null?void 0:qt.resetCount),"/",ce.createElement("span",null,qt==null?void 0:qt.total),"\uFF09"))))),ce.createElement("div",{className:en.tabBar},Yt)),Ln=({className:Vn,style:bn={},children:Mt})=>ce.createElement("div",{className:yt()(Vn),style:bn},Mt),Un={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"},Zt=ve(38854),tn=ve(20834);const Rt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ut=({sortValue:Vn,dropValue:bn,className:Mt,onSort:Ot,onDrop:Ve,dataSource:Yt=Rt})=>{var qt;return ce.createElement("div",{className:yt()(Un.orderWrap,Mt)},ce.createElement(Zt.Z,{dropdownRender:()=>ce.createElement(tn.default,null,Yt.map((xt,nt)=>ce.createElement(tn.default.Item,{key:nt,onClick:()=>Ve(xt.id)},xt.name)))},ce.createElement("span",{className:Un.orderTextWrap},(qt=Yt.find(xt=>bn===xt.id))==null?void 0:qt.name)),ce.createElement("span",{className:Un.orderIconWrap},ce.createElement("span",{className:Un.orderAsc},ce.createElement("i",{className:Vn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Un.cursorPointer} ${Un.active}`:`iconfont icon-sanjiaoxing-up font12 ${Un.cursorPointer}`,onClick:()=>Ot(Vn==="asc"?"desc":"asc")})),ce.createElement("span",{className:Un.orderDesc},ce.createElement("i",{className:Vn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Un.cursorPointer} ${Un.active}`:`iconfont icon-sanjiaoxing-down font12 ${Un.cursorPointer}`,onClick:()=>Ot(Vn==="asc"?"desc":"asc")}))))},Ge={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"},Dt=ve(3113),Tt=Object.defineProperty,ot=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,xe=(Vn,bn,Mt)=>bn in Vn?Tt(Vn,bn,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Vn[bn]=Mt,Se=(Vn,bn)=>{for(var Mt in bn||(bn={}))et.call(bn,Mt)&&xe(Vn,Mt,bn[Mt]);if(ot)for(var Mt of ot(bn))Te.call(bn,Mt)&&xe(Vn,Mt,bn[Mt]);return Vn},Be=(Vn,bn)=>{var Mt={};for(var Ot in Vn)et.call(Vn,Ot)&&bn.indexOf(Ot)<0&&(Mt[Ot]=Vn[Ot]);if(Vn!=null&&ot)for(var Ot of ot(Vn))bn.indexOf(Ot)<0&&Te.call(Vn,Ot)&&(Mt[Ot]=Vn[Ot]);return Mt},_e=(Vn,bn,Mt)=>new Promise((Ot,Ve)=>{var Yt=nt=>{try{xt(Mt.next(nt))}catch(Kt){Ve(Kt)}},qt=nt=>{try{xt(Mt.throw(nt))}catch(Kt){Ve(Kt)}},xt=nt=>nt.done?Ot(nt.value):Promise.resolve(nt.value).then(Yt,qt);xt((Mt=Mt.apply(Vn,bn)).next())}),ft=Vn=>{var bn=Vn,{className:Mt,style:Ot,children:Ve,loading:Yt=!1,openLoading:qt,onClick:xt=()=>{},size:nt="middle",shape:Kt="round"}=bn,ln=Be(bn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[xn,On]=(0,ce.useState)(!1);return ce.createElement(Dt.ZP,Se({onClick:(0,ct.throttle)(St=>_e(void 0,null,function*(){qt&&On(!0);try{yield xt(St)}catch(gn){console.log("error",gn)}qt&&On(!1)}),2e3,{leading:!0,trailing:!1}),className:yt()(Ge.btn,Ge[`${nt}-${Kt}`],Mt),style:Ot,size:nt,shape:Kt,loading:xn||Yt},ln),Ve)},Xt={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"},Qt=({className:Vn,style:bn,children:Mt=null,onClick:Ot,title:Ve})=>ce.createElement("div",{className:yt()(Xt.head,Vn),style:bn},ce.createElement("span",{className:"primary-hover",onClick:Ot},ce.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ce.createElement("b",{title:Ve},Ve),ce.createElement("div",{className:Xt.node},Mt)),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:Vn=!0,confirmTitle:bn,confirmClick:Mt,cancelShow:Ot=!0,cancelTitle:Ve,cancelClick:Yt,className:qt,style:xt,confirmLoading:nt=!1})=>ce.createElement("div",{className:yt()(En.btns,qt),style:xt},Vn&&ce.createElement(Dt.ZP,{loading:nt,onClick:Mt,type:"primary",className:En.confirm},bn),Ot&&ce.createElement(Dt.ZP,{onClick:Yt,className:En.cancel},Ve)),Dn={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"},gi=({className:Vn,style:bn={},LeftContent:Mt,children:Ot,RightContent:Ve})=>ce.createElement("div",{className:yt()(Dn.fixedBottom,Vn),style:bn},ce.createElement("div",{className:Dn.wrap},ce.createElement("div",{className:Dn.left},Mt),ce.createElement("div",{className:Dn.center},Ot),ce.createElement("div",{className:Dn.right},Ve))),pi={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"},Yi=({className:Vn,style:bn={},dataSource:Mt=[]})=>ce.createElement("div",{className:yt()(pi.crumbs,Vn),style:bn},Mt.map((Ot,Ve)=>Ve<Mt.length-1?ce.createElement(ce.Fragment,{key:Ve},Ot.path||Ot.onClick?ce.createElement("span",{className:pi.hover,onClick:Ot!=null&&Ot.onClick?Ot.onClick:()=>Nn.history.push(Ot.path)},Ot.name):ce.createElement("span",null,Ot.name),ce.createElement("span",null,"\xA0",">","\xA0")):ce.createElement("span",{key:Ve,style:{color:"#5F6368"}},Ot.name))),Jn=ve(31797),Wn=Object.defineProperty,ti=Object.defineProperties,yi=Object.getOwnPropertyDescriptors,mi=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable,be=(Vn,bn,Mt)=>bn in Vn?Wn(Vn,bn,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Vn[bn]=Mt,ci=(Vn,bn)=>{for(var Mt in bn||(bn={}))dr.call(bn,Mt)&&be(Vn,Mt,bn[Mt]);if(mi)for(var Mt of mi(bn))mr.call(bn,Mt)&&be(Vn,Mt,bn[Mt]);return Vn},Hi=(Vn,bn)=>ti(Vn,yi(bn)),dn=(Vn,bn)=>{var Mt={};for(var Ot in Vn)dr.call(Vn,Ot)&&bn.indexOf(Ot)<0&&(Mt[Ot]=Vn[Ot]);if(Vn!=null&&mi)for(var Ot of mi(Vn))bn.indexOf(Ot)<0&&mr.call(Vn,Ot)&&(Mt[Ot]=Vn[Ot]);return Mt};const{Countdown:oi}=Jn.default;var Fi=Vn=>{var bn=Vn,{onChange:Mt}=bn,Ot=dn(bn,["onChange"]);const[Ve,Yt]=(0,ce.useState)(null);(0,ce.useEffect)(()=>{typeof Ve=="number"&&Ve>=0&&Mt(Ve)},[Ve]);const qt=xt=>{const nt=Math.floor(xt/1e3);Yt(nt)};return ce.createElement(oi,Hi(ci({},Ot),{onChange:qt}))}},58856:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return De}});var ce=ve(59301);function De(ze,wt){const Ze=(0,ce.useRef)();(0,ce.useEffect)(()=>{Ze.current=ze}),(0,ce.useEffect)(()=>{function ht(){Ze.current()}if(wt!==null){let Me=setInterval(ht,wt);return()=>clearInterval(Me)}},[wt])}},74440:function(Cn,un,ve){"use strict";ve.d(un,{h:function(){return ce}});var ce=(De=>(De[De.NOMATCH=-1]="NOMATCH",De[De.OK=0]="OK",De[De.TIMEOUT=2]="TIMEOUT",De[De.PODFAILURE=3]="PODFAILURE",De[De.COMPILEFAILURE=4]="COMPILEFAILURE",De[De.EXECUTEFAILURE=5]="EXECUTEFAILURE",De[De.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",De))(ce||{})},88264:function(Cn,un,ve){"use strict";ve.d(un,{H7:function(){return te},MK:function(){return Ae},MU:function(){return He},X6:function(){return mt},bM:function(){return ct},fi:function(){return ee},fu:function(){return yt},n4:function(){return he},rX:function(){return dt},vl:function(){return se},zO:function(){return st}});var ce=ve(99064),De=Object.defineProperty,ze=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,ht=(de,me,we)=>me in de?De(de,me,{enumerable:!0,configurable:!0,writable:!0,value:we}):de[me]=we,Me=(de,me)=>{for(var we in me||(me={}))wt.call(me,we)&&ht(de,we,me[we]);if(ze)for(var we of ze(me))Ze.call(me,we)&&ht(de,we,me[we]);return de};function yt(de,me){return(0,ce.U2)(`myproblems/${de}.json`,Me({hidePopLogin:!0},me||{}))}function ct(de,me){return(0,ce.v_)(`myproblems/${de}/code_submit.json`,me)}function He(de,me){return(0,ce.v_)(`myproblems/${de}/code_debug.json`,me)}function st(de,me){return me.language&&(me.language=encodeURIComponent(me.language)),(0,ce.U2)(`myproblems/${de}/submit_records.json`,me)}function mt(de){return(0,ce.U2)("myproblems/record_detail.json",{id:de})}function dt(de,me){return(0,ce.U2)(`myproblems/${de}/result.json`,{mode:me})}function Ae(de,me){return(0,ce.v_)(`myproblems/${de}/add_notes.json`,me)}function te(de,me){return(0,ce.v_)(`myproblems/${de}/restore_initial_code.json`,me)}function ee(de){return(0,ce.v_)(`myproblems/${de}/sync_code.json`)}function he(de,me){return(0,ce.v_)(`myproblems/${de}/update_code.json`,me)}function se(de,me){return(0,ce.v_)(`discusses/${de}/plus.json`,me)}},92744:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Mc}});var ce=ve(59301),De={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"},ze=ve(78241),wt=ve(6848),Ze=ve(3113),ht=ve(43418),Me=ve(5871),yt=ve(8591),ct=ve(92832),He=ve(28103),st=ve(24905),mt=ve(95237),dt=ve(43604),Ae=ve(58421),te=ve(60324),ee=Object.defineProperty,he=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,me=(Vt,Ht,Sn)=>Ht in Vt?ee(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,we=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))se.call(Ht,Sn)&&me(Vt,Sn,Ht[Sn]);if(he)for(var Sn of he(Ht))de.call(Ht,Sn)&&me(Vt,Sn,Ht[Sn]);return Vt};const Ne=Vt=>React.createElement("svg",we({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Vt),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 Fe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",Ie=ve(85149),je=ve(89070),Je=ve(955),Ke=ve(99064),gt=Object.defineProperty,Re=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Et=(Vt,Ht,Sn)=>Ht in Vt?gt(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,kt=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))At.call(Ht,Sn)&&Et(Vt,Sn,Ht[Sn]);if(Re)for(var Sn of Re(Ht))qe.call(Ht,Sn)&&Et(Vt,Sn,Ht[Sn]);return Vt};const Bt=Vt=>React.createElement("svg",kt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Vt),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 Gt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Ut=Object.defineProperty,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,cn=(Vt,Ht,Sn)=>Ht in Vt?Ut(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,sn=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))$e.call(Ht,Sn)&&cn(Vt,Sn,Ht[Sn]);if(lt)for(var Sn of lt(Ht))Nt.call(Ht,Sn)&&cn(Vt,Sn,Ht[Sn]);return Vt};const Ft=Vt=>React.createElement("svg",sn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Vt),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 $t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",en=ve(42678),Nn=ve(12290),fn=ve(65158),Mn=ve(10672),pt={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"},Ln=ve(59301),Un=Object.defineProperty,Zt=Object.defineProperties,tn=Object.getOwnPropertyDescriptors,Rt=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Ge=(Vt,Ht,Sn)=>Ht in Vt?Un(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,Dt=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))Lt.call(Ht,Sn)&&Ge(Vt,Sn,Ht[Sn]);if(Rt)for(var Sn of Rt(Ht))ut.call(Ht,Sn)&&Ge(Vt,Sn,Ht[Sn]);return Vt},Tt=(Vt,Ht)=>Zt(Vt,tn(Ht)),ot=(Vt,Ht)=>{var Sn={};for(var tt in Vt)Lt.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&Rt)for(var tt of Rt(Vt))Ht.indexOf(tt)<0&&ut.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const et=null,Te=(Vt,Ht)=>{var Sn=Vt,{globalSetting:tt,loading:Pn,dispatch:jr,isEdit:No,editData:Or}=Sn,zr=ot(Sn,["globalSetting","loading","dispatch","isEdit","editData"]);const[jo,po]=(0,ce.useState)(""),[Wo,ho]=(0,ce.useState)(""),[_i,Wi]=(0,ce.useState)([]),[Tr,Ar]=(0,ce.useState)(""),[ir,wr]=(0,ce.useState)(),[Lo,Ir]=(0,ce.useState)(!1),[er,lr]=(0,ce.useState)({}),[or,Oi]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{!Or||!No||(po(Or==null?void 0:Or.name),ho(Or==null?void 0:Or.analysis),wr(Or==null?void 0:Or.is_ordered),lr(Or),Ir(!0))},[Or]),(0,ce.useEffect)(()=>{if(!Lo)return;const Gi=Or==null?void 0:Or.standard_answer.map(Vr=>Vr==null?void 0:Vr.answer_text);Wi(Gi);const Ia=Or==null?void 0:Or.standard_answer.map(Vr=>Vr==null?void 0:Vr.score);Oi(Ia),Ir(!1)},[Lo]),(0,ce.useImperativeHandle)(Ht,()=>({onSave:Do,Clear:Yr}));const Do=()=>{let Gi=[],Ia=!1;return jo?(_i.forEach((Vr,_a)=>{Gi.push({position:_a+1,answer_text:[],score:or[_a]}),Vr==null||Vr.forEach((Is,ju)=>{Gi[_a].answer_text.push(Is),(!Is||!(0,Je.eR)(Is,1e4))&&(Ar(`${_a}-${ju}`),yt.ZP.info(Is?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Ia=!0)})}),Ia?!1:(Gi==null?void 0:Gi.length)>20?(yt.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:jo,analysis:Wo,standard_answers:Gi,is_ordered:ir,downcase:er==null?void 0:er.downcase,no_space:er==null?void 0:er.no_space,use_blank_score:er==null?void 0:er.use_blank_score}):(yt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},Yr=()=>{po(""),ho(""),Wi([]),wr(!1)},ko=(Gi,Ia,Vr)=>{const _a=_i.slice();if(Ia&&_a.splice(Gi,Ia),Vr)for(let Is=0;Is<Vr;Is++)_a.splice(Gi+Is,0,[""]);Wi(_a)},Yo=(Gi,Ia,Vr)=>{Ar("");let _a=_i.slice();_a[Gi][Ia]=Vr,Wi(_a)},Er=Gi=>{let Ia=_i.slice();Ia[Gi]=[...Ia[Gi],""],Wi(Ia)},Oo=(Gi,Ia)=>{let Vr=_i.slice();if(!Vr[Gi][Ia]){Vr[Gi]=Vr[Gi].filter((_a,Is)=>Is!==Ia),Wi(Vr);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:pt.modal,onOk:()=>{Vr[Gi]=Vr[Gi].filter((_a,Is)=>Is!==Ia),Wi(Vr)}})},Ns=Gi=>{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:pt.modal,onOk:()=>{let Ia=_i.slice();Ia=_i.filter((Vr,_a)=>Gi!==_a),Wi(Ia)}})};return Ln.createElement("section",{className:pt.wrap},Ln.createElement("p",{className:pt.titleWrap},Ln.createElement("span",{className:pt.required},"*"),Ln.createElement("span",{className:pt.title},"\u9898\u5E72\uFF1A")),Ln.createElement("div",null,Ln.createElement(fn.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:jo,onChange:Gi=>po(Gi),showNullButton:!0,onPlaceholderChange:ko})),Ln.createElement("div",{className:"mt20"},_i.map((Gi,Ia)=>Ln.createElement("div",{style:{display:"flex"}},Ln.createElement("div",{style:{flex:1}},Ln.createElement(Mn.Z,{key:Ia,answers:Gi,index:Ia,flex:1,is_md:!0,activeOptionErrorIndex:Tr,onAnswerChange:Yo,addChildAnswer:Er,deleteChildAnswer:Oo,deleteChildAnswermain:Ns})),er.use_blank_score&&Ln.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},Ln.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",Ln.createElement(Me.Z,{style:{width:"100px"},size:"large",defaultValue:or[Ia],onBlur:Vr=>{or[Ia]=Vr.target.value,Oi([...or])}}))))),Ln.createElement("div",null,Ln.createElement(st.default,{className:`${pt.color333} font14 mt20`,checked:er.use_blank_score,onChange:Gi=>lr(Tt(Dt({},er),{use_blank_score:Gi.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),Ln.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")),Ln.createElement("div",null,Ln.createElement(st.default,{className:`${pt.color333} font14 mt20`,checked:er.downcase,onChange:Gi=>lr(Tt(Dt({},er),{downcase:Gi.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Ln.createElement("div",null,Ln.createElement(st.default,{className:`${pt.color333} font14 mt20`,checked:er.no_space,onChange:Gi=>lr(Tt(Dt({},er),{no_space:Gi.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),Ln.createElement("div",{className:"mt20"},(_i==null?void 0:_i.length)>1&&Ln.createElement("span",null,Ln.createElement(st.default,{checked:ir,onChange:Gi=>wr(Gi.target.checked),className:`${pt.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),Ln.createElement("span",{className:`${pt.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"))),Ln.createElement("p",{className:pt.titleWrap},Ln.createElement("span",{className:pt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Ln.createElement(Nn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Wo,onChange:Gi=>ho(Gi)}))};var xe=(0,je.connect)(({loading:Vt,globalSetting:Ht})=>({globalSetting:Ht,loading:Vt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(Te)),Se=ve(5112),Be=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,ft=(Vt,Ht)=>{var Sn={};for(var tt in Vt)_e.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&Be)for(var tt of Be(Vt))Ht.indexOf(tt)<0&&Ee.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const Xt=null,an=(Vt,Ht)=>{var Sn=Vt,{globalSetting:tt,loading:Pn,editData:jr,dispatch:No,onRef:Or=()=>{},isEdit:zr}=Sn,jo=ft(Sn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[po,Wo]=(0,ce.useState)(),[ho,_i]=(0,ce.useState)(""),[Wi,Tr]=(0,ce.useState)("");(0,ce.useEffect)(()=>{if(!jr||!zr)return;_i(jr==null?void 0:jr.name),Tr(jr==null?void 0:jr.analysis);const wr=jr==null?void 0:jr.choices.find(Lo=>Lo.is_answer);Wo(wr.choice_text==="\u6B63\u786E"?"0":"1")},[jr]),(0,ce.useImperativeHandle)(Ht,()=>({onSave:Ar,Clear:ir}));const Ar=()=>ho?po?{name:ho,choices:[{choice_text:"\u6B63\u786E",is_answer:po==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:po==="1"?1:0}],analysis:Wi}:(yt.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(yt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),ir=()=>{_i(""),Tr(""),Wo("")};return ce.createElement("section",{className:pt.wrap},ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u9898\u5E72\uFF1A")),ce.createElement(Nn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:ho,onChange:wr=>_i(wr)}),ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:pt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),ce.createElement(Se.ZP.Group,{buttonStyle:"solid",value:po,onChange:wr=>Wo(wr.target.value)},ce.createElement(Se.ZP.Button,{value:"0",className:`${pt.radio} mr40`},"\u6B63\u786E"),ce.createElement(Se.ZP.Button,{value:"1",className:pt.radio},"\u9519\u8BEF")),ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Nn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Wi,onChange:wr=>Tr(wr)}))};var Qt=(0,je.connect)(({loading:Vt,globalSetting:Ht})=>({globalSetting:Ht,loading:Vt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(an)),En=Object.getOwnPropertySymbols,Yn=Object.prototype.hasOwnProperty,zn=Object.prototype.propertyIsEnumerable,Dn=(Vt,Ht)=>{var Sn={};for(var tt in Vt)Yn.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&En)for(var tt of En(Vt))Ht.indexOf(tt)<0&&zn.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const ii=null,gi=(Vt,Ht)=>{var Sn=Vt,{globalSetting:tt,loading:Pn,editData:jr,dispatch:No,onRef:Or=()=>{},isEdit:zr}=Sn,jo=Dn(Sn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[po,Wo]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{var Tr;if(!jr||!zr)return;const Ar=(Tr=jr==null?void 0:jr.shixun)==null?void 0:Tr.challenges.map(ir=>({id:ir==null?void 0:ir.id,score:ir.score}));Wo(Ar)},[jr]),(0,ce.useImperativeHandle)(Ht,()=>({onSave:ho,Clear:_i}));const ho=()=>({challenges:[...po]}),_i=()=>{Wo([])};console.log("editData--",jr);const Wi=Tr=>{var Ar,ir;return ce.createElement("div",null,(ir=(Ar=Tr==null?void 0:Tr.shixun)==null?void 0:Ar.challenges)==null?void 0:ir.map((wr,Lo)=>{var Ir;return ce.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},ce.createElement("div",null,ce.createElement("span",{className:"mr5"},"\u7B2C",Lo+1,"\u5173"),ce.createElement(wt.Z,{key:Lo,title:wr==null?void 0:wr.challenge_name},ce.createElement("span",null,(0,Je.Pq)(wr==null?void 0:wr.challenge_name,44)))),ce.createElement("p",{style:{marginBottom:0}},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u5206\u503C\uFF1A"),ce.createElement(Me.Z,{precision:1,min:1,max:100,className:pt.baseFormItem,style:{width:176},value:(Ir=po.find(er=>er.id===wr.id))==null?void 0:Ir.score,onChange:er=>{po.find(lr=>lr.id===wr.id).score=er,Wo([...po])}})))}),ce.createElement("div",{style:{clear:"both"}}))};return ce.createElement("section",{className:pt.wrap},ce.createElement(Ie.Z,{style:{paddingRight:10},className:pt.titleHtml,value:`${jr==null?void 0:jr.position}\u3001${jr==null?void 0:jr.name}`}),ce.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u5173\u5361")),Wi(jr))};var pi=(0,je.connect)(({loading:Vt,globalSetting:Ht})=>({globalSetting:Ht,loading:Vt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(gi)),Ii=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,Wn=(Vt,Ht)=>{var Sn={};for(var tt in Vt)Yi.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&Ii)for(var tt of Ii(Vt))Ht.indexOf(tt)<0&&Jn.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const ti=["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"],yi=(Vt,Ht)=>{var Sn=Vt,{editData:tt,globalSetting:Pn,loading:jr,dispatch:No,onRef:Or=()=>{},isEdit:zr}=Sn,jo=Wn(Sn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[po,Wo]=(0,ce.useState)([]),[ho,_i]=(0,ce.useState)(),[Wi,Tr]=(0,ce.useState)([]),[Ar,ir]=(0,ce.useState)(""),[wr,Lo]=(0,ce.useState)("");(0,ce.useEffect)(()=>{Wo(["","","",""])},[]),(0,ce.useEffect)(()=>{if(!tt||!zr)return;ir(tt==null?void 0:tt.name),Lo(tt==null?void 0:tt.analysis),Wo(tt==null?void 0:tt.choices.map(or=>or.choice_text));const lr=[];tt==null||tt.choices.map((or,Oi)=>{or.is_answer&&lr.push(Oi)}),Tr(lr)},[tt]),(0,ce.useImperativeHandle)(Ht,()=>({onSave:Ir,Clear:er}));const Ir=()=>{if(!Ar)return yt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const lr=po.findIndex(Oi=>!Oi);if(lr>-1)return yt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${ti[lr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Wi.length)return yt.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(Wi.length<2)return yt.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const or=po.map((Oi,Do)=>({choice_text:Oi,is_answer:Wi.includes(Do)?1:0}));return{name:Ar,choices:or,analysis:wr}},er=()=>{Wo(["","","",""]),ir(""),Lo(""),Tr("")};return ce.createElement("section",{className:pt.wrap},ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u9898\u5E72\uFF1A")),ce.createElement(Nn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ar,onChange:lr=>ir(lr)}),ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:pt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),po.map((lr,or)=>ce.createElement("div",{className:pt.choiceWrap,key:or},ce.createElement(wt.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ce.createElement("div",{className:`${pt.answer} ${Wi.includes(or)?pt.activeAnswer:""}`,onClick:()=>{Wi.includes(or)?Tr(Wi.filter(Oi=>Oi!==or)):Tr([...Wi,or])}},ti[or])),ce.createElement("div",{className:pt.editorWrap},ho===or?ce.createElement(Nn.Z,{id:`single-question-option-${or}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:lr,onChange:Oi=>{po[or]=Oi,Wo(po)}}):ce.createElement("div",{className:pt.htmlWrap,onClick:()=>_i(or)},ce.createElement(Ie.Z,{value:lr}))),or>1&&ce.createElement(wt.Z,{title:"\u5220\u9664"},ce.createElement("i",{className:`${pt.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Wo(po.filter((Oi,Do)=>Do!==or)),Wi.includes(or)?Tr(Wi.filter(Oi=>Oi!==or)):Tr([...Wi,or])}})),or<7&&or===po.length-1&&ce.createElement(wt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ce.createElement("i",{className:`${pt.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Wo([...po,""])})))),ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Nn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:wr,onChange:lr=>Lo(lr)}))};var mi=(0,je.connect)(({loading:Vt,globalSetting:Ht})=>({globalSetting:Ht,loading:Vt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(yi)),dr=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,ci=(Vt,Ht)=>{var Sn={};for(var tt in Vt)mr.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&dr)for(var tt of dr(Vt))Ht.indexOf(tt)<0&&be.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const Hi=["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"],dn=(Vt,Ht)=>{var Sn=Vt,{editData:tt,globalSetting:Pn,loading:jr,dispatch:No,onRef:Or=()=>{},isEdit:zr}=Sn,jo=ci(Sn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[po,Wo]=(0,ce.useState)([]),[ho,_i]=(0,ce.useState)(),[Wi,Tr]=(0,ce.useState)(),[Ar,ir]=(0,ce.useState)(""),[wr,Lo]=(0,ce.useState)("");(0,ce.useEffect)(()=>{Wo(["","","",""])},[]),(0,ce.useEffect)(()=>{if(!tt||!zr)return;const lr=[],or=[];tt==null||tt.choices.forEach((Oi,Do)=>{lr.push(Oi.choice_text),Oi.is_answer&&or.push(Do)}),ir(tt==null?void 0:tt.name),Lo(tt==null?void 0:tt.analysis),Wo(lr),Tr(or)},[tt]),(0,ce.useImperativeHandle)(Ht,()=>({onSave:Ir,Clear:er}));const Ir=()=>{if(!Ar)return yt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const lr=po.findIndex(Oi=>!Oi);if(lr>-1)return yt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Hi[lr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(Wi))return yt.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 or=po.map((Oi,Do)=>({choice_text:Oi,is_answer:Wi.includes(Do)?1:0}));return{name:Ar,choices:or,analysis:wr}},er=()=>{Wo(["","","",""]),ir(""),Lo(""),Tr("")};return ce.createElement("section",{className:pt.wrap},ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u9898\u5E72\uFF1A")),ce.createElement(Nn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ar,onChange:lr=>ir(lr)}),ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.required},"*"),ce.createElement("span",{className:pt.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:pt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),po.map((lr,or)=>ce.createElement("div",{className:pt.choiceWrap,key:or},ce.createElement(wt.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ce.createElement("div",{className:`${pt.answer} ${Wi!=null&&Wi.includes(or)?pt.activeAnswer:""}`,onClick:()=>Tr([or])},Hi[or])),ce.createElement("div",{className:pt.editorWrap},ho===or?ce.createElement(Nn.Z,{id:`single-question-option-${or}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:lr,onChange:Oi=>{po[or]=Oi,Wo(po)}}):ce.createElement("div",{className:pt.htmlWrap,onClick:()=>_i(or)},ce.createElement(Ie.Z,{value:lr}))),or>1&&ce.createElement(wt.Z,{title:"\u5220\u9664"},ce.createElement("i",{className:`${pt.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Wo(po.filter((Oi,Do)=>Do!==or)),or===Wi&&Tr(null)}})),or<7&&or===po.length-1&&ce.createElement(wt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ce.createElement("i",{className:`${pt.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Wo([...po,""])})))),ce.createElement("p",{className:pt.titleWrap},ce.createElement("span",{className:pt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Nn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:wr,onChange:lr=>Lo(lr)}))};var oi=(0,je.connect)(({loading:Vt,globalSetting:Ht})=>({globalSetting:Ht,loading:Vt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(dn)),vi=ve(12563),Fi=ve(78673),Vn=ve(61485),bn=ve(59301),Mt=Object.defineProperty,Ot=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Yt=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,nt=(Vt,Ht,Sn)=>Ht in Vt?Mt(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,Kt=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))qt.call(Ht,Sn)&&nt(Vt,Sn,Ht[Sn]);if(Yt)for(var Sn of Yt(Ht))xt.call(Ht,Sn)&&nt(Vt,Sn,Ht[Sn]);return Vt},ln=(Vt,Ht)=>Ot(Vt,Ve(Ht)),xn=(Vt,Ht)=>{var Sn={};for(var tt in Vt)qt.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&Yt)for(var tt of Yt(Vt))Ht.indexOf(tt)<0&&xt.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn},On=(Vt,Ht,Sn)=>new Promise((tt,Pn)=>{var jr=zr=>{try{Or(Sn.next(zr))}catch(jo){Pn(jo)}},No=zr=>{try{Or(Sn.throw(zr))}catch(jo){Pn(jo)}},Or=zr=>zr.done?tt(zr.value):Promise.resolve(zr.value).then(jr,No);Or((Sn=Sn.apply(Vt,Ht)).next())});const St=Vt=>{if(!Vt)return!1;if(/^s*$/.test(Vt)||Vt.trim()===""){yt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Ht=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 Vt==="|"?(yt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},gn=({value:Vt=[],onClose:Ht})=>bn.createElement(vi.default,{closable:!0,onClose:Ht,className:pt.keywordTag},bn.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Vt.join(" \u6216 "))),Rn=(Vt,Ht)=>{var Sn=Vt,{editData:tt,globalSetting:Pn,loading:jr,dispatch:No,onRef:Or=()=>{},isEdit:zr}=Sn,jo=xn(Sn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[po,Wo]=(0,ce.useState)(""),[ho,_i]=(0,ce.useState)(""),[Wi,Tr]=(0,ce.useState)(""),[Ar,ir]=(0,ce.useState)(""),[wr]=ze.default.useForm(),Lo=ze.default.useWatch("use_keywords",wr);(0,ce.useEffect)(()=>{var or;!tt||!zr||(Wo(tt==null?void 0:tt.name),_i(tt==null?void 0:tt.analysis),Tr((or=tt==null?void 0:tt.answer_texts)==null?void 0:or[0]),wr.setFieldsValue(Kt({},tt)))},[tt]),(0,ce.useImperativeHandle)(Ht,()=>({onSave:Ir,Clear:er}));const Ir=()=>On(void 0,null,function*(){if(!po)return yt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield wr.validateFields()}catch(Oi){yt.ZP.error(Oi.errorFields[0].errors[0]);return}const or=wr.getFieldsValue();return console.log(or,"values"),Kt({name:po,answer_texts:[Wi],analysis:ho},or)}),er=()=>{Wo(""),_i(""),Tr(""),wr.resetFields()},lr=tt==null?void 0:tt.score;return bn.createElement("section",{className:pt.wrap},bn.createElement("p",{className:pt.titleWrap},bn.createElement("span",{className:pt.required},"*"),bn.createElement("span",{className:pt.title},"\u9898\u5E72\uFF1A")),bn.createElement(Nn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:po,onChange:or=>Wo(or)}),bn.createElement("p",{className:pt.titleWrap},bn.createElement("span",{className:pt.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),bn.createElement(Nn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Wi,onChange:or=>Tr(or)}),bn.createElement("p",{className:pt.titleWrap},bn.createElement("span",{className:pt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),bn.createElement(Nn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:ho,onChange:or=>_i(or)}),bn.createElement(ze.default,{form:wr,size:"large",onFinishFailed:or=>On(void 0,null,function*(){var Oi,Do;yt.ZP.error(or.errorFields[0].errors[0]),wr.scrollToField((Do=(Oi=or==null?void 0:or.errorFields)==null?void 0:Oi[0])==null?void 0:Do.name,{behavior:"smooth",block:"center"})})},bn.createElement(mt.Z,{align:"middle",className:"mb30 mt20"},bn.createElement(ze.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},bn.createElement(Fi.Z,null)),bn.createElement(dt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),bn.createElement(dt.Z,null,bn.createElement(wt.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"},bn.createElement(Vn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),Lo&&bn.createElement(ze.default.List,{name:"keywords",rules:[{validator(or,Oi){return Oi!=null&&Oi.length?(Oi==null?void 0:Oi.reduce((Yr,ko)=>Yr+ko.score,0))>parseFloat(lr)?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"))}}]},(or,{add:Oi,remove:Do})=>bn.createElement(bn.Fragment,null,bn.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),bn.createElement(mt.Z,{align:"middle",className:"font14 mb30"},bn.createElement(dt.Z,{flex:1},bn.createElement(ct.default,{value:Ar,onChange:Yr=>{ir(Yr.target.value)},maxLength:50,allowClear:!0,onPressEnter:Yr=>{var ko,Yo,Er,Oo;const Ns=`${(ko=Yr.target)==null?void 0:ko.value}`,Gi=(Er=(Yo=Ns==null?void 0:Ns.split("|"))==null?void 0:Yo.filter(_a=>!!_a))==null?void 0:Er.map(_a=>_a==null?void 0:_a.trim()),Ia=wr.getFieldValue("keywords"),Vr=((Oo=Ia==null?void 0:Ia.map(_a=>_a==null?void 0:_a.keyword))==null?void 0:Oo.flat())||[];for(const _a of Gi)if(Vr.includes(_a)){yt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}St(Ns)&&(Oi({keyword:Gi,score:1}),ir(""))},className:pt.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"})),bn.createElement(dt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),or.map(Yr=>{var ko=Yr,{key:Yo,name:Er}=ko,Oo=xn(ko,["key","name"]);return bn.createElement(mt.Z,{key:Yo,style:{marginRight:148}},bn.createElement(dt.Z,{flex:1},bn.createElement(mt.Z,{align:"middle",justify:"space-between"},bn.createElement(ze.default.Item,ln(Kt({},Oo),{name:[Er,"keyword"]}),bn.createElement(gn,{onClose:()=>Do(Er)})),bn.createElement(ze.default.Item,ln(Kt({},Oo),{name:[Er,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),bn.createElement(Me.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var ai=(0,je.connect)(({loading:Vt,globalSetting:Ht})=>({globalSetting:Ht,loading:Vt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(Rn)),hn=ve(36381),Jt={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"},Xn=ve(32134),si=ve(12893),ui=Object.defineProperty,Qn=Object.defineProperties,di=Object.getOwnPropertyDescriptors,hi=Object.getOwnPropertySymbols,Ri=Object.prototype.hasOwnProperty,Xi=Object.prototype.propertyIsEnumerable,tr=(Vt,Ht,Sn)=>Ht in Vt?ui(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,yn=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))Ri.call(Ht,Sn)&&tr(Vt,Sn,Ht[Sn]);if(hi)for(var Sn of hi(Ht))Xi.call(Ht,Sn)&&tr(Vt,Sn,Ht[Sn]);return Vt},Br=(Vt,Ht)=>Qn(Vt,di(Ht)),br=(Vt,Ht)=>{var Sn={};for(var tt in Vt)Ri.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&hi)for(var tt of hi(Vt))Ht.indexOf(tt)<0&&Xi.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const Wr=Vt=>{var Ht=Vt,{value:Sn,onChange:tt,scrollId:Pn}=Ht,jr=br(Ht,["value","onChange","scrollId"]);return ce.createElement("div",{id:Pn||""},ce.createElement(Nn.Z,Br(yn({},jr),{defaultValue:Sn,onChange:(No,Or)=>{Or!=null&&Or.length?tt(No,Or):tt(No)}})))},mn=({value:Vt,onChange:Ht,placeholder:Sn,height:tt=140,isEdit:Pn})=>Pn?ce.createElement(Nn.Z,{watch:!0,isFocus:!0,height:tt,placeholder:Sn,defaultValue:Vt,onChange:Ht}):ce.createElement("div",{style:{cursor:"pointer"}},Vt?ce.createElement(Ie.Z,{className:Jt.inputBorder,value:Vt}):ce.createElement("div",{className:`${Jt.inputBorder} ${Jt.placeholder}`},Sn));var _n=ve(59301),Si=Object.defineProperty,zi=Object.defineProperties,Ni=Object.getOwnPropertyDescriptors,ji=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,nr=(Vt,Ht,Sn)=>Ht in Vt?Si(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,hr=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))ar.call(Ht,Sn)&&nr(Vt,Sn,Ht[Sn]);if(ji)for(var Sn of ji(Ht))Qi.call(Ht,Sn)&&nr(Vt,Sn,Ht[Sn]);return Vt},An=(Vt,Ht)=>zi(Vt,Ni(Ht)),Jr=(Vt,Ht)=>{var Sn={};for(var tt in Vt)ar.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&ji)for(var tt of ji(Vt))Ht.indexOf(tt)<0&&Qi.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const Bn=["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"],_r=({value:Vt,onChange:Ht,choiceTextKey:Sn,answerKey:tt,index:Pn,isEdit:jr,setInputActive:No,form:Or,choiceOptionsPath:zr,allowChangeMode:jo,showAddIcon:po,addItem:Wo,deleteItem:ho})=>{const _i=(Vt==null?void 0:Vt[tt])===!0,Wi=()=>{const Ar=Or.getFieldValue(zr);Or.setFieldValue(zr,Ar.map(ir=>An(hr({},ir),{[tt]:!1})))},Tr=()=>{_i?Ht(An(hr({},Vt),{[tt]:!1})):(jo||Wi(),Ht(An(hr({},Vt),{[tt]:!0})))};return _n.createElement(mt.Z,{className:Jt.choiceWrap,align:"middle",wrap:!1},_n.createElement(dt.Z,{onClick:Tr,className:`${Jt.choiceIndex} ${_i?Jt.activeAnswer:""}`},Bn[Pn]),_n.createElement(dt.Z,{flex:1,className:`${Jt.editorWrap} ml15`,onClick:No},_n.createElement(mn,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:jr,value:Vt==null?void 0:Vt[Sn],onChange:Ar=>{Ht(An(hr({},Vt),{[Sn]:Ar}))}})),_n.createElement(dt.Z,{flex:"0 0 auto",className:"ml15"},_n.createElement("div",{onClick:Tr,className:`${Jt.setAnswerBtn} ${_i?Jt.activeAnswer:""}`},_i?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),_n.createElement(dt.Z,{className:Jt.actionWrapper},_n.createElement(wt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},_n.createElement(Xn.Z,{className:Jt.addIcon,onClick:Wo,style:{visibility:po?"visible":"hidden"}})),_n.createElement(wt.Z,{title:"\u5220\u9664"},_n.createElement(si.Z,{className:Jt.deleteIcon,onClick:ho,style:{visibility:Pn>1?"visible":"hidden"}}))))},co=({questionTitlePlaceholder:Vt,titleKey:Ht,choiceKey:Sn,analysisKey:tt,choiceTextKey:Pn,answerKey:jr,choiceOptionsPath:No,allowChangeMode:Or=!0,form:zr,showAnalysis:jo=!0})=>{const[po,Wo]=(0,ce.useState)(),[ho,_i]=(0,ce.useState)(!1);return _n.createElement("div",{className:Jt.wrap},_n.createElement("div",{className:Jt.questionTitleEditorWrap},_n.createElement(ze.default.Item,{label:"\u9898\u5E72",name:Ht,labelCol:{span:24},rules:[{required:!0}]},_n.createElement(Wr,{scrollId:Array.isArray(Ht)?Ht.join("_"):`${Ht}`,watch:!0,height:140,placeholder:Vt}))),_n.createElement(ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),_n.createElement(ze.default.List,{name:Sn,rules:[{validator(Wi,Tr){const Ar=Tr.some(wr=>wr[jr]),ir=Tr.findIndex(wr=>{var Lo;return((Lo=wr[Pn])==null?void 0:Lo.length)<=0});return ir!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Bn[ir]}\u9009\u9879\u7684\u5185\u5BB9`)):Ar?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Wi,{add:Tr,remove:Ar})=>_n.createElement("div",{id:Array.isArray(No)?No.join("_"):`${No}`},Wi.map((ir,wr)=>{var Lo=ir,{key:Ir,name:er}=Lo,lr=Jr(Lo,["key","name"]);const or=po===Ir,Oi=()=>{Wo(Ir)},Do=wr<7&&wr===Wi.length-1,Yr=()=>Tr({[Pn]:"",[jr]:0}),ko=()=>Ar(er);return _n.createElement(ze.default.Item,An(hr({},lr),{key:Ir,name:er,noStyle:!0}),_n.createElement(_r,{choiceTextKey:Pn,answerKey:jr,index:wr,isEdit:or,setInputActive:Oi,form:zr,choiceOptionsPath:No,allowChangeMode:Or,showAddIcon:Do,addItem:Yr,deleteItem:ko}))}),Wi.length<8&&_n.createElement("div",{className:`${Jt.addBtn} mb30`,onClick:()=>Tr({[Pn]:"",[jr]:0})},"\u6DFB\u52A0\u9009\u9879"))),jo&&_n.createElement("div",{onClick:()=>_i(!0)},_n.createElement(ze.default.Item,{name:tt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},_n.createElement(mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ho}))))};var Bi=ve(59301),Po=Object.defineProperty,ao=Object.defineProperties,Ki=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,Zr=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable,wi=(Vt,Ht,Sn)=>Ht in Vt?Po(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,Qe=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))Zr.call(Ht,Sn)&&wi(Vt,Sn,Ht[Sn]);if(qi)for(var Sn of qi(Ht))ro.call(Ht,Sn)&&wi(Vt,Sn,Ht[Sn]);return Vt},uo=(Vt,Ht)=>ao(Vt,Ki(Ht)),Zo=(Vt,Ht)=>{var Sn={};for(var tt in Vt)Zr.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&qi)for(var tt of qi(Vt))Ht.indexOf(tt)<0&&ro.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const ga=({value:Vt,onChange:Ht})=>{const Sn=Pn=>{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:Jt.modal,onOk:()=>{const jr=[...Vt];jr.splice(Pn,1),Ht(jr)}})},tt=()=>{const Pn=[...Vt];Pn.push(""),Ht(Pn)};return Bi.createElement(mt.Z,{align:"middle",className:"ml20",gutter:[40,20]},Vt==null?void 0:Vt.map((Pn,jr)=>Bi.createElement(dt.Z,{key:`${Pn}_${jr}`,className:Jt.blankWrapper},Bi.createElement(ct.default,{className:Jt.blankInput,defaultValue:Pn,maxLength:1e3,onBlur:No=>{const Or=[...Vt],zr=No.target.value.trim();Or[jr]=zr,Ht(Or)}}),Bi.createElement(wt.Z,{title:"\u5220\u9664"},Bi.createElement(si.Z,{className:Jt.deleteIcon,style:{marginLeft:15,visibility:jr>0?"visible":"hidden"},onClick:()=>Sn(jr)})))),Bi.createElement(dt.Z,null,Bi.createElement("div",{className:`${Jt.addBtn}`,onClick:()=>{tt()}},"\u65B0\u589E\u7B54\u6848")))},Pa=({value:Vt=!0,onChange:Ht})=>Bi.createElement(Fi.Z,{checked:!Vt,onChange:Sn=>{Ht(!Sn)}}),ia="\u2581",Dr=({questionTitlePlaceholder:Vt,form:Ht,name:Sn,scoreByBlank:tt="use_blank_score",answerKey:Pn,titleKey:jr="name",analysisKey:No="analysis",isOrdered:Or="is_ordered"})=>{var zr,jo;const[po,Wo]=(0,ce.useState)(!1),ho=(Ir,er)=>{const lr=er.line;let or=0;for(let Do=0;Do<lr;Do++)or+=Ir.getLine(Do).split(ia).length-1;const Oi=Ir.getLine(lr).substring(0,er.ch);return or+=Oi.split(ia).length-1,or},_i=(Ir,er,lr,or)=>{const Oi=Ir.getRange(er.from,er.to);let Do=0;if(er.text.forEach(Yr=>{Do+=Yr.split(ia).length-1}),er.origin!=="setValue"){if(Oi&&Oi.indexOf(ia)!==-1){const Yr=Oi.split(ia).length-1,ko=ho(Ir,er.from);if(console.log(`\u5220\u9664${Yr}\u4E2A\uFF0C \u524D\u9762\u6709${ko}\u4E2A\uFF0C\u65B0\u589E${Do}\u4E2A`),Yr>1){const Yo=Array.from({length:Yr},(Er,Oo)=>ko+Oo);or(Yo)}else or(ko)}else if(Do>0){const Yr=ho(Ir,er.from);console.log(`\u65B0\u589E${Do}\u4E2A\uFF0C\u4E4B\u524D\u6709${Yr}\u4E2A`),lr(Do,Yr)}}},Wi=()=>{const Ir=Ht.getFieldValue(["sub_item_banks",...Pn]);Ht.setFieldValue(["sub_item_banks",...Pn],Ir==null?void 0:Ir.map((er,lr)=>uo(Qe({},er),{position:lr+1})))},Tr=(0,ce.useRef)(),Ar=(Ir,er)=>{for(let lr=0;lr<Ir;lr++)Tr.current({position:null,answer_text:[""]},er+lr);Wi()},ir=(0,ce.useRef)(),wr=Ir=>{ir.current(Ir),Wi()},Lo=(jo=(zr=Ht.getFieldValue("sub_item_banks"))==null?void 0:zr[Pn==null?void 0:Pn[0]])==null?void 0:jo[Pn==null?void 0:Pn[1]];return Bi.createElement("div",{className:Jt.wrap},Bi.createElement("div",{className:Jt.questionTitleEditorWrap},Bi.createElement(ze.default.Item,{label:"\u9898\u5E72",name:jr,labelCol:{span:24},rules:[{required:!0}]},Bi.createElement(Wr,{scrollId:"name",watch:!0,height:140,placeholder:Vt,showNullButton:!0,onCMBeforeChange:(Ir,er)=>{_i(Ir,er,Ar,wr)}}))),Bi.createElement(ze.default.List,{name:Pn,rules:[{validator(Ir,er){if((er==null?void 0:er.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const lr of er){const{answer_text:or}=lr||{};if(or!=null&&or.some(Oi=>(Oi==null?void 0:Oi.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Ir,{add:er,remove:lr},{errors:or})=>(Tr.current=er,ir.current=lr,Bi.createElement(Bi.Fragment,null,Bi.createElement(ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ir.map((Oi,Do)=>{var Yr=Oi,{key:ko,name:Yo}=Yr,Er=Zo(Yr,["key","name"]);return Bi.createElement(mt.Z,{className:"mb20",key:ko,align:"middle",wrap:!1},Bi.createElement(dt.Z,{flex:"0 0 auto",className:`${Jt.blankIndex}`},"\u586B\u7A7A\u9879",Do+1),Bi.createElement(dt.Z,{flex:1},Bi.createElement(mt.Z,{align:"top",justify:"space-between",wrap:!1},Bi.createElement(dt.Z,null,Bi.createElement(ze.default.Item,uo(Qe({},Er),{name:[Yo,"answer_text"],noStyle:!0}),Bi.createElement(ga,null))),(Ht==null?void 0:Ht.getFieldValue(["sub_item_banks",...tt]))&&Bi.createElement(dt.Z,{flex:"224px"},Bi.createElement(ze.default.Item,uo(Qe({},Er),{name:[Yo,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Jt.blankInputNumberWrapper}),Bi.createElement(Me.Z,{className:Jt.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),Bi.createElement(ze.default.Item,uo(Qe({},Er),{name:[Yo,"position"],noStyle:!0}),Bi.createElement(ct.default,{type:"hidden"}))))})))),Bi.createElement(mt.Z,{align:"middle"},Bi.createElement(ze.default.Item,{name:[Sn,"downcase"],valuePropName:"checked"},Bi.createElement(Fi.Z,null)),Bi.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Bi.createElement(mt.Z,{align:"middle"},Bi.createElement(ze.default.Item,{name:[Sn,"no_space"],valuePropName:"checked"},Bi.createElement(Fi.Z,null)),Bi.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Lo==null?void 0:Lo.length)>1&&Bi.createElement(mt.Z,{align:"middle",className:(Lo==null?void 0:Lo.length)>1?"mb30":`${Jt.hide}`},Bi.createElement(ze.default.Item,{name:Or},Bi.createElement(Pa,null)),Bi.createElement(dt.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")),Bi.createElement("div",{onClick:()=>Wo(!0)},Bi.createElement(ze.default.Item,{name:No,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Bi.createElement(mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:po}))))};var kr=Object.defineProperty,fo=Object.defineProperties,Rr=Object.getOwnPropertyDescriptors,To=Object.getOwnPropertySymbols,qa=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,sr=(Vt,Ht,Sn)=>Ht in Vt?kr(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,qn=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))qa.call(Ht,Sn)&&sr(Vt,Sn,Ht[Sn]);if(To)for(var Sn of To(Ht))Mr.call(Ht,Sn)&&sr(Vt,Sn,Ht[Sn]);return Vt},vr=(Vt,Ht)=>fo(Vt,Rr(Ht)),wo=(Vt,Ht)=>{var Sn={};for(var tt in Vt)qa.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&To)for(var tt of To(Vt))Ht.indexOf(tt)<0&&Mr.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const ua={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Bo=({value:Vt,onChange:Ht,form:Sn,choiceKey:tt})=>{const Pn=(Vt==null?void 0:Vt.is_answer)===!0,jr=Vt==null?void 0:Vt.choice_text,No=()=>{var Or;const zr=(Or=Sn==null?void 0:Sn.getFieldValue(["sub_item_banks",...tt]))==null?void 0:Or.map(jo=>({choice_text:jo==null?void 0:jo.choice_text,is_answer:!1}));Sn==null||Sn.setFieldValue(["sub_item_banks",...tt],zr),Ht(vr(qn({},Vt),{is_answer:!0}))};return ce.createElement(mt.Z,{className:Jt.choiceWrap,align:"middle",wrap:!1},ce.createElement(dt.Z,{onClick:No,className:`${Jt.choiceIndex} ${Jt.judgementIndex} ${Pn?Jt.activeAnswer:""}`},ua[jr]),ce.createElement(dt.Z,{flex:1,className:`${Jt.editorWrap} ml15`},ce.createElement("div",{className:`${Jt.inputBorder} ${Jt.placeholder} ${Pn?Jt.activeJudgementAnswer:""}`},jr)),ce.createElement(dt.Z,{flex:"0 0 auto",className:"ml15"},ce.createElement("div",{onClick:No,className:`${Jt.setAnswerBtn} ${Pn?Jt.activeAnswer:""}`},Pn?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},yo=({questionTitlePlaceholder:Vt,choiceKey:Ht="choices",form:Sn,titleKey:tt="name",analysisKey:Pn="analysis"})=>{const[jr,No]=(0,ce.useState)(!1);return ce.createElement("div",{className:Jt.wrap},ce.createElement("div",{className:Jt.questionTitleEditorWrap},ce.createElement(ze.default.Item,{label:"\u9898\u5E72",name:tt,labelCol:{span:24},rules:[{required:!0}]},ce.createElement(Wr,{scrollId:"name",watch:!0,height:140,placeholder:Vt}))),ce.createElement(ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},ce.createElement(ze.default.List,{name:Ht,rules:[{validator(Or,zr){return zr.some(po=>(po==null?void 0:po.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Or=>ce.createElement("div",{id:"choices"},Or.map(zr=>{var jo=zr,{key:po,name:Wo}=jo,ho=wo(jo,["key","name"]);return ce.createElement(ze.default.Item,vr(qn({},ho),{key:po,name:Wo,noStyle:!0}),ce.createElement(Bo,{form:Sn,choiceKey:Ht}))})))),ce.createElement("div",{onClick:()=>No(!0)},ce.createElement(ze.default.Item,{name:Pn,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:jr}))))};var ta=Object.defineProperty,na=Object.defineProperties,Ba=Object.getOwnPropertyDescriptors,ka=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,Oa=(Vt,Ht,Sn)=>Ht in Vt?ta(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,Vl=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))is.call(Ht,Sn)&&Oa(Vt,Sn,Ht[Sn]);if(ka)for(var Sn of ka(Ht))vn.call(Ht,Sn)&&Oa(Vt,Sn,Ht[Sn]);return Vt},Hs=(Vt,Ht)=>na(Vt,Ba(Ht)),wl=(Vt,Ht)=>{var Sn={};for(var tt in Vt)is.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&ka)for(var tt of ka(Vt))Ht.indexOf(tt)<0&&vn.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn};const Ma=Vt=>{var Ht=Vt,{value:Sn,onChange:tt}=Ht,Pn=wl(Ht,["value","onChange"]);const jr=No=>{tt([No])};return ce.createElement(Nn.Z,Hs(Vl({},Pn),{defaultValue:Sn==null?void 0:Sn[0],onChange:jr}))},yu=Vt=>{if(!Vt)return!1;let Ht=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 Vt==="|"?(yt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Cl=({value:Vt=[],onClose:Ht})=>ce.createElement(vi.default,{closable:!0,onClose:Ht,className:Jt.keywordTag},Vt==null?void 0:Vt.join(" \u6216 ")),ma=({questionTitlePlaceholder:Vt,form:Ht,showKeywords:Sn,isMustKeyWords:tt=Sn,titleKey:Pn="name",analysisKey:jr="analysis",answerTexts:No="answer_texts",keywords:Or="keywords",useKeywords:zr="use_keywords",indexs:jo})=>{const[po,Wo]=(0,ce.useState)(!1),[ho,_i]=(0,ce.useState)(""),Wi=ze.default.useWatch("sub_item_banks",Ht),{use_keywords:Tr,score:Ar}=(Wi==null?void 0:Wi[jo])||{};return console.log(Tr,Ar,"itemValues"),ce.createElement("div",{className:Jt.wrap},ce.createElement("div",{className:Jt.questionTitleEditorWrap},ce.createElement(ze.default.Item,{label:"\u9898\u5E72",name:Pn,labelCol:{span:24},rules:[{required:!0}]},ce.createElement(Wr,{scrollId:"name",watch:!0,height:140,placeholder:Vt}))),ce.createElement(ze.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:No,labelCol:{span:24}},ce.createElement(Ma,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Sn&&!tt&&ce.createElement(ze.default.Item,{hidden:!0,name:zr,valuePropName:"checked"},ce.createElement(Fi.Z,{defaultChecked:!0})),Sn&&tt&&ce.createElement(mt.Z,{align:"middle",className:"mb30"},ce.createElement(ze.default.Item,{name:zr,valuePropName:"checked"},ce.createElement(Fi.Z,null)),ce.createElement(dt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ce.createElement(dt.Z,null,ce.createElement(wt.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"},ce.createElement(Vn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Tr||!tt)&&ce.createElement(ze.default.List,{name:Or,rules:[{validator(ir,wr){return tt?wr!=null&&wr.length?(wr==null?void 0:wr.reduce((Ir,er)=>Ir+er.score,0))>parseFloat(Ar)?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()}}]},(ir,{add:wr,remove:Lo})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:`${Jt.title} mb10`},tt?"\u5173\u952E\u8BCD":ce.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ce.createElement(mt.Z,{align:"middle",className:"font14 mb30"},ce.createElement(dt.Z,{flex:1},ce.createElement(ct.default,{value:ho,onChange:Ir=>{_i(Ir.target.value)},maxLength:50,allowClear:!0,onPressEnter:Ir=>{var er,lr,or,Oi;const Do=`${(er=Ir.target)==null?void 0:er.value}`,Yr=(or=(lr=Do==null?void 0:Do.split("|"))==null?void 0:lr.filter(Er=>!!Er))==null?void 0:or.map(Er=>Er==null?void 0:Er.trim()),ko=Ht.getFieldValue(["sub_item_banks",...Or]),Yo=((Oi=ko==null?void 0:ko.map(Er=>Er==null?void 0:Er.keyword))==null?void 0:Oi.flat())||[];for(const Er of Yr)if(Yo.includes(Er)){yt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yu(Do)&&(wr({keyword:Yr,score:1}),_i(""))},className:Jt.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"})),ce.createElement(dt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),ir.map(Ir=>{var er=Ir,{key:lr,name:or}=er,Oi=wl(er,["key","name"]);return ce.createElement(mt.Z,{key:lr,className:"mb20",style:{marginRight:148}},ce.createElement(dt.Z,{flex:1},ce.createElement(mt.Z,{align:"middle",justify:"space-between"},ce.createElement(ze.default.Item,Hs(Vl({},Oi),{name:[or,"keyword"]}),ce.createElement(Cl,{onClose:()=>Lo(or)})),tt&&ce.createElement(ze.default.Item,Hs(Vl({},Oi),{name:[or,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Jt.blankInputNumberWrapper}),ce.createElement(Me.Z,{className:Jt.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ce.createElement("div",{onClick:()=>Wo(!0)},ce.createElement(ze.default.Item,{name:jr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:po}))))};var Fo=ve(59301),Ul=Object.defineProperty,$r=Object.defineProperties,Ko=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,Ti=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,$a=(Vt,Ht,Sn)=>Ht in Vt?Ul(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,bs=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))Ti.call(Ht,Sn)&&$a(Vt,Sn,Ht[Sn]);if(So)for(var Sn of So(Ht))Wa.call(Ht,Sn)&&$a(Vt,Sn,Ht[Sn]);return Vt},El=(Vt,Ht)=>$r(Vt,Ko(Ht)),Dl=(Vt,Ht)=>{var Sn={};for(var tt in Vt)Ti.call(Vt,tt)&&Ht.indexOf(tt)<0&&(Sn[tt]=Vt[tt]);if(Vt!=null&&So)for(var tt of So(Vt))Ht.indexOf(tt)<0&&Wa.call(Vt,tt)&&(Sn[tt]=Vt[tt]);return Sn},bi=(Vt,Ht,Sn)=>new Promise((tt,Pn)=>{var jr=zr=>{try{Or(Sn.next(zr))}catch(jo){Pn(jo)}},No=zr=>{try{Or(Sn.throw(zr))}catch(jo){Pn(jo)}},Or=zr=>zr.done?tt(zr.value):Promise.resolve(zr.value).then(jr,No);Or((Sn=Sn.apply(Vt,Ht)).next())});const{Panel:Fa}=hn.default,cs=null,bl=(Vt,Ht)=>{var Sn=Vt,{globalSetting:tt,loading:Pn,dispatch:jr,editData:No,onRef:Or=()=>{},isEdit:zr}=Sn,jo=Dl(Sn,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[po,Wo]=(0,ce.useState)(""),[ho,_i]=(0,ce.useState)([]),[Wi]=ze.default.useForm();(0,ce.useEffect)(()=>{!No||!zr||(Wo(No==null?void 0:No.name),_i(No==null?void 0:No.sub_item_banks),Wi.setFieldsValue(bs({},No)))},[No]),(0,ce.useEffect)(()=>{_i(Wi.getFieldValue("sub_item_banks"))},[ze.default.useWatch("sub_item_banks",Wi)]),(0,ce.useImperativeHandle)(Ht,()=>({onSave:Tr,Clear:Ar}));const Tr=()=>bi(void 0,null,function*(){if(!po)return yt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Wi.validateFields()}catch(lr){return console.log(lr,"errInfo"),yt.ZP.error(lr.errorFields[0].errors[0]),!1}const er=ho.map(lr=>bs({id:lr.id>1?lr.id:null},lr));return{name:po,sub_item_banks:er}}),Ar=()=>{Wo(""),_i([])},ir={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"},wr=({value:er})=>Fo.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},er),[Lo,Ir]=(0,ce.useState)();return Fo.createElement("section",{className:pt.wrap},Fo.createElement("p",{className:pt.titleWrap},Fo.createElement("span",{className:pt.required},"*"),Fo.createElement("span",{className:pt.title},"\u9898\u5E72\uFF1A")),Fo.createElement(Nn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:po,onChange:er=>Wo(er)}),Fo.createElement(ze.default,{form:Wi,autoComplete:"off"},Fo.createElement(ze.default.List,{name:"sub_item_banks",rules:[{validator(er,lr){return lr?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(er,{add:lr,remove:or})=>{const Oi=Wi.getFieldValue("sub_item_banks");return Fo.createElement(Fo.Fragment,null,Fo.createElement(hn.default,{className:er.length>0?pt.collapseWrapper:"",bordered:!1,expandIcon:({isActive:Do})=>Fo.createElement("i",{className:`iconfont icon-weizhankai ${Do?pt.open:pt.close}`,style:{fontSize:14,transition:"all .2s"}})},er.map((Do,Yr)=>{var ko=Do,{key:Yo,name:Er}=ko,Oo=Dl(ko,["key","name"]),Ns,Gi,Ia,Vr,_a,Is,ju,Gh,Nh,ru,zu,aa;return Fo.createElement(Fa,{className:pt.panel,forceRender:!0,header:Fo.createElement("div",{className:pt.panelHeader},"\u7B2C",Yr+1,"\u5C0F\u9898",Fo.createElement("span",null,"\uFF08",ir[(Ns=Oi==null?void 0:Oi[Er])==null?void 0:Ns.item_type],"\uFF09")),extra:Fo.createElement(mt.Z,{align:"middle",onClick:Ml=>Ml.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Gi=Oi==null?void 0:Oi[Er])==null?void 0:Gi.item_type)=="completion"&&Fo.createElement(ze.default.Item,El(bs({},Oo),{name:[Er,"score"],className:pt.blankInputNumberWrapper,style:{marginBottom:0}}),((Ia=Oi==null?void 0:Oi[Er])==null?void 0:Ia.item_type)=="completion"&&Fo.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Fo.createElement(wr,{value:(Vr=Oi==null?void 0:Oi[Er])==null?void 0:Vr.score}),"\u5206")),((_a=Oi==null?void 0:Oi[Er])==null?void 0:_a.item_type)=="completion"&&Fo.createElement(Fo.Fragment,null,Fo.createElement(Se.ZP.Group,{defaultValue:(Is=Oi==null?void 0:Oi[Er])==null?void 0:Is.use_blank_score,className:pt.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:Ml=>{var Wh;console.log(Wi.getFieldsValue()),Wi==null||Wi.setFieldValue(["sub_item_banks",Er,"use_blank_score"],(Wh=Ml==null?void 0:Ml.target)==null?void 0:Wh.value),Ir(new Date)}}),Fo.createElement(wt.Z,{overlayInnerStyle:{width:460},title:Fo.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",Fo.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")},Fo.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Yo},Fo.createElement(ze.default.Item,El(bs({},Oo),{name:Er}),(((ju=Oi==null?void 0:Oi[Er])==null?void 0:ju.item_type)=="single"||((Gh=Oi==null?void 0:Oi[Er])==null?void 0:Gh.item_type)=="multiple")&&Fo.createElement(co,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Nh=Oi==null?void 0:Oi[Er])==null?void 0:Nh.item_type)!="single",form:Wi,choiceKey:[Er,"choices"],titleKey:[Er,"name"],analysisKey:[Er,"analysis"],choiceOptionsPath:["sub_item_banks",Er,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((ru=Oi==null?void 0:Oi[Er])==null?void 0:ru.item_type)=="completion"&&Fo.createElement(Dr,{form:Wi,name:Er,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[Er,"use_blank_score"],titleKey:[Er,"name"],analysisKey:[Er,"analysis"],isOrdered:[Er,"is_ordered"],answerKey:[Er,"standard_answer"],key:Lo}),((zu=Oi==null?void 0:Oi[Er])==null?void 0:zu.item_type)=="judgement"&&Fo.createElement(yo,{form:Wi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Er,"name"],analysisKey:[Er,"analysis"],choiceKey:[Er,"choices"]}),((aa=Oi==null?void 0:Oi[Er])==null?void 0:aa.item_type)=="subjective"&&Fo.createElement(ma,{showKeywords:!0,form:Wi,titleKey:[Er,"name"],analysisKey:[Er,"analysis"],answerTexts:[Er,"answer_texts"],useKeywords:[Er,"use_keywords"],keywords:[Er,"keywords"],indexs:Er,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var Ol=(0,je.connect)(({loading:Vt,globalSetting:Ht})=>({globalSetting:Ht,loading:Vt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(bl)),Il=ve(6021),Qr=ve(19842),Ju=ve(57809),nl=ve(1710),vs={flex_box_center:"flex_box_center___xDdtW",flex_space_between:"flex_space_between___J4mFI",flex_box_vertical_center:"flex_box_vertical_center___hDYn6",flex_box_center_end:"flex_box_center_end___H7l1j",flex_box_column:"flex_box_column___TPd2T",questionInfo:"questionInfo___ABq66",label:"label___VQOr7",content:"content____HZ6z",leftPart:"leftPart___YB0y5",rightPart:"rightPart___UVMmS",dragItem:"dragItem___Hbx8k",blackText:"blackText___U4u33",greyText:"greyText___rWIL_",iconWrapper:"iconWrapper___I0kek",contentArea:"contentArea___hGC13",dragging:"dragging___z7VVY",hidden:"hidden___nWAxb",dragIcon:"dragIcon___j91TC",deleteIcon:"deleteIcon___cmCqc",disabled:"disabled___ZlKMj",challengeNameWrapper:"challengeNameWrapper___SpiRb",challengeName:"challengeName___lmQe2",shixunPreviewFooter:"shixunPreviewFooter___u0CzD",shixunInfoWrapper:"shixunInfoWrapper___HzLHD",shixunInfo:"shixunInfo___qaQlF",btnToDetail:"btnToDetail___scXqr",fixedBottom:"fixedBottom___wTBAR",cancelBtn:"cancelBtn___Km4Gi",confirmBtn:"confirmBtn___WrECz",previewBtn:"previewBtn____oGPS",setScoreModalTable:"setScoreModalTable___CjDlp",title:"title___cQWdZ",tipcontent:"tipcontent___A8tZ5",name:"name___CvfT9",tip:"tip___EvoCF",info:"info___y_ayi",img:"img___X9CNn"},ys=ve(85057),Su=ve(94860),Iu=ve(92365),Ys=ve(83312),ul=ve(8797),Mh=ve(32570),Lh=({open:Vt,onCancel:Ht,onOk:Sn})=>{const tt=(0,Su.g)(),[Pn,jr,No,Or]=(0,Ys.U)(Iu.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[zr,jo]=(0,ce.useState)(!1);(0,ce.useEffect)(()=>{Vt&&No({page:1,limit:10,type:0},!0).then(Wi=>{(Wi==null?void 0:Wi.shixuns_count)===0&&jo(!0)})},[Vt]);const[po,Wo]=(0,ce.useState)([]),[ho,_i]=(0,ce.useState)([]);return ce.createElement(ht.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:Vt,width:948,centered:!0,closable:!0,onCancel:Ht,onOk:()=>Sn(ho),destroyOnClose:!0},ce.createElement(mt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},ce.createElement(dt.Z,null,ce.createElement(Qr.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:tt,onChange:Wi=>{No({page:1,discipline_id:Wi==null?void 0:Wi[0],sub_discipline_id:Wi==null?void 0:Wi[1]})}}),ce.createElement(Ju.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:Wi=>No({page:1,diff:Wi})}),ce.createElement(Ju.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:Wi=>No({page:1,shixun_publish_status:Wi})})),ce.createElement(ys.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:Wi=>{No({keyword:Wi,page:1})}})),zr?ce.createElement("div",null,ce.createElement(ul.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,Je.xg)("/shixuns")})):ce.createElement(nl.default,{loading:jr,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(Wi,Tr)=>ce.createElement("div",{style:{display:"flex",alignItems:"center"}},ce.createElement("div",{className:Tr!=null&&Tr.high_resources_consume?vs.title:"",title:Wi||"--"},ce.createElement(Ie.Z,{key:1,showLines:1,showTextOnly:!0,value:Wi||"--"})),(Tr==null?void 0:Tr.high_resources_consume)&&ce.createElement(Mh.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(Wi,Tr,Ar)=>ce.createElement("span",null,Wi||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:ce.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",ce.createElement(wt.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},ce.createElement(Vn.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(Wi,Tr,Ar)=>ce.createElement("span",null,Wi||"- -")},{title:"\u64CD\u4F5C",render(Wi,Tr){const{title:Ar,challenge_names:ir,author_name:wr,identifier:Lo,author_school_name:Ir,study_count:er}=Tr||{};return ce.createElement("div",null,ce.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{ht.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:ce.createElement("div",null,ce.createElement(Ie.Z,{value:Ar,style:{marginBottom:18}}),ce.createElement("div",{className:vs.challengeNameWrapper},ir.map((lr,or)=>ce.createElement("div",{className:vs.challengeName,key:or},"\u7B2C",(0,Je.EM)(or+1),"\u9898\xA0",lr))),ce.createElement(mt.Z,{className:vs.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},ce.createElement(dt.Z,{className:vs.shixunInfoWrapper},ce.createElement("span",null,"\u521B\u5EFA\u8005"),ce.createElement("span",{className:vs.shixunInfo},wr.split("\u3001")[0]),ce.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),ce.createElement("span",{className:vs.shixunInfo},Ir),ce.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),ce.createElement("span",{className:vs.shixunInfo},er)),ce.createElement(Ze.ZP,{type:"primary",className:vs.btnToDetail,onClick:()=>(0,Je.xg)(`/shixuns/${Lo}/challenges?exercise=true`)},ce.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(Tr==null?void 0:Tr.shixun_tag_num)===1&&ce.createElement("a",{target:"_blank",href:`/shixuns/${Tr==null?void 0:Tr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:Or==null?void 0:Or.items,rowSelection:{type:"radio",selectedRowKeys:po,preserveSelectedRowKeys:!0,getCheckboxProps:Wi=>({disabled:Wi.shixun_tag_num===1}),onChange(Wi,Tr){var Ar,ir,wr;console.log(Wi),Wo(Wi);const Lo=[];for(const er of ho)Wi.includes(er.id)&&Lo.push(er);const Ir=Lo.map(er=>er.id);for(const er of Tr)er&&Wi.includes(er.id)&&!Ir.includes(er.id)&&Lo.push({id:er.id,difficulty:er.level,identifier:er.identifier,name:er.name,real_name:(Ar=er==null?void 0:er.author_name)==null?void 0:Ar.split("\u3001")[0],school_name:er.author_school_name,challenge_names:er.challenge_names,challenges:(ir=er.challenge_names)==null?void 0:ir.map((lr,or)=>({subject:lr,id:or,score:5})),score:((wr=er.challenge_names)==null?void 0:wr.length)*5,study_count:er.study_count,challenges_count:er.challenges_count});_i(Lo)}},pagination:{current:Pn.page,pageSize:Pn.limit,total:Or==null?void 0:Or.items_count,showTotal:Wi=>ce.createElement("span",null,"\u5171\xA0",ce.createElement("span",{style:{color:"#165DFF"}},Wi),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(Wi,Tr){No({page:Wi,limit:Tr})},size:"default"},scroll:{y:400}}))},hc=ve(82438),Fh=ve(49692),Ru=(Vt,Ht,Sn)=>new Promise((tt,Pn)=>{var jr=zr=>{try{Or(Sn.next(zr))}catch(jo){Pn(jo)}},No=zr=>{try{Or(Sn.throw(zr))}catch(jo){Pn(jo)}},Or=zr=>zr.done?tt(zr.value):Promise.resolve(zr.value).then(jr,No);Or((Sn=Sn.apply(Vt,Ht)).next())}),Rl=({visible:Vt,getdata:Ht,onCancel:Sn,onRandomExchange:tt,selectFromProblemSet:Pn,questionParams:jr})=>{const[No,Or]=(0,ce.useState)(!1),[zr,jo]=(0,ce.useState)(!1),[po,Wo]=(0,ce.useState)({}),ho=(0,je.useParams)(),[_i,Wi]=(0,ce.useState)(),Tr=(Ar,ir)=>Ru(void 0,null,function*(){jo(!0);const wr=yield(0,Ke.ZP)(`/api/exercises/${ho.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:jr.id,item_bank_id:Ar,shixuns_info:[{id:Ar,is_copy:ir!=1,is_use:ir!=1}]}});jo(!1),wr!=null&&wr.status||(yt.ZP.info("\u6362\u9898\u6210\u529F"),Sn(),Ht())});return ce.createElement(ht.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:Vt,onCancel:Sn,centered:!0,maskClosable:!0,footer:null},ce.createElement(mt.Z,{justify:"center",className:"pb20"},ce.createElement(Il.Z,{onClick:tt},"\u968F\u673A\u66F4\u6362"),(jr==null?void 0:jr.type)!=="PRACTICAL"&&ce.createElement(Ze.ZP,{style:{marginLeft:24},onClick:Pn},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(jr==null?void 0:jr.type)==="PRACTICAL"&&ce.createElement(Ze.ZP,{style:{marginLeft:24},onClick:()=>{Or(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),ce.createElement(Lh,{open:No,onCancel:()=>Or(!1),onOk:Ar=>Ru(void 0,null,function*(){if(console.log("----selectedRows",Ar,ho),(Ar==null?void 0:Ar.length)<=0){yt.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let ir=Ar==null?void 0:Ar.map(Lo=>Lo==null?void 0:Lo.id),wr=yield(0,Fh.Tr)({id:[...ir],course_id:ho.coursesId,type:"shixun"});(wr==null?void 0:wr.student_count)===0?Tr(ir==null?void 0:ir[0],1):(Wi(ir),Wo(wr)),Or(!1)})}),ce.createElement(hc.Z,{resdata:po,type:"shixun",okloading:zr,oktext:(po==null?void 0:po.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:Ar=>Ru(void 0,null,function*(){Tr(_i==null?void 0:_i[0],2)})}))},Hh=ve(94734),qu=ve(24334),eh=ve(69304),Co=ve(68042),Uo=ve(14165),Gs=Object.defineProperty,ds=Object.defineProperties,es=Object.getOwnPropertyDescriptors,Aa=Object.getOwnPropertySymbols,za=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,Ka=(Vt,Ht,Sn)=>Ht in Vt?Gs(Vt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Sn}):Vt[Ht]=Sn,Ws=(Vt,Ht)=>{for(var Sn in Ht||(Ht={}))za.call(Ht,Sn)&&Ka(Vt,Sn,Ht[Sn]);if(Aa)for(var Sn of Aa(Ht))rs.call(Ht,Sn)&&Ka(Vt,Sn,Ht[Sn]);return Vt},$s=(Vt,Ht)=>ds(Vt,es(Ht)),va=(Vt,Ht,Sn)=>new Promise((tt,Pn)=>{var jr=zr=>{try{Or(Sn.next(zr))}catch(jo){Pn(jo)}},No=zr=>{try{Or(Sn.throw(zr))}catch(jo){Pn(jo)}},Or=zr=>zr.done?tt(zr.value):Promise.resolve(zr.value).then(jr,No);Or((Sn=Sn.apply(Vt,Ht)).next())}),Mc=({data:Vt,submit:Ht,goBack:Sn,loading:tt,onTypeScore:Pn,editPreview:jr=!1,onSkipExamination:No,selectValue:Or,onExchange:zr,getdata:jo,handleMarkWrongQuestion:po})=>{var Wo,ho,_i,Wi,Tr,Ar,ir,wr,Lo,Ir,er;const lr=(0,ce.useRef)(),[or,Oi]=(0,ce.useState)(null),[Do,Yr]=(0,ce.useState)(!1),[ko,Yo]=(0,ce.useState)(!1),Er=(0,ce.useRef)(),[Oo]=ze.default.useForm(),Ns=(0,je.useParams)(),[Gi,Ia]=(0,ce.useState)(!1);(0,ce.useEffect)(()=>{Yr(!0)},[]),(0,ce.useEffect)(()=>{jr||(0,Je.Dk)("\u8BD5\u5377\u9884\u89C8")},[jr]);const Vr=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],_a={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"},Is={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"},ju=Hn=>{var yr;const Jo=[];return ce.createElement(ce.Fragment,null,ce.createElement("aside",{className:De.single},(yr=Hn==null?void 0:Hn.choices)==null?void 0:yr.map((Xe,Ue)=>(Xe.is_answer&&Jo.push(Uo.k4[Ue]),ce.createElement("ul",{key:Ue},ce.createElement("li",null,Uo.k4[Ue],"\u3001"),ce.createElement("li",null,ce.createElement(Ie.Z,{value:Xe.choice_text})))))),ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Jo.join(""),ce.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Vr[Hn.difficulty])),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Hn.analysis?Hn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Hn==null?void 0:Hn.discipline_name)||"--"}/${Hn==null?void 0:Hn.sub_discipline_name}`),ce.createElement(wt.Z,{title:Hn==null?void 0:Hn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Hn==null?void 0:Hn.tag_discipline_name)))))},Gh=(Hn,yr)=>{var Jo;const Xe=(Jo=Hn==null?void 0:Hn.standard_answer)==null?void 0:Jo.map((Ue,zt)=>{var _t;return ce.createElement("div",{key:zt},`\u7B54\u6848\uFF08\u586B\u7A7A${Ue==null?void 0:Ue.position}\uFF09\uFF1A${(_t=Ue==null?void 0:Ue.answer_text)==null?void 0:_t.join("\u3001")}`)});return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.analysis},ce.createElement("div",{style:{display:"flex"}},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ce.createElement("div",null,Xe)),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Hn.analysis?Hn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),yr?`${(yr==null?void 0:yr.discipline_name)||"--"}/${yr==null?void 0:yr.sub_discipline_name}`:`${(Hn==null?void 0:Hn.discipline_name)||"--"}/${Hn==null?void 0:Hn.sub_discipline_name}`),ce.createElement(wt.Z,{title:yr?yr==null?void 0:yr.tag_discipline_name:Hn==null?void 0:Hn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),yr?yr==null?void 0:yr.tag_discipline_name:Hn==null?void 0:Hn.tag_discipline_name)))))},Nh=Hn=>{var yr;const Jo=(yr=Hn==null?void 0:Hn.standard_answer)==null?void 0:yr.map((Xe,Ue)=>ce.createElement("div",{key:Ue},`\u7B54\u6848\uFF08\u586B\u7A7A${(Xe==null?void 0:Xe.position)||(Xe==null?void 0:Xe.exercise_choice_id)}\uFF09\uFF1A${Xe==null?void 0:Xe.answer_text}`));return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.analysis},ce.createElement("div",{style:{display:"flex"}},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ce.createElement("div",null,Jo)),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Hn.analysis?Hn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Hn==null?void 0:Hn.discipline_name)||"--"}/${Hn==null?void 0:Hn.sub_discipline_name}`),ce.createElement(wt.Z,{title:Hn==null?void 0:Hn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Hn==null?void 0:Hn.tag_discipline_name)))))},ru=(Hn,yr)=>{var Jo;return ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Jo=Hn==null?void 0:Hn.answer_texts)==null?void 0:Jo[0]),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Hn.analysis?Hn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),yr?`${(yr==null?void 0:yr.discipline_name)||"--"}/${yr==null?void 0:yr.sub_discipline_name}`:`${(Hn==null?void 0:Hn.discipline_name)||"--"}/${Hn==null?void 0:Hn.sub_discipline_name}`),ce.createElement(wt.Z,{title:yr?yr==null?void 0:yr.tag_discipline_name:Hn==null?void 0:Hn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),yr?yr==null?void 0:yr.tag_discipline_name:Hn==null?void 0:Hn.tag_discipline_name))))},zu=Hn=>{var yr,Jo;return ce.createElement("div",{className:De.analysis},ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u9884\u671F\u8F93\u51FA:"),ce.createElement(Ie.Z,{value:(yr=Hn==null?void 0:Hn.program_attr)==null?void 0:yr.description})),ce.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Jo=Hn==null?void 0:Hn.program_attr)==null?void 0:Jo.answer_text)||"--"),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Hn.analysis?Hn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Hn==null?void 0:Hn.discipline_name)||"--"}/${Hn==null?void 0:Hn.sub_discipline_name}`),ce.createElement(wt.Z,{title:Hn==null?void 0:Hn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Hn==null?void 0:Hn.tag_discipline_name))))},aa=(Hn,yr)=>{var Jo;return ce.createElement("div",null,(Jo=Hn==null?void 0:Hn.sub_item_banks)==null?void 0:Jo.map((Xe,Ue)=>{var zt,_t;const on=[];return ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},yr+1+"."+(Ue+1),"\uFF08",_a[Xe.item_type]||Is[Xe.item_type],"\uFF09",Xe.name),(Xe.item_type=="SINGLE"||Xe.item_type=="MULTIPLE"||Xe.item_type=="JUDGMENT"||Xe.item_type=="single"||Xe.item_type=="multiple"||Xe.item_type=="judgement")&&ce.createElement(ce.Fragment,null,ce.createElement("aside",{className:De.single},(zt=Xe==null?void 0:Xe.choices)==null?void 0:zt.map((Wt,Fn)=>(Wt.is_answer&&on.push(Uo.k4[Fn]),ce.createElement("ul",{key:Fn},ce.createElement("li",null,Uo.k4[Fn],"\u3001"),ce.createElement("li",null,ce.createElement(Ie.Z,{value:Wt.choice_text})))))),ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",on.join(""),ce.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Vr[Xe.difficulty])),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Xe.analysis?Xe.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Hn==null?void 0:Hn.discipline_name)||"--"}/${Hn==null?void 0:Hn.sub_discipline_name}`),ce.createElement(wt.Z,{title:Hn==null?void 0:Hn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Hn==null?void 0:Hn.tag_discipline_name))))),(Xe.item_type=="COMPLETION"||Xe.item_type=="completion")&&Gh(Xe,Hn),(Xe.item_type=="SUBJECTIVE"||Xe.item_type=="subjective")&&ru(Xe,Hn),((_t=Vt==null?void 0:Vt.exam)==null?void 0:_t.exercise_status)===3&&ce.createElement("div",{className:"flex gap-20px mt20"},ce.createElement(eh.Z,{state:Xe==null?void 0:Xe.is_wrong,onClick:()=>{po==null||po({value:$s(Ws({},Xe),{question_id:Xe==null?void 0:Xe.id,question_score:Xe==null?void 0:Xe.score})})}}),Xe.item_type=="single"&&ce.createElement(Ze.ZP,{style:{color:"#3061D0"},onClick:()=>{Fc({value:Xe})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},Ml=Hn=>{var yr,Jo,Xe;return ce.createElement("div",{style:{marginTop:"12px"}},(Jo=(yr=Hn==null?void 0:Hn.shixun)==null?void 0:yr.challenges)==null?void 0:Jo.map((Ue,zt)=>ce.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},ce.createElement("div",null,ce.createElement("span",{className:"mr5"},"\u7B2C",zt+1,"\u5173"),ce.createElement(wt.Z,{key:zt,title:Ue==null?void 0:Ue.challenge_name},ce.createElement("span",null,(0,Je.Pq)(Ue==null?void 0:Ue.challenge_name,44)))),jr&&ce.createElement("div",null,"\u5206\u503C\uFF1A",Ue.score,"\u5206"))),ce.createElement(je.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(Xe=Hn==null?void 0:Hn.shixun)==null?void 0:Xe.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),ce.createElement("div",{style:{clear:"both"}}))},Wh=Hn=>{let yr=Hn.questions_score/Hn.questions_count;ht.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:ce.createElement("div",{className:De.modalColumn},ce.createElement("div",{className:De.modalRow,style:{justifyContent:"flex-start"}},ce.createElement("sup",{className:De.sup},"*"),ce.createElement("span",null,Hn==null?void 0:Hn.name,"\uFF1A"),ce.createElement(Me.Z,{min:0,precision:1,defaultValue:yr,onChange:Jo=>{yr=Jo}}),ce.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){var Jo;if(!yr)return yt.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const Xe={type:Hn==null?void 0:Hn.type,score:yr,scoreTotal:Number((Jo=yr*Hn.questions_count)==null?void 0:Jo.toFixed(1))};Pn(Xe)})})},Bh=()=>{let Hn="";ht.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:ce.createElement("div",{className:De.modalColumn},ce.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},ce.createElement("img",{style:{marginRight:5},src:en.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),ce.createElement("div",{className:De.modalRow,style:{marginTop:20}},ce.createElement("sup",{className:De.sup},"*"),ce.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),ce.createElement(ct.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:Hn,onChange:yr=>{Hn=yr.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){var yr;if(!Hn)return yt.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Jo=[],Xe=[],Ue=[],zt=[];(yr=Vt==null?void 0:Vt.questionList)==null||yr.forEach(on=>{var Wt;(Wt=on.questions)==null||Wt.forEach(Fn=>{let wn=on.questions_score/on.questions_count;wn=wn&&wn.toFixed(1),on.type==="COMBINATION"&&Ue.push({id:Fn.id,sub_item_bank_ids:Fn.sub_item_banks.map(kn=>kn.id)}),on.type==="PRACTICAL"?zt.push(Fn.id):(Jo.push(Fn.id),Xe.push(wn))})}),console.log("-----",Ue),yield Ht({item_bank_ids:Jo,item_bank_scores:Xe,name:Hn,combination_item_banks:Ue,shixun_ids:zt})})})},Od=(Hn,yr,Jo,Xe)=>{var Ue;const zt=`${location.pathname}${location.search}`,_t=(Ue=Xe.questions)==null?void 0:Ue.map(on=>on==null?void 0:on.id);if(zt.includes("exercise"))Er.current={id:Hn,ids:_t,type:yr,index:Jo},Yo(!0);else{let on=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:()=>va(void 0,null,function*(){on.update({cancelButtonProps:{disabled:!0}}),yield zr({single_question_id:Hn,seleted_item_bank_ids:_t},{type:yr,index:Jo}),on.update({cancelButtonProps:{disabled:!1}}),yt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},_u=Hn=>{var yr;const Jo=(yr=Hn.questions)==null?void 0:yr.map(zt=>zt==null?void 0:zt.id),Xe=Hn.name;let Ue=ht.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${Xe}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){Ue.update({cancelButtonProps:{disabled:!0}}),yield zr({seleted_item_bank_ids:Jo},{type:Hn.type}),Ue.update({cancelButtonProps:{disabled:!1}}),yt.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${Xe}\u8BD5\u9898`)})})},ou=()=>{let Hn=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:()=>va(void 0,null,function*(){Hn.update({cancelButtonProps:{disabled:!0}}),yield zr(),Hn.update({cancelButtonProps:{disabled:!1}}),yt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},xu=Hn=>{console.log(Hn,"key"),No(Hn-1)},Pu=(Hn,yr)=>{var Jo,Xe;if(yr==="SINGLE")return ce.createElement(ce.Fragment,null,ce.createElement(oi,{ref:lr,editData:Hn,isEdit:!0}),ce.createElement(He.Z,null));if(yr==="MULTIPLE")return ce.createElement(ce.Fragment,null,ce.createElement(mi,{ref:lr,editData:Hn,isEdit:!0}),ce.createElement(He.Z,null));if(yr==="JUDGMENT")return ce.createElement(ce.Fragment,null,ce.createElement(Qt,{ref:lr,editData:Hn,isEdit:!0}),ce.createElement(He.Z,null));if(yr==="COMPLETION")return ce.createElement(ce.Fragment,null,ce.createElement(xe,{ref:lr,editData:Hn,isEdit:!0}),ce.createElement(He.Z,null));if(yr==="SUBJECTIVE")return ce.createElement(ce.Fragment,null,ce.createElement(ai,{ref:lr,editData:Hn,isEdit:!0}),ce.createElement(He.Z,null));if(yr==="COMBINATION")return ce.createElement(ce.Fragment,null,ce.createElement(Ol,{ref:lr,editData:Hn,isEdit:!0}),ce.createElement(He.Z,null));if(yr==="BPROGRAM")return ce.createElement(ce.Fragment,null,ce.createElement(ze.default,{form:Oo,style:{marginTop:20},onFinishFailed:Ue=>{var zt,_t;Ue.errorFields[0].name.includes("standard_answers")?yt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):yt.ZP.error(Ue.errorFields[0].errors[0]),Oo.scrollToField((_t=(zt=Ue==null?void 0:Ue.errorFields)==null?void 0:zt[0])==null?void 0:_t.name,{behavior:"smooth",block:"center"})},onFinish:Ue=>va(void 0,null,function*(){var zt;let _t=$s(Ws({question_score:Hn.score},Ue),{question_type:8,hack:$s(Ws({},Ue.hack),{difficult:Hn.program_attr.difficult}),hack_codes:$s(Ws({},Ue.hack_codes),{code:qu.Base64.encode((zt=Ue.hack_codes)==null?void 0:zt.code)})});Gi&&(_t.is_cover=1);const on=yield(0,Ke.ZP)(`/api/exercise_questions/${Hn.id}.json`,{method:"put",body:_t});(on==null?void 0:on.status)===0&&(yt.ZP.success("\u7F16\u8F91\u6210\u529F"),xu(Or+1)),Oi(null)})},ce.createElement(Hh.tc,{form:Oo,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Jo=Hn==null?void 0:Hn.program_attr)==null?void 0:Jo.identifier,answerKey:"standard_answers"}),ce.createElement(He.Z,null)));if(yr==="PROGRAM"&&je.history.push(`/problems/${(Xe=Hn==null?void 0:Hn.program_attr)==null?void 0:Xe.identifier}/edit?type=exercises&express_id=${Ns.categoryId}&question_id=${Hn==null?void 0:Hn.id}&score=${Hn==null?void 0:Hn.score}&callback_url=${location.pathname}&select=${Or}&exercise=true`),yr==="PRACTICAL")return ce.createElement(ce.Fragment,null,ce.createElement(pi,{ref:lr,editData:Hn,isEdit:!0}),ce.createElement(He.Z,null))},dh=(Hn,yr)=>va(void 0,null,function*(){var Jo,Xe,Ue,zt,_t,on;const Wt=yield(Jo=lr.current)==null?void 0:Jo.onSave();if(!Wt)return;const Fn=Tn=>{const ei=Tn.map(Ci=>Ci.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(ei).size!==ei.length},wn={question_score:yr.score,analysis:Wt.analysis};if(Hn==="SINGLE"||Hn==="MULTIPLE"||Hn==="JUDGMENT"){if(Hn!=="JUDGMENT"&&Fn(Wt==null?void 0:Wt.choices)){yt.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Tn=[],ei=[];wn.question_type=Hn==="JUDGMENT"?2:1,wn.question_title=Wt==null?void 0:Wt.name,(Xe=Wt==null?void 0:Wt.choices)==null||Xe.forEach((ki,Ci)=>{Tn.push(ki.choice_text),ki!=null&&ki.is_answer&&ei.push(Ci+1)}),wn.question_choices=Tn,wn.standard_answers=ei}if(Hn==="COMPLETION"){let Tn=(Ue=Wt==null?void 0:Wt.standard_answers)==null?void 0:Ue.map((Ci,xi)=>(Ci==null?void 0:Ci.score)<=0?xi+1:null).filter(Ci=>Ci!==null);if((Tn==null?void 0:Tn.length)>0)return yt.ZP.warning(`\u7B2C${Tn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let ei=(zt=Wt==null?void 0:Wt.standard_answers)==null?void 0:zt.reduce((Ci,xi)=>Ci+(Number(xi==null?void 0:xi.score)||0),0);if(parseFloat(ei.toFixed(2))!=(wn==null?void 0:wn.question_score))return yt.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;wn.is_ordered=Wt.is_ordered,wn.question_title=Wt==null?void 0:Wt.name,wn.use_blank_score=Wt==null?void 0:Wt.use_blank_score,wn.question_type=3;const ki=[];(_t=Wt==null?void 0:Wt.standard_answers)==null||_t.forEach((Ci,xi)=>{ki.push({choice_id:Ci.position,answer_text:Ci.answer_text,score:Ci.score})}),wn.standard_answers=ki,wn.downcase=Wt==null?void 0:Wt.downcase,wn.no_space=Wt==null?void 0:Wt.no_space}if(Hn==="SUBJECTIVE"&&(console.log("editorData"),console.log(Wt),wn.question_title=Wt==null?void 0:Wt.name,wn.question_type=4,wn.answer_texts=Wt==null?void 0:Wt.answer_texts,wn.use_keywords=Wt==null?void 0:Wt.use_keywords,wn.keywords=Wt==null?void 0:Wt.keywords),Hn==="COMBINATION"){wn.question_title=Wt==null?void 0:Wt.name,wn.question_type=7;try{wn.sub_questions=(on=Wt==null?void 0:Wt.sub_item_banks)==null?void 0:on.map((Tn,ei)=>{var ki,Ci,xi;if((Tn==null?void 0:Tn.item_type)=="single"||(Tn==null?void 0:Tn.item_type)=="multiple"){if(Fn(Tn==null?void 0:Tn.choices))throw new Error(`\u7B2C${ei+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const rr=[],Mi=[];return(ki=Tn==null?void 0:Tn.choices)==null||ki.forEach((Vi,Ui)=>{rr.push(Vi.choice_text),Vi!=null&&Vi.is_answer&&Mi.push(Ui+1)}),{id:Tn.id,question_id:Tn.id,question_title:Tn.name,difficulty:Tn.difficulty,question_type:(Tn==null?void 0:Tn.item_type)=="single"?0:(Tn==null?void 0:Tn.item_type)=="multiple"?1:2,question_choices:rr,standard_answers:Mi,analysis:Tn.analysis,question_score:Tn==null?void 0:Tn.score}}else if((Tn==null?void 0:Tn.item_type)=="completion"){let rr=(Ci=Tn==null?void 0:Tn.standard_answer)==null?void 0:Ci.reduce((Vi,Ui)=>Vi+(Number(Ui==null?void 0:Ui.score)||0),0);if(parseFloat(rr.toFixed(2))!=(Tn==null?void 0:Tn.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const Mi=[];return(xi=Tn==null?void 0:Tn.standard_answer)==null||xi.forEach((Vi,Ui)=>{Mi.push({choice_id:Vi.position,answer_text:Vi.answer_text,score:Vi.score})}),{id:Tn.id,question_id:Tn.id,is_ordered:Tn.is_ordered,question_title:Tn.name,difficulty:Tn.difficulty,question_type:3,standard_answers:Mi,use_blank_score:Tn.use_blank_score,analysis:Tn.analysis,downcase:Tn==null?void 0:Tn.downcase,no_space:Tn==null?void 0:Tn.no_space,question_score:Tn==null?void 0:Tn.score}}else if((Tn==null?void 0:Tn.item_type)=="subjective")return{id:Tn.id,question_id:Tn.id,question_title:Tn.name,question_type:4,difficulty:Tn.difficulty,answer_texts:Tn==null?void 0:Tn.answer_texts,analysis:Tn.analysis,question_score:Tn==null?void 0:Tn.score,use_keywords:Tn.use_keywords,keywords:Tn==null?void 0:Tn.keywords}})}catch(Tn){yt.ZP.warning(Tn.message);return}delete wn.analysis}let kn=!1;(yr==null?void 0:yr.is_my)===1&&(kn=yield new Promise((ei,ki)=>{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:()=>{ei(!0)},onCancel:()=>{ei(!1)}})})),kn&&(wn.is_cover=1);const ni=Hn!=="PRACTICAL"?yield(0,Ke.ZP)(`/api/exercise_questions/${yr.id}.json`,{method:"put",body:wn}):yield(0,Ke.ZP)(`/api/exercise_questions/${yr.id}/update_shixun_score.json`,{method:"post",body:Ws({},Wt)});(ni==null?void 0:ni.status)===0&&(yt.ZP.success("\u7F16\u8F91\u6210\u529F"),xu(Or+1),Oi(null))}),Lc=()=>va(void 0,null,function*(){(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,Ke.ZP)(`/api/exercises/${Ns.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield No(Or),yt.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),Fc=({value:Hn}={})=>{var yr;const Jo=[];let Xe=[];const Ue=(yr=Hn==null?void 0:Hn.choices)==null?void 0:yr.map((_t,on)=>{var Wt;const Fn=on+1;return _t!=null&&_t.is_answer&&(Jo.push(Fn),Xe.push(Fn)),{value:Fn,label:ce.createElement(Ie.Z,{className:"c-black font14",value:`${(Wt=Uo.k4)==null?void 0:Wt[on]}. ${_t==null?void 0:_t.choice_text}`}),disabled:_t==null?void 0:_t.origin_standard_answer}}),zt=ht.default.confirm({centered:!0,icon:null,title:"\u589E\u8BBE\u6B63\u786E\u7B54\u6848",width:800,content:ce.createElement(ce.Fragment,null,"\u5F53\u524D\u8BD5\u9898\u7684\u6B63\u786E\u7B54\u6848\u4E3A ",Jo==null?void 0:Jo.map(_t=>{var on;return(on=Uo.k4)==null?void 0:on[_t-1]}),"\uFF0C\u8BF7\u9009\u62E9\u9700\u8981\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u7684\u9009\u9879\u3002",ce.createElement("br",null),"\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u9009\u4E2D\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u4EFB\u4E00\u9009\u9879\u7684\u5B66\u751F\u4E5F\u4F1A\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\uFF0C\u4F46\u4E0D\u4F1A\u4FEE\u6539\u5F53\u524D\u8BD5\u9898\u7684\u9898\u578B\u3002\u53D6\u6D88\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u4E5F\u4F1A\u91CD\u65B0\u8BA1\u7B97\u5BF9\u5E94\u5B66\u751F\u7684\u5F97\u5206\u3002",ce.createElement("br",null),ce.createElement(st.default.Group,{className:"flex-col mt20",options:Ue,defaultValue:Xe,onChange:_t=>{Xe=_t}})),onOk:()=>va(void 0,null,function*(){const _t=yield(0,Ke.ZP)(`/api/exercises/${Ns.categoryId}/questions/${Hn==null?void 0:Hn.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:Xe}});(_t==null?void 0:_t.status)===0&&(yt.ZP.success("\u4FEE\u6539\u6210\u529F"),xu(Or+1))})})},Nc=(Wo=Vt==null?void 0:Vt.questionList)==null?void 0:Wo.reduce((Hn,yr)=>Hn+Number(yr.questions_score),0),od=jr&&((ho=Vt==null?void 0:Vt.exam)==null?void 0:ho.exercise_status)!==1;return ce.createElement("section",{className:De.wrap},ce.createElement("div",{id:"id_left_preview",className:De.left,onMouseEnter:Hn=>{const yr=document.getElementById("id_left_preview");yr.style.overflowY="auto"},onMouseLeave:Hn=>{const yr=document.getElementById("id_left_preview");yr.style.overflowY="hidden"}},ce.createElement("div",{className:De.title},ce.createElement("div",{className:"body-overflow-initial"},ce.createElement("b",null),ce.createElement("span",null,"\u7B54\u9898\u5361"))),ce.createElement("div",{className:De.total},ce.createElement("div",null,ce.createElement("img",{src:Gt}),ce.createElement("span",null,"\u9898\u6570(\u9053)"),ce.createElement("aside",null,Vt==null?void 0:Vt.all_questions_count)),ce.createElement("div",{className:"mr30 ml30"},ce.createElement("img",{src:$t}),ce.createElement("span",null,"\u603B\u5206(\u5206)"),ce.createElement("aside",null,Nc&&Nc.toFixed(1))),ce.createElement("div",null,ce.createElement("img",{src:Fe}),ce.createElement("span",null,"\u65F6\u957F(\u5206)"),ce.createElement("aside",null,((_i=Vt==null?void 0:Vt.exam)==null?void 0:_i.time)===-1||((Wi=Vt==null?void 0:Vt.exam)==null?void 0:Wi.time)===null?"\u4E0D\u9650":(Tr=Vt==null?void 0:Vt.exam)==null?void 0:Tr.time))),(Ar=Vt==null?void 0:Vt.questionList)==null?void 0:Ar.map((Hn,yr)=>{var Jo;return ce.createElement("div",{className:De.list,key:yr},ce.createElement("div",{className:De.name},ce.createElement("b",null),ce.createElement("span",null,Hn.name)),ce.createElement("aside",null,ce.createElement("div",null,"\u5171",ce.createElement("span",{className:De.b},Hn.questions_count),"\u9898 ",ce.createElement("span",{className:De.l},"|"),"\u5171",ce.createElement("span",{className:De.r},Hn.questions_score),"\u5206"),ce.createElement("div",{className:De.answerSheet},(Jo=Hn==null?void 0:Hn.questions)==null?void 0:Jo.map((Xe,Ue)=>ce.createElement("div",{onClick:()=>{const zt=`Anchor_${Xe==null?void 0:Xe.id}`;let _t=document.getElementById(zt);_t&&setTimeout(()=>_t.scrollIntoView({block:"center",behavior:"smooth"}))},key:Xe==null?void 0:Xe.id,className:De.tag},Ue+1)))))})),ce.createElement("div",{className:De.right},ce.createElement("div",{className:De.examName,id:"examName"},ce.createElement("div",{className:De.name},ce.createElement(wt.Z,{title:(ir=Vt==null?void 0:Vt.exam)==null?void 0:ir.name,getPopupContainer:Hn=>Hn.parentNode},ce.createElement("span",{className:De.t},(wr=Vt==null?void 0:Vt.exam)==null?void 0:wr.name))),jr&&((Lo=Vt==null?void 0:Vt.exam)==null?void 0:Lo.exercise_status)===1&&ce.createElement(ys.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:()=>{Lc()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!jr&&ce.createElement(Ze.ZP,{onClick:ou,type:"primary"},"\u968F\u673A\u66F4\u6362")),ce.createElement("div",{className:De.topWarp},(Ir=Vt==null?void 0:Vt.questionList)==null?void 0:Ir.map((Hn,yr)=>{var Jo,Xe;return ce.createElement(ce.Fragment,{key:yr},ce.createElement("div",{className:De.head,style:yr===0?{border:0,marginTop:-16}:{}},ce.createElement("div",{className:De.name},ce.createElement("b",null),ce.createElement("span",null,Hn.name)),ce.createElement("div",{className:De.so},"\u5171",ce.createElement("span",{className:De.b},Hn.questions_count," "),"\u9898 ",Hn.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Jo=Hn==null?void 0:Hn.questions)==null?void 0:Jo.map(Ue=>{var zt;return(zt=Ue==null?void 0:Ue.sub_item_banks)==null?void 0:zt.length}).reduce((Ue,zt)=>Ue+zt)}\u5C0F\u9898\uFF09`,ce.createElement("span",{className:De.l},"|"),"\u5171",ce.createElement("span",{className:De.r},Hn.questions_score),"\u5206"),!jr&&ce.createElement("div",{className:De.btn},ce.createElement(Ze.ZP,{onClick:()=>{Wh(Hn)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),ce.createElement(Ze.ZP,{onClick:()=>_u(Hn),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(Xe=Hn==null?void 0:Hn.questions)==null?void 0:Xe.map((Ue,zt)=>{var _t,on,Wt,Fn;return or===(Ue==null?void 0:Ue.id)?ce.createElement("div",{id:`Anchor_${Ue==null?void 0:Ue.id}`,className:De.content,style:{padding:0,marginTop:24},key:Ue==null?void 0:Ue.id},ce.createElement("div",{style:{float:"right",marginTop:`${(Hn==null?void 0:Hn.type)==="PRACTICAL"?"-2px":"-6px"}`}},ce.createElement(Ze.ZP,{onClick:()=>Oi(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),ce.createElement(Ze.ZP,{onClick:()=>{dh(Hn==null?void 0:Hn.type,Ue)},type:"primary"},"\u4FDD\u5B58")),Pu(Ue,Hn.type)):ce.createElement("div",{id:`Anchor_${Ue==null?void 0:Ue.id}`,className:De.content,key:Ue==null?void 0:Ue.id},ce.createElement("div",{className:De.titleWrap},(Ue==null?void 0:Ue.item_type)==="bprogram"?ce.createElement(Ie.Z,{style:{paddingRight:10},value:zt+1+"\u3001"+((_t=Ue==null?void 0:Ue.program_attr)==null?void 0:_t.description)}):ce.createElement(Ie.Z,{style:{paddingRight:10},className:De.titleHtml,value:zt+1+`\u3001${(Ue==null?void 0:Ue.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(Ue==null?void 0:Ue.name)}),jr&&ce.createElement(Ze.ZP,{onClick:()=>{var wn,kn,ni;if(or){yt.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Oo.setFieldsValue({standard_answers:Ue==null?void 0:Ue.standard_answer,hack:Ws(Ws({},Ue),Ue==null?void 0:Ue.program_attr),hack_codes:$s(Ws({},Ue==null?void 0:Ue.program_attr),{code:qu.Base64.decode(((wn=Ue==null?void 0:Ue.program_attr)==null?void 0:wn.code)||"")}),hack_sets:Ws({},(kn=Ue==null?void 0:Ue.hack_sets)==null?void 0:kn[0])}),(Ue==null?void 0:Ue.item_type)=="program"?je.history.push(`/problems/newedit/${(ni=Ue==null?void 0:Ue.program_attr)==null?void 0:ni.identifier}?type=exercises&express_id=${Ns.categoryId}&question_id=${Ue==null?void 0:Ue.id}&score=${Ue==null?void 0:Ue.score}&exercise=true&callback_url=/classrooms/${Ns.coursesId}/exercise/${Ns.categoryId}/detail?random=true`):Oi(Ue==null?void 0:Ue.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!od&&ce.createElement(Ze.ZP,{disabled:od,className:"ml20",onClick:()=>Od(Ue==null?void 0:Ue.id,Hn.type,zt,Hn),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(Ue==null?void 0:Ue.item_type)==="bprogram"&&ce.createElement(Ie.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:De.titleHtml,value:qu.Base64.decode(((on=Ue==null?void 0:Ue.program_attr)==null?void 0:on.code)||"")}),(Hn.type==="SINGLE"||Hn.type==="JUDGMENT"||Hn.type==="MULTIPLE")&&ju(Ue),Hn.type==="COMPLETION"&&Gh(Ue),Hn.type==="SUBJECTIVE"&&ru(Ue),Hn.type==="PROGRAM"&&zu(Ue),Hn.type==="BPROGRAM"&&Nh(Ue),Hn.type==="COMBINATION"&&aa(Ue,zt),Hn.type==="PRACTICAL"&&Ml(Ue),ce.createElement(mt.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((Wt=Vt==null?void 0:Vt.exam)==null?void 0:Wt.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(Hn.type)&&ce.createElement(dt.Z,null,ce.createElement(eh.Z,{state:Ue==null?void 0:Ue.is_wrong,onClick:()=>{po==null||po({value:$s(Ws({},Ue),{question_id:Ue==null?void 0:Ue.id,question_score:Ue==null?void 0:Ue.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(Hn.type)&&(Ue==null?void 0:Ue.show_resubmit)&&ce.createElement(dt.Z,null,ce.createElement(Co.C,{dataSource:$s(Ws({},Ue),{question_id:Ue==null?void 0:Ue.id})})),((Fn=Vt==null?void 0:Vt.exam)==null?void 0:Fn.exercise_status)===3&&["SINGLE"].includes(Hn.type)&&ce.createElement(dt.Z,null,ce.createElement(Ze.ZP,{style:{color:"#3061D0"},onClick:()=>{Fc({value:Ue})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),jr?ce.createElement(ys.vr,null,ce.createElement(Ae.Z,{showTotal:Je.rU,total:(er=Vt==null?void 0:Vt.exam)==null?void 0:er.total_num,pageSize:1,current:Or+1,showSizeChanger:!1,onChange:xu,showQuickJumper:!1,hideOnSinglePage:!1})):ce.createElement(ys.vr,{LeftContent:ce.createElement(ys.op,{onClick:Sn,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:ce.createElement(mt.Z,{align:"middle"},ce.createElement(te.Z,{color:"#55575D",overlayClassName:De.popover,open:Do,getPopupContainer:Hn=>Hn==null?void 0:Hn.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"},ce.createElement(ys.op,{onMouseEnter:()=>Yr(!0),onMouseLeave:()=>Yr(!1),onClick:()=>Bh(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),ce.createElement(ys.op,{shape:"default",type:"primary",onClick:()=>Ht(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),ce.createElement(Rl,{visible:ko,questionParams:Er.current,getdata:jo,onRandomExchange:()=>va(void 0,null,function*(){const Hn=Er.current;yield zr({single_question_id:Hn.id,seleted_item_bank_ids:Hn.ids},{type:Hn.type,index:Hn.index}),Yo(!1)}),selectFromProblemSet:()=>{const Hn=Er.current,yr=`${location.pathname}${location.search}`;yr.includes("exercise")&&je.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${Hn.id}&qtype=${Hn.type}&exerciseid=${Ns.categoryId}&from=${yr}`)},onCancel:()=>{Yo(!1)}}))}},76175:function(Cn,un,ve){"use strict";ve.r(un),ve.d(un,{default:function(){return se}});var ce=ve(59301),De=ve(89070),ze={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"},wt=ve(92744),Ze=ve(8591),ht=ve(61621),Me=ve(99064),yt=ve(955),ct=ve(59301),He=Object.defineProperty,st=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Ae=(de,me,we)=>me in de?He(de,me,{enumerable:!0,configurable:!0,writable:!0,value:we}):de[me]=we,te=(de,me)=>{for(var we in me||(me={}))mt.call(me,we)&&Ae(de,we,me[we]);if(st)for(var we of st(me))dt.call(me,we)&&Ae(de,we,me[we]);return de},ee=(de,me,we)=>new Promise((Ne,Fe)=>{var Ie=Ke=>{try{Je(we.next(Ke))}catch(gt){Fe(gt)}},je=Ke=>{try{Je(we.throw(Ke))}catch(gt){Fe(gt)}},Je=Ke=>Ke.done?Ne(Ke.value):Promise.resolve(Ke.value).then(Ie,je);Je((we=we.apply(de,me)).next())});const he=({paperlibrary:de,user:me,globalSetting:we,dispatch:Ne,location:Fe})=>{var Ie,je,Je,Ke;const[gt]=(0,De.useSearchParams)(),Re=gt.get("select")||0,[At,qe]=(0,ce.useState)(!1),[Et,kt]=(0,ce.useState)(!0),[Bt,Gt]=(0,ce.useState)(Number(Re)),[Ut,lt]=(0,ce.useState)({}),$e=(0,De.useParams)(),{userInfo:Nt}=me,{actionTabs:cn}=de;(0,ce.useEffect)(()=>(Ne({type:"globalSetting/footerToggle",payload:!1}),()=>{Ne({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,ce.useEffect)(()=>(Ne({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Ne({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),Ne({type:"exercise/getWorkSetting",payload:te({},$e)}),()=>{Ne({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Ne({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}),[]),(0,ce.useEffect)(()=>{sn(Bt)},[]),(0,ce.useEffect)(()=>{var Mn;(Mn=cn==null?void 0:cn.params)!=null&&Mn.isUpdateData&&sn(Bt)},[(Ie=cn==null?void 0:cn.params)==null?void 0:Ie.isUpdateData]);const sn=(Mn=0)=>ee(void 0,null,function*(){console.log($e),kt(!0);const pt=yield(0,Me.ZP)(`/api/exercises/${$e.categoryId}/preview_random_exercise.json`,{method:"get",params:{num:Mn}});Ne({type:"paperlibrary/setActionTabs",payload:{params:{isUpdateData:!1}}}),kt(!1),lt((0,yt.PF)(pt))}),Ft=()=>{De.history.push(`/classrooms/${$e.coursesId}/exercise`)},$t=()=>{alert("\u4FDD\u5B58")},en=(Mn,pt)=>ee(void 0,null,function*(){const Ln=yield(0,Me.ZP)(`/api/exercises/${$e.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:Mn==null?void 0:Mn.single_question_id}});Ln!=null&&Ln.question&&(Ze.ZP.info("\u6362\u9898\u6210\u529F"),sn(Bt))}),Nn=Mn=>ee(void 0,null,function*(){document.body.scrollIntoView(),Gt(Mn),yield sn(Mn)}),fn=Mn=>{Ne({type:"exercise/setActionTabs",payload:{key:"\u6807\u8BB0\u9519\u9898",params:Mn}})};return console.log((0,De.useLocation)(),"location333"),ct.createElement("section",{className:ze.wrap},ct.createElement(ht.Z,{loading:Et,active:!0,paragraph:{rows:5}},((Je=(je=(0,De.useLocation)())==null?void 0:je.pathname)==null?void 0:Je.includes("preview"))&&ct.createElement("div",{className:ze.crumbs},ct.createElement("b",null),ct.createElement("span",{className:"current",onClick:()=>De.history.push(`/classrooms/${$e.coursesId}/exercise`)},`${(Ke=Nt==null?void 0:Nt.course)==null?void 0:Ke.course_name}>`),ct.createElement("span",{className:"current",onClick:()=>De.history.push(`/classrooms/${$e.coursesId}/exercise`)},"\u8BD5\u5377\u5217\u8868>"),ct.createElement("span",{style:{color:"#bebebe"}},"\u9884\u89C8")),ct.createElement(wt.Z,{loading:At,submit:$t,goBack:Ft,data:Ut,getdata:()=>{sn(Bt)},selectValue:Bt,editPreview:!0,onExchange:en,onSkipExamination:Nn,handleMarkWrongQuestion:fn})))};var se=(0,De.connect)(({paperlibrary:de,user:me,globalSetting:we})=>({paperlibrary:de,user:me,globalSetting:we}))(he)},94860:function(Cn,un,ve){"use strict";ve.d(un,{g:function(){return Ze}});var ce=ve(59301),De=ve(80401),ze=ve(26422),wt=(ht,Me,yt)=>new Promise((ct,He)=>{var st=Ae=>{try{dt(yt.next(Ae))}catch(te){He(te)}},mt=Ae=>{try{dt(yt.throw(Ae))}catch(te){He(te)}},dt=Ae=>Ae.done?ct(Ae.value):Promise.resolve(Ae.value).then(st,mt);dt((yt=yt.apply(ht,Me)).next())});const Ze=()=>{const[ht,Me]=(0,ce.useState)([]);return(0,ce.useEffect)(()=>{wt(void 0,null,function*(){const ct=yield(0,De.d1)({source:"question"});ct!=null&&ct.disciplines&&Me((0,ze.L)(ct==null?void 0:ct.disciplines))})},[]),ht}},83312:function(Cn,un,ve){"use strict";ve.d(un,{U:function(){return ct}});var ce=ve(59301),De=Object.defineProperty,ze=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,ht=(He,st,mt)=>st in He?De(He,st,{enumerable:!0,configurable:!0,writable:!0,value:mt}):He[st]=mt,Me=(He,st)=>{for(var mt in st||(st={}))wt.call(st,mt)&&ht(He,mt,st[mt]);if(ze)for(var mt of ze(st))Ze.call(st,mt)&&ht(He,mt,st[mt]);return He},yt=(He,st,mt)=>new Promise((dt,Ae)=>{var te=se=>{try{he(mt.next(se))}catch(de){Ae(de)}},ee=se=>{try{he(mt.throw(se))}catch(de){Ae(de)}},he=se=>se.done?dt(se.value):Promise.resolve(se.value).then(te,ee);he((mt=mt.apply(He,st)).next())});function ct(He,st){const[mt,dt]=(0,ce.useState)(st),[Ae,te]=(0,ce.useState)(!1),[ee,he]=(0,ce.useState)();return[mt,Ae,(de,me=!1)=>yt(this,null,function*(){const we=me?st:Me(Me({},mt),de);te(!0),dt(we);const Ne=yield He(we);return te(!1),he(Ne),Ne}),ee,he]}},24768:function(Cn,un,ve){"use strict";ve.d(un,{AL:function(){return we},Iy:function(){return st},Qv:function(){return Ae},ez:function(){return me},jb:function(){return mt}});var ce=ve(32834),De=ve.n(ce),ze=ve(11690),wt=ve.n(ze);let Ze=1;function ht(Je,Ke){const gt=Je.match(/^(\s+)(?:```)/);if(gt===null)return Ke;const Re=gt[1];return Ke.split(`
|
|
|
`).map(At=>{const qe=At.match(/^\s+/);if(qe===null)return At;const[Et]=qe;return Et.length>=Re.length?At.slice(Re.length):At}).join(`
|
|
|
`)}let Me=[],yt=["<ul>"];const ct=new(De()).Renderer,He=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function st(){Me.length=0,yt=["<ul>"]}const mt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function dt(Je,Ke,gt,Re){if(Ke>=Je.length||Je[Ke].level<=gt)return Ke;var At=Je[Ke];Re.push("<li><a href='#"+Ze+At.anchor+"'>"+At.text+"</a>"),Ke++;var qe=[];return Ke=dt(Je,Ke,At.level,qe),qe.length>0&&(Re.push("<ul>"),qe.forEach(function(Et){Re.push(Et)}),Re.push("</ul>")),Re.push("</li>"),Ke=dt(Je,Ke,gt,Re),Ke}function Ae(){return dt(Me,0,0,yt),yt.push("</ul>"),yt.join("")}const te={heading(Je){const Ke=He.exec(Je);if(Ze+=1,Ke)return{type:"heading",raw:Ke[0],depth:Ke[1].length,text:Ke[2]}},fences(Je){const Ke=this.rules.block.fences.exec(Je);if(Ke){const gt=Ke[0];let Re=ht(gt,Ke[3]||"");const At=Ke[2]?Ke[2].trim():Ke[2];if(["latex","katex","math"].indexOf(At)>=0){const qe=se(),Et=Re;Re=qe,de[qe]={type:"block",expression:Et}}return{type:"code",raw:gt,lang:At,text:Re}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let he=0;const se=()=>`__special_katext_id_${he++}__`;let de={};function me(){return de}function we(){he=0,de={}}function Ne(Je){return Je=Je.replace(ee,(Ke,gt)=>{const Re=se();return de[Re]={type:"inline",expression:gt},Re}),Je}const Fe=ct.listitem;ct.listitem=function(Je){return Fe(Ne(Je))};const Ie=ct.paragraph;ct.paragraph=function(Je){return Ie(Ne(Je))};const je=ct.tablecell;ct.tablecell=function(Je,Ke){return je(Ne(Je),Ke)},ct.code=function(Je,Ke,gt){const Re=(Ke||"").match(/\S*/)[0];return Re?["latex","katex","math"].indexOf(Re)>=0?`<p class='editormd-tex'>${Je}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ke}">${gt?Je:(0,ze.escape)(Je,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(gt?Je:(0,ze.escape)(Je,!0))+"</code></pre>"},ct.heading=function(Je,Ke,gt){let Re=this.options.headerPrefix+gt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Me.push({anchor:Re,level:Ke,text:Je}),"<h"+Ke+' id="'+Ze+Re+'">'+Je+"</h"+Ke+">"},De().setOptions({silent:!0,gfm:!0,pedantic:!1}),De().use({tokenizer:te,renderer:ct}),un.ZP=De()},50371:function(Cn,un){"use strict";function ve(){const ce=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let De=1;De<arguments.length;De++){const ze=De<0||arguments.length<=De?void 0:arguments[De];ze&&Object.keys(ze).forEach(wt=>{const Ze=ze[wt];Ze!==void 0&&(ce[wt]=Ze)})}return ce}un.Z=ve},77578:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return ce}});const ce=De=>De?typeof De=="function"?De():De:null},13845:function(Cn,un,ve){"use strict";ve.d(un,{F:function(){return ce},Z:function(){return De}});function ce(ze){return ze!=null&&ze===ze.window}function De(ze,wt){var Ze,ht;if(typeof window=="undefined")return 0;const Me=wt?"scrollTop":"scrollLeft";let yt=0;return ce(ze)?yt=ze[wt?"pageYOffset":"pageXOffset"]:ze instanceof Document?yt=ze.documentElement[Me]:(ze instanceof HTMLElement||ze)&&(yt=ze[Me]),ze&&!ce(ze)&&typeof yt!="number"&&(yt=(ht=((Ze=ze.ownerDocument)!==null&&Ze!==void 0?Ze:ze).documentElement)===null||ht===void 0?void 0:ht[Me]),yt}},56762:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return De}});var ce=ve(59301);function De(){const[,ze]=ce.useReducer(wt=>wt+1,0);return ze}},68031:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return wt}});var ce=ve(16089);function De(Ze,ht,Me,yt){const ct=Me-ht;return Ze/=yt/2,Ze<1?ct/2*Ze*Ze*Ze+ht:ct/2*((Ze-=2)*Ze*Ze+2)+ht}var ze=ve(13845);function wt(Ze){let ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Me=()=>window,callback:yt,duration:ct=450}=ht,He=Me(),st=(0,ze.Z)(He,!0),mt=Date.now(),dt=()=>{const te=Date.now()-mt,ee=De(te>ct?ct:te,st,Ze,ct);(0,ze.F)(He)?He.scrollTo(window.pageXOffset,ee):He instanceof Document||He.constructor.name==="HTMLDocument"?He.documentElement.scrollTop=ee:He.scrollTop=ee,te<ct?(0,ce.Z)(dt):typeof yt=="function"&&yt()};(0,ce.Z)(dt)}},19842:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Hi}});var ce=ve(80702),De=ve(59301),ze=ve(33853),wt=ve(58617),Ze=ve(38819),ht=ve(92310),Me=ve.n(ht),yt=ve(72308),ct=ve(52487),He=ve(74416),st=ve(77861),mt=ve(17115),dt=ve(90782),Ae=ve(6089),te=ve(18929),ee=De.createContext(null),he=ee,se=ve(62853),de=ve(49618),me=ve(77321),we="__rc_cascader_search_mark__",Ne=function(oi,vi,Fi){var Vn=Fi.label;return vi.some(function(bn){return String(bn[Vn]).toLowerCase().includes(oi.toLowerCase())})},Fe=function(oi,vi,Fi,Vn){return vi.map(function(bn){return bn[Vn.label]}).join(" / ")},Ie=function(dn,oi,vi,Fi,Vn,bn){var Mt=Vn.filter,Ot=Mt===void 0?Ne:Mt,Ve=Vn.render,Yt=Ve===void 0?Fe:Ve,qt=Vn.limit,xt=qt===void 0?50:qt,nt=Vn.sort;return De.useMemo(function(){var Kt=[];if(!dn)return[];function ln(xn,On){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;xn.forEach(function(gn){if(!(!nt&&xt!==!1&&xt>0&&Kt.length>=xt)){var Rn=[].concat((0,ce.Z)(On),[gn]),ai=gn[vi.children],hn=St||gn.disabled;if((!ai||ai.length===0||bn)&&Ot(dn,Rn,{label:vi.label})){var Jt;Kt.push((0,me.Z)((0,me.Z)({},gn),{},(Jt={disabled:hn},(0,de.Z)(Jt,vi.label,Yt(dn,Rn,Fi,vi)),(0,de.Z)(Jt,we,Rn),(0,de.Z)(Jt,vi.children,void 0),Jt)))}ai&&ln(gn[vi.children],Rn,hn)}})}return ln(oi,[]),nt&&Kt.sort(function(xn,On){return nt(xn[we],On[we],dn,vi)}),xt!==!1&&xt>0?Kt.slice(0,xt):Kt},[dn,oi,vi,Fi,Yt,bn,Ot,nt,xt])},je="__RC_CASCADER_SPLIT__",Je="SHOW_PARENT",Ke="SHOW_CHILD";function gt(dn){return dn.join(je)}function Re(dn){return dn.map(gt)}function At(dn){return dn.split(je)}function qe(dn){var oi=dn||{},vi=oi.label,Fi=oi.value,Vn=oi.children,bn=Fi||"value";return{label:vi||"label",value:bn,key:bn,children:Vn||"children"}}function Et(dn,oi){var vi,Fi;return(vi=dn.isLeaf)!==null&&vi!==void 0?vi:!((Fi=dn[oi.children])!==null&&Fi!==void 0&&Fi.length)}function kt(dn){var oi=dn.parentElement;if(oi){var vi=dn.offsetTop-oi.offsetTop;vi-oi.scrollTop<0?oi.scrollTo({top:vi}):vi+dn.offsetHeight-oi.scrollTop>oi.offsetHeight&&oi.scrollTo({top:vi+dn.offsetHeight-oi.offsetHeight})}}function Bt(dn,oi){return dn.map(function(vi){var Fi;return(Fi=vi[we])===null||Fi===void 0?void 0:Fi.map(function(Vn){return Vn[oi.value]})})}function Gt(dn,oi,vi){var Fi=new Set(dn),Vn=oi();return dn.filter(function(bn){var Mt=Vn[bn],Ot=Mt?Mt.parent:null,Ve=Mt?Mt.children:null;return Mt&&Mt.node.disabled?!0:vi===Ke?!(Ve&&Ve.some(function(Yt){return Yt.key&&Fi.has(Yt.key)})):!(Ot&&!Ot.node.disabled&&Fi.has(Ot.key))})}function Ut(dn,oi,vi){for(var Fi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Vn=oi,bn=[],Mt=function(){var Yt,qt,xt,nt=dn[Ot],Kt=(Yt=Vn)===null||Yt===void 0?void 0:Yt.findIndex(function(xn){var On=xn[vi.value];return Fi?String(On)===String(nt):On===nt}),ln=Kt!==-1?(qt=Vn)===null||qt===void 0?void 0:qt[Kt]:null;bn.push({value:(xt=ln==null?void 0:ln[vi.value])!==null&&xt!==void 0?xt:nt,index:Kt,option:ln}),Vn=ln==null?void 0:ln[vi.children]},Ot=0;Ot<dn.length;Ot+=1)Mt();return bn}var lt=function(dn,oi,vi,Fi,Vn){return De.useMemo(function(){var bn=Vn||function(Mt){var Ot=Fi?Mt.slice(-1):Mt,Ve=" / ";return Ot.every(function(Yt){return["string","number"].includes((0,se.Z)(Yt))})?Ot.join(Ve):Ot.reduce(function(Yt,qt,xt){var nt=De.isValidElement(qt)?De.cloneElement(qt,{key:xt}):qt;return xt===0?[nt]:[].concat((0,ce.Z)(Yt),[Ve,nt])},[])};return dn.map(function(Mt){var Ot,Ve,Yt=Ut(Mt,oi,vi),qt=bn(Yt.map(function(nt){var Kt,ln=nt.option,xn=nt.value;return(Kt=ln==null?void 0:ln[vi.label])!==null&&Kt!==void 0?Kt:xn}),Yt.map(function(nt){var Kt=nt.option;return Kt})),xt=gt(Mt);return{label:qt,value:xt,key:xt,valueCells:Mt,disabled:(Ot=Yt[Yt.length-1])===null||Ot===void 0||(Ve=Ot.option)===null||Ve===void 0?void 0:Ve.disabled}})},[dn,oi,vi,Vn,Fi])},$e=ve(71430),Nt=function(dn,oi){var vi=De.useRef({options:null,info:null}),Fi=De.useCallback(function(){return vi.current.options!==dn&&(vi.current.options=dn,vi.current.info=(0,$e.I8)(dn,{fieldNames:oi,initWrapper:function(bn){return(0,me.Z)((0,me.Z)({},bn),{},{pathKeyEntities:{}})},processEntity:function(bn,Mt){var Ot=bn.nodes.map(function(Ve){return Ve[oi.value]}).join(je);Mt.pathKeyEntities[Ot]=bn,bn.key=Ot}})),vi.current.info.pathKeyEntities},[oi,dn]);return Fi},cn=function(dn,oi){return De.useCallback(function(vi){var Fi=[],Vn=[];return vi.forEach(function(bn){var Mt=Ut(bn,dn,oi);Mt.every(function(Ot){return Ot.option})?Vn.push(bn):Fi.push(bn)}),[Vn,Fi]},[dn,oi])},sn=ve(48736);function Ft(dn){return De.useMemo(function(){if(!dn)return[!1,{}];var oi={matchInputWidth:!0,limit:50};return dn&&(0,se.Z)(dn)==="object"&&(oi=(0,me.Z)((0,me.Z)({},oi),dn)),oi.limit<=0&&delete oi.limit,[!0,oi]},[dn])}var $t=De.memo(function(dn){var oi=dn.children;return oi},function(dn,oi){return!oi.open}),en=$t;function Nn(dn){var oi,vi=dn.prefixCls,Fi=dn.checked,Vn=dn.halfChecked,bn=dn.disabled,Mt=dn.onClick,Ot=dn.disableCheckbox,Ve=De.useContext(he),Yt=Ve.checkable,qt=typeof Yt!="boolean"?Yt:null;return De.createElement("span",{className:Me()("".concat(vi),(oi={},(0,de.Z)(oi,"".concat(vi,"-checked"),Fi),(0,de.Z)(oi,"".concat(vi,"-indeterminate"),!Fi&&Vn),(0,de.Z)(oi,"".concat(vi,"-disabled"),bn||Ot),oi)),onClick:Mt},qt)}var fn="__cascader_fix_label__";function Mn(dn){var oi=dn.prefixCls,vi=dn.multiple,Fi=dn.options,Vn=dn.activeValue,bn=dn.prevValuePath,Mt=dn.onToggleOpen,Ot=dn.onSelect,Ve=dn.onActive,Yt=dn.checkedSet,qt=dn.halfCheckedSet,xt=dn.loadingKeys,nt=dn.isSelectable,Kt=dn.searchValue,ln="".concat(oi,"-menu"),xn="".concat(oi,"-menu-item"),On=De.useContext(he),St=On.fieldNames,gn=On.changeOnSelect,Rn=On.expandTrigger,ai=On.expandIcon,hn=On.loadingIcon,Jt=On.dropdownMenuColumnStyle,Xn=Rn==="hover",si=De.useMemo(function(){return Fi.map(function(ui){var Qn,di=ui.disabled,hi=ui.disableCheckbox,Ri=ui[we],Xi=(Qn=ui[fn])!==null&&Qn!==void 0?Qn:ui[St.label],tr=ui[St.value],yn=Et(ui,St),Br=Ri?Ri.map(function(Si){return Si[St.value]}):[].concat((0,ce.Z)(bn),[tr]),br=gt(Br),Wr=xt.includes(br),mn=Yt.has(br),_n=qt.has(br);return{disabled:di,label:Xi,value:tr,isLeaf:yn,isLoading:Wr,checked:mn,halfChecked:_n,option:ui,disableCheckbox:hi,fullPath:Br,fullPathKey:br}})},[Fi,Yt,St,qt,xt,bn]);return De.createElement("ul",{className:ln,role:"menu"},si.map(function(ui){var Qn,di=ui.disabled,hi=ui.label,Ri=ui.value,Xi=ui.isLeaf,tr=ui.isLoading,yn=ui.checked,Br=ui.halfChecked,br=ui.option,Wr=ui.fullPath,mn=ui.fullPathKey,_n=ui.disableCheckbox,Si=function(){if(!(di||Kt)){var ar=(0,ce.Z)(Wr);Xn&&Xi&&ar.pop(),Ve(ar)}},zi=function(){nt(br)&&Ot(Wr,Xi)},Ni;return typeof br.title=="string"?Ni=br.title:typeof hi=="string"&&(Ni=hi),De.createElement("li",{key:mn,className:Me()(xn,(Qn={},(0,de.Z)(Qn,"".concat(xn,"-expand"),!Xi),(0,de.Z)(Qn,"".concat(xn,"-active"),Vn===Ri||Vn===mn),(0,de.Z)(Qn,"".concat(xn,"-disabled"),di),(0,de.Z)(Qn,"".concat(xn,"-loading"),tr),Qn)),style:Jt,role:"menuitemcheckbox",title:Ni,"aria-checked":yn,"data-path-key":mn,onClick:function(){Si(),!_n&&(!vi||Xi)&&zi()},onDoubleClick:function(){gn&&Mt(!1)},onMouseEnter:function(){Xn&&Si()},onMouseDown:function(ar){ar.preventDefault()}},vi&&De.createElement(Nn,{prefixCls:"".concat(oi,"-checkbox"),checked:yn,halfChecked:Br,disabled:di||_n,disableCheckbox:_n,onClick:function(ar){_n||(ar.stopPropagation(),zi())}}),De.createElement("div",{className:"".concat(xn,"-content")},hi),!tr&&ai&&!Xi&&De.createElement("div",{className:"".concat(xn,"-expand-icon")},ai),tr&&hn&&De.createElement("div",{className:"".concat(xn,"-loading-icon")},hn))}))}var pt=function(){var dn=(0,st.lk)(),oi=dn.multiple,vi=dn.open,Fi=De.useContext(he),Vn=Fi.values,bn=De.useState([]),Mt=(0,ct.Z)(bn,2),Ot=Mt[0],Ve=Mt[1];return De.useEffect(function(){if(vi&&!oi){var Yt=Vn[0];Ve(Yt||[])}},[vi]),[Ot,Ve]},Ln=ve(10228),Un=function(dn,oi,vi,Fi,Vn,bn){var Mt=(0,st.lk)(),Ot=Mt.direction,Ve=Mt.searchValue,Yt=Mt.toggleOpen,qt=Mt.open,xt=Ot==="rtl",nt=De.useMemo(function(){for(var Jt=-1,Xn=oi,si=[],ui=[],Qn=Fi.length,di=Bt(oi,vi),hi=function(br){var Wr=Xn.findIndex(function(mn,_n){return(di[_n]?gt(di[_n]):mn[vi.value])===Fi[br]});if(Wr===-1)return"break";Jt=Wr,si.push(Jt),ui.push(Fi[br]),Xn=Xn[Jt][vi.children]},Ri=0;Ri<Qn&&Xn;Ri+=1){var Xi=hi(Ri);if(Xi==="break")break}for(var tr=oi,yn=0;yn<si.length-1;yn+=1)tr=tr[si[yn]][vi.children];return[ui,Jt,tr,di]},[Fi,vi,oi]),Kt=(0,ct.Z)(nt,4),ln=Kt[0],xn=Kt[1],On=Kt[2],St=Kt[3],gn=function(Xn){Vn(Xn)},Rn=function(Xn){var si=On.length,ui=xn;ui===-1&&Xn<0&&(ui=si);for(var Qn=0;Qn<si;Qn+=1){ui=(ui+Xn+si)%si;var di=On[ui];if(di&&!di.disabled){var hi=ln.slice(0,-1).concat(St[ui]?gt(St[ui]):di[vi.value]);gn(hi);return}}},ai=function(){if(ln.length>1){var Xn=ln.slice(0,-1);gn(Xn)}else Yt(!1)},hn=function(){var Xn,si=((Xn=On[xn])===null||Xn===void 0?void 0:Xn[vi.children])||[],ui=si.find(function(di){return!di.disabled});if(ui){var Qn=[].concat((0,ce.Z)(ln),[ui[vi.value]]);gn(Qn)}};De.useImperativeHandle(dn,function(){return{onKeyDown:function(Xn){var si=Xn.which;switch(si){case Ln.Z.UP:case Ln.Z.DOWN:{var ui=0;si===Ln.Z.UP?ui=-1:si===Ln.Z.DOWN&&(ui=1),ui!==0&&Rn(ui);break}case Ln.Z.LEFT:{if(Ve)break;xt?hn():ai();break}case Ln.Z.RIGHT:{if(Ve)break;xt?ai():hn();break}case Ln.Z.BACKSPACE:{Ve||ai();break}case Ln.Z.ENTER:{if(ln.length){var Qn=On[xn],di=(Qn==null?void 0:Qn[we])||[];di.length?bn(di.map(function(hi){return hi[vi.value]}),di[di.length-1]):bn(ln,On[xn])}break}case Ln.Z.ESC:Yt(!1),qt&&Xn.stopPropagation()}},onKeyUp:function(){}}})},Zt=De.forwardRef(function(dn,oi){var vi,Fi,Vn,bn,Mt=(0,st.lk)(),Ot=Mt.prefixCls,Ve=Mt.multiple,Yt=Mt.searchValue,qt=Mt.toggleOpen,xt=Mt.notFoundContent,nt=Mt.direction,Kt=Mt.open,ln=De.useRef(),xn=nt==="rtl",On=De.useContext(he),St=On.options,gn=On.values,Rn=On.halfValues,ai=On.fieldNames,hn=On.changeOnSelect,Jt=On.onSelect,Xn=On.searchOptions,si=On.dropdownPrefixCls,ui=On.loadData,Qn=On.expandTrigger,di=si||Ot,hi=De.useState([]),Ri=(0,ct.Z)(hi,2),Xi=Ri[0],tr=Ri[1],yn=function(Bi){if(!(!ui||Yt)){var Po=Ut(Bi,St,ai),ao=Po.map(function(Zr){var ro=Zr.option;return ro}),Ki=ao[ao.length-1];if(Ki&&!Et(Ki,ai)){var qi=gt(Bi);tr(function(Zr){return[].concat((0,ce.Z)(Zr),[qi])}),ui(ao)}}};De.useEffect(function(){Xi.length&&Xi.forEach(function(co){var Bi=At(co),Po=Ut(Bi,St,ai,!0).map(function(Ki){var qi=Ki.option;return qi}),ao=Po[Po.length-1];(!ao||ao[ai.children]||Et(ao,ai))&&tr(function(Ki){return Ki.filter(function(qi){return qi!==co})})})},[St,Xi,ai]);var Br=De.useMemo(function(){return new Set(Re(gn))},[gn]),br=De.useMemo(function(){return new Set(Re(Rn))},[Rn]),Wr=pt(),mn=(0,ct.Z)(Wr,2),_n=mn[0],Si=mn[1],zi=function(Bi){Si(Bi),yn(Bi)},Ni=function(Bi){var Po=Bi.disabled,ao=Et(Bi,ai);return!Po&&(ao||hn||Ve)},ji=function(Bi,Po){var ao=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Jt(Bi),!Ve&&(Po||hn&&(Qn==="hover"||ao))&&qt(!1)},ar=De.useMemo(function(){return Yt?Xn:St},[Yt,Xn,St]),Qi=De.useMemo(function(){for(var co=[{options:ar}],Bi=ar,Po=Bt(Bi,ai),ao=function(){var ro=_n[Ki],wi=Bi.find(function(uo,Zo){return(Po[Zo]?gt(Po[Zo]):uo[ai.value])===ro}),Qe=wi==null?void 0:wi[ai.children];if(!(Qe!=null&&Qe.length))return"break";Bi=Qe,co.push({options:Qe})},Ki=0;Ki<_n.length;Ki+=1){var qi=ao();if(qi==="break")break}return co},[ar,_n,ai]),nr=function(Bi,Po){Ni(Po)&&ji(Bi,Et(Po,ai),!0)};Un(oi,ar,ai,_n,zi,nr),De.useEffect(function(){for(var co=0;co<_n.length;co+=1){var Bi,Po=_n.slice(0,co+1),ao=gt(Po),Ki=(Bi=ln.current)===null||Bi===void 0?void 0:Bi.querySelector('li[data-path-key="'.concat(ao.replace(/\\{0,2}"/g,'\\"'),'"]'));Ki&&kt(Ki)}},[_n]);var hr=!((vi=Qi[0])!==null&&vi!==void 0&&(Fi=vi.options)!==null&&Fi!==void 0&&Fi.length),An=[(Vn={},(0,de.Z)(Vn,ai.value,"__EMPTY__"),(0,de.Z)(Vn,fn,xt),(0,de.Z)(Vn,"disabled",!0),Vn)],Jr=(0,me.Z)((0,me.Z)({},dn),{},{multiple:!hr&&Ve,onSelect:ji,onActive:zi,onToggleOpen:qt,checkedSet:Br,halfCheckedSet:br,loadingKeys:Xi,isSelectable:Ni}),Bn=hr?[{options:An}]:Qi,_r=Bn.map(function(co,Bi){var Po=_n.slice(0,Bi),ao=_n[Bi];return De.createElement(Mn,(0,yt.Z)({key:Bi},Jr,{searchValue:Yt,prefixCls:di,options:co.options,prevValuePath:Po,activeValue:ao}))});return De.createElement(en,{open:Kt},De.createElement("div",{className:Me()("".concat(di,"-menus"),(bn={},(0,de.Z)(bn,"".concat(di,"-menu-empty"),hr),(0,de.Z)(bn,"".concat(di,"-rtl"),xn),bn)),ref:ln},_r))}),tn=Zt;function Rt(dn){var oi=dn.onPopupVisibleChange,vi=dn.popupVisible,Fi=dn.popupClassName,Vn=dn.popupPlacement;warning(!oi,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(vi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Fi===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(Vn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Lt(dn,oi){if(dn){var vi=function Fi(Vn){for(var bn=0;bn<Vn.length;bn++){var Mt=Vn[bn];if(Mt[oi==null?void 0:oi.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Mt[oi==null?void 0:oi.children])&&Fi(Mt[oi==null?void 0:oi.children]))return!0}};vi(dn)}}var ut=null,Ge=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function Dt(dn){return Array.isArray(dn)&&Array.isArray(dn[0])}function Tt(dn){return dn?Dt(dn)?dn:(dn.length===0?[]:[dn]).map(function(oi){return Array.isArray(oi)?oi:[oi]}):[]}var ot=De.forwardRef(function(dn,oi){var vi=dn.id,Fi=dn.prefixCls,Vn=Fi===void 0?"rc-cascader":Fi,bn=dn.fieldNames,Mt=dn.defaultValue,Ot=dn.value,Ve=dn.changeOnSelect,Yt=dn.onChange,qt=dn.displayRender,xt=dn.checkable,nt=dn.autoClearSearchValue,Kt=nt===void 0?!0:nt,ln=dn.searchValue,xn=dn.onSearch,On=dn.showSearch,St=dn.expandTrigger,gn=dn.options,Rn=dn.dropdownPrefixCls,ai=dn.loadData,hn=dn.popupVisible,Jt=dn.open,Xn=dn.popupClassName,si=dn.dropdownClassName,ui=dn.dropdownMenuColumnStyle,Qn=dn.popupPlacement,di=dn.placement,hi=dn.onDropdownVisibleChange,Ri=dn.onPopupVisibleChange,Xi=dn.expandIcon,tr=Xi===void 0?">":Xi,yn=dn.loadingIcon,Br=dn.children,br=dn.dropdownMatchSelectWidth,Wr=br===void 0?!1:br,mn=dn.showCheckedStrategy,_n=mn===void 0?Je:mn,Si=(0,He.Z)(dn,Ge),zi=(0,mt.ZP)(vi),Ni=!!xt,ji=(0,te.Z)(Mt,{value:Ot,postState:Tt}),ar=(0,ct.Z)(ji,2),Qi=ar[0],nr=ar[1],hr=De.useMemo(function(){return qe(bn)},[JSON.stringify(bn)]),An=De.useMemo(function(){return gn||[]},[gn]),Jr=Nt(An,hr),Bn=De.useCallback(function(Bo){var yo=Jr();return Bo.map(function(ta){var na=yo[ta].nodes;return na.map(function(Ba){return Ba[hr.value]})})},[Jr,hr]),_r=(0,te.Z)("",{value:ln,postState:function(yo){return yo||""}}),co=(0,ct.Z)(_r,2),Bi=co[0],Po=co[1],ao=function(yo,ta){Po(yo),ta.source!=="blur"&&xn&&xn(yo)},Ki=Ft(On),qi=(0,ct.Z)(Ki,2),Zr=qi[0],ro=qi[1],wi=Ie(Bi,An,hr,Rn||Vn,ro,Ve),Qe=cn(An,hr),uo=De.useMemo(function(){var Bo=Qe(Qi),yo=(0,ct.Z)(Bo,2),ta=yo[0],na=yo[1];if(!Ni||!Qi.length)return[ta,[],na];var Ba=Re(ta),ka=Jr(),is=(0,dt.S)(Ba,!0,ka),vn=is.checkedKeys,Oa=is.halfCheckedKeys;return[Bn(vn),Bn(Oa),na]},[Ni,Qi,Jr,Bn,Qe]),Zo=(0,ct.Z)(uo,3),ga=Zo[0],Pa=Zo[1],ia=Zo[2],Dr=De.useMemo(function(){var Bo=Re(ga),yo=Gt(Bo,Jr,_n);return[].concat((0,ce.Z)(ia),(0,ce.Z)(Bn(yo)))},[ga,Jr,Bn,ia,_n]),kr=lt(Dr,An,hr,Ni,qt),fo=(0,Ae.Z)(function(Bo){if(nr(Bo),Yt){var yo=Tt(Bo),ta=yo.map(function(ka){return Ut(ka,An,hr).map(function(is){return is.option})}),na=Ni?yo:yo[0],Ba=Ni?ta:ta[0];Yt(na,Ba)}}),Rr=(0,Ae.Z)(function(Bo){if((!Ni||Kt)&&Po(""),!Ni)fo(Bo);else{var yo=gt(Bo),ta=Re(ga),na=Re(Pa),Ba=ta.includes(yo),ka=ia.some(function(Cl){return gt(Cl)===yo}),is=ga,vn=ia;if(ka&&!Ba)vn=ia.filter(function(Cl){return gt(Cl)!==yo});else{var Oa=Ba?ta.filter(function(Cl){return Cl!==yo}):[].concat((0,ce.Z)(ta),[yo]),Vl=Jr(),Hs;if(Ba){var wl=(0,dt.S)(Oa,{checked:!1,halfCheckedKeys:na},Vl);Hs=wl.checkedKeys}else{var Ma=(0,dt.S)(Oa,!0,Vl);Hs=Ma.checkedKeys}var yu=Gt(Hs,Jr,_n);is=Bn(yu)}fo([].concat((0,ce.Z)(vn),(0,ce.Z)(is)))}}),To=function(yo,ta){if(ta.type==="clear"){fo([]);return}var na=ta.values[0],Ba=na.valueCells;Rr(Ba)},qa=Jt!==void 0?Jt:hn,Mr=si||Xn,sr=di||Qn,qn=function(yo){hi==null||hi(yo),Ri==null||Ri(yo)},vr=De.useMemo(function(){return{options:An,fieldNames:hr,values:ga,halfValues:Pa,changeOnSelect:Ve,onSelect:Rr,checkable:xt,searchOptions:wi,dropdownPrefixCls:Rn,loadData:ai,expandTrigger:St,expandIcon:tr,loadingIcon:yn,dropdownMenuColumnStyle:ui}},[An,hr,ga,Pa,Ve,Rr,xt,wi,Rn,ai,St,tr,yn,ui]),wo=!(Bi?wi:An).length,ua=Bi&&ro.matchInputWidth||wo?{}:{minWidth:"auto"};return De.createElement(he.Provider,{value:vr},De.createElement(st.Ac,(0,yt.Z)({},Si,{ref:oi,id:zi,prefixCls:Vn,autoClearSearchValue:Kt,dropdownMatchSelectWidth:Wr,dropdownStyle:ua,displayValues:kr,onDisplayValuesChange:To,mode:Ni?"multiple":void 0,searchValue:Bi,onSearch:ao,showSearch:Zr,OptionList:tn,emptyOptions:wo,open:qa,dropdownClassName:Mr,placement:sr,onDropdownVisibleChange:qn,getRawInputElement:function(){return Br}})))});ot.SHOW_PARENT=Je,ot.SHOW_CHILD=Ke;var et=ot,Te=et,xe=ve(2738),Se=ve(62892),Be=ve(53487),_e=ve(19080),Ee=ve(36355),ft=ve(93891),Xt=ve(1684),an=ve(19716),Qt=ve(32441),En=ve(14154),Yn=ve(58582),zn=ve(84443),Dn=ve(66339),ii=ve(33234),gi=ve(98447),pi=ve(17313),Ii=ve(74207),Yi=ve(83116);const Jn=dn=>{const{prefixCls:oi,componentCls:vi,antCls:Fi}=dn,Vn=`${vi}-menu-item`,bn=`
|
|
|
&${Vn}-expand ${Vn}-expand-icon,
|
|
|
${Vn}-loading-icon
|
|
|
`;return[{[vi]:{width:dn.controlWidth}},{[`${vi}-dropdown`]:[(0,gi.C2)(`${oi}-checkbox`,dn),{[`&${Fi}-select-dropdown`]:{padding:0}},{[vi]:{"&-checkbox":{top:0,marginInlineEnd:dn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${vi}-menu-empty`]:{[`${vi}-menu`]:{width:"100%",height:"auto",[Vn]:{color:dn.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:dn.controlItemWidth,height:dn.dropdownHeight,margin:0,padding:dn.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${dn.lineWidth}px ${dn.lineType} ${dn.colorSplit}`},"&-item":Object.assign(Object.assign({},pi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:dn.optionPadding,lineHeight:dn.lineHeight,cursor:"pointer",transition:`all ${dn.motionDurationMid}`,borderRadius:dn.borderRadiusSM,"&:hover":{background:dn.controlItemBgHover},"&-disabled":{color:dn.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[bn]:{color:dn.colorTextDisabled}},[`&-active:not(${Vn}-disabled)`]:{"&, &:hover":{fontWeight:dn.optionSelectedFontWeight,backgroundColor:dn.optionSelectedBg}},"&-content":{flex:"auto"},[bn]:{marginInlineStart:dn.paddingXXS,color:dn.colorTextDescription,fontSize:dn.fontSizeIcon},"&-keyword":{color:dn.colorHighlight}})}}}]},{[`${vi}-dropdown-rtl`]:{direction:"rtl"}},(0,Ii.c)(dn)]};var Wn=(0,Yi.Z)("Cascader",dn=>[Jn(dn)],dn=>{const oi=Math.round((dn.controlHeight-dn.fontSize*dn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:dn.controlItemBgActive,optionSelectedFontWeight:dn.fontWeightStrong,optionPadding:`${oi}px ${dn.paddingSM}px`,menuPadding:dn.paddingXXS}}),ti=function(dn,oi){var vi={};for(var Fi in dn)Object.prototype.hasOwnProperty.call(dn,Fi)&&oi.indexOf(Fi)<0&&(vi[Fi]=dn[Fi]);if(dn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vn=0,Fi=Object.getOwnPropertySymbols(dn);Vn<Fi.length;Vn++)oi.indexOf(Fi[Vn])<0&&Object.prototype.propertyIsEnumerable.call(dn,Fi[Vn])&&(vi[Fi[Vn]]=dn[Fi[Vn]]);return vi};const{SHOW_CHILD:yi,SHOW_PARENT:mi}=Te;function dr(dn,oi,vi){const Fi=dn.toLowerCase().split(oi).reduce((Mt,Ot,Ve)=>Ve===0?[Ot]:[].concat((0,ce.Z)(Mt),[oi,Ot]),[]),Vn=[];let bn=0;return Fi.forEach((Mt,Ot)=>{const Ve=bn+Mt.length;let Yt=dn.slice(bn,Ve);bn=Ve,Ot%2===1&&(Yt=De.createElement("span",{className:`${vi}-menu-item-keyword`,key:`separator-${Ot}`},Yt)),Vn.push(Yt)}),Vn}const mr=(dn,oi,vi,Fi)=>{const Vn=[],bn=dn.toLowerCase();return oi.forEach((Mt,Ot)=>{Ot!==0&&Vn.push(" / ");let Ve=Mt[Fi.label];const Yt=typeof Ve;(Yt==="string"||Yt==="number")&&(Ve=dr(String(Ve),bn,vi)),Vn.push(Ve)}),Vn},be=De.forwardRef((dn,oi)=>{const{prefixCls:vi,size:Fi,disabled:Vn,className:bn,rootClassName:Mt,multiple:Ot,bordered:Ve=!0,transitionName:Yt,choiceTransitionName:qt="",popupClassName:xt,dropdownClassName:nt,expandIcon:Kt,placement:ln,showSearch:xn,allowClear:On=!0,notFoundContent:St,direction:gn,getPopupContainer:Rn,status:ai,showArrow:hn,builtinPlacements:Jt,style:Xn}=dn,si=ti(dn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),ui=(0,xe.Z)(si,["suffixIcon"]),{getPopupContainer:Qn,getPrefixCls:di,renderEmpty:hi,direction:Ri,popupOverflow:Xi,cascader:tr}=De.useContext(Ee.E_),yn=gn||Ri,Br=yn==="rtl",{status:br,hasFeedback:Wr,isFormItemInput:mn,feedbackIcon:_n}=De.useContext(Qt.aM),Si=(0,_e.F)(br,ai),zi=St||(hi==null?void 0:hi("Cascader"))||De.createElement(ft.Z,{componentName:"Cascader"}),Ni=di(),ji=di("select",vi),ar=di("cascader",vi),[Qi,nr]=(0,En.Z)(ji),[hr]=Wn(ar),{compactSize:An,compactItemClassnames:Jr}=(0,ii.ri)(ji,gn),Bn=Me()(xt||nt,`${ar}-dropdown`,{[`${ar}-dropdown-rtl`]:yn==="rtl"},Mt,nr),_r=De.useMemo(()=>{if(!xn)return xn;let ia={render:mr};return typeof xn=="object"&&(ia=Object.assign(Object.assign({},ia),xn)),ia},[xn]),co=(0,an.Z)(ia=>{var Dr;return(Dr=Fi!=null?Fi:An)!==null&&Dr!==void 0?Dr:ia}),Bi=De.useContext(Xt.Z),Po=Vn!=null?Vn:Bi;let ao=Kt;Kt||(ao=Br?De.createElement(ze.Z,null):De.createElement(Ze.Z,null));const Ki=De.createElement("span",{className:`${ji}-menu-item-loading-icon`},De.createElement(wt.Z,{spin:!0})),qi=De.useMemo(()=>Ot?De.createElement("span",{className:`${ar}-checkbox-inner`}):!1,[Ot]),Zr=(0,zn.Z)(dn.suffixIcon,hn),{suffixIcon:ro,removeIcon:wi,clearIcon:Qe}=(0,Dn.Z)(Object.assign(Object.assign({},dn),{hasFeedback:Wr,feedbackIcon:_n,showSuffixIcon:Zr,multiple:Ot,prefixCls:ji,componentName:"Cascader"})),uo=De.useMemo(()=>ln!==void 0?ln:Br?"bottomRight":"bottomLeft",[ln,Br]),Zo=(0,Yn.Z)(Jt,Xi),ga=On===!0?{clearIcon:Qe}:On,Pa=De.createElement(Te,Object.assign({prefixCls:ji,className:Me()(!vi&&ar,{[`${ji}-lg`]:co==="large",[`${ji}-sm`]:co==="small",[`${ji}-rtl`]:Br,[`${ji}-borderless`]:!Ve,[`${ji}-in-form-item`]:mn},(0,_e.Z)(ji,Si,Wr),Jr,tr==null?void 0:tr.className,bn,Mt,nr),disabled:Po,style:Object.assign(Object.assign({},tr==null?void 0:tr.style),Xn)},ui,{builtinPlacements:Zo,direction:yn,placement:uo,notFoundContent:zi,allowClear:ga,showSearch:_r,expandIcon:ao,suffixIcon:ro,removeIcon:wi,loadingIcon:Ki,checkable:qi,dropdownClassName:Bn,dropdownPrefixCls:vi||ar,choiceTransitionName:(0,Se.m)(Ni,"",qt),transitionName:(0,Se.m)(Ni,"slide-up",Yt),getPopupContainer:Rn||Qn,ref:oi}));return hr(Qi(Pa))}),ci=(0,Be.Z)(be);be.SHOW_PARENT=mi,be.SHOW_CHILD=yi,be._InternalPanelDoNotUseOrYouWillBeFired=ci;var Hi=be},24905:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return Ie}});var ce=ve(92310),De=ve.n(ce),ze=ve(5630),wt=ve(59301),Ze=ve(36355),ht=ve(1684),Me=ve(32441),ct=wt.createContext(null),He=ve(98447),st=ve(14088),mt=ve(4572),dt=function(je,Je){var Ke={};for(var gt in je)Object.prototype.hasOwnProperty.call(je,gt)&&Je.indexOf(gt)<0&&(Ke[gt]=je[gt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,gt=Object.getOwnPropertySymbols(je);Re<gt.length;Re++)Je.indexOf(gt[Re])<0&&Object.prototype.propertyIsEnumerable.call(je,gt[Re])&&(Ke[gt[Re]]=je[gt[Re]]);return Ke};const Ae=(je,Je)=>{var Ke;const{prefixCls:gt,className:Re,rootClassName:At,children:qe,indeterminate:Et=!1,style:kt,onMouseEnter:Bt,onMouseLeave:Gt,skipGroup:Ut=!1,disabled:lt}=je,$e=dt(je,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Nt,direction:cn,checkbox:sn}=wt.useContext(Ze.E_),Ft=wt.useContext(ct),{isFormItemInput:$t}=wt.useContext(Me.aM),en=wt.useContext(ht.Z),Nn=(Ke=(Ft==null?void 0:Ft.disabled)||lt)!==null&&Ke!==void 0?Ke:en,fn=wt.useRef($e.value);wt.useEffect(()=>{Ft==null||Ft.registerValue($e.value)},[]),wt.useEffect(()=>{if(!Ut)return $e.value!==fn.current&&(Ft==null||Ft.cancelValue(fn.current),Ft==null||Ft.registerValue($e.value),fn.current=$e.value),()=>Ft==null?void 0:Ft.cancelValue($e.value)},[$e.value]);const Mn=Nt("checkbox",gt),[pt,Ln]=(0,He.ZP)(Mn),Un=Object.assign({},$e);Ft&&!Ut&&(Un.onChange=function(){$e.onChange&&$e.onChange.apply($e,arguments),Ft.toggleOption&&Ft.toggleOption({label:qe,value:$e.value})},Un.name=Ft.name,Un.checked=Ft.value.includes($e.value));const Zt=De()(`${Mn}-wrapper`,{[`${Mn}-rtl`]:cn==="rtl",[`${Mn}-wrapper-checked`]:Un.checked,[`${Mn}-wrapper-disabled`]:Nn,[`${Mn}-wrapper-in-form-item`]:$t},sn==null?void 0:sn.className,Re,At,Ln),tn=De()({[`${Mn}-indeterminate`]:Et},mt.A,Ln),Rt=Et?"mixed":void 0;return pt(wt.createElement(st.Z,{component:"Checkbox",disabled:Nn},wt.createElement("label",{className:Zt,style:Object.assign(Object.assign({},sn==null?void 0:sn.style),kt),onMouseEnter:Bt,onMouseLeave:Gt},wt.createElement(ze.Z,Object.assign({"aria-checked":Rt},Un,{prefixCls:Mn,className:tn,disabled:Nn,ref:Je})),qe!==void 0&&wt.createElement("span",null,qe))))};var ee=wt.forwardRef(Ae),he=ve(80702),se=ve(2738),de=function(je,Je){var Ke={};for(var gt in je)Object.prototype.hasOwnProperty.call(je,gt)&&Je.indexOf(gt)<0&&(Ke[gt]=je[gt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,gt=Object.getOwnPropertySymbols(je);Re<gt.length;Re++)Je.indexOf(gt[Re])<0&&Object.prototype.propertyIsEnumerable.call(je,gt[Re])&&(Ke[gt[Re]]=je[gt[Re]]);return Ke};const me=(je,Je)=>{const{defaultValue:Ke,children:gt,options:Re=[],prefixCls:At,className:qe,rootClassName:Et,style:kt,onChange:Bt}=je,Gt=de(je,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Ut,direction:lt}=wt.useContext(Ze.E_),[$e,Nt]=wt.useState(Gt.value||Ke||[]),[cn,sn]=wt.useState([]);wt.useEffect(()=>{"value"in Gt&&Nt(Gt.value||[])},[Gt.value]);const Ft=wt.useMemo(()=>Re.map(Lt=>typeof Lt=="string"||typeof Lt=="number"?{label:Lt,value:Lt}:Lt),[Re]),$t=Lt=>{sn(ut=>ut.filter(Ge=>Ge!==Lt))},en=Lt=>{sn(ut=>[].concat((0,he.Z)(ut),[Lt]))},Nn=Lt=>{const ut=$e.indexOf(Lt.value),Ge=(0,he.Z)($e);ut===-1?Ge.push(Lt.value):Ge.splice(ut,1),"value"in Gt||Nt(Ge),Bt==null||Bt(Ge.filter(Dt=>cn.includes(Dt)).sort((Dt,Tt)=>{const ot=Ft.findIndex(Te=>Te.value===Dt),et=Ft.findIndex(Te=>Te.value===Tt);return ot-et}))},fn=Ut("checkbox",At),Mn=`${fn}-group`,[pt,Ln]=(0,He.ZP)(fn),Un=(0,se.Z)(Gt,["value","disabled"]),Zt=Re.length?Ft.map(Lt=>wt.createElement(ee,{prefixCls:fn,key:Lt.value.toString(),disabled:"disabled"in Lt?Lt.disabled:Gt.disabled,value:Lt.value,checked:$e.includes(Lt.value),onChange:Lt.onChange,className:`${Mn}-item`,style:Lt.style,title:Lt.title},Lt.label)):gt,tn={toggleOption:Nn,value:$e,disabled:Gt.disabled,name:Gt.name,registerValue:en,cancelValue:$t},Rt=De()(Mn,{[`${Mn}-rtl`]:lt==="rtl"},qe,Et,Ln);return pt(wt.createElement("div",Object.assign({className:Rt,style:kt},Un,{ref:Je}),wt.createElement(ct.Provider,{value:tn},Zt)))},we=wt.forwardRef(me);var Ne=wt.memo(we);const Fe=ee;Fe.Group=Ne,Fe.__ANT_CHECKBOX=!0;var Ie=Fe},98447:function(Cn,un,ve){"use strict";ve.d(un,{C2:function(){return Ze}});var ce=ve(17313),De=ve(37613),ze=ve(83116);const wt=ht=>{const{checkboxCls:Me}=ht,yt=`${Me}-wrapper`;return[{[`${Me}-group`]:Object.assign(Object.assign({},(0,ce.Wf)(ht)),{display:"inline-flex",flexWrap:"wrap",columnGap:ht.marginXS,[`> ${ht.antCls}-row`]:{flex:1}}),[yt]:Object.assign(Object.assign({},(0,ce.Wf)(ht)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${yt}`]:{marginInlineStart:0},[`&${yt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Me]:Object.assign(Object.assign({},(0,ce.Wf)(ht)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:ht.borderRadiusSM,alignSelf:"center",[`${Me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Me}-inner`]:Object.assign({},(0,ce.oN)(ht))},[`${Me}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:ht.checkboxSize,height:ht.checkboxSize,direction:"ltr",backgroundColor:ht.colorBgContainer,border:`${ht.lineWidth}px ${ht.lineType} ${ht.colorBorder}`,borderRadius:ht.borderRadiusSM,borderCollapse:"separate",transition:`all ${ht.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:ht.checkboxSize/14*5,height:ht.checkboxSize/14*8,border:`${ht.lineWidthBold}px solid ${ht.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${ht.motionDurationFast} ${ht.motionEaseInBack}, opacity ${ht.motionDurationFast}`}},"& + span":{paddingInlineStart:ht.paddingXS,paddingInlineEnd:ht.paddingXS}})},{[`
|
|
|
${yt}:not(${yt}-disabled),
|
|
|
${Me}:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{borderColor:ht.colorPrimary}},[`${yt}:not(${yt}-disabled)`]:{[`&:hover ${Me}-checked:not(${Me}-disabled) ${Me}-inner`]:{backgroundColor:ht.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Me}-checked:not(${Me}-disabled):after`]:{borderColor:ht.colorPrimaryHover}}},{[`${Me}-checked`]:{[`${Me}-inner`]:{backgroundColor:ht.colorPrimary,borderColor:ht.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${ht.motionDurationMid} ${ht.motionEaseOutBack} ${ht.motionDurationFast}`}}},[`
|
|
|
${yt}-checked:not(${yt}-disabled),
|
|
|
${Me}-checked:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{backgroundColor:ht.colorPrimaryHover,borderColor:"transparent"}}},{[Me]:{"&-indeterminate":{[`${Me}-inner`]:{backgroundColor:ht.colorBgContainer,borderColor:ht.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:ht.fontSizeLG/2,height:ht.fontSizeLG/2,backgroundColor:ht.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${yt}-disabled`]:{cursor:"not-allowed"},[`${Me}-disabled`]:{[`&, ${Me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Me}-inner`]:{background:ht.colorBgContainerDisabled,borderColor:ht.colorBorder,"&:after":{borderColor:ht.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:ht.colorTextDisabled},[`&${Me}-indeterminate ${Me}-inner::after`]:{background:ht.colorTextDisabled}}}]};function Ze(ht,Me){const yt=(0,De.TS)(Me,{checkboxCls:`.${ht}`,checkboxSize:Me.controlInteractiveSize});return[wt(yt)]}un.ZP=(0,ze.Z)("Checkbox",(ht,Me)=>{let{prefixCls:yt}=Me;return[Ze(yt,ht)]})},36381:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return Un}});var ce=ve(38819),De=ve(92310),ze=ve.n(De),wt=ve(72308),Ze=ve(80702),ht=ve(52487),Me=ve(62853),yt=ve(18929),ct=ve(48736),He=ve(59301),st=ve(74416),mt=ve(11592),dt=ve(49618),Ae=ve(77900),te=ve(10228),ee=He.forwardRef(function(Zt,tn){var Rt=Zt.prefixCls,Lt=Zt.forceRender,ut=Zt.className,Ge=Zt.style,Dt=Zt.children,Tt=Zt.isActive,ot=Zt.role,et=He.useState(Tt||Lt),Te=(0,ht.Z)(et,2),xe=Te[0],Se=Te[1];return He.useEffect(function(){(Lt||Tt)&&Se(!0)},[Lt,Tt]),xe?He.createElement("div",{ref:tn,className:ze()("".concat(Rt,"-content"),(0,dt.Z)((0,dt.Z)({},"".concat(Rt,"-content-active"),Tt),"".concat(Rt,"-content-inactive"),!Tt),ut),style:Ge,role:ot},He.createElement("div",{className:"".concat(Rt,"-content-box")},Dt)):null});ee.displayName="PanelContent";var he=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],de=He.forwardRef(function(Zt,tn){var Rt=Zt.showArrow,Lt=Rt===void 0?!0:Rt,ut=Zt.headerClass,Ge=Zt.isActive,Dt=Zt.onItemClick,Tt=Zt.forceRender,ot=Zt.className,et=Zt.prefixCls,Te=Zt.collapsible,xe=Zt.accordion,Se=Zt.panelKey,Be=Zt.extra,_e=Zt.header,Ee=Zt.expandIcon,ft=Zt.openMotion,Xt=Zt.destroyInactivePanel,an=Zt.children,Qt=(0,st.Z)(Zt,se),En=Te==="disabled",Yn=Te==="header",zn=Te==="icon",Dn=Be!=null&&typeof Be!="boolean",ii=function(){Dt==null||Dt(Se)},gi=function(ti){(ti.key==="Enter"||ti.keyCode===te.Z.ENTER||ti.which===te.Z.ENTER)&&ii()},pi=typeof Ee=="function"?Ee(Zt):He.createElement("i",{className:"arrow"});pi&&(pi=He.createElement("div",{className:"".concat(et,"-expand-icon"),onClick:["header","icon"].includes(Te)?ii:void 0},pi));var Ii=ze()((0,dt.Z)((0,dt.Z)((0,dt.Z)({},"".concat(et,"-item"),!0),"".concat(et,"-item-active"),Ge),"".concat(et,"-item-disabled"),En),ot),Yi=ze()(ut,(0,dt.Z)((0,dt.Z)((0,dt.Z)({},"".concat(et,"-header"),!0),"".concat(et,"-header-collapsible-only"),Yn),"".concat(et,"-icon-collapsible-only"),zn)),Jn={className:Yi,"aria-expanded":Ge,"aria-disabled":En,onKeyDown:gi};return!Yn&&!zn&&(Jn.onClick=ii,Jn.role=xe?"tab":"button",Jn.tabIndex=En?-1:0),He.createElement("div",(0,wt.Z)({},Qt,{ref:tn,className:Ii}),He.createElement("div",Jn,Lt&&pi,He.createElement("span",{className:"".concat(et,"-header-text"),onClick:Te==="header"?ii:void 0},_e),Dn&&He.createElement("div",{className:"".concat(et,"-extra")},Be)),He.createElement(Ae.default,(0,wt.Z)({visible:Ge,leavedClassName:"".concat(et,"-content-hidden")},ft,{forceRender:Tt,removeOnLeave:Xt}),function(Wn,ti){var yi=Wn.className,mi=Wn.style;return He.createElement(he,{ref:ti,prefixCls:et,className:yi,style:mi,isActive:Ge,forceRender:Tt,role:xe?"tabpanel":void 0},an)}))}),me=de,we=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ne=function(tn,Rt){var Lt=Rt.prefixCls,ut=Rt.accordion,Ge=Rt.collapsible,Dt=Rt.destroyInactivePanel,Tt=Rt.onItemClick,ot=Rt.activeKey,et=Rt.openMotion,Te=Rt.expandIcon;return tn.map(function(xe,Se){var Be=xe.children,_e=xe.label,Ee=xe.key,ft=xe.collapsible,Xt=xe.onItemClick,an=xe.destroyInactivePanel,Qt=(0,st.Z)(xe,we),En=String(Ee!=null?Ee:Se),Yn=ft!=null?ft:Ge,zn=an!=null?an:Dt,Dn=function(pi){Yn!=="disabled"&&(Tt(pi),Xt==null||Xt(pi))},ii=!1;return ut?ii=ot[0]===En:ii=ot.indexOf(En)>-1,He.createElement(me,(0,wt.Z)({},Qt,{prefixCls:Lt,key:En,panelKey:En,isActive:ii,accordion:ut,openMotion:et,expandIcon:Te,header:_e,collapsible:Yn,onItemClick:Dn,destroyInactivePanel:zn}),Be)})},Fe=function(tn,Rt,Lt){if(!tn)return null;var ut=Lt.prefixCls,Ge=Lt.accordion,Dt=Lt.collapsible,Tt=Lt.destroyInactivePanel,ot=Lt.onItemClick,et=Lt.activeKey,Te=Lt.openMotion,xe=Lt.expandIcon,Se=tn.key||String(Rt),Be=tn.props,_e=Be.header,Ee=Be.headerClass,ft=Be.destroyInactivePanel,Xt=Be.collapsible,an=Be.onItemClick,Qt=!1;Ge?Qt=et[0]===Se:Qt=et.indexOf(Se)>-1;var En=Xt!=null?Xt:Dt,Yn=function(ii){En!=="disabled"&&(ot(ii),an==null||an(ii))},zn={key:Se,panelKey:Se,header:_e,headerClass:Ee,isActive:Qt,prefixCls:ut,destroyInactivePanel:ft!=null?ft:Tt,openMotion:Te,accordion:Ge,children:tn.props.children,onItemClick:Yn,expandIcon:xe,collapsible:En};return typeof tn.type=="string"?tn:(Object.keys(zn).forEach(function(Dn){typeof zn[Dn]=="undefined"&&delete zn[Dn]}),He.cloneElement(tn,zn))};function Ie(Zt,tn,Rt){return Array.isArray(Zt)?Ne(Zt,Rt):(0,mt.Z)(tn).map(function(Lt,ut){return Fe(Lt,ut,Rt)})}var je=Ie,Je=ve(26112);function Ke(Zt){var tn=Zt;if(!Array.isArray(tn)){var Rt=(0,Me.Z)(tn);tn=Rt==="number"||Rt==="string"?[tn]:[]}return tn.map(function(Lt){return String(Lt)})}var gt=He.forwardRef(function(Zt,tn){var Rt=Zt.prefixCls,Lt=Rt===void 0?"rc-collapse":Rt,ut=Zt.destroyInactivePanel,Ge=ut===void 0?!1:ut,Dt=Zt.style,Tt=Zt.accordion,ot=Zt.className,et=Zt.children,Te=Zt.collapsible,xe=Zt.openMotion,Se=Zt.expandIcon,Be=Zt.activeKey,_e=Zt.defaultActiveKey,Ee=Zt.onChange,ft=Zt.items,Xt=ze()(Lt,ot),an=(0,yt.Z)([],{value:Be,onChange:function(gi){return Ee==null?void 0:Ee(gi)},defaultValue:_e,postState:Ke}),Qt=(0,ht.Z)(an,2),En=Qt[0],Yn=Qt[1],zn=function(gi){return Yn(function(){if(Tt)return En[0]===gi?[]:[gi];var pi=En.indexOf(gi),Ii=pi>-1;return Ii?En.filter(function(Yi){return Yi!==gi}):[].concat((0,Ze.Z)(En),[gi])})};(0,ct.ZP)(!et,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Dn=je(ft,et,{prefixCls:Lt,accordion:Tt,openMotion:xe,expandIcon:Se,collapsible:Te,destroyInactivePanel:Ge,onItemClick:zn,activeKey:En});return He.createElement("div",(0,wt.Z)({ref:tn,className:Xt,style:Dt,role:Tt?"tablist":void 0},(0,Je.Z)(Zt,{aria:!0,data:!0})),Dn)}),Re=Object.assign(gt,{Panel:me}),At=Re,qe=Re.Panel,Et=ve(2738),kt=ve(62892),Bt=ve(92343),Gt=ve(36355),Ut=ve(19716),$e=He.forwardRef((Zt,tn)=>{const{getPrefixCls:Rt}=He.useContext(Gt.E_),{prefixCls:Lt,className:ut,showArrow:Ge=!0}=Zt,Dt=Rt("collapse",Lt),Tt=ze()({[`${Dt}-no-arrow`]:!Ge},ut);return He.createElement(At.Panel,Object.assign({ref:tn},Zt,{prefixCls:Dt,className:Tt}))}),Nt=ve(17313),cn=ve(8378),sn=ve(83116),Ft=ve(37613);const $t=Zt=>{const{componentCls:tn,contentBg:Rt,padding:Lt,headerBg:ut,headerPadding:Ge,collapseHeaderPaddingSM:Dt,collapseHeaderPaddingLG:Tt,collapsePanelBorderRadius:ot,lineWidth:et,lineType:Te,colorBorder:xe,colorText:Se,colorTextHeading:Be,colorTextDisabled:_e,fontSize:Ee,fontSizeLG:ft,lineHeight:Xt,marginSM:an,paddingSM:Qt,paddingLG:En,paddingXS:Yn,motionDurationSlow:zn,fontSizeIcon:Dn,contentPadding:ii}=Zt,gi=`${et}px ${Te} ${xe}`;return{[tn]:Object.assign(Object.assign({},(0,Nt.Wf)(Zt)),{backgroundColor:ut,border:gi,borderBottom:0,borderRadius:`${ot}px`,"&-rtl":{direction:"rtl"},[`& > ${tn}-item`]:{borderBottom:gi,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${tn}-header`]:{borderRadius:`0 0 ${ot}px ${ot}px`}},[`> ${tn}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:Ge,color:Be,lineHeight:Xt,cursor:"pointer",transition:`all ${zn}, visibility 0s`,[`> ${tn}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${tn}-expand-icon`]:{height:Ee*Xt,display:"flex",alignItems:"center",paddingInlineEnd:an},[`${tn}-arrow`]:Object.assign(Object.assign({},(0,Nt.Ro)()),{fontSize:Dn,svg:{transition:`transform ${zn}`}}),[`${tn}-header-text`]:{marginInlineEnd:"auto"}},[`${tn}-header-collapsible-only`]:{cursor:"default",[`${tn}-header-text`]:{flex:"none",cursor:"pointer"}},[`${tn}-icon-collapsible-only`]:{cursor:"default",[`${tn}-expand-icon`]:{cursor:"pointer"}}},[`${tn}-content`]:{color:Se,backgroundColor:Rt,borderTop:gi,[`& > ${tn}-content-box`]:{padding:ii},"&-hidden":{display:"none"}},"&-small":{[`> ${tn}-item`]:{[`> ${tn}-header`]:{padding:Dt,paddingInlineStart:Yn,[`> ${tn}-expand-icon`]:{marginInlineStart:Qt-Yn}},[`> ${tn}-content > ${tn}-content-box`]:{padding:Qt}}},"&-large":{[`> ${tn}-item`]:{fontSize:ft,[`> ${tn}-header`]:{padding:Tt,paddingInlineStart:Lt,[`> ${tn}-expand-icon`]:{height:ft*Xt,marginInlineStart:En-Lt}},[`> ${tn}-content > ${tn}-content-box`]:{padding:En}}},[`${tn}-item:last-child`]:{[`> ${tn}-content`]:{borderRadius:`0 0 ${ot}px ${ot}px`}},[`& ${tn}-item-disabled > ${tn}-header`]:{"\n &,\n & > .arrow\n ":{color:_e,cursor:"not-allowed"}},[`&${tn}-icon-position-end`]:{[`& > ${tn}-item`]:{[`> ${tn}-header`]:{[`${tn}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:an}}}}})}},en=Zt=>{const{componentCls:tn}=Zt,Rt=`> ${tn}-item > ${tn}-header ${tn}-arrow svg`;return{[`${tn}-rtl`]:{[Rt]:{transform:"rotate(180deg)"}}}},Nn=Zt=>{const{componentCls:tn,headerBg:Rt,paddingXXS:Lt,colorBorder:ut}=Zt;return{[`${tn}-borderless`]:{backgroundColor:Rt,border:0,[`> ${tn}-item`]:{borderBottom:`1px solid ${ut}`},[`
|
|
|
> ${tn}-item:last-child,
|
|
|
> ${tn}-item:last-child ${tn}-header
|
|
|
`]:{borderRadius:0},[`> ${tn}-item:last-child`]:{borderBottom:0},[`> ${tn}-item > ${tn}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${tn}-item > ${tn}-content > ${tn}-content-box`]:{paddingTop:Lt}}}},fn=Zt=>{const{componentCls:tn,paddingSM:Rt}=Zt;return{[`${tn}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${tn}-item`]:{borderBottom:0,[`> ${tn}-content`]:{backgroundColor:"transparent",border:0,[`> ${tn}-content-box`]:{paddingBlock:Rt}}}}}};var Mn=(0,sn.Z)("Collapse",Zt=>{const tn=(0,Ft.TS)(Zt,{collapseHeaderPaddingSM:`${Zt.paddingXS}px ${Zt.paddingSM}px`,collapseHeaderPaddingLG:`${Zt.padding}px ${Zt.paddingLG}px`,collapsePanelBorderRadius:Zt.borderRadiusLG});return[$t(tn),Nn(tn),fn(tn),en(tn),(0,cn.Z)(tn)]},Zt=>({headerPadding:`${Zt.paddingSM}px ${Zt.padding}px`,headerBg:Zt.colorFillAlter,contentPadding:`${Zt.padding}px 16px`,contentBg:Zt.colorBgContainer})),Ln=Object.assign(He.forwardRef((Zt,tn)=>{const{getPrefixCls:Rt,direction:Lt,collapse:ut}=He.useContext(Gt.E_),{prefixCls:Ge,className:Dt,rootClassName:Tt,style:ot,bordered:et=!0,ghost:Te,size:xe,expandIconPosition:Se="start",children:Be,expandIcon:_e}=Zt,Ee=(0,Ut.Z)(gi=>{var pi;return(pi=xe!=null?xe:gi)!==null&&pi!==void 0?pi:"middle"}),ft=Rt("collapse",Ge),Xt=Rt(),[an,Qt]=Mn(ft),En=He.useMemo(()=>Se==="left"?"start":Se==="right"?"end":Se,[Se]),Yn=function(){let gi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const pi=_e?_e(gi):He.createElement(ce.Z,{rotate:gi.isActive?90:void 0});return(0,Bt.Tm)(pi,()=>({className:ze()(pi.props.className,`${ft}-arrow`)}))},zn=ze()(`${ft}-icon-position-${En}`,{[`${ft}-borderless`]:!et,[`${ft}-rtl`]:Lt==="rtl",[`${ft}-ghost`]:!!Te,[`${ft}-${Ee}`]:Ee!=="middle"},ut==null?void 0:ut.className,Dt,Tt,Qt),Dn=Object.assign(Object.assign({},(0,kt.Z)(Xt)),{motionAppear:!1,leavedClassName:`${ft}-content-hidden`}),ii=He.useMemo(()=>Be?(0,mt.Z)(Be).map((gi,pi)=>{var Ii,Yi;if(!((Ii=gi.props)===null||Ii===void 0)&&Ii.disabled){const Jn=(Yi=gi.key)!==null&&Yi!==void 0?Yi:String(pi),{disabled:Wn,collapsible:ti}=gi.props,yi=Object.assign(Object.assign({},(0,Et.Z)(gi.props,["disabled"])),{key:Jn,collapsible:ti!=null?ti:Wn?"disabled":void 0});return(0,Bt.Tm)(gi,yi)}return gi}):null,[Be]);return an(He.createElement(At,Object.assign({ref:tn,openMotion:Dn},(0,Et.Z)(Zt,["rootClassName"]),{expandIcon:Yn,prefixCls:ft,className:zn,style:Object.assign(Object.assign({},ut==null?void 0:ut.style),ot)}),ii))}),{Panel:$e}),Un=Ln},93891:function(Cn,un,ve){"use strict";var ce=ve(59301),De=ve(36355),ze=ve(64165);const wt=Ze=>{const{componentName:ht}=Ze,{getPrefixCls:Me}=(0,ce.useContext)(De.E_),yt=Me("empty");switch(ht){case"Table":case"List":return ce.createElement(ze.Z,{image:ze.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ce.createElement(ze.Z,{image:ze.Z.PRESENTED_IMAGE_SIMPLE,className:`${yt}-small`});default:return ce.createElement(ze.Z,null)}};un.Z=wt},28103:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return mt}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),wt=ve(36355),Ze=ve(17313),ht=ve(83116),Me=ve(37613);const yt=dt=>{const{componentCls:Ae,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:he,textPaddingInline:se,orientationMargin:de,verticalMarginInline:me}=dt;return{[Ae]:Object.assign(Object.assign({},(0,Ze.Wf)(dt)),{borderBlockStart:`${he}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:me,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${he}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${dt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${Ae}-with-text`]:{display:"flex",alignItems:"center",margin:`${dt.dividerHorizontalWithTextGutterMargin}px 0`,color:dt.colorTextHeading,fontWeight:500,fontSize:dt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${he}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Ae}-with-text-left`]:{"&::before":{width:`${de*100}%`},"&::after":{width:`${100-de*100}%`}},[`&-horizontal${Ae}-with-text-right`]:{"&::before":{width:`${100-de*100}%`},"&::after":{width:`${de*100}%`}},[`${Ae}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${he}px 0 0`},[`&-horizontal${Ae}-with-text${Ae}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Ae}-dashed`]:{borderInlineStartWidth:he,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Ae}-with-text`]:{color:dt.colorText,fontWeight:"normal",fontSize:dt.fontSize},[`&-horizontal${Ae}-with-text-left${Ae}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Ae}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${Ae}-with-text-right${Ae}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Ae}-inner-text`]:{paddingInlineEnd:te}}})}};var ct=(0,ht.Z)("Divider",dt=>{const Ae=(0,Me.TS)(dt,{dividerHorizontalWithTextGutterMargin:dt.margin,dividerHorizontalGutterMargin:dt.marginLG,sizePaddingEdgeHorizontal:0});return[yt(Ae)]},dt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:dt.marginXS})),He=function(dt,Ae){var te={};for(var ee in dt)Object.prototype.hasOwnProperty.call(dt,ee)&&Ae.indexOf(ee)<0&&(te[ee]=dt[ee]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ee=Object.getOwnPropertySymbols(dt);he<ee.length;he++)Ae.indexOf(ee[he])<0&&Object.prototype.propertyIsEnumerable.call(dt,ee[he])&&(te[ee[he]]=dt[ee[he]]);return te},mt=dt=>{const{getPrefixCls:Ae,direction:te,divider:ee}=ze.useContext(wt.E_),{prefixCls:he,type:se="horizontal",orientation:de="center",orientationMargin:me,className:we,rootClassName:Ne,children:Fe,dashed:Ie,plain:je,style:Je}=dt,Ke=He(dt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),gt=Ae("divider",he),[Re,At]=ct(gt),qe=de.length>0?`-${de}`:de,Et=!!Fe,kt=de==="left"&&me!=null,Bt=de==="right"&&me!=null,Gt=De()(gt,ee==null?void 0:ee.className,At,`${gt}-${se}`,{[`${gt}-with-text`]:Et,[`${gt}-with-text${qe}`]:Et,[`${gt}-dashed`]:!!Ie,[`${gt}-plain`]:!!je,[`${gt}-rtl`]:te==="rtl",[`${gt}-no-default-orientation-margin-left`]:kt,[`${gt}-no-default-orientation-margin-right`]:Bt},we,Ne),Ut=ze.useMemo(()=>typeof me=="number"?me:/^\d+$/.test(me)?Number(me):me,[me]),lt=Object.assign(Object.assign({},kt&&{marginLeft:Ut}),Bt&&{marginRight:Ut});return Re(ze.createElement("div",Object.assign({className:Gt,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),Je)},Ke,{role:"separator"}),Fe&&se!=="vertical"&&ze.createElement("span",{className:`${gt}-inner-text`,style:lt},Fe)))}},91857:function(Cn,un,ve){"use strict";var ce=ve(59301),De=ve(38819),ze=ve(92310),wt=ve.n(ze),Ze=ve(31561),ht=ve(70425),Me=ve(18929),yt=ve(2738),ct=ve(79676),He=ve(53487),st=ve(92343),mt=ve(36355),dt=ve(20834),Ae=ve(40875),te=ve(88088),ee=ve(47211);const he=null,se=Ne=>{const{menu:Fe,arrow:Ie,prefixCls:je,children:Je,trigger:Ke,disabled:gt,dropdownRender:Re,getPopupContainer:At,overlayClassName:qe,rootClassName:Et,open:kt,onOpenChange:Bt,visible:Gt,onVisibleChange:Ut,mouseEnterDelay:lt=.15,mouseLeaveDelay:$e=.1,autoAdjustOverflow:Nt=!0,placement:cn="",overlay:sn,transitionName:Ft}=Ne,{getPopupContainer:$t,getPrefixCls:en,direction:Nn}=ce.useContext(mt.E_),fn=ce.useMemo(()=>{const Se=en();return Ft!==void 0?Ft:cn.includes("top")?`${Se}-slide-down`:`${Se}-slide-up`},[en,cn,Ft]),Mn=ce.useMemo(()=>cn?cn.includes("Center")?cn.slice(0,cn.indexOf("Center")):cn:Nn==="rtl"?"bottomRight":"bottomLeft",[cn,Nn]),pt=en("dropdown",je),[Ln,Un]=(0,ee.Z)(pt),[,Zt]=(0,te.Z)(),tn=ce.Children.only(Je),Rt=(0,st.Tm)(tn,{className:wt()(`${pt}-trigger`,{[`${pt}-rtl`]:Nn==="rtl"},tn.props.className),disabled:gt}),Lt=gt?[]:Ke;let ut;Lt&&Lt.includes("contextMenu")&&(ut=!0);const[Ge,Dt]=(0,Me.Z)(!1,{value:kt!=null?kt:Gt}),Tt=(0,ht.useEvent)(Se=>{Bt==null||Bt(Se),Ut==null||Ut(Se),Dt(Se)}),ot=wt()(qe,Et,Un,{[`${pt}-rtl`]:Nn==="rtl"}),et=(0,ct.Z)({arrowPointAtCenter:typeof Ie=="object"&&Ie.pointAtCenter,autoAdjustOverflow:Nt,offset:Zt.marginXXS,arrowWidth:Ie?Zt.sizePopupArrow:0,borderRadius:Zt.borderRadius}),Te=ce.useCallback(()=>{Dt(!1)},[]),xe=()=>{let Se;return Fe!=null&&Fe.items?Se=ce.createElement(dt.default,Object.assign({},Fe)):typeof sn=="function"?Se=sn():Se=sn,Re&&(Se=Re(Se)),Se=ce.Children.only(typeof Se=="string"?ce.createElement("span",null,Se):Se),ce.createElement(Ae.J,{prefixCls:`${pt}-menu`,expandIcon:ce.createElement("span",{className:`${pt}-menu-submenu-arrow`},ce.createElement(De.Z,{className:`${pt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Te,validator:Be=>{let{mode:_e}=Be}},Se)};return Ln(ce.createElement(Ze.Z,Object.assign({alignPoint:ut},(0,yt.Z)(Ne,["rootClassName"]),{mouseEnterDelay:lt,mouseLeaveDelay:$e,visible:Ge,builtinPlacements:et,arrow:!!Ie,overlayClassName:ot,prefixCls:pt,getPopupContainer:At||$t,transitionName:fn,trigger:Lt,overlay:xe,placement:Mn,onVisibleChange:Tt}),Rt))};function de(Ne){return Object.assign(Object.assign({},Ne),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const me=(0,He.Z)(se,"dropdown",Ne=>Ne,de),we=Ne=>ce.createElement(me,Object.assign({},Ne),ce.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=we,un.Z=se},38854:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return te}});var ce=ve(91857),De=ve(92310),ze=ve.n(De),wt=ve(59301),Ze=ve(18785),ht=ve(3113),Me=ve(36355),yt=ve(81327),ct=ve(33234),He=ve(47211),st=function(ee,he){var se={};for(var de in ee)Object.prototype.hasOwnProperty.call(ee,de)&&he.indexOf(de)<0&&(se[de]=ee[de]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,de=Object.getOwnPropertySymbols(ee);me<de.length;me++)he.indexOf(de[me])<0&&Object.prototype.propertyIsEnumerable.call(ee,de[me])&&(se[de[me]]=ee[de[me]]);return se};const mt=ee=>{const{getPopupContainer:he,getPrefixCls:se,direction:de}=wt.useContext(Me.E_),{prefixCls:me,type:we="default",danger:Ne,disabled:Fe,loading:Ie,onClick:je,htmlType:Je,children:Ke,className:gt,menu:Re,arrow:At,autoFocus:qe,overlay:Et,trigger:kt,align:Bt,open:Gt,onOpenChange:Ut,placement:lt,getPopupContainer:$e,href:Nt,icon:cn=wt.createElement(Ze.Z,null),title:sn,buttonsRender:Ft=xe=>xe,mouseEnterDelay:$t,mouseLeaveDelay:en,overlayClassName:Nn,overlayStyle:fn,destroyPopupOnHide:Mn,dropdownRender:pt}=ee,Ln=st(ee,["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"]),Un=se("dropdown",me),Zt=`${Un}-button`,[tn,Rt]=(0,He.Z)(Un),Lt={menu:Re,arrow:At,autoFocus:qe,align:Bt,disabled:Fe,trigger:Fe?[]:kt,onOpenChange:Ut,getPopupContainer:$e||he,mouseEnterDelay:$t,mouseLeaveDelay:en,overlayClassName:Nn,overlayStyle:fn,destroyPopupOnHide:Mn,dropdownRender:pt},{compactSize:ut,compactItemClassnames:Ge}=(0,ct.ri)(Un,de),Dt=ze()(Zt,Ge,gt,Rt);"overlay"in ee&&(Lt.overlay=Et),"open"in ee&&(Lt.open=Gt),"placement"in ee?Lt.placement=lt:Lt.placement=de==="rtl"?"bottomLeft":"bottomRight";const Tt=wt.createElement(ht.ZP,{type:we,danger:Ne,disabled:Fe,loading:Ie,onClick:je,htmlType:Je,href:Nt,title:sn},Ke),ot=wt.createElement(ht.ZP,{type:we,danger:Ne,icon:cn}),[et,Te]=Ft([Tt,ot]);return tn(wt.createElement(yt.Z.Compact,Object.assign({className:Dt,size:ut,block:!0},Ln),et,wt.createElement(ce.Z,Object.assign({},Lt),Te)))};mt.__ANT_BUTTON=!0;var dt=mt;const Ae=ce.Z;Ae.Button=dt;var te=Ae},47211:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return st}});var ce=ve(17313),De=ve(13826),ze=ve(92899),wt=ve(29878),Ze=ve(19447),ht=ve(83116),Me=ve(37613),ct=mt=>{const{componentCls:dt,menuCls:Ae,colorError:te,colorTextLightSolid:ee}=mt,he=`${Ae}-item`;return{[`${dt}, ${dt}-menu-submenu`]:{[`${Ae} ${he}`]:{[`&${he}-danger:not(${he}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const He=mt=>{const{componentCls:dt,menuCls:Ae,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:he,antCls:se,iconCls:de,motionDurationMid:me,dropdownPaddingVertical:we,fontSize:Ne,dropdownEdgeChildPadding:Fe,colorTextDisabled:Ie,fontSizeIcon:je,controlPaddingHorizontal:Je,colorBgElevated:Ke}=mt;return[{[dt]:Object.assign(Object.assign({},(0,ce.Wf)(mt)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+he/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${de}-down, & > ${se}-btn-icon > ${de}-down`]:{fontSize:je}},[`${dt}-wrap`]:{position:"relative",[`${se}-btn > ${de}-down`]:{fontSize:je},[`${de}-down::before`]:{transition:`transform ${me}`}},[`${dt}-wrap-open`]:{[`${de}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottom,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottom,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottomRight,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottomRight`]:{animationName:De.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-topLeft,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-topLeft,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-top,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-top,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-topRight,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-topRight`]:{animationName:De.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottom,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottomRight`]:{animationName:De.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-topLeft,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-top,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-topRight`]:{animationName:De.ly}})},(0,Ze.ZP)(mt,{colorBg:Ke,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${dt} ${Ae}`]:{position:"relative",margin:0},[`${Ae}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${dt}, ${dt}-menu-submenu`]:{[Ae]:Object.assign(Object.assign({padding:Fe,listStyleType:"none",backgroundColor:Ke,backgroundClip:"padding-box",borderRadius:mt.borderRadiusLG,outline:"none",boxShadow:mt.boxShadowSecondary},(0,ce.Qy)(mt)),{[`${Ae}-item-group-title`]:{padding:`${we}px ${Je}px`,color:mt.colorTextDescription,transition:`all ${me}`},[`${Ae}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ae}-item-icon`]:{minWidth:Ne,marginInlineEnd:mt.marginXS,fontSize:mt.fontSizeSM},[`${Ae}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${me}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ae}-item, ${Ae}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${we}px ${Je}px`,color:mt.colorText,fontWeight:"normal",fontSize:Ne,lineHeight:mt.lineHeight,cursor:"pointer",transition:`all ${me}`,borderRadius:mt.borderRadiusSM,"&:hover, &-active":{backgroundColor:mt.controlItemBgHover}},(0,ce.Qy)(mt)),{"&-selected":{color:mt.colorPrimary,backgroundColor:mt.controlItemBgActive,"&:hover, &-active":{backgroundColor:mt.controlItemBgActiveHover}},"&-disabled":{color:Ie,cursor:"not-allowed","&:hover":{color:Ie,backgroundColor:Ke,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${mt.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:mt.colorSplit},[`${dt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:mt.paddingXS,[`${dt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:mt.colorTextDescription,fontSize:je,fontStyle:"normal"}}}),[`${Ae}-item-group-list`]:{margin:`0 ${mt.marginXS}px`,padding:0,listStyle:"none"},[`${Ae}-submenu-title`]:{paddingInlineEnd:Je+mt.fontSizeSM},[`${Ae}-submenu-vertical`]:{position:"relative"},[`${Ae}-submenu${Ae}-submenu-disabled ${dt}-menu-submenu-title`]:{[`&, ${dt}-menu-submenu-arrow-icon`]:{color:Ie,backgroundColor:Ke,cursor:"not-allowed"}},[`${Ae}-submenu-selected ${dt}-menu-submenu-title`]:{color:mt.colorPrimary}})}},[(0,De.oN)(mt,"slide-up"),(0,De.oN)(mt,"slide-down"),(0,ze.Fm)(mt,"move-up"),(0,ze.Fm)(mt,"move-down"),(0,wt._y)(mt,"zoom-big")]]};var st=(0,ht.Z)("Dropdown",(mt,dt)=>{let{rootPrefixCls:Ae}=dt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:he,fontSize:se,lineHeight:de,paddingXXS:me,componentCls:we,borderRadiusLG:Ne}=mt,Fe=(he-se*de)/2,{dropdownArrowOffset:Ie}=(0,Ze.fS)({contentRadius:Ne}),je=(0,Me.TS)(mt,{menuCls:`${we}-menu`,rootPrefixCls:Ae,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:Ie,dropdownPaddingVertical:Fe,dropdownEdgeChildPadding:me});return[He(je),ct(je)]},mt=>({zIndexPopup:mt.zIndexPopupBase+50}))},64165:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return me}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),wt=ve(36355),Ze=ve(9763),ht=ve(64993),Me=ve(88088),ct=()=>{const[,we]=(0,Me.Z)(),Fe=new ht.C(we.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return ze.createElement("svg",{style:Fe,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},ze.createElement("g",{fill:"none",fillRule:"evenodd"},ze.createElement("g",{transform:"translate(24 31.67)"},ze.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),ze.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"}),ze.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)"}),ze.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"}),ze.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"})),ze.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"}),ze.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},ze.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),ze.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},st=()=>{const[,we]=(0,Me.Z)(),{colorFill:Ne,colorFillTertiary:Fe,colorFillQuaternary:Ie,colorBgContainer:je}=we,{borderColor:Je,shadowColor:Ke,contentColor:gt}=(0,ze.useMemo)(()=>({borderColor:new ht.C(Ne).onBackground(je).toHexShortString(),shadowColor:new ht.C(Fe).onBackground(je).toHexShortString(),contentColor:new ht.C(Ie).onBackground(je).toHexShortString()}),[Ne,Fe,Ie,je]);return ze.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},ze.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},ze.createElement("ellipse",{fill:Ke,cx:"32",cy:"33",rx:"32",ry:"7"}),ze.createElement("g",{fillRule:"nonzero",stroke:Je},ze.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"}),ze.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:gt}))))},mt=ve(83116),dt=ve(37613);const Ae=we=>{const{componentCls:Ne,margin:Fe,marginXS:Ie,marginXL:je,fontSize:Je,lineHeight:Ke}=we;return{[Ne]:{marginInline:Ie,fontSize:Je,lineHeight:Ke,textAlign:"center",[`${Ne}-image`]:{height:we.emptyImgHeight,marginBottom:Ie,opacity:we.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ne}-description`]:{color:we.colorText},[`${Ne}-footer`]:{marginTop:Fe},"&-normal":{marginBlock:je,color:we.colorTextDisabled,[`${Ne}-description`]:{color:we.colorTextDisabled},[`${Ne}-image`]:{height:we.emptyImgHeightMD}},"&-small":{marginBlock:Ie,color:we.colorTextDisabled,[`${Ne}-image`]:{height:we.emptyImgHeightSM}}}}};var te=(0,mt.Z)("Empty",we=>{const{componentCls:Ne,controlHeightLG:Fe}=we,Ie=(0,dt.TS)(we,{emptyImgCls:`${Ne}-img`,emptyImgHeight:Fe*2.5,emptyImgHeightMD:Fe,emptyImgHeightSM:Fe*.875});return[Ae(Ie)]}),ee=function(we,Ne){var Fe={};for(var Ie in we)Object.prototype.hasOwnProperty.call(we,Ie)&&Ne.indexOf(Ie)<0&&(Fe[Ie]=we[Ie]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ie=Object.getOwnPropertySymbols(we);je<Ie.length;je++)Ne.indexOf(Ie[je])<0&&Object.prototype.propertyIsEnumerable.call(we,Ie[je])&&(Fe[Ie[je]]=we[Ie[je]]);return Fe};const he=ze.createElement(ct,null),se=ze.createElement(st,null),de=we=>{var{className:Ne,rootClassName:Fe,prefixCls:Ie,image:je=he,description:Je,children:Ke,imageStyle:gt,style:Re}=we,At=ee(we,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:qe,direction:Et,empty:kt}=ze.useContext(wt.E_),Bt=qe("empty",Ie),[Gt,Ut]=te(Bt),[lt]=(0,Ze.Z)("Empty"),$e=typeof Je!="undefined"?Je:lt==null?void 0:lt.description,Nt=typeof $e=="string"?$e:"empty";let cn=null;return typeof je=="string"?cn=ze.createElement("img",{alt:Nt,src:je}):cn=je,Gt(ze.createElement("div",Object.assign({className:De()(Ut,Bt,kt==null?void 0:kt.className,{[`${Bt}-normal`]:je===se,[`${Bt}-rtl`]:Et==="rtl"},Ne,Fe),style:Object.assign(Object.assign({},kt==null?void 0:kt.style),Re)},At),ze.createElement("div",{className:`${Bt}-image`,style:gt},cn),$e&&ze.createElement("div",{className:`${Bt}-description`},$e),Ke&&ze.createElement("div",{className:`${Bt}-footer`},Ke)))};de.PRESENTED_IMAGE_DEFAULT=he,de.PRESENTED_IMAGE_SIMPLE=se;var me=de},78241:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return Ot}});var ce=ve(80702),De=ve(92310),ze=ve.n(De),wt=ve(77900),Ze=ve(59301),ht=ve(62892),Me=ve(32441);function yt(Ve){const[Yt,qt]=Ze.useState(Ve);return Ze.useEffect(()=>{const xt=setTimeout(()=>{qt(Ve)},Ve.length?0:10);return()=>{clearTimeout(xt)}},[Ve]),Yt}var ct=ve(17313),He=ve(29878),st=ve(8378),mt=ve(37613),dt=ve(83116),te=Ve=>{const{componentCls:Yt}=Ve,qt=`${Yt}-show-help`,xt=`${Yt}-show-help-item`;return{[qt]:{transition:`opacity ${Ve.motionDurationSlow} ${Ve.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[xt]:{overflow:"hidden",transition:`height ${Ve.motionDurationSlow} ${Ve.motionEaseInOut},
|
|
|
opacity ${Ve.motionDurationSlow} ${Ve.motionEaseInOut},
|
|
|
transform ${Ve.motionDurationSlow} ${Ve.motionEaseInOut} !important`,[`&${xt}-appear, &${xt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${xt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Ve=>({legend:{display:"block",width:"100%",marginBottom:Ve.marginLG,padding:0,color:Ve.colorTextDescription,fontSize:Ve.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ve.lineWidth}px ${Ve.lineType} ${Ve.colorBorder}`},label:{fontSize:Ve.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 ${Ve.controlOutlineWidth}px ${Ve.controlOutline}`},output:{display:"block",paddingTop:15,color:Ve.colorText,fontSize:Ve.fontSize,lineHeight:Ve.lineHeight}}),he=(Ve,Yt)=>{const{formItemCls:qt}=Ve;return{[qt]:{[`${qt}-label > label`]:{height:Yt},[`${qt}-control-input`]:{minHeight:Yt}}}},se=Ve=>{const{componentCls:Yt}=Ve;return{[Ve.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ct.Wf)(Ve)),ee(Ve)),{[`${Yt}-text`]:{display:"inline-block",paddingInlineEnd:Ve.paddingSM},"&-small":Object.assign({},he(Ve,Ve.controlHeightSM)),"&-large":Object.assign({},he(Ve,Ve.controlHeightLG))})}},de=Ve=>{const{formItemCls:Yt,iconCls:qt,componentCls:xt,rootPrefixCls:nt,labelRequiredMarkColor:Kt,labelColor:ln,labelFontSize:xn,labelHeight:On,labelColonMarginInlineStart:St,labelColonMarginInlineEnd:gn,itemMarginBottom:Rn}=Ve;return{[Yt]:Object.assign(Object.assign({},(0,ct.Wf)(Ve)),{marginBottom:Rn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${nt}-row`]:{display:"none"},"&-has-warning":{[`${Yt}-split`]:{color:Ve.colorError}},"&-has-error":{[`${Yt}-split`]:{color:Ve.colorWarning}},[`${Yt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ve.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:On,color:ln,fontSize:xn,[`> ${qt}`]:{fontSize:Ve.fontSize,verticalAlign:"top"},[`&${Yt}-required:not(${Yt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ve.marginXXS,color:Kt,fontSize:Ve.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${xt}-hide-required-mark &`]:{display:"none"}},[`${Yt}-optional`]:{display:"inline-block",marginInlineStart:Ve.marginXXS,color:Ve.colorTextDescription,[`${xt}-hide-required-mark &`]:{display:"none"}},[`${Yt}-tooltip`]:{color:Ve.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ve.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:St,marginInlineEnd:gn},[`&${Yt}-no-colon::after`]:{content:'"\\a0"'}}},[`${Yt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${nt}-col-'"]):not([class*="' ${nt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ve.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Yt]:{"&-explain, &-extra":{clear:"both",color:Ve.colorTextDescription,fontSize:Ve.fontSize,lineHeight:Ve.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ve.controlHeightSM,transition:`color ${Ve.motionDurationMid} ${Ve.motionEaseOut}`},"&-explain":{"&-error":{color:Ve.colorError},"&-warning":{color:Ve.colorWarning}}},[`&-with-help ${Yt}-explain`]:{height:"auto",opacity:1},[`${Yt}-feedback-icon`]:{fontSize:Ve.fontSize,textAlign:"center",visibility:"visible",animationName:He.kr,animationDuration:Ve.motionDurationMid,animationTimingFunction:Ve.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ve.colorSuccess},"&-error":{color:Ve.colorError},"&-warning":{color:Ve.colorWarning},"&-validating":{color:Ve.colorPrimary}}})}},me=Ve=>{const{componentCls:Yt,formItemCls:qt}=Ve;return{[`${Yt}-horizontal`]:{[`${qt}-label`]:{flexGrow:0},[`${qt}-control`]:{flex:"1 1 0",minWidth:0},[`${qt}-label[class$='-24'], ${qt}-label[class*='-24 ']`]:{[`& + ${qt}-control`]:{minWidth:"unset"}}}}},we=Ve=>{const{componentCls:Yt,formItemCls:qt}=Ve;return{[`${Yt}-inline`]:{display:"flex",flexWrap:"wrap",[qt]:{flex:"none",marginInlineEnd:Ve.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${qt}-label,
|
|
|
> ${qt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${qt}-label`]:{flex:"none"},[`${Yt}-text`]:{display:"inline-block"},[`${qt}-has-feedback`]:{display:"inline-block"}}}}},Ne=Ve=>({padding:Ve.verticalLabelPadding,margin:Ve.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Fe=Ve=>{const{componentCls:Yt,formItemCls:qt,rootPrefixCls:xt}=Ve;return{[`${qt} ${qt}-label`]:Ne(Ve),[Yt]:{[qt]:{flexWrap:"wrap",[`${qt}-label, ${qt}-control`]:{[`&:not([class*=" ${xt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ie=Ve=>{const{componentCls:Yt,formItemCls:qt,rootPrefixCls:xt}=Ve;return{[`${Yt}-vertical`]:{[qt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Yt}-item-control`]:{width:"100%"}}},[`${Yt}-vertical ${qt}-label,
|
|
|
.${xt}-col-24${qt}-label,
|
|
|
.${xt}-col-xl-24${qt}-label`]:Ne(Ve),[`@media (max-width: ${Ve.screenXSMax}px)`]:[Fe(Ve),{[Yt]:{[`.${xt}-col-xs-24${qt}-label`]:Ne(Ve)}}],[`@media (max-width: ${Ve.screenSMMax}px)`]:{[Yt]:{[`.${xt}-col-sm-24${qt}-label`]:Ne(Ve)}},[`@media (max-width: ${Ve.screenMDMax}px)`]:{[Yt]:{[`.${xt}-col-md-24${qt}-label`]:Ne(Ve)}},[`@media (max-width: ${Ve.screenLGMax}px)`]:{[Yt]:{[`.${xt}-col-lg-24${qt}-label`]:Ne(Ve)}}}},je=(Ve,Yt)=>(0,mt.TS)(Ve,{formItemCls:`${Ve.componentCls}-item`,rootPrefixCls:Yt});var Je=(0,dt.Z)("Form",(Ve,Yt)=>{let{rootPrefixCls:qt}=Yt;const xt=je(Ve,qt);return[se(xt),de(xt),te(xt),me(xt),we(xt),Ie(xt),(0,st.Z)(xt),He.kr]},Ve=>({labelRequiredMarkColor:Ve.colorError,labelColor:Ve.colorTextHeading,labelFontSize:Ve.fontSize,labelHeight:Ve.controlHeight,labelColonMarginInlineStart:Ve.marginXXS/2,labelColonMarginInlineEnd:Ve.marginXS,itemMarginBottom:Ve.marginLG,verticalLabelPadding:`0 0 ${Ve.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ke=[];function gt(Ve,Yt,qt){let xt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ve=="string"?Ve:`${Yt}-${xt}`,error:Ve,errorStatus:qt}}var At=Ve=>{let{help:Yt,helpStatus:qt,errors:xt=Ke,warnings:nt=Ke,className:Kt,fieldId:ln,onVisibleChanged:xn}=Ve;const{prefixCls:On}=Ze.useContext(Me.Rk),St=`${On}-item-explain`,[,gn]=Je(On),Rn=(0,Ze.useMemo)(()=>(0,ht.Z)(On),[On]),ai=yt(xt),hn=yt(nt),Jt=Ze.useMemo(()=>Yt!=null?[gt(Yt,"help",qt)]:[].concat((0,ce.Z)(ai.map((si,ui)=>gt(si,"error","error",ui))),(0,ce.Z)(hn.map((si,ui)=>gt(si,"warning","warning",ui)))),[Yt,qt,ai,hn]),Xn={};return ln&&(Xn.id=`${ln}_help`),Ze.createElement(wt.default,{motionDeadline:Rn.motionDeadline,motionName:`${On}-show-help`,visible:!!Jt.length,onVisibleChanged:xn},si=>{const{className:ui,style:Qn}=si;return Ze.createElement("div",Object.assign({},Xn,{className:ze()(St,ui,Kt,gn),style:Qn,role:"alert"}),Ze.createElement(wt.CSSMotionList,Object.assign({keys:Jt},(0,ht.Z)(On),{motionName:`${On}-show-help-item`,component:!1}),di=>{const{key:hi,error:Ri,errorStatus:Xi,className:tr,style:yn}=di;return Ze.createElement("div",{key:hi,className:ze()(tr,{[`${St}-${Xi}`]:Xi}),style:yn},Ri)}))})},qe=ve(95013),Et=ve(36355),kt=ve(1684),Bt=ve(52946),Gt=ve(19716),Ut=ve(16722);const lt=["parentNode"],$e="form_item";function Nt(Ve){return Ve===void 0||Ve===!1?[]:Array.isArray(Ve)?Ve:[Ve]}function cn(Ve,Yt){if(!Ve.length)return;const qt=Ve.join("_");return Yt?`${Yt}_${qt}`:lt.includes(qt)?`${$e}_${qt}`:qt}function sn(Ve,Yt,qt,xt,nt,Kt){let ln=xt;return Kt!==void 0?ln=Kt:qt.validating?ln="validating":Ve.length?ln="error":Yt.length?ln="warning":(qt.touched||nt&&qt.validated)&&(ln="success"),ln}function Ft(Ve){return Nt(Ve).join("_")}function $t(Ve){const[Yt]=(0,qe.useForm)(),qt=Ze.useRef({}),xt=Ze.useMemo(()=>Ve!=null?Ve:Object.assign(Object.assign({},Yt),{__INTERNAL__:{itemRef:nt=>Kt=>{const ln=Ft(nt);Kt?qt.current[ln]=Kt:delete qt.current[ln]}},scrollToField:function(nt){let Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const ln=Nt(nt),xn=cn(ln,xt.__INTERNAL__.name),On=xn?document.getElementById(xn):null;On&&(0,Ut.Z)(On,Object.assign({scrollMode:"if-needed",block:"nearest"},Kt))},getFieldInstance:nt=>{const Kt=Ft(nt);return qt.current[Kt]}}),[Ve,Yt]);return[xt]}var en=ve(28726),Nn=function(Ve,Yt){var qt={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Yt.indexOf(xt)<0&&(qt[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,xt=Object.getOwnPropertySymbols(Ve);nt<xt.length;nt++)Yt.indexOf(xt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[nt])&&(qt[xt[nt]]=Ve[xt[nt]]);return qt};const fn=(Ve,Yt)=>{const qt=Ze.useContext(kt.Z),{getPrefixCls:xt,direction:nt,form:Kt}=Ze.useContext(Et.E_),{prefixCls:ln,className:xn,rootClassName:On,size:St,disabled:gn=qt,form:Rn,colon:ai,labelAlign:hn,labelWrap:Jt,labelCol:Xn,wrapperCol:si,hideRequiredMark:ui,layout:Qn="horizontal",scrollToFirstError:di,requiredMark:hi,onFinishFailed:Ri,name:Xi,style:tr,feedbackIcons:yn}=Ve,Br=Nn(Ve,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),br=(0,Gt.Z)(St),Wr=Ze.useContext(en.Z),mn=(0,Ze.useMemo)(()=>hi!==void 0?hi:Kt&&Kt.requiredMark!==void 0?Kt.requiredMark:!ui,[ui,hi,Kt]),_n=ai!=null?ai:Kt==null?void 0:Kt.colon,Si=xt("form",ln),[zi,Ni]=Je(Si),ji=ze()(Si,`${Si}-${Qn}`,{[`${Si}-hide-required-mark`]:mn===!1,[`${Si}-rtl`]:nt==="rtl",[`${Si}-${br}`]:br},Ni,Kt==null?void 0:Kt.className,xn,On),[ar]=$t(Rn),{__INTERNAL__:Qi}=ar;Qi.name=Xi;const nr=(0,Ze.useMemo)(()=>({name:Xi,labelAlign:hn,labelCol:Xn,labelWrap:Jt,wrapperCol:si,vertical:Qn==="vertical",colon:_n,requiredMark:mn,itemRef:Qi.itemRef,form:ar,feedbackIcons:yn}),[Xi,hn,Xn,si,Qn,_n,mn,ar,yn]);Ze.useImperativeHandle(Yt,()=>ar);const hr=(Jr,Bn)=>{if(Jr){let _r={block:"nearest"};typeof Jr=="object"&&(_r=Jr),ar.scrollToField(Bn,_r)}},An=Jr=>{if(Ri==null||Ri(Jr),Jr.errorFields.length){const Bn=Jr.errorFields[0].name;if(di!==void 0){hr(di,Bn);return}Kt&&Kt.scrollToFirstError!==void 0&&hr(Kt.scrollToFirstError,Bn)}};return zi(Ze.createElement(kt.n,{disabled:gn},Ze.createElement(Bt.q,{size:br},Ze.createElement(Me.RV,Object.assign({},{validateMessages:Wr}),Ze.createElement(Me.q3.Provider,{value:nr},Ze.createElement(qe.default,Object.assign({id:Xi},Br,{name:Xi,onFinishFailed:An,form:ar,style:Object.assign(Object.assign({},Kt==null?void 0:Kt.style),tr),className:ji})))))))};var pt=Ze.forwardRef(fn),Ln=ve(41799),Un=ve(8654),Zt=ve(92343),tn=ve(11592);function Rt(Ve){if(typeof Ve=="function")return Ve;const Yt=(0,tn.Z)(Ve);return Yt.length<=1?Yt[0]:Yt}const Lt=()=>{const{status:Ve,errors:Yt=[],warnings:qt=[]}=(0,Ze.useContext)(Me.aM);return{status:Ve,errors:Yt,warnings:qt}};Lt.Context=Me.aM;var ut=Lt,Ge=ve(16089);function Dt(Ve){const[Yt,qt]=Ze.useState(Ve),xt=(0,Ze.useRef)(null),nt=(0,Ze.useRef)([]),Kt=(0,Ze.useRef)(!1);Ze.useEffect(()=>(Kt.current=!1,()=>{Kt.current=!0,Ge.Z.cancel(xt.current),xt.current=null}),[]);function ln(xn){Kt.current||(xt.current===null&&(nt.current=[],xt.current=(0,Ge.Z)(()=>{xt.current=null,qt(On=>{let St=On;return nt.current.forEach(gn=>{St=gn(St)}),St})})),nt.current.push(xn))}return[Yt,ln]}function Tt(){const{itemRef:Ve}=Ze.useContext(Me.q3),Yt=Ze.useRef({});function qt(xt,nt){const Kt=nt&&typeof nt=="object"&&nt.ref,ln=xt.join("_");return(Yt.current.name!==ln||Yt.current.originRef!==Kt)&&(Yt.current.name=ln,Yt.current.originRef=Kt,Yt.current.ref=(0,Un.sQ)(Ve(xt),Kt)),Yt.current.ref}return qt}var ot=ve(29194),et=ve(34280),Te=ve(2738),xe=ve(27382),Se=ve(37028);const Be=Ve=>{const{formItemCls:Yt}=Ve;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Yt}-control`]:{display:"flex"}}}};var _e=(0,dt.b)(["Form","item-item"],(Ve,Yt)=>{let{rootPrefixCls:qt}=Yt;const xt=je(Ve,qt);return[Be(xt)]}),ft=Ve=>{const{prefixCls:Yt,status:qt,wrapperCol:xt,children:nt,errors:Kt,warnings:ln,_internalItemRender:xn,extra:On,help:St,fieldId:gn,marginBottom:Rn,onErrorVisibleChanged:ai}=Ve,hn=`${Yt}-item`,Jt=Ze.useContext(Me.q3),Xn=xt||Jt.wrapperCol||{},si=ze()(`${hn}-control`,Xn.className),ui=Ze.useMemo(()=>Object.assign({},Jt),[Jt]);delete ui.labelCol,delete ui.wrapperCol;const Qn=Ze.createElement("div",{className:`${hn}-control-input`},Ze.createElement("div",{className:`${hn}-control-input-content`},nt)),di=Ze.useMemo(()=>({prefixCls:Yt,status:qt}),[Yt,qt]),hi=Rn!==null||Kt.length||ln.length?Ze.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ze.createElement(Me.Rk.Provider,{value:di},Ze.createElement(At,{fieldId:gn,errors:Kt,warnings:ln,help:St,helpStatus:qt,className:`${hn}-explain-connected`,onVisibleChanged:ai})),!!Rn&&Ze.createElement("div",{style:{width:0,height:Rn}})):null,Ri={};gn&&(Ri.id=`${gn}_extra`);const Xi=On?Ze.createElement("div",Object.assign({},Ri,{className:`${hn}-extra`}),On):null,tr=xn&&xn.mark==="pro_table_render"&&xn.render?xn.render(Ve,{input:Qn,errorList:hi,extra:Xi}):Ze.createElement(Ze.Fragment,null,Qn,hi,Xi);return Ze.createElement(Me.q3.Provider,{value:ui},Ze.createElement(Se.Z,Object.assign({},Xn,{className:si}),tr),Ze.createElement(_e,{prefixCls:Yt}))},Xt=ve(61485),an=ve(31724),Qt=ve(9763),En=ve(6848),Yn=function(Ve,Yt){var qt={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Yt.indexOf(xt)<0&&(qt[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,xt=Object.getOwnPropertySymbols(Ve);nt<xt.length;nt++)Yt.indexOf(xt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[nt])&&(qt[xt[nt]]=Ve[xt[nt]]);return qt};function zn(Ve){return Ve?typeof Ve=="object"&&!Ze.isValidElement(Ve)?Ve:{title:Ve}:null}var ii=Ve=>{let{prefixCls:Yt,label:qt,htmlFor:xt,labelCol:nt,labelAlign:Kt,colon:ln,required:xn,requiredMark:On,tooltip:St}=Ve;var gn;const[Rn]=(0,Qt.Z)("Form"),{vertical:ai,labelAlign:hn,labelCol:Jt,labelWrap:Xn,colon:si}=Ze.useContext(Me.q3);if(!qt)return null;const ui=nt||Jt||{},Qn=Kt||hn,di=`${Yt}-item-label`,hi=ze()(di,Qn==="left"&&`${di}-left`,ui.className,{[`${di}-wrap`]:!!Xn});let Ri=qt;const Xi=ln===!0||si!==!1&&ln!==!1;Xi&&!ai&&typeof qt=="string"&&qt.trim()!==""&&(Ri=qt.replace(/[:|:]\s*$/,""));const yn=zn(St);if(yn){const{icon:mn=Ze.createElement(Xt.Z,null)}=yn,_n=Yn(yn,["icon"]),Si=Ze.createElement(En.Z,Object.assign({},_n),Ze.cloneElement(mn,{className:`${Yt}-item-tooltip`,title:""}));Ri=Ze.createElement(Ze.Fragment,null,Ri,Si)}const Br=On==="optional",br=typeof On=="function";br?Ri=On(Ri,{required:!!xn}):Br&&!xn&&(Ri=Ze.createElement(Ze.Fragment,null,Ri,Ze.createElement("span",{className:`${Yt}-item-optional`,title:""},(Rn==null?void 0:Rn.optional)||((gn=an.Z.Form)===null||gn===void 0?void 0:gn.optional))));const Wr=ze()({[`${Yt}-item-required`]:xn,[`${Yt}-item-required-mark-optional`]:Br||br,[`${Yt}-item-no-colon`]:!Xi});return Ze.createElement(Se.Z,Object.assign({},ui,{className:hi}),Ze.createElement("label",{htmlFor:xt,className:Wr,title:typeof qt=="string"?qt:""},Ri))},gi=ve(29679),pi=ve(19248),Ii=ve(96512),Yi=ve(58617);const Jn={success:gi.Z,warning:Ii.Z,error:pi.Z,validating:Yi.Z};function Wn(Ve){let{children:Yt,errors:qt,warnings:xt,hasFeedback:nt,validateStatus:Kt,prefixCls:ln,meta:xn,noStyle:On}=Ve;const St=`${ln}-item`,{feedbackIcons:gn}=Ze.useContext(Me.q3),Rn=sn(qt,xt,xn,null,!!nt,Kt),{isFormItemInput:ai,status:hn}=Ze.useContext(Me.aM),Jt=Ze.useMemo(()=>{var Xn;let si;if(nt){const di=nt!==!0&&nt.icons||gn,hi=Rn&&((Xn=di==null?void 0:di({status:Rn,errors:qt,warnings:xt}))===null||Xn===void 0?void 0:Xn[Rn]),Ri=Rn&&Jn[Rn];si=hi!==!1&&Ri?Ze.createElement("span",{className:ze()(`${St}-feedback-icon`,`${St}-feedback-icon-${Rn}`)},hi||Ze.createElement(Ri,null)):null}let ui=!0,Qn=Rn||"";return On&&(ui=ai,Qn=(Rn!=null?Rn:hn)||""),{status:Qn,errors:qt,warnings:xt,hasFeedback:!!nt,feedbackIcon:si,isFormItemInput:ui}},[Rn,nt,On,ai,hn]);return Ze.createElement(Me.aM.Provider,{value:Jt},Yt)}var ti=function(Ve,Yt){var qt={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Yt.indexOf(xt)<0&&(qt[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,xt=Object.getOwnPropertySymbols(Ve);nt<xt.length;nt++)Yt.indexOf(xt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[nt])&&(qt[xt[nt]]=Ve[xt[nt]]);return qt};function yi(Ve){const{prefixCls:Yt,className:qt,rootClassName:xt,style:nt,help:Kt,errors:ln,warnings:xn,validateStatus:On,meta:St,hasFeedback:gn,hidden:Rn,children:ai,fieldId:hn,required:Jt,isRequired:Xn,onSubItemMetaChange:si}=Ve,ui=ti(Ve,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Qn=`${Yt}-item`,{requiredMark:di}=Ze.useContext(Me.q3),hi=Ze.useRef(null),Ri=yt(ln),Xi=yt(xn),tr=Kt!=null,yn=!!(tr||ln.length||xn.length),Br=!!hi.current&&(0,ot.Z)(hi.current),[br,Wr]=Ze.useState(null);(0,et.Z)(()=>{if(yn&&hi.current){const Ni=getComputedStyle(hi.current);Wr(parseInt(Ni.marginBottom,10))}},[yn,Br]);const mn=Ni=>{Ni||Wr(null)},Si=function(){let Ni=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const ji=Ni?Ri:St.errors,ar=Ni?Xi:St.warnings;return sn(ji,ar,St,"",!!gn,On)}(),zi=ze()(Qn,qt,xt,{[`${Qn}-with-help`]:tr||Ri.length||Xi.length,[`${Qn}-has-feedback`]:Si&&gn,[`${Qn}-has-success`]:Si==="success",[`${Qn}-has-warning`]:Si==="warning",[`${Qn}-has-error`]:Si==="error",[`${Qn}-is-validating`]:Si==="validating",[`${Qn}-hidden`]:Rn});return Ze.createElement("div",{className:zi,style:nt,ref:hi},Ze.createElement(xe.Z,Object.assign({className:`${Qn}-row`},(0,Te.Z)(ui,["_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"])),Ze.createElement(ii,Object.assign({htmlFor:hn},Ve,{requiredMark:di,required:Jt!=null?Jt:Xn,prefixCls:Yt})),Ze.createElement(ft,Object.assign({},Ve,St,{errors:Ri,warnings:Xi,prefixCls:Yt,status:Si,help:Kt,marginBottom:br,onErrorVisibleChanged:mn}),Ze.createElement(Me.qI.Provider,{value:si},Ze.createElement(Wn,{prefixCls:Yt,meta:St,errors:St.errors,warnings:St.warnings,hasFeedback:gn,validateStatus:Si},ai)))),!!br&&Ze.createElement("div",{className:`${Qn}-margin-offset`,style:{marginBottom:-br}}))}const mi="__SPLIT__",dr=null,mr=Ze.memo(Ve=>{let{children:Yt}=Ve;return Yt},(Ve,Yt)=>Ve.value===Yt.value&&Ve.update===Yt.update&&Ve.childProps.length===Yt.childProps.length&&Ve.childProps.every((qt,xt)=>qt===Yt.childProps[xt]));function be(Ve){return Ve!=null}function ci(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Hi(Ve){const{name:Yt,noStyle:qt,className:xt,dependencies:nt,prefixCls:Kt,shouldUpdate:ln,rules:xn,children:On,required:St,label:gn,messageVariables:Rn,trigger:ai="onChange",validateTrigger:hn,hidden:Jt,help:Xn}=Ve,{getPrefixCls:si}=Ze.useContext(Et.E_),{name:ui}=Ze.useContext(Me.q3),Qn=Rt(On),di=typeof Qn=="function",hi=Ze.useContext(Me.qI),{validateTrigger:Ri}=Ze.useContext(qe.FieldContext),Xi=hn!==void 0?hn:Ri,tr=be(Yt),yn=si("form",Kt),[Br,br]=Je(yn),Wr=Ze.useContext(qe.ListContext),mn=Ze.useRef(),[_n,Si]=Dt({}),[zi,Ni]=(0,Ln.Z)(()=>ci()),ji=Bn=>{const _r=Wr==null?void 0:Wr.getKey(Bn.name);if(Ni(Bn.destroy?ci():Bn,!0),qt&&Xn!==!1&&hi){let co=Bn.name;if(Bn.destroy)co=mn.current||co;else if(_r!==void 0){const[Bi,Po]=_r;co=[Bi].concat((0,ce.Z)(Po)),mn.current=co}hi(Bn,co)}},ar=(Bn,_r)=>{Si(co=>{const Bi=Object.assign({},co),ao=[].concat((0,ce.Z)(Bn.name.slice(0,-1)),(0,ce.Z)(_r)).join(mi);return Bn.destroy?delete Bi[ao]:Bi[ao]=Bn,Bi})},[Qi,nr]=Ze.useMemo(()=>{const Bn=(0,ce.Z)(zi.errors),_r=(0,ce.Z)(zi.warnings);return Object.values(_n).forEach(co=>{Bn.push.apply(Bn,(0,ce.Z)(co.errors||[])),_r.push.apply(_r,(0,ce.Z)(co.warnings||[]))}),[Bn,_r]},[_n,zi.errors,zi.warnings]),hr=Tt();function An(Bn,_r,co){return qt&&!Jt?Ze.createElement(Wn,{prefixCls:yn,hasFeedback:Ve.hasFeedback,validateStatus:Ve.validateStatus,meta:zi,errors:Qi,warnings:nr,noStyle:!0},Bn):Ze.createElement(yi,Object.assign({key:"row"},Ve,{className:ze()(xt,br),prefixCls:yn,fieldId:_r,isRequired:co,errors:Qi,warnings:nr,meta:zi,onSubItemMetaChange:ar}),Bn)}if(!tr&&!di&&!nt)return Br(An(Qn));let Jr={};return typeof gn=="string"?Jr.label=gn:Yt&&(Jr.label=String(Yt)),Rn&&(Jr=Object.assign(Object.assign({},Jr),Rn)),Br(Ze.createElement(qe.Field,Object.assign({},Ve,{messageVariables:Jr,trigger:ai,validateTrigger:Xi,onMetaChange:ji}),(Bn,_r,co)=>{const Bi=Nt(Yt).length&&_r?_r.name:[],Po=cn(Bi,ui),ao=St!==void 0?St:!!(xn&&xn.some(Zr=>{if(Zr&&typeof Zr=="object"&&Zr.required&&!Zr.warningOnly)return!0;if(typeof Zr=="function"){const ro=Zr(co);return ro&&ro.required&&!ro.warningOnly}return!1})),Ki=Object.assign({},Bn);let qi=null;if(Array.isArray(Qn)&&tr)qi=Qn;else if(!(di&&(!(ln||nt)||tr))){if(!(nt&&!di&&!tr))if((0,Zt.l$)(Qn)){const Zr=Object.assign(Object.assign({},Qn.props),Ki);if(Zr.id||(Zr.id=Po),Xn||Qi.length>0||nr.length>0||Ve.extra){const Qe=[];(Xn||Qi.length>0)&&Qe.push(`${Po}_help`),Ve.extra&&Qe.push(`${Po}_extra`),Zr["aria-describedby"]=Qe.join(" ")}Qi.length>0&&(Zr["aria-invalid"]="true"),ao&&(Zr["aria-required"]="true"),(0,Un.Yr)(Qn)&&(Zr.ref=hr(Bi,Qn)),new Set([].concat((0,ce.Z)(Nt(ai)),(0,ce.Z)(Nt(Xi)))).forEach(Qe=>{Zr[Qe]=function(){for(var uo,Zo,ga,Pa,ia,Dr=arguments.length,kr=new Array(Dr),fo=0;fo<Dr;fo++)kr[fo]=arguments[fo];(ga=Ki[Qe])===null||ga===void 0||(uo=ga).call.apply(uo,[Ki].concat(kr)),(ia=(Pa=Qn.props)[Qe])===null||ia===void 0||(Zo=ia).call.apply(Zo,[Pa].concat(kr))}});const wi=[Zr["aria-required"],Zr["aria-invalid"],Zr["aria-describedby"]];qi=Ze.createElement(mr,{value:Ki[Ve.valuePropName||"value"],update:Qn,childProps:wi},(0,Zt.Tm)(Qn,Zr))}else di&&(ln||nt)&&!tr?qi=Qn(co):qi=Qn}return An(qi,Po,ao)}))}const dn=Hi;dn.useStatus=ut;var oi=dn,vi=function(Ve,Yt){var qt={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Yt.indexOf(xt)<0&&(qt[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,xt=Object.getOwnPropertySymbols(Ve);nt<xt.length;nt++)Yt.indexOf(xt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[nt])&&(qt[xt[nt]]=Ve[xt[nt]]);return qt},Vn=Ve=>{var{prefixCls:Yt,children:qt}=Ve,xt=vi(Ve,["prefixCls","children"]);const{getPrefixCls:nt}=Ze.useContext(Et.E_),Kt=nt("form",Yt),ln=Ze.useMemo(()=>({prefixCls:Kt,status:"error"}),[Kt]);return Ze.createElement(qe.List,Object.assign({},xt),(xn,On,St)=>Ze.createElement(Me.Rk.Provider,{value:ln},qt(xn.map(gn=>Object.assign(Object.assign({},gn),{fieldKey:gn.key})),On,{errors:St.errors,warnings:St.warnings})))};function bn(){const{form:Ve}=(0,Ze.useContext)(Me.q3);return Ve}const Mt=pt;Mt.Item=oi,Mt.List=Vn,Mt.ErrorList=At,Mt.useForm=$t,Mt.useFormInstance=bn,Mt.useWatch=qe.useWatch,Mt.Provider=Me.RV,Mt.create=()=>{};var Ot=Mt},8628:function(Cn,un,ve){"use strict";var ce=ve(59301),De=ve(34280),ze=ve(56762),wt=ve(69507);function Ze(){let ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Me=(0,ce.useRef)({}),yt=(0,ze.Z)(),ct=(0,wt.ZP)();return(0,De.Z)(()=>{const He=ct.subscribe(st=>{Me.current=st,ht&&yt()});return()=>ct.unsubscribe(He)},[]),Me.current}un.Z=Ze},9432:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return de},n:function(){return he}});var ce=ve(19248),De=ve(92310),ze=ve.n(De),wt=ve(93681),Ze=ve(8654),ht=ve(59301),Me=ve(19080),yt=ve(36355),ct=ve(1684),He=ve(19716),st=ve(32441),mt=ve(33234),dt=ve(59412),Ae=ve(9937);function te(me){return!!(me.prefix||me.suffix||me.allowClear)}var ee=function(me,we){var Ne={};for(var Fe in me)Object.prototype.hasOwnProperty.call(me,Fe)&&we.indexOf(Fe)<0&&(Ne[Fe]=me[Fe]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,Fe=Object.getOwnPropertySymbols(me);Ie<Fe.length;Ie++)we.indexOf(Fe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(me,Fe[Ie])&&(Ne[Fe[Ie]]=me[Fe[Ie]]);return Ne};function he(me,we){if(!me)return;me.focus(we);const{cursor:Ne}=we||{};if(Ne){const Fe=me.value.length;switch(Ne){case"start":me.setSelectionRange(0,0);break;case"end":me.setSelectionRange(Fe,Fe);break;default:me.setSelectionRange(0,Fe);break}}}var de=(0,ht.forwardRef)((me,we)=>{var Ne;const{prefixCls:Fe,bordered:Ie=!0,status:je,size:Je,disabled:Ke,onBlur:gt,onFocus:Re,suffix:At,allowClear:qe,addonAfter:Et,addonBefore:kt,className:Bt,style:Gt,styles:Ut,rootClassName:lt,onChange:$e,classNames:Nt}=me,cn=ee(me,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:sn,direction:Ft,input:$t}=ht.useContext(yt.E_),en=sn("input",Fe),Nn=(0,ht.useRef)(null),[fn,Mn]=(0,Ae.ZP)(en),{compactSize:pt,compactItemClassnames:Ln}=(0,mt.ri)(en,Ft),Un=(0,He.Z)(_e=>{var Ee;return(Ee=Je!=null?Je:pt)!==null&&Ee!==void 0?Ee:_e}),Zt=ht.useContext(ct.Z),tn=Ke!=null?Ke:Zt,{status:Rt,hasFeedback:Lt,feedbackIcon:ut}=(0,ht.useContext)(st.aM),Ge=(0,Me.F)(Rt,je),Dt=te(me)||!!Lt,Tt=(0,ht.useRef)(Dt);(0,ht.useEffect)(()=>{var _e;Dt&&Tt.current,Tt.current=Dt},[Dt]);const ot=(0,dt.Z)(Nn,!0),et=_e=>{ot(),gt==null||gt(_e)},Te=_e=>{ot(),Re==null||Re(_e)},xe=_e=>{ot(),$e==null||$e(_e)},Se=(Lt||At)&&ht.createElement(ht.Fragment,null,At,Lt&&ut);let Be;return typeof qe=="object"&&(qe!=null&&qe.clearIcon)?Be=qe:qe&&(Be={clearIcon:ht.createElement(ce.Z,null)}),fn(ht.createElement(wt.default,Object.assign({ref:(0,Ze.sQ)(we,Nn),prefixCls:en,autoComplete:$t==null?void 0:$t.autoComplete},cn,{disabled:tn,onBlur:et,onFocus:Te,style:Object.assign(Object.assign({},$t==null?void 0:$t.style),Gt),styles:Object.assign(Object.assign({},$t==null?void 0:$t.styles),Ut),suffix:Se,allowClear:Be,className:ze()(Bt,lt,Ln,$t==null?void 0:$t.className),onChange:xe,addonAfter:Et&&ht.createElement(mt.BR,null,ht.createElement(st.Ux,{override:!0,status:!0},Et)),addonBefore:kt&&ht.createElement(mt.BR,null,ht.createElement(st.Ux,{override:!0,status:!0},kt)),classNames:Object.assign(Object.assign(Object.assign({},Nt),$t==null?void 0:$t.classNames),{input:ze()({[`${en}-sm`]:Un==="small",[`${en}-lg`]:Un==="large",[`${en}-rtl`]:Ft==="rtl",[`${en}-borderless`]:!Ie},!Dt&&(0,Me.Z)(en,Ge),Nt==null?void 0:Nt.input,(Ne=$t==null?void 0:$t.classNames)===null||Ne===void 0?void 0:Ne.input,Mn)}),classes:{affixWrapper:ze()({[`${en}-affix-wrapper-sm`]:Un==="small",[`${en}-affix-wrapper-lg`]:Un==="large",[`${en}-affix-wrapper-rtl`]:Ft==="rtl",[`${en}-affix-wrapper-borderless`]:!Ie},(0,Me.Z)(`${en}-affix-wrapper`,Ge,Lt),Mn),wrapper:ze()({[`${en}-group-rtl`]:Ft==="rtl"},Mn),group:ze()({[`${en}-group-wrapper-sm`]:Un==="small",[`${en}-group-wrapper-lg`]:Un==="large",[`${en}-group-wrapper-rtl`]:Ft==="rtl",[`${en}-group-wrapper-disabled`]:tn},(0,Me.Z)(`${en}-group-wrapper`,Ge,Lt),Mn)}})))})},1643:function(Cn,un,ve){"use strict";var ce=ve(19248),De=ve(92310),ze=ve.n(De),wt=ve(9296),Ze=ve(59301),ht=ve(19080),Me=ve(36355),yt=ve(1684),ct=ve(19716),He=ve(32441),st=ve(9432),mt=ve(9937),dt=function(te,ee){var he={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(he[se]=te[se]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,se=Object.getOwnPropertySymbols(te);de<se.length;de++)ee.indexOf(se[de])<0&&Object.prototype.propertyIsEnumerable.call(te,se[de])&&(he[se[de]]=te[se[de]]);return he};const Ae=(0,Ze.forwardRef)((te,ee)=>{const{prefixCls:he,bordered:se=!0,size:de,disabled:me,status:we,allowClear:Ne,showCount:Fe,classNames:Ie,rootClassName:je,className:Je}=te,Ke=dt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:gt,direction:Re}=Ze.useContext(Me.E_),At=(0,ct.Z)(de),qe=Ze.useContext(yt.Z),Et=me!=null?me:qe,{status:kt,hasFeedback:Bt,feedbackIcon:Gt}=Ze.useContext(He.aM),Ut=(0,ht.F)(kt,we),lt=Ze.useRef(null);Ze.useImperativeHandle(ee,()=>{var Ft;return{resizableTextArea:(Ft=lt.current)===null||Ft===void 0?void 0:Ft.resizableTextArea,focus:$t=>{var en,Nn;(0,st.n)((Nn=(en=lt.current)===null||en===void 0?void 0:en.resizableTextArea)===null||Nn===void 0?void 0:Nn.textArea,$t)},blur:()=>{var $t;return($t=lt.current)===null||$t===void 0?void 0:$t.blur()}}});const $e=gt("input",he);let Nt;typeof Ne=="object"&&(Ne!=null&&Ne.clearIcon)?Nt=Ne:Ne&&(Nt={clearIcon:Ze.createElement(ce.Z,null)});const[cn,sn]=(0,mt.ZP)($e);return cn(Ze.createElement(wt.default,Object.assign({},Ke,{disabled:Et,allowClear:Nt,className:ze()(Je,je),classes:{affixWrapper:ze()(`${$e}-textarea-affix-wrapper`,{[`${$e}-affix-wrapper-rtl`]:Re==="rtl",[`${$e}-affix-wrapper-borderless`]:!se,[`${$e}-affix-wrapper-sm`]:At==="small",[`${$e}-affix-wrapper-lg`]:At==="large",[`${$e}-textarea-show-count`]:Fe},(0,ht.Z)(`${$e}-affix-wrapper`,Ut),sn)},classNames:Object.assign(Object.assign({},Ie),{textarea:ze()({[`${$e}-borderless`]:!se,[`${$e}-sm`]:At==="small",[`${$e}-lg`]:At==="large"},(0,ht.Z)($e,Ut),sn,Ie==null?void 0:Ie.textarea)}),prefixCls:$e,suffix:Bt&&Ze.createElement("span",{className:`${$e}-textarea-suffix`},Gt),showCount:Fe,ref:lt})))});un.Z=Ae},59412:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return De}});var ce=ve(59301);function De(ze,wt){const Ze=(0,ce.useRef)([]),ht=()=>{Ze.current.push(setTimeout(()=>{var Me,yt,ct,He;!((Me=ze.current)===null||Me===void 0)&&Me.input&&((yt=ze.current)===null||yt===void 0?void 0:yt.input.getAttribute("type"))==="password"&&(!((ct=ze.current)===null||ct===void 0)&&ct.input.hasAttribute("value"))&&((He=ze.current)===null||He===void 0||He.input.removeAttribute("value"))}))};return(0,ce.useEffect)(()=>(wt&&ht(),()=>Ze.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),ht}},92832:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return At}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),wt=ve(36355),Ze=ve(32441),ht=ve(9937),yt=qe=>{const{getPrefixCls:Et,direction:kt}=(0,ze.useContext)(wt.E_),{prefixCls:Bt,className:Gt}=qe,Ut=Et("input-group",Bt),lt=Et("input"),[$e,Nt]=(0,ht.ZP)(lt),cn=De()(Ut,{[`${Ut}-lg`]:qe.size==="large",[`${Ut}-sm`]:qe.size==="small",[`${Ut}-compact`]:qe.compact,[`${Ut}-rtl`]:kt==="rtl"},Nt,Gt),sn=(0,ze.useContext)(Ze.aM),Ft=(0,ze.useMemo)(()=>Object.assign(Object.assign({},sn),{isFormItemInput:!1}),[sn]);return $e(ze.createElement("span",{className:cn,style:qe.style,onMouseEnter:qe.onMouseEnter,onMouseLeave:qe.onMouseLeave,onFocus:qe.onFocus,onBlur:qe.onBlur},ze.createElement(Ze.aM.Provider,{value:Ft},qe.children)))},ct=ve(9432),He=ve(73331),st=ve(15277),mt=ve(2738),dt=ve(8654),Ae=ve(59412),te=function(qe,Et){var kt={};for(var Bt in qe)Object.prototype.hasOwnProperty.call(qe,Bt)&&Et.indexOf(Bt)<0&&(kt[Bt]=qe[Bt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Bt=Object.getOwnPropertySymbols(qe);Gt<Bt.length;Gt++)Et.indexOf(Bt[Gt])<0&&Object.prototype.propertyIsEnumerable.call(qe,Bt[Gt])&&(kt[Bt[Gt]]=qe[Bt[Gt]]);return kt};const ee=qe=>qe?ze.createElement(st.Z,null):ze.createElement(He.Z,null),he={click:"onClick",hover:"onMouseOver"};var de=ze.forwardRef((qe,Et)=>{const{visibilityToggle:kt=!0}=qe,Bt=typeof kt=="object"&&kt.visible!==void 0,[Gt,Ut]=(0,ze.useState)(()=>Bt?kt.visible:!1),lt=(0,ze.useRef)(null);ze.useEffect(()=>{Bt&&Ut(kt.visible)},[Bt,kt]);const $e=(0,Ae.Z)(lt),Nt=()=>{const{disabled:tn}=qe;tn||(Gt&&$e(),Ut(Rt=>{var Lt;const ut=!Rt;return typeof kt=="object"&&((Lt=kt.onVisibleChange)===null||Lt===void 0||Lt.call(kt,ut)),ut}))},cn=tn=>{const{action:Rt="click",iconRender:Lt=ee}=qe,ut=he[Rt]||"",Ge=Lt(Gt),Dt={[ut]:Nt,className:`${tn}-icon`,key:"passwordIcon",onMouseDown:Tt=>{Tt.preventDefault()},onMouseUp:Tt=>{Tt.preventDefault()}};return ze.cloneElement(ze.isValidElement(Ge)?Ge:ze.createElement("span",null,Ge),Dt)},{className:sn,prefixCls:Ft,inputPrefixCls:$t,size:en}=qe,Nn=te(qe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:fn}=ze.useContext(wt.E_),Mn=fn("input",$t),pt=fn("input-password",Ft),Ln=kt&&cn(pt),Un=De()(pt,sn,{[`${pt}-${en}`]:!!en}),Zt=Object.assign(Object.assign({},(0,mt.Z)(Nn,["suffix","iconRender","visibilityToggle"])),{type:Gt?"text":"password",className:Un,prefixCls:Mn,suffix:Ln});return en&&(Zt.size=en),ze.createElement(ct.Z,Object.assign({ref:(0,dt.sQ)(Et,lt)},Zt))}),me=ve(47472),we=ve(92343),Ne=ve(3113),Fe=ve(19716),Ie=ve(33234),je=function(qe,Et){var kt={};for(var Bt in qe)Object.prototype.hasOwnProperty.call(qe,Bt)&&Et.indexOf(Bt)<0&&(kt[Bt]=qe[Bt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Bt=Object.getOwnPropertySymbols(qe);Gt<Bt.length;Gt++)Et.indexOf(Bt[Gt])<0&&Object.prototype.propertyIsEnumerable.call(qe,Bt[Gt])&&(kt[Bt[Gt]]=qe[Bt[Gt]]);return kt},Ke=ze.forwardRef((qe,Et)=>{const{prefixCls:kt,inputPrefixCls:Bt,className:Gt,size:Ut,suffix:lt,enterButton:$e=!1,addonAfter:Nt,loading:cn,disabled:sn,onSearch:Ft,onChange:$t,onCompositionStart:en,onCompositionEnd:Nn}=qe,fn=je(qe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Mn,direction:pt}=ze.useContext(wt.E_),Ln=ze.useRef(!1),Un=Mn("input-search",kt),Zt=Mn("input",Bt),{compactSize:tn}=(0,Ie.ri)(Un,pt),Rt=(0,Fe.Z)(ft=>{var Xt;return(Xt=Ut!=null?Ut:tn)!==null&&Xt!==void 0?Xt:ft}),Lt=ze.useRef(null),ut=ft=>{ft&&ft.target&&ft.type==="click"&&Ft&&Ft(ft.target.value,ft,{source:"clear"}),$t&&$t(ft)},Ge=ft=>{var Xt;document.activeElement===((Xt=Lt.current)===null||Xt===void 0?void 0:Xt.input)&&ft.preventDefault()},Dt=ft=>{var Xt,an;Ft&&Ft((an=(Xt=Lt.current)===null||Xt===void 0?void 0:Xt.input)===null||an===void 0?void 0:an.value,ft,{source:"input"})},Tt=ft=>{Ln.current||cn||Dt(ft)},ot=typeof $e=="boolean"?ze.createElement(me.Z,null):null,et=`${Un}-button`;let Te;const xe=$e||{},Se=xe.type&&xe.type.__ANT_BUTTON===!0;Se||xe.type==="button"?Te=(0,we.Tm)(xe,Object.assign({onMouseDown:Ge,onClick:ft=>{var Xt,an;(an=(Xt=xe==null?void 0:xe.props)===null||Xt===void 0?void 0:Xt.onClick)===null||an===void 0||an.call(Xt,ft),Dt(ft)},key:"enterButton"},Se?{className:et,size:Rt}:{})):Te=ze.createElement(Ne.ZP,{className:et,type:$e?"primary":void 0,size:Rt,disabled:sn,key:"enterButton",onMouseDown:Ge,onClick:Dt,loading:cn,icon:ot},$e),Nt&&(Te=[Te,(0,we.Tm)(Nt,{key:"addonAfter"})]);const Be=De()(Un,{[`${Un}-rtl`]:pt==="rtl",[`${Un}-${Rt}`]:!!Rt,[`${Un}-with-button`]:!!$e},Gt),_e=ft=>{Ln.current=!0,en==null||en(ft)},Ee=ft=>{Ln.current=!1,Nn==null||Nn(ft)};return ze.createElement(ct.Z,Object.assign({ref:(0,dt.sQ)(Lt,Et),onPressEnter:Tt},fn,{size:Rt,onCompositionStart:_e,onCompositionEnd:Ee,prefixCls:Zt,addonAfter:Te,suffix:lt,onChange:ut,className:Be,disabled:sn}))}),gt=ve(1643);const Re=ct.Z;Re.Group=yt,Re.Search=Ke,Re.TextArea=gt.Z,Re.Password=de;var At=Re},45818:function(Cn,un,ve){"use strict";ve.d(un,{D:function(){return me},Z:function(){return Fe}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(je,Je){return De.createElement(Ze.Z,(0,ce.Z)({},je,{ref:Je,icon:wt}))},Me=De.forwardRef(ht),yt=Me,ct=ve(33853),He=ve(38819),st=ve(92310),mt=ve.n(st),dt=ve(2738),te=Ie=>!isNaN(parseFloat(Ie))&&isFinite(Ie),ee=ve(36355),he=ve(84966),se=function(Ie,je){var Je={};for(var Ke in Ie)Object.prototype.hasOwnProperty.call(Ie,Ke)&&je.indexOf(Ke)<0&&(Je[Ke]=Ie[Ke]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Ke=Object.getOwnPropertySymbols(Ie);gt<Ke.length;gt++)je.indexOf(Ke[gt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ke[gt])&&(Je[Ke[gt]]=Ie[Ke[gt]]);return Je};const de={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},me=De.createContext({}),we=(()=>{let Ie=0;return function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ie+=1,`${je}${Ie}`}})();var Fe=De.forwardRef((Ie,je)=>{const{prefixCls:Je,className:Ke,trigger:gt,children:Re,defaultCollapsed:At=!1,theme:qe="dark",style:Et={},collapsible:kt=!1,reverseArrow:Bt=!1,width:Gt=200,collapsedWidth:Ut=80,zeroWidthTriggerStyle:lt,breakpoint:$e,onCollapse:Nt,onBreakpoint:cn}=Ie,sn=se(Ie,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ft}=(0,De.useContext)(he.Gs),[$t,en]=(0,De.useState)("collapsed"in Ie?Ie.collapsed:At),[Nn,fn]=(0,De.useState)(!1);(0,De.useEffect)(()=>{"collapsed"in Ie&&en(Ie.collapsed)},[Ie.collapsed]);const Mn=(Rt,Lt)=>{"collapsed"in Ie||en(Rt),Nt==null||Nt(Rt,Lt)},pt=(0,De.useRef)();pt.current=Rt=>{fn(Rt.matches),cn==null||cn(Rt.matches),$t!==Rt.matches&&Mn(Rt.matches,"responsive")},(0,De.useEffect)(()=>{function Rt(ut){return pt.current(ut)}let Lt;if(typeof window!="undefined"){const{matchMedia:ut}=window;if(ut&&$e&&$e in de){Lt=ut(`(max-width: ${de[$e]})`);try{Lt.addEventListener("change",Rt)}catch(Ge){Lt.addListener(Rt)}Rt(Lt)}}return()=>{try{Lt==null||Lt.removeEventListener("change",Rt)}catch(ut){Lt==null||Lt.removeListener(Rt)}}},[$e]),(0,De.useEffect)(()=>{const Rt=we("ant-sider-");return Ft.addSider(Rt),()=>Ft.removeSider(Rt)},[]);const Ln=()=>{Mn(!$t,"clickTrigger")},{getPrefixCls:Un}=(0,De.useContext)(ee.E_),Zt=()=>{const Rt=Un("layout-sider",Je),Lt=(0,dt.Z)(sn,["collapsed"]),ut=$t?Ut:Gt,Ge=te(ut)?`${ut}px`:String(ut),Dt=parseFloat(String(Ut||0))===0?De.createElement("span",{onClick:Ln,className:mt()(`${Rt}-zero-width-trigger`,`${Rt}-zero-width-trigger-${Bt?"right":"left"}`),style:lt},gt||De.createElement(yt,null)):null,et={expanded:Bt?De.createElement(He.Z,null):De.createElement(ct.Z,null),collapsed:Bt?De.createElement(ct.Z,null):De.createElement(He.Z,null)}[$t?"collapsed":"expanded"],Te=gt!==null?Dt||De.createElement("div",{className:`${Rt}-trigger`,onClick:Ln,style:{width:Ge}},gt||et):null,xe=Object.assign(Object.assign({},Et),{flex:`0 0 ${Ge}`,maxWidth:Ge,minWidth:Ge,width:Ge}),Se=mt()(Rt,`${Rt}-${qe}`,{[`${Rt}-collapsed`]:!!$t,[`${Rt}-has-trigger`]:kt&>!==null&&!Dt,[`${Rt}-below`]:!!Nn,[`${Rt}-zero-width`]:parseFloat(Ge)===0},Ke);return De.createElement("aside",Object.assign({className:Se},Lt,{style:xe,ref:je}),De.createElement("div",{className:`${Rt}-children`},Re),kt||Nn&&Dt?Te:null)},tn=De.useMemo(()=>({siderCollapsed:$t}),[$t]);return De.createElement(me.Provider,{value:tn},Zt())})},84966:function(Cn,un,ve){"use strict";ve.d(un,{VY:function(){return me},$_:function(){return de},h4:function(){return se},Gs:function(){return dt},ZP:function(){return we}});var ce=ve(80702),De=ve(92310),ze=ve.n(De),wt=ve(2738),Ze=ve(59301),ht=ve(36355),Me=ve(83116),ct=Ne=>{const{componentCls:Fe,bodyBg:Ie,lightSiderBg:je,lightTriggerBg:Je,lightTriggerColor:Ke}=Ne;return{[`${Fe}-sider-light`]:{background:je,[`${Fe}-sider-trigger`]:{color:Ke,background:Je},[`${Fe}-sider-zero-width-trigger`]:{color:Ke,background:Je,border:`1px solid ${Ie}`,borderInlineStart:0}}}};const He=Ne=>{const{antCls:Fe,componentCls:Ie,colorText:je,triggerColor:Je,footerBg:Ke,triggerBg:gt,headerHeight:Re,headerPadding:At,headerColor:qe,footerPadding:Et,triggerHeight:kt,zeroTriggerHeight:Bt,zeroTriggerWidth:Gt,motionDurationMid:Ut,motionDurationSlow:lt,fontSize:$e,borderRadius:Nt,bodyBg:cn,headerBg:sn,siderBg:Ft}=Ne;return{[Ie]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:cn,"&, *":{boxSizing:"border-box"},[`&${Ie}-has-sider`]:{flexDirection:"row",[`> ${Ie}, > ${Ie}-content`]:{width:0}},[`${Ie}-header, &${Ie}-footer`]:{flex:"0 0 auto"},[`${Ie}-sider`]:{position:"relative",minWidth:0,background:Ft,transition:`all ${Ut}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Fe}-menu${Fe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:kt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:kt,color:Je,lineHeight:`${kt}px`,textAlign:"center",background:gt,cursor:"pointer",transition:`all ${Ut}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Re,insetInlineEnd:-Gt,zIndex:1,width:Gt,height:Bt,color:Je,fontSize:Ne.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Ft,borderStartStartRadius:0,borderStartEndRadius:Nt,borderEndEndRadius:Nt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${lt} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${lt}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Gt,borderStartStartRadius:Nt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Nt}}}}},ct(Ne)),{"&-rtl":{direction:"rtl"}}),[`${Ie}-header`]:{height:Re,padding:At,color:qe,lineHeight:`${Re}px`,background:sn,[`${Fe}-menu`]:{lineHeight:"inherit"}},[`${Ie}-footer`]:{padding:Et,color:je,fontSize:$e,background:Ke},[`${Ie}-content`]:{flex:"auto",minHeight:0}}};var st=(0,Me.Z)("Layout",Ne=>[He(Ne)],Ne=>{const{colorBgLayout:Fe,controlHeight:Ie,controlHeightLG:je,colorText:Je,controlHeightSM:Ke,marginXXS:gt,colorTextLightSolid:Re,colorBgContainer:At}=Ne,qe=je*1.25;return{colorBgHeader:"#001529",colorBgBody:Fe,colorBgTrigger:"#002140",bodyBg:Fe,headerBg:"#001529",headerHeight:Ie*2,headerPadding:`0 ${qe}px`,headerColor:Je,footerPadding:`${Ke}px ${qe}px`,footerBg:Fe,siderBg:"#001529",triggerHeight:je+gt*2,triggerBg:"#002140",triggerColor:Re,zeroTriggerWidth:je,zeroTriggerHeight:je,lightSiderBg:At,lightTriggerBg:At,lightTriggerColor:Je}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),mt=function(Ne,Fe){var Ie={};for(var je in Ne)Object.prototype.hasOwnProperty.call(Ne,je)&&Fe.indexOf(je)<0&&(Ie[je]=Ne[je]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Je=0,je=Object.getOwnPropertySymbols(Ne);Je<je.length;Je++)Fe.indexOf(je[Je])<0&&Object.prototype.propertyIsEnumerable.call(Ne,je[Je])&&(Ie[je[Je]]=Ne[je[Je]]);return Ie};const dt=Ze.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ae(Ne){let{suffixCls:Fe,tagName:Ie,displayName:je}=Ne;return Je=>Ze.forwardRef((gt,Re)=>Ze.createElement(Je,Object.assign({ref:Re,suffixCls:Fe,tagName:Ie},gt)))}const te=Ze.forwardRef((Ne,Fe)=>{const{prefixCls:Ie,suffixCls:je,className:Je,tagName:Ke}=Ne,gt=mt(Ne,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Re}=Ze.useContext(ht.E_),At=Re("layout",Ie),[qe,Et]=st(At),kt=je?`${At}-${je}`:At;return qe(Ze.createElement(Ke,Object.assign({className:ze()(Ie||kt,Je,Et),ref:Fe},gt)))}),ee=Ze.forwardRef((Ne,Fe)=>{const{direction:Ie}=Ze.useContext(ht.E_),[je,Je]=Ze.useState([]),{prefixCls:Ke,className:gt,rootClassName:Re,children:At,hasSider:qe,tagName:Et,style:kt}=Ne,Bt=mt(Ne,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Gt=(0,wt.Z)(Bt,["suffixCls"]),{getPrefixCls:Ut,layout:lt}=Ze.useContext(ht.E_),$e=Ut("layout",Ke),[Nt,cn]=st($e),sn=ze()($e,{[`${$e}-has-sider`]:typeof qe=="boolean"?qe:je.length>0,[`${$e}-rtl`]:Ie==="rtl"},lt==null?void 0:lt.className,gt,Re,cn),Ft=Ze.useMemo(()=>({siderHook:{addSider:$t=>{Je(en=>[].concat((0,ce.Z)(en),[$t]))},removeSider:$t=>{Je(en=>en.filter(Nn=>Nn!==$t))}}}),[]);return Nt(Ze.createElement(dt.Provider,{value:Ft},Ze.createElement(Et,Object.assign({ref:Fe,className:sn,style:Object.assign(Object.assign({},lt==null?void 0:lt.style),kt)},Gt),At)))}),he=Ae({tagName:"div",displayName:"Layout"})(ee),se=Ae({suffixCls:"header",tagName:"header",displayName:"Header"})(te),de=Ae({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),me=Ae({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var we=he},40875:function(Cn,un,ve){"use strict";ve.d(un,{J:function(){return ht}});var ce=ve(59301),De=ve(33234),ze=ve(70425),wt=function(Me,yt){var ct={};for(var He in Me)Object.prototype.hasOwnProperty.call(Me,He)&&yt.indexOf(He)<0&&(ct[He]=Me[He]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,He=Object.getOwnPropertySymbols(Me);st<He.length;st++)yt.indexOf(He[st])<0&&Object.prototype.propertyIsEnumerable.call(Me,He[st])&&(ct[He[st]]=Me[He[st]]);return ct};const Ze=ce.createContext(null),ht=ce.forwardRef((Me,yt)=>{const{children:ct}=Me,He=wt(Me,["children"]),st=ce.useContext(Ze),mt=ce.useMemo(()=>Object.assign(Object.assign({},st),He),[st,He.prefixCls,He.mode,He.selectable]);return ce.createElement(Ze.Provider,{value:mt},ce.createElement(De.BR,null,(0,ze.supportNodeRef)(ct)?ce.cloneElement(ct,{ref:yt}):ct))});un.Z=Ze},20834:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return tn}});var ce=ve(15285),De=ve(59301),ze=ve(45818),wt=ve(92310),Ze=ve.n(wt),ht=ve(36355),Me=function(Rt,Lt){var ut={};for(var Ge in Rt)Object.prototype.hasOwnProperty.call(Rt,Ge)&&Lt.indexOf(Ge)<0&&(ut[Ge]=Rt[Ge]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ge=Object.getOwnPropertySymbols(Rt);Dt<Ge.length;Dt++)Lt.indexOf(Ge[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,Ge[Dt])&&(ut[Ge[Dt]]=Rt[Ge[Dt]]);return ut},ct=Rt=>{const{prefixCls:Lt,className:ut,dashed:Ge}=Rt,Dt=Me(Rt,["prefixCls","className","dashed"]),{getPrefixCls:Tt}=De.useContext(ht.E_),ot=Tt("menu",Lt),et=Ze()({[`${ot}-item-divider-dashed`]:!!Ge},ut);return De.createElement(ce.iz,Object.assign({className:et},Dt))},He=ve(11592),st=ve(2738),mt=ve(6848),dt=ve(92343),te=(0,De.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),he=Rt=>{var Lt;const{className:ut,children:Ge,icon:Dt,title:Tt,danger:ot}=Rt,{prefixCls:et,firstLevel:Te,direction:xe,disableMenuItemTitleTooltip:Se,inlineCollapsed:Be}=De.useContext(te),_e=En=>{const Yn=De.createElement("span",{className:`${et}-title-content`},Ge);return(!Dt||(0,dt.l$)(Ge)&&Ge.type==="span")&&Ge&&En&&Te&&typeof Ge=="string"?De.createElement("div",{className:`${et}-inline-collapsed-noicon`},Ge.charAt(0)):Yn},{siderCollapsed:Ee}=De.useContext(ze.D);let ft=Tt;typeof Tt=="undefined"?ft=Te?Ge:"":Tt===!1&&(ft="");const Xt={title:ft};!Ee&&!Be&&(Xt.title=null,Xt.open=!1);const an=(0,He.Z)(Ge).length;let Qt=De.createElement(ce.ck,Object.assign({},(0,st.Z)(Rt,["title","icon","danger"]),{className:Ze()({[`${et}-item-danger`]:ot,[`${et}-item-only-child`]:(Dt?an+1:an)===1},ut),title:typeof Tt=="string"?Tt:void 0}),(0,dt.Tm)(Dt,{className:Ze()((0,dt.l$)(Dt)?(Lt=Dt.props)===null||Lt===void 0?void 0:Lt.className:"",`${et}-item-icon`)}),_e(Be));return Se||(Qt=De.createElement(mt.Z,Object.assign({},Xt,{placement:xe==="rtl"?"left":"right",overlayClassName:`${et}-inline-collapsed-tooltip`}),Qt)),Qt},de=Rt=>{var Lt;const{popupClassName:ut,icon:Ge,title:Dt,theme:Tt}=Rt,ot=De.useContext(te),{prefixCls:et,inlineCollapsed:Te,theme:xe}=ot,Se=(0,ce.Xl)();let Be;if(!Ge)Be=Te&&!Se.length&&Dt&&typeof Dt=="string"?De.createElement("div",{className:`${et}-inline-collapsed-noicon`},Dt.charAt(0)):De.createElement("span",{className:`${et}-title-content`},Dt);else{const Ee=(0,dt.l$)(Dt)&&Dt.type==="span";Be=De.createElement(De.Fragment,null,(0,dt.Tm)(Ge,{className:Ze()((0,dt.l$)(Ge)?(Lt=Ge.props)===null||Lt===void 0?void 0:Lt.className:"",`${et}-item-icon`)}),Ee?Dt:De.createElement("span",{className:`${et}-title-content`},Dt))}const _e=De.useMemo(()=>Object.assign(Object.assign({},ot),{firstLevel:!1}),[ot]);return De.createElement(te.Provider,{value:_e},De.createElement(ce.Wd,Object.assign({},(0,st.Z)(Rt,["icon"]),{title:Be,popupClassName:Ze()(et,ut,`${et}-${Tt||xe}`)})))},me=ve(18785),we=ve(70425),Ne=ve(62892),Fe=ve(40875),Ie=function(Rt,Lt){var ut={};for(var Ge in Rt)Object.prototype.hasOwnProperty.call(Rt,Ge)&&Lt.indexOf(Ge)<0&&(ut[Ge]=Rt[Ge]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ge=Object.getOwnPropertySymbols(Rt);Dt<Ge.length;Dt++)Lt.indexOf(Ge[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,Ge[Dt])&&(ut[Ge[Dt]]=Rt[Ge[Dt]]);return ut};function je(Rt){return(Rt||[]).map((Lt,ut)=>{if(Lt&&typeof Lt=="object"){const Ge=Lt,{label:Dt,children:Tt,key:ot,type:et}=Ge,Te=Ie(Ge,["label","children","key","type"]),xe=ot!=null?ot:`tmp-${ut}`;return Tt||et==="group"?et==="group"?De.createElement(ce.BW,Object.assign({key:xe},Te,{title:Dt}),je(Tt)):De.createElement(de,Object.assign({key:xe},Te,{title:Dt}),je(Tt)):et==="divider"?De.createElement(ct,Object.assign({key:xe},Te)):De.createElement(he,Object.assign({key:xe},Te),Dt)}return null}).filter(Lt=>Lt)}function Je(Rt){return De.useMemo(()=>Rt&&je(Rt),[Rt])}var Ke=ve(64993),gt=ve(17313),Re=ve(8378),At=ve(13826),qe=ve(29878),Et=ve(83116),kt=ve(37613),Gt=Rt=>{const{componentCls:Lt,motionDurationSlow:ut,horizontalLineHeight:Ge,colorSplit:Dt,lineWidth:Tt,lineType:ot,itemPaddingInline:et}=Rt;return{[`${Lt}-horizontal`]:{lineHeight:Ge,border:0,borderBottom:`${Tt}px ${ot} ${Dt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Lt}-item, ${Lt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:et},[`> ${Lt}-item:hover,
|
|
|
> ${Lt}-item-active,
|
|
|
> ${Lt}-submenu ${Lt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Lt}-item, ${Lt}-submenu-title`]:{transition:[`border-color ${ut}`,`background ${ut}`].join(",")},[`${Lt}-submenu-arrow`]:{display:"none"}}}},lt=Rt=>{let{componentCls:Lt,menuArrowOffset:ut}=Rt;return{[`${Lt}-rtl`]:{direction:"rtl"},[`${Lt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Lt}-rtl${Lt}-vertical,
|
|
|
${Lt}-submenu-rtl ${Lt}-vertical`]:{[`${Lt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${ut})`},"&::after":{transform:`rotate(45deg) translateY(${ut})`}}}}};const $e=Rt=>Object.assign({},(0,gt.oN)(Rt));var cn=(Rt,Lt)=>{const{componentCls:ut,itemColor:Ge,itemSelectedColor:Dt,groupTitleColor:Tt,itemBg:ot,subMenuItemBg:et,itemSelectedBg:Te,activeBarHeight:xe,activeBarWidth:Se,activeBarBorderWidth:Be,motionDurationSlow:_e,motionEaseInOut:Ee,motionEaseOut:ft,itemPaddingInline:Xt,motionDurationMid:an,itemHoverColor:Qt,lineType:En,colorSplit:Yn,itemDisabledColor:zn,dangerItemColor:Dn,dangerItemHoverColor:ii,dangerItemSelectedColor:gi,dangerItemActiveBg:pi,dangerItemSelectedBg:Ii,itemHoverBg:Yi,itemActiveBg:Jn,menuSubMenuBg:Wn,horizontalItemSelectedColor:ti,horizontalItemSelectedBg:yi,horizontalItemBorderRadius:mi,horizontalItemHoverBg:dr,popupBg:mr}=Rt;return{[`${ut}-${Lt}, ${ut}-${Lt} > ${ut}`]:{color:Ge,background:ot,[`&${ut}-root:focus-visible`]:Object.assign({},$e(Rt)),[`${ut}-item-group-title`]:{color:Tt},[`${ut}-submenu-selected`]:{[`> ${ut}-submenu-title`]:{color:Dt}},[`${ut}-item-disabled, ${ut}-submenu-disabled`]:{color:`${zn} !important`},[`${ut}-item:not(${ut}-item-selected):not(${ut}-submenu-selected)`]:{[`&:hover, > ${ut}-submenu-title:hover`]:{color:Qt}},[`&:not(${ut}-horizontal)`]:{[`${ut}-item:not(${ut}-item-selected)`]:{"&:hover":{backgroundColor:Yi},"&:active":{backgroundColor:Jn}},[`${ut}-submenu-title`]:{"&:hover":{backgroundColor:Yi},"&:active":{backgroundColor:Jn}}},[`${ut}-item-danger`]:{color:Dn,[`&${ut}-item:hover`]:{[`&:not(${ut}-item-selected):not(${ut}-submenu-selected)`]:{color:ii}},[`&${ut}-item:active`]:{background:pi}},[`${ut}-item a`]:{"&, &:hover":{color:"inherit"}},[`${ut}-item-selected`]:{color:Dt,[`&${ut}-item-danger`]:{color:gi},"a, a:hover":{color:"inherit"}},[`& ${ut}-item-selected`]:{backgroundColor:Te,[`&${ut}-item-danger`]:{backgroundColor:Ii}},[`${ut}-item, ${ut}-submenu-title`]:{[`&:not(${ut}-item-disabled):focus-visible`]:Object.assign({},$e(Rt))},[`&${ut}-submenu > ${ut}`]:{backgroundColor:Wn},[`&${ut}-popup > ${ut}`]:{backgroundColor:mr},[`&${ut}-horizontal`]:Object.assign(Object.assign({},Lt==="dark"?{borderBottom:0}:{}),{[`> ${ut}-item, > ${ut}-submenu`]:{top:Be,marginTop:-Be,marginBottom:0,borderRadius:mi,"&::after":{position:"absolute",insetInline:Xt,bottom:0,borderBottom:`${xe}px solid transparent`,transition:`border-color ${_e} ${Ee}`,content:'""'},"&:hover, &-active, &-open":{background:dr,"&::after":{borderBottomWidth:xe,borderBottomColor:ti}},"&-selected":{color:ti,backgroundColor:yi,"&:hover":{backgroundColor:yi},"&::after":{borderBottomWidth:xe,borderBottomColor:ti}}}}),[`&${ut}-root`]:{[`&${ut}-inline, &${ut}-vertical`]:{borderInlineEnd:`${Be}px ${En} ${Yn}`}},[`&${ut}-inline`]:{[`${ut}-sub${ut}-inline`]:{background:et},[`${ut}-item, ${ut}-submenu-title`]:Be&&Se?{width:`calc(100% + ${Be}px)`}:{},[`${ut}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Se}px solid ${Dt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${an} ${ft}`,`opacity ${an} ${ft}`].join(","),content:'""'},[`&${ut}-item-danger`]:{"&::after":{borderInlineEndColor:gi}}},[`${ut}-selected, ${ut}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${an} ${Ee}`,`opacity ${an} ${Ee}`].join(",")}}}}}};const sn=Rt=>{const{componentCls:Lt,itemHeight:ut,itemMarginInline:Ge,padding:Dt,menuArrowSize:Tt,marginXS:ot,itemMarginBlock:et}=Rt,Te=Dt+Tt+ot;return{[`${Lt}-item`]:{position:"relative",overflow:"hidden"},[`${Lt}-item, ${Lt}-submenu-title`]:{height:ut,lineHeight:`${ut}px`,paddingInline:Dt,overflow:"hidden",textOverflow:"ellipsis",marginInline:Ge,marginBlock:et,width:`calc(100% - ${Ge*2}px)`},[`> ${Lt}-item,
|
|
|
> ${Lt}-submenu > ${Lt}-submenu-title`]:{height:ut,lineHeight:`${ut}px`},[`${Lt}-item-group-list ${Lt}-submenu-title,
|
|
|
${Lt}-submenu-title`]:{paddingInlineEnd:Te}}};var $t=Rt=>{const{componentCls:Lt,iconCls:ut,itemHeight:Ge,colorTextLightSolid:Dt,dropdownWidth:Tt,controlHeightLG:ot,motionDurationMid:et,motionEaseOut:Te,paddingXL:xe,itemMarginInline:Se,fontSizeLG:Be,motionDurationSlow:_e,paddingXS:Ee,boxShadowSecondary:ft,collapsedWidth:Xt,collapsedIconSize:an}=Rt,Qt={height:Ge,lineHeight:`${Ge}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Lt]:{"&-inline, &-vertical":Object.assign({[`&${Lt}-root`]:{boxShadow:"none"}},sn(Rt))},[`${Lt}-submenu-popup`]:{[`${Lt}-vertical`]:Object.assign(Object.assign({},sn(Rt)),{boxShadow:ft})}},{[`${Lt}-submenu-popup ${Lt}-vertical${Lt}-sub`]:{minWidth:Tt,maxHeight:`calc(100vh - ${ot*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Lt}-inline`]:{width:"100%",[`&${Lt}-root`]:{[`${Lt}-item, ${Lt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${_e}`,`background ${_e}`,`padding ${et} ${Te}`].join(","),[`> ${Lt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Lt}-sub${Lt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Lt}-submenu > ${Lt}-submenu-title`]:Qt,[`& ${Lt}-item-group-title`]:{paddingInlineStart:xe}},[`${Lt}-item`]:Qt}},{[`${Lt}-inline-collapsed`]:{width:Xt,[`&${Lt}-root`]:{[`${Lt}-item, ${Lt}-submenu ${Lt}-submenu-title`]:{[`> ${Lt}-inline-collapsed-noicon`]:{fontSize:Be,textAlign:"center"}}},[`> ${Lt}-item,
|
|
|
> ${Lt}-item-group > ${Lt}-item-group-list > ${Lt}-item,
|
|
|
> ${Lt}-item-group > ${Lt}-item-group-list > ${Lt}-submenu > ${Lt}-submenu-title,
|
|
|
> ${Lt}-submenu > ${Lt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Be/2}px - ${Se}px)`,textOverflow:"clip",[`
|
|
|
${Lt}-submenu-arrow,
|
|
|
${Lt}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Lt}-item-icon, ${ut}`]:{margin:0,fontSize:an,lineHeight:`${Ge}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Lt}-item-icon, ${ut}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Lt}-item-icon, ${ut}`]:{display:"none"},"a, a:hover":{color:Dt}},[`${Lt}-item-group-title`]:Object.assign(Object.assign({},gt.vS),{paddingInline:Ee})}}]};const en=Rt=>{const{componentCls:Lt,motionDurationSlow:ut,motionDurationMid:Ge,motionEaseInOut:Dt,motionEaseOut:Tt,iconCls:ot,iconSize:et,iconMarginInlineEnd:Te}=Rt;return{[`${Lt}-item, ${Lt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${ut}`,`background ${ut}`,`padding ${ut} ${Dt}`].join(","),[`${Lt}-item-icon, ${ot}`]:{minWidth:et,fontSize:et,transition:[`font-size ${Ge} ${Tt}`,`margin ${ut} ${Dt}`,`color ${ut}`].join(","),"+ span":{marginInlineStart:Te,opacity:1,transition:[`opacity ${ut} ${Dt}`,`margin ${ut}`,`color ${ut}`].join(",")}},[`${Lt}-item-icon`]:Object.assign({},(0,gt.Ro)()),[`&${Lt}-item-only-child`]:{[`> ${ot}, > ${Lt}-item-icon`]:{marginInlineEnd:0}}},[`${Lt}-item-disabled, ${Lt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Lt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Nn=Rt=>{const{componentCls:Lt,motionDurationSlow:ut,motionEaseInOut:Ge,borderRadius:Dt,menuArrowSize:Tt,menuArrowOffset:ot}=Rt;return{[`${Lt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Rt.margin,width:Tt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${ut} ${Ge}, opacity ${ut}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Tt*.6,height:Tt*.15,backgroundColor:"currentcolor",borderRadius:Dt,transition:[`background ${ut} ${Ge}`,`transform ${ut} ${Ge}`,`top ${ut} ${Ge}`,`color ${ut} ${Ge}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${ot})`},"&::after":{transform:`rotate(-45deg) translateY(${ot})`}}}}},fn=Rt=>{const{antCls:Lt,componentCls:ut,fontSize:Ge,motionDurationSlow:Dt,motionDurationMid:Tt,motionEaseInOut:ot,paddingXS:et,padding:Te,colorSplit:xe,lineWidth:Se,zIndexPopup:Be,borderRadiusLG:_e,subMenuItemBorderRadius:Ee,menuArrowSize:ft,menuArrowOffset:Xt,lineType:an,menuPanelMaskInset:Qt,groupTitleLineHeight:En,groupTitleFontSize:Yn}=Rt;return[{"":{[`${ut}`]:Object.assign(Object.assign({},(0,gt.dF)()),{"&-hidden":{display:"none"}})},[`${ut}-submenu-hidden`]:{display:"none"}},{[ut]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(Rt)),(0,gt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Ge,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Dt} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${ut}-item`]:{flex:"none"}},[`${ut}-item, ${ut}-submenu, ${ut}-submenu-title`]:{borderRadius:Rt.itemBorderRadius},[`${ut}-item-group-title`]:{padding:`${et}px ${Te}px`,fontSize:Yn,lineHeight:En,transition:`all ${Dt}`},[`&-horizontal ${ut}-submenu`]:{transition:[`border-color ${Dt} ${ot}`,`background ${Dt} ${ot}`].join(",")},[`${ut}-submenu, ${ut}-submenu-inline`]:{transition:[`border-color ${Dt} ${ot}`,`background ${Dt} ${ot}`,`padding ${Tt} ${ot}`].join(",")},[`${ut}-submenu ${ut}-sub`]:{cursor:"initial",transition:[`background ${Dt} ${ot}`,`padding ${Dt} ${ot}`].join(",")},[`${ut}-title-content`]:{transition:`color ${Dt}`},[`${ut}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${ut}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:xe,borderStyle:an,borderWidth:0,borderTopWidth:Se,marginBlock:Se,padding:0,"&-dashed":{borderStyle:"dashed"}}}),en(Rt)),{[`${ut}-item-group`]:{[`${ut}-item-group-list`]:{margin:0,padding:0,[`${ut}-item, ${ut}-submenu-title`]:{paddingInline:`${Ge*2}px ${Te}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Be,borderRadius:_e,boxShadow:"none",transformOrigin:"0 0",[`&${ut}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Qt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Qt},"\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:Rt.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Rt.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Rt.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Rt.paddingXS},[`> ${ut}`]:Object.assign(Object.assign(Object.assign({borderRadius:_e},en(Rt)),Nn(Rt)),{[`${ut}-item, ${ut}-submenu > ${ut}-submenu-title`]:{borderRadius:Ee},[`${ut}-submenu-title::after`]:{transition:`transform ${Dt} ${ot}`}})}}),Nn(Rt)),{[`&-inline-collapsed ${ut}-submenu-arrow,
|
|
|
&-inline ${ut}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Xt})`},"&::after":{transform:`rotate(45deg) translateX(-${Xt})`}},[`${ut}-submenu-open${ut}-submenu-inline > ${ut}-submenu-title > ${ut}-submenu-arrow`]:{transform:`translateY(-${ft*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${Xt})`},"&::before":{transform:`rotate(45deg) translateX(${Xt})`}}})},{[`${Lt}-layout-header`]:{[ut]:{lineHeight:"inherit"}}}]};var Mn=(Rt,Lt)=>(0,Et.Z)("Menu",Ge=>{if(Lt===!1)return[];const{colorBgElevated:Dt,colorPrimary:Tt,colorTextLightSolid:ot,controlHeightLG:et,fontSize:Te,darkItemColor:xe,darkDangerItemColor:Se,darkItemBg:Be,darkSubMenuItemBg:_e,darkItemSelectedColor:Ee,darkItemSelectedBg:ft,darkDangerItemSelectedBg:Xt,darkItemHoverBg:an,darkGroupTitleColor:Qt,darkItemHoverColor:En,darkItemDisabledColor:Yn,darkDangerItemHoverColor:zn,darkDangerItemSelectedColor:Dn,darkDangerItemActiveBg:ii}=Ge,gi=Te/7*5,pi=(0,kt.TS)(Ge,{menuArrowSize:gi,menuHorizontalHeight:et*1.15,menuArrowOffset:`${gi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Dt}),Ii=(0,kt.TS)(pi,{itemColor:xe,itemHoverColor:En,groupTitleColor:Qt,itemSelectedColor:Ee,itemBg:Be,popupBg:Be,subMenuItemBg:_e,itemActiveBg:"transparent",itemSelectedBg:ft,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:an,itemDisabledColor:Yn,dangerItemColor:Se,dangerItemHoverColor:zn,dangerItemSelectedColor:Dn,dangerItemActiveBg:ii,dangerItemSelectedBg:Xt,menuSubMenuBg:_e,horizontalItemSelectedColor:ot,horizontalItemSelectedBg:Tt});return[fn(pi),Gt(pi),$t(pi),cn(pi,"light"),cn(Ii,"dark"),lt(pi),(0,Re.Z)(pi),(0,At.oN)(pi,"slide-up"),(0,At.oN)(pi,"slide-down"),(0,qe._y)(pi,"zoom-big")]},Ge=>{const{colorPrimary:Dt,colorError:Tt,colorTextDisabled:ot,colorErrorBg:et,colorText:Te,colorTextDescription:xe,colorBgContainer:Se,colorFillAlter:Be,colorFillContent:_e,lineWidth:Ee,lineWidthBold:ft,controlItemBgActive:Xt,colorBgTextHover:an,controlHeightLG:Qt,lineHeight:En,colorBgElevated:Yn,marginXXS:zn,padding:Dn,fontSize:ii,controlHeightSM:gi,fontSizeLG:pi,colorTextLightSolid:Ii,colorErrorHover:Yi}=Ge,Jn=new Ke.C(Ii).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ge.zIndexPopupBase+50,radiusItem:Ge.borderRadiusLG,itemBorderRadius:Ge.borderRadiusLG,radiusSubMenuItem:Ge.borderRadiusSM,subMenuItemBorderRadius:Ge.borderRadiusSM,colorItemText:Te,itemColor:Te,colorItemTextHover:Te,itemHoverColor:Te,colorItemTextHoverHorizontal:Dt,horizontalItemHoverColor:Dt,colorGroupTitle:xe,groupTitleColor:xe,colorItemTextSelected:Dt,itemSelectedColor:Dt,colorItemTextSelectedHorizontal:Dt,horizontalItemSelectedColor:Dt,colorItemBg:Se,itemBg:Se,colorItemBgHover:an,itemHoverBg:an,colorItemBgActive:_e,itemActiveBg:Xt,colorSubItemBg:Be,subMenuItemBg:Be,colorItemBgSelected:Xt,itemSelectedBg:Xt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:ft,activeBarHeight:ft,colorActiveBarBorderSize:Ee,activeBarBorderWidth:Ee,colorItemTextDisabled:ot,itemDisabledColor:ot,colorDangerItemText:Tt,dangerItemColor:Tt,colorDangerItemTextHover:Tt,dangerItemHoverColor:Tt,colorDangerItemTextSelected:Tt,dangerItemSelectedColor:Tt,colorDangerItemBgActive:et,dangerItemActiveBg:et,colorDangerItemBgSelected:et,dangerItemSelectedBg:et,itemMarginInline:Ge.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Qt,groupTitleLineHeight:En,collapsedWidth:Qt*2,popupBg:Yn,itemMarginBlock:zn,itemPaddingInline:Dn,horizontalLineHeight:`${Qt*1.15}px`,iconSize:ii,iconMarginInlineEnd:gi-ii,collapsedIconSize:pi,groupTitleFontSize:ii,darkItemDisabledColor:new Ke.C(Ii).setAlpha(.25).toRgbString(),darkItemColor:Jn,darkDangerItemColor:Tt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Ii,darkItemSelectedBg:Dt,darkDangerItemSelectedBg:Tt,darkItemHoverBg:"transparent",darkGroupTitleColor:Jn,darkItemHoverColor:Ii,darkDangerItemHoverColor:Yi,darkDangerItemSelectedColor:Ii,darkDangerItemActiveBg:Tt}},{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"]]})(Rt),pt=function(Rt,Lt){var ut={};for(var Ge in Rt)Object.prototype.hasOwnProperty.call(Rt,Ge)&&Lt.indexOf(Ge)<0&&(ut[Ge]=Rt[Ge]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ge=Object.getOwnPropertySymbols(Rt);Dt<Ge.length;Dt++)Lt.indexOf(Ge[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,Ge[Dt])&&(ut[Ge[Dt]]=Rt[Ge[Dt]]);return ut},Un=(0,De.forwardRef)((Rt,Lt)=>{var ut,Ge;const Dt=De.useContext(Fe.Z),Tt=Dt||{},{getPrefixCls:ot,getPopupContainer:et,direction:Te,menu:xe}=De.useContext(ht.E_),Se=ot(),{prefixCls:Be,className:_e,style:Ee,theme:ft="light",expandIcon:Xt,_internalDisableMenuItemTitleTooltip:an,inlineCollapsed:Qt,siderCollapsed:En,items:Yn,children:zn,rootClassName:Dn,mode:ii,selectable:gi,onClick:pi,overflowedIndicatorPopupClassName:Ii}=Rt,Yi=pt(Rt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Jn=(0,st.Z)(Yi,["collapsedWidth"]),Wn=Je(Yn)||zn;(ut=Tt.validator)===null||ut===void 0||ut.call(Tt,{mode:ii});const ti=(0,we.useEvent)(function(){var Fi;pi==null||pi.apply(void 0,arguments),(Fi=Tt.onClick)===null||Fi===void 0||Fi.call(Tt)}),yi=Tt.mode||ii,mi=gi!=null?gi:Tt.selectable,dr=De.useMemo(()=>En!==void 0?En:Qt,[Qt,En]),mr={horizontal:{motionName:`${Se}-slide-up`},inline:(0,Ne.Z)(Se),other:{motionName:`${Se}-zoom-big`}},be=ot("menu",Be||Tt.prefixCls),[ci,Hi]=Mn(be,!Dt),dn=Ze()(`${be}-${ft}`,xe==null?void 0:xe.className,_e);let oi;if(typeof Xt=="function")oi=Xt;else if(Xt===null||Xt===!1)oi=null;else if(Tt.expandIcon===null||Tt.expandIcon===!1)oi=null;else{const Fi=Xt!=null?Xt:Tt.expandIcon;oi=(0,dt.Tm)(Fi,{className:Ze()(`${be}-submenu-expand-icon`,(0,dt.l$)(Fi)?(Ge=Fi.props)===null||Ge===void 0?void 0:Ge.className:"")})}const vi=De.useMemo(()=>({prefixCls:be,inlineCollapsed:dr||!1,direction:Te,firstLevel:!0,theme:ft,mode:yi,disableMenuItemTitleTooltip:an}),[be,dr,Te,an,ft]);return ci(De.createElement(Fe.Z.Provider,{value:null},De.createElement(te.Provider,{value:vi},De.createElement(ce.ZP,Object.assign({getPopupContainer:et,overflowedIndicator:De.createElement(me.Z,null),overflowedIndicatorPopupClassName:Ze()(be,`${be}-${ft}`,Ii),mode:yi,selectable:mi,onClick:ti},Jn,{inlineCollapsed:dr,style:Object.assign(Object.assign({},xe==null?void 0:xe.style),Ee),className:dn,prefixCls:be,direction:Te,defaultMotions:mr,expandIcon:oi,ref:Lt,rootClassName:Ze()(Dn,Hi)}),Wn))))});const Zt=(0,De.forwardRef)((Rt,Lt)=>{const ut=(0,De.useRef)(null),Ge=De.useContext(ze.D);return(0,De.useImperativeHandle)(Lt,()=>({menu:ut.current,focus:Dt=>{var Tt;(Tt=ut.current)===null||Tt===void 0||Tt.focus(Dt)}})),De.createElement(Un,Object.assign({ref:ut},Rt,Ge))});Zt.Item=he,Zt.SubMenu=de,Zt.Divider=ct,Zt.ItemGroup=ce.BW;var tn=Zt},58421:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Tt}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(et,Te){return De.createElement(Ze.Z,(0,ce.Z)({},et,{ref:Te,icon:wt}))},Me=De.forwardRef(ht),yt=Me,ct=ve(49198),He=ve(33853),st=ve(38819),mt=ve(92310),dt=ve.n(mt),Ae=ve(49618),te=ve(77321),ee=ve(96949),he=ve(55090),se=ve(77205),de=ve(38793),me=ve(26112),we={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Ne=we,Fe=ve(91735),Ie=function(ot){(0,se.Z)(Te,ot);var et=(0,de.Z)(Te);function Te(){var xe;(0,ee.Z)(this,Te);for(var Se=arguments.length,Be=new Array(Se),_e=0;_e<Se;_e++)Be[_e]=arguments[_e];return xe=et.call.apply(et,[this].concat(Be)),xe.state={goInputText:""},xe.getValidValue=function(){var Ee=xe.state.goInputText;return!Ee||Number.isNaN(Ee)?void 0:Number(Ee)},xe.buildOptionText=function(Ee){return"".concat(Ee," ").concat(xe.props.locale.items_per_page)},xe.changeSize=function(Ee){xe.props.changeSize(Number(Ee))},xe.handleChange=function(Ee){xe.setState({goInputText:Ee.target.value})},xe.handleBlur=function(Ee){var ft=xe.props,Xt=ft.goButton,an=ft.quickGo,Qt=ft.rootPrefixCls,En=xe.state.goInputText;Xt||En===""||(xe.setState({goInputText:""}),!(Ee.relatedTarget&&(Ee.relatedTarget.className.indexOf("".concat(Qt,"-item-link"))>=0||Ee.relatedTarget.className.indexOf("".concat(Qt,"-item"))>=0))&&an(xe.getValidValue()))},xe.go=function(Ee){var ft=xe.state.goInputText;ft!==""&&(Ee.keyCode===Ne.ENTER||Ee.type==="click")&&(xe.setState({goInputText:""}),xe.props.quickGo(xe.getValidValue()))},xe}return(0,he.Z)(Te,[{key:"getPageSizeOptions",value:function(){var Se=this.props,Be=Se.pageSize,_e=Se.pageSizeOptions;return _e.some(function(Ee){return Ee.toString()===Be.toString()})?_e:_e.concat([Be.toString()]).sort(function(Ee,ft){var Xt=Number.isNaN(Number(Ee))?0:Number(Ee),an=Number.isNaN(Number(ft))?0:Number(ft);return Xt-an})}},{key:"render",value:function(){var Se=this,Be=this.props,_e=Be.pageSize,Ee=Be.locale,ft=Be.rootPrefixCls,Xt=Be.changeSize,an=Be.quickGo,Qt=Be.goButton,En=Be.selectComponentClass,Yn=Be.buildOptionText,zn=Be.selectPrefixCls,Dn=Be.disabled,ii=this.state.goInputText,gi="".concat(ft,"-options"),pi=En,Ii=null,Yi=null,Jn=null;if(!Xt&&!an)return null;var Wn=this.getPageSizeOptions();if(Xt&&pi){var ti=Wn.map(function(yi,mi){return De.createElement(pi.Option,{key:mi,value:yi.toString()},(Yn||Se.buildOptionText)(yi))});Ii=De.createElement(pi,{disabled:Dn,prefixCls:zn,showSearch:!1,className:"".concat(gi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(_e||Wn[0]).toString(),onChange:this.changeSize,getPopupContainer:function(mi){return mi.parentNode},"aria-label":Ee.page_size,defaultOpen:!1},ti)}return an&&(Qt&&(Jn=typeof Qt=="boolean"?De.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Dn,className:"".concat(gi,"-quick-jumper-button")},Ee.jump_to_confirm):De.createElement("span",{onClick:this.go,onKeyUp:this.go},Qt)),Yi=De.createElement("div",{className:"".concat(gi,"-quick-jumper")},Ee.jump_to,De.createElement("input",{disabled:Dn,type:"text",value:ii,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Ee.page}),Ee.page,Jn)),De.createElement("li",{className:"".concat(gi)},Ii,Yi)}}]),Te}(De.Component);Ie.defaultProps={pageSizeOptions:["10","20","50","100"]};var je=Ie,Je=function(et){var Te,xe=et.rootPrefixCls,Se=et.page,Be=et.active,_e=et.className,Ee=et.showTitle,ft=et.onClick,Xt=et.onKeyPress,an=et.itemRender,Qt="".concat(xe,"-item"),En=dt()(Qt,"".concat(Qt,"-").concat(Se),(Te={},(0,Ae.Z)(Te,"".concat(Qt,"-active"),Be),(0,Ae.Z)(Te,"".concat(Qt,"-disabled"),!Se),(0,Ae.Z)(Te,et.className,_e),Te)),Yn=function(){ft(Se)},zn=function(gi){Xt(gi,ft,Se)},Dn=an(Se,"page",De.createElement("a",{rel:"nofollow"},Se));return Dn?De.createElement("li",{title:Ee?Se.toString():null,className:En,onClick:Yn,onKeyPress:zn,tabIndex:0},Dn):null},Ke=Je;function gt(){}function Re(ot){var et=Number(ot);return typeof et=="number"&&!Number.isNaN(et)&&isFinite(et)&&Math.floor(et)===et}var At=function(et,Te,xe){return xe};function qe(ot,et,Te){var xe=typeof ot=="undefined"?et.pageSize:ot;return Math.floor((Te.total-1)/xe)+1}var Et=function(ot){(0,se.Z)(Te,ot);var et=(0,de.Z)(Te);function Te(xe){var Se;(0,ee.Z)(this,Te),Se=et.call(this,xe),Se.paginationNode=De.createRef(),Se.getJumpPrevPage=function(){return Math.max(1,Se.state.current-(Se.props.showLessItems?3:5))},Se.getJumpNextPage=function(){return Math.min(qe(void 0,Se.state,Se.props),Se.state.current+(Se.props.showLessItems?3:5))},Se.getItemIcon=function(Xt,an){var Qt=Se.props.prefixCls,En=Xt||De.createElement("button",{type:"button","aria-label":an,className:"".concat(Qt,"-item-link")});return typeof Xt=="function"&&(En=De.createElement(Xt,(0,te.Z)({},Se.props))),En},Se.isValid=function(Xt){var an=Se.props.total;return Re(Xt)&&Xt!==Se.state.current&&Re(an)&&an>0},Se.shouldDisplayQuickJumper=function(){var Xt=Se.props,an=Xt.showQuickJumper,Qt=Xt.total,En=Se.state.pageSize;return Qt<=En?!1:an},Se.handleKeyDown=function(Xt){(Xt.keyCode===Ne.ARROW_UP||Xt.keyCode===Ne.ARROW_DOWN)&&Xt.preventDefault()},Se.handleKeyUp=function(Xt){var an=Se.getValidValue(Xt),Qt=Se.state.currentInputValue;an!==Qt&&Se.setState({currentInputValue:an}),Xt.keyCode===Ne.ENTER?Se.handleChange(an):Xt.keyCode===Ne.ARROW_UP?Se.handleChange(an-1):Xt.keyCode===Ne.ARROW_DOWN&&Se.handleChange(an+1)},Se.handleBlur=function(Xt){var an=Se.getValidValue(Xt);Se.handleChange(an)},Se.changePageSize=function(Xt){var an=Se.state.current,Qt=qe(Xt,Se.state,Se.props);an=an>Qt?Qt:an,Qt===0&&(an=Se.state.current),typeof Xt=="number"&&("pageSize"in Se.props||Se.setState({pageSize:Xt}),"current"in Se.props||Se.setState({current:an,currentInputValue:an})),Se.props.onShowSizeChange(an,Xt),"onChange"in Se.props&&Se.props.onChange&&Se.props.onChange(an,Xt)},Se.handleChange=function(Xt){var an=Se.props,Qt=an.disabled,En=an.onChange,Yn=Se.state,zn=Yn.pageSize,Dn=Yn.current,ii=Yn.currentInputValue;if(Se.isValid(Xt)&&!Qt){var gi=qe(void 0,Se.state,Se.props),pi=Xt;return Xt>gi?pi=gi:Xt<1&&(pi=1),"current"in Se.props||Se.setState({current:pi}),pi!==ii&&Se.setState({currentInputValue:pi}),En(pi,zn),pi}return Dn},Se.prev=function(){Se.hasPrev()&&Se.handleChange(Se.state.current-1)},Se.next=function(){Se.hasNext()&&Se.handleChange(Se.state.current+1)},Se.jumpPrev=function(){Se.handleChange(Se.getJumpPrevPage())},Se.jumpNext=function(){Se.handleChange(Se.getJumpNextPage())},Se.hasPrev=function(){return Se.state.current>1},Se.hasNext=function(){return Se.state.current<qe(void 0,Se.state,Se.props)},Se.runIfEnter=function(Xt,an){if(Xt.key==="Enter"||Xt.charCode===13){for(var Qt=arguments.length,En=new Array(Qt>2?Qt-2:0),Yn=2;Yn<Qt;Yn++)En[Yn-2]=arguments[Yn];an.apply(void 0,En)}},Se.runIfEnterPrev=function(Xt){Se.runIfEnter(Xt,Se.prev)},Se.runIfEnterNext=function(Xt){Se.runIfEnter(Xt,Se.next)},Se.runIfEnterJumpPrev=function(Xt){Se.runIfEnter(Xt,Se.jumpPrev)},Se.runIfEnterJumpNext=function(Xt){Se.runIfEnter(Xt,Se.jumpNext)},Se.handleGoTO=function(Xt){(Xt.keyCode===Ne.ENTER||Xt.type==="click")&&Se.handleChange(Se.state.currentInputValue)},Se.renderPrev=function(Xt){var an=Se.props,Qt=an.prevIcon,En=an.itemRender,Yn=En(Xt,"prev",Se.getItemIcon(Qt,"prev page")),zn=!Se.hasPrev();return(0,De.isValidElement)(Yn)?(0,De.cloneElement)(Yn,{disabled:zn}):Yn},Se.renderNext=function(Xt){var an=Se.props,Qt=an.nextIcon,En=an.itemRender,Yn=En(Xt,"next",Se.getItemIcon(Qt,"next page")),zn=!Se.hasNext();return(0,De.isValidElement)(Yn)?(0,De.cloneElement)(Yn,{disabled:zn}):Yn};var Be=xe.onChange!==gt,_e="current"in xe;_e&&!Be&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Ee=xe.defaultCurrent;"current"in xe&&(Ee=xe.current);var ft=xe.defaultPageSize;return"pageSize"in xe&&(ft=xe.pageSize),Ee=Math.min(Ee,qe(ft,void 0,xe)),Se.state={current:Ee,currentInputValue:Ee,pageSize:ft},Se}return(0,he.Z)(Te,[{key:"componentDidUpdate",value:function(Se,Be){var _e=this.props.prefixCls;if(Be.current!==this.state.current&&this.paginationNode.current){var Ee=this.paginationNode.current.querySelector(".".concat(_e,"-item-").concat(Be.current));if(Ee&&document.activeElement===Ee){var ft;Ee==null||(ft=Ee.blur)===null||ft===void 0||ft.call(Ee)}}}},{key:"getValidValue",value:function(Se){var Be=Se.target.value,_e=qe(void 0,this.state,this.props),Ee=this.state.currentInputValue,ft;return Be===""?ft=Be:Number.isNaN(Number(Be))?ft=Ee:Be>=_e?ft=_e:ft=Number(Be),ft}},{key:"getShowSizeChanger",value:function(){var Se=this.props,Be=Se.showSizeChanger,_e=Se.total,Ee=Se.totalBoundaryShowSizeChanger;return typeof Be!="undefined"?Be:_e>Ee}},{key:"render",value:function(){var Se=this.props,Be=Se.prefixCls,_e=Se.className,Ee=Se.style,ft=Se.disabled,Xt=Se.hideOnSinglePage,an=Se.total,Qt=Se.locale,En=Se.showQuickJumper,Yn=Se.showLessItems,zn=Se.showTitle,Dn=Se.showTotal,ii=Se.simple,gi=Se.itemRender,pi=Se.showPrevNextJumpers,Ii=Se.jumpPrevIcon,Yi=Se.jumpNextIcon,Jn=Se.selectComponentClass,Wn=Se.selectPrefixCls,ti=Se.pageSizeOptions,yi=this.state,mi=yi.current,dr=yi.pageSize,mr=yi.currentInputValue;if(Xt===!0&&an<=dr)return null;var be=qe(void 0,this.state,this.props),ci=[],Hi=null,dn=null,oi=null,vi=null,Fi=null,Vn=En&&En.goButton,bn=Yn?1:2,Mt=mi-1>0?mi-1:0,Ot=mi+1<be?mi+1:be,Ve=(0,me.Z)(this.props,{aria:!0,data:!0}),Yt=Dn&&De.createElement("li",{className:"".concat(Be,"-total-text")},Dn(an,[an===0?0:(mi-1)*dr+1,mi*dr>an?an:mi*dr]));if(ii){Vn&&(typeof Vn=="boolean"?Fi=De.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Qt.jump_to_confirm):Fi=De.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Vn),Fi=De.createElement("li",{title:zn?"".concat(Qt.jump_to).concat(mi,"/").concat(be):null,className:"".concat(Be,"-simple-pager")},Fi));var qt=this.renderPrev(Mt);return De.createElement("ul",(0,ce.Z)({className:dt()(Be,"".concat(Be,"-simple"),(0,Ae.Z)({},"".concat(Be,"-disabled"),ft),_e),style:Ee,ref:this.paginationNode},Ve),Yt,qt?De.createElement("li",{title:zn?Qt.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:dt()("".concat(Be,"-prev"),(0,Ae.Z)({},"".concat(Be,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},qt):null,De.createElement("li",{title:zn?"".concat(mi,"/").concat(be):null,className:"".concat(Be,"-simple-pager")},De.createElement("input",{type:"text",value:mr,disabled:ft,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),De.createElement("span",{className:"".concat(Be,"-slash")},"/"),be),De.createElement("li",{title:zn?Qt.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:dt()("".concat(Be,"-next"),(0,Ae.Z)({},"".concat(Be,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ot)),Fi)}if(be<=3+bn*2){var xt={locale:Qt,rootPrefixCls:Be,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:zn,itemRender:gi};be||ci.push(De.createElement(Ke,(0,ce.Z)({},xt,{key:"noPager",page:1,className:"".concat(Be,"-item-disabled")})));for(var nt=1;nt<=be;nt+=1){var Kt=mi===nt;ci.push(De.createElement(Ke,(0,ce.Z)({},xt,{key:nt,page:nt,active:Kt})))}}else{var ln=Yn?Qt.prev_3:Qt.prev_5,xn=Yn?Qt.next_3:Qt.next_5,On=gi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ii,"prev page")),St=gi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Yi,"next page"));pi&&(Hi=On?De.createElement("li",{title:zn?ln:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:dt()("".concat(Be,"-jump-prev"),(0,Ae.Z)({},"".concat(Be,"-jump-prev-custom-icon"),!!Ii))},On):null,dn=St?De.createElement("li",{title:zn?xn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:dt()("".concat(Be,"-jump-next"),(0,Ae.Z)({},"".concat(Be,"-jump-next-custom-icon"),!!Yi))},St):null),vi=De.createElement(Ke,{locale:Qt,last:!0,rootPrefixCls:Be,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:be,page:be,active:!1,showTitle:zn,itemRender:gi}),oi=De.createElement(Ke,{locale:Qt,rootPrefixCls:Be,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:zn,itemRender:gi});var gn=Math.max(1,mi-bn),Rn=Math.min(mi+bn,be);mi-1<=bn&&(Rn=1+bn*2),be-mi<=bn&&(gn=be-bn*2);for(var ai=gn;ai<=Rn;ai+=1){var hn=mi===ai;ci.push(De.createElement(Ke,{locale:Qt,rootPrefixCls:Be,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ai,page:ai,active:hn,showTitle:zn,itemRender:gi}))}mi-1>=bn*2&&mi!==3&&(ci[0]=(0,De.cloneElement)(ci[0],{className:"".concat(Be,"-item-after-jump-prev")}),ci.unshift(Hi)),be-mi>=bn*2&&mi!==be-2&&(ci[ci.length-1]=(0,De.cloneElement)(ci[ci.length-1],{className:"".concat(Be,"-item-before-jump-next")}),ci.push(dn)),gn!==1&&ci.unshift(oi),Rn!==be&&ci.push(vi)}var Jt=!this.hasPrev()||!be,Xn=!this.hasNext()||!be,si=this.renderPrev(Mt),ui=this.renderNext(Ot);return De.createElement("ul",(0,ce.Z)({className:dt()(Be,_e,(0,Ae.Z)({},"".concat(Be,"-disabled"),ft)),style:Ee,ref:this.paginationNode},Ve),Yt,si?De.createElement("li",{title:zn?Qt.prev_page:null,onClick:this.prev,tabIndex:Jt?null:0,onKeyPress:this.runIfEnterPrev,className:dt()("".concat(Be,"-prev"),(0,Ae.Z)({},"".concat(Be,"-disabled"),Jt)),"aria-disabled":Jt},si):null,ci,ui?De.createElement("li",{title:zn?Qt.next_page:null,onClick:this.next,tabIndex:Xn?null:0,onKeyPress:this.runIfEnterNext,className:dt()("".concat(Be,"-next"),(0,Ae.Z)({},"".concat(Be,"-disabled"),Xn)),"aria-disabled":Xn},ui):null,De.createElement(je,{disabled:ft,locale:Qt,rootPrefixCls:Be,selectComponentClass:Jn,selectPrefixCls:Wn,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:mi,pageSize:dr,pageSizeOptions:ti,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Vn}))}}],[{key:"getDerivedStateFromProps",value:function(Se,Be){var _e={};if("current"in Se&&(_e.current=Se.current,Se.current!==Be.current&&(_e.currentInputValue=_e.current)),"pageSize"in Se&&Se.pageSize!==Be.pageSize){var Ee=Be.current,ft=qe(Se.pageSize,Be,Se);Ee=Ee>ft?ft:Ee,"current"in Se||(_e.current=Ee,_e.currentInputValue=Ee),_e.pageSize=Se.pageSize}return _e}}]),Te}(De.Component);Et.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:gt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:gt,locale:Fe.Z,style:{},itemRender:At,totalBoundaryShowSizeChanger:50};var kt=Et,Bt=ve(22075),Gt=ve(36355),Ut=ve(19716),lt=ve(8628),$e=ve(9763),Nt=ve(57809);const cn=ot=>De.createElement(Nt.default,Object.assign({},ot,{showSearch:!0,size:"small"})),sn=ot=>De.createElement(Nt.default,Object.assign({},ot,{showSearch:!0,size:"middle"}));cn.Option=Nt.default.Option,sn.Option=Nt.default.Option;var Ft=ve(9937),$t=ve(17313),en=ve(83116),Nn=ve(37613);const fn=ot=>{const{componentCls:et}=ot;return{[`${et}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${et}-item-link`]:{color:ot.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${et}-item-link`]:{color:ot.colorTextDisabled,cursor:"not-allowed"}}},[`&${et}-disabled`]:{cursor:"not-allowed",[`${et}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:ot.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:ot.colorBorder,backgroundColor:ot.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:ot.itemActiveBgDisabled},a:{color:ot.itemActiveColorDisabled}}},[`${et}-item-link`]:{color:ot.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${et}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${et}-simple-pager`]:{color:ot.colorTextDisabled},[`${et}-jump-prev, ${et}-jump-next`]:{[`${et}-item-link-icon`]:{opacity:0},[`${et}-item-ellipsis`]:{opacity:1}}},[`&${et}-simple`]:{[`${et}-prev, ${et}-next`]:{[`&${et}-disabled ${et}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Mn=ot=>{const{componentCls:et}=ot;return{[`&${et}-mini ${et}-total-text, &${et}-mini ${et}-simple-pager`]:{height:ot.itemSizeSM,lineHeight:`${ot.itemSizeSM}px`},[`&${et}-mini ${et}-item`]:{minWidth:ot.itemSizeSM,height:ot.itemSizeSM,margin:0,lineHeight:`${ot.itemSizeSM-2}px`},[`&${et}-mini:not(${et}-disabled) ${et}-item:not(${et}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:ot.colorBgTextHover},"&:active":{backgroundColor:ot.colorBgTextActive}},[`&${et}-mini ${et}-prev, &${et}-mini ${et}-next`]:{minWidth:ot.itemSizeSM,height:ot.itemSizeSM,margin:0,lineHeight:`${ot.itemSizeSM}px`},[`&${et}-mini:not(${et}-disabled)`]:{[`${et}-prev, ${et}-next`]:{[`&:hover ${et}-item-link`]:{backgroundColor:ot.colorBgTextHover},[`&:active ${et}-item-link`]:{backgroundColor:ot.colorBgTextActive},[`&${et}-disabled:hover ${et}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${et}-mini ${et}-prev ${et}-item-link,
|
|
|
&${et}-mini ${et}-next ${et}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:ot.itemSizeSM,lineHeight:`${ot.itemSizeSM}px`}},[`&${et}-mini ${et}-jump-prev, &${et}-mini ${et}-jump-next`]:{height:ot.itemSizeSM,marginInlineEnd:0,lineHeight:`${ot.itemSizeSM}px`},[`&${et}-mini ${et}-options`]:{marginInlineStart:ot.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:ot.miniOptionsSizeChangerTop},"&-quick-jumper":{height:ot.itemSizeSM,lineHeight:`${ot.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Ft.x0)(ot)),{width:ot.paginationMiniQuickJumperInputWidth,height:ot.controlHeightSM})}}}},pt=ot=>{const{componentCls:et}=ot;return{[`
|
|
|
&${et}-simple ${et}-prev,
|
|
|
&${et}-simple ${et}-next
|
|
|
`]:{height:ot.itemSizeSM,lineHeight:`${ot.itemSizeSM}px`,verticalAlign:"top",[`${et}-item-link`]:{height:ot.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:ot.colorBgTextHover},"&:active":{backgroundColor:ot.colorBgTextActive},"&::after":{height:ot.itemSizeSM,lineHeight:`${ot.itemSizeSM}px`}}},[`&${et}-simple ${et}-simple-pager`]:{display:"inline-block",height:ot.itemSizeSM,marginInlineEnd:ot.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:ot.marginXS,padding:`0 ${ot.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:ot.itemInputBg,border:`${ot.lineWidth}px ${ot.lineType} ${ot.colorBorder}`,borderRadius:ot.borderRadius,outline:"none",transition:`border-color ${ot.motionDurationMid}`,color:"inherit","&:hover":{borderColor:ot.colorPrimary},"&:focus":{borderColor:ot.colorPrimaryHover,boxShadow:`${ot.inputOutlineOffset}px 0 ${ot.controlOutlineWidth}px ${ot.controlOutline}`},"&[disabled]":{color:ot.colorTextDisabled,backgroundColor:ot.colorBgContainerDisabled,borderColor:ot.colorBorder,cursor:"not-allowed"}}}}},Ln=ot=>{const{componentCls:et}=ot;return{[`${et}-jump-prev, ${et}-jump-next`]:{outline:0,[`${et}-item-container`]:{position:"relative",[`${et}-item-link-icon`]:{color:ot.colorPrimary,fontSize:ot.fontSizeSM,opacity:0,transition:`all ${ot.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${et}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:ot.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:ot.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:ot.paginationEllipsisTextIndent,opacity:1,transition:`all ${ot.motionDurationMid}`}},"&:hover":{[`${et}-item-link-icon`]:{opacity:1},[`${et}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${et}-prev,
|
|
|
${et}-jump-prev,
|
|
|
${et}-jump-next
|
|
|
`]:{marginInlineEnd:ot.marginXS},[`
|
|
|
${et}-prev,
|
|
|
${et}-next,
|
|
|
${et}-jump-prev,
|
|
|
${et}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:ot.itemSize,height:ot.itemSize,color:ot.colorText,fontFamily:ot.fontFamily,lineHeight:`${ot.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:ot.borderRadius,cursor:"pointer",transition:`all ${ot.motionDurationMid}`},[`${et}-prev, ${et}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:ot.colorText,cursor:"pointer",userSelect:"none"},[`${et}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:ot.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${ot.lineWidth}px ${ot.lineType} transparent`,borderRadius:ot.borderRadius,outline:"none",transition:`all ${ot.motionDurationMid}`},[`&:hover ${et}-item-link`]:{backgroundColor:ot.colorBgTextHover},[`&:active ${et}-item-link`]:{backgroundColor:ot.colorBgTextActive},[`&${et}-disabled:hover`]:{[`${et}-item-link`]:{backgroundColor:"transparent"}}},[`${et}-slash`]:{marginInlineEnd:ot.paginationSlashMarginInlineEnd,marginInlineStart:ot.paginationSlashMarginInlineStart},[`${et}-options`]:{display:"inline-block",marginInlineStart:ot.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:ot.controlHeight,marginInlineStart:ot.marginXS,lineHeight:`${ot.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Ft.ik)(ot)),{width:ot.controlHeightLG*1.25,height:ot.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:ot.marginXS,marginInlineEnd:ot.marginXS})}}}},Un=ot=>{const{componentCls:et}=ot;return{[`${et}-item`]:{display:"inline-block",minWidth:ot.itemSize,height:ot.itemSize,marginInlineEnd:ot.marginXS,fontFamily:ot.fontFamily,lineHeight:`${ot.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${ot.lineWidth}px ${ot.lineType} transparent`,borderRadius:ot.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ot.paginationItemPaddingInline}px`,color:ot.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${et}-item-active)`]:{"&:hover":{transition:`all ${ot.motionDurationMid}`,backgroundColor:ot.colorBgTextHover},"&:active":{backgroundColor:ot.colorBgTextActive}},"&-active":{fontWeight:ot.fontWeightStrong,backgroundColor:ot.itemActiveBg,borderColor:ot.colorPrimary,a:{color:ot.colorPrimary},"&:hover":{borderColor:ot.colorPrimaryHover},"&:hover a":{color:ot.colorPrimaryHover}}}}},Zt=ot=>{const{componentCls:et}=ot;return{[et]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,$t.Wf)(ot)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${et}-total-text`]:{display:"inline-block",height:ot.itemSize,marginInlineEnd:ot.marginXS,lineHeight:`${ot.itemSize-2}px`,verticalAlign:"middle"}}),Un(ot)),Ln(ot)),pt(ot)),Mn(ot)),fn(ot)),{[`@media only screen and (max-width: ${ot.screenLG}px)`]:{[`${et}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${ot.screenSM}px)`]:{[`${et}-options`]:{display:"none"}}}),[`&${ot.componentCls}-rtl`]:{direction:"rtl"}}},tn=ot=>{const{componentCls:et}=ot;return{[`${et}${et}-disabled:not(${et}-mini)`]:{"&, &:hover":{[`${et}-item-link`]:{borderColor:ot.colorBorder}},"&:focus-visible":{[`${et}-item-link`]:{borderColor:ot.colorBorder}},[`${et}-item, ${et}-item-link`]:{backgroundColor:ot.colorBgContainerDisabled,borderColor:ot.colorBorder,[`&:hover:not(${et}-item-active)`]:{backgroundColor:ot.colorBgContainerDisabled,borderColor:ot.colorBorder,a:{color:ot.colorTextDisabled}},[`&${et}-item-active`]:{backgroundColor:ot.itemActiveBgDisabled}},[`${et}-prev, ${et}-next`]:{"&:hover button":{backgroundColor:ot.colorBgContainerDisabled,borderColor:ot.colorBorder,color:ot.colorTextDisabled},[`${et}-item-link`]:{backgroundColor:ot.colorBgContainerDisabled,borderColor:ot.colorBorder}}},[`${et}:not(${et}-mini)`]:{[`${et}-prev, ${et}-next`]:{"&:hover button":{borderColor:ot.colorPrimaryHover,backgroundColor:ot.itemBg},[`${et}-item-link`]:{backgroundColor:ot.itemLinkBg,borderColor:ot.colorBorder},[`&:hover ${et}-item-link`]:{borderColor:ot.colorPrimary,backgroundColor:ot.itemBg,color:ot.colorPrimary},[`&${et}-disabled`]:{[`${et}-item-link`]:{borderColor:ot.colorBorder,color:ot.colorTextDisabled}}},[`${et}-item`]:{backgroundColor:ot.itemBg,border:`${ot.lineWidth}px ${ot.lineType} ${ot.colorBorder}`,[`&:hover:not(${et}-item-active)`]:{borderColor:ot.colorPrimary,backgroundColor:ot.itemBg,a:{color:ot.colorPrimary}},"&-active":{borderColor:ot.colorPrimary}}}}},Rt=ot=>{const{componentCls:et}=ot;return{[`${et}:not(${et}-disabled)`]:{[`${et}-item`]:Object.assign({},(0,$t.Qy)(ot)),[`${et}-jump-prev, ${et}-jump-next`]:{"&:focus-visible":Object.assign({[`${et}-item-link-icon`]:{opacity:1},[`${et}-item-ellipsis`]:{opacity:0}},(0,$t.oN)(ot))},[`${et}-prev, ${et}-next`]:{[`&:focus-visible ${et}-item-link`]:Object.assign({},(0,$t.oN)(ot))}}}};var Lt=(0,en.Z)("Pagination",ot=>{const et=(0,Nn.TS)(ot,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:ot.marginXXS/2,paginationMiniQuickJumperInputWidth:ot.controlHeightLG*1.1,paginationItemPaddingInline:ot.marginXXS*1.5,paginationEllipsisLetterSpacing:ot.marginXXS/2,paginationSlashMarginInlineStart:ot.marginXXS,paginationSlashMarginInlineEnd:ot.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ft.e5)(ot),(0,Ft.TM)(ot));return[Zt(et),Rt(et),ot.wireframe&&tn(et)]},ot=>({itemBg:ot.colorBgContainer,itemSize:ot.controlHeight,itemSizeSM:ot.controlHeightSM,itemActiveBg:ot.colorBgContainer,itemLinkBg:ot.colorBgContainer,itemActiveColorDisabled:ot.colorTextDisabled,itemActiveBgDisabled:ot.controlItemBgActiveDisabled,itemInputBg:ot.colorBgContainer,miniOptionsSizeChangerTop:0})),ut=function(ot,et){var Te={};for(var xe in ot)Object.prototype.hasOwnProperty.call(ot,xe)&&et.indexOf(xe)<0&&(Te[xe]=ot[xe]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,xe=Object.getOwnPropertySymbols(ot);Se<xe.length;Se++)et.indexOf(xe[Se])<0&&Object.prototype.propertyIsEnumerable.call(ot,xe[Se])&&(Te[xe[Se]]=ot[xe[Se]]);return Te},Dt=ot=>{const{prefixCls:et,selectPrefixCls:Te,className:xe,rootClassName:Se,style:Be,size:_e,locale:Ee,selectComponentClass:ft,responsive:Xt,showSizeChanger:an}=ot,Qt=ut(ot,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:En}=(0,lt.Z)(Xt),{getPrefixCls:Yn,direction:zn,pagination:Dn={}}=De.useContext(Gt.E_),ii=Yn("pagination",et),[gi,pi]=Lt(ii),Ii=an!=null?an:Dn.showSizeChanger,Yi=De.useMemo(()=>{const be=De.createElement("span",{className:`${ii}-item-ellipsis`},"\u2022\u2022\u2022"),ci=De.createElement("button",{className:`${ii}-item-link`,type:"button",tabIndex:-1},zn==="rtl"?De.createElement(st.Z,null):De.createElement(He.Z,null)),Hi=De.createElement("button",{className:`${ii}-item-link`,type:"button",tabIndex:-1},zn==="rtl"?De.createElement(He.Z,null):De.createElement(st.Z,null)),dn=De.createElement("a",{className:`${ii}-item-link`},De.createElement("div",{className:`${ii}-item-container`},zn==="rtl"?De.createElement(ct.Z,{className:`${ii}-item-link-icon`}):De.createElement(yt,{className:`${ii}-item-link-icon`}),be)),oi=De.createElement("a",{className:`${ii}-item-link`},De.createElement("div",{className:`${ii}-item-container`},zn==="rtl"?De.createElement(yt,{className:`${ii}-item-link-icon`}):De.createElement(ct.Z,{className:`${ii}-item-link-icon`}),be));return{prevIcon:ci,nextIcon:Hi,jumpPrevIcon:dn,jumpNextIcon:oi}},[zn,ii]),[Jn]=(0,$e.Z)("Pagination",Bt.Z),Wn=Object.assign(Object.assign({},Jn),Ee),ti=(0,Ut.Z)(_e),yi=ti==="small"||!!(En&&!ti&&Xt),mi=Yn("select",Te),dr=dt()({[`${ii}-mini`]:yi,[`${ii}-rtl`]:zn==="rtl"},Dn==null?void 0:Dn.className,xe,Se,pi),mr=Object.assign(Object.assign({},Dn==null?void 0:Dn.style),Be);return gi(De.createElement(kt,Object.assign({},Yi,Qt,{style:mr,prefixCls:ii,selectPrefixCls:mi,className:dr,selectComponentClass:ft||(yi?cn:sn),locale:Wn,showSizeChanger:Ii})))},Tt=Dt},39722:function(Cn,un,ve){"use strict";ve.d(un,{t5:function(){return He}});var ce=ve(92310),De=ve.n(ce),ze=ve(55477),wt=ve(59301),Ze=ve(36355),ht=ve(77578),Me=ve(17356),yt=function(mt,dt){var Ae={};for(var te in mt)Object.prototype.hasOwnProperty.call(mt,te)&&dt.indexOf(te)<0&&(Ae[te]=mt[te]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(mt);ee<te.length;ee++)dt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(mt,te[ee])&&(Ae[te[ee]]=mt[te[ee]]);return Ae};const ct=(mt,dt,Ae)=>{if(!(!dt&&!Ae))return wt.createElement(wt.Fragment,null,dt&&wt.createElement("div",{className:`${mt}-title`},(0,ht.Z)(dt)),wt.createElement("div",{className:`${mt}-inner-content`},(0,ht.Z)(Ae)))},He=mt=>{const{hashId:dt,prefixCls:Ae,className:te,style:ee,placement:he="top",title:se,content:de,children:me}=mt;return wt.createElement("div",{className:De()(dt,Ae,`${Ae}-pure`,`${Ae}-placement-${he}`,te),style:ee},wt.createElement("div",{className:`${Ae}-arrow`}),wt.createElement(ze.G,Object.assign({},mt,{className:dt,prefixCls:Ae}),me||ct(Ae,se,de)))},st=mt=>{const{prefixCls:dt}=mt,Ae=yt(mt,["prefixCls"]),{getPrefixCls:te}=wt.useContext(Ze.E_),ee=te("popover",dt),[he,se]=(0,Me.Z)(ee);return he(wt.createElement(He,Object.assign({},Ae,{prefixCls:ee,hashId:se})))};un.ZP=st},60324:function(Cn,un,ve){"use strict";var ce=ve(92310),De=ve.n(ce),ze=ve(59301),wt=ve(77578),Ze=ve(62892),ht=ve(36355),Me=ve(6848),yt=ve(39722),ct=ve(17356),He=function(dt,Ae){var te={};for(var ee in dt)Object.prototype.hasOwnProperty.call(dt,ee)&&Ae.indexOf(ee)<0&&(te[ee]=dt[ee]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ee=Object.getOwnPropertySymbols(dt);he<ee.length;he++)Ae.indexOf(ee[he])<0&&Object.prototype.propertyIsEnumerable.call(dt,ee[he])&&(te[ee[he]]=dt[ee[he]]);return te};const st=dt=>{let{title:Ae,content:te,prefixCls:ee}=dt;return ze.createElement(ze.Fragment,null,Ae&&ze.createElement("div",{className:`${ee}-title`},(0,wt.Z)(Ae)),ze.createElement("div",{className:`${ee}-inner-content`},(0,wt.Z)(te)))},mt=ze.forwardRef((dt,Ae)=>{const{prefixCls:te,title:ee,content:he,overlayClassName:se,placement:de="top",trigger:me="hover",mouseEnterDelay:we=.1,mouseLeaveDelay:Ne=.1,overlayStyle:Fe={}}=dt,Ie=He(dt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:je}=ze.useContext(ht.E_),Je=je("popover",te),[Ke,gt]=(0,ct.Z)(Je),Re=je(),At=De()(se,gt);return Ke(ze.createElement(Me.Z,Object.assign({placement:de,trigger:me,mouseEnterDelay:we,mouseLeaveDelay:Ne,overlayStyle:Fe},Ie,{prefixCls:Je,overlayClassName:At,ref:Ae,overlay:ee||he?ze.createElement(st,{prefixCls:Je,title:ee,content:he}):null,transitionName:(0,Ze.m)(Re,"zoom-big",Ie.transitionName),"data-popover-inject":!0})))});mt._InternalPanelDoNotUseOrYouWillBeFired=yt.ZP,un.Z=mt},17356:function(Cn,un,ve){"use strict";var ce=ve(17313),De=ve(29878),ze=ve(19447),wt=ve(33166),Ze=ve(83116),ht=ve(37613);const Me=He=>{const{componentCls:st,popoverColor:mt,minWidth:dt,fontWeightStrong:Ae,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:he,borderRadiusLG:se,zIndexPopup:de,marginXS:me,colorBgElevated:we,popoverBg:Ne}=He;return[{[st]:Object.assign(Object.assign({},(0,ce.Wf)(He)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:de,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":we,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${st}-content`]:{position:"relative"},[`${st}-inner`]:{backgroundColor:Ne,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${st}-title`]:{minWidth:dt,marginBottom:me,color:he,fontWeight:Ae},[`${st}-inner-content`]:{color:mt}})},(0,ze.ZP)(He,{colorBg:"var(--antd-arrow-background-color)"}),{[`${st}-pure`]:{position:"relative",maxWidth:"none",margin:He.sizePopupArrow,display:"inline-block",[`${st}-content`]:{display:"inline-block"}}}]},yt=He=>{const{componentCls:st}=He;return{[st]:wt.i.map(mt=>{const dt=He[`${mt}6`];return{[`&${st}-${mt}`]:{"--antd-arrow-background-color":dt,[`${st}-inner`]:{backgroundColor:dt},[`${st}-arrow`]:{background:"transparent"}}}})}},ct=He=>{const{componentCls:st,lineWidth:mt,lineType:dt,colorSplit:Ae,paddingSM:te,controlHeight:ee,fontSize:he,lineHeight:se,padding:de}=He,me=ee-Math.round(he*se),we=me/2,Ne=me/2-mt,Fe=de;return{[st]:{[`${st}-inner`]:{padding:0},[`${st}-title`]:{margin:0,padding:`${we}px ${Fe}px ${Ne}px`,borderBottom:`${mt}px ${dt} ${Ae}`},[`${st}-inner-content`]:{padding:`${te}px ${Fe}px`}}}};un.Z=(0,Ze.Z)("Popover",He=>{const{colorBgElevated:st,colorText:mt,wireframe:dt}=He,Ae=(0,ht.TS)(He,{popoverPadding:12,popoverBg:st,popoverColor:mt});return[Me(Ae),yt(Ae),dt&&ct(Ae),(0,De._y)(Ae,"zoom-big")]},He=>({width:177,minWidth:177,zIndexPopup:He.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return $e}});var ce=ve(72308),De=ve(59301),ze={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"},wt=ze,Ze=ve(7657),ht=function(cn,sn){return De.createElement(Ze.Z,(0,ce.Z)({},cn,{ref:sn,icon:wt}))},Me=De.forwardRef(ht),yt=Me,ct=ve(92310),He=ve.n(ct),st=ve(49618),mt=ve(52487),dt=ve(74416),Ae=ve(18929),te=ve(10228),ee=ve(26112);function he(Nt,cn){var sn=Nt.disabled,Ft=Nt.prefixCls,$t=Nt.character,en=Nt.characterRender,Nn=Nt.index,fn=Nt.count,Mn=Nt.value,pt=Nt.allowHalf,Ln=Nt.focused,Un=Nt.onHover,Zt=Nt.onClick,tn=function(et){Un(et,Nn)},Rt=function(et){Zt(et,Nn)},Lt=function(et){et.keyCode===te.Z.ENTER&&Zt(et,Nn)},ut=Nn+1,Ge=new Set([Ft]);Mn===0&&Nn===0&&Ln?Ge.add("".concat(Ft,"-focused")):pt&&Mn+.5>=ut&&Mn<ut?(Ge.add("".concat(Ft,"-half")),Ge.add("".concat(Ft,"-active")),Ln&&Ge.add("".concat(Ft,"-focused"))):(ut<=Mn?Ge.add("".concat(Ft,"-full")):Ge.add("".concat(Ft,"-zero")),ut===Mn&&Ln&&Ge.add("".concat(Ft,"-focused")));var Dt=typeof $t=="function"?$t(Nt):$t,Tt=De.createElement("li",{className:He()(Array.from(Ge)),ref:cn},De.createElement("div",{onClick:sn?null:Rt,onKeyDown:sn?null:Lt,onMouseMove:sn?null:tn,role:"radio","aria-checked":Mn>Nn?"true":"false","aria-posinset":Nn+1,"aria-setsize":fn,tabIndex:sn?-1:0},De.createElement("div",{className:"".concat(Ft,"-first")},Dt),De.createElement("div",{className:"".concat(Ft,"-second")},Dt)));return en&&(Tt=en(Tt,Nt)),Tt}var se=De.forwardRef(he);function de(){var Nt=De.useRef({});function cn(Ft){return Nt.current[Ft]}function sn(Ft){return function($t){Nt.current[Ft]=$t}}return[cn,sn]}function me(Nt){var cn=Nt.pageXOffset,sn="scrollLeft";if(typeof cn!="number"){var Ft=Nt.document;cn=Ft.documentElement[sn],typeof cn!="number"&&(cn=Ft.body[sn])}return cn}function we(Nt){var cn,sn,Ft=Nt.ownerDocument,$t=Ft.body,en=Ft&&Ft.documentElement,Nn=Nt.getBoundingClientRect();return cn=Nn.left,sn=Nn.top,cn-=en.clientLeft||$t.clientLeft||0,sn-=en.clientTop||$t.clientTop||0,{left:cn,top:sn}}function Ne(Nt){var cn=we(Nt),sn=Nt.ownerDocument,Ft=sn.defaultView||sn.parentWindow;return cn.left+=me(Ft),cn.left}var Fe=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Ie(Nt,cn){var sn,Ft=Nt.prefixCls,$t=Ft===void 0?"rc-rate":Ft,en=Nt.className,Nn=Nt.defaultValue,fn=Nt.value,Mn=Nt.count,pt=Mn===void 0?5:Mn,Ln=Nt.allowHalf,Un=Ln===void 0?!1:Ln,Zt=Nt.allowClear,tn=Zt===void 0?!0:Zt,Rt=Nt.character,Lt=Rt===void 0?"\u2605":Rt,ut=Nt.characterRender,Ge=Nt.disabled,Dt=Nt.direction,Tt=Dt===void 0?"ltr":Dt,ot=Nt.tabIndex,et=ot===void 0?0:ot,Te=Nt.autoFocus,xe=Nt.onHoverChange,Se=Nt.onChange,Be=Nt.onFocus,_e=Nt.onBlur,Ee=Nt.onKeyDown,ft=Nt.onMouseLeave,Xt=(0,dt.Z)(Nt,Fe),an=de(),Qt=(0,mt.Z)(an,2),En=Qt[0],Yn=Qt[1],zn=De.useRef(null),Dn=function(){if(!Ge){var nt;(nt=zn.current)===null||nt===void 0||nt.focus()}};De.useImperativeHandle(cn,function(){return{focus:Dn,blur:function(){if(!Ge){var nt;(nt=zn.current)===null||nt===void 0||nt.blur()}}}});var ii=(0,Ae.Z)(Nn||0,{value:fn}),gi=(0,mt.Z)(ii,2),pi=gi[0],Ii=gi[1],Yi=(0,Ae.Z)(null),Jn=(0,mt.Z)(Yi,2),Wn=Jn[0],ti=Jn[1],yi=function(nt,Kt){var ln=Tt==="rtl",xn=nt+1;if(Un){var On=En(nt),St=Ne(On),gn=On.clientWidth;(ln&&Kt-St>gn/2||!ln&&Kt-St<gn/2)&&(xn-=.5)}return xn},mi=function(nt){Ii(nt),Se==null||Se(nt)},dr=De.useState(!1),mr=(0,mt.Z)(dr,2),be=mr[0],ci=mr[1],Hi=function(){ci(!0),Be==null||Be()},dn=function(){ci(!1),_e==null||_e()},oi=De.useState(null),vi=(0,mt.Z)(oi,2),Fi=vi[0],Vn=vi[1],bn=function(nt,Kt){var ln=yi(Kt,nt.pageX);ln!==Wn&&(Vn(ln),ti(null)),xe==null||xe(ln)},Mt=function(nt){Ge||(Vn(null),ti(null),xe==null||xe(void 0)),nt&&(ft==null||ft(nt))},Ot=function(nt,Kt){var ln=yi(Kt,nt.pageX),xn=!1;tn&&(xn=ln===pi),Mt(),mi(xn?0:ln),ti(xn?ln:null)},Ve=function(nt){var Kt=nt.keyCode,ln=Tt==="rtl",xn=pi;Kt===te.Z.RIGHT&&xn<pt&&!ln?(Un?xn+=.5:xn+=1,mi(xn),nt.preventDefault()):Kt===te.Z.LEFT&&xn>0&&!ln||Kt===te.Z.RIGHT&&xn>0&&ln?(Un?xn-=.5:xn-=1,mi(xn),nt.preventDefault()):Kt===te.Z.LEFT&&xn<pt&&ln&&(Un?xn+=.5:xn+=1,mi(xn),nt.preventDefault()),Ee==null||Ee(nt)};De.useEffect(function(){Te&&!Ge&&Dn()},[]);var Yt=new Array(pt).fill(0).map(function(xt,nt){return De.createElement(se,{ref:Yn(nt),index:nt,count:pt,disabled:Ge,prefixCls:"".concat($t,"-star"),allowHalf:Un,value:Fi===null?pi:Fi,onClick:Ot,onHover:bn,key:xt||nt,character:Lt,characterRender:ut,focused:be})}),qt=He()($t,en,(sn={},(0,st.Z)(sn,"".concat($t,"-disabled"),Ge),(0,st.Z)(sn,"".concat($t,"-rtl"),Tt==="rtl"),sn));return De.createElement("ul",(0,ce.Z)({className:qt,onMouseLeave:Mt,tabIndex:Ge?-1:et,onFocus:Ge?null:Hi,onBlur:Ge?null:dn,onKeyDown:Ge?null:Ve,ref:zn,role:"radiogroup"},(0,ee.Z)(Xt,{aria:!0,data:!0,attr:!0})),Yt)}var je=De.forwardRef(Ie),Je=je,Ke=ve(36355),gt=ve(6848),Re=ve(17313),At=ve(83116),qe=ve(37613);const Et=Nt=>{const{componentCls:cn}=Nt;return{[`${cn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:Nt.marginXS},"> div":{transition:`all ${Nt.motionDurationMid}, outline 0s`,"&:hover":{transform:Nt.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${Nt.lineWidth}px dashed ${Nt.starColor}`,transform:Nt.starHoverScale}},"&-first, &-second":{color:Nt.starBg,transition:`all ${Nt.motionDurationMid}`,userSelect:"none",[Nt.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${cn}-star-first, &-half ${cn}-star-second`]:{opacity:1},[`&-half ${cn}-star-first, &-full ${cn}-star-second`]:{color:"inherit"}}}},kt=Nt=>({[`&-rtl${Nt.componentCls}`]:{direction:"rtl"}}),Bt=Nt=>{const{componentCls:cn}=Nt;return{[cn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Re.Wf)(Nt)),{display:"inline-block",margin:0,padding:0,color:Nt.starColor,fontSize:Nt.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${cn} ${cn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Et(Nt)),{[`+ ${cn}-text`]:{display:"inline-block",marginInlineStart:Nt.marginXS,fontSize:Nt.fontSize}}),kt(Nt))}};var Gt=(0,At.Z)("Rate",Nt=>{const cn=(0,qe.TS)(Nt,{});return[Bt(cn)]},Nt=>({starColor:Nt.yellow6,starSize:Nt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Nt.colorFillContent})),Ut=function(Nt,cn){var sn={};for(var Ft in Nt)Object.prototype.hasOwnProperty.call(Nt,Ft)&&cn.indexOf(Ft)<0&&(sn[Ft]=Nt[Ft]);if(Nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Ft=Object.getOwnPropertySymbols(Nt);$t<Ft.length;$t++)cn.indexOf(Ft[$t])<0&&Object.prototype.propertyIsEnumerable.call(Nt,Ft[$t])&&(sn[Ft[$t]]=Nt[Ft[$t]]);return sn},$e=De.forwardRef((Nt,cn)=>{const{prefixCls:sn,className:Ft,rootClassName:$t,style:en,tooltips:Nn,character:fn=De.createElement(yt,null)}=Nt,Mn=Ut(Nt,["prefixCls","className","rootClassName","style","tooltips","character"]),pt=(Ge,Dt)=>{let{index:Tt}=Dt;return Nn?De.createElement(gt.Z,{title:Nn[Tt]},Ge):Ge},{getPrefixCls:Ln,direction:Un,rate:Zt}=De.useContext(Ke.E_),tn=Ln("rate",sn),[Rt,Lt]=Gt(tn),ut=Object.assign(Object.assign({},Zt==null?void 0:Zt.style),en);return Rt(De.createElement(Je,Object.assign({ref:cn,character:fn,characterRender:pt},Mn,{className:He()(Ft,$t,Lt,Zt==null?void 0:Zt.className),style:ut,prefixCls:tn,direction:Un})))})},57809:function(Cn,un,ve){"use strict";var ce=ve(92310),De=ve.n(ce),ze=ve(77861),wt=ve(2738),Ze=ve(59301),ht=ve(53487),Me=ve(62892),yt=ve(19080),ct=ve(36355),He=ve(1684),st=ve(93891),mt=ve(19716),dt=ve(32441),Ae=ve(33234),te=ve(14154),ee=ve(58582),he=ve(84443),se=ve(66339),de=function(Ie,je){var Je={};for(var Ke in Ie)Object.prototype.hasOwnProperty.call(Ie,Ke)&&je.indexOf(Ke)<0&&(Je[Ke]=Ie[Ke]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Ke=Object.getOwnPropertySymbols(Ie);gt<Ke.length;gt++)je.indexOf(Ke[gt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ke[gt])&&(Je[Ke[gt]]=Ie[Ke[gt]]);return Je};const me="SECRET_COMBOBOX_MODE_DO_NOT_USE",we=(Ie,je)=>{var Je,{prefixCls:Ke,bordered:gt=!0,className:Re,rootClassName:At,getPopupContainer:qe,popupClassName:Et,dropdownClassName:kt,listHeight:Bt=256,placement:Gt,listItemHeight:Ut=24,size:lt,disabled:$e,notFoundContent:Nt,status:cn,builtinPlacements:sn,dropdownMatchSelectWidth:Ft,popupMatchSelectWidth:$t,direction:en,style:Nn,allowClear:fn}=Ie,Mn=de(Ie,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:pt,getPrefixCls:Ln,renderEmpty:Un,direction:Zt,virtual:tn,popupMatchSelectWidth:Rt,popupOverflow:Lt,select:ut}=Ze.useContext(ct.E_),Ge=Ln("select",Ke),Dt=Ln(),Tt=en!=null?en:Zt,{compactSize:ot,compactItemClassnames:et}=(0,Ae.ri)(Ge,Tt),[Te,xe]=(0,te.Z)(Ge),Se=Ze.useMemo(()=>{const{mode:mr}=Mn;if(mr!=="combobox")return mr===me?"combobox":mr},[Mn.mode]),Be=Se==="multiple"||Se==="tags",_e=(0,he.Z)(Mn.suffixIcon,Mn.showArrow),Ee=(Je=$t!=null?$t:Ft)!==null&&Je!==void 0?Je:Rt,{status:ft,hasFeedback:Xt,isFormItemInput:an,feedbackIcon:Qt}=Ze.useContext(dt.aM),En=(0,yt.F)(ft,cn);let Yn;Nt!==void 0?Yn=Nt:Se==="combobox"?Yn=null:Yn=(Un==null?void 0:Un("Select"))||Ze.createElement(st.Z,{componentName:"Select"});const{suffixIcon:zn,itemIcon:Dn,removeIcon:ii,clearIcon:gi}=(0,se.Z)(Object.assign(Object.assign({},Mn),{multiple:Be,hasFeedback:Xt,feedbackIcon:Qt,showSuffixIcon:_e,prefixCls:Ge,showArrow:Mn.showArrow,componentName:"Select"})),pi=fn===!0?{clearIcon:gi}:fn,Ii=(0,wt.Z)(Mn,["suffixIcon","itemIcon"]),Yi=De()(Et||kt,{[`${Ge}-dropdown-${Tt}`]:Tt==="rtl"},At,xe),Jn=(0,mt.Z)(mr=>{var be;return(be=lt!=null?lt:ot)!==null&&be!==void 0?be:mr}),Wn=Ze.useContext(He.Z),ti=$e!=null?$e:Wn,yi=De()({[`${Ge}-lg`]:Jn==="large",[`${Ge}-sm`]:Jn==="small",[`${Ge}-rtl`]:Tt==="rtl",[`${Ge}-borderless`]:!gt,[`${Ge}-in-form-item`]:an},(0,yt.Z)(Ge,En,Xt),et,ut==null?void 0:ut.className,Re,At,xe),mi=Ze.useMemo(()=>Gt!==void 0?Gt:Tt==="rtl"?"bottomRight":"bottomLeft",[Gt,Tt]),dr=(0,ee.Z)(sn,Lt);return Te(Ze.createElement(ze.ZP,Object.assign({ref:je,virtual:tn,showSearch:ut==null?void 0:ut.showSearch},Ii,{style:Object.assign(Object.assign({},ut==null?void 0:ut.style),Nn),dropdownMatchSelectWidth:Ee,builtinPlacements:dr,transitionName:(0,Me.m)(Dt,"slide-up",Mn.transitionName),listHeight:Bt,listItemHeight:Ut,mode:Se,prefixCls:Ge,placement:mi,direction:Tt,suffixIcon:zn,menuItemSelectedIcon:Dn,removeIcon:ii,allowClear:pi,notFoundContent:Yn,className:yi,getPopupContainer:qe||pt,dropdownClassName:Yi,disabled:ti})))},Ne=Ze.forwardRef(we),Fe=(0,ht.Z)(Ne);Ne.SECRET_COMBOBOX_MODE_DO_NOT_USE=me,Ne.Option=ze.Wx,Ne.OptGroup=ze.Xo,Ne._InternalPanelDoNotUseOrYouWillBeFired=Fe,un.default=Ne},14154:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Ne}});var ce=ve(17313),De=ve(74207),ze=ve(37613),wt=ve(83116),Ze=ve(13826),ht=ve(92899);const Me=Fe=>{const{optionHeight:Ie,optionFontSize:je,optionLineHeight:Je,optionPadding:Ke}=Fe;return{position:"relative",display:"block",minHeight:Ie,padding:Ke,color:Fe.colorText,fontWeight:"normal",fontSize:je,lineHeight:Je,boxSizing:"border-box"}};var ct=Fe=>{const{antCls:Ie,componentCls:je}=Fe,Je=`${je}-item`,Ke=`&${Ie}-slide-up-enter${Ie}-slide-up-enter-active`,gt=`&${Ie}-slide-up-appear${Ie}-slide-up-appear-active`,Re=`&${Ie}-slide-up-leave${Ie}-slide-up-leave-active`,At=`${je}-dropdown-placement-`;return[{[`${je}-dropdown`]:Object.assign(Object.assign({},(0,ce.Wf)(Fe)),{position:"absolute",top:-9999,zIndex:Fe.zIndexPopup,boxSizing:"border-box",padding:Fe.paddingXXS,overflow:"hidden",fontSize:Fe.fontSize,fontVariant:"initial",backgroundColor:Fe.colorBgElevated,borderRadius:Fe.borderRadiusLG,outline:"none",boxShadow:Fe.boxShadowSecondary,[`
|
|
|
${Ke}${At}bottomLeft,
|
|
|
${gt}${At}bottomLeft
|
|
|
`]:{animationName:Ze.fJ},[`
|
|
|
${Ke}${At}topLeft,
|
|
|
${gt}${At}topLeft,
|
|
|
${Ke}${At}topRight,
|
|
|
${gt}${At}topRight
|
|
|
`]:{animationName:Ze.Qt},[`${Re}${At}bottomLeft`]:{animationName:Ze.Uw},[`
|
|
|
${Re}${At}topLeft,
|
|
|
${Re}${At}topRight
|
|
|
`]:{animationName:Ze.ly},"&-hidden":{display:"none"},[`${Je}`]:Object.assign(Object.assign({},Me(Fe)),{cursor:"pointer",transition:`background ${Fe.motionDurationSlow} ease`,borderRadius:Fe.borderRadiusSM,"&-group":{color:Fe.colorTextDescription,fontSize:Fe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ce.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Je}-option-disabled)`]:{backgroundColor:Fe.optionActiveBg},[`&-selected:not(${Je}-option-disabled)`]:{color:Fe.optionSelectedColor,fontWeight:Fe.optionSelectedFontWeight,backgroundColor:Fe.optionSelectedBg,[`${Je}-option-state`]:{color:Fe.colorPrimary}},"&-disabled":{[`&${Je}-option-selected`]:{backgroundColor:Fe.colorBgContainerDisabled},color:Fe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Fe.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ze.oN)(Fe,"slide-up"),(0,Ze.oN)(Fe,"slide-down"),(0,ht.Fm)(Fe,"move-up"),(0,ht.Fm)(Fe,"move-down")]};const He=2,st=Fe=>{let{controlHeightSM:Ie,controlHeight:je,lineWidth:Je}=Fe;const Ke=(je-Ie)/2-Je,gt=Math.ceil(Ke/2);return[Ke,gt]};function mt(Fe,Ie){const{componentCls:je,iconCls:Je}=Fe,Ke=`${je}-selection-overflow`,gt=Fe.multipleSelectItemHeight,[Re]=st(Fe),At=Ie?`${je}-${Ie}`:"";return{[`${je}-multiple${At}`]:{fontSize:Fe.fontSize,[Ke]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${je}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Re-He}px ${He*2}px`,borderRadius:Fe.borderRadius,[`${je}-show-search&`]:{cursor:"text"},[`${je}-disabled&`]:{background:Fe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${He}px 0`,lineHeight:`${gt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${je}-show-arrow ${je}-selector,
|
|
|
&${je}-allow-clear ${je}-selector
|
|
|
`]:{paddingInlineEnd:Fe.fontSizeIcon+Fe.controlPaddingHorizontal},[`${je}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:gt,marginTop:He,marginBottom:He,lineHeight:`${gt-Fe.lineWidth*2}px`,background:Fe.multipleItemBg,border:`${Fe.lineWidth}px ${Fe.lineType} ${Fe.multipleItemBorderColor}`,borderRadius:Fe.borderRadiusSM,cursor:"default",transition:`font-size ${Fe.motionDurationSlow}, line-height ${Fe.motionDurationSlow}, height ${Fe.motionDurationSlow}`,userSelect:"none",marginInlineEnd:He*2,paddingInlineStart:Fe.paddingXS,paddingInlineEnd:Fe.paddingXS/2,[`${je}-disabled&`]:{color:Fe.multipleItemColorDisabled,borderColor:Fe.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Fe.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ce.Ro)()),{display:"inline-flex",alignItems:"center",color:Fe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Je}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Fe.colorIconHover}})},[`${Ke}-item + ${Ke}-item`]:{[`${je}-selection-search`]:{marginInlineStart:0}},[`${je}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Fe.inputPaddingHorizontalBase-Re,"\n &-input,\n &-mirror\n ":{height:gt,fontFamily:Fe.fontFamily,lineHeight:`${gt}px`,transition:`all ${Fe.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${je}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Fe.inputPaddingHorizontalBase,insetInlineEnd:Fe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Fe.motionDurationSlow}`}}}}var Ae=Fe=>{const{componentCls:Ie}=Fe,je=(0,ze.TS)(Fe,{controlHeight:Fe.controlHeightSM,multipleSelectItemHeight:Fe.controlHeightXS,borderRadius:Fe.borderRadiusSM,borderRadiusSM:Fe.borderRadiusXS}),Je=(0,ze.TS)(Fe,{fontSize:Fe.fontSizeLG,controlHeight:Fe.controlHeightLG,multipleSelectItemHeight:Fe.multipleItemHeightLG,borderRadius:Fe.borderRadiusLG,borderRadiusSM:Fe.borderRadius}),[,Ke]=st(Fe);return[mt(Fe),mt(je,"sm"),{[`${Ie}-multiple${Ie}-sm`]:{[`${Ie}-selection-placeholder`]:{insetInline:Fe.controlPaddingHorizontalSM-Fe.lineWidth},[`${Ie}-selection-search`]:{marginInlineStart:Ke}}},mt(Je,"lg")]};function te(Fe,Ie){const{componentCls:je,inputPaddingHorizontalBase:Je,borderRadius:Ke}=Fe,gt=Fe.controlHeight-Fe.lineWidth*2,Re=Math.ceil(Fe.fontSize*1.25),At=Ie?`${je}-${Ie}`:"";return{[`${je}-single${At}`]:{fontSize:Fe.fontSize,[`${je}-selector`]:Object.assign(Object.assign({},(0,ce.Wf)(Fe)),{display:"flex",borderRadius:Ke,[`${je}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Je,insetInlineEnd:Je,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${je}-selection-item,
|
|
|
${je}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${gt}px`,transition:`all ${Fe.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${gt}px`}},[`${je}-selection-item`]:{position:"relative",userSelect:"none"},[`${je}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${je}-selection-item:after`,`${je}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${je}-show-arrow ${je}-selection-item,
|
|
|
&${je}-show-arrow ${je}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Re},[`&${je}-open ${je}-selection-item`]:{color:Fe.colorTextPlaceholder},[`&:not(${je}-customize-input)`]:{[`${je}-selector`]:{width:"100%",height:Fe.controlHeight,padding:`0 ${Je}px`,[`${je}-selection-search-input`]:{height:gt},"&:after":{lineHeight:`${gt}px`}}},[`&${je}-customize-input`]:{[`${je}-selector`]:{"&:after":{display:"none"},[`${je}-selection-search`]:{position:"static",width:"100%"},[`${je}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Je}px`,"&:after":{display:"none"}}}}}}}function ee(Fe){const{componentCls:Ie}=Fe,je=Fe.controlPaddingHorizontalSM-Fe.lineWidth;return[te(Fe),te((0,ze.TS)(Fe,{controlHeight:Fe.controlHeightSM,borderRadius:Fe.borderRadiusSM}),"sm"),{[`${Ie}-single${Ie}-sm`]:{[`&:not(${Ie}-customize-input)`]:{[`${Ie}-selection-search`]:{insetInlineStart:je,insetInlineEnd:je},[`${Ie}-selector`]:{padding:`0 ${je}px`},[`&${Ie}-show-arrow ${Ie}-selection-search`]:{insetInlineEnd:je+Fe.fontSize*1.5},[`
|
|
|
&${Ie}-show-arrow ${Ie}-selection-item,
|
|
|
&${Ie}-show-arrow ${Ie}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Fe.fontSize*1.5}}}},te((0,ze.TS)(Fe,{controlHeight:Fe.singleItemHeightLG,fontSize:Fe.fontSizeLG,borderRadius:Fe.borderRadiusLG}),"lg")]}const he=Fe=>{const{componentCls:Ie,selectorBg:je}=Fe;return{position:"relative",backgroundColor:je,border:`${Fe.lineWidth}px ${Fe.lineType} ${Fe.colorBorder}`,transition:`all ${Fe.motionDurationMid} ${Fe.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ie}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ie}-disabled&`]:{color:Fe.colorTextDisabled,background:Fe.colorBgContainerDisabled,cursor:"not-allowed",[`${Ie}-multiple&`]:{background:Fe.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Fe,Ie){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Je,borderHoverColor:Ke,outlineColor:gt,antCls:Re}=Ie,At=je?{[`${Je}-selector`]:{borderColor:Ke}}:{};return{[Fe]:{[`&:not(${Je}-disabled):not(${Je}-customize-input):not(${Re}-pagination-size-changer)`]:Object.assign(Object.assign({},At),{[`${Je}-focused& ${Je}-selector`]:{borderColor:Ke,boxShadow:`0 0 0 ${Ie.controlOutlineWidth}px ${gt}`,outline:0},[`&:hover ${Je}-selector`]:{borderColor:Ke}})}}},de=Fe=>{const{componentCls:Ie}=Fe;return{[`${Ie}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},me=Fe=>{const{componentCls:Ie,inputPaddingHorizontalBase:je,iconCls:Je}=Fe;return{[Ie]:Object.assign(Object.assign({},(0,ce.Wf)(Fe)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ie}-customize-input) ${Ie}-selector`]:Object.assign(Object.assign({},he(Fe)),de(Fe)),[`${Ie}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ce.vS),[`${Ie}-selection-placeholder`]:Object.assign(Object.assign({},ce.vS),{flex:1,color:Fe.colorTextPlaceholder,pointerEvents:"none"}),[`${Ie}-arrow`]:Object.assign(Object.assign({},(0,ce.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,height:Fe.fontSizeIcon,marginTop:-Fe.fontSizeIcon/2,color:Fe.colorTextQuaternary,fontSize:Fe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Je]:{verticalAlign:"top",transition:`transform ${Fe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ie}-suffix)`]:{pointerEvents:"auto"}},[`${Ie}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ie}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,zIndex:1,display:"inline-block",width:Fe.fontSizeIcon,height:Fe.fontSizeIcon,marginTop:-Fe.fontSizeIcon/2,color:Fe.colorTextQuaternary,fontSize:Fe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Fe.clearBg,cursor:"pointer",opacity:0,transition:`color ${Fe.motionDurationMid} ease, opacity ${Fe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Fe.colorTextTertiary}},"&:hover":{[`${Ie}-clear`]:{opacity:1}}}),[`${Ie}-has-feedback`]:{[`${Ie}-clear`]:{insetInlineEnd:je+Fe.fontSize+Fe.paddingXS}}}},we=Fe=>{const{componentCls:Ie}=Fe;return[{[Ie]:{[`&-borderless ${Ie}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ie}-in-form-item`]:{width:"100%"}}},me(Fe),ee(Fe),Ae(Fe),ct(Fe),{[`${Ie}-rtl`]:{direction:"rtl"}},se(Ie,(0,ze.TS)(Fe,{borderHoverColor:Fe.colorPrimaryHover,outlineColor:Fe.controlOutline})),se(`${Ie}-status-error`,(0,ze.TS)(Fe,{borderHoverColor:Fe.colorErrorHover,outlineColor:Fe.colorErrorOutline}),!0),se(`${Ie}-status-warning`,(0,ze.TS)(Fe,{borderHoverColor:Fe.colorWarningHover,outlineColor:Fe.colorWarningOutline}),!0),(0,De.c)(Fe,{borderElCls:`${Ie}-selector`,focusElCls:`${Ie}-focused`})]};var Ne=(0,wt.Z)("Select",(Fe,Ie)=>{let{rootPrefixCls:je}=Ie;const Je=(0,ze.TS)(Fe,{rootPrefixCls:je,inputPaddingHorizontalBase:Fe.paddingSM-1,multipleSelectItemHeight:Fe.multipleItemHeight});return[we(Je)]},Fe=>{const{fontSize:Ie,lineHeight:je,controlHeight:Je,controlPaddingHorizontal:Ke,zIndexPopupBase:gt,colorText:Re,fontWeightStrong:At,controlItemBgActive:qe,controlItemBgHover:Et,colorBgContainer:kt,colorFillSecondary:Bt,controlHeightLG:Gt,controlHeightSM:Ut,colorBgContainerDisabled:lt,colorTextDisabled:$e}=Fe;return{zIndexPopup:gt+50,optionSelectedColor:Re,optionSelectedFontWeight:At,optionSelectedBg:qe,optionActiveBg:Et,optionPadding:`${(Je-Ie*je)/2}px ${Ke}px`,optionFontSize:Ie,optionLineHeight:je,optionHeight:Je,selectorBg:kt,clearBg:kt,singleItemHeightLG:Gt,multipleItemBg:Bt,multipleItemBorderColor:"transparent",multipleItemHeight:Ut,multipleItemHeightLG:Je,multipleSelectorBgDisabled:lt,multipleItemColorDisabled:$e,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return De}});const ce=ze=>{const Ze={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ze==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ze),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ze),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ze),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ze),{points:["br","tr"],offset:[0,-4]})}};function De(ze,wt){return ze||ce(wt)}},84443:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return ce}});function ce(De,ze){return ze!==void 0?ze:De!==null}},66339:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});var ce=ve(40001),De=ve(19248),ze=ve(99267),wt=ve(84105),Ze=ve(58617),ht=ve(47472),Me=ve(59301);function yt(ct){let{suffixIcon:He,clearIcon:st,menuItemSelectedIcon:mt,removeIcon:dt,loading:Ae,multiple:te,hasFeedback:ee,prefixCls:he,showSuffixIcon:se,feedbackIcon:de,showArrow:me,componentName:we}=ct;const Ne=st!=null?st:Me.createElement(De.Z,null),Fe=Ke=>He===null&&!ee&&!me?null:Me.createElement(Me.Fragment,null,se!==!1&&Ke,ee&&de);let Ie=null;if(He!==void 0)Ie=Fe(He);else if(Ae)Ie=Fe(Me.createElement(Ze.Z,{spin:!0}));else{const Ke=`${he}-suffix`;Ie=gt=>{let{open:Re,showSearch:At}=gt;return Fe(Re&&At?Me.createElement(ht.Z,{className:Ke}):Me.createElement(wt.Z,{className:Ke}))}}let je=null;mt!==void 0?je=mt:te?je=Me.createElement(ce.Z,null):je=null;let Je=null;return dt!==void 0?Je=dt:Je=Me.createElement(ze.Z,null),{clearIcon:Ne,suffixIcon:Ie,itemIcon:je,removeIcon:Je}}},61621:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Lt}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),wt=ve(36355),Ze=ve(2738),Me=ut=>{const{prefixCls:Ge,className:Dt,style:Tt,size:ot,shape:et}=ut,Te=De()({[`${Ge}-lg`]:ot==="large",[`${Ge}-sm`]:ot==="small"}),xe=De()({[`${Ge}-circle`]:et==="circle",[`${Ge}-square`]:et==="square",[`${Ge}-round`]:et==="round"}),Se=ze.useMemo(()=>typeof ot=="number"?{width:ot,height:ot,lineHeight:`${ot}px`}:{},[ot]);return ze.createElement("span",{className:De()(Ge,Te,xe,Dt),style:Object.assign(Object.assign({},Se),Tt)})},yt=ve(93083),ct=ve(83116),He=ve(37613);const st=new yt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),mt=ut=>({height:ut,lineHeight:`${ut}px`}),dt=ut=>Object.assign({width:ut},mt(ut)),Ae=ut=>({background:ut.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:st,animationDuration:ut.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=ut=>Object.assign({width:ut*5,minWidth:ut*5},mt(ut)),ee=ut=>{const{skeletonAvatarCls:Ge,gradientFromColor:Dt,controlHeight:Tt,controlHeightLG:ot,controlHeightSM:et}=ut;return{[`${Ge}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Dt},dt(Tt)),[`${Ge}${Ge}-circle`]:{borderRadius:"50%"},[`${Ge}${Ge}-lg`]:Object.assign({},dt(ot)),[`${Ge}${Ge}-sm`]:Object.assign({},dt(et))}},he=ut=>{const{controlHeight:Ge,borderRadiusSM:Dt,skeletonInputCls:Tt,controlHeightLG:ot,controlHeightSM:et,gradientFromColor:Te}=ut;return{[`${Tt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Te,borderRadius:Dt},te(Ge)),[`${Tt}-lg`]:Object.assign({},te(ot)),[`${Tt}-sm`]:Object.assign({},te(et))}},se=ut=>Object.assign({width:ut},mt(ut)),de=ut=>{const{skeletonImageCls:Ge,imageSizeBase:Dt,gradientFromColor:Tt,borderRadiusSM:ot}=ut;return{[`${Ge}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Tt,borderRadius:ot},se(Dt*2)),{[`${Ge}-path`]:{fill:"#bfbfbf"},[`${Ge}-svg`]:Object.assign(Object.assign({},se(Dt)),{maxWidth:Dt*4,maxHeight:Dt*4}),[`${Ge}-svg${Ge}-svg-circle`]:{borderRadius:"50%"}}),[`${Ge}${Ge}-circle`]:{borderRadius:"50%"}}},me=(ut,Ge,Dt)=>{const{skeletonButtonCls:Tt}=ut;return{[`${Dt}${Tt}-circle`]:{width:Ge,minWidth:Ge,borderRadius:"50%"},[`${Dt}${Tt}-round`]:{borderRadius:Ge}}},we=ut=>Object.assign({width:ut*2,minWidth:ut*2},mt(ut)),Ne=ut=>{const{borderRadiusSM:Ge,skeletonButtonCls:Dt,controlHeight:Tt,controlHeightLG:ot,controlHeightSM:et,gradientFromColor:Te}=ut;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Dt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Te,borderRadius:Ge,width:Tt*2,minWidth:Tt*2},we(Tt))},me(ut,Tt,Dt)),{[`${Dt}-lg`]:Object.assign({},we(ot))}),me(ut,ot,`${Dt}-lg`)),{[`${Dt}-sm`]:Object.assign({},we(et))}),me(ut,et,`${Dt}-sm`))},Fe=ut=>{const{componentCls:Ge,skeletonAvatarCls:Dt,skeletonTitleCls:Tt,skeletonParagraphCls:ot,skeletonButtonCls:et,skeletonInputCls:Te,skeletonImageCls:xe,controlHeight:Se,controlHeightLG:Be,controlHeightSM:_e,gradientFromColor:Ee,padding:ft,marginSM:Xt,borderRadius:an,titleHeight:Qt,blockRadius:En,paragraphLiHeight:Yn,controlHeightXS:zn,paragraphMarginTop:Dn}=ut;return{[`${Ge}`]:{display:"table",width:"100%",[`${Ge}-header`]:{display:"table-cell",paddingInlineEnd:ft,verticalAlign:"top",[`${Dt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ee},dt(Se)),[`${Dt}-circle`]:{borderRadius:"50%"},[`${Dt}-lg`]:Object.assign({},dt(Be)),[`${Dt}-sm`]:Object.assign({},dt(_e))},[`${Ge}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Tt}`]:{width:"100%",height:Qt,background:Ee,borderRadius:En,[`+ ${ot}`]:{marginBlockStart:_e}},[`${ot}`]:{padding:0,"> li":{width:"100%",height:Yn,listStyle:"none",background:Ee,borderRadius:En,"+ li":{marginBlockStart:zn}}},[`${ot}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ge}-content`]:{[`${Tt}, ${ot} > li`]:{borderRadius:an}}},[`${Ge}-with-avatar ${Ge}-content`]:{[`${Tt}`]:{marginBlockStart:Xt,[`+ ${ot}`]:{marginBlockStart:Dn}}},[`${Ge}${Ge}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Ne(ut)),ee(ut)),he(ut)),de(ut)),[`${Ge}${Ge}-block`]:{width:"100%",[`${et}`]:{width:"100%"},[`${Te}`]:{width:"100%"}},[`${Ge}${Ge}-active`]:{[`
|
|
|
${Tt},
|
|
|
${ot} > li,
|
|
|
${Dt},
|
|
|
${et},
|
|
|
${Te},
|
|
|
${xe}
|
|
|
`]:Object.assign({},Ae(ut))}}};var Ie=(0,ct.Z)("Skeleton",ut=>{const{componentCls:Ge}=ut,Dt=(0,He.TS)(ut,{skeletonAvatarCls:`${Ge}-avatar`,skeletonTitleCls:`${Ge}-title`,skeletonParagraphCls:`${Ge}-paragraph`,skeletonButtonCls:`${Ge}-button`,skeletonInputCls:`${Ge}-input`,skeletonImageCls:`${Ge}-image`,imageSizeBase:ut.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${ut.gradientFromColor} 25%, ${ut.gradientToColor} 37%, ${ut.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Fe(Dt)]},ut=>{const{colorFillContent:Ge,colorFill:Dt}=ut,Tt=Ge,ot=Dt;return{color:Tt,colorGradientEnd:ot,gradientFromColor:Tt,gradientToColor:ot,titleHeight:ut.controlHeight/2,blockRadius:ut.borderRadiusSM,paragraphMarginTop:ut.marginLG+ut.marginXXS,paragraphLiHeight:ut.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Je=ut=>{const{prefixCls:Ge,className:Dt,rootClassName:Tt,active:ot,shape:et="circle",size:Te="default"}=ut,{getPrefixCls:xe}=ze.useContext(wt.E_),Se=xe("skeleton",Ge),[Be,_e]=Ie(Se),Ee=(0,Ze.Z)(ut,["prefixCls","className"]),ft=De()(Se,`${Se}-element`,{[`${Se}-active`]:ot},Dt,Tt,_e);return Be(ze.createElement("div",{className:ft},ze.createElement(Me,Object.assign({prefixCls:`${Se}-avatar`,shape:et,size:Te},Ee))))},gt=ut=>{const{prefixCls:Ge,className:Dt,rootClassName:Tt,active:ot,block:et=!1,size:Te="default"}=ut,{getPrefixCls:xe}=ze.useContext(wt.E_),Se=xe("skeleton",Ge),[Be,_e]=Ie(Se),Ee=(0,Ze.Z)(ut,["prefixCls"]),ft=De()(Se,`${Se}-element`,{[`${Se}-active`]:ot,[`${Se}-block`]:et},Dt,Tt,_e);return Be(ze.createElement("div",{className:ft},ze.createElement(Me,Object.assign({prefixCls:`${Se}-button`,size:Te},Ee))))};const Re="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 qe=ut=>{const{prefixCls:Ge,className:Dt,rootClassName:Tt,style:ot,active:et}=ut,{getPrefixCls:Te}=ze.useContext(wt.E_),xe=Te("skeleton",Ge),[Se,Be]=Ie(xe),_e=De()(xe,`${xe}-element`,{[`${xe}-active`]:et},Dt,Tt,Be);return Se(ze.createElement("div",{className:_e},ze.createElement("div",{className:De()(`${xe}-image`,Dt),style:ot},ze.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${xe}-image-svg`},ze.createElement("path",{d:Re,className:`${xe}-image-path`})))))},kt=ut=>{const{prefixCls:Ge,className:Dt,rootClassName:Tt,active:ot,block:et,size:Te="default"}=ut,{getPrefixCls:xe}=ze.useContext(wt.E_),Se=xe("skeleton",Ge),[Be,_e]=Ie(Se),Ee=(0,Ze.Z)(ut,["prefixCls"]),ft=De()(Se,`${Se}-element`,{[`${Se}-active`]:ot,[`${Se}-block`]:et},Dt,Tt,_e);return Be(ze.createElement("div",{className:ft},ze.createElement(Me,Object.assign({prefixCls:`${Se}-input`,size:Te},Ee))))},Bt=ve(72308),Gt={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"},Ut=Gt,lt=ve(7657),$e=function(Ge,Dt){return ze.createElement(lt.Z,(0,Bt.Z)({},Ge,{ref:Dt,icon:Ut}))},Nt=ze.forwardRef($e),cn=Nt,Ft=ut=>{const{prefixCls:Ge,className:Dt,rootClassName:Tt,style:ot,active:et,children:Te}=ut,{getPrefixCls:xe}=ze.useContext(wt.E_),Se=xe("skeleton",Ge),[Be,_e]=Ie(Se),Ee=De()(Se,`${Se}-element`,{[`${Se}-active`]:et},_e,Dt,Tt),ft=Te!=null?Te:ze.createElement(cn,null);return Be(ze.createElement("div",{className:Ee},ze.createElement("div",{className:De()(`${Se}-image`,Dt),style:ot},ft)))},$t=ve(80702),Nn=ut=>{const Ge=xe=>{const{width:Se,rows:Be=2}=ut;if(Array.isArray(Se))return Se[xe];if(Be-1===xe)return Se},{prefixCls:Dt,className:Tt,style:ot,rows:et}=ut,Te=(0,$t.Z)(Array(et)).map((xe,Se)=>ze.createElement("li",{key:Se,style:{width:Ge(Se)}}));return ze.createElement("ul",{className:De()(Dt,Tt),style:ot},Te)},Mn=ut=>{let{prefixCls:Ge,className:Dt,width:Tt,style:ot}=ut;return ze.createElement("h3",{className:De()(Ge,Dt),style:Object.assign({width:Tt},ot)})};function pt(ut){return ut&&typeof ut=="object"?ut:{}}function Ln(ut,Ge){return ut&&!Ge?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Un(ut,Ge){return!ut&&Ge?{width:"38%"}:ut&&Ge?{width:"50%"}:{}}function Zt(ut,Ge){const Dt={};return(!ut||!Ge)&&(Dt.width="61%"),!ut&&Ge?Dt.rows=3:Dt.rows=2,Dt}const tn=ut=>{const{prefixCls:Ge,loading:Dt,className:Tt,rootClassName:ot,style:et,children:Te,avatar:xe=!1,title:Se=!0,paragraph:Be=!0,active:_e,round:Ee}=ut,{getPrefixCls:ft,direction:Xt,skeleton:an}=ze.useContext(wt.E_),Qt=ft("skeleton",Ge),[En,Yn]=Ie(Qt);if(Dt||!("loading"in ut)){const zn=!!xe,Dn=!!Se,ii=!!Be;let gi;if(zn){const Yi=Object.assign(Object.assign({prefixCls:`${Qt}-avatar`},Ln(Dn,ii)),pt(xe));gi=ze.createElement("div",{className:`${Qt}-header`},ze.createElement(Me,Object.assign({},Yi)))}let pi;if(Dn||ii){let Yi;if(Dn){const Wn=Object.assign(Object.assign({prefixCls:`${Qt}-title`},Un(zn,ii)),pt(Se));Yi=ze.createElement(Mn,Object.assign({},Wn))}let Jn;if(ii){const Wn=Object.assign(Object.assign({prefixCls:`${Qt}-paragraph`},Zt(zn,Dn)),pt(Be));Jn=ze.createElement(Nn,Object.assign({},Wn))}pi=ze.createElement("div",{className:`${Qt}-content`},Yi,Jn)}const Ii=De()(Qt,{[`${Qt}-with-avatar`]:zn,[`${Qt}-active`]:_e,[`${Qt}-rtl`]:Xt==="rtl",[`${Qt}-round`]:Ee},an==null?void 0:an.className,Tt,ot,Yn);return En(ze.createElement("div",{className:Ii,style:Object.assign(Object.assign({},an==null?void 0:an.style),et)},gi,pi))}return typeof Te!="undefined"?Te:null};tn.Button=gt,tn.Avatar=Je,tn.Input=kt,tn.Image=qe,tn.Node=Ft;var Rt=tn,Lt=Rt},81327:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return he}});var ce=ve(59301),De=ve(92310),ze=ve.n(De),wt=ve(11592),Ze=ve(36355),ht=ve(33234);const Me=ce.createContext({latestIndex:0}),yt=Me.Provider;var He=se=>{let{className:de,index:me,children:we,split:Ne,style:Fe}=se;const{latestIndex:Ie}=ce.useContext(Me);return we==null?null:ce.createElement(ce.Fragment,null,ce.createElement("div",{className:de,style:Fe},we),me<Ie&&Ne&&ce.createElement("span",{className:`${de}-split`},Ne))},st=ve(2856);function mt(se){return["small","middle","large"].includes(se)}function dt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Ae=function(se,de){var me={};for(var we in se)Object.prototype.hasOwnProperty.call(se,we)&&de.indexOf(we)<0&&(me[we]=se[we]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,we=Object.getOwnPropertySymbols(se);Ne<we.length;Ne++)de.indexOf(we[Ne])<0&&Object.prototype.propertyIsEnumerable.call(se,we[Ne])&&(me[we[Ne]]=se[we[Ne]]);return me};const ee=ce.forwardRef((se,de)=>{var me,we;const{getPrefixCls:Ne,space:Fe,direction:Ie}=ce.useContext(Ze.E_),{size:je=(Fe==null?void 0:Fe.size)||"small",align:Je,className:Ke,rootClassName:gt,children:Re,direction:At="horizontal",prefixCls:qe,split:Et,style:kt,wrap:Bt=!1,classNames:Gt,styles:Ut}=se,lt=Ae(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$e,Nt]=Array.isArray(je)?je:[je,je],cn=mt(Nt),sn=mt($e),Ft=dt(Nt),$t=dt($e),en=(0,wt.Z)(Re,{keepEmpty:!0}),Nn=Je===void 0&&At==="horizontal"?"center":Je,fn=Ne("space",qe),[Mn,pt]=(0,st.Z)(fn),Ln=ze()(fn,Fe==null?void 0:Fe.className,pt,`${fn}-${At}`,{[`${fn}-rtl`]:Ie==="rtl",[`${fn}-align-${Nn}`]:Nn,[`${fn}-gap-row-${Nt}`]:cn,[`${fn}-gap-col-${$e}`]:sn},Ke,gt),Un=ze()(`${fn}-item`,(me=Gt==null?void 0:Gt.item)!==null&&me!==void 0?me:(we=Fe==null?void 0:Fe.classNames)===null||we===void 0?void 0:we.item);let Zt=0;const tn=en.map((ut,Ge)=>{var Dt,Tt;ut!=null&&(Zt=Ge);const ot=ut&&ut.key||`${Un}-${Ge}`;return ce.createElement(He,{className:Un,key:ot,index:Ge,split:Et,style:(Dt=Ut==null?void 0:Ut.item)!==null&&Dt!==void 0?Dt:(Tt=Fe==null?void 0:Fe.styles)===null||Tt===void 0?void 0:Tt.item},ut)}),Rt=ce.useMemo(()=>({latestIndex:Zt}),[Zt]);if(en.length===0)return null;const Lt={};return Bt&&(Lt.flexWrap="wrap"),!sn&&$t&&(Lt.columnGap=$e),!cn&&Ft&&(Lt.rowGap=Nt),Mn(ce.createElement("div",Object.assign({ref:de,className:Ln,style:Object.assign(Object.assign(Object.assign({},Lt),Fe==null?void 0:Fe.style),kt)},lt),ce.createElement(yt,{value:Rt},tn)))});ee.Compact=ht.ZP;var he=ee},31797:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return Ie}});var ce=ve(59301),De=ve(56762),ze=ve(92343),wt=ve(92310),Ze=ve.n(wt),ht=ve(36355),Me=ve(61621),ct=je=>{const{value:Je,formatter:Ke,precision:gt,decimalSeparator:Re,groupSeparator:At="",prefixCls:qe}=je;let Et;if(typeof Ke=="function")Et=Ke(Je);else{const kt=String(Je),Bt=kt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Bt||kt==="-")Et=kt;else{const Gt=Bt[1];let Ut=Bt[2]||"0",lt=Bt[4]||"";Ut=Ut.replace(/\B(?=(\d{3})+(?!\d))/g,At),typeof gt=="number"&&(lt=lt.padEnd(gt,"0").slice(0,gt>0?gt:0)),lt&&(lt=`${Re}${lt}`),Et=[ce.createElement("span",{key:"int",className:`${qe}-content-value-int`},Gt,Ut),lt&&ce.createElement("span",{key:"decimal",className:`${qe}-content-value-decimal`},lt)]}}return ce.createElement("span",{className:`${qe}-content-value`},Et)},He=ve(17313),st=ve(83116),mt=ve(37613);const dt=je=>{const{componentCls:Je,marginXXS:Ke,padding:gt,colorTextDescription:Re,titleFontSize:At,colorTextHeading:qe,contentFontSize:Et,fontFamily:kt}=je;return{[`${Je}`]:Object.assign(Object.assign({},(0,He.Wf)(je)),{[`${Je}-title`]:{marginBottom:Ke,color:Re,fontSize:At},[`${Je}-skeleton`]:{paddingTop:gt},[`${Je}-content`]:{color:qe,fontSize:Et,fontFamily:kt,[`${Je}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Je}-content-prefix, ${Je}-content-suffix`]:{display:"inline-block"},[`${Je}-content-prefix`]:{marginInlineEnd:Ke},[`${Je}-content-suffix`]:{marginInlineStart:Ke}}})}};var Ae=(0,st.Z)("Statistic",je=>{const Je=(0,mt.TS)(je,{});return[dt(Je)]},je=>{const{fontSizeHeading3:Je,fontSize:Ke}=je;return{titleFontSize:Ke,contentFontSize:Je}}),ee=je=>{const{prefixCls:Je,className:Ke,rootClassName:gt,style:Re,valueStyle:At,value:qe=0,title:Et,valueRender:kt,prefix:Bt,suffix:Gt,loading:Ut=!1,onMouseEnter:lt,onMouseLeave:$e,decimalSeparator:Nt=".",groupSeparator:cn=","}=je,{getPrefixCls:sn,direction:Ft,statistic:$t}=ce.useContext(ht.E_),en=sn("statistic",Je),[Nn,fn]=Ae(en),Mn=ce.createElement(ct,Object.assign({decimalSeparator:Nt,groupSeparator:cn,prefixCls:en},je,{value:qe})),pt=Ze()(en,{[`${en}-rtl`]:Ft==="rtl"},$t==null?void 0:$t.className,Ke,gt,fn);return Nn(ce.createElement("div",{className:pt,style:Object.assign(Object.assign({},$t==null?void 0:$t.style),Re),onMouseEnter:lt,onMouseLeave:$e},Et&&ce.createElement("div",{className:`${en}-title`},Et),ce.createElement(Me.Z,{paragraph:!1,loading:Ut,className:`${en}-skeleton`},ce.createElement("div",{style:At,className:`${en}-content`},Bt&&ce.createElement("span",{className:`${en}-content-prefix`},Bt),kt?kt(Mn):Mn,Gt&&ce.createElement("span",{className:`${en}-content-suffix`},Gt)))))};const he=[["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 se(je,Je){let Ke=je;const gt=/\[[^\]]*]/g,Re=(Je.match(gt)||[]).map(kt=>kt.slice(1,-1)),At=Je.replace(gt,"[]"),qe=he.reduce((kt,Bt)=>{let[Gt,Ut]=Bt;if(kt.includes(Gt)){const lt=Math.floor(Ke/Ut);return Ke-=lt*Ut,kt.replace(new RegExp(`${Gt}+`,"g"),$e=>{const Nt=$e.length;return lt.toString().padStart(Nt,"0")})}return kt},At);let Et=0;return qe.replace(gt,()=>{const kt=Re[Et];return Et+=1,kt})}function de(je,Je){const{format:Ke=""}=Je,gt=new Date(je).getTime(),Re=Date.now(),At=Math.max(gt-Re,0);return se(At,Ke)}const me=1e3/30;function we(je){return new Date(je).getTime()}const Ne=je=>{const{value:Je,format:Ke="HH:mm:ss",onChange:gt,onFinish:Re}=je,At=(0,De.Z)(),qe=ce.useRef(null),Et=()=>{Re==null||Re(),qe.current&&(clearInterval(qe.current),qe.current=null)},kt=()=>{const Ut=we(Je);Ut>=Date.now()&&(qe.current=setInterval(()=>{At(),gt==null||gt(Ut-Date.now()),Ut<Date.now()&&Et()},me))};ce.useEffect(()=>(kt(),()=>{qe.current&&(clearInterval(qe.current),qe.current=null)}),[Je]);const Bt=(Ut,lt)=>de(Ut,Object.assign(Object.assign({},lt),{format:Ke})),Gt=Ut=>(0,ze.Tm)(Ut,{title:void 0});return ce.createElement(ee,Object.assign({},je,{valueRender:Gt,formatter:Bt}))};var Fe=ce.memo(Ne);ee.Countdown=Fe;var Ie=ee},15969:function(Cn,un,ve){"use strict";ve.d(un,{N:function(){return ce}});const ce=De=>({color:De.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${De.motionDurationSlow}`,"&:focus, &:hover":{color:De.colorLinkHover},"&:active":{color:De.colorLinkActive}})},78673:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return At}});var ce=ve(58617),De=ve(92310),ze=ve.n(De),wt=ve(72308),Ze=ve(49618),ht=ve(52487),Me=ve(74416),yt=ve(59301),ct=ve(18929),He=ve(10228),st=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],mt=yt.forwardRef(function(qe,Et){var kt,Bt=qe.prefixCls,Gt=Bt===void 0?"rc-switch":Bt,Ut=qe.className,lt=qe.checked,$e=qe.defaultChecked,Nt=qe.disabled,cn=qe.loadingIcon,sn=qe.checkedChildren,Ft=qe.unCheckedChildren,$t=qe.onClick,en=qe.onChange,Nn=qe.onKeyDown,fn=(0,Me.Z)(qe,st),Mn=(0,ct.Z)(!1,{value:lt,defaultValue:$e}),pt=(0,ht.Z)(Mn,2),Ln=pt[0],Un=pt[1];function Zt(ut,Ge){var Dt=Ln;return Nt||(Dt=ut,Un(Dt),en==null||en(Dt,Ge)),Dt}function tn(ut){ut.which===He.Z.LEFT?Zt(!1,ut):ut.which===He.Z.RIGHT&&Zt(!0,ut),Nn==null||Nn(ut)}function Rt(ut){var Ge=Zt(!Ln,ut);$t==null||$t(Ge,ut)}var Lt=ze()(Gt,Ut,(kt={},(0,Ze.Z)(kt,"".concat(Gt,"-checked"),Ln),(0,Ze.Z)(kt,"".concat(Gt,"-disabled"),Nt),kt));return yt.createElement("button",(0,wt.Z)({},fn,{type:"button",role:"switch","aria-checked":Ln,disabled:Nt,className:Lt,ref:Et,onKeyDown:tn,onClick:Rt}),cn,yt.createElement("span",{className:"".concat(Gt,"-inner")},yt.createElement("span",{className:"".concat(Gt,"-inner-checked")},sn),yt.createElement("span",{className:"".concat(Gt,"-inner-unchecked")},Ft)))});mt.displayName="Switch";var dt=mt,Ae=ve(14088),te=ve(36355),ee=ve(1684),he=ve(19716),se=ve(64993),de=ve(17313),me=ve(83116),we=ve(37613);const Ne=qe=>{const{componentCls:Et,trackHeightSM:kt,trackPadding:Bt,trackMinWidthSM:Gt,innerMinMarginSM:Ut,innerMaxMarginSM:lt,handleSizeSM:$e}=qe,Nt=`${Et}-inner`;return{[Et]:{[`&${Et}-small`]:{minWidth:Gt,height:kt,lineHeight:`${kt}px`,[`${Et}-inner`]:{paddingInlineStart:lt,paddingInlineEnd:Ut,[`${Nt}-checked`]:{marginInlineStart:`calc(-100% + ${$e+Bt*2}px - ${lt*2}px)`,marginInlineEnd:`calc(100% - ${$e+Bt*2}px + ${lt*2}px)`},[`${Nt}-unchecked`]:{marginTop:-kt,marginInlineStart:0,marginInlineEnd:0}},[`${Et}-handle`]:{width:$e,height:$e},[`${Et}-loading-icon`]:{top:($e-qe.switchLoadingIconSize)/2,fontSize:qe.switchLoadingIconSize},[`&${Et}-checked`]:{[`${Et}-inner`]:{paddingInlineStart:Ut,paddingInlineEnd:lt,[`${Nt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Nt}-unchecked`]:{marginInlineStart:`calc(100% - ${$e+Bt*2}px + ${lt*2}px)`,marginInlineEnd:`calc(-100% + ${$e+Bt*2}px - ${lt*2}px)`}},[`${Et}-handle`]:{insetInlineStart:`calc(100% - ${$e+Bt}px)`}},[`&:not(${Et}-disabled):active`]:{[`&:not(${Et}-checked) ${Nt}`]:{[`${Nt}-unchecked`]:{marginInlineStart:qe.marginXXS/2,marginInlineEnd:-qe.marginXXS/2}},[`&${Et}-checked ${Nt}`]:{[`${Nt}-checked`]:{marginInlineStart:-qe.marginXXS/2,marginInlineEnd:qe.marginXXS/2}}}}}}},Fe=qe=>{const{componentCls:Et,handleSize:kt}=qe;return{[Et]:{[`${Et}-loading-icon${qe.iconCls}`]:{position:"relative",top:(kt-qe.fontSize)/2,color:qe.switchLoadingIconColor,verticalAlign:"top"},[`&${Et}-checked ${Et}-loading-icon`]:{color:qe.switchColor}}}},Ie=qe=>{const{componentCls:Et,motion:kt,trackPadding:Bt,handleBg:Gt,handleShadow:Ut,handleSize:lt}=qe,$e=`${Et}-handle`;return{[Et]:{[$e]:{position:"absolute",top:Bt,insetInlineStart:Bt,width:lt,height:lt,transition:`all ${qe.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Gt,borderRadius:lt/2,boxShadow:Ut,transition:`all ${qe.switchDuration} ease-in-out`,content:'""'}},[`&${Et}-checked ${$e}`]:{insetInlineStart:`calc(100% - ${lt+Bt}px)`},[`&:not(${Et}-disabled):active`]:kt?{[`${$e}::before`]:{insetInlineEnd:qe.switchHandleActiveInset,insetInlineStart:0},[`&${Et}-checked ${$e}::before`]:{insetInlineEnd:0,insetInlineStart:qe.switchHandleActiveInset}}:{}}}},je=qe=>{const{componentCls:Et,trackHeight:kt,trackPadding:Bt,innerMinMargin:Gt,innerMaxMargin:Ut,handleSize:lt}=qe,$e=`${Et}-inner`;return{[Et]:{[$e]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ut,paddingInlineEnd:Gt,transition:`padding-inline-start ${qe.switchDuration} ease-in-out, padding-inline-end ${qe.switchDuration} ease-in-out`,[`${$e}-checked, ${$e}-unchecked`]:{display:"block",color:qe.colorTextLightSolid,fontSize:qe.fontSizeSM,transition:`margin-inline-start ${qe.switchDuration} ease-in-out, margin-inline-end ${qe.switchDuration} ease-in-out`,pointerEvents:"none"},[`${$e}-checked`]:{marginInlineStart:`calc(-100% + ${lt+Bt*2}px - ${Ut*2}px)`,marginInlineEnd:`calc(100% - ${lt+Bt*2}px + ${Ut*2}px)`},[`${$e}-unchecked`]:{marginTop:-kt,marginInlineStart:0,marginInlineEnd:0}},[`&${Et}-checked ${$e}`]:{paddingInlineStart:Gt,paddingInlineEnd:Ut,[`${$e}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${$e}-unchecked`]:{marginInlineStart:`calc(100% - ${lt+Bt*2}px + ${Ut*2}px)`,marginInlineEnd:`calc(-100% + ${lt+Bt*2}px - ${Ut*2}px)`}},[`&:not(${Et}-disabled):active`]:{[`&:not(${Et}-checked) ${$e}`]:{[`${$e}-unchecked`]:{marginInlineStart:Bt*2,marginInlineEnd:-Bt*2}},[`&${Et}-checked ${$e}`]:{[`${$e}-checked`]:{marginInlineStart:-Bt*2,marginInlineEnd:Bt*2}}}}}},Je=qe=>{const{componentCls:Et,trackHeight:kt,trackMinWidth:Bt}=qe;return{[Et]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,de.Wf)(qe)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Bt,height:kt,lineHeight:`${kt}px`,verticalAlign:"middle",background:qe.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${qe.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Et}-disabled)`]:{background:qe.colorTextTertiary}}),(0,de.Qy)(qe)),{[`&${Et}-checked`]:{background:qe.switchColor,[`&:hover:not(${Et}-disabled)`]:{background:qe.colorPrimaryHover}},[`&${Et}-loading, &${Et}-disabled`]:{cursor:"not-allowed",opacity:qe.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Et}-rtl`]:{direction:"rtl"}})}};var Ke=(0,me.Z)("Switch",qe=>{const Et=(0,we.TS)(qe,{switchDuration:qe.motionDurationMid,switchColor:qe.colorPrimary,switchDisabledOpacity:qe.opacityLoading,switchLoadingIconSize:qe.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${qe.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Je(Et),je(Et),Ie(Et),Fe(Et),Ne(Et)]},qe=>{const{fontSize:Et,lineHeight:kt,controlHeight:Bt,colorWhite:Gt}=qe,Ut=Et*kt,lt=Bt/2,$e=2,Nt=Ut-$e*2,cn=lt-$e*2;return{trackHeight:Ut,trackHeightSM:lt,trackMinWidth:Nt*2+$e*4,trackMinWidthSM:cn*2+$e*2,trackPadding:$e,handleBg:Gt,handleSize:Nt,handleSizeSM:cn,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Nt/2,innerMaxMargin:Nt+$e+$e*2,innerMinMarginSM:cn/2,innerMaxMarginSM:cn+$e+$e*2}}),gt=function(qe,Et){var kt={};for(var Bt in qe)Object.prototype.hasOwnProperty.call(qe,Bt)&&Et.indexOf(Bt)<0&&(kt[Bt]=qe[Bt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Bt=Object.getOwnPropertySymbols(qe);Gt<Bt.length;Gt++)Et.indexOf(Bt[Gt])<0&&Object.prototype.propertyIsEnumerable.call(qe,Bt[Gt])&&(kt[Bt[Gt]]=qe[Bt[Gt]]);return kt};const Re=yt.forwardRef((qe,Et)=>{const{prefixCls:kt,size:Bt,disabled:Gt,loading:Ut,className:lt,rootClassName:$e,style:Nt}=qe,cn=gt(qe,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:sn,direction:Ft,switch:$t}=yt.useContext(te.E_),en=yt.useContext(ee.Z),Nn=(Gt!=null?Gt:en)||Ut,fn=sn("switch",kt),Mn=yt.createElement("div",{className:`${fn}-handle`},Ut&&yt.createElement(ce.Z,{className:`${fn}-loading-icon`})),[pt,Ln]=Ke(fn),Un=(0,he.Z)(Bt),Zt=ze()($t==null?void 0:$t.className,{[`${fn}-small`]:Un==="small",[`${fn}-loading`]:Ut,[`${fn}-rtl`]:Ft==="rtl"},lt,$e,Ln),tn=Object.assign(Object.assign({},$t==null?void 0:$t.style),Nt);return pt(yt.createElement(Ae.Z,{component:"Switch"},yt.createElement(dt,Object.assign({},cn,{prefixCls:fn,className:Zt,style:tn,disabled:Nn,ref:Et,loadingIcon:Mn}))))});Re.__ANT_SWITCH=!0;var At=Re},1710:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return Jo}});var ce={},De="rc-table-internal-hook",ze=ve(52487),wt=ve(6089),Ze=ve(34280),ht=ve(13697),Me=ve(59301),yt=ve(4676);function ct(Xe){var Ue=Me.createContext(void 0),zt=function(on){var Wt=on.value,Fn=on.children,wn=Me.useRef(Wt);wn.current=Wt;var kn=Me.useState(function(){return{getValue:function(){return wn.current},listeners:new Set}}),ni=(0,ze.Z)(kn,1),Tn=ni[0];return(0,Ze.Z)(function(){(0,yt.unstable_batchedUpdates)(function(){Tn.listeners.forEach(function(ei){ei(Wt)})})},[Wt]),Me.createElement(Ue.Provider,{value:Tn},Fn)};return{Context:Ue,Provider:zt,defaultValue:Xe}}function He(Xe,Ue){var zt=(0,wt.Z)(typeof Ue=="function"?Ue:function(ei){if(Ue===void 0)return ei;if(!Array.isArray(Ue))return ei[Ue];var ki={};return Ue.forEach(function(Ci){ki[Ci]=ei[Ci]}),ki}),_t=Me.useContext(Xe==null?void 0:Xe.Context),on=_t||{},Wt=on.listeners,Fn=on.getValue,wn=Me.useRef();wn.current=zt(_t?Fn():Xe==null?void 0:Xe.defaultValue);var kn=Me.useState({}),ni=(0,ze.Z)(kn,2),Tn=ni[1];return(0,Ze.Z)(function(){if(!_t)return;function ei(ki){var Ci=zt(ki);(0,ht.Z)(wn.current,Ci,!0)||Tn({})}return Wt.add(ei),function(){Wt.delete(ei)}},[_t]),wn.current}var st=ve(72308),mt=ve(8654);function dt(){var Xe=Me.createContext(null);function Ue(){return Me.useContext(Xe)}function zt(on,Wt){var Fn=(0,mt.Yr)(on),wn=function(ni,Tn){var ei=Fn?{ref:Tn}:{},ki=Me.useRef(0),Ci=Me.useRef(ni),xi=Ue();return xi!==null?Me.createElement(on,(0,st.Z)({},ni,ei)):((!Wt||Wt(Ci.current,ni))&&(ki.current+=1),Ci.current=ni,Me.createElement(Xe.Provider,{value:ki.current},Me.createElement(on,(0,st.Z)({},ni,ei))))};return Fn?Me.forwardRef(wn):wn}function _t(on,Wt){var Fn=(0,mt.Yr)(on),wn=function(ni,Tn){var ei=Fn?{ref:Tn}:{};return Ue(),Me.createElement(on,(0,st.Z)({},ni,ei))};return Fn?Me.memo(Me.forwardRef(wn),Wt):Me.memo(wn,Wt)}return{makeImmutable:zt,responseImmutable:_t,useImmutableMark:Ue}}var Ae=dt(),te=Ae.makeImmutable,ee=Ae.responseImmutable,he=Ae.useImmutableMark,se=dt(),de=se.makeImmutable,me=se.responseImmutable,we=se.useImmutableMark,Ne=ct(),Fe=Ne;function Ie(Xe,Ue){var zt=Me.useRef(0);zt.current+=1;var _t=Me.useRef(Xe),on=[];Object.keys(Xe||{}).map(function(Fn){var wn;(Xe==null?void 0:Xe[Fn])!==((wn=_t.current)===null||wn===void 0?void 0:wn[Fn])&&on.push(Fn)}),_t.current=Xe;var Wt=Me.useRef([]);return on.length&&(Wt.current=on),Me.useDebugValue(zt.current),Me.useDebugValue(Wt.current.join(", ")),Ue&&console.log("".concat(Ue,":"),zt.current,Wt.current),zt.current}var je=null,Je=Me.memo(function(){var Xe=Ie();return Me.createElement("h1",null,"Render Times: ",Xe)});Je.displayName="RenderBlock";var Ke=ve(62853),gt=ve(77321),Re=ve(49618),At=ve(92310),qe=ve.n(At),Et=ve(80547),kt=ve(97938),Bt=ve(48736),Gt=Me.createContext({renderWithProps:!1}),Ut=Gt,lt="RC_TABLE_KEY";function $e(Xe){return Xe==null?[]:Array.isArray(Xe)?Xe:[Xe]}function Nt(Xe){var Ue=[],zt={};return Xe.forEach(function(_t){for(var on=_t||{},Wt=on.key,Fn=on.dataIndex,wn=Wt||$e(Fn).join("-")||lt;zt[wn];)wn="".concat(wn,"_next");zt[wn]=!0,Ue.push(wn)}),Ue}function cn(Xe){return Xe!=null}function sn(Xe){return Xe&&(0,Ke.Z)(Xe)==="object"&&!Array.isArray(Xe)&&!Me.isValidElement(Xe)}function Ft(Xe,Ue,zt,_t,on,Wt){var Fn=Me.useContext(Ut),wn=we(),kn=(0,Et.Z)(function(){if(cn(_t))return[_t];var ni=Ue==null||Ue===""?[]:Array.isArray(Ue)?Ue:[Ue],Tn=(0,kt.Z)(Xe,ni),ei=Tn,ki=void 0;if(on){var Ci=on(Tn,Xe,zt);sn(Ci)?(ei=Ci.children,ki=Ci.props,Fn.renderWithProps=!0):ei=Ci}return[ei,ki]},[wn,Xe,_t,Ue,on,zt],function(ni,Tn){if(Wt){var ei=(0,ze.Z)(ni,2),ki=ei[1],Ci=(0,ze.Z)(Tn,2),xi=Ci[1];return Wt(xi,ki)}return Fn.renderWithProps?!0:!(0,ht.Z)(ni,Tn,!0)});return kn}function $t(Xe,Ue,zt,_t){var on=Xe+Ue-1;return Xe<=_t&&on>=zt}function en(Xe,Ue){return He(Fe,function(zt){var _t=$t(Xe,Ue||1,zt.hoverStartRow,zt.hoverEndRow);return[_t,zt.onHover]})}var Nn=function(Ue){var zt=Ue.ellipsis,_t=Ue.rowType,on=Ue.children,Wt,Fn=zt===!0?{showTitle:!0}:zt;return Fn&&(Fn.showTitle||_t==="header")&&(typeof on=="string"||typeof on=="number"?Wt=on.toString():Me.isValidElement(on)&&typeof on.props.children=="string"&&(Wt=on.props.children)),Wt};function fn(Xe){var Ue,zt,_t,on,Wt,Fn,wn,kn,ni=Xe.component,Tn=Xe.children,ei=Xe.ellipsis,ki=Xe.scope,Ci=Xe.prefixCls,xi=Xe.className,rr=Xe.align,Mi=Xe.record,Vi=Xe.render,Ui=Xe.dataIndex,Pr=Xe.renderIndex,Xr=Xe.shouldCellUpdate,so=Xe.index,fr=Xe.rowType,Ur=Xe.colSpan,zo=Xe.rowSpan,xr=Xe.fixLeft,Hr=Xe.fixRight,Sr=Xe.firstFixLeft,$i=Xe.lastFixLeft,Fr=Xe.firstFixRight,no=Xe.lastFixRight,xo=Xe.appendNode,Eo=Xe.additionalProps,gr=Eo===void 0?{}:Eo,Ho=Xe.isSticky,Vo="".concat(Ci,"-cell"),wa=He(Fe,["supportSticky","allColumnsFixedLeft"]),sa=wa.supportSticky,os=wa.allColumnsFixedLeft,ts=Ft(Mi,Ui,Pr,Tn,Vi,Xr),$o=(0,ze.Z)(ts,2),oo=$o[0],pa=$o[1],as={},Va=typeof xr=="number"&&sa,Ms=typeof Hr=="number"&&sa;Va&&(as.position="sticky",as.left=xr),Ms&&(as.position="sticky",as.right=Hr);var bo=(Ue=(zt=(_t=pa==null?void 0:pa.colSpan)!==null&&_t!==void 0?_t:gr.colSpan)!==null&&zt!==void 0?zt:Ur)!==null&&Ue!==void 0?Ue:1,mo=(on=(Wt=(Fn=pa==null?void 0:pa.rowSpan)!==null&&Fn!==void 0?Fn:gr.rowSpan)!==null&&Wt!==void 0?Wt:zo)!==null&&on!==void 0?on:1,Mo=en(so,mo),qr=(0,ze.Z)(Mo,2),ya=qr[0],eo=qr[1],_o=function(ws){var Rs;Mi&&eo(so,so+mo-1),gr==null||(Rs=gr.onMouseEnter)===null||Rs===void 0||Rs.call(gr,ws)},ha=function(ws){var Rs;Mi&&eo(-1,-1),gr==null||(Rs=gr.onMouseLeave)===null||Rs===void 0||Rs.call(gr,ws)};if(bo===0||mo===0)return null;var ca=(wn=gr.title)!==null&&wn!==void 0?wn:Nn({rowType:fr,ellipsis:ei,children:oo}),Vs=qe()(Vo,xi,(kn={},(0,Re.Z)(kn,"".concat(Vo,"-fix-left"),Va&&sa),(0,Re.Z)(kn,"".concat(Vo,"-fix-left-first"),Sr&&sa),(0,Re.Z)(kn,"".concat(Vo,"-fix-left-last"),$i&&sa),(0,Re.Z)(kn,"".concat(Vo,"-fix-left-all"),$i&&os&&sa),(0,Re.Z)(kn,"".concat(Vo,"-fix-right"),Ms&&sa),(0,Re.Z)(kn,"".concat(Vo,"-fix-right-first"),Fr&&sa),(0,Re.Z)(kn,"".concat(Vo,"-fix-right-last"),no&&sa),(0,Re.Z)(kn,"".concat(Vo,"-ellipsis"),ei),(0,Re.Z)(kn,"".concat(Vo,"-with-append"),xo),(0,Re.Z)(kn,"".concat(Vo,"-fix-sticky"),(Va||Ms)&&Ho&&sa),(0,Re.Z)(kn,"".concat(Vo,"-row-hover"),!pa&&ya),kn),gr.className,pa==null?void 0:pa.className),Bs={};rr&&(Bs.textAlign=rr);var hl=(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},as),gr.style),Bs),pa==null?void 0:pa.style),Ca=oo;return(0,Ke.Z)(Ca)==="object"&&!Array.isArray(Ca)&&!Me.isValidElement(Ca)&&(Ca=null),ei&&($i||Fr)&&(Ca=Me.createElement("span",{className:"".concat(Vo,"-content")},Ca)),Me.createElement(ni,(0,st.Z)({},pa,gr,{className:Vs,style:hl,title:ca,scope:ki,onMouseEnter:_o,onMouseLeave:ha,colSpan:bo!==1?bo:null,rowSpan:mo!==1?mo:null}),xo,Ca)}var Mn=Me.memo(fn);function pt(Xe,Ue,zt,_t,on,Wt){var Fn=zt[Xe]||{},wn=zt[Ue]||{},kn,ni;Fn.fixed==="left"?kn=_t.left[on==="rtl"?Ue:Xe]:wn.fixed==="right"&&(ni=_t.right[on==="rtl"?Xe:Ue]);var Tn=!1,ei=!1,ki=!1,Ci=!1,xi=zt[Ue+1],rr=zt[Xe-1],Mi=!(Wt!=null&&Wt.children);if(on==="rtl"){if(kn!==void 0){var Vi=rr&&rr.fixed==="left";Ci=!Vi&&Mi}else if(ni!==void 0){var Ui=xi&&xi.fixed==="right";ki=!Ui&&Mi}}else if(kn!==void 0){var Pr=xi&&xi.fixed==="left";Tn=!Pr&&Mi}else if(ni!==void 0){var Xr=rr&&rr.fixed==="right";ei=!Xr&&Mi}return{fixLeft:kn,fixRight:ni,lastFixLeft:Tn,firstFixRight:ei,lastFixRight:ki,firstFixLeft:Ci,isSticky:_t.isSticky}}var Ln=Me.createContext({}),Un=Ln;function Zt(Xe){var Ue=Xe.className,zt=Xe.index,_t=Xe.children,on=Xe.colSpan,Wt=on===void 0?1:on,Fn=Xe.rowSpan,wn=Xe.align,kn=He(Fe,["prefixCls","direction"]),ni=kn.prefixCls,Tn=kn.direction,ei=Me.useContext(Un),ki=ei.scrollColumnIndex,Ci=ei.stickyOffsets,xi=ei.flattenColumns,rr=ei.columns,Mi=zt+Wt-1,Vi=Mi+1===ki?Wt+1:Wt,Ui=pt(zt,zt+Vi-1,xi,Ci,Tn,rr==null?void 0:rr[zt]);return Me.createElement(Mn,(0,st.Z)({className:Ue,index:zt,component:"td",prefixCls:ni,record:null,dataIndex:null,align:wn,colSpan:Vi,rowSpan:Fn,render:function(){return _t}},Ui))}var tn=ve(74416),Rt=["children"];function Lt(Xe){var Ue=Xe.children,zt=(0,tn.Z)(Xe,Rt);return Me.createElement("tr",zt,Ue)}function ut(Xe){var Ue=Xe.children;return Ue}ut.Row=Lt,ut.Cell=Zt;var Ge=ut;function Dt(Xe){var Ue=Xe.children,zt=Xe.stickyOffsets,_t=Xe.flattenColumns,on=Xe.columns,Wt=He(Fe,"prefixCls"),Fn=_t.length-1,wn=_t[Fn],kn=Me.useMemo(function(){return{stickyOffsets:zt,flattenColumns:_t,scrollColumnIndex:wn!=null&&wn.scrollbar?Fn:null,columns:on}},[wn,_t,Fn,zt,on]);return Me.createElement(Un.Provider,{value:kn},Me.createElement("tfoot",{className:"".concat(Wt,"-summary")},Ue))}var Tt=me(Dt),ot=Ge,et=ve(70425),Te=ve(29301),xe=ve(29194),Se=ve(24514),Be=ve(75152),_e=ve(26112);function Ee(Xe,Ue,zt,_t,on,Wt,Fn){Xe.push({record:Ue,indent:zt,index:Fn});var wn=Wt(Ue),kn=on==null?void 0:on.has(wn);if(Ue&&Array.isArray(Ue[_t])&&kn)for(var ni=0;ni<Ue[_t].length;ni+=1)Ee(Xe,Ue[_t][ni],zt+1,_t,on,Wt,ni)}function ft(Xe,Ue,zt,_t){var on=Me.useMemo(function(){if(zt!=null&&zt.size){for(var Wt=[],Fn=0;Fn<(Xe==null?void 0:Xe.length);Fn+=1){var wn=Xe[Fn];Ee(Wt,wn,0,Ue,zt,_t,Fn)}return Wt}return Xe==null?void 0:Xe.map(function(kn,ni){return{record:kn,indent:0,index:ni}})},[Xe,Ue,zt,_t]);return on}function Xt(Xe){var Ue=Xe.prefixCls,zt=Xe.children,_t=Xe.component,on=Xe.cellComponent,Wt=Xe.className,Fn=Xe.expanded,wn=Xe.colSpan,kn=Xe.isEmpty,ni=He(Fe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Tn=ni.scrollbarSize,ei=ni.fixHeader,ki=ni.fixColumn,Ci=ni.componentWidth,xi=ni.horizonScroll,rr=zt;return(kn?xi&&Ci:ki)&&(rr=Me.createElement("div",{style:{width:Ci-(ei?Tn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ue,"-expanded-row-fixed")},rr)),Me.createElement(_t,{className:Wt,style:{display:Fn?null:"none"}},Me.createElement(Mn,{component:on,prefixCls:Ue,colSpan:wn},rr))}var an=Xt;function Qt(Xe,Ue,zt,_t){var on=He(Fe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Wt=on.flattenColumns,Fn=on.expandableType,wn=on.expandedKeys,kn=on.childrenColumnName,ni=on.onTriggerExpand,Tn=on.rowExpandable,ei=on.onRow,ki=on.expandRowByClick,Ci=on.rowClassName,xi=Fn==="nest",rr=Fn==="row"&&(!Tn||Tn(Xe)),Mi=rr||xi,Vi=wn&&wn.has(Ue),Ui=kn&&Xe&&Xe[kn],Pr=(0,et.useEvent)(ni),Xr=ei==null?void 0:ei(Xe,zt),so=Xr==null?void 0:Xr.onClick,fr=function(Hr){ki&&Mi&&ni(Xe,Hr);for(var Sr=arguments.length,$i=new Array(Sr>1?Sr-1:0),Fr=1;Fr<Sr;Fr++)$i[Fr-1]=arguments[Fr];so==null||so.apply(void 0,[Hr].concat($i))},Ur;typeof Ci=="string"?Ur=Ci:typeof Ci=="function"&&(Ur=Ci(Xe,zt,_t));var zo=Nt(Wt);return(0,gt.Z)((0,gt.Z)({},on),{},{columnsKey:zo,nestExpandable:xi,expanded:Vi,hasNestChildren:Ui,record:Xe,onTriggerExpand:Pr,rowSupportExpand:rr,expandable:Mi,rowProps:(0,gt.Z)((0,gt.Z)({},Xr),{},{className:qe()(Ur,Xr==null?void 0:Xr.className),onClick:fr})})}function En(Xe,Ue,zt,_t,on){var Wt=Xe.record,Fn=Xe.prefixCls,wn=Xe.columnsKey,kn=Xe.fixedInfoList,ni=Xe.expandIconColumnIndex,Tn=Xe.nestExpandable,ei=Xe.indentSize,ki=Xe.expandIcon,Ci=Xe.expanded,xi=Xe.hasNestChildren,rr=Xe.onTriggerExpand,Mi=wn[zt],Vi=kn[zt],Ui;zt===(ni||0)&&Tn&&(Ui=Me.createElement(Me.Fragment,null,Me.createElement("span",{style:{paddingLeft:"".concat(ei*_t,"px")},className:"".concat(Fn,"-row-indent indent-level-").concat(_t)}),ki({prefixCls:Fn,expanded:Ci,expandable:xi,record:Wt,onExpand:rr})));var Pr;return Ue.onCell&&(Pr=Ue.onCell(Wt,on)),{key:Mi,fixedInfo:Vi,appendCellNode:Ui,additionalCellProps:Pr||{}}}function Yn(Xe){var Ue=Xe.className,zt=Xe.style,_t=Xe.record,on=Xe.index,Wt=Xe.renderIndex,Fn=Xe.rowKey,wn=Xe.indent,kn=wn===void 0?0:wn,ni=Xe.rowComponent,Tn=Xe.cellComponent,ei=Xe.scopeCellComponent,ki=Qt(_t,Fn,on,kn),Ci=ki.prefixCls,xi=ki.flattenColumns,rr=ki.expandedRowClassName,Mi=ki.expandedRowRender,Vi=ki.rowProps,Ui=ki.expanded,Pr=ki.rowSupportExpand,Xr=Me.useState(!1),so=(0,ze.Z)(Xr,2),fr=so[0],Ur=so[1];Me.useEffect(function(){Ui&&Ur(!0)},[Ui]);var zo=Me.createElement(ni,(0,st.Z)({},Vi,{"data-row-key":Fn,className:qe()(Ue,"".concat(Ci,"-row"),"".concat(Ci,"-row-level-").concat(kn),Vi==null?void 0:Vi.className),style:(0,gt.Z)((0,gt.Z)({},zt),Vi==null?void 0:Vi.style)}),xi.map(function($i,Fr){var no=$i.render,xo=$i.dataIndex,Eo=$i.className,gr=En(ki,$i,Fr,kn,on),Ho=gr.key,Vo=gr.fixedInfo,wa=gr.appendCellNode,sa=gr.additionalCellProps;return Me.createElement(Mn,(0,st.Z)({className:Eo,ellipsis:$i.ellipsis,align:$i.align,scope:$i.rowScope,component:$i.rowScope?ei:Tn,prefixCls:Ci,key:Ho,record:_t,index:on,renderIndex:Wt,dataIndex:xo,render:no,shouldCellUpdate:$i.shouldCellUpdate},Vo,{appendNode:wa,additionalProps:sa}))})),xr;if(Pr&&(fr||Ui)){var Hr=Mi(_t,on,kn+1,Ui),Sr=rr&&rr(_t,on,kn);xr=Me.createElement(an,{expanded:Ui,className:qe()("".concat(Ci,"-expanded-row"),"".concat(Ci,"-expanded-row-level-").concat(kn+1),Sr),prefixCls:Ci,component:ni,cellComponent:Tn,colSpan:xi.length,isEmpty:!1},Hr)}return Me.createElement(Me.Fragment,null,zo,xr)}Yn.displayName="BodyRow";var zn=me(Yn);function Dn(Xe){var Ue=Xe.columnKey,zt=Xe.onColumnResize,_t=Me.useRef();return Me.useEffect(function(){_t.current&&zt(Ue,_t.current.offsetWidth)},[]),Me.createElement(Te.Z,{data:Ue},Me.createElement("td",{ref:_t,style:{padding:0,border:0,height:0}},Me.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ii(Xe){var Ue=Xe.prefixCls,zt=Xe.columnsKey,_t=Xe.onColumnResize;return Me.createElement("tr",{"aria-hidden":"true",className:"".concat(Ue,"-measure-row"),style:{height:0,fontSize:0}},Me.createElement(Te.Z.Collection,{onBatchResize:function(Wt){Wt.forEach(function(Fn){var wn=Fn.data,kn=Fn.size;_t(wn,kn.offsetWidth)})}},zt.map(function(on){return Me.createElement(Dn,{key:on,columnKey:on,onColumnResize:_t})})))}function gi(Xe){var Ue=Xe.data,zt=Xe.measureColumnWidth,_t=He(Fe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),on=_t.prefixCls,Wt=_t.getComponent,Fn=_t.onColumnResize,wn=_t.flattenColumns,kn=_t.getRowKey,ni=_t.expandedKeys,Tn=_t.childrenColumnName,ei=_t.emptyNode,ki=ft(Ue,Tn,ni,kn),Ci=Me.useRef({renderWithProps:!1}),xi=Wt(["body","wrapper"],"tbody"),rr=Wt(["body","row"],"tr"),Mi=Wt(["body","cell"],"td"),Vi=Wt(["body","cell"],"th"),Ui;Ue.length?Ui=ki.map(function(Xr,so){var fr=Xr.record,Ur=Xr.indent,zo=Xr.index,xr=kn(fr,so);return Me.createElement(zn,{key:xr,rowKey:xr,record:fr,index:so,renderIndex:zo,rowComponent:rr,cellComponent:Mi,scopeCellComponent:Vi,getRowKey:kn,indent:Ur})}):Ui=Me.createElement(an,{expanded:!0,className:"".concat(on,"-placeholder"),prefixCls:on,component:rr,cellComponent:Mi,colSpan:wn.length,isEmpty:!0},ei);var Pr=Nt(wn);return Me.createElement(Ut.Provider,{value:Ci.current},Me.createElement(xi,{className:"".concat(on,"-tbody")},zt&&Me.createElement(ii,{prefixCls:on,columnsKey:Pr,onColumnResize:Fn}),Ui))}gi.displayName="Body";var pi=me(gi),Ii=["expandable"],Yi="RC_TABLE_INTERNAL_COL_DEFINE";function Jn(Xe){var Ue=Xe.expandable,zt=(0,tn.Z)(Xe,Ii),_t;return"expandable"in Xe?_t=(0,gt.Z)((0,gt.Z)({},zt),Ue):_t=zt,_t.showExpandColumn===!1&&(_t.expandIconColumnIndex=-1),_t}var Wn=["columnType"];function ti(Xe){for(var Ue=Xe.colWidths,zt=Xe.columns,_t=Xe.columCount,on=[],Wt=_t||zt.length,Fn=!1,wn=Wt-1;wn>=0;wn-=1){var kn=Ue[wn],ni=zt&&zt[wn],Tn=ni&&ni[Yi];if(kn||Tn||Fn){var ei=Tn||{},ki=ei.columnType,Ci=(0,tn.Z)(ei,Wn);on.unshift(Me.createElement("col",(0,st.Z)({key:wn,style:{width:kn}},Ci))),Fn=!0}}return Me.createElement("colgroup",null,on)}var yi=ti,mi=ve(80702),dr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function mr(Xe,Ue){return(0,Me.useMemo)(function(){for(var zt=[],_t=0;_t<Ue;_t+=1){var on=Xe[_t];if(on!==void 0)zt[_t]=on;else return null}return zt},[Xe.join("_"),Ue])}var be=Me.forwardRef(function(Xe,Ue){var zt=Xe.className,_t=Xe.noData,on=Xe.columns,Wt=Xe.flattenColumns,Fn=Xe.colWidths,wn=Xe.columCount,kn=Xe.stickyOffsets,ni=Xe.direction,Tn=Xe.fixHeader,ei=Xe.stickyTopOffset,ki=Xe.stickyBottomOffset,Ci=Xe.stickyClassName,xi=Xe.onScroll,rr=Xe.maxContentScroll,Mi=Xe.children,Vi=(0,tn.Z)(Xe,dr),Ui=He(Fe,["prefixCls","scrollbarSize","isSticky"]),Pr=Ui.prefixCls,Xr=Ui.scrollbarSize,so=Ui.isSticky,fr=so&&!Tn?0:Xr,Ur=Me.useRef(null),zo=Me.useCallback(function(Eo){(0,mt.mH)(Ue,Eo),(0,mt.mH)(Ur,Eo)},[]);Me.useEffect(function(){var Eo;function gr(Ho){var Vo=Ho,wa=Vo.currentTarget,sa=Vo.deltaX;sa&&(xi({currentTarget:wa,scrollLeft:wa.scrollLeft+sa}),Ho.preventDefault())}return(Eo=Ur.current)===null||Eo===void 0||Eo.addEventListener("wheel",gr),function(){var Ho;(Ho=Ur.current)===null||Ho===void 0||Ho.removeEventListener("wheel",gr)}},[]);var xr=Me.useMemo(function(){return Wt.every(function(Eo){return Eo.width})},[Wt]),Hr=Wt[Wt.length-1],Sr={fixed:Hr?Hr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Pr,"-cell-scrollbar")}}},$i=(0,Me.useMemo)(function(){return fr?[].concat((0,mi.Z)(on),[Sr]):on},[fr,on]),Fr=(0,Me.useMemo)(function(){return fr?[].concat((0,mi.Z)(Wt),[Sr]):Wt},[fr,Wt]),no=(0,Me.useMemo)(function(){var Eo=kn.right,gr=kn.left;return(0,gt.Z)((0,gt.Z)({},kn),{},{left:ni==="rtl"?[].concat((0,mi.Z)(gr.map(function(Ho){return Ho+fr})),[0]):gr,right:ni==="rtl"?Eo:[].concat((0,mi.Z)(Eo.map(function(Ho){return Ho+fr})),[0]),isSticky:so})},[fr,kn,so]),xo=mr(Fn,wn);return Me.createElement("div",{style:(0,gt.Z)({overflow:"hidden"},so?{top:ei,bottom:ki}:{}),ref:zo,className:qe()(zt,(0,Re.Z)({},Ci,!!Ci))},Me.createElement("table",{style:{tableLayout:"fixed",visibility:_t||xo?null:"hidden"}},(!_t||!rr||xr)&&Me.createElement(yi,{colWidths:xo?[].concat((0,mi.Z)(xo),[fr]):[],columCount:wn+1,columns:Fr}),Mi((0,gt.Z)((0,gt.Z)({},Vi),{},{stickyOffsets:no,columns:$i,flattenColumns:Fr}))))});be.displayName="FixedHolder";var ci=Me.memo(be);function Hi(Xe){var Ue=Xe.cells,zt=Xe.stickyOffsets,_t=Xe.flattenColumns,on=Xe.rowComponent,Wt=Xe.cellComponent,Fn=Xe.tdCellComponent,wn=Xe.onHeaderRow,kn=Xe.index,ni=He(Fe,["prefixCls","direction"]),Tn=ni.prefixCls,ei=ni.direction,ki;wn&&(ki=wn(Ue.map(function(xi){return xi.column}),kn));var Ci=Nt(Ue.map(function(xi){return xi.column}));return Me.createElement(on,ki,Ue.map(function(xi,rr){var Mi=xi.column,Vi=pt(xi.colStart,xi.colEnd,_t,zt,ei,Mi),Ui;return Mi&&Mi.onHeaderCell&&(Ui=xi.column.onHeaderCell(Mi)),Me.createElement(Mn,(0,st.Z)({},xi,{scope:Mi.title?xi.colSpan>1?"colgroup":"col":null,ellipsis:Mi.ellipsis,align:Mi.align,component:Mi.title?Wt:Fn,prefixCls:Tn,key:Ci[rr]},Vi,{additionalProps:Ui,rowType:"header"}))}))}Hi.displayName="HeaderRow";var dn=Hi;function oi(Xe){var Ue=[];function zt(Fn,wn){var kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ue[kn]=Ue[kn]||[];var ni=wn,Tn=Fn.filter(Boolean).map(function(ei){var ki={key:ei.key,className:ei.className||"",children:ei.title,column:ei,colStart:ni},Ci=1,xi=ei.children;return xi&&xi.length>0&&(Ci=zt(xi,ni,kn+1).reduce(function(rr,Mi){return rr+Mi},0),ki.hasSubColumns=!0),"colSpan"in ei&&(Ci=ei.colSpan),"rowSpan"in ei&&(ki.rowSpan=ei.rowSpan),ki.colSpan=Ci,ki.colEnd=ki.colStart+Ci-1,Ue[kn].push(ki),ni+=Ci,Ci});return Tn}zt(Xe,0);for(var _t=Ue.length,on=function(wn){Ue[wn].forEach(function(kn){!("rowSpan"in kn)&&!kn.hasSubColumns&&(kn.rowSpan=_t-wn)})},Wt=0;Wt<_t;Wt+=1)on(Wt);return Ue}function vi(Xe){var Ue=Xe.stickyOffsets,zt=Xe.columns,_t=Xe.flattenColumns,on=Xe.onHeaderRow,Wt=He(Fe,["prefixCls","getComponent"]),Fn=Wt.prefixCls,wn=Wt.getComponent,kn=Me.useMemo(function(){return oi(zt)},[zt]),ni=wn(["header","wrapper"],"thead"),Tn=wn(["header","row"],"tr"),ei=wn(["header","cell"],"th"),ki=wn(["header","cell"],"td");return Me.createElement(ni,{className:"".concat(Fn,"-thead")},kn.map(function(Ci,xi){var rr=Me.createElement(dn,{key:xi,flattenColumns:_t,cells:Ci,stickyOffsets:Ue,rowComponent:Tn,cellComponent:ei,tdCellComponent:ki,onHeaderRow:on,index:xi});return rr}))}var Fi=me(vi),Vn=ve(11592);function bn(Xe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ue=="number"?Ue:Ue.endsWith("%")?Xe*parseFloat(Ue)/100:null}function Mt(Xe,Ue){return Me.useMemo(function(){if(Ue&&Ue>0){var zt=0,_t=0;Xe.forEach(function(ni){var Tn=bn(Ue,ni.width);Tn?zt+=Tn:_t+=1});var on=Ue-zt,Wt=_t,Fn=on/_t,wn=0,kn=Xe.map(function(ni){var Tn=(0,gt.Z)({},ni),ei=bn(Ue,Tn.width);if(ei)Tn.width=ei;else{var ki=Math.floor(Fn);Tn.width=Wt===1?on:ki,on-=ki,Wt-=1}return wn+=Tn.width,Tn});return[kn,wn]}return[Xe,Ue]},[Xe,Ue])}var Ot=["children"],Ve=["fixed"];function Yt(Xe){return(0,Vn.Z)(Xe).filter(function(Ue){return Me.isValidElement(Ue)}).map(function(Ue){var zt=Ue.key,_t=Ue.props,on=_t.children,Wt=(0,tn.Z)(_t,Ot),Fn=(0,gt.Z)({key:zt},Wt);return on&&(Fn.children=Yt(on)),Fn})}function qt(Xe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Xe.filter(function(zt){return zt&&(0,Ke.Z)(zt)==="object"}).reduce(function(zt,_t,on){var Wt=_t.fixed,Fn=Wt===!0?"left":Wt,wn="".concat(Ue,"-").concat(on),kn=_t.children;return kn&&kn.length>0?[].concat((0,mi.Z)(zt),(0,mi.Z)(qt(kn,wn).map(function(ni){return(0,gt.Z)({fixed:Fn},ni)}))):[].concat((0,mi.Z)(zt),[(0,gt.Z)((0,gt.Z)({key:wn},_t),{},{fixed:Fn})])},[])}function xt(Xe){for(var Ue=!0,zt=0;zt<Xe.length;zt+=1){var _t=Xe[zt];if(Ue&&_t.fixed!=="left")Ue=!1;else if(!Ue&&_t.fixed==="left"){warning(!1,"Index ".concat(zt-1," of `columns` missing `fixed='left'` prop."));break}}for(var on=!0,Wt=Xe.length-1;Wt>=0;Wt-=1){var Fn=Xe[Wt];if(on&&Fn.fixed!=="right")on=!1;else if(!on&&Fn.fixed==="right"){warning(!1,"Index ".concat(Wt+1," of `columns` missing `fixed='right'` prop."));break}}}function nt(Xe){return Xe.map(function(Ue){var zt=Ue.fixed,_t=(0,tn.Z)(Ue,Ve),on=zt;return zt==="left"?on="right":zt==="right"&&(on="left"),(0,gt.Z)({fixed:on},_t)})}function Kt(Xe,Ue){var zt=Xe.prefixCls,_t=Xe.columns,on=Xe.children,Wt=Xe.expandable,Fn=Xe.expandedKeys,wn=Xe.columnTitle,kn=Xe.getRowKey,ni=Xe.onTriggerExpand,Tn=Xe.expandIcon,ei=Xe.rowExpandable,ki=Xe.expandIconColumnIndex,Ci=Xe.direction,xi=Xe.expandRowByClick,rr=Xe.columnWidth,Mi=Xe.fixed,Vi=Xe.scrollWidth,Ui=Me.useMemo(function(){return _t||Yt(on)},[_t,on]),Pr=Me.useMemo(function(){if(Wt){var Hr,Sr=Ui.slice();if(!Sr.includes(ce)){var $i=ki||0;$i>=0&&Sr.splice($i,0,ce)}var Fr=Sr.indexOf(ce);Sr=Sr.filter(function(gr,Ho){return gr!==ce||Ho===Fr});var no=Ui[Fr],xo;(Mi==="left"||Mi)&&!ki?xo="left":(Mi==="right"||Mi)&&ki===Ui.length?xo="right":xo=no?no.fixed:null;var Eo=(Hr={},(0,Re.Z)(Hr,Yi,{className:"".concat(zt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Re.Z)(Hr,"title",wn),(0,Re.Z)(Hr,"fixed",xo),(0,Re.Z)(Hr,"className","".concat(zt,"-row-expand-icon-cell")),(0,Re.Z)(Hr,"width",rr),(0,Re.Z)(Hr,"render",function(Ho,Vo,wa){var sa=kn(Vo,wa),os=Fn.has(sa),ts=ei?ei(Vo):!0,$o=Tn({prefixCls:zt,expanded:os,expandable:ts,record:Vo,onExpand:ni});return xi?Me.createElement("span",{onClick:function(pa){return pa.stopPropagation()}},$o):$o}),Hr);return Sr.map(function(gr){return gr===ce?Eo:gr})}return Ui.filter(function(gr){return gr!==ce})},[Wt,Ui,kn,Fn,Tn,Ci]),Xr=Me.useMemo(function(){var Hr=Pr;return Ue&&(Hr=Ue(Hr)),Hr.length||(Hr=[{render:function(){return null}}]),Hr},[Ue,Pr,Ci]),so=Me.useMemo(function(){return Ci==="rtl"?nt(qt(Xr)):qt(Xr)},[Xr,Ci,Vi]),fr=Mt(so,Vi),Ur=(0,ze.Z)(fr,2),zo=Ur[0],xr=Ur[1];return[Xr,zo,xr]}var ln=Kt;function xn(Xe){var Ue,zt=Xe.prefixCls,_t=Xe.record,on=Xe.onExpand,Wt=Xe.expanded,Fn=Xe.expandable,wn="".concat(zt,"-row-expand-icon");if(!Fn)return Me.createElement("span",{className:qe()(wn,"".concat(zt,"-row-spaced"))});var kn=function(Tn){on(_t,Tn),Tn.stopPropagation()};return Me.createElement("span",{className:qe()(wn,(Ue={},(0,Re.Z)(Ue,"".concat(zt,"-row-expanded"),Wt),(0,Re.Z)(Ue,"".concat(zt,"-row-collapsed"),!Wt),Ue)),onClick:kn})}function On(Xe,Ue,zt){var _t=[];function on(Wt){(Wt||[]).forEach(function(Fn,wn){_t.push(Ue(Fn,wn)),on(Fn[zt])})}return on(Xe),_t}function St(Xe,Ue,zt){var _t=Jn(Xe),on=_t.expandIcon,Wt=_t.expandedRowKeys,Fn=_t.defaultExpandedRowKeys,wn=_t.defaultExpandAllRows,kn=_t.expandedRowRender,ni=_t.onExpand,Tn=_t.onExpandedRowsChange,ei=_t.childrenColumnName,ki=on||xn,Ci=ei||"children",xi=Me.useMemo(function(){return kn?"row":Xe.expandable&&Xe.internalHooks===De&&Xe.expandable.__PARENT_RENDER_ICON__||Ue.some(function(so){return so&&(0,Ke.Z)(so)==="object"&&so[Ci]})?"nest":!1},[!!kn,Ue]),rr=Me.useState(function(){return Fn||(wn?On(Ue,zt,Ci):[])}),Mi=(0,ze.Z)(rr,2),Vi=Mi[0],Ui=Mi[1],Pr=Me.useMemo(function(){return new Set(Wt||Vi||[])},[Wt,Vi]),Xr=Me.useCallback(function(so){var fr=zt(so,Ue.indexOf(so)),Ur,zo=Pr.has(fr);zo?(Pr.delete(fr),Ur=(0,mi.Z)(Pr)):Ur=[].concat((0,mi.Z)(Pr),[fr]),Ui(Ur),ni&&ni(!zo,so),Tn&&Tn(Ur)},[zt,Pr,Ue,ni,Tn]);return[_t,xi,Pr,ki,Ci,Xr]}function gn(Xe,Ue,zt,_t){var on=Xe.map(function(Wt,Fn){return pt(Fn,Fn,Xe,Ue,zt,_t==null?void 0:_t[Fn])});return(0,Et.Z)(function(){return on},[on],function(Wt,Fn){return!(0,ht.Z)(Wt,Fn)})}function Rn(Xe){var Ue=(0,Me.useRef)(Xe),zt=(0,Me.useState)({}),_t=(0,ze.Z)(zt,2),on=_t[1],Wt=(0,Me.useRef)(null),Fn=(0,Me.useRef)([]);function wn(kn){Fn.current.push(kn);var ni=Promise.resolve();Wt.current=ni,ni.then(function(){if(Wt.current===ni){var Tn=Fn.current,ei=Ue.current;Fn.current=[],Tn.forEach(function(ki){Ue.current=ki(Ue.current)}),Wt.current=null,ei!==Ue.current&&on({})}})}return(0,Me.useEffect)(function(){return function(){Wt.current=null}},[]),[Ue.current,wn]}function ai(Xe){var Ue=(0,Me.useRef)(Xe||null),zt=(0,Me.useRef)();function _t(){window.clearTimeout(zt.current)}function on(Fn){Ue.current=Fn,_t(),zt.current=window.setTimeout(function(){Ue.current=null,zt.current=void 0},100)}function Wt(){return Ue.current}return(0,Me.useEffect)(function(){return _t},[]),[on,Wt]}function hn(){var Xe=Me.useState(-1),Ue=(0,ze.Z)(Xe,2),zt=Ue[0],_t=Ue[1],on=Me.useState(-1),Wt=(0,ze.Z)(on,2),Fn=Wt[0],wn=Wt[1],kn=Me.useCallback(function(ni,Tn){_t(ni),wn(Tn)},[]);return[zt,Fn,kn]}var Jt=ve(47273),Xn=(0,Jt.Z)()?window:null;function si(Xe,Ue){var zt=(0,Ke.Z)(Xe)==="object"?Xe:{},_t=zt.offsetHeader,on=_t===void 0?0:_t,Wt=zt.offsetSummary,Fn=Wt===void 0?0:Wt,wn=zt.offsetScroll,kn=wn===void 0?0:wn,ni=zt.getContainer,Tn=ni===void 0?function(){return Xn}:ni,ei=Tn()||Xn;return Me.useMemo(function(){var ki=!!Xe;return{isSticky:ki,stickyClassName:ki?"".concat(Ue,"-sticky-holder"):"",offsetHeader:on,offsetSummary:Fn,offsetScroll:kn,container:ei}},[kn,on,Fn,Ue,ei])}function ui(Xe,Ue,zt){var _t=(0,Me.useMemo)(function(){for(var on=[],Wt=[],Fn=0,wn=0,kn=0;kn<Ue;kn+=1)if(zt==="rtl"){Wt[kn]=wn,wn+=Xe[kn]||0;var ni=Ue-kn-1;on[ni]=Fn,Fn+=Xe[ni]||0}else{on[kn]=Fn,Fn+=Xe[kn]||0;var Tn=Ue-kn-1;Wt[Tn]=wn,wn+=Xe[Tn]||0}return{left:on,right:Wt}},[Xe,Ue,zt]);return _t}var Qn=ui;function di(Xe){var Ue=Xe.className,zt=Xe.children;return Me.createElement("div",{className:Ue},zt)}var hi=di,Ri=ve(8224),Xi=ve(55468),tr=function(Ue,zt){var _t,on,Wt=Ue.scrollBodyRef,Fn=Ue.onScroll,wn=Ue.offsetScroll,kn=Ue.container,ni=He(Fe,"prefixCls"),Tn=((_t=Wt.current)===null||_t===void 0?void 0:_t.scrollWidth)||0,ei=((on=Wt.current)===null||on===void 0?void 0:on.clientWidth)||0,ki=Tn&&ei*(ei/Tn),Ci=Me.useRef(),xi=Rn({scrollLeft:0,isHiddenScrollBar:!1}),rr=(0,ze.Z)(xi,2),Mi=rr[0],Vi=rr[1],Ui=Me.useRef({delta:0,x:0}),Pr=Me.useState(!1),Xr=(0,ze.Z)(Pr,2),so=Xr[0],fr=Xr[1],Ur=function(){fr(!1)},zo=function(Fr){Fr.persist(),Ui.current.delta=Fr.pageX-Mi.scrollLeft,Ui.current.x=0,fr(!0),Fr.preventDefault()},xr=function(Fr){var no,xo=Fr||((no=window)===null||no===void 0?void 0:no.event),Eo=xo.buttons;if(!so||Eo===0){so&&fr(!1);return}var gr=Ui.current.x+Fr.pageX-Ui.current.x-Ui.current.delta;gr<=0&&(gr=0),gr+ki>=ei&&(gr=ei-ki),Fn({scrollLeft:gr/ei*(Tn+2)}),Ui.current.x=Fr.pageX},Hr=function(){if(Wt.current){var Fr=(0,Xi.os)(Wt.current).top,no=Fr+Wt.current.offsetHeight,xo=kn===window?document.documentElement.scrollTop+window.innerHeight:(0,Xi.os)(kn).top+kn.clientHeight;no-(0,Be.Z)()<=xo||Fr>=xo-wn?Vi(function(Eo){return(0,gt.Z)((0,gt.Z)({},Eo),{},{isHiddenScrollBar:!0})}):Vi(function(Eo){return(0,gt.Z)((0,gt.Z)({},Eo),{},{isHiddenScrollBar:!1})})}},Sr=function(Fr){Vi(function(no){return(0,gt.Z)((0,gt.Z)({},no),{},{scrollLeft:Fr/Tn*ei||0})})};return Me.useImperativeHandle(zt,function(){return{setScrollLeft:Sr}}),Me.useEffect(function(){var $i=(0,Ri.Z)(document.body,"mouseup",Ur,!1),Fr=(0,Ri.Z)(document.body,"mousemove",xr,!1);return Hr(),function(){$i.remove(),Fr.remove()}},[ki,so]),Me.useEffect(function(){var $i=(0,Ri.Z)(kn,"scroll",Hr,!1),Fr=(0,Ri.Z)(window,"resize",Hr,!1);return function(){$i.remove(),Fr.remove()}},[kn]),Me.useEffect(function(){Mi.isHiddenScrollBar||Vi(function($i){var Fr=Wt.current;return Fr?(0,gt.Z)((0,gt.Z)({},$i),{},{scrollLeft:Fr.scrollLeft/Fr.scrollWidth*Fr.clientWidth}):$i})},[Mi.isHiddenScrollBar]),Tn<=ei||!ki||Mi.isHiddenScrollBar?null:Me.createElement("div",{style:{height:(0,Be.Z)(),width:ei,bottom:wn},className:"".concat(ni,"-sticky-scroll")},Me.createElement("div",{onMouseDown:zo,ref:Ci,className:qe()("".concat(ni,"-sticky-scroll-bar"),(0,Re.Z)({},"".concat(ni,"-sticky-scroll-bar-active"),so)),style:{width:"".concat(ki,"px"),transform:"translate3d(".concat(Mi.scrollLeft,"px, 0, 0)")}}))},yn=Me.forwardRef(tr);function Br(Xe){return null}var br=Br;function Wr(Xe){return null}var mn=Wr,_n="rc-table",Si=[],zi={};function Ni(){return"No Data"}function ji(Xe){var Ue,zt=(0,gt.Z)({rowKey:"key",prefixCls:_n,emptyText:Ni},Xe),_t=zt.prefixCls,on=zt.className,Wt=zt.rowClassName,Fn=zt.style,wn=zt.data,kn=zt.rowKey,ni=zt.scroll,Tn=zt.tableLayout,ei=zt.direction,ki=zt.title,Ci=zt.footer,xi=zt.summary,rr=zt.caption,Mi=zt.id,Vi=zt.showHeader,Ui=zt.components,Pr=zt.emptyText,Xr=zt.onRow,so=zt.onHeaderRow,fr=zt.internalHooks,Ur=zt.transformColumns,zo=zt.internalRefs,xr=zt.tailor,Hr=zt.sticky,Sr=wn||Si,$i=!!Sr.length,Fr=fr===De,no=Me.useCallback(function(ba,ns){return(0,kt.Z)(Ui,ba)||ns},[Ui]),xo=Me.useMemo(function(){return typeof kn=="function"?kn:function(ba){var ns=ba&&ba[kn];return ns}},[kn]),Eo=no(["body"]),gr=hn(),Ho=(0,ze.Z)(gr,3),Vo=Ho[0],wa=Ho[1],sa=Ho[2],os=St(zt,Sr,xo),ts=(0,ze.Z)(os,6),$o=ts[0],oo=ts[1],pa=ts[2],as=ts[3],Va=ts[4],Ms=ts[5],bo=ni==null?void 0:ni.x,mo=Me.useState(0),Mo=(0,ze.Z)(mo,2),qr=Mo[0],ya=Mo[1],eo=ln((0,gt.Z)((0,gt.Z)((0,gt.Z)({},zt),$o),{},{expandable:!!$o.expandedRowRender,columnTitle:$o.columnTitle,expandedKeys:pa,getRowKey:xo,onTriggerExpand:Ms,expandIcon:as,expandIconColumnIndex:$o.expandIconColumnIndex,direction:ei,scrollWidth:Fr&&xr&&typeof bo=="number"?bo:null}),Fr?Ur:null),_o=(0,ze.Z)(eo,3),ha=_o[0],ca=_o[1],Vs=_o[2],Bs=Vs!=null?Vs:bo,hl=Me.useMemo(function(){return{columns:ha,flattenColumns:ca}},[ha,ca]),Ca=Me.useRef(),Us=Me.useRef(),ws=Me.useRef(),Rs=Me.useRef(),fh=Me.useRef(),Ea=Me.useState(!1),Ta=(0,ze.Z)(Ea,2),ja=Ta[0],ms=Ta[1],js=Me.useState(!1),ra=(0,ze.Z)(js,2),Za=ra[0],zs=ra[1],jl=Rn(new Map),au=(0,ze.Z)(jl,2),Yl=au[0],wu=au[1],Cu=Nt(ca),su=Cu.map(function(ba){return Yl.get(ba)}),La=Me.useMemo(function(){return su},[su.join("_")]),Xs=Qn(La,ca.length,ei),fs=ni&&cn(ni.y),Ha=ni&&cn(Bs)||!!$o.fixed,lu=Ha&&ca.some(function(ba){var ns=ba.fixed;return ns}),kh=Me.useRef(),Eu=si(Hr,_t),th=Eu.isSticky,gh=Eu.offsetHeader,Xl=Eu.offsetSummary,Sa=Eu.offsetScroll,Ua=Eu.stickyClassName,ks=Eu.container,Ya=Me.useMemo(function(){return xi==null?void 0:xi(Sr)},[xi,Sr]),fa=(fs||th)&&Me.isValidElement(Ya)&&Ya.type===Ge&&Ya.props.fixed,_s,zl,Zu;fs&&(zl={overflowY:"scroll",maxHeight:ni.y}),Ha&&(_s={overflowX:"auto"},fs||(zl={overflowY:"hidden"}),Zu={width:Bs===!0?"auto":Bs,minWidth:"100%"});var pf=Me.useCallback(function(ba,ns){(0,xe.Z)(Ca.current)&&wu(function(il){if(il.get(ba)!==ns){var bu=new Map(il);return bu.set(ba,ns),bu}return il})},[]),nn=ai(null),$h=(0,ze.Z)(nn,2),ph=$h[0],mf=$h[1];function Bc(ba,ns){ns&&(typeof ns=="function"?ns(ba):ns.scrollLeft!==ba&&(ns.scrollLeft=ba,ns.scrollLeft!==ba&&setTimeout(function(){ns.scrollLeft=ba},0)))}var cc=(0,wt.Z)(function(ba){var ns=ba.currentTarget,il=ba.scrollLeft,bu=ei==="rtl",Mu=typeof il=="number"?il:ns.scrollLeft,Wd=ns||zi;if(!mf()||mf()===Wd){var Uh;ph(Wd),Bc(Mu,Us.current),Bc(Mu,ws.current),Bc(Mu,fh.current),Bc(Mu,(Uh=kh.current)===null||Uh===void 0?void 0:Uh.setScrollLeft)}var ld=ns||Us.current;if(ld){var Hu=ld.scrollWidth,Ah=ld.clientWidth;if(Hu===Ah){ms(!1),zs(!1);return}bu?(ms(-Mu<Hu-Ah),zs(-Mu>0)):(ms(Mu>0),zs(Mu<Hu-Ah))}}),Id=function(){Ha&&ws.current?cc({currentTarget:ws.current}):(ms(!1),zs(!1))},$g=function(ns){var il=ns.width;il!==qr&&(Id(),ya(Ca.current?Ca.current.offsetWidth:il))},Js=Me.useRef(!1);Me.useEffect(function(){Js.current&&Id()},[Ha,wn,ha.length]),Me.useEffect(function(){Js.current=!0},[]);var ad=Me.useState(0),Rd=(0,ze.Z)(ad,2),sd=Rd[0],vf=Rd[1],Uf=Me.useState(!0),yf=(0,ze.Z)(Uf,2),jd=yf[0],uu=yf[1];Me.useEffect(function(){(!xr||!Fr)&&(ws.current instanceof Element?vf((0,Be.o)(ws.current).width):vf((0,Be.o)(Rs.current).width)),uu((0,Se.G)("position","sticky"))},[]),Me.useEffect(function(){Fr&&zo&&(zo.body.current=ws.current)});var kc=Me.useCallback(function(ba){return Me.createElement(Me.Fragment,null,Me.createElement(Fi,ba),fa==="top"&&Me.createElement(Tt,ba,Ya))},[fa,Ya]),Sf=Me.useCallback(function(ba){return Me.createElement(Tt,ba,Ya)},[Ya]),nh=no(["table"],"table"),Kh=Me.useMemo(function(){return Tn||(lu?Bs==="max-content"?"auto":"fixed":fs||th||ca.some(function(ba){var ns=ba.ellipsis;return ns})?"fixed":"auto")},[fs,lu,ca,Tn,th]),Ac,dc={colWidths:La,columCount:ca.length,stickyOffsets:Xs,onHeaderRow:so,fixHeader:fs,scroll:ni},_l=Me.useMemo(function(){return $i?null:typeof Pr=="function"?Pr():Pr},[$i,Pr]),zd=Me.createElement(pi,{data:Sr,measureColumnWidth:fs||Ha||th}),_d=Me.createElement(yi,{colWidths:ca.map(function(ba){var ns=ba.width;return ns}),columns:ca}),hu=rr!=null?Me.createElement("caption",{className:"".concat(_t,"-caption")},rr):void 0,Tc=(0,_e.Z)(zt,{data:!0}),Zd=(0,_e.Z)(zt,{aria:!0});if(fs||th){var Hd;typeof Eo=="function"?(Hd=Eo(Sr,{scrollbarSize:sd,ref:ws,onScroll:cc}),dc.colWidths=ca.map(function(ba,ns){var il=ba.width,bu=ns===ca.length-1?il-sd:il;return typeof bu=="number"&&!Number.isNaN(bu)?bu:0})):Hd=Me.createElement("div",{style:(0,gt.Z)((0,gt.Z)({},_s),zl),onScroll:cc,ref:ws,className:qe()("".concat(_t,"-body"))},Me.createElement(nh,(0,st.Z)({style:(0,gt.Z)((0,gt.Z)({},Zu),{},{tableLayout:Kh})},Zd),hu,_d,zd,!fa&&Ya&&Me.createElement(Tt,{stickyOffsets:Xs,flattenColumns:ca,columns:ha},Ya)));var Vh=(0,gt.Z)((0,gt.Z)((0,gt.Z)({noData:!Sr.length,maxContentScroll:Ha&&Bs==="max-content"},dc),hl),{},{direction:ei,stickyClassName:Ua,onScroll:cc});Ac=Me.createElement(Me.Fragment,null,Vi!==!1&&Me.createElement(ci,(0,st.Z)({},Vh,{stickyTopOffset:gh,className:"".concat(_t,"-header"),ref:Us}),kc),Hd,fa&&fa!=="top"&&Me.createElement(ci,(0,st.Z)({},Vh,{stickyBottomOffset:Xl,className:"".concat(_t,"-summary"),ref:fh}),Sf),th&&Me.createElement(yn,{ref:kh,offsetScroll:Sa,scrollBodyRef:ws,onScroll:cc,container:ks}))}else Ac=Me.createElement("div",{style:(0,gt.Z)((0,gt.Z)({},_s),zl),className:qe()("".concat(_t,"-content")),onScroll:cc,ref:ws},Me.createElement(nh,(0,st.Z)({style:(0,gt.Z)((0,gt.Z)({},Zu),{},{tableLayout:Kh})},Zd),hu,_d,Vi!==!1&&Me.createElement(Fi,(0,st.Z)({},dc,hl)),zd,Ya&&Me.createElement(Tt,{stickyOffsets:Xs,flattenColumns:ca,columns:ha},Ya)));var Ll=Me.createElement("div",(0,st.Z)({className:qe()(_t,on,(Ue={},(0,Re.Z)(Ue,"".concat(_t,"-rtl"),ei==="rtl"),(0,Re.Z)(Ue,"".concat(_t,"-ping-left"),ja),(0,Re.Z)(Ue,"".concat(_t,"-ping-right"),Za),(0,Re.Z)(Ue,"".concat(_t,"-layout-fixed"),Tn==="fixed"),(0,Re.Z)(Ue,"".concat(_t,"-fixed-header"),fs),(0,Re.Z)(Ue,"".concat(_t,"-fixed-column"),lu),(0,Re.Z)(Ue,"".concat(_t,"-scroll-horizontal"),Ha),(0,Re.Z)(Ue,"".concat(_t,"-has-fix-left"),ca[0]&&ca[0].fixed),(0,Re.Z)(Ue,"".concat(_t,"-has-fix-right"),ca[ca.length-1]&&ca[ca.length-1].fixed==="right"),Ue)),style:Fn,id:Mi,ref:Ca},Tc),ki&&Me.createElement(hi,{className:"".concat(_t,"-title")},ki(Sr)),Me.createElement("div",{ref:Rs,className:"".concat(_t,"-container")},Ac),Ci&&Me.createElement(hi,{className:"".concat(_t,"-footer")},Ci(Sr)));Ha&&(Ll=Me.createElement(Te.Z,{onResize:$g},Ll));var Gd=gn(ca,Xs,ei,ha),As=Me.useMemo(function(){return{scrollX:Bs,prefixCls:_t,getComponent:no,scrollbarSize:sd,direction:ei,fixedInfoList:Gd,isSticky:th,supportSticky:jd,componentWidth:qr,fixHeader:fs,fixColumn:lu,horizonScroll:Ha,tableLayout:Kh,rowClassName:Wt,expandedRowClassName:$o.expandedRowClassName,expandIcon:as,expandableType:oo,expandRowByClick:$o.expandRowByClick,expandedRowRender:$o.expandedRowRender,onTriggerExpand:Ms,expandIconColumnIndex:$o.expandIconColumnIndex,indentSize:$o.indentSize,allColumnsFixedLeft:ca.every(function(ba){return ba.fixed==="left"}),emptyNode:_l,columns:ha,flattenColumns:ca,onColumnResize:pf,hoverStartRow:Vo,hoverEndRow:wa,onHover:sa,rowExpandable:$o.rowExpandable,onRow:Xr,getRowKey:xo,expandedKeys:pa,childrenColumnName:Va}},[Bs,_t,no,sd,ei,Gd,th,jd,qr,fs,lu,Ha,Kh,Wt,$o.expandedRowClassName,as,oo,$o.expandRowByClick,$o.expandedRowRender,Ms,$o.expandIconColumnIndex,$o.indentSize,_l,ha,ca,pf,Vo,wa,sa,$o.rowExpandable,Xr,xo,pa,Va]);return Me.createElement(Fe.Provider,{value:As},Ll)}function ar(Xe){return de(ji,Xe)}var Qi=ar();Qi.EXPAND_COLUMN=ce,Qi.INTERNAL_HOOKS=De,Qi.Column=br,Qi.ColumnGroup=mn,Qi.Summary=ot;var nr=Qi,hr=ve(45680),An=ct(null),Jr=ct(null);function Bn(Xe,Ue,zt){var _t=Ue||1;return zt[Xe+_t]-(zt[Xe]||0)}function _r(Xe){var Ue=Xe.rowInfo,zt=Xe.column,_t=Xe.colIndex,on=Xe.indent,Wt=Xe.index,Fn=Xe.renderIndex,wn=Xe.record,kn=Xe.style,ni=Xe.className,Tn=Xe.inverse,ei=Xe.getHeight,ki=zt.render,Ci=zt.dataIndex,xi=zt.className,rr=zt.width,Mi=He(Jr,["columnsOffset"]),Vi=Mi.columnsOffset,Ui=En(Ue,zt,_t,on,Wt),Pr=Ui.key,Xr=Ui.fixedInfo,so=Ui.appendCellNode,fr=Ui.additionalCellProps,Ur=fr.style,zo=fr.colSpan,xr=zo===void 0?1:zo,Hr=fr.rowSpan,Sr=Hr===void 0?1:Hr,$i=_t-1,Fr=Bn($i,xr,Vi),no=xr>1?rr-Fr:0,xo=(0,gt.Z)((0,gt.Z)((0,gt.Z)({},Ur),kn),{},{flex:"0 0 ".concat(Fr,"px"),width:"".concat(Fr,"px"),marginRight:no,pointerEvents:"auto"}),Eo=Me.useMemo(function(){return Tn?Sr<=1:xr===0||Sr===0||Sr>1},[Sr,xr,Tn]);Eo?xo.visibility="hidden":Tn&&(xo.height=ei==null?void 0:ei(Sr));var gr=Eo?function(){return null}:ki,Ho={};return(Sr===0||xr===0)&&(Ho.rowSpan=1,Ho.colSpan=1),Me.createElement(Mn,(0,st.Z)({className:qe()(xi,ni),ellipsis:zt.ellipsis,align:zt.align,scope:zt.rowScope,component:"div",prefixCls:Ue.prefixCls,key:Pr,record:wn,index:Wt,renderIndex:Fn,dataIndex:Ci,render:gr,shouldCellUpdate:zt.shouldCellUpdate},Xr,{appendNode:so,additionalProps:(0,gt.Z)((0,gt.Z)({},fr),{},{style:xo},Ho)}))}var co=_r,Bi=["data","index","className","rowKey","style","extra","getHeight"],Po=Me.forwardRef(function(Xe,Ue){var zt=Xe.data,_t=Xe.index,on=Xe.className,Wt=Xe.rowKey,Fn=Xe.style,wn=Xe.extra,kn=Xe.getHeight,ni=(0,tn.Z)(Xe,Bi),Tn=zt.record,ei=zt.indent,ki=zt.index,Ci=He(Fe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),xi=Ci.scrollX,rr=Ci.flattenColumns,Mi=Ci.prefixCls,Vi=Ci.fixColumn,Ui=Ci.componentWidth,Pr=Qt(Tn,Wt,_t,ei),Xr=Pr.rowSupportExpand,so=Pr.expanded,fr=Pr.rowProps,Ur=Pr.expandedRowRender,zo=Pr.expandedRowClassName,xr;if(Xr&&so){var Hr=Ur(Tn,_t,ei+1,so),Sr=zo==null?void 0:zo(Tn,_t,ei),$i={};Vi&&($i={style:(0,Re.Z)({},"--virtual-width","".concat(Ui,"px"))});var Fr="".concat(Mi,"-expanded-row-cell");xr=Me.createElement("div",{className:qe()("".concat(Mi,"-expanded-row"),"".concat(Mi,"-expanded-row-level-").concat(ei+1),Sr)},Me.createElement(Mn,{component:"div",prefixCls:Mi,className:qe()(Fr,(0,Re.Z)({},"".concat(Fr,"-fixed"),Vi)),additionalProps:$i},Hr))}var no=(0,gt.Z)((0,gt.Z)({},Fn),{},{width:xi});wn&&(no.position="absolute",no.pointerEvents="none");var xo=Me.createElement("div",(0,st.Z)({},fr,ni,{ref:Xr?null:Ue,className:qe()(on,"".concat(Mi,"-row"),fr==null?void 0:fr.className,(0,Re.Z)({},"".concat(Mi,"-row-extra"),wn)),style:(0,gt.Z)((0,gt.Z)({},no),fr==null?void 0:fr.style)}),rr.map(function(Eo,gr){return Me.createElement(co,{key:gr,rowInfo:Pr,column:Eo,colIndex:gr,indent:ei,index:_t,renderIndex:ki,record:Tn,inverse:wn,getHeight:kn})}));return Xr?Me.createElement("div",{ref:Ue},xo,xr):xo}),ao=me(Po),Ki=ao,qi=Me.forwardRef(function(Xe,Ue){var zt=Xe.data,_t=Xe.onScroll,on=He(Fe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Wt=on.flattenColumns,Fn=on.onColumnResize,wn=on.getRowKey,kn=on.expandedKeys,ni=on.prefixCls,Tn=on.childrenColumnName,ei=on.emptyNode,ki=on.scrollX,Ci=He(An),xi=Ci.scrollY,rr=Ci.listItemHeight,Mi=Me.useRef(),Vi=ft(zt,Tn,kn,wn),Ui=Me.useMemo(function(){var xr=0;return Wt.map(function(Hr){var Sr=Hr.width,$i=Hr.key;return xr+=Sr,[$i,Sr,xr]})},[Wt]),Pr=Me.useMemo(function(){return Ui.map(function(xr){return xr[2]})},[Ui]);Me.useEffect(function(){Ui.forEach(function(xr){var Hr=(0,ze.Z)(xr,2),Sr=Hr[0],$i=Hr[1];Fn(Sr,$i)})},[Ui]),Me.useImperativeHandle(Ue,function(){var xr={};return Object.defineProperty(xr,"scrollLeft",{get:function(){var Sr;return((Sr=Mi.current)===null||Sr===void 0?void 0:Sr.getScrollInfo().x)||0},set:function(Sr){var $i;($i=Mi.current)===null||$i===void 0||$i.scrollTo({left:Sr})}}),xr});var Xr=function(Hr,Sr){var $i,Fr=($i=Vi[Sr])===null||$i===void 0?void 0:$i.record,no=Hr.onCell;if(no){var xo,Eo=no(Fr,Sr);return(xo=Eo==null?void 0:Eo.rowSpan)!==null&&xo!==void 0?xo:1}return 1},so=function(Hr){var Sr=Hr.start,$i=Hr.end,Fr=Hr.getSize,no=Hr.offsetY;if($i<0)return null;for(var xo=Wt.filter(function(bo){return Xr(bo,Sr)===0}),Eo=Sr,gr=function(mo){if(xo=xo.filter(function(Mo){return Xr(Mo,mo)===0}),!xo.length)return Eo=mo,"break"},Ho=Sr;Ho>=0;Ho-=1){var Vo=gr(Ho);if(Vo==="break")break}for(var wa=Wt.filter(function(bo){return Xr(bo,$i)!==1}),sa=$i,os=function(mo){if(wa=wa.filter(function(Mo){return Xr(Mo,mo)!==1}),!wa.length)return sa=Math.max(mo-1,$i),"break"},ts=$i;ts<Vi.length;ts+=1){var $o=os(ts);if($o==="break")break}for(var oo=[],pa=function(mo){var Mo=Vi[mo];if(!Mo)return"continue";Wt.some(function(qr){return Xr(qr,mo)>1})&&oo.push(mo)},as=Eo;as<=sa;as+=1)var Va=pa(as);var Ms=oo.map(function(bo){var mo=Vi[bo],Mo=wn(mo.record,bo),qr=function(_o){var ha=bo+_o-1,ca=wn(Vi[ha].record,ha),Vs=Fr(Mo,ca);return Vs.bottom-Vs.top},ya=Fr(Mo);return Me.createElement(Ki,{key:bo,data:mo,rowKey:Mo,index:bo,style:{top:-no+ya.top},extra:!0,getHeight:qr})});return Ms},fr=Me.useMemo(function(){return{columnsOffset:Pr}},[Pr]),Ur="".concat(ni,"-tbody"),zo;return Vi.length?zo=Me.createElement(hr.Z,{fullHeight:!1,ref:Mi,className:qe()(Ur,"".concat(Ur,"-virtual")),height:xi,itemHeight:rr||24,data:Vi,itemKey:function(Hr){return wn(Hr.record)},scrollWidth:ki,onVirtualScroll:function(Hr){var Sr=Hr.x;_t({scrollLeft:Sr})},extraRender:so},function(xr,Hr,Sr){var $i=wn(xr.record,Hr);return Me.createElement(Ki,(0,st.Z)({data:xr,rowKey:$i,index:Hr},Sr))}):zo=Me.createElement("div",{className:qe()("".concat(ni,"-placeholder"))},Me.createElement(Mn,{component:"div",prefixCls:ni},ei)),Me.createElement(Jr.Provider,{value:fr},zo)}),Zr=me(qi),ro=Zr,wi=function(Ue,zt){var _t=zt.ref,on=zt.onScroll;return Me.createElement(ro,{ref:_t,data:Ue,onScroll:on})},Qe=100;function uo(Xe){var Ue=Xe.columns,zt=Xe.scroll,_t=Xe.prefixCls,on=_t===void 0?_n:_t,Wt=Xe.className,Fn=Xe.listItemHeight,wn=zt||{},kn=wn.x,ni=wn.y;typeof kn!="number"&&(kn=((Ue||[]).length+1)*Qe),typeof ni!="number"&&(ni=500);var Tn=Me.useMemo(function(){return{scrollY:ni,listItemHeight:Fn}},[ni,Fn]);return Me.createElement(An.Provider,{value:Tn},Me.createElement(nr,(0,st.Z)({},Xe,{className:qe()(Wt,"".concat(on,"-virtual")),scroll:(0,gt.Z)((0,gt.Z)({},zt),{},{x:kn}),components:{body:wi},columns:Ue,internalHooks:De,tailor:!0})))}function Zo(Xe){return de(uo,Xe)}var ga=Zo(),Pa=null;function ia(Xe){return null}var Dr=ia;function kr(Xe){return null}var fo=kr,Rr=ve(2738),To=ve(68031),qa=ve(36355),Mr=ve(93891),sr=ve(19716),qn=ve(8628),vr=ve(31724),wo=ve(58421),ua=ve(71418),Bo=ve(88088);function yo(Xe){return function(zt){let{prefixCls:_t,onExpand:on,record:Wt,expanded:Fn,expandable:wn}=zt;const kn=`${_t}-row-expand-icon`;return Me.createElement("button",{type:"button",onClick:ni=>{on(Wt,ni),ni.stopPropagation()},className:qe()(kn,{[`${kn}-spaced`]:!wn,[`${kn}-expanded`]:wn&&Fn,[`${kn}-collapsed`]:wn&&!Fn}),"aria-label":Fn?Xe.collapse:Xe.expand,"aria-expanded":Fn})}}var ta=yo;function na(Xe,Ue){return"key"in Xe&&Xe.key!==void 0&&Xe.key!==null?Xe.key:Xe.dataIndex?Array.isArray(Xe.dataIndex)?Xe.dataIndex.join("."):Xe.dataIndex:Ue}function Ba(Xe,Ue){return Ue?`${Ue}-${Xe}`:`${Xe}`}function ka(Xe,Ue){return typeof Xe=="function"?Xe(Ue):Xe}function is(Xe,Ue){const zt=ka(Xe,Ue);return Object.prototype.toString.call(zt)==="[object Object]"?"":zt}var vn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},Oa=vn,Vl=ve(7657),Hs=function(Ue,zt){return Me.createElement(Vl.Z,(0,st.Z)({},Ue,{ref:zt,icon:Oa}))},wl=Me.forwardRef(Hs),Ma=wl,yu=ve(56762);function Cl(Xe){const Ue=Me.useRef(Xe),zt=(0,yu.Z)();return[()=>Ue.current,_t=>{Ue.current=_t,zt()}]}var ma=ve(3113),Fo=ve(24905),Ul=ve(38854),$r=ve(64165),Ko=ve(20834),So=ve(40875),Ti=ve(5112),Wa=ve(17574),$a=ve(47472),bs=ve(92832);function El(Xe){let{value:Ue,onChange:zt,filterSearch:_t,tablePrefixCls:on,locale:Wt}=Xe;return _t?Me.createElement("div",{className:`${on}-filter-dropdown-search`},Me.createElement(bs.default,{prefix:Me.createElement($a.Z,null),placeholder:Wt.filterSearchPlaceholder,onChange:zt,value:Ue,htmlSize:1,className:`${on}-filter-dropdown-search-input`})):null}var Dl=El,bi=ve(10228);const Fa=Xe=>{const{keyCode:Ue}=Xe;Ue===bi.Z.ENTER&&Xe.stopPropagation()};var bl=Me.forwardRef((Xe,Ue)=>Me.createElement("div",{className:Xe.className,onClick:zt=>zt.stopPropagation(),onKeyDown:Fa,ref:Ue},Xe.children));function Ol(Xe){let Ue=[];return(Xe||[]).forEach(zt=>{let{value:_t,children:on}=zt;Ue.push(_t),on&&(Ue=[].concat((0,mi.Z)(Ue),(0,mi.Z)(Ol(on))))}),Ue}function Il(Xe){return Xe.some(Ue=>{let{children:zt}=Ue;return zt})}function Qr(Xe,Ue){return typeof Ue=="string"||typeof Ue=="number"?Ue==null?void 0:Ue.toString().toLowerCase().includes(Xe.trim().toLowerCase()):!1}function Ju(Xe){let{filters:Ue,prefixCls:zt,filteredKeys:_t,filterMultiple:on,searchValue:Wt,filterSearch:Fn}=Xe;return Ue.map((wn,kn)=>{const ni=String(wn.value);if(wn.children)return{key:ni||kn,label:wn.text,popupClassName:`${zt}-dropdown-submenu`,children:Ju({filters:wn.children,prefixCls:zt,filteredKeys:_t,filterMultiple:on,searchValue:Wt,filterSearch:Fn})};const Tn=on?Fo.default:Ti.ZP,ei={key:wn.value!==void 0?ni:kn,label:Me.createElement(Me.Fragment,null,Me.createElement(Tn,{checked:_t.includes(ni)}),Me.createElement("span",null,wn.text))};return Wt.trim()?typeof Fn=="function"?Fn(Wt,wn)?ei:null:Qr(Wt,wn.text)?ei:null:ei})}function nl(Xe){var Ue,zt;const{tablePrefixCls:_t,prefixCls:on,column:Wt,dropdownPrefixCls:Fn,columnKey:wn,filterMultiple:kn,filterMode:ni="menu",filterSearch:Tn=!1,filterState:ei,triggerFilter:ki,locale:Ci,children:xi,getPopupContainer:rr}=Xe,{filterDropdownOpen:Mi,onFilterDropdownOpenChange:Vi,filterResetToDefaultFilteredValue:Ui,defaultFilteredValue:Pr,filterDropdownVisible:Xr,onFilterDropdownVisibleChange:so}=Wt,[fr,Ur]=Me.useState(!1),zo=!!(ei&&(!((Ue=ei.filteredKeys)===null||Ue===void 0)&&Ue.length||ei.forceFiltered)),xr=eo=>{Ur(eo),Vi==null||Vi(eo),so==null||so(eo)},Hr=(zt=Mi!=null?Mi:Xr)!==null&&zt!==void 0?zt:fr,Sr=ei==null?void 0:ei.filteredKeys,[$i,Fr]=Cl(Sr||[]),no=eo=>{let{selectedKeys:_o}=eo;Fr(_o)},xo=(eo,_o)=>{let{node:ha,checked:ca}=_o;no(kn?{selectedKeys:eo}:{selectedKeys:ca&&ha.key?[ha.key]:[]})};Me.useEffect(()=>{fr&&no({selectedKeys:Sr||[]})},[Sr]);const[Eo,gr]=Me.useState([]),Ho=eo=>{gr(eo)},[Vo,wa]=Me.useState(""),sa=eo=>{const{value:_o}=eo.target;wa(_o)};Me.useEffect(()=>{fr||wa("")},[fr]);const os=eo=>{const _o=eo&&eo.length?eo:null;if(_o===null&&(!ei||!ei.filteredKeys)||(0,ht.Z)(_o,ei==null?void 0:ei.filteredKeys,!0))return null;ki({column:Wt,key:wn,filteredKeys:_o})},ts=()=>{xr(!1),os($i())},$o=function(){let{confirm:eo,closeDropdown:_o}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};eo&&os([]),_o&&xr(!1),wa(""),Fr(Ui?(Pr||[]).map(ha=>String(ha)):[])},oo=function(){let{closeDropdown:eo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};eo&&xr(!1),os($i())},pa=eo=>{eo&&Sr!==void 0&&Fr(Sr||[]),xr(eo),!eo&&!Wt.filterDropdown&&ts()},as=qe()({[`${Fn}-menu-without-submenu`]:!Il(Wt.filters||[])}),Va=eo=>{if(eo.target.checked){const _o=Ol(Wt==null?void 0:Wt.filters).map(ha=>String(ha));Fr(_o)}else Fr([])},Ms=eo=>{let{filters:_o}=eo;return(_o||[]).map((ha,ca)=>{const Vs=String(ha.value),Bs={title:ha.text,key:ha.value!==void 0?Vs:ca};return ha.children&&(Bs.children=Ms({filters:ha.children})),Bs})},bo=eo=>{var _o;return Object.assign(Object.assign({},eo),{text:eo.title,value:eo.key,children:((_o=eo.children)===null||_o===void 0?void 0:_o.map(ha=>bo(ha)))||[]})};let mo;if(typeof Wt.filterDropdown=="function")mo=Wt.filterDropdown({prefixCls:`${Fn}-custom`,setSelectedKeys:eo=>no({selectedKeys:eo}),selectedKeys:$i(),confirm:oo,clearFilters:$o,filters:Wt.filters,visible:Hr,close:()=>{xr(!1)}});else if(Wt.filterDropdown)mo=Wt.filterDropdown;else{const eo=$i()||[],_o=()=>(Wt.filters||[]).length===0?Me.createElement($r.Z,{image:$r.Z.PRESENTED_IMAGE_SIMPLE,description:Ci.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):ni==="tree"?Me.createElement(Me.Fragment,null,Me.createElement(Dl,{filterSearch:Tn,value:Vo,onChange:sa,tablePrefixCls:_t,locale:Ci}),Me.createElement("div",{className:`${_t}-filter-dropdown-tree`},kn?Me.createElement(Fo.default,{checked:eo.length===Ol(Wt.filters).length,indeterminate:eo.length>0&&eo.length<Ol(Wt.filters).length,className:`${_t}-filter-dropdown-checkall`,onChange:Va},Ci.filterCheckall):null,Me.createElement(Wa.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:kn,checkStrictly:!kn,className:`${Fn}-menu`,onCheck:xo,checkedKeys:eo,selectedKeys:eo,showIcon:!1,treeData:Ms({filters:Wt.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Vo.trim()?ca=>typeof Tn=="function"?Tn(Vo,bo(ca)):Qr(Vo,ca.title):void 0}))):Me.createElement(Me.Fragment,null,Me.createElement(Dl,{filterSearch:Tn,value:Vo,onChange:sa,tablePrefixCls:_t,locale:Ci}),Me.createElement(Ko.default,{selectable:!0,multiple:kn,prefixCls:`${Fn}-menu`,className:as,onSelect:no,onDeselect:no,selectedKeys:eo,getPopupContainer:rr,openKeys:Eo,onOpenChange:Ho,items:Ju({filters:Wt.filters||[],filterSearch:Tn,prefixCls:on,filteredKeys:$i(),filterMultiple:kn,searchValue:Vo})})),ha=()=>Ui?(0,ht.Z)((Pr||[]).map(ca=>String(ca)),eo,!0):eo.length===0;mo=Me.createElement(Me.Fragment,null,_o(),Me.createElement("div",{className:`${on}-dropdown-btns`},Me.createElement(ma.ZP,{type:"link",size:"small",disabled:ha(),onClick:()=>$o()},Ci.filterReset),Me.createElement(ma.ZP,{type:"primary",size:"small",onClick:ts},Ci.filterConfirm)))}Wt.filterDropdown&&(mo=Me.createElement(So.J,{selectable:void 0},mo));const Mo=()=>Me.createElement(bl,{className:`${on}-dropdown`},mo);let qr;typeof Wt.filterIcon=="function"?qr=Wt.filterIcon(zo):Wt.filterIcon?qr=Wt.filterIcon:qr=Me.createElement(Ma,null);const{direction:ya}=Me.useContext(qa.E_);return Me.createElement("div",{className:`${on}-column`},Me.createElement("span",{className:`${_t}-column-title`},xi),Me.createElement(Ul.Z,{dropdownRender:Mo,trigger:["click"],open:Hr,onOpenChange:pa,getPopupContainer:rr,placement:ya==="rtl"?"bottomLeft":"bottomRight"},Me.createElement("span",{role:"button",tabIndex:-1,className:qe()(`${on}-trigger`,{active:zo}),onClick:eo=>{eo.stopPropagation()}},qr)))}var vs=nl;function ys(Xe,Ue,zt){let _t=[];return(Xe||[]).forEach((on,Wt)=>{var Fn;const wn=Ba(Wt,zt);if(on.filters||"filterDropdown"in on||"onFilter"in on)if("filteredValue"in on){let kn=on.filteredValue;"filterDropdown"in on||(kn=(Fn=kn==null?void 0:kn.map(String))!==null&&Fn!==void 0?Fn:kn),_t.push({column:on,key:na(on,wn),filteredKeys:kn,forceFiltered:on.filtered})}else _t.push({column:on,key:na(on,wn),filteredKeys:Ue&&on.defaultFilteredValue?on.defaultFilteredValue:void 0,forceFiltered:on.filtered});"children"in on&&(_t=[].concat((0,mi.Z)(_t),(0,mi.Z)(ys(on.children,Ue,wn))))}),_t}function Su(Xe,Ue,zt,_t,on,Wt,Fn,wn){return zt.map((kn,ni)=>{const Tn=Ba(ni,wn),{filterMultiple:ei=!0,filterMode:ki,filterSearch:Ci}=kn;let xi=kn;if(xi.filters||xi.filterDropdown){const rr=na(xi,Tn),Mi=_t.find(Vi=>{let{key:Ui}=Vi;return rr===Ui});xi=Object.assign(Object.assign({},xi),{title:Vi=>Me.createElement(vs,{tablePrefixCls:Xe,prefixCls:`${Xe}-filter`,dropdownPrefixCls:Ue,column:xi,columnKey:rr,filterState:Mi,filterMultiple:ei,filterMode:ki,filterSearch:Ci,triggerFilter:Wt,locale:on,getPopupContainer:Fn},ka(kn.title,Vi))})}return"children"in xi&&(xi=Object.assign(Object.assign({},xi),{children:Su(Xe,Ue,xi.children,_t,on,Wt,Fn,Tn)})),xi})}function Iu(Xe){const Ue={};return Xe.forEach(zt=>{let{key:_t,filteredKeys:on,column:Wt}=zt;const{filters:Fn,filterDropdown:wn}=Wt;if(wn)Ue[_t]=on||null;else if(Array.isArray(on)){const kn=Ol(Fn);Ue[_t]=kn.filter(ni=>on.includes(String(ni)))}else Ue[_t]=null}),Ue}function Ys(Xe,Ue){return Ue.reduce((zt,_t)=>{const{column:{onFilter:on,filters:Wt},filteredKeys:Fn}=_t;return on&&Fn&&Fn.length?zt.filter(wn=>Fn.some(kn=>{const ni=Ol(Wt),Tn=ni.findIndex(ki=>String(ki)===String(kn)),ei=Tn!==-1?ni[Tn]:kn;return on(ei,wn)})):zt},Xe)}const ul=Xe=>Xe.flatMap(Ue=>"children"in Ue?[Ue].concat((0,mi.Z)(ul(Ue.children||[]))):[Ue]);function Mh(Xe){let{prefixCls:Ue,dropdownPrefixCls:zt,mergedColumns:_t,onFilterChange:on,getPopupContainer:Wt,locale:Fn}=Xe;const wn=Me.useMemo(()=>ul(_t||[]),[_t]),[kn,ni]=Me.useState(()=>ys(wn,!0)),Tn=Me.useMemo(()=>{const xi=ys(wn,!1);if(xi.length===0)return xi;let rr=!0,Mi=!0;if(xi.forEach(Vi=>{let{filteredKeys:Ui}=Vi;Ui!==void 0?rr=!1:Mi=!1}),rr){const Vi=(wn||[]).map((Ui,Pr)=>na(Ui,Ba(Pr)));return kn.filter(Ui=>{let{key:Pr}=Ui;return Vi.includes(Pr)}).map(Ui=>{const Pr=wn[Vi.findIndex(Xr=>Xr===Ui.key)];return Object.assign(Object.assign({},Ui),{column:Object.assign(Object.assign({},Ui.column),Pr),forceFiltered:Pr.filtered})})}return xi},[wn,kn]),ei=Me.useMemo(()=>Iu(Tn),[Tn]),ki=xi=>{const rr=Tn.filter(Mi=>{let{key:Vi}=Mi;return Vi!==xi.key});rr.push(xi),ni(rr),on(Iu(rr),rr)};return[xi=>Su(Ue,zt,xi,Tn,Fn,ki,Wt),Tn,ei]}var uc=Mh;function Lh(Xe,Ue,zt){const _t=Me.useRef({});function on(Wt){if(!_t.current||_t.current.data!==Xe||_t.current.childrenColumnName!==Ue||_t.current.getRowKey!==zt){let wn=function(kn){kn.forEach((ni,Tn)=>{const ei=zt(ni,Tn);Fn.set(ei,ni),ni&&typeof ni=="object"&&Ue in ni&&wn(ni[Ue]||[])})};const Fn=new Map;wn(Xe),_t.current={data:Xe,childrenColumnName:Ue,kvMap:Fn,getRowKey:zt}}return _t.current.kvMap.get(Wt)}return[on]}var hc=ve(50371),Fh=function(Xe,Ue){var zt={};for(var _t in Xe)Object.prototype.hasOwnProperty.call(Xe,_t)&&Ue.indexOf(_t)<0&&(zt[_t]=Xe[_t]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,_t=Object.getOwnPropertySymbols(Xe);on<_t.length;on++)Ue.indexOf(_t[on])<0&&Object.prototype.propertyIsEnumerable.call(Xe,_t[on])&&(zt[_t[on]]=Xe[_t[on]]);return zt};const Ru=10;function Qu(Xe,Ue){const zt={current:Xe.current,pageSize:Xe.pageSize};return Object.keys(Ue&&typeof Ue=="object"?Ue:{}).forEach(on=>{const Wt=Xe[on];typeof Wt!="function"&&(zt[on]=Wt)}),zt}function Rl(Xe,Ue,zt){const _t=zt&&typeof zt=="object"?zt:{},{total:on=0}=_t,Wt=Fh(_t,["total"]),[Fn,wn]=(0,Me.useState)(()=>({current:"defaultCurrent"in Wt?Wt.defaultCurrent:1,pageSize:"defaultPageSize"in Wt?Wt.defaultPageSize:Ru})),kn=(0,hc.Z)(Fn,Wt,{total:on>0?on:Xe}),ni=Math.ceil((on||Xe)/kn.pageSize);kn.current>ni&&(kn.current=ni||1);const Tn=(ki,Ci)=>{wn({current:ki!=null?ki:1,pageSize:Ci||kn.pageSize})},ei=(ki,Ci)=>{var xi;zt&&((xi=zt.onChange)===null||xi===void 0||xi.call(zt,ki,Ci)),Tn(ki,Ci),Ue(ki,Ci||(kn==null?void 0:kn.pageSize))};return zt===!1?[{},()=>{}]:[Object.assign(Object.assign({},kn),{onChange:ei}),Tn]}var Hh=Rl,qu=ve(84105),eh=ve(35654),Co=ve(90782),Uo=ve(71430),Gs=ve(18929);const ds={},es="SELECT_ALL",Aa="SELECT_INVERT",za="SELECT_NONE",rs=[],Ka=(Xe,Ue)=>{let zt=[];return(Ue||[]).forEach(_t=>{zt.push(_t),_t&&typeof _t=="object"&&Xe in _t&&(zt=[].concat((0,mi.Z)(zt),(0,mi.Z)(Ka(Xe,_t[Xe]))))}),zt};var $s=(Xe,Ue)=>{const{preserveSelectedRowKeys:zt,selectedRowKeys:_t,defaultSelectedRowKeys:on,getCheckboxProps:Wt,onChange:Fn,onSelect:wn,onSelectAll:kn,onSelectInvert:ni,onSelectNone:Tn,onSelectMultiple:ei,columnWidth:ki,type:Ci,selections:xi,fixed:rr,renderCell:Mi,hideSelectAll:Vi,checkStrictly:Ui=!0}=Ue||{},{prefixCls:Pr,data:Xr,pageData:so,getRecordByKey:fr,getRowKey:Ur,expandType:zo,childrenColumnName:xr,locale:Hr,getPopupContainer:Sr}=Xe,[$i,Fr]=(0,Gs.Z)(_t||on||rs,{value:_t}),no=Me.useRef(new Map),xo=(0,Me.useCallback)(bo=>{if(zt){const mo=new Map;bo.forEach(Mo=>{let qr=fr(Mo);!qr&&no.current.has(Mo)&&(qr=no.current.get(Mo)),mo.set(Mo,qr)}),no.current=mo}},[fr,zt]);Me.useEffect(()=>{xo($i)},[$i]);const{keyEntities:Eo}=(0,Me.useMemo)(()=>{if(Ui)return{keyEntities:null};let bo=Xr;if(zt){const mo=new Set(Xr.map((qr,ya)=>Ur(qr,ya))),Mo=Array.from(no.current).reduce((qr,ya)=>{let[eo,_o]=ya;return mo.has(eo)?qr:qr.concat(_o)},[]);bo=[].concat((0,mi.Z)(bo),(0,mi.Z)(Mo))}return(0,Uo.I8)(bo,{externalGetKey:Ur,childrenPropName:xr})},[Xr,Ur,Ui,xr,zt]),gr=(0,Me.useMemo)(()=>Ka(xr,so),[xr,so]),Ho=(0,Me.useMemo)(()=>{const bo=new Map;return gr.forEach((mo,Mo)=>{const qr=Ur(mo,Mo),ya=(Wt?Wt(mo):null)||{};bo.set(qr,ya)}),bo},[gr,Ur,Wt]),Vo=(0,Me.useCallback)(bo=>{var mo;return!!(!((mo=Ho.get(Ur(bo)))===null||mo===void 0)&&mo.disabled)},[Ho,Ur]),[wa,sa]=(0,Me.useMemo)(()=>{if(Ui)return[$i||[],[]];const{checkedKeys:bo,halfCheckedKeys:mo}=(0,Co.S)($i,!0,Eo,Vo);return[bo||[],mo]},[$i,Ui,Eo,Vo]),os=(0,Me.useMemo)(()=>{const bo=Ci==="radio"?wa.slice(0,1):wa;return new Set(bo)},[wa,Ci]),ts=(0,Me.useMemo)(()=>Ci==="radio"?new Set:new Set(sa),[sa,Ci]),[$o,oo]=(0,Me.useState)(null);Me.useEffect(()=>{Ue||Fr(rs)},[!!Ue]);const pa=(0,Me.useCallback)((bo,mo)=>{let Mo,qr;xo(bo),zt?(Mo=bo,qr=bo.map(ya=>no.current.get(ya))):(Mo=[],qr=[],bo.forEach(ya=>{const eo=fr(ya);eo!==void 0&&(Mo.push(ya),qr.push(eo))})),Fr(Mo),Fn==null||Fn(Mo,qr,{type:mo})},[Fr,fr,Fn,zt]),as=(0,Me.useCallback)((bo,mo,Mo,qr)=>{if(wn){const ya=Mo.map(eo=>fr(eo));wn(fr(bo),mo,ya,qr)}pa(Mo,"single")},[wn,fr,pa]),Va=(0,Me.useMemo)(()=>!xi||Vi?null:(xi===!0?[es,Aa,za]:xi).map(mo=>mo===es?{key:"all",text:Hr.selectionAll,onSelect(){pa(Xr.map((Mo,qr)=>Ur(Mo,qr)).filter(Mo=>{const qr=Ho.get(Mo);return!(qr!=null&&qr.disabled)||os.has(Mo)}),"all")}}:mo===Aa?{key:"invert",text:Hr.selectInvert,onSelect(){const Mo=new Set(os);so.forEach((ya,eo)=>{const _o=Ur(ya,eo),ha=Ho.get(_o);ha!=null&&ha.disabled||(Mo.has(_o)?Mo.delete(_o):Mo.add(_o))});const qr=Array.from(Mo);ni&&ni(qr),pa(qr,"invert")}}:mo===za?{key:"none",text:Hr.selectNone,onSelect(){Tn==null||Tn(),pa(Array.from(os).filter(Mo=>{const qr=Ho.get(Mo);return qr==null?void 0:qr.disabled}),"none")}}:mo).map(mo=>Object.assign(Object.assign({},mo),{onSelect:function(){for(var Mo,qr,ya=arguments.length,eo=new Array(ya),_o=0;_o<ya;_o++)eo[_o]=arguments[_o];(qr=mo.onSelect)===null||qr===void 0||(Mo=qr).call.apply(Mo,[mo].concat(eo)),oo(null)}})),[xi,os,so,Ur,ni,pa]);return[(0,Me.useCallback)(bo=>{var mo;if(!Ue)return bo.filter(Ea=>Ea!==ds);let Mo=(0,mi.Z)(bo);const qr=new Set(os),ya=gr.map(Ur).filter(Ea=>!Ho.get(Ea).disabled),eo=ya.every(Ea=>qr.has(Ea)),_o=ya.some(Ea=>qr.has(Ea)),ha=()=>{const Ea=[];eo?ya.forEach(ja=>{qr.delete(ja),Ea.push(ja)}):ya.forEach(ja=>{qr.has(ja)||(qr.add(ja),Ea.push(ja))});const Ta=Array.from(qr);kn==null||kn(!eo,Ta.map(ja=>fr(ja)),Ea.map(ja=>fr(ja))),pa(Ta,"all"),oo(null)};let ca;if(Ci!=="radio"){let Ea;if(Va){const ra={getPopupContainer:Sr,items:Va.map((Za,zs)=>{const{key:jl,text:au,onSelect:Yl}=Za;return{key:jl!=null?jl:zs,onClick:()=>{Yl==null||Yl(ya)},label:au}})};Ea=Me.createElement("div",{className:`${Pr}-selection-extra`},Me.createElement(Ul.Z,{menu:ra,getPopupContainer:Sr},Me.createElement("span",null,Me.createElement(qu.Z,null))))}const Ta=gr.map((ra,Za)=>{const zs=Ur(ra,Za),jl=Ho.get(zs)||{};return Object.assign({checked:qr.has(zs)},jl)}).filter(ra=>{let{disabled:Za}=ra;return Za}),ja=!!Ta.length&&Ta.length===gr.length,ms=ja&&Ta.every(ra=>{let{checked:Za}=ra;return Za}),js=ja&&Ta.some(ra=>{let{checked:Za}=ra;return Za});ca=!Vi&&Me.createElement("div",{className:`${Pr}-selection`},Me.createElement(Fo.default,{checked:ja?ms:!!gr.length&&eo,indeterminate:ja?!ms&&js:!eo&&_o,onChange:ha,disabled:gr.length===0||ja,"aria-label":Ea?"Custom selection":"Select all",skipGroup:!0}),Ea)}let Vs;Ci==="radio"?Vs=(Ea,Ta,ja)=>{const ms=Ur(Ta,ja),js=qr.has(ms);return{node:Me.createElement(Ti.ZP,Object.assign({},Ho.get(ms),{checked:js,onClick:ra=>ra.stopPropagation(),onChange:ra=>{qr.has(ms)||as(ms,!0,[ms],ra.nativeEvent)}})),checked:js}}:Vs=(Ea,Ta,ja)=>{var ms;const js=Ur(Ta,ja),ra=qr.has(js),Za=ts.has(js),zs=Ho.get(js);let jl;return zo==="nest"?jl=Za:jl=(ms=zs==null?void 0:zs.indeterminate)!==null&&ms!==void 0?ms:Za,{node:Me.createElement(Fo.default,Object.assign({},zs,{indeterminate:jl,checked:ra,skipGroup:!0,onClick:au=>au.stopPropagation(),onChange:au=>{let{nativeEvent:Yl}=au;const{shiftKey:wu}=Yl;let Cu=-1,su=-1;if(wu&&Ui){const La=new Set([$o,js]);ya.some((Xs,fs)=>{if(La.has(Xs))if(Cu===-1)Cu=fs;else return su=fs,!0;return!1})}if(su!==-1&&Cu!==su&&Ui){const La=ya.slice(Cu,su+1),Xs=[];ra?La.forEach(Ha=>{qr.has(Ha)&&(Xs.push(Ha),qr.delete(Ha))}):La.forEach(Ha=>{qr.has(Ha)||(Xs.push(Ha),qr.add(Ha))});const fs=Array.from(qr);ei==null||ei(!ra,fs.map(Ha=>fr(Ha)),Xs.map(Ha=>fr(Ha))),pa(fs,"multiple")}else{const La=wa;if(Ui){const Xs=ra?(0,eh._5)(La,js):(0,eh.L0)(La,js);as(js,!ra,Xs,Yl)}else{const Xs=(0,Co.S)([].concat((0,mi.Z)(La),[js]),!0,Eo,Vo),{checkedKeys:fs,halfCheckedKeys:Ha}=Xs;let lu=fs;if(ra){const kh=new Set(fs);kh.delete(js),lu=(0,Co.S)(Array.from(kh),{checked:!1,halfCheckedKeys:Ha},Eo,Vo).checkedKeys}as(js,!ra,lu,Yl)}}oo(ra?null:js)}})),checked:ra}};const Bs=(Ea,Ta,ja)=>{const{node:ms,checked:js}=Vs(Ea,Ta,ja);return Mi?Mi(js,Ta,ja,ms):ms};if(!Mo.includes(ds))if(Mo.findIndex(Ea=>{var Ta;return((Ta=Ea[Yi])===null||Ta===void 0?void 0:Ta.columnType)==="EXPAND_COLUMN"})===0){const[Ea,...Ta]=Mo;Mo=[Ea,ds].concat((0,mi.Z)(Ta))}else Mo=[ds].concat((0,mi.Z)(Mo));const hl=Mo.indexOf(ds);Mo=Mo.filter((Ea,Ta)=>Ea!==ds||Ta===hl);const Ca=Mo[hl-1],Us=Mo[hl+1];let ws=rr;ws===void 0&&((Us==null?void 0:Us.fixed)!==void 0?ws=Us.fixed:(Ca==null?void 0:Ca.fixed)!==void 0&&(ws=Ca.fixed)),ws&&Ca&&((mo=Ca[Yi])===null||mo===void 0?void 0:mo.columnType)==="EXPAND_COLUMN"&&Ca.fixed===void 0&&(Ca.fixed=ws);const Rs=qe()(`${Pr}-selection-col`,{[`${Pr}-selection-col-with-dropdown`]:xi&&Ci==="checkbox"}),fh={fixed:ws,width:ki,className:`${Pr}-selection-column`,title:Ue.columnTitle||ca,render:Bs,onCell:Ue.onCell,[Yi]:{className:Rs}};return Mo.map(Ea=>Ea===ds?fh:Ea)},[Ur,gr,Ue,wa,os,ts,ki,Va,zo,$o,Ho,ei,as,Vo]),os]},va=ve(89489),rd=ve(59477),Mc=ve(6848);const Vt="ascend",Ht="descend";function Sn(Xe){return typeof Xe.sorter=="object"&&typeof Xe.sorter.multiple=="number"?Xe.sorter.multiple:!1}function tt(Xe){return typeof Xe=="function"?Xe:Xe&&typeof Xe=="object"&&Xe.compare?Xe.compare:!1}function Pn(Xe,Ue){return Ue?Xe[Xe.indexOf(Ue)+1]:Xe[0]}function jr(Xe,Ue,zt){let _t=[];function on(Wt,Fn){_t.push({column:Wt,key:na(Wt,Fn),multiplePriority:Sn(Wt),sortOrder:Wt.sortOrder})}return(Xe||[]).forEach((Wt,Fn)=>{const wn=Ba(Fn,zt);Wt.children?("sortOrder"in Wt&&on(Wt,wn),_t=[].concat((0,mi.Z)(_t),(0,mi.Z)(jr(Wt.children,Ue,wn)))):Wt.sorter&&("sortOrder"in Wt?on(Wt,wn):Ue&&Wt.defaultSortOrder&&_t.push({column:Wt,key:na(Wt,wn),multiplePriority:Sn(Wt),sortOrder:Wt.defaultSortOrder}))}),_t}function No(Xe,Ue,zt,_t,on,Wt,Fn,wn){return(Ue||[]).map((kn,ni)=>{const Tn=Ba(ni,wn);let ei=kn;if(ei.sorter){const ki=ei.sortDirections||on,Ci=ei.showSorterTooltip===void 0?Fn:ei.showSorterTooltip,xi=na(ei,Tn),rr=zt.find(zo=>{let{key:xr}=zo;return xr===xi}),Mi=rr?rr.sortOrder:null,Vi=Pn(ki,Mi);let Ui;if(kn.sortIcon)Ui=kn.sortIcon({sortOrder:Mi});else{const zo=ki.includes(Vt)&&Me.createElement(rd.Z,{className:qe()(`${Xe}-column-sorter-up`,{active:Mi===Vt})}),xr=ki.includes(Ht)&&Me.createElement(va.Z,{className:qe()(`${Xe}-column-sorter-down`,{active:Mi===Ht})});Ui=Me.createElement("span",{className:qe()(`${Xe}-column-sorter`,{[`${Xe}-column-sorter-full`]:!!(zo&&xr)})},Me.createElement("span",{className:`${Xe}-column-sorter-inner`,"aria-hidden":"true"},zo,xr))}const{cancelSort:Pr,triggerAsc:Xr,triggerDesc:so}=Wt||{};let fr=Pr;Vi===Ht?fr=so:Vi===Vt&&(fr=Xr);const Ur=typeof Ci=="object"?Ci:{title:fr};ei=Object.assign(Object.assign({},ei),{className:qe()(ei.className,{[`${Xe}-column-sort`]:Mi}),title:zo=>{const xr=Me.createElement("div",{className:`${Xe}-column-sorters`},Me.createElement("span",{className:`${Xe}-column-title`},ka(kn.title,zo)),Ui);return Ci?Me.createElement(Mc.Z,Object.assign({},Ur),xr):xr},onHeaderCell:zo=>{const xr=kn.onHeaderCell&&kn.onHeaderCell(zo)||{},Hr=xr.onClick,Sr=xr.onKeyDown;xr.onClick=no=>{_t({column:kn,key:xi,sortOrder:Vi,multiplePriority:Sn(kn)}),Hr==null||Hr(no)},xr.onKeyDown=no=>{no.keyCode===bi.Z.ENTER&&(_t({column:kn,key:xi,sortOrder:Vi,multiplePriority:Sn(kn)}),Sr==null||Sr(no))};const $i=is(kn.title,{}),Fr=$i==null?void 0:$i.toString();return Mi?xr["aria-sort"]=Mi==="ascend"?"ascending":"descending":xr["aria-label"]=Fr||"",xr.className=qe()(xr.className,`${Xe}-column-has-sorters`),xr.tabIndex=0,kn.ellipsis&&(xr.title=($i!=null?$i:"").toString()),xr}})}return"children"in ei&&(ei=Object.assign(Object.assign({},ei),{children:No(Xe,ei.children,zt,_t,on,Wt,Fn,Tn)})),ei})}function Or(Xe){const{column:Ue,sortOrder:zt}=Xe;return{column:Ue,order:zt,field:Ue.dataIndex,columnKey:Ue.key}}function zr(Xe){const Ue=Xe.filter(zt=>{let{sortOrder:_t}=zt;return _t}).map(Or);return Ue.length===0&&Xe.length?Object.assign(Object.assign({},Or(Xe[Xe.length-1])),{column:void 0}):Ue.length<=1?Ue[0]||{}:Ue}function jo(Xe,Ue,zt){const _t=Ue.slice().sort((Fn,wn)=>wn.multiplePriority-Fn.multiplePriority),on=Xe.slice(),Wt=_t.filter(Fn=>{let{column:{sorter:wn},sortOrder:kn}=Fn;return tt(wn)&&kn});return Wt.length?on.sort((Fn,wn)=>{for(let kn=0;kn<Wt.length;kn+=1){const ni=Wt[kn],{column:{sorter:Tn},sortOrder:ei}=ni,ki=tt(Tn);if(ki&&ei){const Ci=ki(Fn,wn,ei);if(Ci!==0)return ei===Vt?Ci:-Ci}}return 0}).map(Fn=>{const wn=Fn[zt];return wn?Object.assign(Object.assign({},Fn),{[zt]:jo(wn,Ue,zt)}):Fn}):on}function po(Xe){let{prefixCls:Ue,mergedColumns:zt,onSorterChange:_t,sortDirections:on,tableLocale:Wt,showSorterTooltip:Fn}=Xe;const[wn,kn]=Me.useState(jr(zt,!0)),ni=Me.useMemo(()=>{let xi=!0;const rr=jr(zt,!1);if(!rr.length)return wn;const Mi=[];function Vi(Pr){xi?Mi.push(Pr):Mi.push(Object.assign(Object.assign({},Pr),{sortOrder:null}))}let Ui=null;return rr.forEach(Pr=>{Ui===null?(Vi(Pr),Pr.sortOrder&&(Pr.multiplePriority===!1?xi=!1:Ui=!0)):(Ui&&Pr.multiplePriority!==!1||(xi=!1),Vi(Pr))}),Mi},[zt,wn]),Tn=Me.useMemo(()=>{const xi=ni.map(rr=>{let{column:Mi,sortOrder:Vi}=rr;return{column:Mi,order:Vi}});return{sortColumns:xi,sortColumn:xi[0]&&xi[0].column,sortOrder:xi[0]&&xi[0].order}},[ni]);function ei(xi){let rr;xi.multiplePriority===!1||!ni.length||ni[0].multiplePriority===!1?rr=[xi]:rr=[].concat((0,mi.Z)(ni.filter(Mi=>{let{key:Vi}=Mi;return Vi!==xi.key})),[xi]),kn(rr),_t(zr(rr),rr)}return[xi=>No(Ue,xi,ni,ei,on,Wt,Fn),ni,Tn,()=>zr(ni)]}function Wo(Xe,Ue){return Xe.map(zt=>{const _t=Object.assign({},zt);return _t.title=ka(zt.title,Ue),"children"in _t&&(_t.children=Wo(_t.children,Ue)),_t})}function ho(Xe){return[Me.useCallback(zt=>Wo(zt,Xe),[Xe])]}var _i=ar((Xe,Ue)=>{const{_renderTimes:zt}=Xe,{_renderTimes:_t}=Ue;return zt!==_t}),Wi=Zo((Xe,Ue)=>{const{_renderTimes:zt}=Xe,{_renderTimes:_t}=Ue;return zt!==_t}),Tr=ve(64993),Ar=ve(17313),ir=ve(83116),wr=ve(37613),Ir=Xe=>{const{componentCls:Ue}=Xe,zt=`${Xe.lineWidth}px ${Xe.lineType} ${Xe.tableBorderColor}`,_t=(on,Wt,Fn)=>({[`&${Ue}-${on}`]:{[`> ${Ue}-container`]:{[`> ${Ue}-content, > ${Ue}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Ue}-expanded-row-fixed`]:{margin:`-${Wt}px -${Fn+Xe.lineWidth}px`}}}}}});return{[`${Ue}-wrapper`]:{[`${Ue}${Ue}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Ue}-title`]:{border:zt,borderBottom:0},[`> ${Ue}-container`]:{borderInlineStart:zt,borderTop:zt,[`
|
|
|
> ${Ue}-content,
|
|
|
> ${Ue}-header,
|
|
|
> ${Ue}-body,
|
|
|
> ${Ue}-summary
|
|
|
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:zt},"> thead":{"> tr:not(:last-child) > th":{borderBottom:zt},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Ue}-cell-fix-right-first::after`]:{borderInlineEnd:zt}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Ue}-expanded-row-fixed`]:{margin:`-${Xe.tablePaddingVertical}px -${Xe.tablePaddingHorizontal+Xe.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Xe.lineWidth,bottom:0,borderInlineEnd:zt,content:'""'}}}}}},[`&${Ue}-scroll-horizontal`]:{[`> ${Ue}-container > ${Ue}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Ue}-expanded-row,
|
|
|
> tr${Ue}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},_t("middle",Xe.tablePaddingVerticalMiddle,Xe.tablePaddingHorizontalMiddle)),_t("small",Xe.tablePaddingVerticalSmall,Xe.tablePaddingHorizontalSmall)),{[`> ${Ue}-footer`]:{border:zt,borderTop:0}}),[`${Ue}-cell`]:{[`${Ue}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Xe.lineWidth}px 0 ${Xe.lineWidth}px ${Xe.tableHeaderBg}`}},[`${Ue}-bordered ${Ue}-cell-scrollbar`]:{borderInlineEnd:zt}}}},lr=Xe=>{const{componentCls:Ue}=Xe;return{[`${Ue}-wrapper`]:{[`${Ue}-cell-ellipsis`]:Object.assign(Object.assign({},Ar.vS),{wordBreak:"keep-all",[`
|
|
|
&${Ue}-cell-fix-left-last,
|
|
|
&${Ue}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Ue}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Ue}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Oi=Xe=>{const{componentCls:Ue}=Xe;return{[`${Ue}-wrapper`]:{[`${Ue}-tbody > tr${Ue}-placeholder`]:{textAlign:"center",color:Xe.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Xe.colorBgContainer}}}}},Do=ve(15969),ko=Xe=>{const{componentCls:Ue,antCls:zt,controlInteractiveSize:_t,motionDurationSlow:on,lineWidth:Wt,paddingXS:Fn,lineType:wn,tableBorderColor:kn,tableExpandIconBg:ni,tableExpandColumnWidth:Tn,borderRadius:ei,fontSize:ki,fontSizeSM:Ci,lineHeight:xi,tablePaddingVertical:rr,tablePaddingHorizontal:Mi,tableExpandedRowBg:Vi,paddingXXS:Ui}=Xe,Pr=_t/2-Wt,Xr=Pr*2+Wt*3,so=`${Wt}px ${wn} ${kn}`,fr=Ui-Wt;return{[`${Ue}-wrapper`]:{[`${Ue}-expand-icon-col`]:{width:Tn},[`${Ue}-row-expand-icon-cell`]:{textAlign:"center",[`${Ue}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Ue}-row-indent`]:{height:1,float:"left"},[`${Ue}-row-expand-icon`]:Object.assign(Object.assign({},(0,Do.N)(Xe)),{position:"relative",float:"left",boxSizing:"border-box",width:Xr,height:Xr,padding:0,color:"inherit",lineHeight:`${Xr}px`,background:ni,border:so,borderRadius:ei,transform:`scale(${_t/Xr})`,transition:`all ${on}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${on} ease-out`,content:'""'},"&::before":{top:Pr,insetInlineEnd:fr,insetInlineStart:fr,height:Wt},"&::after":{top:fr,bottom:fr,insetInlineStart:Pr,width:Wt,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${Ue}-row-indent + ${Ue}-row-expand-icon`]:{marginTop:(ki*xi-Wt*3)/2-Math.ceil((Ci*1.4-Wt*3)/2),marginInlineEnd:Fn},[`tr${Ue}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Vi}},[`${zt}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Ue}-expanded-row-fixed`]:{position:"relative",margin:`-${rr}px -${Mi}px`,padding:`${rr}px ${Mi}px`}}}},Er=Xe=>{const{componentCls:Ue,antCls:zt,iconCls:_t,tableFilterDropdownWidth:on,tableFilterDropdownSearchWidth:Wt,paddingXXS:Fn,paddingXS:wn,colorText:kn,lineWidth:ni,lineType:Tn,tableBorderColor:ei,tableHeaderIconColor:ki,fontSizeSM:Ci,tablePaddingHorizontal:xi,borderRadius:rr,motionDurationSlow:Mi,colorTextDescription:Vi,colorPrimary:Ui,tableHeaderFilterActiveBg:Pr,colorTextDisabled:Xr,tableFilterDropdownBg:so,tableFilterDropdownHeight:fr,controlItemBgHover:Ur,controlItemBgActive:zo,boxShadowSecondary:xr,filterDropdownMenuBg:Hr}=Xe,Sr=`${zt}-dropdown`,$i=`${Ue}-filter-dropdown`,Fr=`${zt}-tree`,no=`${ni}px ${Tn} ${ei}`;return[{[`${Ue}-wrapper`]:{[`${Ue}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Ue}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Fn,marginInline:`${Fn}px ${-xi/2}px`,padding:`0 ${Fn}px`,color:ki,fontSize:Ci,borderRadius:rr,cursor:"pointer",transition:`all ${Mi}`,"&:hover":{color:Vi,background:Pr},"&.active":{color:Ui}}}},{[`${zt}-dropdown`]:{[$i]:Object.assign(Object.assign({},(0,Ar.Wf)(Xe)),{minWidth:on,backgroundColor:so,borderRadius:rr,boxShadow:xr,overflow:"hidden",[`${Sr}-menu`]:{maxHeight:fr,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Hr,"&:empty::after":{display:"block",padding:`${wn}px 0`,color:Xr,fontSize:Ci,textAlign:"center",content:'"Not Found"'}},[`${$i}-tree`]:{paddingBlock:`${wn}px 0`,paddingInline:wn,[Fr]:{padding:0},[`${Fr}-treenode ${Fr}-node-content-wrapper:hover`]:{backgroundColor:Ur},[`${Fr}-treenode-checkbox-checked ${Fr}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:zo}}},[`${$i}-search`]:{padding:wn,borderBottom:no,"&-input":{input:{minWidth:Wt},[_t]:{color:Xr}}},[`${$i}-checkall`]:{width:"100%",marginBottom:Fn,marginInlineStart:Fn},[`${$i}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${wn-ni}px ${wn}px`,overflow:"hidden",borderTop:no}})}},{[`${zt}-dropdown ${$i}, ${$i}-submenu`]:{[`${zt}-checkbox-wrapper + span`]:{paddingInlineStart:wn,color:kn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Ns=Xe=>{const{componentCls:Ue,lineWidth:zt,colorSplit:_t,motionDurationSlow:on,zIndexTableFixed:Wt,tableBg:Fn,zIndexTableSticky:wn}=Xe,kn=_t;return{[`${Ue}-wrapper`]:{[`
|
|
|
${Ue}-cell-fix-left,
|
|
|
${Ue}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Wt,background:Fn},[`
|
|
|
${Ue}-cell-fix-left-first::after,
|
|
|
${Ue}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-zt,width:30,transform:"translateX(100%)",transition:`box-shadow ${on}`,content:'""',pointerEvents:"none"},[`${Ue}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Ue}-cell-fix-right-first::after,
|
|
|
${Ue}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-zt,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${on}`,content:'""',pointerEvents:"none"},[`${Ue}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:wn+1,width:30,transition:`box-shadow ${on}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Ue}-ping-left`]:{[`&:not(${Ue}-has-fix-left) ${Ue}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${kn}`}},[`
|
|
|
${Ue}-cell-fix-left-first::after,
|
|
|
${Ue}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${kn}`},[`${Ue}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Ue}-ping-right`]:{[`&:not(${Ue}-has-fix-right) ${Ue}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${kn}`}},[`
|
|
|
${Ue}-cell-fix-right-first::after,
|
|
|
${Ue}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${kn}`}}}}},Ia=Xe=>{const{componentCls:Ue,antCls:zt}=Xe;return{[`${Ue}-wrapper`]:{[`${Ue}-pagination${zt}-pagination`]:{margin:`${Xe.margin}px 0`},[`${Ue}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Xe.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},_a=Xe=>{const{componentCls:Ue,tableRadius:zt}=Xe;return{[`${Ue}-wrapper`]:{[Ue]:{[`${Ue}-title, ${Ue}-header`]:{borderRadius:`${zt}px ${zt}px 0 0`},[`${Ue}-title + ${Ue}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Ue}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:zt,borderStartEndRadius:zt,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:zt},"> *:last-child":{borderStartEndRadius:zt}}},"&-footer":{borderRadius:`0 0 ${zt}px ${zt}px`}}}}},ju=Xe=>{const{componentCls:Ue}=Xe;return{[`${Ue}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Ue}-pagination-left`]:{justifyContent:"flex-end"},[`${Ue}-pagination-right`]:{justifyContent:"flex-start"},[`${Ue}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Ue}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Ue}-row-indent`]:{float:"right"}}}}},Nh=Xe=>{const{componentCls:Ue,antCls:zt,iconCls:_t,fontSizeIcon:on,padding:Wt,paddingXS:Fn,tableHeaderIconColor:wn,tableHeaderIconColorHover:kn,tableSelectionColumnWidth:ni}=Xe;return{[`${Ue}-wrapper`]:{[`${Ue}-selection-col`]:{width:ni,[`&${Ue}-selection-col-with-dropdown`]:{width:ni+on+Wt/4}},[`${Ue}-bordered ${Ue}-selection-col`]:{width:ni+Fn*2,[`&${Ue}-selection-col-with-dropdown`]:{width:ni+on+Wt/4+Fn*2}},[`
|
|
|
table tr th${Ue}-selection-column,
|
|
|
table tr td${Ue}-selection-column
|
|
|
`]:{paddingInlineEnd:Xe.paddingXS,paddingInlineStart:Xe.paddingXS,textAlign:"center",[`${zt}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Ue}-selection-column${Ue}-cell-fix-left`]:{zIndex:Xe.zIndexTableFixed+1},[`table tr th${Ue}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Ue}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Ue}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Xe.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Xe.tablePaddingHorizontal/4}px`,[_t]:{color:wn,fontSize:on,verticalAlign:"baseline","&:hover":{color:kn}}}}}},zu=Xe=>{const{componentCls:Ue}=Xe,zt=(_t,on,Wt,Fn)=>({[`${Ue}${Ue}-${_t}`]:{fontSize:Fn,[`
|
|
|
${Ue}-title,
|
|
|
${Ue}-footer,
|
|
|
${Ue}-cell,
|
|
|
${Ue}-thead > tr > th,
|
|
|
${Ue}-tbody > tr > th,
|
|
|
${Ue}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${on}px ${Wt}px`},[`${Ue}-filter-trigger`]:{marginInlineEnd:`-${Wt/2}px`},[`${Ue}-expanded-row-fixed`]:{margin:`-${on}px -${Wt}px`},[`${Ue}-tbody`]:{[`${Ue}-wrapper:only-child ${Ue}`]:{marginBlock:`-${on}px`,marginInline:`${Xe.tableExpandColumnWidth-Wt}px -${Wt}px`}},[`${Ue}-selection-column`]:{paddingInlineStart:`${Wt/4}px`}}});return{[`${Ue}-wrapper`]:Object.assign(Object.assign({},zt("middle",Xe.tablePaddingVerticalMiddle,Xe.tablePaddingHorizontalMiddle,Xe.tableFontSizeMiddle)),zt("small",Xe.tablePaddingVerticalSmall,Xe.tablePaddingHorizontalSmall,Xe.tableFontSizeSmall))}},Ml=Xe=>{const{componentCls:Ue,marginXXS:zt,fontSizeIcon:_t,tableHeaderIconColor:on,tableHeaderIconColorHover:Wt}=Xe;return{[`${Ue}-wrapper`]:{[`${Ue}-thead th${Ue}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Xe.motionDurationSlow}`,"&:hover":{background:Xe.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Xe.colorPrimary},[`
|
|
|
&${Ue}-cell-fix-left:hover,
|
|
|
&${Ue}-cell-fix-right:hover
|
|
|
`]:{background:Xe.tableFixedHeaderSortActiveBg}},[`${Ue}-thead th${Ue}-column-sort`]:{background:Xe.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Ue}-column-sort`]:{background:Xe.tableBodySortBg},[`${Ue}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Ue}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Ue}-column-sorter`]:{marginInlineStart:zt,color:on,fontSize:0,transition:`color ${Xe.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:_t,"&.active":{color:Xe.colorPrimary}},[`${Ue}-column-sorter-up + ${Ue}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Ue}-column-sorters:hover ${Ue}-column-sorter`]:{color:Wt}}}},Bh=Xe=>{const{componentCls:Ue,opacityLoading:zt,tableScrollThumbBg:_t,tableScrollThumbBgHover:on,tableScrollThumbSize:Wt,tableScrollBg:Fn,zIndexTableSticky:wn,stickyScrollBarBorderRadius:kn}=Xe,ni=`${Xe.lineWidth}px ${Xe.lineType} ${Xe.tableBorderColor}`;return{[`${Ue}-wrapper`]:{[`${Ue}-sticky`]:{"&-holder":{position:"sticky",zIndex:wn,background:Xe.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Wt}px !important`,zIndex:wn,display:"flex",alignItems:"center",background:Fn,borderTop:ni,opacity:zt,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Wt,backgroundColor:_t,borderRadius:kn,transition:`all ${Xe.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:on}}}}}}},_u=Xe=>{const{componentCls:Ue,lineWidth:zt,tableBorderColor:_t}=Xe,on=`${zt}px ${Xe.lineType} ${_t}`;return{[`${Ue}-wrapper`]:{[`${Ue}-summary`]:{position:"relative",zIndex:Xe.zIndexTableFixed,background:Xe.tableBg,"> tr":{"> th, > td":{borderBottom:on}}},[`div${Ue}-summary`]:{boxShadow:`0 -${zt}px 0 ${_t}`}}}},xu=Xe=>{const{componentCls:Ue}=Xe,zt=`${Xe.lineWidth}px ${Xe.lineType} ${Xe.tableBorderColor}`,_t=`${Ue}-expanded-row-cell`;return{[`${Ue}-wrapper`]:{[`${Ue}-tbody-virtual`]:{[`${Ue}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Ue}-cell`]:{borderBottom:zt},[`${Ue}-expanded-row`]:{[`${_t}${_t}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Xe.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Ue}-bordered`]:{[`${Ue}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:zt,position:"absolute"},[`${Ue}-cell`]:{borderInlineEnd:zt,[`&${Ue}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Xe.lineWidth,borderInlineStart:zt}}}}}}};const Pu=Xe=>{const{componentCls:Ue,fontWeightStrong:zt,tablePaddingVertical:_t,tablePaddingHorizontal:on,lineWidth:Wt,lineType:Fn,tableBorderColor:wn,tableFontSize:kn,tableBg:ni,tableRadius:Tn,tableHeaderTextColor:ei,motionDurationMid:ki,tableHeaderBg:Ci,tableHeaderCellSplitColor:xi,tableRowHoverBg:rr,tableSelectedRowBg:Mi,tableSelectedRowHoverBg:Vi,tableFooterTextColor:Ui,tableFooterBg:Pr,paddingContentVerticalLG:Xr}=Xe,so=`${Wt}px ${Fn} ${wn}`;return{[`${Ue}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ar.dF)()),{[Ue]:Object.assign(Object.assign({},(0,Ar.Wf)(Xe)),{fontSize:kn,background:ni,borderRadius:`${Tn}px ${Tn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Tn}px ${Tn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${Ue}-cell,
|
|
|
${Ue}-thead > tr > th,
|
|
|
${Ue}-tbody > tr > th,
|
|
|
${Ue}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Xr}px ${on}px`,overflowWrap:"break-word"},[`${Ue}-title`]:{padding:`${_t}px ${on}px`},[`${Ue}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:ei,fontWeight:zt,textAlign:"start",background:Ci,borderBottom:so,transition:`background ${ki} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Ue}-selection-column):not(${Ue}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:xi,transform:"translateY(-50%)",transition:`background-color ${ki}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Ue}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${ki}, border-color ${ki}`,borderBottom:so,[`
|
|
|
> ${Ue}-wrapper:only-child,
|
|
|
> ${Ue}-expanded-row-fixed > ${Ue}-wrapper:only-child
|
|
|
`]:{[Ue]:{marginBlock:`-${_t}px`,marginInline:`${Xe.tableExpandColumnWidth-on}px -${on}px`,[`${Ue}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:ei,fontWeight:zt,textAlign:"start",background:Ci,borderBottom:so,transition:`background ${ki} ease`},[`
|
|
|
&${Ue}-row:hover > th,
|
|
|
&${Ue}-row:hover > td,
|
|
|
> th${Ue}-cell-row-hover,
|
|
|
> td${Ue}-cell-row-hover
|
|
|
`]:{background:rr},[`&${Ue}-row-selected`]:{"> th, > td":{background:Mi},"&:hover > th, &:hover > td":{background:Vi}}}},[`${Ue}-footer`]:{padding:`${_t}px ${on}px`,color:Ui,background:Pr}})}};var dh=(0,ir.Z)("Table",Xe=>{const{colorTextHeading:Ue,colorSplit:zt,colorIcon:_t,colorIconHover:on,opacityLoading:Wt,colorBgContainer:Fn,controlInteractiveSize:wn,headerBg:kn,headerColor:ni,headerSortActiveBg:Tn,headerSortHoverBg:ei,bodySortBg:ki,rowHoverBg:Ci,rowSelectedBg:xi,rowSelectedHoverBg:rr,rowExpandedBg:Mi,cellPaddingBlock:Vi,cellPaddingInline:Ui,cellPaddingBlockMD:Pr,cellPaddingInlineMD:Xr,cellPaddingBlockSM:so,cellPaddingInlineSM:fr,borderColor:Ur,footerBg:zo,footerColor:xr,headerBorderRadius:Hr,cellFontSize:Sr,cellFontSizeMD:$i,cellFontSizeSM:Fr,headerSplitColor:no,fixedHeaderSortActiveBg:xo,headerFilterHoverBg:Eo,filterDropdownBg:gr,expandIconBg:Ho,selectionColumnWidth:Vo,stickyScrollBarBg:wa}=Xe,sa=new Tr.C(_t),os=new Tr.C(on),ts=2,$o=(0,wr.TS)(Xe,{tableFontSize:Sr,tableBg:Fn,tableRadius:Hr,tablePaddingVertical:Vi,tablePaddingHorizontal:Ui,tablePaddingVerticalMiddle:Pr,tablePaddingHorizontalMiddle:Xr,tablePaddingVerticalSmall:so,tablePaddingHorizontalSmall:fr,tableBorderColor:Ur,tableHeaderTextColor:ni,tableHeaderBg:kn,tableFooterTextColor:xr,tableFooterBg:zo,tableHeaderCellSplitColor:no,tableHeaderSortBg:Tn,tableHeaderSortHoverBg:ei,tableHeaderIconColor:sa.clone().setAlpha(sa.getAlpha()*Wt).toRgbString(),tableHeaderIconColorHover:os.clone().setAlpha(os.getAlpha()*Wt).toRgbString(),tableBodySortBg:ki,tableFixedHeaderSortActiveBg:xo,tableHeaderFilterActiveBg:Eo,tableFilterDropdownBg:gr,tableRowHoverBg:Ci,tableSelectedRowBg:xi,tableSelectedRowHoverBg:rr,zIndexTableFixed:ts,zIndexTableSticky:ts+1,tableFontSizeMiddle:$i,tableFontSizeSmall:Fr,tableSelectionColumnWidth:Vo,tableExpandIconBg:Ho,tableExpandColumnWidth:wn+2*Xe.padding,tableExpandedRowBg:Mi,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:wa,tableScrollThumbBgHover:Ue,tableScrollBg:zt});return[Pu($o),Ia($o),_u($o),Ml($o),Er($o),Ir($o),_a($o),ko($o),_u($o),Oi($o),Nh($o),Ns($o),Bh($o),lr($o),zu($o),ju($o),xu($o)]},Xe=>{const{colorFillAlter:Ue,colorBgContainer:zt,colorTextHeading:_t,colorFillSecondary:on,colorFillContent:Wt,controlItemBgActive:Fn,controlItemBgActiveHover:wn,padding:kn,paddingSM:ni,paddingXS:Tn,colorBorderSecondary:ei,borderRadiusLG:ki,fontSize:Ci,controlHeight:xi,colorTextPlaceholder:rr}=Xe,Mi=new Tr.C(on).onBackground(zt).toHexShortString(),Vi=new Tr.C(Wt).onBackground(zt).toHexShortString(),Ui=new Tr.C(Ue).onBackground(zt).toHexShortString();return{headerBg:Ui,headerColor:_t,headerSortActiveBg:Mi,headerSortHoverBg:Vi,bodySortBg:Ui,rowHoverBg:Ui,rowSelectedBg:Fn,rowSelectedHoverBg:wn,rowExpandedBg:Ue,cellPaddingBlock:kn,cellPaddingInline:kn,cellPaddingBlockMD:ni,cellPaddingInlineMD:Tn,cellPaddingBlockSM:Tn,cellPaddingInlineSM:Tn,borderColor:ei,headerBorderRadius:ki,footerBg:Ui,footerColor:_t,cellFontSize:Ci,cellFontSizeMD:Ci,cellFontSizeSM:Ci,headerSplitColor:ei,fixedHeaderSortActiveBg:Mi,headerFilterHoverBg:Wt,filterDropdownMenuBg:zt,filterDropdownBg:zt,expandIconBg:zt,selectionColumnWidth:xi,stickyScrollBarBg:rr,stickyScrollBarBorderRadius:100}});const Lc=[],Fc=(Xe,Ue)=>{const{prefixCls:zt,className:_t,rootClassName:on,style:Wt,size:Fn,bordered:wn,dropdownPrefixCls:kn,dataSource:ni,pagination:Tn,rowSelection:ei,rowKey:ki="key",rowClassName:Ci,columns:xi,children:rr,childrenColumnName:Mi,onChange:Vi,getPopupContainer:Ui,loading:Pr,expandIcon:Xr,expandable:so,expandedRowRender:fr,expandIconColumnIndex:Ur,indentSize:zo,scroll:xr,sortDirections:Hr,locale:Sr,showSorterTooltip:$i=!0,virtual:Fr}=Xe,no=Me.useMemo(()=>xi||Yt(rr),[xi,rr]),xo=Me.useMemo(()=>no.some(Sa=>Sa.responsive),[no]),Eo=(0,qn.Z)(xo),gr=Me.useMemo(()=>{const Sa=new Set(Object.keys(Eo).filter(Ua=>Eo[Ua]));return no.filter(Ua=>!Ua.responsive||Ua.responsive.some(ks=>Sa.has(ks)))},[no,Eo]),Ho=(0,Rr.Z)(Xe,["className","style","columns"]),{locale:Vo=vr.Z,direction:wa,table:sa,renderEmpty:os,getPrefixCls:ts,getPopupContainer:$o}=Me.useContext(qa.E_),oo=(0,sr.Z)(Fn),pa=Object.assign(Object.assign({},Vo.Table),Sr),as=ni||Lc,Va=ts("table",zt),Ms=ts("dropdown",kn),bo=Object.assign({childrenColumnName:Mi,expandIconColumnIndex:Ur},so),{childrenColumnName:mo="children"}=bo,Mo=Me.useMemo(()=>as.some(Sa=>Sa==null?void 0:Sa[mo])?"nest":fr||so&&so.expandedRowRender?"row":null,[as]),qr={body:Me.useRef()},ya=Me.useMemo(()=>typeof ki=="function"?ki:Sa=>Sa==null?void 0:Sa[ki],[ki]),[eo]=Lh(as,mo,ya),_o={},ha=function(Sa,Ua){let ks=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Ya,fa,_s;const zl=Object.assign(Object.assign({},_o),Sa);ks&&((Ya=_o.resetPagination)===null||Ya===void 0||Ya.call(_o),!((fa=zl.pagination)===null||fa===void 0)&&fa.current&&(zl.pagination.current=1),Tn&&Tn.onChange&&Tn.onChange(1,(_s=zl.pagination)===null||_s===void 0?void 0:_s.pageSize)),xr&&xr.scrollToFirstRowOnChange!==!1&&qr.body.current&&(0,To.Z)(0,{getContainer:()=>qr.body.current}),Vi==null||Vi(zl.pagination,zl.filters,zl.sorter,{currentDataSource:Ys(jo(as,zl.sorterStates,mo),zl.filterStates),action:Ua})},ca=(Sa,Ua)=>{ha({sorter:Sa,sorterStates:Ua},"sort",!1)},[Vs,Bs,hl,Ca]=po({prefixCls:Va,mergedColumns:gr,onSorterChange:ca,sortDirections:Hr||["ascend","descend"],tableLocale:pa,showSorterTooltip:$i}),Us=Me.useMemo(()=>jo(as,Bs,mo),[as,Bs]);_o.sorter=Ca(),_o.sorterStates=Bs;const ws=(Sa,Ua)=>{ha({filters:Sa,filterStates:Ua},"filter",!0)},[Rs,fh,Ea]=uc({prefixCls:Va,locale:pa,dropdownPrefixCls:Ms,mergedColumns:gr,onFilterChange:ws,getPopupContainer:Ui||$o}),Ta=Ys(Us,fh);_o.filters=Ea,_o.filterStates=fh;const ja=Me.useMemo(()=>{const Sa={};return Object.keys(Ea).forEach(Ua=>{Ea[Ua]!==null&&(Sa[Ua]=Ea[Ua])}),Object.assign(Object.assign({},hl),{filters:Sa})},[hl,Ea]),[ms]=ho(ja),js=(Sa,Ua)=>{ha({pagination:Object.assign(Object.assign({},_o.pagination),{current:Sa,pageSize:Ua})},"paginate")},[ra,Za]=Hh(Ta.length,js,Tn);_o.pagination=Tn===!1?{}:Qu(ra,Tn),_o.resetPagination=Za;const zs=Me.useMemo(()=>{if(Tn===!1||!ra.pageSize)return Ta;const{current:Sa=1,total:Ua,pageSize:ks=Ru}=ra;return Ta.length<Ua?Ta.length>ks?Ta.slice((Sa-1)*ks,Sa*ks):Ta:Ta.slice((Sa-1)*ks,Sa*ks)},[!!Tn,Ta,ra&&ra.current,ra&&ra.pageSize,ra&&ra.total]),[jl,au]=$s({prefixCls:Va,data:Ta,pageData:zs,getRowKey:ya,getRecordByKey:eo,expandType:Mo,childrenColumnName:mo,locale:pa,getPopupContainer:Ui||$o},ei),Yl=(Sa,Ua,ks)=>{let Ya;return typeof Ci=="function"?Ya=qe()(Ci(Sa,Ua,ks)):Ya=qe()(Ci),qe()({[`${Va}-row-selected`]:au.has(ya(Sa,Ua))},Ya)};bo.__PARENT_RENDER_ICON__=bo.expandIcon,bo.expandIcon=bo.expandIcon||Xr||ta(pa),Mo==="nest"&&bo.expandIconColumnIndex===void 0?bo.expandIconColumnIndex=ei?1:0:bo.expandIconColumnIndex>0&&ei&&(bo.expandIconColumnIndex-=1),typeof bo.indentSize!="number"&&(bo.indentSize=typeof zo=="number"?zo:15);const wu=Me.useCallback(Sa=>ms(jl(Rs(Vs(Sa)))),[Vs,Rs,jl]);let Cu,su;if(Tn!==!1&&(ra!=null&&ra.total)){let Sa;ra.size?Sa=ra.size:Sa=oo==="small"||oo==="middle"?"small":void 0;const Ua=fa=>Me.createElement(wo.Z,Object.assign({},ra,{className:qe()(`${Va}-pagination ${Va}-pagination-${fa}`,ra.className),size:Sa})),ks=wa==="rtl"?"left":"right",{position:Ya}=ra;if(Ya!==null&&Array.isArray(Ya)){const fa=Ya.find(Zu=>Zu.includes("top")),_s=Ya.find(Zu=>Zu.includes("bottom")),zl=Ya.every(Zu=>`${Zu}`=="none");!fa&&!_s&&!zl&&(su=Ua(ks)),fa&&(Cu=Ua(fa.toLowerCase().replace("top",""))),_s&&(su=Ua(_s.toLowerCase().replace("bottom","")))}else su=Ua(ks)}let La;typeof Pr=="boolean"?La={spinning:Pr}:typeof Pr=="object"&&(La=Object.assign({spinning:!0},Pr));const[Xs,fs]=dh(Va),[,Ha]=(0,Bo.Z)(),lu=qe()(`${Va}-wrapper`,sa==null?void 0:sa.className,{[`${Va}-wrapper-rtl`]:wa==="rtl"},_t,on,fs),kh=Object.assign(Object.assign({},sa==null?void 0:sa.style),Wt),Eu=Sr&&Sr.emptyText||(os==null?void 0:os("Table"))||Me.createElement(Mr.Z,{componentName:"Table"}),th=Fr?Wi:_i,gh={},Xl=Me.useMemo(()=>{const{fontSize:Sa,lineHeight:Ua,padding:ks,paddingXS:Ya,paddingSM:fa}=Ha,_s=Math.floor(Sa*Ua);switch(oo){case"large":return ks*2+_s;case"small":return Ya*2+_s;default:return fa*2+_s}},[Ha,oo]);return Fr&&(gh.listItemHeight=Xl),Xs(Me.createElement("div",{ref:Ue,className:lu,style:kh},Me.createElement(ua.Z,Object.assign({spinning:!1},La),Cu,Me.createElement(th,Object.assign({},gh,Ho,{columns:gr,direction:wa,expandable:bo,prefixCls:Va,className:qe()({[`${Va}-middle`]:oo==="middle",[`${Va}-small`]:oo==="small",[`${Va}-bordered`]:wn,[`${Va}-empty`]:as.length===0}),data:zs,rowKey:ya,rowClassName:Yl,emptyText:Eu,internalHooks:De,internalRefs:qr,transformColumns:wu})),su)))};var Nc=Me.forwardRef(Fc);const od=(Xe,Ue)=>{const zt=Me.useRef(0);return zt.current+=1,Me.createElement(Nc,Object.assign({},Xe,{ref:Ue,_renderTimes:zt.current}))},Hn=Me.forwardRef(od);Hn.SELECTION_COLUMN=ds,Hn.EXPAND_COLUMN=ce,Hn.SELECTION_ALL=es,Hn.SELECTION_INVERT=Aa,Hn.SELECTION_NONE=za,Hn.Column=Dr,Hn.ColumnGroup=fo,Hn.Summary=ot;var yr=Hn,Jo=yr},12563:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return gt}});var ce=ve(59301),De=ve(99267),ze=ve(92310),wt=ve.n(ze),Ze=ve(36785),ht=ve(47729),Me=ve(14088),yt=ve(36355),ct=ve(17313),He=ve(37613),st=ve(83116);const mt=Re=>{const{paddingXXS:At,lineWidth:qe,tagPaddingHorizontal:Et,componentCls:kt}=Re,Bt=Et-qe,Gt=At-qe;return{[kt]:Object.assign(Object.assign({},(0,ct.Wf)(Re)),{display:"inline-block",height:"auto",marginInlineEnd:Re.marginXS,paddingInline:Bt,fontSize:Re.tagFontSize,lineHeight:Re.tagLineHeight,whiteSpace:"nowrap",background:Re.defaultBg,border:`${Re.lineWidth}px ${Re.lineType} ${Re.colorBorder}`,borderRadius:Re.borderRadiusSM,opacity:1,transition:`all ${Re.motionDurationMid}`,textAlign:"start",position:"relative",[`&${kt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Re.defaultColor},[`${kt}-close-icon`]:{marginInlineStart:Gt,color:Re.colorTextDescription,fontSize:Re.tagIconSize,cursor:"pointer",transition:`all ${Re.motionDurationMid}`,"&:hover":{color:Re.colorTextHeading}},[`&${kt}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Re.iconCls}-close, ${Re.iconCls}-close:hover`]:{color:Re.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${kt}-checkable-checked):hover`]:{color:Re.colorPrimary,backgroundColor:Re.colorFillSecondary},"&:active, &-checked":{color:Re.colorTextLightSolid},"&-checked":{backgroundColor:Re.colorPrimary,"&:hover":{backgroundColor:Re.colorPrimaryHover}},"&:active":{backgroundColor:Re.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Re.iconCls} + span, > span + ${Re.iconCls}`]:{marginInlineStart:Bt}}),[`${kt}-borderless`]:{borderColor:"transparent",background:Re.tagBorderlessBg}}},dt=Re=>{const{lineWidth:At,fontSizeIcon:qe}=Re,Et=Re.fontSizeSM,kt=`${Re.lineHeightSM*Et}px`;return(0,He.TS)(Re,{tagFontSize:Et,tagLineHeight:kt,tagIconSize:qe-2*At,tagPaddingHorizontal:8,tagBorderlessBg:Re.colorFillTertiary})},Ae=Re=>({defaultBg:Re.colorFillQuaternary,defaultColor:Re.colorText});var te=(0,st.Z)("Tag",Re=>{const At=dt(Re);return mt(At)},Ae),ee=function(Re,At){var qe={};for(var Et in Re)Object.prototype.hasOwnProperty.call(Re,Et)&&At.indexOf(Et)<0&&(qe[Et]=Re[Et]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var kt=0,Et=Object.getOwnPropertySymbols(Re);kt<Et.length;kt++)At.indexOf(Et[kt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Et[kt])&&(qe[Et[kt]]=Re[Et[kt]]);return qe},se=Re=>{const{prefixCls:At,style:qe,className:Et,checked:kt,onChange:Bt,onClick:Gt}=Re,Ut=ee(Re,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:lt,tag:$e}=ce.useContext(yt.E_),Nt=en=>{Bt==null||Bt(!kt),Gt==null||Gt(en)},cn=lt("tag",At),[sn,Ft]=te(cn),$t=wt()(cn,`${cn}-checkable`,{[`${cn}-checkable-checked`]:kt},$e==null?void 0:$e.className,Et,Ft);return sn(ce.createElement("span",Object.assign({},Ut,{style:Object.assign(Object.assign({},qe),$e==null?void 0:$e.style),className:$t,onClick:Nt})))},de=ve(45157);const me=Re=>(0,de.Z)(Re,(At,qe)=>{let{textColor:Et,lightBorderColor:kt,lightColor:Bt,darkColor:Gt}=qe;return{[`${Re.componentCls}-${At}`]:{color:Et,background:Bt,borderColor:kt,"&-inverse":{color:Re.colorTextLightSolid,background:Gt,borderColor:Gt},[`&${Re.componentCls}-borderless`]:{borderColor:"transparent"}}}});var we=(0,st.b)(["Tag","preset"],Re=>{const At=dt(Re);return me(At)},Ae);function Ne(Re){return typeof Re!="string"?Re:Re.charAt(0).toUpperCase()+Re.slice(1)}const Fe=(Re,At,qe)=>{const Et=Ne(qe);return{[`${Re.componentCls}-${At}`]:{color:Re[`color${qe}`],background:Re[`color${Et}Bg`],borderColor:Re[`color${Et}Border`],[`&${Re.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ie=(0,st.b)(["Tag","status"],Re=>{const At=dt(Re);return[Fe(At,"success","Success"),Fe(At,"processing","Info"),Fe(At,"error","Error"),Fe(At,"warning","Warning")]},Ae),je=function(Re,At){var qe={};for(var Et in Re)Object.prototype.hasOwnProperty.call(Re,Et)&&At.indexOf(Et)<0&&(qe[Et]=Re[Et]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var kt=0,Et=Object.getOwnPropertySymbols(Re);kt<Et.length;kt++)At.indexOf(Et[kt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Et[kt])&&(qe[Et[kt]]=Re[Et[kt]]);return qe};const Je=(Re,At)=>{const{prefixCls:qe,className:Et,rootClassName:kt,style:Bt,children:Gt,icon:Ut,color:lt,onClose:$e,closeIcon:Nt,closable:cn,bordered:sn=!0}=Re,Ft=je(Re,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:$t,direction:en,tag:Nn}=ce.useContext(yt.E_),[fn,Mn]=ce.useState(!0);ce.useEffect(()=>{"visible"in Ft&&Mn(Ft.visible)},[Ft.visible]);const pt=(0,Ze.o2)(lt),Ln=(0,Ze.yT)(lt),Un=pt||Ln,Zt=Object.assign(Object.assign({backgroundColor:lt&&!Un?lt:void 0},Nn==null?void 0:Nn.style),Bt),tn=$t("tag",qe),[Rt,Lt]=te(tn),ut=wt()(tn,Nn==null?void 0:Nn.className,{[`${tn}-${lt}`]:Un,[`${tn}-has-color`]:lt&&!Un,[`${tn}-hidden`]:!fn,[`${tn}-rtl`]:en==="rtl",[`${tn}-borderless`]:!sn},Et,kt,Lt),Ge=xe=>{xe.stopPropagation(),$e==null||$e(xe),!xe.defaultPrevented&&Mn(!1)},[,Dt]=(0,ht.Z)(cn,Nt,xe=>xe===null?ce.createElement(De.Z,{className:`${tn}-close-icon`,onClick:Ge}):ce.createElement("span",{className:`${tn}-close-icon`,onClick:Ge},xe),null,!1),Tt=typeof Ft.onClick=="function"||Gt&&Gt.type==="a",ot=Ut||null,et=ot?ce.createElement(ce.Fragment,null,ot,Gt&&ce.createElement("span",null,Gt)):Gt,Te=ce.createElement("span",Object.assign({},Ft,{ref:At,className:ut,style:Zt}),et,Dt,pt&&ce.createElement(we,{key:"preset",prefixCls:tn}),Ln&&ce.createElement(Ie,{key:"status",prefixCls:tn}));return Rt(Tt?ce.createElement(Me.Z,{component:"Tag"},Te):Te)},Ke=ce.forwardRef(Je);Ke.CheckableTag=se;var gt=Ke},17574:function(Cn,un,ve){"use strict";ve.d(un,{default:function(){return lt}});var ce=ve(54844),De=ve(80702),ze=ve(52671),wt=ve(8657),Ze=ve(72308),ht=ve(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},yt=Me,ct=ve(7657),He=function(Nt,cn){return ht.createElement(ct.Z,(0,Ze.Z)({},Nt,{ref:cn,icon:yt}))},st=ht.forwardRef(He),mt=st,dt=ve(92310),Ae=ve.n(dt),te=ve(35654),ee=ve(71430),he=ve(36355),se=ve(56082),de=ve(62892),me=ve(20648);const we=4;function Ne($e){const{dropPosition:Nt,dropLevelOffset:cn,prefixCls:sn,indent:Ft,direction:$t="ltr"}=$e,en=$t==="ltr"?"left":"right",Nn=$t==="ltr"?"right":"left",fn={[en]:-cn*Ft+we,[Nn]:0};switch(Nt){case-1:fn.top=-3;break;case 1:fn.bottom=-3;break;default:fn.bottom=-3,fn[en]=Ft+we;break}return ht.createElement("div",{style:fn,className:`${sn}-drop-indicator`})}var Fe=ve(71997),je=ht.forwardRef(($e,Nt)=>{const{getPrefixCls:cn,direction:sn,virtual:Ft,tree:$t}=ht.useContext(he.E_),{prefixCls:en,className:Nn,showIcon:fn=!1,showLine:Mn,switcherIcon:pt,blockNode:Ln=!1,children:Un,checkable:Zt=!1,selectable:tn=!0,draggable:Rt,motion:Lt,style:ut}=$e,Ge=cn("tree",en),Dt=cn(),Tt=Lt!=null?Lt:Object.assign(Object.assign({},(0,de.Z)(Dt)),{motionAppear:!1}),ot=Object.assign(Object.assign({},$e),{checkable:Zt,selectable:tn,showIcon:fn,motion:Tt,blockNode:Ln,showLine:!!Mn,dropIndicatorRender:Ne}),[et,Te]=(0,me.ZP)(Ge),xe=ht.useMemo(()=>{if(!Rt)return!1;let Be={};switch(typeof Rt){case"function":Be.nodeDraggable=Rt;break;case"object":Be=Object.assign({},Rt);break;default:break}return Be.icon!==!1&&(Be.icon=Be.icon||ht.createElement(se.Z,null)),Be},[Rt]),Se=Be=>ht.createElement(Fe.Z,{prefixCls:Ge,switcherIcon:pt,treeNodeProps:Be,showLine:Mn});return et(ht.createElement(ce.Z,Object.assign({itemHeight:20,ref:Nt,virtual:Ft},ot,{style:Object.assign(Object.assign({},$t==null?void 0:$t.style),ut),prefixCls:Ge,className:Ae()({[`${Ge}-icon-hide`]:!fn,[`${Ge}-block-node`]:Ln,[`${Ge}-unselectable`]:!tn,[`${Ge}-rtl`]:sn==="rtl"},$t==null?void 0:$t.className,Nn,Te),direction:sn,checkable:Zt&&ht.createElement("span",{className:`${Ge}-checkbox-inner`}),selectable:tn,switcherIcon:Se,draggable:xe}),Un))}),Je;(function($e){$e[$e.None=0]="None",$e[$e.Start=1]="Start",$e[$e.End=2]="End"})(Je||(Je={}));function Ke($e,Nt){function cn(sn){const{key:Ft,children:$t}=sn;Nt(Ft,sn)!==!1&&Ke($t||[],Nt)}$e.forEach(cn)}function gt($e){let{treeData:Nt,expandedKeys:cn,startKey:sn,endKey:Ft}=$e;const $t=[];let en=Je.None;if(sn&&sn===Ft)return[sn];if(!sn||!Ft)return[];function Nn(fn){return fn===sn||fn===Ft}return Ke(Nt,fn=>{if(en===Je.End)return!1;if(Nn(fn)){if($t.push(fn),en===Je.None)en=Je.Start;else if(en===Je.Start)return en=Je.End,!1}else en===Je.Start&&$t.push(fn);return cn.includes(fn)}),$t}function Re($e,Nt){const cn=(0,De.Z)(Nt),sn=[];return Ke($e,(Ft,$t)=>{const en=cn.indexOf(Ft);return en!==-1&&(sn.push($t),cn.splice(en,1)),!!cn.length}),sn}var At=function($e,Nt){var cn={};for(var sn in $e)Object.prototype.hasOwnProperty.call($e,sn)&&Nt.indexOf(sn)<0&&(cn[sn]=$e[sn]);if($e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,sn=Object.getOwnPropertySymbols($e);Ft<sn.length;Ft++)Nt.indexOf(sn[Ft])<0&&Object.prototype.propertyIsEnumerable.call($e,sn[Ft])&&(cn[sn[Ft]]=$e[sn[Ft]]);return cn};function qe($e){const{isLeaf:Nt,expanded:cn}=$e;return Nt?ht.createElement(ze.Z,null):cn?ht.createElement(wt.Z,null):ht.createElement(mt,null)}function Et($e){let{treeData:Nt,children:cn}=$e;return Nt||(0,ee.zn)(cn)}const kt=($e,Nt)=>{var{defaultExpandAll:cn,defaultExpandParent:sn,defaultExpandedKeys:Ft}=$e,$t=At($e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const en=ht.useRef(),Nn=ht.useRef(),fn=()=>{const{keyEntities:xe}=(0,ee.I8)(Et($t));let Se;return cn?Se=Object.keys(xe):sn?Se=(0,te.r7)($t.expandedKeys||Ft||[],xe):Se=$t.expandedKeys||Ft,Se},[Mn,pt]=ht.useState($t.selectedKeys||$t.defaultSelectedKeys||[]),[Ln,Un]=ht.useState(()=>fn());ht.useEffect(()=>{"selectedKeys"in $t&&pt($t.selectedKeys)},[$t.selectedKeys]),ht.useEffect(()=>{"expandedKeys"in $t&&Un($t.expandedKeys)},[$t.expandedKeys]);const Zt=(xe,Se)=>{var Be;return"expandedKeys"in $t||Un(xe),(Be=$t.onExpand)===null||Be===void 0?void 0:Be.call($t,xe,Se)},tn=(xe,Se)=>{var Be;const{multiple:_e}=$t,{node:Ee,nativeEvent:ft}=Se,{key:Xt=""}=Ee,an=Et($t),Qt=Object.assign(Object.assign({},Se),{selected:!0}),En=(ft==null?void 0:ft.ctrlKey)||(ft==null?void 0:ft.metaKey),Yn=ft==null?void 0:ft.shiftKey;let zn;_e&&En?(zn=xe,en.current=Xt,Nn.current=zn,Qt.selectedNodes=Re(an,zn)):_e&&Yn?(zn=Array.from(new Set([].concat((0,De.Z)(Nn.current||[]),(0,De.Z)(gt({treeData:an,expandedKeys:Ln,startKey:Xt,endKey:en.current}))))),Qt.selectedNodes=Re(an,zn)):(zn=[Xt],en.current=Xt,Nn.current=zn,Qt.selectedNodes=Re(an,zn)),(Be=$t.onSelect)===null||Be===void 0||Be.call($t,zn,Qt),"selectedKeys"in $t||pt(zn)},{getPrefixCls:Rt,direction:Lt}=ht.useContext(he.E_),{prefixCls:ut,className:Ge,showIcon:Dt=!0,expandAction:Tt="click"}=$t,ot=At($t,["prefixCls","className","showIcon","expandAction"]),et=Rt("tree",ut),Te=Ae()(`${et}-directory`,{[`${et}-directory-rtl`]:Lt==="rtl"},Ge);return ht.createElement(je,Object.assign({icon:qe,ref:Nt,blockNode:!0},ot,{showIcon:Dt,expandAction:Tt,prefixCls:et,className:Te,expandedKeys:Ln,selectedKeys:Mn,onSelect:tn,onExpand:Zt}))};var Gt=ht.forwardRef(kt);const Ut=je;Ut.DirectoryTree=Gt,Ut.TreeNode=ce.O;var lt=Ut},20648:function(Cn,un,ve){"use strict";ve.d(un,{TM:function(){return dt},Yk:function(){return mt}});var ce=ve(93083),De=ve(98447),ze=ve(17313),wt=ve(8378),Ze=ve(37613),ht=ve(83116);const Me=new ce.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),yt=(Ae,te)=>({[`.${Ae}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),ct=(Ae,te)=>({[`.${Ae}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:te.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${te.lineWidthBold}px solid ${te.colorPrimary}`,borderRadius:"50%",content:'""'}}}),He=(Ae,te)=>{const{treeCls:ee,treeNodeCls:he,treeNodePadding:se,titleHeight:de,nodeSelectedBg:me,nodeHoverBg:we}=te,Ne=te.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,ze.Wf)(te)),{background:te.colorBgContainer,borderRadius:te.borderRadius,transition:`background-color ${te.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,ze.oN)(te)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${he}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Me,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${he}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,ze.oN)(te)),[`&:not(${he}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:de,lineHeight:`${de}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${te.motionDurationSlow}`,[`${he}:hover &`]:{opacity:.45}},[`&${he}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:de}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},yt(Ae,te)),{position:"relative",flex:"none",alignSelf:"stretch",width:de,margin:0,lineHeight:`${de}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:te.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:de/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:de/2*.8,height:de/2,borderBottom:`1px solid ${te.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Ne},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:de,margin:0,padding:`0 ${te.paddingXS/2}px`,color:"inherit",lineHeight:`${de}px`,background:"transparent",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:we},[`&${ee}-node-selected`]:{backgroundColor:me},[`${ee}-iconEle`]:{display:"inline-block",width:de,height:de,lineHeight:`${de}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${de}px`,userSelect:"none"},ct(Ae,te)),[`${he}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${te.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:de/2,bottom:-se,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${he}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${de/2}px !important`}}}}})}},st=Ae=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:he,directoryNodeSelectedBg:se,directoryNodeSelectedColor:de}=Ae;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:he,insetInlineStart:0,transition:`background-color ${Ae.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Ae.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${Ae.motionDurationMid}`},[`${te}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${te}-node-selected`]:{color:de,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${te}-switcher`]:{color:de},[`${te}-node-content-wrapper`]:{color:de,background:"transparent"}}}}}},mt=(Ae,te)=>{const ee=`.${Ae}`,he=`${ee}-treenode`,se=te.paddingXS/2,de=(0,Ze.TS)(te,{treeCls:ee,treeNodeCls:he,treeNodePadding:se});return[He(Ae,de),st(de)]},dt=Ae=>{const{controlHeightSM:te}=Ae;return{titleHeight:te,nodeHoverBg:Ae.controlItemBgHover,nodeSelectedBg:Ae.controlItemBgActive}};un.ZP=(0,ht.Z)("Tree",(Ae,te)=>{let{prefixCls:ee}=te;return[{[Ae.componentCls]:(0,De.C2)(`${ee}-checkbox`,Ae)},mt(ee,Ae),(0,wt.Z)(Ae)]},Ae=>{const{colorTextLightSolid:te,colorPrimary:ee}=Ae;return Object.assign(Object.assign({},dt(Ae)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},71997:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return he}});var ce=ve(72308),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},wt=ze,Ze=ve(7657),ht=function(de,me){return De.createElement(Ze.Z,(0,ce.Z)({},de,{ref:me,icon:wt}))},Me=De.forwardRef(ht),yt=Me,ct=ve(52671),He=ve(58617),st=ve(15075),mt=ve(43531),dt=ve(92310),Ae=ve.n(dt),te=ve(92343),he=se=>{const{prefixCls:de,switcherIcon:me,treeNodeProps:we,showLine:Ne}=se,{isLeaf:Fe,expanded:Ie,loading:je}=we;if(je)return De.createElement(He.Z,{className:`${de}-switcher-loading-icon`});let Je;if(Ne&&typeof Ne=="object"&&(Je=Ne.showLeafIcon),Fe){if(!Ne)return null;if(typeof Je!="boolean"&&Je){const Re=typeof Je=="function"?Je(we):Je,At=`${de}-switcher-line-custom-icon`;return(0,te.l$)(Re)?(0,te.Tm)(Re,{className:Ae()(Re.props.className||"",At)}):Re}return Je?De.createElement(ct.Z,{className:`${de}-switcher-line-icon`}):De.createElement("span",{className:`${de}-switcher-leaf-line`})}const Ke=`${de}-switcher-icon`,gt=typeof me=="function"?me(we):me;return(0,te.l$)(gt)?(0,te.Tm)(gt,{className:Ae()(gt.props.className||"",Ke)}):gt!==void 0?gt:Ne?Ie?De.createElement(st.Z,{className:`${de}-switcher-line-icon`}):De.createElement(mt.Z,{className:`${de}-switcher-line-icon`}):De.createElement(yt,{className:Ke})}},99498:function(Cn,un,ve){(function(ce){ce(ve(89780))})(function(ce){ce.defineOption("placeholder","",function(yt,ct,He){var st=He&&He!=ce.Init;if(ct&&!st)yt.on("blur",Ze),yt.on("change",ht),yt.on("swapDoc",ht),ce.on(yt.getInputField(),"compositionupdate",yt.state.placeholderCompose=function(){wt(yt)}),ht(yt);else if(!ct&&st){yt.off("blur",Ze),yt.off("change",ht),yt.off("swapDoc",ht),ce.off(yt.getInputField(),"compositionupdate",yt.state.placeholderCompose),De(yt);var mt=yt.getWrapperElement();mt.className=mt.className.replace(" CodeMirror-empty","")}ct&&!yt.hasFocus()&&Ze(yt)});function De(yt){yt.state.placeholder&&(yt.state.placeholder.parentNode.removeChild(yt.state.placeholder),yt.state.placeholder=null)}function ze(yt){De(yt);var ct=yt.state.placeholder=document.createElement("pre");ct.style.cssText="height: 0; overflow: visible",ct.style.direction=yt.getOption("direction"),ct.className="CodeMirror-placeholder CodeMirror-line-like";var He=yt.getOption("placeholder");typeof He=="string"&&(He=document.createTextNode(He)),ct.appendChild(He),yt.display.lineSpace.insertBefore(ct,yt.display.lineSpace.firstChild)}function wt(yt){setTimeout(function(){var ct=!1,He=yt.getInputField();He.nodeName=="TEXTAREA"?ct=!He.value:yt.lineCount()==1&&(ct=!/[^\u200b]/.test(He.querySelector(".CodeMirror-line").textContent)),ct?ze(yt):De(yt)},20)}function Ze(yt){Me(yt)&&ze(yt)}function ht(yt){var ct=yt.getWrapperElement(),He=Me(yt);ct.className=ct.className.replace(" CodeMirror-empty","")+(He?" CodeMirror-empty":""),He?ze(yt):De(yt)}function Me(yt){return yt.lineCount()===1&&yt.getLine(0)===""}})},25717:function(Cn,un,ve){(function(ce){ce(ve(89780))})(function(ce){var De={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ze=ce.Pos;ce.defineOption("autoCloseBrackets",!1,function(te,ee,he){he&&he!=ce.Init&&(te.removeKeyMap(Ze),te.state.closeBrackets=null),ee&&(ht(wt(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(Ze))});function wt(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:De[ee]}var Ze={Backspace:ct,Enter:He};function ht(te){for(var ee=0;ee<te.length;ee++){var he=te.charAt(ee),se="'"+he+"'";Ze[se]||(Ze[se]=Me(he))}}ht(De.pairs+"`");function Me(te){return function(ee){return mt(ee,te)}}function yt(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var he=te.getModeAt(te.getCursor());return he.closeBrackets||ee}function ct(te){var ee=yt(te);if(!ee||te.getOption("disableInput"))return ce.Pass;for(var he=wt(ee,"pairs"),se=te.listSelections(),de=0;de<se.length;de++){if(!se[de].empty())return ce.Pass;var me=dt(te,se[de].head);if(!me||he.indexOf(me)%2!=0)return ce.Pass}for(var de=se.length-1;de>=0;de--){var we=se[de].head;te.replaceRange("",ze(we.line,we.ch-1),ze(we.line,we.ch+1),"+delete")}}function He(te){var ee=yt(te),he=ee&&wt(ee,"explode");if(!he||te.getOption("disableInput"))return ce.Pass;for(var se=te.listSelections(),de=0;de<se.length;de++){if(!se[de].empty())return ce.Pass;var me=dt(te,se[de].head);if(!me||he.indexOf(me)%2!=0)return ce.Pass}te.operation(function(){var we=te.lineSeparator()||`
|
|
|
`;te.replaceSelection(we+we,null),te.execCommand("goCharLeft"),se=te.listSelections();for(var Ne=0;Ne<se.length;Ne++){var Fe=se[Ne].head.line;te.indentLine(Fe,null,!0),te.indentLine(Fe+1,null,!0)}})}function st(te){var ee=ce.cmpPos(te.anchor,te.head)>0;return{anchor:new ze(te.anchor.line,te.anchor.ch+(ee?-1:1)),head:new ze(te.head.line,te.head.ch+(ee?1:-1))}}function mt(te,ee){var he=yt(te);if(!he||te.getOption("disableInput"))return ce.Pass;var se=wt(he,"pairs"),de=se.indexOf(ee);if(de==-1)return ce.Pass;for(var me=wt(he,"closeBefore"),we=wt(he,"triples"),Ne=se.charAt(de+1)==ee,Fe=te.listSelections(),Ie=de%2==0,je,Je=0;Je<Fe.length;Je++){var Ke=Fe[Je],gt=Ke.head,Re,At=te.getRange(gt,ze(gt.line,gt.ch+1));if(Ie&&!Ke.empty())Re="surround";else if((Ne||!Ie)&&At==ee)Ne&&Ae(te,gt)?Re="both":we.indexOf(ee)>=0&&te.getRange(gt,ze(gt.line,gt.ch+3))==ee+ee+ee?Re="skipThree":Re="skip";else if(Ne&>.ch>1&&we.indexOf(ee)>=0&&te.getRange(ze(gt.line,gt.ch-2),gt)==ee+ee){if(gt.ch>2&&/\bstring/.test(te.getTokenTypeAt(ze(gt.line,gt.ch-2))))return ce.Pass;Re="addFour"}else if(Ne){var qe=gt.ch==0?" ":te.getRange(ze(gt.line,gt.ch-1),gt);if(!ce.isWordChar(At)&&qe!=ee&&!ce.isWordChar(qe))Re="both";else return ce.Pass}else if(Ie&&(At.length===0||/\s/.test(At)||me.indexOf(At)>-1))Re="both";else return ce.Pass;if(!je)je=Re;else if(je!=Re)return ce.Pass}var Et=de%2?se.charAt(de-1):ee,kt=de%2?ee:se.charAt(de+1);te.operation(function(){if(je=="skip")te.execCommand("goCharRight");else if(je=="skipThree")for(var Bt=0;Bt<3;Bt++)te.execCommand("goCharRight");else if(je=="surround"){for(var Gt=te.getSelections(),Bt=0;Bt<Gt.length;Bt++)Gt[Bt]=Et+Gt[Bt]+kt;te.replaceSelections(Gt,"around"),Gt=te.listSelections().slice();for(var Bt=0;Bt<Gt.length;Bt++)Gt[Bt]=st(Gt[Bt]);te.setSelections(Gt)}else je=="both"?(te.replaceSelection(Et+kt,null),te.triggerElectric(Et+kt),te.execCommand("goCharLeft")):je=="addFour"&&(te.replaceSelection(Et+Et+Et+Et,"before"),te.execCommand("goCharRight"))})}function dt(te,ee){var he=te.getRange(ze(ee.line,ee.ch-1),ze(ee.line,ee.ch+1));return he.length==2?he:null}function Ae(te,ee){var he=te.getTokenAt(ze(ee.line,ee.ch+1));return/\bstring/.test(he.type)&&he.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(Cn,un,ve){(function(ce){ce(ve(89780),ve(32855))})(function(ce){ce.defineOption("autoCloseTags",!1,function(ct,He,st){if(st!=ce.Init&&st&&ct.removeKeyMap("autoCloseTags"),!!He){var mt={name:"autoCloseTags"};(typeof He!="object"||He.whenClosing!==!1)&&(mt["'/'"]=function(dt){return ht(dt)}),(typeof He!="object"||He.whenOpening!==!1)&&(mt["'>'"]=function(dt){return wt(dt)}),ct.addKeyMap(mt)}});var De=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ze=["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 wt(ct){if(ct.getOption("disableInput"))return ce.Pass;for(var He=ct.listSelections(),st=[],mt=ct.getOption("autoCloseTags"),dt=0;dt<He.length;dt++){if(!He[dt].empty())return ce.Pass;var Ae=He[dt].head,te=ct.getTokenAt(Ae),ee=ce.innerMode(ct.getMode(),te.state),he=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(he),de=se&&se.name;if(!de)return ce.Pass;var me=ee.mode.configuration=="html",we=typeof mt=="object"&&mt.dontCloseTags||me&&De,Ne=typeof mt=="object"&&mt.indentTags||me&&ze;te.end>Ae.ch&&(de=de.slice(0,de.length-te.end+Ae.ch));var Fe=de.toLowerCase();if(!de||te.type=="string"&&(te.end!=Ae.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==Ae.ch-te.start-1||we&&Me(we,Fe)>-1||yt(ct,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(he)||[],de,Ae,!0))return ce.Pass;var Ie=typeof mt=="object"&&mt.emptyTags;if(Ie&&Me(Ie,de)>-1){st[dt]={text:"/>",newPos:ce.Pos(Ae.line,Ae.ch+2)};continue}var je=Ne&&Me(Ne,Fe)>-1;st[dt]={indent:je,text:">"+(je?`
|
|
|
|
|
|
`:"")+"</"+de+">",newPos:je?ce.Pos(Ae.line+1,0):ce.Pos(Ae.line,Ae.ch+1)}}for(var Je=typeof mt=="object"&&mt.dontIndentOnAutoClose,dt=He.length-1;dt>=0;dt--){var Ke=st[dt];ct.replaceRange(Ke.text,He[dt].head,He[dt].anchor,"+insert");var gt=ct.listSelections().slice(0);gt[dt]={head:Ke.newPos,anchor:Ke.newPos},ct.setSelections(gt),!Je&&Ke.indent&&(ct.indentLine(Ke.newPos.line,null,!0),ct.indentLine(Ke.newPos.line+1,null,!0))}}function Ze(ct,He){for(var st=ct.listSelections(),mt=[],dt=He?"/":"</",Ae=ct.getOption("autoCloseTags"),te=typeof Ae=="object"&&Ae.dontIndentOnSlash,ee=0;ee<st.length;ee++){if(!st[ee].empty())return ce.Pass;var he=st[ee].head,se=ct.getTokenAt(he),de=ce.innerMode(ct.getMode(),se.state),me=de.state;if(He&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=he.ch-1))return ce.Pass;var we,Ne=de.mode.name!="xml"&&ct.getMode().name=="htmlmixed";if(Ne&&de.mode.name=="javascript")we=dt+"script";else if(Ne&&de.mode.name=="css")we=dt+"style";else{var Fe=de.mode.xmlCurrentContext&&de.mode.xmlCurrentContext(me);if(!Fe||Fe.length&&yt(ct,Fe,Fe[Fe.length-1],he))return ce.Pass;we=dt+Fe[Fe.length-1]}ct.getLine(he.line).charAt(se.end)!=">"&&(we+=">"),mt[ee]=we}if(ct.replaceSelections(mt),st=ct.listSelections(),!te)for(var ee=0;ee<st.length;ee++)(ee==st.length-1||st[ee].head.line<st[ee+1].head.line)&&ct.indentLine(st[ee].head.line)}function ht(ct){return ct.getOption("disableInput")?ce.Pass:Ze(ct,!0)}ce.commands.closeTag=function(ct){return Ze(ct)};function Me(ct,He){if(ct.indexOf)return ct.indexOf(He);for(var st=0,mt=ct.length;st<mt;++st)if(ct[st]==He)return st;return-1}function yt(ct,He,st,mt,dt){if(!ce.scanForClosingTag)return!1;var Ae=Math.min(ct.lastLine()+1,mt.line+500),te=ce.scanForClosingTag(ct,mt,null,Ae);if(!te||te.tag!=st)return!1;for(var ee=dt?1:0,he=He.length-1;he>=0&&He[he]==st;he--)++ee;mt=te.to;for(var he=1;he<ee;he++){var se=ce.scanForClosingTag(ct,mt,null,Ae);if(!se||se.tag!=st)return!1;mt=se.to}return!0}})},32855:function(Cn,un,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";var De=ce.Pos;function ze(he,se){return he.line-se.line||he.ch-se.ch}var wt="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",Ze=wt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ht=new RegExp("<(/?)(["+wt+"]["+Ze+"]*)","g");function Me(he,se,de,me){this.line=se,this.ch=de,this.cm=he,this.text=he.getLine(se),this.min=me?Math.max(me.from,he.firstLine()):he.firstLine(),this.max=me?Math.min(me.to-1,he.lastLine()):he.lastLine()}function yt(he,se){var de=he.cm.getTokenTypeAt(De(he.line,se));return de&&/\btag\b/.test(de)}function ct(he){if(!(he.line>=he.max))return he.ch=0,he.text=he.cm.getLine(++he.line),!0}function He(he){if(!(he.line<=he.min))return he.text=he.cm.getLine(--he.line),he.ch=he.text.length,!0}function st(he){for(;;){var se=he.text.indexOf(">",he.ch);if(se==-1){if(ct(he))continue;return}if(!yt(he,se+1)){he.ch=se+1;continue}var de=he.text.lastIndexOf("/",se),me=de>-1&&!/\S/.test(he.text.slice(de+1,se));return he.ch=se+1,me?"selfClose":"regular"}}function mt(he){for(;;){var se=he.ch?he.text.lastIndexOf("<",he.ch-1):-1;if(se==-1){if(He(he))continue;return}if(!yt(he,se+1)){he.ch=se;continue}ht.lastIndex=se,he.ch=se;var de=ht.exec(he.text);if(de&&de.index==se)return de}}function dt(he){for(;;){ht.lastIndex=he.ch;var se=ht.exec(he.text);if(!se){if(ct(he))continue;return}if(!yt(he,se.index+1)){he.ch=se.index+1;continue}return he.ch=se.index+se[0].length,se}}function Ae(he){for(;;){var se=he.ch?he.text.lastIndexOf(">",he.ch-1):-1;if(se==-1){if(He(he))continue;return}if(!yt(he,se+1)){he.ch=se;continue}var de=he.text.lastIndexOf("/",se),me=de>-1&&!/\S/.test(he.text.slice(de+1,se));return he.ch=se+1,me?"selfClose":"regular"}}function te(he,se){for(var de=[];;){var me=dt(he),we,Ne=he.line,Fe=he.ch-(me?me[0].length:0);if(!me||!(we=st(he)))return;if(we!="selfClose")if(me[1]){for(var Ie=de.length-1;Ie>=0;--Ie)if(de[Ie]==me[2]){de.length=Ie;break}if(Ie<0&&(!se||se==me[2]))return{tag:me[2],from:De(Ne,Fe),to:De(he.line,he.ch)}}else de.push(me[2])}}function ee(he,se){for(var de=[];;){var me=Ae(he);if(!me)return;if(me=="selfClose"){mt(he);continue}var we=he.line,Ne=he.ch,Fe=mt(he);if(!Fe)return;if(Fe[1])de.push(Fe[2]);else{for(var Ie=de.length-1;Ie>=0;--Ie)if(de[Ie]==Fe[2]){de.length=Ie;break}if(Ie<0&&(!se||se==Fe[2]))return{tag:Fe[2],from:De(he.line,he.ch),to:De(we,Ne)}}}}ce.registerHelper("fold","xml",function(he,se){for(var de=new Me(he,se.line,0);;){var me=dt(de);if(!me||de.line!=se.line)return;var we=st(de);if(!we)return;if(!me[1]&&we!="selfClose"){var Ne=De(de.line,de.ch),Fe=te(de,me[2]);return Fe&&ze(Fe.from,Ne)>0?{from:Ne,to:Fe.from}:null}}}),ce.findMatchingTag=function(he,se,de){var me=new Me(he,se.line,se.ch,de);if(!(me.text.indexOf(">")==-1&&me.text.indexOf("<")==-1)){var we=st(me),Ne=we&&De(me.line,me.ch),Fe=we&&mt(me);if(!(!we||!Fe||ze(me,se)>0)){var Ie={from:De(me.line,me.ch),to:Ne,tag:Fe[2]};return we=="selfClose"?{open:Ie,close:null,at:"open"}:Fe[1]?{open:ee(me,Fe[2]),close:Ie,at:"close"}:(me=new Me(he,Ne.line,Ne.ch,de),{open:Ie,close:te(me,Fe[2]),at:"open"})}}},ce.findEnclosingTag=function(he,se,de,me){for(var we=new Me(he,se.line,se.ch,de);;){var Ne=ee(we,me);if(!Ne)break;var Fe=new Me(he,se.line,se.ch,de),Ie=te(Fe,Ne.tag);if(Ie)return{open:Ne,close:Ie}}},ce.scanForClosingTag=function(he,se,de,me){var we=new Me(he,se.line,se.ch,me?{from:0,to:me}:null);return te(we,de)}})},89780:function(Cn){(function(un,ve){Cn.exports=ve()})(this,function(){"use strict";var un=navigator.userAgent,ve=navigator.platform,ce=/gecko\/\d/i.test(un),De=/MSIE \d/.test(un),ze=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(un),wt=/Edge\/(\d+)/.exec(un),Ze=De||ze||wt,ht=Ze&&(De?document.documentMode||6:+(wt||ze)[1]),Me=!wt&&/WebKit\//.test(un),yt=Me&&/Qt\/\d+\.\d+/.test(un),ct=!wt&&/Chrome\//.test(un),He=/Opera\//.test(un),st=/Apple Computer/.test(navigator.vendor),mt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(un),dt=/PhantomJS/.test(un),Ae=!wt&&/AppleWebKit/.test(un)&&/Mobile\/\w+/.test(un),te=/Android/.test(un),ee=Ae||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(un),he=Ae||/Mac/.test(ve),se=/\bCrOS\b/.test(un),de=/win/i.test(ve),me=He&&un.match(/Version\/(\d*\.\d*)/);me&&(me=Number(me[1])),me&&me>=15&&(He=!1,Me=!0);var we=he&&(yt||He&&(me==null||me<12.11)),Ne=ce||Ze&&ht>=9;function Fe(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var Ie=function(ie,ae){var ge=ie.className,fe=Fe(ae).exec(ge);if(fe){var ye=ge.slice(fe.index+fe[0].length);ie.className=ge.slice(0,fe.index)+(ye?fe[1]+ye:"")}};function je(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function Je(ie,ae){return je(ie).appendChild(ae)}function Ke(ie,ae,ge,fe){var ye=document.createElement(ie);if(ge&&(ye.className=ge),fe&&(ye.style.cssText=fe),typeof ae=="string")ye.appendChild(document.createTextNode(ae));else if(ae)for(var ke=0;ke<ae.length;++ke)ye.appendChild(ae[ke]);return ye}function gt(ie,ae,ge,fe){var ye=Ke(ie,ae,ge,fe);return ye.setAttribute("role","presentation"),ye}var Re;document.createRange?Re=function(ie,ae,ge,fe){var ye=document.createRange();return ye.setEnd(fe||ie,ge),ye.setStart(ie,ae),ye}:Re=function(ie,ae,ge){var fe=document.body.createTextRange();try{fe.moveToElementText(ie.parentNode)}catch(ye){return fe}return fe.collapse(!0),fe.moveEnd("character",ge),fe.moveStart("character",ae),fe};function At(ie,ae){if(ae.nodeType==3&&(ae=ae.parentNode),ie.contains)return ie.contains(ae);do if(ae.nodeType==11&&(ae=ae.host),ae==ie)return!0;while(ae=ae.parentNode)}function qe(){var ie;try{ie=document.activeElement}catch(ae){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function Et(ie,ae){var ge=ie.className;Fe(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function kt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!Fe(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var Bt=function(ie){ie.select()};Ae?Bt=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ze&&(Bt=function(ie){try{ie.select()}catch(ae){}});function Gt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Ut(ie,ae,ge){ae||(ae={});for(var fe in ie)ie.hasOwnProperty(fe)&&(ge!==!1||!ae.hasOwnProperty(fe))&&(ae[fe]=ie[fe]);return ae}function lt(ie,ae,ge,fe,ye){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var ke=fe||0,We=ye||0;;){var at=ie.indexOf(" ",ke);if(at<0||at>=ae)return We+(ae-ke);We+=at-ke,We+=ge-We%ge,ke=at+1}}var $e=function(){this.id=null,this.f=null,this.time=0,this.handler=Gt(this.onTimeout,this)};$e.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},$e.prototype.set=function(ie,ae){this.f=ae;var ge=+new Date+ie;(!this.id||ge<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=ge)};function Nt(ie,ae){for(var ge=0;ge<ie.length;++ge)if(ie[ge]==ae)return ge;return-1}var cn=50,sn={toString:function(){return"CodeMirror.Pass"}},Ft={scroll:!1},$t={origin:"*mouse"},en={origin:"+move"};function Nn(ie,ae,ge){for(var fe=0,ye=0;;){var ke=ie.indexOf(" ",fe);ke==-1&&(ke=ie.length);var We=ke-fe;if(ke==ie.length||ye+We>=ae)return fe+Math.min(We,ae-ye);if(ye+=ke-fe,ye+=ge-ye%ge,fe=ke+1,ye>=ae)return fe}}var fn=[""];function Mn(ie){for(;fn.length<=ie;)fn.push(pt(fn)+" ");return fn[ie]}function pt(ie){return ie[ie.length-1]}function Ln(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function Un(ie,ae,ge){for(var fe=0,ye=ge(ae);fe<ie.length&&ge(ie[fe])<=ye;)fe++;ie.splice(fe,0,ae)}function Zt(){}function tn(ie,ae){var ge;return Object.create?ge=Object.create(ie):(Zt.prototype=ie,ge=new Zt),ae&&Ut(ae,ge),ge}var Rt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Lt(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Rt.test(ie))}function ut(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Lt(ie)?!0:ae.test(ie):Lt(ie)}function Ge(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var Dt=/[\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 Tt(ie){return ie.charCodeAt(0)>=768&&Dt.test(ie)}function ot(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Tt(ie.charAt(ae));)ae+=ge;return ae}function et(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var ye=(ae+ge)/2,ke=fe<0?Math.ceil(ye):Math.floor(ye);if(ke==ae)return ie(ke)?ae:ge;ie(ke)?ge=ke:ae=ke+fe}}function Te(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var ye=!1,ke=0;ke<ie.length;++ke){var We=ie[ke];(We.from<ge&&We.to>ae||ae==ge&&We.to==ae)&&(fe(Math.max(We.from,ae),Math.min(We.to,ge),We.level==1?"rtl":"ltr",ke),ye=!0)}ye||fe(ae,ge,"ltr")}var xe=null;function Se(ie,ae,ge){var fe;xe=null;for(var ye=0;ye<ie.length;++ye){var ke=ie[ye];if(ke.from<ae&&ke.to>ae)return ye;ke.to==ae&&(ke.from!=ke.to&&ge=="before"?fe=ye:xe=ye),ke.from==ae&&(ke.from!=ke.to&&ge!="before"?fe=ye:xe=ye)}return fe!=null?fe:xe}var Be=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ge(bt){return bt<=247?ie.charAt(bt):1424<=bt&&bt<=1524?"R":1536<=bt&&bt<=1785?ae.charAt(bt-1536):1774<=bt&&bt<=2220?"r":8192<=bt&&bt<=8203?"w":bt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ye=/[stwN]/,ke=/[LRr]/,We=/[Lb1n]/,at=/[1n]/;function it(bt,pn,jt){this.level=bt,this.from=pn,this.to=jt}return function(bt,pn){var jt=pn=="ltr"?"L":"R";if(bt.length==0||pn=="ltr"&&!fe.test(bt))return!1;for(var Zn=bt.length,jn=[],Ei=0;Ei<Zn;++Ei)jn.push(ge(bt.charCodeAt(Ei)));for(var Ai=0,Zi=jt;Ai<Zn;++Ai){var pr=jn[Ai];pr=="m"?jn[Ai]=Zi:Zi=pr}for(var Kr=0,Nr=jt;Kr<Zn;++Kr){var io=jn[Kr];io=="1"&&Nr=="r"?jn[Kr]="n":ke.test(io)&&(Nr=io,io=="r"&&(jn[Kr]="R"))}for(var Go=1,Lr=jn[0];Go<Zn-1;++Go){var oa=jn[Go];oa=="+"&&Lr=="1"&&jn[Go+1]=="1"?jn[Go]="1":oa==","&&Lr==jn[Go+1]&&(Lr=="1"||Lr=="n")&&(jn[Go]=Lr),Lr=oa}for(var Ss=0;Ss<Zn;++Ss){var ol=jn[Ss];if(ol==",")jn[Ss]="N";else if(ol=="%"){var Ls=void 0;for(Ls=Ss+1;Ls<Zn&&jn[Ls]=="%";++Ls);for(var du=Ss&&jn[Ss-1]=="!"||Ls<Zn&&jn[Ls]=="1"?"1":"N",Zl=Ss;Zl<Ls;++Zl)jn[Zl]=du;Ss=Ls-1}}for(var qs=0,Lu=jt;qs<Zn;++qs){var Fl=jn[qs];Lu=="L"&&Fl=="1"?jn[qs]="L":ke.test(Fl)&&(Lu=Fl)}for(var el=0;el<Zn;++el)if(ye.test(jn[el])){var Da=void 0;for(Da=el+1;Da<Zn&&ye.test(jn[Da]);++Da);for(var Ts=(el?jn[el-1]:jt)=="L",cl=(Da<Zn?jn[Da]:jt)=="L",Nl=Ts==cl?Ts?"L":"R":jt,mh=el;mh<Da;++mh)jn[mh]=Nl;el=Da-1}for(var Fs=[],ih,Zs=0;Zs<Zn;)if(We.test(jn[Zs])){var bf=Zs;for(++Zs;Zs<Zn&&We.test(jn[Zs]);++Zs);Fs.push(new it(0,bf,Zs))}else{var Gu=Zs,Fu=Fs.length,fu=pn=="rtl"?1:0;for(++Zs;Zs<Zn&&jn[Zs]!="L";++Zs);for(var ls=Gu;ls<Zs;)if(at.test(jn[ls])){Gu<ls&&(Fs.splice(Fu,0,new it(1,Gu,ls)),Fu+=fu);var dl=ls;for(++ls;ls<Zs&&at.test(jn[ls]);++ls);Fs.splice(Fu,0,new it(2,dl,ls)),Fu+=fu,Gu=ls}else++ls;Gu<Zs&&Fs.splice(Fu,0,new it(1,Gu,Zs))}return pn=="ltr"&&(Fs[0].level==1&&(ih=bt.match(/^\s+/))&&(Fs[0].from=ih[0].length,Fs.unshift(new it(0,0,ih[0].length))),pt(Fs).level==1&&(ih=bt.match(/\s+$/))&&(pt(Fs).to-=ih[0].length,Fs.push(new it(0,Zn-ih[0].length,Zn)))),pn=="rtl"?Fs.reverse():Fs}}();function _e(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=Be(ie.text,ae)),ge}var Ee=[],ft=function(ie,ae,ge){if(ie.addEventListener)ie.addEventListener(ae,ge,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,ge);else{var fe=ie._handlers||(ie._handlers={});fe[ae]=(fe[ae]||Ee).concat(ge)}};function Xt(ie,ae){return ie._handlers&&ie._handlers[ae]||Ee}function an(ie,ae,ge){if(ie.removeEventListener)ie.removeEventListener(ae,ge,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,ge);else{var fe=ie._handlers,ye=fe&&fe[ae];if(ye){var ke=Nt(ye,ge);ke>-1&&(fe[ae]=ye.slice(0,ke).concat(ye.slice(ke+1)))}}}function Qt(ie,ae){var ge=Xt(ie,ae);if(ge.length)for(var fe=Array.prototype.slice.call(arguments,2),ye=0;ye<ge.length;++ye)ge[ye].apply(null,fe)}function En(ie,ae,ge){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),Qt(ie,ge||ae.type,ie,ae),pi(ae)||ae.codemirrorIgnore}function Yn(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var ge=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),fe=0;fe<ae.length;++fe)Nt(ge,ae[fe])==-1&&ge.push(ae[fe])}function zn(ie,ae){return Xt(ie,ae).length>0}function Dn(ie){ie.prototype.on=function(ae,ge){ft(this,ae,ge)},ie.prototype.off=function(ae,ge){an(this,ae,ge)}}function ii(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function gi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function pi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function Ii(ie){ii(ie),gi(ie)}function Yi(ie){return ie.target||ie.srcElement}function Jn(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),he&&ie.ctrlKey&&ae==1&&(ae=3),ae}var Wn=function(){if(Ze&&ht<9)return!1;var ie=Ke("div");return"draggable"in ie||"dragDrop"in ie}(),ti;function yi(ie){if(ti==null){var ae=Ke("span","\u200B");Je(ie,Ke("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(ti=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(Ze&&ht<8))}var ge=ti?Ke("span","\u200B"):Ke("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var mi;function dr(ie){if(mi!=null)return mi;var ae=Je(ie,document.createTextNode("A\u062EA")),ge=Re(ae,0,1).getBoundingClientRect(),fe=Re(ae,1,2).getBoundingClientRect();return je(ie),!ge||ge.left==ge.right?!1:mi=fe.right-ge.right<3}var mr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ae=0,ge=[],fe=ie.length;ae<=fe;){var ye=ie.indexOf(`
|
|
|
`,ae);ye==-1&&(ye=ie.length);var ke=ie.slice(ae,ie.charAt(ye-1)=="\r"?ye-1:ye),We=ke.indexOf("\r");We!=-1?(ge.push(ke.slice(0,We)),ae+=We+1):(ge.push(ke),ae=ye+1)}return ge}:function(ie){return ie.split(/\r\n?|\n/)},be=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ae){return!1}}:function(ie){var ae;try{ae=ie.ownerDocument.selection.createRange()}catch(ge){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},ci=function(){var ie=Ke("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Hi=null;function dn(ie){if(Hi!=null)return Hi;var ae=Je(ie,Ke("span","x")),ge=ae.getBoundingClientRect(),fe=Re(ae,0,1).getBoundingClientRect();return Hi=Math.abs(ge.left-fe.left)>1}var oi={},vi={};function Fi(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),oi[ie]=ae}function Vn(ie,ae){vi[ie]=ae}function bn(ie){if(typeof ie=="string"&&vi.hasOwnProperty(ie))ie=vi[ie];else if(ie&&typeof ie.name=="string"&&vi.hasOwnProperty(ie.name)){var ae=vi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=tn(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return bn("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return bn("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Mt(ie,ae){ae=bn(ae);var ge=oi[ae.name];if(!ge)return Mt(ie,"text/plain");var fe=ge(ie,ae);if(Ot.hasOwnProperty(ae.name)){var ye=Ot[ae.name];for(var ke in ye)ye.hasOwnProperty(ke)&&(fe.hasOwnProperty(ke)&&(fe["_"+ke]=fe[ke]),fe[ke]=ye[ke])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var We in ae.modeProps)fe[We]=ae.modeProps[We];return fe}var Ot={};function Ve(ie,ae){var ge=Ot.hasOwnProperty(ie)?Ot[ie]:Ot[ie]={};Ut(ae,ge)}function Yt(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var ge={};for(var fe in ae){var ye=ae[fe];ye instanceof Array&&(ye=ye.concat([])),ge[fe]=ye}return ge}function qt(ie,ae){for(var ge;ie.innerMode&&(ge=ie.innerMode(ae),!(!ge||ge.mode==ie));)ae=ge.state,ie=ge.mode;return ge||{mode:ie,state:ae}}function xt(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var nt=function(ie,ae,ge){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ge};nt.prototype.eol=function(){return this.pos>=this.string.length},nt.prototype.sol=function(){return this.pos==this.lineStart},nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},nt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},nt.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),ge;if(typeof ie=="string"?ge=ae==ie:ge=ae&&(ie.test?ie.test(ae):ie(ae)),ge)return++this.pos,ae},nt.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},nt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},nt.prototype.skipToEnd=function(){this.pos=this.string.length},nt.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},nt.prototype.backUp=function(ie){this.pos-=ie},nt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=lt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},nt.prototype.indentation=function(){return lt(this.string,null,this.tabSize)-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},nt.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(We){return ge?We.toLowerCase():We},ye=this.string.substr(this.pos,ie.length);if(fe(ye)==fe(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var ke=this.string.slice(this.pos).match(ie);return ke&&ke.index>0?null:(ke&&ae!==!1&&(this.pos+=ke[0].length),ke)}},nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},nt.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},nt.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},nt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function Kt(ie,ae){if(ae-=ie.first,ae<0||ae>=ie.size)throw new Error("There is no line "+(ae+ie.first)+" in the document.");for(var ge=ie;!ge.lines;)for(var fe=0;;++fe){var ye=ge.children[fe],ke=ye.chunkSize();if(ae<ke){ge=ye;break}ae-=ke}return ge.lines[ae]}function ln(ie,ae,ge){var fe=[],ye=ae.line;return ie.iter(ae.line,ge.line+1,function(ke){var We=ke.text;ye==ge.line&&(We=We.slice(0,ge.ch)),ye==ae.line&&(We=We.slice(ae.ch)),fe.push(We),++ye}),fe}function xn(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(ye){fe.push(ye.text)}),fe}function On(ie,ae){var ge=ae-ie.height;if(ge)for(var fe=ie;fe;fe=fe.parent)fe.height+=ge}function St(ie){if(ie.parent==null)return null;for(var ae=ie.parent,ge=Nt(ae.lines,ie),fe=ae.parent;fe;ae=fe,fe=fe.parent)for(var ye=0;fe.children[ye]!=ae;++ye)ge+=fe.children[ye].chunkSize();return ge+ae.first}function gn(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var ye=ie.children[fe],ke=ye.height;if(ae<ke){ie=ye;continue e}ae-=ke,ge+=ye.chunkSize()}return ge}while(!ie.lines);for(var We=0;We<ie.lines.length;++We){var at=ie.lines[We],it=at.height;if(ae<it)break;ae-=it}return ge+We}function Rn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function ai(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function hn(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof hn))return new hn(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function Jt(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function Xn(ie,ae){return ie.sticky==ae.sticky&&Jt(ie,ae)==0}function si(ie){return hn(ie.line,ie.ch)}function ui(ie,ae){return Jt(ie,ae)<0?ae:ie}function Qn(ie,ae){return Jt(ie,ae)<0?ie:ae}function di(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function hi(ie,ae){if(ae.line<ie.first)return hn(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?hn(ge,Kt(ie,ge).text.length):Ri(ae,Kt(ie,ae.line).text.length)}function Ri(ie,ae){var ge=ie.ch;return ge==null||ge>ae?hn(ie.line,ae):ge<0?hn(ie.line,0):ie}function Xi(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=hi(ie,ae[fe]);return ge}var tr=function(ie,ae){this.state=ie,this.lookAhead=ae},yn=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};yn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},yn.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ae=this.baseTokens[this.baseTokenPos+1];return{type:ae&&ae.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},yn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},yn.fromSaved=function(ie,ae,ge){return ae instanceof tr?new yn(ie,Yt(ie.mode,ae.state),ge,ae.lookAhead):new yn(ie,Yt(ie.mode,ae),ge)},yn.prototype.save=function(ie){var ae=ie!==!1?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new tr(ae,this.maxLookAhead):ae};function Br(ie,ae,ge,fe){var ye=[ie.state.modeGen],ke={};ar(ie,ae.text,ie.doc.mode,ge,function(bt,pn){return ye.push(bt,pn)},ke,fe);for(var We=ge.state,at=function(bt){ge.baseTokens=ye;var pn=ie.state.overlays[bt],jt=1,Zn=0;ge.state=!0,ar(ie,ae.text,pn.mode,ge,function(jn,Ei){for(var Ai=jt;Zn<jn;){var Zi=ye[jt];Zi>jn&&ye.splice(jt,1,jn,ye[jt+1],Zi),jt+=2,Zn=Math.min(jn,Zi)}if(Ei)if(pn.opaque)ye.splice(Ai,jt-Ai,jn,"overlay "+Ei),jt=Ai+2;else for(;Ai<jt;Ai+=2){var pr=ye[Ai+1];ye[Ai+1]=(pr?pr+" ":"")+"overlay "+Ei}},ke),ge.state=We,ge.baseTokens=null,ge.baseTokenPos=1},it=0;it<ie.state.overlays.length;++it)at(it);return{styles:ye,classes:ke.bgClass||ke.textClass?ke:null}}function br(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=Wr(ie,St(ae)),ye=ae.text.length>ie.options.maxHighlightLength&&Yt(ie.doc.mode,fe.state),ke=Br(ie,ae,fe);ye&&(fe.state=ye),ae.stateAfter=fe.save(!ye),ae.styles=ke.styles,ke.classes?ae.styleClasses=ke.classes:ae.styleClasses&&(ae.styleClasses=null),ge===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function Wr(ie,ae,ge){var fe=ie.doc,ye=ie.display;if(!fe.mode.startState)return new yn(fe,!0,ae);var ke=Qi(ie,ae,ge),We=ke>fe.first&&Kt(fe,ke-1).stateAfter,at=We?yn.fromSaved(fe,We,ke):new yn(fe,xt(fe.mode),ke);return fe.iter(ke,ae,function(it){mn(ie,it.text,at);var bt=at.line;it.stateAfter=bt==ae-1||bt%5==0||bt>=ye.viewFrom&&bt<ye.viewTo?at.save():null,at.nextLine()}),ge&&(fe.modeFrontier=at.line),at}function mn(ie,ae,ge,fe){var ye=ie.doc.mode,ke=new nt(ae,ie.options.tabSize,ge);for(ke.start=ke.pos=fe||0,ae==""&&_n(ye,ge.state);!ke.eol();)Si(ye,ke,ge.state),ke.start=ke.pos}function _n(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=qt(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function Si(ie,ae,ge,fe){for(var ye=0;ye<10;ye++){fe&&(fe[0]=qt(ie,ge).mode);var ke=ie.token(ae,ge);if(ae.pos>ae.start)return ke}throw new Error("Mode "+ie.name+" failed to advance stream.")}var zi=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function Ni(ie,ae,ge,fe){var ye=ie.doc,ke=ye.mode,We;ae=hi(ye,ae);var at=Kt(ye,ae.line),it=Wr(ie,ae.line,ge),bt=new nt(at.text,ie.options.tabSize,it),pn;for(fe&&(pn=[]);(fe||bt.pos<ae.ch)&&!bt.eol();)bt.start=bt.pos,We=Si(ke,bt,it.state),fe&&pn.push(new zi(bt,We,Yt(ye.mode,it.state)));return fe?pn:new zi(bt,We,it.state)}function ji(ie,ae){if(ie)for(;;){var ge=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ge)break;ie=ie.slice(0,ge.index)+ie.slice(ge.index+ge[0].length);var fe=ge[1]?"bgClass":"textClass";ae[fe]==null?ae[fe]=ge[2]:new RegExp("(?:^|\\s)"+ge[2]+"(?:$|\\s)").test(ae[fe])||(ae[fe]+=" "+ge[2])}return ie}function ar(ie,ae,ge,fe,ye,ke,We){var at=ge.flattenSpans;at==null&&(at=ie.options.flattenSpans);var it=0,bt=null,pn=new nt(ae,ie.options.tabSize,fe),jt,Zn=ie.options.addModeClass&&[null];for(ae==""&&ji(_n(ge,fe.state),ke);!pn.eol();){if(pn.pos>ie.options.maxHighlightLength?(at=!1,We&&mn(ie,ae,fe,pn.pos),pn.pos=ae.length,jt=null):jt=ji(Si(ge,pn,fe.state,Zn),ke),Zn){var jn=Zn[0].name;jn&&(jt="m-"+(jt?jn+" "+jt:jn))}if(!at||bt!=jt){for(;it<pn.start;)it=Math.min(pn.start,it+5e3),ye(it,bt);bt=jt}pn.start=pn.pos}for(;it<pn.pos;){var Ei=Math.min(pn.pos,it+5e3);ye(Ei,bt),it=Ei}}function Qi(ie,ae,ge){for(var fe,ye,ke=ie.doc,We=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),at=ae;at>We;--at){if(at<=ke.first)return ke.first;var it=Kt(ke,at-1),bt=it.stateAfter;if(bt&&(!ge||at+(bt instanceof tr?bt.lookAhead:0)<=ke.modeFrontier))return at;var pn=lt(it.text,null,ie.options.tabSize);(ye==null||fe>pn)&&(ye=at-1,fe=pn)}return ye}function nr(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var ge=ie.first,fe=ae-1;fe>ge;fe--){var ye=Kt(ie,fe).stateAfter;if(ye&&(!(ye instanceof tr)||fe+ye.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var hr=!1,An=!1;function Jr(){hr=!0}function Bn(){An=!0}function _r(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function co(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function Bi(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function Po(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function ao(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var ke=ie[ye],We=ke.marker,at=ke.from==null||(We.inclusiveLeft?ke.from<=ae:ke.from<ae);if(at||ke.from==ae&&We.type=="bookmark"&&(!ge||!ke.marker.insertLeft)){var it=ke.to==null||(We.inclusiveRight?ke.to>=ae:ke.to>ae);(fe||(fe=[])).push(new _r(We,ke.from,it?null:ke.to))}}return fe}function Ki(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var ke=ie[ye],We=ke.marker,at=ke.to==null||(We.inclusiveRight?ke.to>=ae:ke.to>ae);if(at||ke.from==ae&&We.type=="bookmark"&&(!ge||ke.marker.insertLeft)){var it=ke.from==null||(We.inclusiveLeft?ke.from<=ae:ke.from<ae);(fe||(fe=[])).push(new _r(We,it?null:ke.from-ae,ke.to==null?null:ke.to-ae))}}return fe}function qi(ie,ae){if(ae.full)return null;var ge=Rn(ie,ae.from.line)&&Kt(ie,ae.from.line).markedSpans,fe=Rn(ie,ae.to.line)&&Kt(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var ye=ae.from.ch,ke=ae.to.ch,We=Jt(ae.from,ae.to)==0,at=ao(ge,ye,We),it=Ki(fe,ke,We),bt=ae.text.length==1,pn=pt(ae.text).length+(bt?ye:0);if(at)for(var jt=0;jt<at.length;++jt){var Zn=at[jt];if(Zn.to==null){var jn=co(it,Zn.marker);jn?bt&&(Zn.to=jn.to==null?null:jn.to+pn):Zn.to=ye}}if(it)for(var Ei=0;Ei<it.length;++Ei){var Ai=it[Ei];if(Ai.to!=null&&(Ai.to+=pn),Ai.from==null){var Zi=co(at,Ai.marker);Zi||(Ai.from=pn,bt&&(at||(at=[])).push(Ai))}else Ai.from+=pn,bt&&(at||(at=[])).push(Ai)}at&&(at=Zr(at)),it&&it!=at&&(it=Zr(it));var pr=[at];if(!bt){var Kr=ae.text.length-2,Nr;if(Kr>0&&at)for(var io=0;io<at.length;++io)at[io].to==null&&(Nr||(Nr=[])).push(new _r(at[io].marker,null,null));for(var Go=0;Go<Kr;++Go)pr.push(Nr);pr.push(it)}return pr}function Zr(ie){for(var ae=0;ae<ie.length;++ae){var ge=ie[ae];ge.from!=null&&ge.from==ge.to&&ge.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function ro(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(jn){if(jn.markedSpans)for(var Ei=0;Ei<jn.markedSpans.length;++Ei){var Ai=jn.markedSpans[Ei].marker;Ai.readOnly&&(!fe||Nt(fe,Ai)==-1)&&(fe||(fe=[])).push(Ai)}}),!fe)return null;for(var ye=[{from:ae,to:ge}],ke=0;ke<fe.length;++ke)for(var We=fe[ke],at=We.find(0),it=0;it<ye.length;++it){var bt=ye[it];if(!(Jt(bt.to,at.from)<0||Jt(bt.from,at.to)>0)){var pn=[it,1],jt=Jt(bt.from,at.from),Zn=Jt(bt.to,at.to);(jt<0||!We.inclusiveLeft&&!jt)&&pn.push({from:bt.from,to:at.from}),(Zn>0||!We.inclusiveRight&&!Zn)&&pn.push({from:at.to,to:bt.to}),ye.splice.apply(ye,pn),it+=pn.length-3}}return ye}function wi(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function Qe(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function uo(ie){return ie.inclusiveLeft?-1:0}function Zo(ie){return ie.inclusiveRight?1:0}function ga(ie,ae){var ge=ie.lines.length-ae.lines.length;if(ge!=0)return ge;var fe=ie.find(),ye=ae.find(),ke=Jt(fe.from,ye.from)||uo(ie)-uo(ae);if(ke)return-ke;var We=Jt(fe.to,ye.to)||Zo(ie)-Zo(ae);return We||ae.id-ie.id}function Pa(ie,ae){var ge=An&&ie.markedSpans,fe;if(ge)for(var ye=void 0,ke=0;ke<ge.length;++ke)ye=ge[ke],ye.marker.collapsed&&(ae?ye.from:ye.to)==null&&(!fe||ga(fe,ye.marker)<0)&&(fe=ye.marker);return fe}function ia(ie){return Pa(ie,!0)}function Dr(ie){return Pa(ie,!1)}function kr(ie,ae){var ge=An&&ie.markedSpans,fe;if(ge)for(var ye=0;ye<ge.length;++ye){var ke=ge[ye];ke.marker.collapsed&&(ke.from==null||ke.from<ae)&&(ke.to==null||ke.to>ae)&&(!fe||ga(fe,ke.marker)<0)&&(fe=ke.marker)}return fe}function fo(ie,ae,ge,fe,ye){var ke=Kt(ie,ae),We=An&&ke.markedSpans;if(We)for(var at=0;at<We.length;++at){var it=We[at];if(it.marker.collapsed){var bt=it.marker.find(0),pn=Jt(bt.from,ge)||uo(it.marker)-uo(ye),jt=Jt(bt.to,fe)||Zo(it.marker)-Zo(ye);if(!(pn>=0&&jt<=0||pn<=0&&jt>=0)&&(pn<=0&&(it.marker.inclusiveRight&&ye.inclusiveLeft?Jt(bt.to,ge)>=0:Jt(bt.to,ge)>0)||pn>=0&&(it.marker.inclusiveRight&&ye.inclusiveLeft?Jt(bt.from,fe)<=0:Jt(bt.from,fe)<0)))return!0}}}function Rr(ie){for(var ae;ae=ia(ie);)ie=ae.find(-1,!0).line;return ie}function To(ie){for(var ae;ae=Dr(ie);)ie=ae.find(1,!0).line;return ie}function qa(ie){for(var ae,ge;ae=Dr(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function Mr(ie,ae){var ge=Kt(ie,ae),fe=Rr(ge);return ge==fe?ae:St(fe)}function sr(ie,ae){if(ae>ie.lastLine())return ae;var ge=Kt(ie,ae),fe;if(!qn(ie,ge))return ae;for(;fe=Dr(ge);)ge=fe.find(1,!0).line;return St(ge)+1}function qn(ie,ae){var ge=An&&ae.markedSpans;if(ge){for(var fe=void 0,ye=0;ye<ge.length;++ye)if(fe=ge[ye],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&vr(ie,ae,fe))return!0}}}function vr(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return vr(ie,fe.line,co(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var ye=void 0,ke=0;ke<ae.markedSpans.length;++ke)if(ye=ae.markedSpans[ke],ye.marker.collapsed&&!ye.marker.widgetNode&&ye.from==ge.to&&(ye.to==null||ye.to!=ge.from)&&(ye.marker.inclusiveLeft||ge.marker.inclusiveRight)&&vr(ie,ae,ye))return!0}function wo(ie){ie=Rr(ie);for(var ae=0,ge=ie.parent,fe=0;fe<ge.lines.length;++fe){var ye=ge.lines[fe];if(ye==ie)break;ae+=ye.height}for(var ke=ge.parent;ke;ge=ke,ke=ge.parent)for(var We=0;We<ke.children.length;++We){var at=ke.children[We];if(at==ge)break;ae+=at.height}return ae}function ua(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=ia(fe);){var ye=ge.find(0,!0);fe=ye.from.line,ae+=ye.from.ch-ye.to.ch}for(fe=ie;ge=Dr(fe);){var ke=ge.find(0,!0);ae-=fe.text.length-ke.from.ch,fe=ke.to.line,ae+=fe.text.length-ke.to.ch}return ae}function Bo(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=Kt(ge,ge.first),ae.maxLineLength=ua(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var ye=ua(fe);ye>ae.maxLineLength&&(ae.maxLineLength=ye,ae.maxLine=fe)})}var yo=function(ie,ae,ge){this.text=ie,Qe(this,ae),this.height=ge?ge(this):1};yo.prototype.lineNo=function(){return St(this)},Dn(yo);function ta(ie,ae,ge,fe){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),wi(ie),Qe(ie,ge);var ye=fe?fe(ie):1;ye!=ie.height&&On(ie,ye)}function na(ie){ie.parent=null,wi(ie)}var Ba={},ka={};function is(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?ka:Ba;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function vn(ie,ae){var ge=gt("span",null,null,Me?"padding-right: .1px":null),fe={pre:gt("pre",[ge],"CodeMirror-line"),content:ge,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var ye=0;ye<=(ae.rest?ae.rest.length:0);ye++){var ke=ye?ae.rest[ye-1]:ae.line,We=void 0;fe.pos=0,fe.addToken=Vl,dr(ie.display.measure)&&(We=_e(ke,ie.doc.direction))&&(fe.addToken=wl(fe.addToken,We)),fe.map=[];var at=ae!=ie.display.externalMeasured&&St(ke);yu(ke,fe,br(ie,ke,at)),ke.styleClasses&&(ke.styleClasses.bgClass&&(fe.bgClass=kt(ke.styleClasses.bgClass,fe.bgClass||"")),ke.styleClasses.textClass&&(fe.textClass=kt(ke.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(yi(ie.display.measure))),ye==0?(ae.measure.map=fe.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(fe.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Me){var it=fe.content.lastChild;(/\bcm-tab\b/.test(it.className)||it.querySelector&&it.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return Qt(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=kt(fe.pre.className,fe.textClass||"")),fe}function Oa(ie){var ae=Ke("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Vl(ie,ae,ge,fe,ye,ke,We){if(ae){var at=ie.splitSpaces?Hs(ae,ie.trailingSpace):ae,it=ie.cm.state.specialChars,bt=!1,pn;if(!it.test(ae))ie.col+=ae.length,pn=document.createTextNode(at),ie.map.push(ie.pos,ie.pos+ae.length,pn),Ze&&ht<9&&(bt=!0),ie.pos+=ae.length;else{pn=document.createDocumentFragment();for(var jt=0;;){it.lastIndex=jt;var Zn=it.exec(ae),jn=Zn?Zn.index-jt:ae.length-jt;if(jn){var Ei=document.createTextNode(at.slice(jt,jt+jn));Ze&&ht<9?pn.appendChild(Ke("span",[Ei])):pn.appendChild(Ei),ie.map.push(ie.pos,ie.pos+jn,Ei),ie.col+=jn,ie.pos+=jn}if(!Zn)break;jt+=jn+1;var Ai=void 0;if(Zn[0]==" "){var Zi=ie.cm.options.tabSize,pr=Zi-ie.col%Zi;Ai=pn.appendChild(Ke("span",Mn(pr),"cm-tab")),Ai.setAttribute("role","presentation"),Ai.setAttribute("cm-text"," "),ie.col+=pr}else Zn[0]=="\r"||Zn[0]==`
|
|
|
`?(Ai=pn.appendChild(Ke("span",Zn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ai.setAttribute("cm-text",Zn[0]),ie.col+=1):(Ai=ie.cm.options.specialCharPlaceholder(Zn[0]),Ai.setAttribute("cm-text",Zn[0]),Ze&&ht<9?pn.appendChild(Ke("span",[Ai])):pn.appendChild(Ai),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,Ai),ie.pos++}}if(ie.trailingSpace=at.charCodeAt(ae.length-1)==32,ge||fe||ye||bt||ke||We){var Kr=ge||"";fe&&(Kr+=fe),ye&&(Kr+=ye);var Nr=Ke("span",[pn],Kr,ke);if(We)for(var io in We)We.hasOwnProperty(io)&&io!="style"&&io!="class"&&Nr.setAttribute(io,We[io]);return ie.content.appendChild(Nr)}ie.content.appendChild(pn)}}function Hs(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",ye=0;ye<ie.length;ye++){var ke=ie.charAt(ye);ke==" "&&ge&&(ye==ie.length-1||ie.charCodeAt(ye+1)==32)&&(ke="\xA0"),fe+=ke,ge=ke==" "}return fe}function wl(ie,ae){return function(ge,fe,ye,ke,We,at,it){ye=ye?ye+" cm-force-border":"cm-force-border";for(var bt=ge.pos,pn=bt+fe.length;;){for(var jt=void 0,Zn=0;Zn<ae.length&&(jt=ae[Zn],!(jt.to>bt&&jt.from<=bt));Zn++);if(jt.to>=pn)return ie(ge,fe,ye,ke,We,at,it);ie(ge,fe.slice(0,jt.to-bt),ye,ke,null,at,it),ke=null,fe=fe.slice(jt.to-bt),bt=jt.to}}}function Ma(ie,ae,ge,fe){var ye=!fe&&ge.widgetNode;ye&&ie.map.push(ie.pos,ie.pos+ae,ye),!fe&&ie.cm.display.input.needsContentAttribute&&(ye||(ye=ie.content.appendChild(document.createElement("span"))),ye.setAttribute("cm-marker",ge.id)),ye&&(ie.cm.display.input.setUneditable(ye),ie.content.appendChild(ye)),ie.pos+=ae,ie.trailingSpace=!1}function yu(ie,ae,ge){var fe=ie.markedSpans,ye=ie.text,ke=0;if(!fe){for(var We=1;We<ge.length;We+=2)ae.addToken(ae,ye.slice(ke,ke=ge[We]),is(ge[We+1],ae.cm.options));return}for(var at=ye.length,it=0,bt=1,pn="",jt,Zn,jn=0,Ei,Ai,Zi,pr,Kr;;){if(jn==it){Ei=Ai=Zi=Zn="",Kr=null,pr=null,jn=1/0;for(var Nr=[],io=void 0,Go=0;Go<fe.length;++Go){var Lr=fe[Go],oa=Lr.marker;if(oa.type=="bookmark"&&Lr.from==it&&oa.widgetNode)Nr.push(oa);else if(Lr.from<=it&&(Lr.to==null||Lr.to>it||oa.collapsed&&Lr.to==it&&Lr.from==it)){if(Lr.to!=null&&Lr.to!=it&&jn>Lr.to&&(jn=Lr.to,Ai=""),oa.className&&(Ei+=" "+oa.className),oa.css&&(Zn=(Zn?Zn+";":"")+oa.css),oa.startStyle&&Lr.from==it&&(Zi+=" "+oa.startStyle),oa.endStyle&&Lr.to==jn&&(io||(io=[])).push(oa.endStyle,Lr.to),oa.title&&((Kr||(Kr={})).title=oa.title),oa.attributes)for(var Ss in oa.attributes)(Kr||(Kr={}))[Ss]=oa.attributes[Ss];oa.collapsed&&(!pr||ga(pr.marker,oa)<0)&&(pr=Lr)}else Lr.from>it&&jn>Lr.from&&(jn=Lr.from)}if(io)for(var ol=0;ol<io.length;ol+=2)io[ol+1]==jn&&(Ai+=" "+io[ol]);if(!pr||pr.from==it)for(var Ls=0;Ls<Nr.length;++Ls)Ma(ae,0,Nr[Ls]);if(pr&&(pr.from||0)==it){if(Ma(ae,(pr.to==null?at+1:pr.to)-it,pr.marker,pr.from==null),pr.to==null)return;pr.to==it&&(pr=!1)}}if(it>=at)break;for(var du=Math.min(at,jn);;){if(pn){var Zl=it+pn.length;if(!pr){var qs=Zl>du?pn.slice(0,du-it):pn;ae.addToken(ae,qs,jt?jt+Ei:Ei,Zi,it+qs.length==jn?Ai:"",Zn,Kr)}if(Zl>=du){pn=pn.slice(du-it),it=du;break}it=Zl,Zi=""}pn=ye.slice(ke,ke=ge[bt++]),jt=is(ge[bt++],ae.cm.options)}}}function Cl(ie,ae,ge){this.line=ae,this.rest=qa(ae),this.size=this.rest?St(pt(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=qn(ie,ae)}function ma(ie,ae,ge){for(var fe=[],ye,ke=ae;ke<ge;ke=ye){var We=new Cl(ie.doc,Kt(ie.doc,ke),ke);ye=ke+We.size,fe.push(We)}return fe}var Fo=null;function Ul(ie){Fo?Fo.ops.push(ie):ie.ownsGroup=Fo={ops:[ie],delayedCallbacks:[]}}function $r(ie){var ae=ie.delayedCallbacks,ge=0;do{for(;ge<ae.length;ge++)ae[ge].call(null);for(var fe=0;fe<ie.ops.length;fe++){var ye=ie.ops[fe];if(ye.cursorActivityHandlers)for(;ye.cursorActivityCalled<ye.cursorActivityHandlers.length;)ye.cursorActivityHandlers[ye.cursorActivityCalled++].call(null,ye.cm)}}while(ge<ae.length)}function Ko(ie,ae){var ge=ie.ownsGroup;if(ge)try{$r(ge)}finally{Fo=null,ae(ge)}}var So=null;function Ti(ie,ae){var ge=Xt(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),ye;Fo?ye=Fo.delayedCallbacks:So?ye=So:(ye=So=[],setTimeout(Wa,0));for(var ke=function(at){ye.push(function(){return ge[at].apply(null,fe)})},We=0;We<ge.length;++We)ke(We)}}function Wa(){var ie=So;So=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function $a(ie,ae,ge,fe){for(var ye=0;ye<ae.changes.length;ye++){var ke=ae.changes[ye];ke=="text"?bi(ie,ae):ke=="gutter"?cs(ie,ae,ge,fe):ke=="class"?Fa(ie,ae):ke=="widget"&&bl(ie,ae,fe)}ae.changes=null}function bs(ie){return ie.node==ie.text&&(ie.node=Ke("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ze&&ht<8&&(ie.node.style.zIndex=2)),ie.node}function El(ie,ae){var ge=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(ge&&(ge+=" CodeMirror-linebackground"),ae.background)ge?ae.background.className=ge:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(ge){var fe=bs(ae);ae.background=fe.insertBefore(Ke("div",null,ge),fe.firstChild),ie.display.input.setUneditable(ae.background)}}function Dl(ie,ae){var ge=ie.display.externalMeasured;return ge&&ge.line==ae.line?(ie.display.externalMeasured=null,ae.measure=ge.measure,ge.built):vn(ie,ae)}function bi(ie,ae){var ge=ae.text.className,fe=Dl(ie,ae);ae.text==ae.node&&(ae.node=fe.pre),ae.text.parentNode.replaceChild(fe.pre,ae.text),ae.text=fe.pre,fe.bgClass!=ae.bgClass||fe.textClass!=ae.textClass?(ae.bgClass=fe.bgClass,ae.textClass=fe.textClass,Fa(ie,ae)):ge&&(ae.text.className=ge)}function Fa(ie,ae){El(ie,ae),ae.line.wrapClass?bs(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var ge=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=ge||""}function cs(ie,ae,ge,fe){if(ae.gutter&&(ae.node.removeChild(ae.gutter),ae.gutter=null),ae.gutterBackground&&(ae.node.removeChild(ae.gutterBackground),ae.gutterBackground=null),ae.line.gutterClass){var ye=bs(ae);ae.gutterBackground=Ke("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px; width: "+fe.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),ye.insertBefore(ae.gutterBackground,ae.text)}var ke=ae.line.gutterMarkers;if(ie.options.lineNumbers||ke){var We=bs(ae),at=ae.gutter=Ke("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(at),We.insertBefore(at,ae.text),ae.line.gutterClass&&(at.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!ke||!ke["CodeMirror-linenumbers"])&&(ae.lineNumber=at.appendChild(Ke("div",ai(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),ke)for(var it=0;it<ie.display.gutterSpecs.length;++it){var bt=ie.display.gutterSpecs[it].className,pn=ke.hasOwnProperty(bt)&&ke[bt];pn&&at.appendChild(Ke("div",[pn],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[bt]+"px; width: "+fe.gutterWidth[bt]+"px"))}}}function bl(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=Fe("CodeMirror-linewidget"),ye=ae.node.firstChild,ke=void 0;ye;ye=ke)ke=ye.nextSibling,fe.test(ye.className)&&ae.node.removeChild(ye);Il(ie,ae,ge)}function Ol(ie,ae,ge,fe){var ye=Dl(ie,ae);return ae.text=ae.node=ye.pre,ye.bgClass&&(ae.bgClass=ye.bgClass),ye.textClass&&(ae.textClass=ye.textClass),Fa(ie,ae),cs(ie,ae,ge,fe),Il(ie,ae,fe),ae.node}function Il(ie,ae,ge){if(Qr(ie,ae.line,ae,ge,!0),ae.rest)for(var fe=0;fe<ae.rest.length;fe++)Qr(ie,ae.rest[fe],ae,ge,!1)}function Qr(ie,ae,ge,fe,ye){if(ae.widgets)for(var ke=bs(ge),We=0,at=ae.widgets;We<at.length;++We){var it=at[We],bt=Ke("div",[it.node],"CodeMirror-linewidget"+(it.className?" "+it.className:""));it.handleMouseEvents||bt.setAttribute("cm-ignore-events","true"),Ju(it,bt,ge,fe),ie.display.input.setUneditable(bt),ye&&it.above?ke.insertBefore(bt,ge.gutter||ge.text):ke.appendChild(bt),Ti(it,"redraw")}}function Ju(ie,ae,ge,fe){if(ie.noHScroll){(ge.alignable||(ge.alignable=[])).push(ae);var ye=fe.wrapperWidth;ae.style.left=fe.fixedPos+"px",ie.coverGutter||(ye-=fe.gutterTotalWidth,ae.style.paddingLeft=fe.gutterTotalWidth+"px"),ae.style.width=ye+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-fe.gutterTotalWidth+"px"))}function nl(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!At(document.body,ie.node)){var ge="position: relative;";ie.coverGutter&&(ge+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(ge+="width: "+ae.display.wrapper.clientWidth+"px;"),Je(ae.display.measure,Ke("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function vs(ie,ae){for(var ge=Yi(ae);ge!=ie.wrapper;ge=ge.parentNode)if(!ge||ge.nodeType==1&&ge.getAttribute("cm-ignore-events")=="true"||ge.parentNode==ie.sizer&&ge!=ie.mover)return!0}function ys(ie){return ie.lineSpace.offsetTop}function Su(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Iu(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=Je(ie.measure,Ke("pre","x","CodeMirror-line-like")),ge=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,fe={left:parseInt(ge.paddingLeft),right:parseInt(ge.paddingRight)};return!isNaN(fe.left)&&!isNaN(fe.right)&&(ie.cachedPaddingH=fe),fe}function Ys(ie){return cn-ie.display.nativeBarWidth}function ul(ie){return ie.display.scroller.clientWidth-Ys(ie)-ie.display.barWidth}function Mh(ie){return ie.display.scroller.clientHeight-Ys(ie)-ie.display.barHeight}function uc(ie,ae,ge){var fe=ie.options.lineWrapping,ye=fe&&ul(ie);if(!ae.measure.heights||fe&&ae.measure.width!=ye){var ke=ae.measure.heights=[];if(fe){ae.measure.width=ye;for(var We=ae.text.firstChild.getClientRects(),at=0;at<We.length-1;at++){var it=We[at],bt=We[at+1];Math.abs(it.bottom-bt.bottom)>2&&ke.push((it.bottom+bt.top)/2-ge.top)}}ke.push(ge.bottom-ge.top)}}function Lh(ie,ae,ge){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var fe=0;fe<ie.rest.length;fe++)if(ie.rest[fe]==ae)return{map:ie.measure.maps[fe],cache:ie.measure.caches[fe]};for(var ye=0;ye<ie.rest.length;ye++)if(St(ie.rest[ye])>ge)return{map:ie.measure.maps[ye],cache:ie.measure.caches[ye],before:!0}}function hc(ie,ae){ae=Rr(ae);var ge=St(ae),fe=ie.display.externalMeasured=new Cl(ie.doc,ae,ge);fe.lineN=ge;var ye=fe.built=vn(ie,fe);return fe.text=ye.pre,Je(ie.display.lineMeasure,ye.pre),fe}function Fh(ie,ae,ge,fe){return Rl(ie,Qu(ie,ae),ge,fe)}function Ru(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[Tr(ie,ae)];var ge=ie.display.externalMeasured;if(ge&&ae>=ge.lineN&&ae<ge.lineN+ge.size)return ge}function Qu(ie,ae){var ge=St(ae),fe=Ru(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&($a(ie,fe,ge,po(ie)),ie.curOp.forceUpdate=!0),fe||(fe=hc(ie,ae));var ye=Lh(fe,ae,ge);return{line:ae,view:fe,rect:null,map:ye.map,cache:ye.cache,before:ye.before,hasHeights:!1}}function Rl(ie,ae,ge,fe,ye){ae.before&&(ge=-1);var ke=ge+(fe||""),We;return ae.cache.hasOwnProperty(ke)?We=ae.cache[ke]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(uc(ie,ae.view,ae.rect),ae.hasHeights=!0),We=Co(ie,ae,ge,fe),We.bogus||(ae.cache[ke]=We)),{left:We.left,right:We.right,top:ye?We.rtop:We.top,bottom:ye?We.rbottom:We.bottom}}var Hh={left:0,right:0,top:0,bottom:0};function qu(ie,ae,ge){for(var fe,ye,ke,We,at,it,bt=0;bt<ie.length;bt+=3)if(at=ie[bt],it=ie[bt+1],ae<at?(ye=0,ke=1,We="left"):ae<it?(ye=ae-at,ke=ye+1):(bt==ie.length-3||ae==it&&ie[bt+3]>ae)&&(ke=it-at,ye=ke-1,ae>=it&&(We="right")),ye!=null){if(fe=ie[bt+2],at==it&&ge==(fe.insertLeft?"left":"right")&&(We=ge),ge=="left"&&ye==0)for(;bt&&ie[bt-2]==ie[bt-3]&&ie[bt-1].insertLeft;)fe=ie[(bt-=3)+2],We="left";if(ge=="right"&&ye==it-at)for(;bt<ie.length-3&&ie[bt+3]==ie[bt+4]&&!ie[bt+5].insertLeft;)fe=ie[(bt+=3)+2],We="right";break}return{node:fe,start:ye,end:ke,collapse:We,coverStart:at,coverEnd:it}}function eh(ie,ae){var ge=Hh;if(ae=="left")for(var fe=0;fe<ie.length&&(ge=ie[fe]).left==ge.right;fe++);else for(var ye=ie.length-1;ye>=0&&(ge=ie[ye]).left==ge.right;ye--);return ge}function Co(ie,ae,ge,fe){var ye=qu(ae.map,ge,fe),ke=ye.node,We=ye.start,at=ye.end,it=ye.collapse,bt;if(ke.nodeType==3){for(var pn=0;pn<4;pn++){for(;We&&Tt(ae.line.text.charAt(ye.coverStart+We));)--We;for(;ye.coverStart+at<ye.coverEnd&&Tt(ae.line.text.charAt(ye.coverStart+at));)++at;if(Ze&&ht<9&&We==0&&at==ye.coverEnd-ye.coverStart?bt=ke.parentNode.getBoundingClientRect():bt=eh(Re(ke,We,at).getClientRects(),fe),bt.left||bt.right||We==0)break;at=We,We=We-1,it="right"}Ze&&ht<11&&(bt=Uo(ie.display.measure,bt))}else{We>0&&(it=fe="right");var jt;ie.options.lineWrapping&&(jt=ke.getClientRects()).length>1?bt=jt[fe=="right"?jt.length-1:0]:bt=ke.getBoundingClientRect()}if(Ze&&ht<9&&!We&&(!bt||!bt.left&&!bt.right)){var Zn=ke.parentNode.getClientRects()[0];Zn?bt={left:Zn.left,right:Zn.left+jo(ie.display),top:Zn.top,bottom:Zn.bottom}:bt=Hh}for(var jn=bt.top-ae.rect.top,Ei=bt.bottom-ae.rect.top,Ai=(jn+Ei)/2,Zi=ae.view.measure.heights,pr=0;pr<Zi.length-1&&!(Ai<Zi[pr]);pr++);var Kr=pr?Zi[pr-1]:0,Nr=Zi[pr],io={left:(it=="right"?bt.right:bt.left)-ae.rect.left,right:(it=="left"?bt.left:bt.right)-ae.rect.left,top:Kr,bottom:Nr};return!bt.left&&!bt.right&&(io.bogus=!0),ie.options.singleCursorHeightPerLine||(io.rtop=jn,io.rbottom=Ei),io}function Uo(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!dn(ie))return ae;var ge=screen.logicalXDPI/screen.deviceXDPI,fe=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*ge,right:ae.right*ge,top:ae.top*fe,bottom:ae.bottom*fe}}function Gs(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ae=0;ae<ie.rest.length;ae++)ie.measure.caches[ae]={}}function ds(ie){ie.display.externalMeasure=null,je(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Gs(ie.display.view[ae])}function es(ie){ds(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function Aa(){return ct&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function za(){return ct&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rs(ie){var ae=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;++ge)ie.widgets[ge].above&&(ae+=nl(ie.widgets[ge]));return ae}function Ka(ie,ae,ge,fe,ye){if(!ye){var ke=rs(ae);ge.top+=ke,ge.bottom+=ke}if(fe=="line")return ge;fe||(fe="local");var We=wo(ae);if(fe=="local"?We+=ys(ie.display):We-=ie.display.viewOffset,fe=="page"||fe=="window"){var at=ie.display.lineSpace.getBoundingClientRect();We+=at.top+(fe=="window"?0:za());var it=at.left+(fe=="window"?0:Aa());ge.left+=it,ge.right+=it}return ge.top+=We,ge.bottom+=We,ge}function Ws(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,ye=ae.top;if(ge=="page")fe-=Aa(),ye-=za();else if(ge=="local"||!ge){var ke=ie.display.sizer.getBoundingClientRect();fe+=ke.left,ye+=ke.top}var We=ie.display.lineSpace.getBoundingClientRect();return{left:fe-We.left,top:ye-We.top}}function $s(ie,ae,ge,fe,ye){return fe||(fe=Kt(ie.doc,ae.line)),Ka(ie,fe,Fh(ie,fe,ae.ch,ye),ge)}function va(ie,ae,ge,fe,ye,ke){fe=fe||Kt(ie.doc,ae.line),ye||(ye=Qu(ie,fe));function We(Ei,Ai){var Zi=Rl(ie,ye,Ei,Ai?"right":"left",ke);return Ai?Zi.left=Zi.right:Zi.right=Zi.left,Ka(ie,fe,Zi,ge)}var at=_e(fe,ie.doc.direction),it=ae.ch,bt=ae.sticky;if(it>=fe.text.length?(it=fe.text.length,bt="before"):it<=0&&(it=0,bt="after"),!at)return We(bt=="before"?it-1:it,bt=="before");function pn(Ei,Ai,Zi){var pr=at[Ai],Kr=pr.level==1;return We(Zi?Ei-1:Ei,Kr!=Zi)}var jt=Se(at,it,bt),Zn=xe,jn=pn(it,jt,bt=="before");return Zn!=null&&(jn.other=pn(it,Zn,bt!="before")),jn}function rd(ie,ae){var ge=0;ae=hi(ie.doc,ae),ie.options.lineWrapping||(ge=jo(ie.display)*ae.ch);var fe=Kt(ie.doc,ae.line),ye=wo(fe)+ys(ie.display);return{left:ge,right:ge,top:ye,bottom:ye+fe.height}}function Mc(ie,ae,ge,fe,ye){var ke=hn(ie,ae,ge);return ke.xRel=ye,fe&&(ke.outside=fe),ke}function Vt(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return Mc(fe.first,0,null,-1,-1);var ye=gn(fe,ge),ke=fe.first+fe.size-1;if(ye>ke)return Mc(fe.first+fe.size-1,Kt(fe,ke).text.length,null,1,1);ae<0&&(ae=0);for(var We=Kt(fe,ye);;){var at=Pn(ie,We,ye,ae,ge),it=kr(We,at.ch+(at.xRel>0||at.outside>0?1:0));if(!it)return at;var bt=it.find(1);if(bt.line==ye)return bt;We=Kt(fe,ye=bt.line)}}function Ht(ie,ae,ge,fe){fe-=rs(ae);var ye=ae.text.length,ke=et(function(We){return Rl(ie,ge,We-1).bottom<=fe},ye,0);return ye=et(function(We){return Rl(ie,ge,We).top>fe},ke,ye),{begin:ke,end:ye}}function Sn(ie,ae,ge,fe){ge||(ge=Qu(ie,ae));var ye=Ka(ie,ae,Rl(ie,ge,fe),"line").top;return Ht(ie,ae,ge,ye)}function tt(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function Pn(ie,ae,ge,fe,ye){ye-=wo(ae);var ke=Qu(ie,ae),We=rs(ae),at=0,it=ae.text.length,bt=!0,pn=_e(ae,ie.doc.direction);if(pn){var jt=(ie.options.lineWrapping?No:jr)(ie,ae,ge,ke,pn,fe,ye);bt=jt.level!=1,at=bt?jt.from:jt.to-1,it=bt?jt.to:jt.from-1}var Zn=null,jn=null,Ei=et(function(Go){var Lr=Rl(ie,ke,Go);return Lr.top+=We,Lr.bottom+=We,tt(Lr,fe,ye,!1)?(Lr.top<=ye&&Lr.left<=fe&&(Zn=Go,jn=Lr),!0):!1},at,it),Ai,Zi,pr=!1;if(jn){var Kr=fe-jn.left<jn.right-fe,Nr=Kr==bt;Ei=Zn+(Nr?0:1),Zi=Nr?"after":"before",Ai=Kr?jn.left:jn.right}else{!bt&&(Ei==it||Ei==at)&&Ei++,Zi=Ei==0?"after":Ei==ae.text.length?"before":Rl(ie,ke,Ei-(bt?1:0)).bottom+We<=ye==bt?"after":"before";var io=va(ie,hn(ge,Ei,Zi),"line",ae,ke);Ai=io.left,pr=ye<io.top?-1:ye>=io.bottom?1:0}return Ei=ot(ae.text,Ei,1),Mc(ge,Ei,Zi,pr,fe-Ai)}function jr(ie,ae,ge,fe,ye,ke,We){var at=et(function(jt){var Zn=ye[jt],jn=Zn.level!=1;return tt(va(ie,hn(ge,jn?Zn.to:Zn.from,jn?"before":"after"),"line",ae,fe),ke,We,!0)},0,ye.length-1),it=ye[at];if(at>0){var bt=it.level!=1,pn=va(ie,hn(ge,bt?it.from:it.to,bt?"after":"before"),"line",ae,fe);tt(pn,ke,We,!0)&&pn.top>We&&(it=ye[at-1])}return it}function No(ie,ae,ge,fe,ye,ke,We){var at=Ht(ie,ae,fe,We),it=at.begin,bt=at.end;/\s/.test(ae.text.charAt(bt-1))&&bt--;for(var pn=null,jt=null,Zn=0;Zn<ye.length;Zn++){var jn=ye[Zn];if(!(jn.from>=bt||jn.to<=it)){var Ei=jn.level!=1,Ai=Rl(ie,fe,Ei?Math.min(bt,jn.to)-1:Math.max(it,jn.from)).right,Zi=Ai<ke?ke-Ai+1e9:Ai-ke;(!pn||jt>Zi)&&(pn=jn,jt=Zi)}}return pn||(pn=ye[ye.length-1]),pn.from<it&&(pn={from:it,to:pn.to,level:pn.level}),pn.to>bt&&(pn={from:pn.from,to:bt,level:pn.level}),pn}var Or;function zr(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(Or==null){Or=Ke("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)Or.appendChild(document.createTextNode("x")),Or.appendChild(Ke("br"));Or.appendChild(document.createTextNode("x"))}Je(ie.measure,Or);var ge=Or.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),je(ie.measure),ge||1}function jo(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Ke("span","xxxxxxxxxx"),ge=Ke("pre",[ae],"CodeMirror-line-like");Je(ie.measure,ge);var fe=ae.getBoundingClientRect(),ye=(fe.right-fe.left)/10;return ye>2&&(ie.cachedCharWidth=ye),ye||10}function po(ie){for(var ae=ie.display,ge={},fe={},ye=ae.gutters.clientLeft,ke=ae.gutters.firstChild,We=0;ke;ke=ke.nextSibling,++We){var at=ie.display.gutterSpecs[We].className;ge[at]=ke.offsetLeft+ke.clientLeft+ye,fe[at]=ke.clientWidth}return{fixedPos:Wo(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function Wo(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function ho(ie){var ae=zr(ie.display),ge=ie.options.lineWrapping,fe=ge&&Math.max(5,ie.display.scroller.clientWidth/jo(ie.display)-3);return function(ye){if(qn(ie.doc,ye))return 0;var ke=0;if(ye.widgets)for(var We=0;We<ye.widgets.length;We++)ye.widgets[We].height&&(ke+=ye.widgets[We].height);return ge?ke+(Math.ceil(ye.text.length/fe)||1)*ae:ke+ae}}function _i(ie){var ae=ie.doc,ge=ho(ie);ae.iter(function(fe){var ye=ge(fe);ye!=fe.height&&On(fe,ye)})}function Wi(ie,ae,ge,fe){var ye=ie.display;if(!ge&&Yi(ae).getAttribute("cm-not-content")=="true")return null;var ke,We,at=ye.lineSpace.getBoundingClientRect();try{ke=ae.clientX-at.left,We=ae.clientY-at.top}catch(jt){return null}var it=Vt(ie,ke,We),bt;if(fe&&it.xRel>0&&(bt=Kt(ie.doc,it.line).text).length==it.ch){var pn=lt(bt,bt.length,ie.options.tabSize)-bt.length;it=hn(it.line,Math.max(0,Math.round((ke-Iu(ie.display).left)/jo(ie.display))-pn))}return it}function Tr(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var ge=ie.display.view,fe=0;fe<ge.length;fe++)if(ae-=ge[fe].size,ae<0)return fe}function Ar(ie,ae,ge,fe){ae==null&&(ae=ie.doc.first),ge==null&&(ge=ie.doc.first+ie.doc.size),fe||(fe=0);var ye=ie.display;if(fe&&ge<ye.viewTo&&(ye.updateLineNumbers==null||ye.updateLineNumbers>ae)&&(ye.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=ye.viewTo)An&&Mr(ie.doc,ae)<ye.viewTo&&wr(ie);else if(ge<=ye.viewFrom)An&&sr(ie.doc,ge+fe)>ye.viewFrom?wr(ie):(ye.viewFrom+=fe,ye.viewTo+=fe);else if(ae<=ye.viewFrom&&ge>=ye.viewTo)wr(ie);else if(ae<=ye.viewFrom){var ke=Lo(ie,ge,ge+fe,1);ke?(ye.view=ye.view.slice(ke.index),ye.viewFrom=ke.lineN,ye.viewTo+=fe):wr(ie)}else if(ge>=ye.viewTo){var We=Lo(ie,ae,ae,-1);We?(ye.view=ye.view.slice(0,We.index),ye.viewTo=We.lineN):wr(ie)}else{var at=Lo(ie,ae,ae,-1),it=Lo(ie,ge,ge+fe,1);at&&it?(ye.view=ye.view.slice(0,at.index).concat(ma(ie,at.lineN,it.lineN)).concat(ye.view.slice(it.index)),ye.viewTo+=fe):wr(ie)}var bt=ye.externalMeasured;bt&&(ge<bt.lineN?bt.lineN+=fe:ae<bt.lineN+bt.size&&(ye.externalMeasured=null))}function ir(ie,ae,ge){ie.curOp.viewChanged=!0;var fe=ie.display,ye=ie.display.externalMeasured;if(ye&&ae>=ye.lineN&&ae<ye.lineN+ye.size&&(fe.externalMeasured=null),!(ae<fe.viewFrom||ae>=fe.viewTo)){var ke=fe.view[Tr(ie,ae)];if(ke.node!=null){var We=ke.changes||(ke.changes=[]);Nt(We,ge)==-1&&We.push(ge)}}}function wr(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Lo(ie,ae,ge,fe){var ye=Tr(ie,ae),ke,We=ie.display.view;if(!An||ge==ie.doc.first+ie.doc.size)return{index:ye,lineN:ge};for(var at=ie.display.viewFrom,it=0;it<ye;it++)at+=We[it].size;if(at!=ae){if(fe>0){if(ye==We.length-1)return null;ke=at+We[ye].size-ae,ye++}else ke=at-ae;ae+=ke,ge+=ke}for(;Mr(ie.doc,ge)!=ge;){if(ye==(fe<0?0:We.length-1))return null;ge+=fe*We[ye-(fe<0?1:0)].size,ye+=fe}return{index:ye,lineN:ge}}function Ir(ie,ae,ge){var fe=ie.display,ye=fe.view;ye.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=ma(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=ma(ie,ae,fe.viewFrom).concat(fe.view):fe.viewFrom<ae&&(fe.view=fe.view.slice(Tr(ie,ae))),fe.viewFrom=ae,fe.viewTo<ge?fe.view=fe.view.concat(ma(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,Tr(ie,ge)))),fe.viewTo=ge}function er(ie){for(var ae=ie.display.view,ge=0,fe=0;fe<ae.length;fe++){var ye=ae[fe];!ye.hidden&&(!ye.node||ye.changes)&&++ge}return ge}function lr(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function or(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},ye=fe.cursors=document.createDocumentFragment(),ke=fe.selection=document.createDocumentFragment(),We=0;We<ge.sel.ranges.length;We++)if(!(!ae&&We==ge.sel.primIndex)){var at=ge.sel.ranges[We];if(!(at.from().line>=ie.display.viewTo||at.to().line<ie.display.viewFrom)){var it=at.empty();(it||ie.options.showCursorWhenSelecting)&&Oi(ie,at.head,ye),it||Yr(ie,at,ke)}}return fe}function Oi(ie,ae,ge){var fe=va(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),ye=ge.appendChild(Ke("div","\xA0","CodeMirror-cursor"));if(ye.style.left=fe.left+"px",ye.style.top=fe.top+"px",ye.style.height=Math.max(0,fe.bottom-fe.top)*ie.options.cursorHeight+"px",fe.other){var ke=ge.appendChild(Ke("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ke.style.display="",ke.style.left=fe.other.left+"px",ke.style.top=fe.other.top+"px",ke.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Do(ie,ae){return ie.top-ae.top||ie.left-ae.left}function Yr(ie,ae,ge){var fe=ie.display,ye=ie.doc,ke=document.createDocumentFragment(),We=Iu(ie.display),at=We.left,it=Math.max(fe.sizerWidth,ul(ie)-fe.sizer.offsetLeft)-We.right,bt=ye.direction=="ltr";function pn(Nr,io,Go,Lr){io<0&&(io=0),io=Math.round(io),Lr=Math.round(Lr),ke.appendChild(Ke("div",null,"CodeMirror-selected","position: absolute; left: "+Nr+`px;
|
|
|
top: `+io+"px; width: "+(Go==null?it-Nr:Go)+`px;
|
|
|
height: `+(Lr-io)+"px"))}function jt(Nr,io,Go){var Lr=Kt(ye,Nr),oa=Lr.text.length,Ss,ol;function Ls(qs,Lu){return $s(ie,hn(Nr,qs),"div",Lr,Lu)}function du(qs,Lu,Fl){var el=Sn(ie,Lr,null,qs),Da=Lu=="ltr"==(Fl=="after")?"left":"right",Ts=Fl=="after"?el.begin:el.end-(/\s/.test(Lr.text.charAt(el.end-1))?2:1);return Ls(Ts,Da)[Da]}var Zl=_e(Lr,ye.direction);return Te(Zl,io||0,Go==null?oa:Go,function(qs,Lu,Fl,el){var Da=Fl=="ltr",Ts=Ls(qs,Da?"left":"right"),cl=Ls(Lu-1,Da?"right":"left"),Nl=io==null&&qs==0,mh=Go==null&&Lu==oa,Fs=el==0,ih=!Zl||el==Zl.length-1;if(cl.top-Ts.top<=3){var Zs=(bt?Nl:mh)&&Fs,bf=(bt?mh:Nl)&&ih,Gu=Zs?at:(Da?Ts:cl).left,Fu=bf?it:(Da?cl:Ts).right;pn(Gu,Ts.top,Fu-Gu,Ts.bottom)}else{var fu,ls,dl,Yh;Da?(fu=bt&&Nl&&Fs?at:Ts.left,ls=bt?it:du(qs,Fl,"before"),dl=bt?at:du(Lu,Fl,"after"),Yh=bt&&mh&&ih?it:cl.right):(fu=bt?du(qs,Fl,"before"):at,ls=!bt&&Nl&&Fs?it:Ts.right,dl=!bt&&mh&&ih?at:cl.left,Yh=bt?du(Lu,Fl,"after"):it),pn(fu,Ts.top,ls-fu,Ts.bottom),Ts.bottom<cl.top&&pn(at,Ts.bottom,null,cl.top),pn(dl,cl.top,Yh-dl,cl.bottom)}(!Ss||Do(Ts,Ss)<0)&&(Ss=Ts),Do(cl,Ss)<0&&(Ss=cl),(!ol||Do(Ts,ol)<0)&&(ol=Ts),Do(cl,ol)<0&&(ol=cl)}),{start:Ss,end:ol}}var Zn=ae.from(),jn=ae.to();if(Zn.line==jn.line)jt(Zn.line,Zn.ch,jn.ch);else{var Ei=Kt(ye,Zn.line),Ai=Kt(ye,jn.line),Zi=Rr(Ei)==Rr(Ai),pr=jt(Zn.line,Zn.ch,Zi?Ei.text.length+1:null).end,Kr=jt(jn.line,Zi?0:null,jn.ch).start;Zi&&(pr.top<Kr.top-2?(pn(pr.right,pr.top,null,pr.bottom),pn(at,Kr.top,Kr.left,Kr.bottom)):pn(pr.right,pr.top,Kr.left-pr.right,pr.bottom)),pr.bottom<Kr.top&&pn(at,pr.bottom,null,Kr.top)}ge.appendChild(ke)}function ko(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var ge=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||Ns(ie),ae.cursorDiv.style.visibility=(ge=!ge)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Yo(ie){ie.state.focused||(ie.display.input.focus(),Oo(ie))}function Er(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,Ns(ie))},100)}function Oo(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(Qt(ie,"focus",ie,ae),ie.state.focused=!0,Et(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Me&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),ko(ie))}function Ns(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(Qt(ie,"blur",ie,ae),ie.state.focused=!1,Ie(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Gi(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var ye=ae.view[fe],ke=ie.options.lineWrapping,We=void 0,at=0;if(!ye.hidden){if(Ze&&ht<8){var it=ye.node.offsetTop+ye.node.offsetHeight;We=it-ge,ge=it}else{var bt=ye.node.getBoundingClientRect();We=bt.bottom-bt.top,!ke&&ye.text.firstChild&&(at=ye.text.firstChild.getBoundingClientRect().right-bt.left-1)}var pn=ye.line.height-We;if((pn>.005||pn<-.005)&&(On(ye.line,We),Ia(ye.line),ye.rest))for(var jt=0;jt<ye.rest.length;jt++)Ia(ye.rest[jt]);if(at>ie.display.sizerWidth){var Zn=Math.ceil(at/jo(ie.display));Zn>ie.display.maxLineLength&&(ie.display.maxLineLength=Zn,ie.display.maxLine=ye.line,ie.display.maxLineChanged=!0)}}}}function Ia(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var ge=ie.widgets[ae],fe=ge.node.parentNode;fe&&(ge.height=fe.offsetHeight)}}function Vr(ie,ae,ge){var fe=ge&&ge.top!=null?Math.max(0,ge.top):ie.scroller.scrollTop;fe=Math.floor(fe-ys(ie));var ye=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,ke=gn(ae,fe),We=gn(ae,ye);if(ge&&ge.ensure){var at=ge.ensure.from.line,it=ge.ensure.to.line;at<ke?(ke=at,We=gn(ae,wo(Kt(ae,at))+ie.wrapper.clientHeight)):Math.min(it,ae.lastLine())>=We&&(ke=gn(ae,wo(Kt(ae,it))-ie.wrapper.clientHeight),We=it)}return{from:ke,to:Math.max(We,ke+1)}}function _a(ie,ae){if(!En(ie,"scrollCursorIntoView")){var ge=ie.display,fe=ge.sizer.getBoundingClientRect(),ye=null;if(ae.top+fe.top<0?ye=!0:ae.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(ye=!1),ye!=null&&!dt){var ke=Ke("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ae.top-ge.viewOffset-ys(ie.display))+`px;
|
|
|
height: `+(ae.bottom-ae.top+Ys(ie)+ge.barHeight)+`px;
|
|
|
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(ke),ke.scrollIntoView(ye),ie.display.lineSpace.removeChild(ke)}}}function Is(ie,ae,ge,fe){fe==null&&(fe=0);var ye;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?hn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?hn(ae.line,ae.ch+1,"before"):ae);for(var ke=0;ke<5;ke++){var We=!1,at=va(ie,ae),it=!ge||ge==ae?at:va(ie,ge);ye={left:Math.min(at.left,it.left),top:Math.min(at.top,it.top)-fe,right:Math.max(at.left,it.left),bottom:Math.max(at.bottom,it.bottom)+fe};var bt=Gh(ie,ye),pn=ie.doc.scrollTop,jt=ie.doc.scrollLeft;if(bt.scrollTop!=null&&(Bh(ie,bt.scrollTop),Math.abs(ie.doc.scrollTop-pn)>1&&(We=!0)),bt.scrollLeft!=null&&(_u(ie,bt.scrollLeft),Math.abs(ie.doc.scrollLeft-jt)>1&&(We=!0)),!We)break}return ye}function ju(ie,ae){var ge=Gh(ie,ae);ge.scrollTop!=null&&Bh(ie,ge.scrollTop),ge.scrollLeft!=null&&_u(ie,ge.scrollLeft)}function Gh(ie,ae){var ge=ie.display,fe=zr(ie.display);ae.top<0&&(ae.top=0);var ye=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,ke=Mh(ie),We={};ae.bottom-ae.top>ke&&(ae.bottom=ae.top+ke);var at=ie.doc.height+Su(ge),it=ae.top<fe,bt=ae.bottom>at-fe;if(ae.top<ye)We.scrollTop=it?0:ae.top;else if(ae.bottom>ye+ke){var pn=Math.min(ae.top,(bt?at:ae.bottom)-ke);pn!=ye&&(We.scrollTop=pn)}var jt=ie.options.fixedGutter?0:ge.gutters.offsetWidth,Zn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-jt,jn=ul(ie)-ge.gutters.offsetWidth,Ei=ae.right-ae.left>jn;return Ei&&(ae.right=ae.left+jn),ae.left<10?We.scrollLeft=0:ae.left<Zn?We.scrollLeft=Math.max(0,ae.left+jt-(Ei?0:10)):ae.right>jn+Zn-3&&(We.scrollLeft=ae.right+(Ei?0:10)-jn),We}function Nh(ie,ae){ae!=null&&(Ml(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function ru(ie){Ml(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function zu(ie,ae,ge){(ae!=null||ge!=null)&&Ml(ie),ae!=null&&(ie.curOp.scrollLeft=ae),ge!=null&&(ie.curOp.scrollTop=ge)}function aa(ie,ae){Ml(ie),ie.curOp.scrollToPos=ae}function Ml(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var ge=rd(ie,ae.from),fe=rd(ie,ae.to);Wh(ie,ge,fe,ae.margin)}}function Wh(ie,ae,ge,fe){var ye=Gh(ie,{left:Math.min(ae.left,ge.left),top:Math.min(ae.top,ge.top)-fe,right:Math.max(ae.right,ge.right),bottom:Math.max(ae.bottom,ge.bottom)+fe});zu(ie,ye.scrollLeft,ye.scrollTop)}function Bh(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(ce||Vi(ie,{top:ae}),Od(ie,ae,!0),ce&&Vi(ie),ni(ie,100))}function Od(ie,ae,ge){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!ge)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function _u(ie,ae,ge,fe){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((ge?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!fe)&&(ie.doc.scrollLeft=ae,so(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function ou(ie){var ae=ie.display,ge=ae.gutters.offsetWidth,fe=Math.round(ie.doc.height+Su(ie.display));return{clientHeight:ae.scroller.clientHeight,viewHeight:ae.wrapper.clientHeight,scrollWidth:ae.scroller.scrollWidth,clientWidth:ae.scroller.clientWidth,viewWidth:ae.wrapper.clientWidth,barLeft:ie.options.fixedGutter?ge:0,docHeight:fe,scrollHeight:fe+Ys(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:ge}}var xu=function(ie,ae,ge){this.cm=ge;var fe=this.vert=Ke("div",[Ke("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ye=this.horiz=Ke("div",[Ke("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=ye.tabIndex=-1,ie(fe),ie(ye),ft(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),ft(ye,"scroll",function(){ye.clientWidth&&ae(ye.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ze&&ht<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xu.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,ge=ie.scrollHeight>ie.clientHeight+1,fe=ie.nativeBarWidth;if(ge){this.vert.style.display="block",this.vert.style.bottom=ae?fe+"px":"0";var ye=ie.viewHeight-(ae?fe:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+ye)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=ge?fe+"px":"0",this.horiz.style.left=ie.barLeft+"px";var ke=ie.viewWidth-ie.barLeft-(ge?fe:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+ke)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ge?fe:0,bottom:ae?fe:0}},xu.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xu.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xu.prototype.zeroWidthHack=function(){var ie=he&&!mt?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $e,this.disableVert=new $e},xu.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var ye=ie.getBoundingClientRect(),ke=ge=="vert"?document.elementFromPoint(ye.right-1,(ye.top+ye.bottom)/2):document.elementFromPoint((ye.right+ye.left)/2,ye.bottom-1);ke!=ie?ie.style.pointerEvents="none":ae.set(1e3,fe)}ae.set(1e3,fe)},xu.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Pu=function(){};Pu.prototype.update=function(){return{bottom:0,right:0}},Pu.prototype.setScrollLeft=function(){},Pu.prototype.setScrollTop=function(){},Pu.prototype.clear=function(){};function dh(ie,ae){ae||(ae=ou(ie));var ge=ie.display.barWidth,fe=ie.display.barHeight;Lc(ie,ae);for(var ye=0;ye<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;ye++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Gi(ie),Lc(ie,ou(ie)),ge=ie.display.barWidth,fe=ie.display.barHeight}function Lc(ie,ae){var ge=ie.display,fe=ge.scrollbars.update(ae);ge.sizer.style.paddingRight=(ge.barWidth=fe.right)+"px",ge.sizer.style.paddingBottom=(ge.barHeight=fe.bottom)+"px",ge.heightForcer.style.borderBottom=fe.bottom+"px solid transparent",fe.right&&fe.bottom?(ge.scrollbarFiller.style.display="block",ge.scrollbarFiller.style.height=fe.bottom+"px",ge.scrollbarFiller.style.width=fe.right+"px"):ge.scrollbarFiller.style.display="",fe.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(ge.gutterFiller.style.display="block",ge.gutterFiller.style.height=fe.bottom+"px",ge.gutterFiller.style.width=ae.gutterWidth+"px"):ge.gutterFiller.style.display=""}var Fc={native:xu,null:Pu};function Nc(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&Ie(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new Fc[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),ft(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,ge){ge=="horizontal"?_u(ie,ae):Bh(ie,ae)},ie),ie.display.scrollbars.addClass&&Et(ie.display.wrapper,ie.display.scrollbars.addClass)}var od=0;function Hn(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.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:++od},Ul(ie.curOp)}function yr(ie){var ae=ie.curOp;ae&&Ko(ae,function(ge){for(var fe=0;fe<ge.ops.length;fe++)ge.ops[fe].cm.curOp=null;Jo(ge)})}function Jo(ie){for(var ae=ie.ops,ge=0;ge<ae.length;ge++)Xe(ae[ge]);for(var fe=0;fe<ae.length;fe++)Ue(ae[fe]);for(var ye=0;ye<ae.length;ye++)zt(ae[ye]);for(var ke=0;ke<ae.length;ke++)_t(ae[ke]);for(var We=0;We<ae.length;We++)on(ae[We])}function Xe(ie){var ae=ie.cm,ge=ae.display;ki(ae),ie.updateMaxLine&&Bo(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<ge.viewFrom||ie.scrollToPos.to.line>=ge.viewTo)||ge.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new ei(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function Ue(ie){ie.updatedDisplay=ie.mustUpdate&&rr(ie.cm,ie.update)}function zt(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Gi(ae),ie.barMeasure=ou(ae),ge.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=Fh(ae,ge.maxLine,ge.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(ge.scroller.clientWidth,ge.sizer.offsetLeft+ie.adjustWidthTo+Ys(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-ul(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=ge.input.prepareSelection())}function _t(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&_u(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var ge=ie.focus&&ie.focus==qe();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&dh(ae,ie.barMeasure),ie.updatedDisplay&&Xr(ae,ie.barMeasure),ie.selectionChanged&&ko(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&Yo(ie.cm)}function on(ie){var ae=ie.cm,ge=ae.display,fe=ae.doc;if(ie.updatedDisplay&&Mi(ae,ie.update),ge.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(ge.wheelStartX=ge.wheelStartY=null),ie.scrollTop!=null&&Od(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&_u(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var ye=Is(ae,hi(fe,ie.scrollToPos.from),hi(fe,ie.scrollToPos.to),ie.scrollToPos.margin);_a(ae,ye)}var ke=ie.maybeHiddenMarkers,We=ie.maybeUnhiddenMarkers;if(ke)for(var at=0;at<ke.length;++at)ke[at].lines.length||Qt(ke[at],"hide");if(We)for(var it=0;it<We.length;++it)We[it].lines.length&&Qt(We[it],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&Qt(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function Wt(ie,ae){if(ie.curOp)return ae();Hn(ie);try{return ae()}finally{yr(ie)}}function Fn(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);Hn(ie);try{return ae.apply(ie,arguments)}finally{yr(ie)}}}function wn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Hn(this);try{return ie.apply(this,arguments)}finally{yr(this)}}}function kn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);Hn(ae);try{return ie.apply(this,arguments)}finally{yr(ae)}}}function ni(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Gt(Tn,ie))}function Tn(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=Wr(ie,ae.highlightFrontier),ye=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(ke){if(fe.line>=ie.display.viewFrom){var We=ke.styles,at=ke.text.length>ie.options.maxHighlightLength?Yt(ae.mode,fe.state):null,it=Br(ie,ke,fe,!0);at&&(fe.state=at),ke.styles=it.styles;var bt=ke.styleClasses,pn=it.classes;pn?ke.styleClasses=pn:bt&&(ke.styleClasses=null);for(var jt=!We||We.length!=ke.styles.length||bt!=pn&&(!bt||!pn||bt.bgClass!=pn.bgClass||bt.textClass!=pn.textClass),Zn=0;!jt&&Zn<We.length;++Zn)jt=We[Zn]!=ke.styles[Zn];jt&&ye.push(fe.line),ke.stateAfter=fe.save(),fe.nextLine()}else ke.text.length<=ie.options.maxHighlightLength&&mn(ie,ke.text,fe),ke.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return ni(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),ye.length&&Wt(ie,function(){for(var ke=0;ke<ye.length;ke++)ir(ie,ye[ke],"text")})}}var ei=function(ie,ae,ge){var fe=ie.display;this.viewport=ae,this.visible=Vr(fe,ie.doc,ae),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=ul(ie),this.force=ge,this.dims=po(ie),this.events=[]};ei.prototype.signal=function(ie,ae){zn(ie,ae)&&this.events.push(arguments)},ei.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)Qt.apply(null,this.events[ie])};function ki(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=Ys(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Ys(ie)+"px",ae.scrollbarsClipped=!0)}function Ci(ie){if(ie.hasFocus())return null;var ae=qe();if(!ae||!At(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&At(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function xi(ie){if(!(!ie||!ie.activeElt||ie.activeElt==qe())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&At(document.body,ie.anchorNode)&&At(document.body,ie.focusNode))){var ae=window.getSelection(),ge=document.createRange();ge.setEnd(ie.anchorNode,ie.anchorOffset),ge.collapse(!1),ae.removeAllRanges(),ae.addRange(ge),ae.extend(ie.focusNode,ie.focusOffset)}}function rr(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return wr(ie),!1;if(!ae.force&&ae.visible.from>=ge.viewFrom&&ae.visible.to<=ge.viewTo&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo)&&ge.renderedView==ge.view&&er(ie)==0)return!1;fr(ie)&&(wr(ie),ae.dims=po(ie));var ye=fe.first+fe.size,ke=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),We=Math.min(ye,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<ke&&ke-ge.viewFrom<20&&(ke=Math.max(fe.first,ge.viewFrom)),ge.viewTo>We&&ge.viewTo-We<20&&(We=Math.min(ye,ge.viewTo)),An&&(ke=Mr(ie.doc,ke),We=sr(ie.doc,We));var at=ke!=ge.viewFrom||We!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;Ir(ie,ke,We),ge.viewOffset=wo(Kt(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var it=er(ie);if(!at&&it==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var bt=Ci(ie);return it>4&&(ge.lineDiv.style.display="none"),Ui(ie,ge.updateLineNumbers,ae.dims),it>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,xi(bt),je(ge.cursorDiv),je(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,at&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,ni(ie,400)),ge.updateLineNumbers=null,!0}function Mi(ie,ae){for(var ge=ae.viewport,fe=!0;;fe=!1){if(!fe||!ie.options.lineWrapping||ae.oldDisplayWidth==ul(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+Su(ie.display)-Mh(ie),ge.top)}),ae.visible=Vr(ie.display,ie.doc,ge),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else fe&&(ae.visible=Vr(ie.display,ie.doc,ge));if(!rr(ie,ae))break;Gi(ie);var ye=ou(ie);lr(ie),dh(ie,ye),Xr(ie,ye),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function Vi(ie,ae){var ge=new ei(ie,ae);if(rr(ie,ge)){Gi(ie),Mi(ie,ge);var fe=ou(ie);lr(ie),dh(ie,fe),Xr(ie,fe),ge.finish()}}function Ui(ie,ae,ge){var fe=ie.display,ye=ie.options.lineNumbers,ke=fe.lineDiv,We=ke.firstChild;function at(Ei){var Ai=Ei.nextSibling;return Me&&he&&ie.display.currentWheelTarget==Ei?Ei.style.display="none":Ei.parentNode.removeChild(Ei),Ai}for(var it=fe.view,bt=fe.viewFrom,pn=0;pn<it.length;pn++){var jt=it[pn];if(!jt.hidden)if(!jt.node||jt.node.parentNode!=ke){var Zn=Ol(ie,jt,bt,ge);ke.insertBefore(Zn,We)}else{for(;We!=jt.node;)We=at(We);var jn=ye&&ae!=null&&ae<=bt&&jt.lineNumber;jt.changes&&(Nt(jt.changes,"gutter")>-1&&(jn=!1),$a(ie,jt,bt,ge)),jn&&(je(jt.lineNumber),jt.lineNumber.appendChild(document.createTextNode(ai(ie.options,bt)))),We=jt.node.nextSibling}bt+=jt.size}for(;We;)We=at(We)}function Pr(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Xr(ie,ae){ie.display.sizer.style.minHeight=ae.docHeight+"px",ie.display.heightForcer.style.top=ae.docHeight+"px",ie.display.gutters.style.height=ae.docHeight+ie.display.barHeight+Ys(ie)+"px"}function so(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=Wo(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,ye=ae.gutters.offsetWidth,ke=fe+"px",We=0;We<ge.length;We++)if(!ge[We].hidden){ie.options.fixedGutter&&(ge[We].gutter&&(ge[We].gutter.style.left=ke),ge[We].gutterBackground&&(ge[We].gutterBackground.style.left=ke));var at=ge[We].alignable;if(at)for(var it=0;it<at.length;it++)at[it].style.left=ke}ie.options.fixedGutter&&(ae.gutters.style.left=fe+ye+"px")}}function fr(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,ge=ai(ie.options,ae.first+ae.size-1),fe=ie.display;if(ge.length!=fe.lineNumChars){var ye=fe.measure.appendChild(Ke("div",[Ke("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ke=ye.firstChild.offsetWidth,We=ye.offsetWidth-ke;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(ke,fe.lineGutter.offsetWidth-We)+1,fe.lineNumWidth=fe.lineNumInnerWidth+We,fe.lineNumChars=fe.lineNumInnerWidth?ge.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",Pr(ie.display),!0}return!1}function Ur(ie,ae){for(var ge=[],fe=!1,ye=0;ye<ie.length;ye++){var ke=ie[ye],We=null;if(typeof ke!="string"&&(We=ke.style,ke=ke.className),ke=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:ke,style:We})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function zo(ie){var ae=ie.gutters,ge=ie.gutterSpecs;je(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var ye=ge[fe],ke=ye.className,We=ye.style,at=ae.appendChild(Ke("div",null,"CodeMirror-gutter "+ke));We&&(at.style.cssText=We),ke=="CodeMirror-linenumbers"&&(ie.lineGutter=at,at.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",Pr(ie)}function xr(ie){zo(ie.display),Ar(ie),so(ie)}function Hr(ie,ae,ge,fe){var ye=this;this.input=ge,ye.scrollbarFiller=Ke("div",null,"CodeMirror-scrollbar-filler"),ye.scrollbarFiller.setAttribute("cm-not-content","true"),ye.gutterFiller=Ke("div",null,"CodeMirror-gutter-filler"),ye.gutterFiller.setAttribute("cm-not-content","true"),ye.lineDiv=gt("div",null,"CodeMirror-code"),ye.selectionDiv=Ke("div",null,null,"position: relative; z-index: 1"),ye.cursorDiv=Ke("div",null,"CodeMirror-cursors"),ye.measure=Ke("div",null,"CodeMirror-measure"),ye.lineMeasure=Ke("div",null,"CodeMirror-measure"),ye.lineSpace=gt("div",[ye.measure,ye.lineMeasure,ye.selectionDiv,ye.cursorDiv,ye.lineDiv],null,"position: relative; outline: none");var ke=gt("div",[ye.lineSpace],"CodeMirror-lines");ye.mover=Ke("div",[ke],null,"position: relative"),ye.sizer=Ke("div",[ye.mover],"CodeMirror-sizer"),ye.sizerWidth=null,ye.heightForcer=Ke("div",null,null,"position: absolute; height: "+cn+"px; width: 1px;"),ye.gutters=Ke("div",null,"CodeMirror-gutters"),ye.lineGutter=null,ye.scroller=Ke("div",[ye.sizer,ye.heightForcer,ye.gutters],"CodeMirror-scroll"),ye.scroller.setAttribute("tabIndex","-1"),ye.wrapper=Ke("div",[ye.scrollbarFiller,ye.gutterFiller,ye.scroller],"CodeMirror"),Ze&&ht<8&&(ye.gutters.style.zIndex=-1,ye.scroller.style.paddingRight=0),!Me&&!(ce&&ee)&&(ye.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(ye.wrapper):ie(ye.wrapper)),ye.viewFrom=ye.viewTo=ae.first,ye.reportedViewFrom=ye.reportedViewTo=ae.first,ye.view=[],ye.renderedView=null,ye.externalMeasured=null,ye.viewOffset=0,ye.lastWrapHeight=ye.lastWrapWidth=0,ye.updateLineNumbers=null,ye.nativeBarWidth=ye.barHeight=ye.barWidth=0,ye.scrollbarsClipped=!1,ye.lineNumWidth=ye.lineNumInnerWidth=ye.lineNumChars=null,ye.alignWidgets=!1,ye.cachedCharWidth=ye.cachedTextHeight=ye.cachedPaddingH=null,ye.maxLine=null,ye.maxLineLength=0,ye.maxLineChanged=!1,ye.wheelDX=ye.wheelDY=ye.wheelStartX=ye.wheelStartY=null,ye.shift=!1,ye.selForContextMenu=null,ye.activeTouch=null,ye.gutterSpecs=Ur(fe.gutters,fe.lineNumbers),zo(ye),ge.init(ye)}var Sr=0,$i=null;Ze?$i=-.53:ce?$i=15:ct?$i=-.7:st&&($i=-1/3);function Fr(ie){var ae=ie.wheelDeltaX,ge=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),ge==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?ge=ie.detail:ge==null&&(ge=ie.wheelDelta),{x:ae,y:ge}}function no(ie){var ae=Fr(ie);return ae.x*=$i,ae.y*=$i,ae}function xo(ie,ae){var ge=Fr(ae),fe=ge.x,ye=ge.y,ke=ie.display,We=ke.scroller,at=We.scrollWidth>We.clientWidth,it=We.scrollHeight>We.clientHeight;if(fe&&at||ye&&it){if(ye&&he&&Me){e:for(var bt=ae.target,pn=ke.view;bt!=We;bt=bt.parentNode)for(var jt=0;jt<pn.length;jt++)if(pn[jt].node==bt){ie.display.currentWheelTarget=bt;break e}}if(fe&&!ce&&!He&&$i!=null){ye&&it&&Bh(ie,Math.max(0,We.scrollTop+ye*$i)),_u(ie,Math.max(0,We.scrollLeft+fe*$i)),(!ye||ye&&it)&&ii(ae),ke.wheelStartX=null;return}if(ye&&$i!=null){var Zn=ye*$i,jn=ie.doc.scrollTop,Ei=jn+ke.wrapper.clientHeight;Zn<0?jn=Math.max(0,jn+Zn-50):Ei=Math.min(ie.doc.height,Ei+Zn+50),Vi(ie,{top:jn,bottom:Ei})}Sr<20&&(ke.wheelStartX==null?(ke.wheelStartX=We.scrollLeft,ke.wheelStartY=We.scrollTop,ke.wheelDX=fe,ke.wheelDY=ye,setTimeout(function(){if(ke.wheelStartX!=null){var Ai=We.scrollLeft-ke.wheelStartX,Zi=We.scrollTop-ke.wheelStartY,pr=Zi&&ke.wheelDY&&Zi/ke.wheelDY||Ai&&ke.wheelDX&&Ai/ke.wheelDX;ke.wheelStartX=ke.wheelStartY=null,pr&&($i=($i*Sr+pr)/(Sr+1),++Sr)}},200)):(ke.wheelDX+=fe,ke.wheelDY+=ye))}}var Eo=function(ie,ae){this.ranges=ie,this.primIndex=ae};Eo.prototype.primary=function(){return this.ranges[this.primIndex]},Eo.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ae=0;ae<this.ranges.length;ae++){var ge=this.ranges[ae],fe=ie.ranges[ae];if(!Xn(ge.anchor,fe.anchor)||!Xn(ge.head,fe.head))return!1}return!0},Eo.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new gr(si(this.ranges[ae].anchor),si(this.ranges[ae].head));return new Eo(ie,this.primIndex)},Eo.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Eo.prototype.contains=function(ie,ae){ae||(ae=ie);for(var ge=0;ge<this.ranges.length;ge++){var fe=this.ranges[ge];if(Jt(ae,fe.from())>=0&&Jt(ie,fe.to())<=0)return ge}return-1};var gr=function(ie,ae){this.anchor=ie,this.head=ae};gr.prototype.from=function(){return Qn(this.anchor,this.head)},gr.prototype.to=function(){return ui(this.anchor,this.head)},gr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ho(ie,ae,ge){var fe=ie&&ie.options.selectionsMayTouch,ye=ae[ge];ae.sort(function(Zn,jn){return Jt(Zn.from(),jn.from())}),ge=Nt(ae,ye);for(var ke=1;ke<ae.length;ke++){var We=ae[ke],at=ae[ke-1],it=Jt(at.to(),We.from());if(fe&&!We.empty()?it>0:it>=0){var bt=Qn(at.from(),We.from()),pn=ui(at.to(),We.to()),jt=at.empty()?We.from()==We.head:at.from()==at.head;ke<=ge&&--ge,ae.splice(--ke,2,new gr(jt?pn:bt,jt?bt:pn))}}return new Eo(ae,ge)}function Vo(ie,ae){return new Eo([new gr(ie,ae||ie)],0)}function wa(ie){return ie.text?hn(ie.from.line+ie.text.length-1,pt(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function sa(ie,ae){if(Jt(ie,ae.from)<0)return ie;if(Jt(ie,ae.to)<=0)return wa(ae);var ge=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,fe=ie.ch;return ie.line==ae.to.line&&(fe+=wa(ae).ch-ae.to.ch),hn(ge,fe)}function os(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var ye=ie.sel.ranges[fe];ge.push(new gr(sa(ye.anchor,ae),sa(ye.head,ae)))}return Ho(ie.cm,ge,ie.sel.primIndex)}function ts(ie,ae,ge){return ie.line==ae.line?hn(ge.line,ie.ch-ae.ch+ge.ch):hn(ge.line+(ie.line-ae.line),ie.ch)}function $o(ie,ae,ge){for(var fe=[],ye=hn(ie.first,0),ke=ye,We=0;We<ae.length;We++){var at=ae[We],it=ts(at.from,ye,ke),bt=ts(wa(at),ye,ke);if(ye=at.to,ke=bt,ge=="around"){var pn=ie.sel.ranges[We],jt=Jt(pn.head,pn.anchor)<0;fe[We]=new gr(jt?bt:it,jt?it:bt)}else fe[We]=new gr(it,it)}return new Eo(fe,ie.sel.primIndex)}function oo(ie){ie.doc.mode=Mt(ie.options,ie.doc.modeOption),pa(ie)}function pa(ie){ie.doc.iter(function(ae){ae.stateAfter&&(ae.stateAfter=null),ae.styles&&(ae.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,ni(ie,100),ie.state.modeGen++,ie.curOp&&Ar(ie)}function as(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&pt(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Va(ie,ae,ge,fe){function ye(Kr){return ge?ge[Kr]:null}function ke(Kr,Nr,io){ta(Kr,Nr,io,fe),Ti(Kr,"change",Kr,ae)}function We(Kr,Nr){for(var io=[],Go=Kr;Go<Nr;++Go)io.push(new yo(bt[Go],ye(Go),fe));return io}var at=ae.from,it=ae.to,bt=ae.text,pn=Kt(ie,at.line),jt=Kt(ie,it.line),Zn=pt(bt),jn=ye(bt.length-1),Ei=it.line-at.line;if(ae.full)ie.insert(0,We(0,bt.length)),ie.remove(bt.length,ie.size-bt.length);else if(as(ie,ae)){var Ai=We(0,bt.length-1);ke(jt,jt.text,jn),Ei&&ie.remove(at.line,Ei),Ai.length&&ie.insert(at.line,Ai)}else if(pn==jt)if(bt.length==1)ke(pn,pn.text.slice(0,at.ch)+Zn+pn.text.slice(it.ch),jn);else{var Zi=We(1,bt.length-1);Zi.push(new yo(Zn+pn.text.slice(it.ch),jn,fe)),ke(pn,pn.text.slice(0,at.ch)+bt[0],ye(0)),ie.insert(at.line+1,Zi)}else if(bt.length==1)ke(pn,pn.text.slice(0,at.ch)+bt[0]+jt.text.slice(it.ch),ye(0)),ie.remove(at.line+1,Ei);else{ke(pn,pn.text.slice(0,at.ch)+bt[0],ye(0)),ke(jt,Zn+jt.text.slice(it.ch),jn);var pr=We(1,bt.length-1);Ei>1&&ie.remove(at.line+1,Ei-1),ie.insert(at.line+1,pr)}Ti(ie,"change",ie,ae)}function Ms(ie,ae,ge){function fe(ye,ke,We){if(ye.linked)for(var at=0;at<ye.linked.length;++at){var it=ye.linked[at];if(it.doc!=ke){var bt=We&&it.sharedHist;ge&&!bt||(ae(it.doc,bt),fe(it.doc,ye,bt))}}}fe(ie,null,!0)}function bo(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,_i(ie),oo(ie),mo(ie),ie.options.lineWrapping||Bo(ie),ie.options.mode=ae.modeOption,Ar(ie)}function mo(ie){(ie.doc.direction=="rtl"?Et:Ie)(ie.display.lineDiv,"CodeMirror-rtl")}function Mo(ie){Wt(ie,function(){mo(ie),Ar(ie)})}function qr(ie){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=ie||1}function ya(ie,ae){var ge={from:si(ae.from),to:wa(ae),text:ln(ie,ae.from,ae.to)};return hl(ie,ge,ae.from.line,ae.to.line+1),Ms(ie,function(fe){return hl(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function eo(ie){for(;ie.length;){var ae=pt(ie);if(ae.ranges)ie.pop();else break}}function _o(ie,ae){if(ae)return eo(ie.done),pt(ie.done);if(ie.done.length&&!pt(ie.done).ranges)return pt(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),pt(ie.done)}function ha(ie,ae,ge,fe){var ye=ie.history;ye.undone.length=0;var ke=+new Date,We,at;if((ye.lastOp==fe||ye.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&ye.lastModTime>ke-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(We=_o(ye,ye.lastOp==fe)))at=pt(We.changes),Jt(ae.from,ae.to)==0&&Jt(ae.from,at.to)==0?at.to=wa(ae):We.changes.push(ya(ie,ae));else{var it=pt(ye.done);for((!it||!it.ranges)&&Bs(ie.sel,ye.done),We={changes:[ya(ie,ae)],generation:ye.generation},ye.done.push(We);ye.done.length>ye.undoDepth;)ye.done.shift(),ye.done[0].ranges||ye.done.shift()}ye.done.push(ge),ye.generation=++ye.maxGeneration,ye.lastModTime=ye.lastSelTime=ke,ye.lastOp=ye.lastSelOp=fe,ye.lastOrigin=ye.lastSelOrigin=ae.origin,at||Qt(ie,"historyAdded")}function ca(ie,ae,ge,fe){var ye=ae.charAt(0);return ye=="*"||ye=="+"&&ge.ranges.length==fe.ranges.length&&ge.somethingSelected()==fe.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Vs(ie,ae,ge,fe){var ye=ie.history,ke=fe&&fe.origin;ge==ye.lastSelOp||ke&&ye.lastSelOrigin==ke&&(ye.lastModTime==ye.lastSelTime&&ye.lastOrigin==ke||ca(ie,ke,pt(ye.done),ae))?ye.done[ye.done.length-1]=ae:Bs(ae,ye.done),ye.lastSelTime=+new Date,ye.lastSelOrigin=ke,ye.lastSelOp=ge,fe&&fe.clearRedo!==!1&&eo(ye.undone)}function Bs(ie,ae){var ge=pt(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function hl(ie,ae,ge,fe){var ye=ae["spans_"+ie.id],ke=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(We){We.markedSpans&&((ye||(ye=ae["spans_"+ie.id]={}))[ke]=We.markedSpans),++ke})}function Ca(ie){if(!ie)return null;for(var ae,ge=0;ge<ie.length;++ge)ie[ge].marker.explicitlyCleared?ae||(ae=ie.slice(0,ge)):ae&&ae.push(ie[ge]);return ae?ae.length?ae:null:ie}function Us(ie,ae){var ge=ae["spans_"+ie.id];if(!ge)return null;for(var fe=[],ye=0;ye<ae.text.length;++ye)fe.push(Ca(ge[ye]));return fe}function ws(ie,ae){var ge=Us(ie,ae),fe=qi(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var ye=0;ye<ge.length;++ye){var ke=ge[ye],We=fe[ye];if(ke&&We)e:for(var at=0;at<We.length;++at){for(var it=We[at],bt=0;bt<ke.length;++bt)if(ke[bt].marker==it.marker)continue e;ke.push(it)}else We&&(ge[ye]=We)}return ge}function Rs(ie,ae,ge){for(var fe=[],ye=0;ye<ie.length;++ye){var ke=ie[ye];if(ke.ranges){fe.push(ge?Eo.prototype.deepCopy.call(ke):ke);continue}var We=ke.changes,at=[];fe.push({changes:at});for(var it=0;it<We.length;++it){var bt=We[it],pn=void 0;if(at.push({from:bt.from,to:bt.to,text:bt.text}),ae)for(var jt in bt)(pn=jt.match(/^spans_(\d+)$/))&&Nt(ae,Number(pn[1]))>-1&&(pt(at)[jt]=bt[jt],delete bt[jt])}}return fe}function fh(ie,ae,ge,fe){if(fe){var ye=ie.anchor;if(ge){var ke=Jt(ae,ye)<0;ke!=Jt(ge,ye)<0?(ye=ae,ae=ge):ke!=Jt(ae,ge)<0&&(ae=ge)}return new gr(ye,ae)}else return new gr(ge||ae,ae)}function Ea(ie,ae,ge,fe,ye){ye==null&&(ye=ie.cm&&(ie.cm.display.shift||ie.extend)),Za(ie,new Eo([fh(ie.sel.primary(),ae,ge,ye)],0),fe)}function Ta(ie,ae,ge){for(var fe=[],ye=ie.cm&&(ie.cm.display.shift||ie.extend),ke=0;ke<ie.sel.ranges.length;ke++)fe[ke]=fh(ie.sel.ranges[ke],ae[ke],null,ye);var We=Ho(ie.cm,fe,ie.sel.primIndex);Za(ie,We,ge)}function ja(ie,ae,ge,fe){var ye=ie.sel.ranges.slice(0);ye[ae]=ge,Za(ie,Ho(ie.cm,ye,ie.sel.primIndex),fe)}function ms(ie,ae,ge,fe){Za(ie,Vo(ae,ge),fe)}function js(ie,ae,ge){var fe={ranges:ae.ranges,update:function(ye){this.ranges=[];for(var ke=0;ke<ye.length;ke++)this.ranges[ke]=new gr(hi(ie,ye[ke].anchor),hi(ie,ye[ke].head))},origin:ge&&ge.origin};return Qt(ie,"beforeSelectionChange",ie,fe),ie.cm&&Qt(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?Ho(ie.cm,fe.ranges,fe.ranges.length-1):ae}function ra(ie,ae,ge){var fe=ie.history.done,ye=pt(fe);ye&&ye.ranges?(fe[fe.length-1]=ae,zs(ie,ae,ge)):Za(ie,ae,ge)}function Za(ie,ae,ge){zs(ie,ae,ge),Vs(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,ge)}function zs(ie,ae,ge){(zn(ie,"beforeSelectionChange")||ie.cm&&zn(ie.cm,"beforeSelectionChange"))&&(ae=js(ie,ae,ge));var fe=ge&&ge.bias||(Jt(ae.primary().head,ie.sel.primary().head)<0?-1:1);jl(ie,Yl(ie,ae,fe,!0)),!(ge&&ge.scroll===!1)&&ie.cm&&ru(ie.cm)}function jl(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,Yn(ie.cm)),Ti(ie,"cursorActivity",ie))}function au(ie){jl(ie,Yl(ie,ie.sel,null,!1))}function Yl(ie,ae,ge,fe){for(var ye,ke=0;ke<ae.ranges.length;ke++){var We=ae.ranges[ke],at=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[ke],it=Cu(ie,We.anchor,at&&at.anchor,ge,fe),bt=Cu(ie,We.head,at&&at.head,ge,fe);(ye||it!=We.anchor||bt!=We.head)&&(ye||(ye=ae.ranges.slice(0,ke)),ye[ke]=new gr(it,bt))}return ye?Ho(ie.cm,ye,ae.primIndex):ae}function wu(ie,ae,ge,fe,ye){var ke=Kt(ie,ae.line);if(ke.markedSpans)for(var We=0;We<ke.markedSpans.length;++We){var at=ke.markedSpans[We],it=at.marker,bt="selectLeft"in it?!it.selectLeft:it.inclusiveLeft,pn="selectRight"in it?!it.selectRight:it.inclusiveRight;if((at.from==null||(bt?at.from<=ae.ch:at.from<ae.ch))&&(at.to==null||(pn?at.to>=ae.ch:at.to>ae.ch))){if(ye&&(Qt(it,"beforeCursorEnter"),it.explicitlyCleared))if(ke.markedSpans){--We;continue}else break;if(!it.atomic)continue;if(ge){var jt=it.find(fe<0?1:-1),Zn=void 0;if((fe<0?pn:bt)&&(jt=su(ie,jt,-fe,jt&&jt.line==ae.line?ke:null)),jt&&jt.line==ae.line&&(Zn=Jt(jt,ge))&&(fe<0?Zn<0:Zn>0))return wu(ie,jt,ae,fe,ye)}var jn=it.find(fe<0?-1:1);return(fe<0?bt:pn)&&(jn=su(ie,jn,fe,jn.line==ae.line?ke:null)),jn?wu(ie,jn,ae,fe,ye):null}}return ae}function Cu(ie,ae,ge,fe,ye){var ke=fe||1,We=wu(ie,ae,ge,ke,ye)||!ye&&wu(ie,ae,ge,ke,!0)||wu(ie,ae,ge,-ke,ye)||!ye&&wu(ie,ae,ge,-ke,!0);return We||(ie.cantEdit=!0,hn(ie.first,0))}function su(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?hi(ie,hn(ae.line-1)):null:ge>0&&ae.ch==(fe||Kt(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?hn(ae.line+1,0):null:new hn(ae.line,ae.ch+ge)}function La(ie){ie.setSelection(hn(ie.firstLine(),0),hn(ie.lastLine()),Ft)}function Xs(ie,ae,ge){var fe={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return fe.canceled=!0}};return ge&&(fe.update=function(ye,ke,We,at){ye&&(fe.from=hi(ie,ye)),ke&&(fe.to=hi(ie,ke)),We&&(fe.text=We),at!==void 0&&(fe.origin=at)}),Qt(ie,"beforeChange",ie,fe),ie.cm&&Qt(ie.cm,"beforeChange",ie.cm,fe),fe.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:fe.from,to:fe.to,text:fe.text,origin:fe.origin}}function fs(ie,ae,ge){if(ie.cm){if(!ie.cm.curOp)return Fn(ie.cm,fs)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((zn(ie,"beforeChange")||ie.cm&&zn(ie.cm,"beforeChange"))&&(ae=Xs(ie,ae,!0),!ae))){var fe=hr&&!ge&&ro(ie,ae.from,ae.to);if(fe)for(var ye=fe.length-1;ye>=0;--ye)Ha(ie,{from:fe[ye].from,to:fe[ye].to,text:ye?[""]:ae.text,origin:ae.origin});else Ha(ie,ae)}}function Ha(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&Jt(ae.from,ae.to)==0)){var ge=os(ie,ae);ha(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),Eu(ie,ae,ge,qi(ie,ae));var fe=[];Ms(ie,function(ye,ke){!ke&&Nt(fe,ye.history)==-1&&(Ua(ye.history,ae),fe.push(ye.history)),Eu(ye,ae,null,qi(ye,ae))})}}function lu(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var ye=ie.history,ke,We=ie.sel,at=ae=="undo"?ye.done:ye.undone,it=ae=="undo"?ye.undone:ye.done,bt=0;bt<at.length&&(ke=at[bt],!(ge?ke.ranges&&!ke.equals(ie.sel):!ke.ranges));bt++);if(bt!=at.length){for(ye.lastOrigin=ye.lastSelOrigin=null;;)if(ke=at.pop(),ke.ranges){if(Bs(ke,it),ge&&!ke.equals(ie.sel)){Za(ie,ke,{clearRedo:!1});return}We=ke}else if(fe){at.push(ke);return}else break;var pn=[];Bs(We,it),it.push({changes:pn,generation:ye.generation}),ye.generation=ke.generation||++ye.maxGeneration;for(var jt=zn(ie,"beforeChange")||ie.cm&&zn(ie.cm,"beforeChange"),Zn=function(Ai){var Zi=ke.changes[Ai];if(Zi.origin=ae,jt&&!Xs(ie,Zi,!1))return at.length=0,{};pn.push(ya(ie,Zi));var pr=Ai?os(ie,Zi):pt(at);Eu(ie,Zi,pr,ws(ie,Zi)),!Ai&&ie.cm&&ie.cm.scrollIntoView({from:Zi.from,to:wa(Zi)});var Kr=[];Ms(ie,function(Nr,io){!io&&Nt(Kr,Nr.history)==-1&&(Ua(Nr.history,Zi),Kr.push(Nr.history)),Eu(Nr,Zi,null,ws(Nr,Zi))})},jn=ke.changes.length-1;jn>=0;--jn){var Ei=Zn(jn);if(Ei)return Ei.v}}}}function kh(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Eo(Ln(ie.sel.ranges,function(ye){return new gr(hn(ye.anchor.line+ae,ye.anchor.ch),hn(ye.head.line+ae,ye.head.ch))}),ie.sel.primIndex),ie.cm)){Ar(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)ir(ie.cm,fe,"gutter")}}function Eu(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return Fn(ie.cm,Eu)(ie,ae,ge,fe);if(ae.to.line<ie.first){kh(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var ye=ae.text.length-1-(ie.first-ae.from.line);kh(ie,ye),ae={from:hn(ie.first,0),to:hn(ae.to.line+ye,ae.to.ch),text:[pt(ae.text)],origin:ae.origin}}var ke=ie.lastLine();ae.to.line>ke&&(ae={from:ae.from,to:hn(ke,Kt(ie,ke).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=ln(ie,ae.from,ae.to),ge||(ge=os(ie,ae)),ie.cm?th(ie.cm,ae,fe):Va(ie,ae,fe),zs(ie,ge,Ft),ie.cantEdit&&Cu(ie,hn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function th(ie,ae,ge){var fe=ie.doc,ye=ie.display,ke=ae.from,We=ae.to,at=!1,it=ke.line;ie.options.lineWrapping||(it=St(Rr(Kt(fe,ke.line))),fe.iter(it,We.line+1,function(jn){if(jn==ye.maxLine)return at=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&Yn(ie),Va(fe,ae,ge,ho(ie)),ie.options.lineWrapping||(fe.iter(it,ke.line+ae.text.length,function(jn){var Ei=ua(jn);Ei>ye.maxLineLength&&(ye.maxLine=jn,ye.maxLineLength=Ei,ye.maxLineChanged=!0,at=!1)}),at&&(ie.curOp.updateMaxLine=!0)),nr(fe,ke.line),ni(ie,400);var bt=ae.text.length-(We.line-ke.line)-1;ae.full?Ar(ie):ke.line==We.line&&ae.text.length==1&&!as(ie.doc,ae)?ir(ie,ke.line,"text"):Ar(ie,ke.line,We.line+1,bt);var pn=zn(ie,"changes"),jt=zn(ie,"change");if(jt||pn){var Zn={from:ke,to:We,text:ae.text,removed:ae.removed,origin:ae.origin};jt&&Ti(ie,"change",ie,Zn),pn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(Zn)}ie.display.selForContextMenu=null}function gh(ie,ae,ge,fe,ye){var ke;fe||(fe=ge),Jt(fe,ge)<0&&(ke=[fe,ge],ge=ke[0],fe=ke[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),fs(ie,{from:ge,to:fe,text:ae,origin:ye})}function Xl(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function Sa(ie,ae,ge,fe){for(var ye=0;ye<ie.length;++ye){var ke=ie[ye],We=!0;if(ke.ranges){ke.copied||(ke=ie[ye]=ke.deepCopy(),ke.copied=!0);for(var at=0;at<ke.ranges.length;at++)Xl(ke.ranges[at].anchor,ae,ge,fe),Xl(ke.ranges[at].head,ae,ge,fe);continue}for(var it=0;it<ke.changes.length;++it){var bt=ke.changes[it];if(ge<bt.from.line)bt.from=hn(bt.from.line+fe,bt.from.ch),bt.to=hn(bt.to.line+fe,bt.to.ch);else if(ae<=bt.to.line){We=!1;break}}We||(ie.splice(0,ye+1),ye=0)}}function Ua(ie,ae){var ge=ae.from.line,fe=ae.to.line,ye=ae.text.length-(fe-ge)-1;Sa(ie.done,ge,fe,ye),Sa(ie.undone,ge,fe,ye)}function ks(ie,ae,ge,fe){var ye=ae,ke=ae;return typeof ae=="number"?ke=Kt(ie,di(ie,ae)):ye=St(ae),ye==null?null:(fe(ke,ye)&&ie.cm&&ir(ie.cm,ye,ge),ke)}function Ya(ie){this.lines=ie,this.parent=null;for(var ae=0,ge=0;ge<ie.length;++ge)ie[ge].parent=this,ae+=ie[ge].height;this.height=ae}Ya.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var ge=ie,fe=ie+ae;ge<fe;++ge){var ye=this.lines[ge];this.height-=ye.height,na(ye),Ti(ye,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,ge){this.height+=ge,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var fe=0;fe<ae.length;++fe)ae[fe].parent=this},iterN:function(ie,ae,ge){for(var fe=ie+ae;ie<fe;++ie)if(ge(this.lines[ie]))return!0}};function fa(ie){this.children=ie;for(var ae=0,ge=0,fe=0;fe<ie.length;++fe){var ye=ie[fe];ae+=ye.chunkSize(),ge+=ye.height,ye.parent=this}this.size=ae,this.height=ge,this.parent=null}fa.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var ge=0;ge<this.children.length;++ge){var fe=this.children[ge],ye=fe.chunkSize();if(ie<ye){var ke=Math.min(ae,ye-ie),We=fe.height;if(fe.removeInner(ie,ke),this.height-=We-fe.height,ye==ke&&(this.children.splice(ge--,1),fe.parent=null),(ae-=ke)==0)break;ie=0}else ie-=ye}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Ya))){var at=[];this.collapse(at),this.children=[new Ya(at)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,ge){this.size+=ae.length,this.height+=ge;for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],ke=ye.chunkSize();if(ie<=ke){if(ye.insertInner(ie,ae,ge),ye.lines&&ye.lines.length>50){for(var We=ye.lines.length%25+25,at=We;at<ye.lines.length;){var it=new Ya(ye.lines.slice(at,at+=25));ye.height-=it.height,this.children.splice(++fe,0,it),it.parent=this}ye.lines=ye.lines.slice(0,We),this.maybeSpill()}break}ie-=ke}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),ge=new fa(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var ye=Nt(ie.parent.children,ie);ie.parent.children.splice(ye+1,0,ge)}else{var fe=new fa(ie.children);fe.parent=ie,ie.children=[fe,ge],ie=fe}ge.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,ge){for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],ke=ye.chunkSize();if(ie<ke){var We=Math.min(ae,ke-ie);if(ye.iterN(ie,We,ge))return!0;if((ae-=We)==0)break;ie=0}else ie-=ke}}};var _s=function(ie,ae,ge){if(ge)for(var fe in ge)ge.hasOwnProperty(fe)&&(this[fe]=ge[fe]);this.doc=ie,this.node=ae};_s.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,ge=this.line,fe=St(ge);if(!(fe==null||!ae)){for(var ye=0;ye<ae.length;++ye)ae[ye]==this&&ae.splice(ye--,1);ae.length||(ge.widgets=null);var ke=nl(this);On(ge,Math.max(0,ge.height-ke)),ie&&(Wt(ie,function(){zl(ie,ge,-ke),ir(ie,fe,"widget")}),Ti(ie,"lineWidgetCleared",ie,this,fe))}},_s.prototype.changed=function(){var ie=this,ae=this.height,ge=this.doc.cm,fe=this.line;this.height=null;var ye=nl(this)-ae;ye&&(qn(this.doc,fe)||On(fe,fe.height+ye),ge&&Wt(ge,function(){ge.curOp.forceUpdate=!0,zl(ge,fe,ye),Ti(ge,"lineWidgetChanged",ge,ie,St(fe))}))},Dn(_s);function zl(ie,ae,ge){wo(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Nh(ie,ge)}function Zu(ie,ae,ge,fe){var ye=new _s(ie,ge,fe),ke=ie.cm;return ke&&ye.noHScroll&&(ke.display.alignWidgets=!0),ks(ie,ae,"widget",function(We){var at=We.widgets||(We.widgets=[]);if(ye.insertAt==null?at.push(ye):at.splice(Math.min(at.length-1,Math.max(0,ye.insertAt)),0,ye),ye.line=We,ke&&!qn(ie,We)){var it=wo(We)<ie.scrollTop;On(We,We.height+nl(ye)),it&&Nh(ke,ye.height),ke.curOp.forceUpdate=!0}return!0}),ke&&Ti(ke,"lineWidgetAdded",ke,ye,typeof ae=="number"?ae:St(ae)),ye}var pf=0,nn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++pf};nn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&Hn(ie),zn(this,"clear")){var ge=this.find();ge&&Ti(this,"clear",ge.from,ge.to)}for(var fe=null,ye=null,ke=0;ke<this.lines.length;++ke){var We=this.lines[ke],at=co(We.markedSpans,this);ie&&!this.collapsed?ir(ie,St(We),"text"):ie&&(at.to!=null&&(ye=St(We)),at.from!=null&&(fe=St(We))),We.markedSpans=Bi(We.markedSpans,at),at.from==null&&this.collapsed&&!qn(this.doc,We)&&ie&&On(We,zr(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var it=0;it<this.lines.length;++it){var bt=Rr(this.lines[it]),pn=ua(bt);pn>ie.display.maxLineLength&&(ie.display.maxLine=bt,ie.display.maxLineLength=pn,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&Ar(ie,fe,ye+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&au(ie.doc)),ie&&Ti(ie,"markerCleared",ie,this,fe,ye),ae&&yr(ie),this.parent&&this.parent.clear()}},nn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,ye=0;ye<this.lines.length;++ye){var ke=this.lines[ye],We=co(ke.markedSpans,this);if(We.from!=null&&(ge=hn(ae?ke:St(ke),We.from),ie==-1))return ge;if(We.to!=null&&(fe=hn(ae?ke:St(ke),We.to),ie==1))return fe}return ge&&{from:ge,to:fe}},nn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),ge=this,fe=this.doc.cm;!ae||!fe||Wt(fe,function(){var ye=ae.line,ke=St(ae.line),We=Ru(fe,ke);if(We&&(Gs(We),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!qn(ge.doc,ye)&&ge.height!=null){var at=ge.height;ge.height=null;var it=nl(ge)-at;it&&On(ye,ye.height+it)}Ti(fe,"markerChanged",fe,ie)})},nn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||Nt(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},nn.prototype.detachLine=function(ie){if(this.lines.splice(Nt(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},Dn(nn);function $h(ie,ae,ge,fe,ye){if(fe&&fe.shared)return mf(ie,ae,ge,fe,ye);if(ie.cm&&!ie.cm.curOp)return Fn(ie.cm,$h)(ie,ae,ge,fe,ye);var ke=new nn(ie,ye),We=Jt(ae,ge);if(fe&&Ut(fe,ke,!1),We>0||We==0&&ke.clearWhenEmpty!==!1)return ke;if(ke.replacedWith&&(ke.collapsed=!0,ke.widgetNode=gt("span",[ke.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||ke.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(ke.widgetNode.insertLeft=!0)),ke.collapsed){if(fo(ie,ae.line,ae,ge,ke)||ae.line!=ge.line&&fo(ie,ge.line,ae,ge,ke))throw new Error("Inserting collapsed marker partially overlapping an existing one");Bn()}ke.addToHistory&&ha(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var at=ae.line,it=ie.cm,bt;if(ie.iter(at,ge.line+1,function(jt){it&&ke.collapsed&&!it.options.lineWrapping&&Rr(jt)==it.display.maxLine&&(bt=!0),ke.collapsed&&at!=ae.line&&On(jt,0),Po(jt,new _r(ke,at==ae.line?ae.ch:null,at==ge.line?ge.ch:null)),++at}),ke.collapsed&&ie.iter(ae.line,ge.line+1,function(jt){qn(ie,jt)&&On(jt,0)}),ke.clearOnEnter&&ft(ke,"beforeCursorEnter",function(){return ke.clear()}),ke.readOnly&&(Jr(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),ke.collapsed&&(ke.id=++pf,ke.atomic=!0),it){if(bt&&(it.curOp.updateMaxLine=!0),ke.collapsed)Ar(it,ae.line,ge.line+1);else if(ke.className||ke.startStyle||ke.endStyle||ke.css||ke.attributes||ke.title)for(var pn=ae.line;pn<=ge.line;pn++)ir(it,pn,"text");ke.atomic&&au(it.doc),Ti(it,"markerAdded",it,ke)}return ke}var ph=function(ie,ae){this.markers=ie,this.primary=ae;for(var ge=0;ge<ie.length;++ge)ie[ge].parent=this};ph.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();Ti(this,"clear")}},ph.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Dn(ph);function mf(ie,ae,ge,fe,ye){fe=Ut(fe),fe.shared=!1;var ke=[$h(ie,ae,ge,fe,ye)],We=ke[0],at=fe.widgetNode;return Ms(ie,function(it){at&&(fe.widgetNode=at.cloneNode(!0)),ke.push($h(it,hi(it,ae),hi(it,ge),fe,ye));for(var bt=0;bt<it.linked.length;++bt)if(it.linked[bt].isParent)return;We=pt(ke)}),new ph(ke,We)}function Bc(ie){return ie.findMarks(hn(ie.first,0),ie.clipPos(hn(ie.lastLine())),function(ae){return ae.parent})}function cc(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],ye=fe.find(),ke=ie.clipPos(ye.from),We=ie.clipPos(ye.to);if(Jt(ke,We)){var at=$h(ie,ke,We,fe.primary,fe.primary.type);fe.markers.push(at),at.parent=fe}}}function Id(ie){for(var ae=function(fe){var ye=ie[fe],ke=[ye.primary.doc];Ms(ye.primary.doc,function(it){return ke.push(it)});for(var We=0;We<ye.markers.length;We++){var at=ye.markers[We];Nt(ke,at.doc)==-1&&(at.parent=null,ye.markers.splice(We--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var $g=0,Js=function(ie,ae,ge,fe,ye){if(!(this instanceof Js))return new Js(ie,ae,ge,fe,ye);ge==null&&(ge=0),fa.call(this,[new Ya([new yo("",null)])]),this.first=ge,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ge;var ke=hn(ge,0);this.sel=Vo(ke),this.history=new qr(null),this.id=++$g,this.modeOption=ae,this.lineSep=fe,this.direction=ye=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Va(this,{from:ke,to:ke,text:ie}),Za(this,Vo(ke),Ft)};Js.prototype=tn(fa.prototype,{constructor:Js,iter:function(ie,ae,ge){ge?this.iterN(ie-this.first,ae-ie,ge):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var ge=0,fe=0;fe<ae.length;++fe)ge+=ae[fe].height;this.insertInner(ie-this.first,ae,ge)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=xn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:kn(function(ie){var ae=hn(this.first,0),ge=this.first+this.size-1;fs(this,{from:ae,to:hn(ge,Kt(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&zu(this.cm,0,0),Za(this,Vo(ae),Ft)}),replaceRange:function(ie,ae,ge,fe){ae=hi(this,ae),ge=ge?hi(this,ge):ae,gh(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=ln(this,hi(this,ie),hi(this,ae));return ge===!1?fe:fe.join(ge||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(Rn(this,ie))return Kt(this,ie)},getLineNumber:function(ie){return St(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=Kt(this,ie)),Rr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return hi(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),ge;return ie==null||ie=="head"?ge=ae.head:ie=="anchor"?ge=ae.anchor:ie=="end"||ie=="to"||ie===!1?ge=ae.to():ge=ae.from(),ge},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:kn(function(ie,ae,ge){ms(this,hi(this,typeof ie=="number"?hn(ie,ae||0):ie),null,ge)}),setSelection:kn(function(ie,ae,ge){ms(this,hi(this,ie),hi(this,ae||ie),ge)}),extendSelection:kn(function(ie,ae,ge){Ea(this,hi(this,ie),ae&&hi(this,ae),ge)}),extendSelections:kn(function(ie,ae){Ta(this,Xi(this,ie),ae)}),extendSelectionsBy:kn(function(ie,ae){var ge=Ln(this.sel.ranges,ie);Ta(this,Xi(this,ge),ae)}),setSelections:kn(function(ie,ae,ge){if(ie.length){for(var fe=[],ye=0;ye<ie.length;ye++)fe[ye]=new gr(hi(this,ie[ye].anchor),hi(this,ie[ye].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),Za(this,Ho(this.cm,fe,ae),ge)}}),addSelection:kn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new gr(hi(this,ie),hi(this,ae||ie))),Za(this,Ho(this.cm,fe,fe.length-1),ge)}),getSelection:function(ie){for(var ae=this.sel.ranges,ge,fe=0;fe<ae.length;fe++){var ye=ln(this,ae[fe].from(),ae[fe].to());ge=ge?ge.concat(ye):ye}return ie===!1?ge:ge.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],ge=this.sel.ranges,fe=0;fe<ge.length;fe++){var ye=ln(this,ge[fe].from(),ge[fe].to());ie!==!1&&(ye=ye.join(ie||this.lineSeparator())),ae[fe]=ye}return ae},replaceSelection:function(ie,ae,ge){for(var fe=[],ye=0;ye<this.sel.ranges.length;ye++)fe[ye]=ie;this.replaceSelections(fe,ae,ge||"+input")},replaceSelections:kn(function(ie,ae,ge){for(var fe=[],ye=this.sel,ke=0;ke<ye.ranges.length;ke++){var We=ye.ranges[ke];fe[ke]={from:We.from(),to:We.to(),text:this.splitLines(ie[ke]),origin:ge}}for(var at=ae&&ae!="end"&&$o(this,fe,ae),it=fe.length-1;it>=0;it--)fs(this,fe[it]);at?ra(this,at):this.cm&&ru(this.cm)}),undo:kn(function(){lu(this,"undo")}),redo:kn(function(){lu(this,"redo")}),undoSelection:kn(function(){lu(this,"undo",!0)}),redoSelection:kn(function(){lu(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,ge=0,fe=0;fe<ie.done.length;fe++)ie.done[fe].ranges||++ae;for(var ye=0;ye<ie.undone.length;ye++)ie.undone[ye].ranges||++ge;return{undo:ae,redo:ge}},clearHistory:function(){var ie=this;this.history=new qr(this.history.maxGeneration),Ms(this,function(ae){return ae.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:Rs(this.history.done),undone:Rs(this.history.undone)}},setHistory:function(ie){var ae=this.history=new qr(this.history.maxGeneration);ae.done=Rs(ie.done.slice(0),null,!0),ae.undone=Rs(ie.undone.slice(0),null,!0)},setGutterMarker:kn(function(ie,ae,ge){return ks(this,ie,"gutter",function(fe){var ye=fe.gutterMarkers||(fe.gutterMarkers={});return ye[ae]=ge,!ge&&Ge(ye)&&(fe.gutterMarkers=null),!0})}),clearGutter:kn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&ks(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,Ge(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!Rn(this,ie)||(ae=ie,ie=Kt(this,ie),!ie))return null}else if(ae=St(ie),ae==null)return null;return{line:ae,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:kn(function(ie,ae,ge){return ks(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!fe[ye])fe[ye]=ge;else{if(Fe(ge).test(fe[ye]))return!1;fe[ye]+=" "+ge}return!0})}),removeLineClass:kn(function(ie,ae,ge){return ks(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",ke=fe[ye];if(ke)if(ge==null)fe[ye]=null;else{var We=ke.match(Fe(ge));if(!We)return!1;var at=We.index+We[0].length;fe[ye]=ke.slice(0,We.index)+(!We.index||at==ke.length?"":" ")+ke.slice(at)||null}else return!1;return!0})}),addLineWidget:kn(function(ie,ae,ge){return Zu(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return $h(this,hi(this,ie),hi(this,ae),ge,ge&&ge.type||"range")},setBookmark:function(ie,ae){var ge={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=hi(this,ie),$h(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=hi(this,ie);var ae=[],ge=Kt(this,ie.line).markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe){var ye=ge[fe];(ye.from==null||ye.from<=ie.ch)&&(ye.to==null||ye.to>=ie.ch)&&ae.push(ye.marker.parent||ye.marker)}return ae},findMarks:function(ie,ae,ge){ie=hi(this,ie),ae=hi(this,ae);var fe=[],ye=ie.line;return this.iter(ie.line,ae.line+1,function(ke){var We=ke.markedSpans;if(We)for(var at=0;at<We.length;at++){var it=We[at];!(it.to!=null&&ye==ie.line&&ie.ch>=it.to||it.from==null&&ye!=ie.line||it.from!=null&&ye==ae.line&&it.from>=ae.ch)&&(!ge||ge(it.marker))&&fe.push(it.marker.parent||it.marker)}++ye}),fe},getAllMarks:function(){var ie=[];return this.iter(function(ae){var ge=ae.markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe)ge[fe].from!=null&&ie.push(ge[fe].marker)}),ie},posFromIndex:function(ie){var ae,ge=this.first,fe=this.lineSeparator().length;return this.iter(function(ye){var ke=ye.text.length+fe;if(ke>ie)return ae=ie,!0;ie-=ke,++ge}),hi(this,hn(ge,ae))},indexFromPos:function(ie){ie=hi(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var ge=this.lineSeparator().length;return this.iter(this.first,ie.line,function(fe){ae+=fe.text.length+ge}),ae},copy:function(ie){var ae=new Js(xn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ae.scrollTop=this.scrollTop,ae.scrollLeft=this.scrollLeft,ae.sel=this.sel,ae.extend=!1,ie&&(ae.history.undoDepth=this.history.undoDepth,ae.setHistory(this.getHistory())),ae},linkedDoc:function(ie){ie||(ie={});var ae=this.first,ge=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<ge&&(ge=ie.to);var fe=new Js(xn(this,ae,ge),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(fe.history=this.history),(this.linked||(this.linked=[])).push({doc:fe,sharedHist:ie.sharedHist}),fe.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],cc(fe,Bc(this)),fe},unlinkDoc:function(ie){if(ie instanceof Na&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var ge=this.linked[ae];if(ge.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Id(Bc(this));break}}if(ie.history==this.history){var fe=[ie.id];Ms(ie,function(ye){return fe.push(ye.id)},!0),ie.history=new qr(null),ie.history.done=Rs(this.history.done,fe),ie.history.undone=Rs(this.history.undone,fe)}},iterLinkedDocs:function(ie){Ms(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):mr(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:kn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&Mo(this.cm))})}),Js.prototype.eachLine=Js.prototype.iter;var ad=0;function Rd(ie){var ae=this;if(Uf(ae),!(En(ae,ie)||vs(ae.display,ie))){ii(ie),Ze&&(ad=+new Date);var ge=Wi(ae,ie,!0),fe=ie.dataTransfer.files;if(!(!ge||ae.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var ye=fe.length,ke=Array(ye),We=0,at=function(){++We==ye&&Fn(ae,function(){ge=hi(ae.doc,ge);var jn={from:ge,to:ge,text:ae.doc.splitLines(ke.filter(function(Ei){return Ei!=null}).join(ae.doc.lineSeparator())),origin:"paste"};fs(ae.doc,jn),ra(ae.doc,Vo(hi(ae.doc,ge),hi(ae.doc,wa(jn))))})()},it=function(jn,Ei){if(ae.options.allowDropFileTypes&&Nt(ae.options.allowDropFileTypes,jn.type)==-1){at();return}var Ai=new FileReader;Ai.onerror=function(){return at()},Ai.onload=function(){var Zi=Ai.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Zi)){at();return}ke[Ei]=Zi,at()},Ai.readAsText(jn)},bt=0;bt<fe.length;bt++)it(fe[bt],bt);else{if(ae.state.draggingText&&ae.doc.sel.contains(ge)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var pn=ie.dataTransfer.getData("Text");if(pn){var jt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(jt=ae.listSelections()),zs(ae.doc,Vo(ge,ge)),jt)for(var Zn=0;Zn<jt.length;++Zn)gh(ae.doc,"",jt[Zn].anchor,jt[Zn].head,"drag");ae.replaceSelection(pn,"around","paste"),ae.display.input.focus()}}catch(jn){}}}}function sd(ie,ae){if(Ze&&(!ie.state.draggingText||+new Date-ad<100)){Ii(ae);return}if(!(En(ie,ae)||vs(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!st)){var ge=Ke("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",He&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),He&&ge.parentNode.removeChild(ge)}}function vf(ie,ae){var ge=Wi(ie,ae);if(ge){var fe=document.createDocumentFragment();Oi(ie,ge,fe),ie.display.dragCursor||(ie.display.dragCursor=Ke("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),Je(ie.display.dragCursor,fe)}}function Uf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function yf(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),ge=[],fe=0;fe<ae.length;fe++){var ye=ae[fe].CodeMirror;ye&&ge.push(ye)}ge.length&&ge[0].operation(function(){for(var ke=0;ke<ge.length;ke++)ie(ge[ke])})}}var jd=!1;function uu(){jd||(kc(),jd=!0)}function kc(){var ie;ft(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,yf(Sf)},100))}),ft(window,"blur",function(){return yf(Ns)})}function Sf(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var nh={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"},Kh=0;Kh<10;Kh++)nh[Kh+48]=nh[Kh+96]=String(Kh);for(var Ac=65;Ac<=90;Ac++)nh[Ac]=String.fromCharCode(Ac);for(var dc=1;dc<=12;dc++)nh[dc+111]=nh[dc+63235]="F"+dc;var _l={};_l.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"},_l.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"},_l.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"},_l.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"]},_l.default=he?_l.macDefault:_l.pcDefault;function zd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,ye,ke,We=0;We<ae.length-1;We++){var at=ae[We];if(/^(cmd|meta|m)$/i.test(at))ke=!0;else if(/^a(lt)?$/i.test(at))ge=!0;else if(/^(c|ctrl|control)$/i.test(at))fe=!0;else if(/^s(hift)?$/i.test(at))ye=!0;else throw new Error("Unrecognized modifier name: "+at)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),ke&&(ie="Cmd-"+ie),ye&&(ie="Shift-"+ie),ie}function _d(ie){var ae={};for(var ge in ie)if(ie.hasOwnProperty(ge)){var fe=ie[ge];if(/^(name|fallthrough|(de|at)tach)$/.test(ge))continue;if(fe=="..."){delete ie[ge];continue}for(var ye=Ln(ge.split(" "),zd),ke=0;ke<ye.length;ke++){var We=void 0,at=void 0;ke==ye.length-1?(at=ye.join(" "),We=fe):(at=ye.slice(0,ke+1).join(" "),We="...");var it=ae[at];if(!it)ae[at]=We;else if(it!=We)throw new Error("Inconsistent bindings for "+at)}delete ie[ge]}for(var bt in ae)ie[bt]=ae[bt];return ie}function hu(ie,ae,ge,fe){ae=Vh(ae);var ye=ae.call?ae.call(ie,fe):ae[ie];if(ye===!1)return"nothing";if(ye==="...")return"multi";if(ye!=null&&ge(ye))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return hu(ie,ae.fallthrough,ge,fe);for(var ke=0;ke<ae.fallthrough.length;ke++){var We=hu(ie,ae.fallthrough[ke],ge,fe);if(We)return We}}}function Tc(ie){var ae=typeof ie=="string"?ie:nh[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function Zd(ie,ae,ge){var fe=ie;return ae.altKey&&fe!="Alt"&&(ie="Alt-"+ie),(we?ae.metaKey:ae.ctrlKey)&&fe!="Ctrl"&&(ie="Ctrl-"+ie),(we?ae.ctrlKey:ae.metaKey)&&fe!="Mod"&&(ie="Cmd-"+ie),!ge&&ae.shiftKey&&fe!="Shift"&&(ie="Shift-"+ie),ie}function Hd(ie,ae){if(He&&ie.keyCode==34&&ie.char)return!1;var ge=nh[ie.keyCode];return ge==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(ge=ie.code),Zd(ge,ie,ae))}function Vh(ie){return typeof ie=="string"?_l[ie]:ie}function Ll(ie,ae){for(var ge=ie.doc.sel.ranges,fe=[],ye=0;ye<ge.length;ye++){for(var ke=ae(ge[ye]);fe.length&&Jt(ke.from,pt(fe).to)<=0;){var We=fe.pop();if(Jt(We.from,ke.from)<0){ke.from=We.from;break}}fe.push(ke)}Wt(ie,function(){for(var at=fe.length-1;at>=0;at--)gh(ie.doc,"",fe[at].from,fe[at].to,"+delete");ru(ie)})}function Gd(ie,ae,ge){var fe=ot(ie.text,ae+ge,ge);return fe<0||fe>ie.text.length?null:fe}function As(ie,ae,ge){var fe=Gd(ie,ae.ch,ge);return fe==null?null:new hn(ae.line,fe,ge<0?"after":"before")}function ba(ie,ae,ge,fe,ye){if(ie){ae.doc.direction=="rtl"&&(ye=-ye);var ke=_e(ge,ae.doc.direction);if(ke){var We=ye<0?pt(ke):ke[0],at=ye<0==(We.level==1),it=at?"after":"before",bt;if(We.level>0||ae.doc.direction=="rtl"){var pn=Qu(ae,ge);bt=ye<0?ge.text.length-1:0;var jt=Rl(ae,pn,bt).top;bt=et(function(Zn){return Rl(ae,pn,Zn).top==jt},ye<0==(We.level==1)?We.from:We.to-1,bt),it=="before"&&(bt=Gd(ge,bt,1))}else bt=ye<0?We.to:We.from;return new hn(fe,bt,it)}}return new hn(fe,ye<0?ge.text.length:0,ye<0?"before":"after")}function ns(ie,ae,ge,fe){var ye=_e(ae,ie.doc.direction);if(!ye)return As(ae,ge,fe);ge.ch>=ae.text.length?(ge.ch=ae.text.length,ge.sticky="before"):ge.ch<=0&&(ge.ch=0,ge.sticky="after");var ke=Se(ye,ge.ch,ge.sticky),We=ye[ke];if(ie.doc.direction=="ltr"&&We.level%2==0&&(fe>0?We.to>ge.ch:We.from<ge.ch))return As(ae,ge,fe);var at=function(pr,Kr){return Gd(ae,pr instanceof hn?pr.ch:pr,Kr)},it,bt=function(pr){return ie.options.lineWrapping?(it=it||Qu(ie,ae),Sn(ie,ae,it,pr)):{begin:0,end:ae.text.length}},pn=bt(ge.sticky=="before"?at(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||We.level==1){var jt=We.level==1==fe<0,Zn=at(ge,jt?1:-1);if(Zn!=null&&(jt?Zn<=We.to&&Zn<=pn.end:Zn>=We.from&&Zn>=pn.begin)){var jn=jt?"before":"after";return new hn(ge.line,Zn,jn)}}var Ei=function(pr,Kr,Nr){for(var io=function(Ss,ol){return ol?new hn(ge.line,at(Ss,1),"before"):new hn(ge.line,Ss,"after")};pr>=0&&pr<ye.length;pr+=Kr){var Go=ye[pr],Lr=Kr>0==(Go.level!=1),oa=Lr?Nr.begin:at(Nr.end,-1);if(Go.from<=oa&&oa<Go.to||(oa=Lr?Go.from:at(Go.to,-1),Nr.begin<=oa&&oa<Nr.end))return io(oa,Lr)}},Ai=Ei(ke+fe,fe,pn);if(Ai)return Ai;var Zi=fe>0?pn.end:at(pn.begin,-1);return Zi!=null&&!(fe>0&&Zi==ae.text.length)&&(Ai=Ei(fe>0?0:ye.length-1,fe,bt(Zi)),Ai)?Ai:null}var il={selectAll:La,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),Ft)},killLine:function(ie){return Ll(ie,function(ae){if(ae.empty()){var ge=Kt(ie.doc,ae.head.line).text.length;return ae.head.ch==ge&&ae.head.line<ie.lastLine()?{from:ae.head,to:hn(ae.head.line+1,0)}:{from:ae.head,to:hn(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return Ll(ie,function(ae){return{from:hn(ae.from().line,0),to:hi(ie.doc,hn(ae.to().line+1,0))}})},delLineLeft:function(ie){return Ll(ie,function(ae){return{from:hn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return Ll(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return{from:fe,to:ae.from()}})},delWrappedLineRight:function(ie){return Ll(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div");return{from:ae.from(),to:fe}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(hn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(hn(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return bu(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return Wd(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return Mu(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div")},en)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:ge},"div")},en)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return fe.ch<ie.getLine(fe.line).search(/\S/)?Wd(ie,ae.head):fe},en)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],ge=ie.listSelections(),fe=ie.options.tabSize,ye=0;ye<ge.length;ye++){var ke=ge[ye].from(),We=lt(ie.getLine(ke.line),ke.ch,fe);ae.push(Mn(fe-We%fe))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return Wt(ie,function(){for(var ae=ie.listSelections(),ge=[],fe=0;fe<ae.length;fe++)if(ae[fe].empty()){var ye=ae[fe].head,ke=Kt(ie.doc,ye.line).text;if(ke){if(ye.ch==ke.length&&(ye=new hn(ye.line,ye.ch-1)),ye.ch>0)ye=new hn(ye.line,ye.ch+1),ie.replaceRange(ke.charAt(ye.ch-1)+ke.charAt(ye.ch-2),hn(ye.line,ye.ch-2),ye,"+transpose");else if(ye.line>ie.doc.first){var We=Kt(ie.doc,ye.line-1).text;We&&(ye=new hn(ye.line,1),ie.replaceRange(ke.charAt(0)+ie.doc.lineSeparator()+We.charAt(We.length-1),hn(ye.line-1,We.length-1),ye,"+transpose"))}}ge.push(new gr(ye,ye))}ie.setSelections(ge)})},newlineAndIndent:function(ie){return Wt(ie,function(){for(var ae=ie.listSelections(),ge=ae.length-1;ge>=0;ge--)ie.replaceRange(ie.doc.lineSeparator(),ae[ge].anchor,ae[ge].head,"+input");ae=ie.listSelections();for(var fe=0;fe<ae.length;fe++)ie.indentLine(ae[fe].from().line,null,!0);ru(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function bu(ie,ae){var ge=Kt(ie.doc,ae),fe=Rr(ge);return fe!=ge&&(ae=St(fe)),ba(!0,ie,fe,ae,1)}function Mu(ie,ae){var ge=Kt(ie.doc,ae),fe=To(ge);return fe!=ge&&(ae=St(fe)),ba(!0,ie,ge,ae,-1)}function Wd(ie,ae){var ge=bu(ie,ae.line),fe=Kt(ie.doc,ge.line),ye=_e(fe,ie.doc.direction);if(!ye||ye[0].level==0){var ke=Math.max(ge.ch,fe.text.search(/\S/)),We=ae.line==ge.line&&ae.ch<=ke&&ae.ch;return hn(ge.line,We?0:ke,ge.sticky)}return ge}function Uh(ie,ae,ge){if(typeof ae=="string"&&(ae=il[ae],!ae))return!1;ie.display.input.ensurePolled();var fe=ie.display.shift,ye=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ge&&(ie.display.shift=!1),ye=ae(ie)!=sn}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return ye}function ld(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var ye=hu(ae,ie.state.keyMaps[fe],ge,ie);if(ye)return ye}return ie.options.extraKeys&&hu(ae,ie.options.extraKeys,ge,ie)||hu(ae,ie.options.keyMap,ge,ie)}var Hu=new $e;function Ah(ie,ae,ge,fe){var ye=ie.state.keySeq;if(ye){if(Tc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Hu.set(50,function(){ie.state.keySeq==ye&&(ie.state.keySeq=null,ie.display.input.reset())}),Yf(ie,ye+" "+ae,ge,fe))return!0}return Yf(ie,ae,ge,fe)}function Yf(ie,ae,ge,fe){var ye=ld(ie,ae,fe);return ye=="multi"&&(ie.state.keySeq=ae),ye=="handled"&&Ti(ie,"keyHandled",ie,ae,ge),(ye=="handled"||ye=="multi")&&(ii(ge),ko(ie)),!!ye}function Xf(ie,ae){var ge=Hd(ae,!0);return ge?ae.shiftKey&&!ie.state.keySeq?Ah(ie,"Shift-"+ge,ae,function(fe){return Uh(ie,fe,!0)})||Ah(ie,ge,ae,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return Uh(ie,fe)}):Ah(ie,ge,ae,function(fe){return Uh(ie,fe)}):!1}function Jf(ie,ae,ge){return Ah(ie,"'"+ge+"'",ae,function(fe){return Uh(ie,fe,!0)})}var ud=null;function Kg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=qe(),!En(ae,ie))){Ze&&ht<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Xf(ae,ie);He&&(ud=fe?ge:null,!fe&&ge==88&&!ci&&(he?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),ce&&!he&&!fe&&ge==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),ge==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&Vg(ae)}}function Vg(ie){var ae=ie.display.lineDiv;Et(ae,"CodeMirror-crosshair");function ge(fe){(fe.keyCode==18||!fe.altKey)&&(Ie(ae,"CodeMirror-crosshair"),an(document,"keyup",ge),an(document,"mouseover",ge))}ft(document,"keyup",ge),ft(document,"mouseover",ge)}function Ug(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),En(this,ie)}function Th(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(vs(ae.display,ie)||En(ae,ie)||ie.ctrlKey&&!ie.altKey||he&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if(He&&ge==ud){ud=null,ii(ie);return}if(!(He&&(!ie.which||ie.which<10)&&Xf(ae,ie))){var ye=String.fromCharCode(fe==null?ge:fe);ye!="\b"&&(Jf(ae,ie,ye)||ae.display.input.onKeyPress(ie))}}}var rm=400,Yg=function(ie,ae,ge){this.time=ie,this.pos=ae,this.button=ge};Yg.prototype.compare=function(ie,ae,ge){return this.time+rm>ie&&Jt(ae,this.pos)==0&&ge==this.button};var $d,hd;function Xg(ie,ae){var ge=+new Date;return hd&&hd.compare(ge,ie,ae)?($d=hd=null,"triple"):$d&&$d.compare(ge,ie,ae)?(hd=new Yg(ge,ie,ae),$d=null,"double"):($d=new Yg(ge,ie,ae),hd=null,"single")}function Dh(ie){var ae=this,ge=ae.display;if(!(En(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,vs(ge,ie)){Me||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!eg(ae,ie)){var fe=Wi(ae,ie),ye=Jn(ie),ke=fe?Xg(fe,ye):"single";window.focus(),ye==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&Jg(ae,ye,fe,ke,ie))&&(ye==1?fe?om(ae,fe,ke,ie):Yi(ie)==ge.scroller&&ii(ie):ye==2?(fe&&Ea(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):ye==3&&(Ne?ae.display.input.onContextMenu(ie):Er(ae)))}}}function Jg(ie,ae,ge,fe,ye){var ke="Click";return fe=="double"?ke="Double"+ke:fe=="triple"&&(ke="Triple"+ke),ke=(ae==1?"Left":ae==2?"Middle":"Right")+ke,Ah(ie,Zd(ke,ye),ye,function(We){if(typeof We=="string"&&(We=il[We]),!We)return!1;var at=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),at=We(ie,ge)!=sn}finally{ie.state.suppressEdits=!1}return at})}function Qf(ie,ae,ge){var fe=ie.getOption("configureMouse"),ye=fe?fe(ie,ae,ge):{};if(ye.unit==null){var ke=se?ge.shiftKey&&ge.metaKey:ge.altKey;ye.unit=ke?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(ye.extend==null||ie.doc.extend)&&(ye.extend=ie.doc.extend||ge.shiftKey),ye.addNew==null&&(ye.addNew=he?ge.metaKey:ge.ctrlKey),ye.moveOnDrag==null&&(ye.moveOnDrag=!(he?ge.altKey:ge.ctrlKey)),ye}function om(ie,ae,ge,fe){Ze?setTimeout(Gt(Yo,ie),0):ie.curOp.focus=qe();var ye=Qf(ie,ge,fe),ke=ie.doc.sel,We;ie.options.dragDrop&&Wn&&!ie.isReadOnly()&&ge=="single"&&(We=ke.contains(ae))>-1&&(Jt((We=ke.ranges[We]).from(),ae)<0||ae.xRel>0)&&(Jt(We.to(),ae)>0||ae.xRel<0)?Qg(ie,fe,ae,ye):tv(ie,fe,ae,ye)}function Qg(ie,ae,ge,fe){var ye=ie.display,ke=!1,We=Fn(ie,function(bt){Me&&(ye.scroller.draggable=!1),ie.state.draggingText=!1,an(ye.wrapper.ownerDocument,"mouseup",We),an(ye.wrapper.ownerDocument,"mousemove",at),an(ye.scroller,"dragstart",it),an(ye.scroller,"drop",We),ke||(ii(bt),fe.addNew||Ea(ie.doc,ge,null,null,fe.extend),Me&&!st||Ze&&ht==9?setTimeout(function(){ye.wrapper.ownerDocument.body.focus({preventScroll:!0}),ye.input.focus()},20):ye.input.focus())}),at=function(bt){ke=ke||Math.abs(ae.clientX-bt.clientX)+Math.abs(ae.clientY-bt.clientY)>=10},it=function(){return ke=!0};Me&&(ye.scroller.draggable=!0),ie.state.draggingText=We,We.copy=!fe.moveOnDrag,ye.scroller.dragDrop&&ye.scroller.dragDrop(),ft(ye.wrapper.ownerDocument,"mouseup",We),ft(ye.wrapper.ownerDocument,"mousemove",at),ft(ye.scroller,"dragstart",it),ft(ye.scroller,"drop",We),Er(ie),setTimeout(function(){return ye.input.focus()},20)}function qg(ie,ae,ge){if(ge=="char")return new gr(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new gr(hn(ae.line,0),hi(ie.doc,hn(ae.line+1,0)));var fe=ge(ie,ae);return new gr(fe.from,fe.to)}function tv(ie,ae,ge,fe){var ye=ie.display,ke=ie.doc;ii(ae);var We,at,it=ke.sel,bt=it.ranges;if(fe.addNew&&!fe.extend?(at=ke.sel.contains(ge),at>-1?We=bt[at]:We=new gr(ge,ge)):(We=ke.sel.primary(),at=ke.sel.primIndex),fe.unit=="rectangle")fe.addNew||(We=new gr(ge,ge)),ge=Wi(ie,ae,!0,!0),at=-1;else{var pn=qg(ie,ge,fe.unit);fe.extend?We=fh(We,pn.anchor,pn.head,fe.extend):We=pn}fe.addNew?at==-1?(at=bt.length,Za(ke,Ho(ie,bt.concat([We]),at),{scroll:!1,origin:"*mouse"})):bt.length>1&&bt[at].empty()&&fe.unit=="char"&&!fe.extend?(Za(ke,Ho(ie,bt.slice(0,at).concat(bt.slice(at+1)),0),{scroll:!1,origin:"*mouse"}),it=ke.sel):ja(ke,at,We,$t):(at=0,Za(ke,new Eo([We],0),$t),it=ke.sel);var jt=ge;function Zn(Nr){if(Jt(jt,Nr)!=0)if(jt=Nr,fe.unit=="rectangle"){for(var io=[],Go=ie.options.tabSize,Lr=lt(Kt(ke,ge.line).text,ge.ch,Go),oa=lt(Kt(ke,Nr.line).text,Nr.ch,Go),Ss=Math.min(Lr,oa),ol=Math.max(Lr,oa),Ls=Math.min(ge.line,Nr.line),du=Math.min(ie.lastLine(),Math.max(ge.line,Nr.line));Ls<=du;Ls++){var Zl=Kt(ke,Ls).text,qs=Nn(Zl,Ss,Go);Ss==ol?io.push(new gr(hn(Ls,qs),hn(Ls,qs))):Zl.length>qs&&io.push(new gr(hn(Ls,qs),hn(Ls,Nn(Zl,ol,Go))))}io.length||io.push(new gr(ge,ge)),Za(ke,Ho(ie,it.ranges.slice(0,at).concat(io),at),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Nr)}else{var Lu=We,Fl=qg(ie,Nr,fe.unit),el=Lu.anchor,Da;Jt(Fl.anchor,el)>0?(Da=Fl.head,el=Qn(Lu.from(),Fl.anchor)):(Da=Fl.anchor,el=ui(Lu.to(),Fl.head));var Ts=it.ranges.slice(0);Ts[at]=am(ie,new gr(hi(ke,el),Da)),Za(ke,Ho(ie,Ts,at),$t)}}var jn=ye.wrapper.getBoundingClientRect(),Ei=0;function Ai(Nr){var io=++Ei,Go=Wi(ie,Nr,!0,fe.unit=="rectangle");if(Go)if(Jt(Go,jt)!=0){ie.curOp.focus=qe(),Zn(Go);var Lr=Vr(ye,ke);(Go.line>=Lr.to||Go.line<Lr.from)&&setTimeout(Fn(ie,function(){Ei==io&&Ai(Nr)}),150)}else{var oa=Nr.clientY<jn.top?-20:Nr.clientY>jn.bottom?20:0;oa&&setTimeout(Fn(ie,function(){Ei==io&&(ye.scroller.scrollTop+=oa,Ai(Nr))}),50)}}function Zi(Nr){ie.state.selectingText=!1,Ei=1/0,Nr&&(ii(Nr),ye.input.focus()),an(ye.wrapper.ownerDocument,"mousemove",pr),an(ye.wrapper.ownerDocument,"mouseup",Kr),ke.history.lastSelOrigin=null}var pr=Fn(ie,function(Nr){Nr.buttons===0||!Jn(Nr)?Zi(Nr):Ai(Nr)}),Kr=Fn(ie,Zi);ie.state.selectingText=Kr,ft(ye.wrapper.ownerDocument,"mousemove",pr),ft(ye.wrapper.ownerDocument,"mouseup",Kr)}function am(ie,ae){var ge=ae.anchor,fe=ae.head,ye=Kt(ie.doc,ge.line);if(Jt(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var ke=_e(ye);if(!ke)return ae;var We=Se(ke,ge.ch,ge.sticky),at=ke[We];if(at.from!=ge.ch&&at.to!=ge.ch)return ae;var it=We+(at.from==ge.ch==(at.level!=1)?0:1);if(it==0||it==ke.length)return ae;var bt;if(fe.line!=ge.line)bt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var pn=Se(ke,fe.ch,fe.sticky),jt=pn-We||(fe.ch-ge.ch)*(at.level==1?-1:1);pn==it-1||pn==it?bt=jt<0:bt=jt>0}var Zn=ke[it+(bt?-1:0)],jn=bt==(Zn.level==1),Ei=jn?Zn.from:Zn.to,Ai=jn?"after":"before";return ge.ch==Ei&&ge.sticky==Ai?ae:new gr(new hn(ge.line,Ei,Ai),fe)}function qf(ie,ae,ge,fe){var ye,ke;if(ae.touches)ye=ae.touches[0].clientX,ke=ae.touches[0].clientY;else try{ye=ae.clientX,ke=ae.clientY}catch(Zn){return!1}if(ye>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&ii(ae);var We=ie.display,at=We.lineDiv.getBoundingClientRect();if(ke>at.bottom||!zn(ie,ge))return pi(ae);ke-=at.top-We.viewOffset;for(var it=0;it<ie.display.gutterSpecs.length;++it){var bt=We.gutters.childNodes[it];if(bt&&bt.getBoundingClientRect().right>=ye){var pn=gn(ie.doc,ke),jt=ie.display.gutterSpecs[it];return Qt(ie,ge,ie,pn,jt.className,ae),pi(ae)}}}function eg(ie,ae){return qf(ie,ae,"gutterClick",!0)}function tg(ie,ae){vs(ie.display,ae)||sm(ie,ae)||En(ie,ae,"contextmenu")||Ne||ie.display.input.onContextMenu(ae)}function sm(ie,ae){return zn(ie,"gutterContextMenu")?qf(ie,ae,"gutterContextMenu",!1):!1}function ng(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),es(ie)}var Dc={toString:function(){return"CodeMirror.Init"}},ep={},xf={};function lm(ie){var ae=ie.optionHandlers;function ge(fe,ye,ke,We){ie.defaults[fe]=ye,ke&&(ae[fe]=We?function(at,it,bt){bt!=Dc&&ke(at,it,bt)}:ke)}ie.defineOption=ge,ie.Init=Dc,ge("value","",function(fe,ye){return fe.setValue(ye)},!0),ge("mode",null,function(fe,ye){fe.doc.modeOption=ye,oo(fe)},!0),ge("indentUnit",2,oo,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){pa(fe),es(fe),Ar(fe)},!0),ge("lineSeparator",null,function(fe,ye){if(fe.doc.lineSep=ye,!!ye){var ke=[],We=fe.doc.first;fe.doc.iter(function(it){for(var bt=0;;){var pn=it.text.indexOf(ye,bt);if(pn==-1)break;bt=pn+ye.length,ke.push(hn(We,pn))}We++});for(var at=ke.length-1;at>=0;at--)gh(fe.doc,ye,ke[at],hn(ke[at].line,ke[at].ch+ye.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,ye,ke){fe.state.specialChars=new RegExp(ye.source+(ye.test(" ")?"":"| "),"g"),ke!=Dc&&fe.refresh()}),ge("specialCharPlaceholder",Oa,function(fe){return fe.refresh()},!0),ge("electricChars",!0),ge("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ge("spellcheck",!1,function(fe,ye){return fe.getInputField().spellcheck=ye},!0),ge("autocorrect",!1,function(fe,ye){return fe.getInputField().autocorrect=ye},!0),ge("autocapitalize",!1,function(fe,ye){return fe.getInputField().autocapitalize=ye},!0),ge("rtlMoveVisually",!de),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){ng(fe),xr(fe)},!0),ge("keyMap","default",function(fe,ye,ke){var We=Vh(ye),at=ke!=Dc&&Vh(ke);at&&at.detach&&at.detach(fe,We),We.attach&&We.attach(fe,at||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,um,!0),ge("gutters",[],function(fe,ye){fe.display.gutterSpecs=Ur(ye,fe.options.lineNumbers),xr(fe)},!0),ge("fixedGutter",!0,function(fe,ye){fe.display.gutters.style.left=ye?Wo(fe.display)+"px":"0",fe.refresh()},!0),ge("coverGutterNextToScrollbar",!1,function(fe){return dh(fe)},!0),ge("scrollbarStyle","native",function(fe){Nc(fe),dh(fe),fe.display.scrollbars.setScrollTop(fe.doc.scrollTop),fe.display.scrollbars.setScrollLeft(fe.doc.scrollLeft)},!0),ge("lineNumbers",!1,function(fe,ye){fe.display.gutterSpecs=Ur(fe.options.gutters,ye),xr(fe)},!0),ge("firstLineNumber",1,xr,!0),ge("lineNumberFormatter",function(fe){return fe},xr,!0),ge("showCursorWhenSelecting",!1,lr,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,ye){ye=="nocursor"&&(Ns(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(ye)}),ge("screenReaderLabel",null,function(fe,ye){ye=ye===""?null:ye,fe.display.input.screenReaderLabelChanged(ye)}),ge("disableInput",!1,function(fe,ye){ye||fe.display.input.reset()},!0),ge("dragDrop",!0,ig),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,lr,!0),ge("singleCursorHeightPerLine",!0,lr,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,pa,!0),ge("addModeClass",!1,pa,!0),ge("pollInterval",100),ge("undoDepth",200,function(fe,ye){return fe.doc.history.undoDepth=ye}),ge("historyEventDelay",1250),ge("viewportMargin",10,function(fe){return fe.refresh()},!0),ge("maxHighlightLength",1e4,pa,!0),ge("moveInputWithCursor",!0,function(fe,ye){ye||fe.display.input.resetPosition()}),ge("tabindex",null,function(fe,ye){return fe.display.input.getField().tabIndex=ye||""}),ge("autofocus",null),ge("direction","ltr",function(fe,ye){return fe.doc.setDirection(ye)},!0),ge("phrases",null)}function ig(ie,ae,ge){var fe=ge&&ge!=Dc;if(!ae!=!fe){var ye=ie.display.dragFunctions,ke=ae?ft:an;ke(ie.display.scroller,"dragstart",ye.start),ke(ie.display.scroller,"dragenter",ye.enter),ke(ie.display.scroller,"dragover",ye.over),ke(ie.display.scroller,"dragleave",ye.leave),ke(ie.display.scroller,"drop",ye.drop)}}function um(ie){ie.options.lineWrapping?(Et(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(Ie(ie.display.wrapper,"CodeMirror-wrap"),Bo(ie)),_i(ie),Ar(ie),es(ie),setTimeout(function(){return dh(ie)},100)}function Na(ie,ae){var ge=this;if(!(this instanceof Na))return new Na(ie,ae);this.options=ae=ae?Ut(ae):{},Ut(ep,ae,!1);var fe=ae.value;typeof fe=="string"?fe=new Js(fe,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(fe.modeOption=ae.mode),this.doc=fe;var ye=new Na.inputStyles[ae.inputStyle](this),ke=this.display=new Hr(ie,fe,ye,ae);ke.wrapper.CodeMirror=this,ng(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Nc(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 $e,keySeq:null,specialChars:null},ae.autofocus&&!ee&&ke.input.focus(),Ze&&ht<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Kd(this),uu(),Hn(this),this.curOp.forceUpdate=!0,bo(this,fe),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ge.hasFocus()&&!ge.state.focused&&Oo(ge)},20):Ns(this);for(var We in xf)xf.hasOwnProperty(We)&&xf[We](this,ae[We],Dc);fr(this),ae.finishInit&&ae.finishInit(this);for(var at=0;at<cd.length;++at)cd[at](this);yr(this),Me&&ae.lineWrapping&&getComputedStyle(ke.lineDiv).textRendering=="optimizelegibility"&&(ke.lineDiv.style.textRendering="auto")}Na.defaults=ep,Na.optionHandlers=xf;function Kd(ie){var ae=ie.display;ft(ae.scroller,"mousedown",Fn(ie,Dh)),Ze&&ht<11?ft(ae.scroller,"dblclick",Fn(ie,function(it){if(!En(ie,it)){var bt=Wi(ie,it);if(!(!bt||eg(ie,it)||vs(ie.display,it))){ii(it);var pn=ie.findWordAt(bt);Ea(ie.doc,pn.anchor,pn.head)}}})):ft(ae.scroller,"dblclick",function(it){return En(ie,it)||ii(it)}),ft(ae.scroller,"contextmenu",function(it){return tg(ie,it)}),ft(ae.input.getField(),"contextmenu",function(it){ae.scroller.contains(it.target)||tg(ie,it)});var ge,fe={end:0};function ye(){ae.activeTouch&&(ge=setTimeout(function(){return ae.activeTouch=null},1e3),fe=ae.activeTouch,fe.end=+new Date)}function ke(it){if(it.touches.length!=1)return!1;var bt=it.touches[0];return bt.radiusX<=1&&bt.radiusY<=1}function We(it,bt){if(bt.left==null)return!0;var pn=bt.left-it.left,jt=bt.top-it.top;return pn*pn+jt*jt>20*20}ft(ae.scroller,"touchstart",function(it){if(!En(ie,it)&&!ke(it)&&!eg(ie,it)){ae.input.ensurePolled(),clearTimeout(ge);var bt=+new Date;ae.activeTouch={start:bt,moved:!1,prev:bt-fe.end<=300?fe:null},it.touches.length==1&&(ae.activeTouch.left=it.touches[0].pageX,ae.activeTouch.top=it.touches[0].pageY)}}),ft(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),ft(ae.scroller,"touchend",function(it){var bt=ae.activeTouch;if(bt&&!vs(ae,it)&&bt.left!=null&&!bt.moved&&new Date-bt.start<300){var pn=ie.coordsChar(ae.activeTouch,"page"),jt;!bt.prev||We(bt,bt.prev)?jt=new gr(pn,pn):!bt.prev.prev||We(bt,bt.prev.prev)?jt=ie.findWordAt(pn):jt=new gr(hn(pn.line,0),hi(ie.doc,hn(pn.line+1,0))),ie.setSelection(jt.anchor,jt.head),ie.focus(),ii(it)}ye()}),ft(ae.scroller,"touchcancel",ye),ft(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(Bh(ie,ae.scroller.scrollTop),_u(ie,ae.scroller.scrollLeft,!0),Qt(ie,"scroll",ie))}),ft(ae.scroller,"mousewheel",function(it){return xo(ie,it)}),ft(ae.scroller,"DOMMouseScroll",function(it){return xo(ie,it)}),ft(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(it){En(ie,it)||Ii(it)},over:function(it){En(ie,it)||(vf(ie,it),Ii(it))},start:function(it){return sd(ie,it)},drop:Fn(ie,Rd),leave:function(it){En(ie,it)||Uf(ie)}};var at=ae.input.getField();ft(at,"keyup",function(it){return Ug.call(ie,it)}),ft(at,"keydown",Fn(ie,Kg)),ft(at,"keypress",Fn(ie,Th)),ft(at,"focus",function(it){return Oo(ie,it)}),ft(at,"blur",function(it){return Ns(ie,it)})}var cd=[];Na.defineInitHook=function(ie){return cd.push(ie)};function rl(ie,ae,ge,fe){var ye=ie.doc,ke;ge==null&&(ge="add"),ge=="smart"&&(ye.mode.indent?ke=Wr(ie,ae).state:ge="prev");var We=ie.options.tabSize,at=Kt(ye,ae),it=lt(at.text,null,We);at.stateAfter&&(at.stateAfter=null);var bt=at.text.match(/^\s*/)[0],pn;if(!fe&&!/\S/.test(at.text))pn=0,ge="not";else if(ge=="smart"&&(pn=ye.mode.indent(ke,at.text.slice(bt.length),at.text),pn==sn||pn>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>ye.first?pn=lt(Kt(ye,ae-1).text,null,We):pn=0:ge=="add"?pn=it+ie.options.indentUnit:ge=="subtract"?pn=it-ie.options.indentUnit:typeof ge=="number"&&(pn=it+ge),pn=Math.max(0,pn);var jt="",Zn=0;if(ie.options.indentWithTabs)for(var jn=Math.floor(pn/We);jn;--jn)Zn+=We,jt+=" ";if(Zn<pn&&(jt+=Mn(pn-Zn)),jt!=bt)return gh(ye,jt,hn(ae,0),hn(ae,bt.length),"+input"),at.stateAfter=null,!0;for(var Ei=0;Ei<ye.sel.ranges.length;Ei++){var Ai=ye.sel.ranges[Ei];if(Ai.head.line==ae&&Ai.head.ch<bt.length){var Zi=hn(ae,bt.length);ja(ye,Ei,new gr(Zi,Zi));break}}}var cu=null;function dd(ie){cu=ie}function Pf(ie,ae,ge,fe,ye){var ke=ie.doc;ie.display.shift=!1,fe||(fe=ke.sel);var We=+new Date-200,at=ye=="paste"||ie.state.pasteIncoming>We,it=mr(ae),bt=null;if(at&&fe.ranges.length>1)if(cu&&cu.text.join(`
|
|
|
`)==ae){if(fe.ranges.length%cu.text.length==0){bt=[];for(var pn=0;pn<cu.text.length;pn++)bt.push(ke.splitLines(cu.text[pn]))}}else it.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(bt=Ln(it,function(pr){return[pr]}));for(var jt=ie.curOp.updateInput,Zn=fe.ranges.length-1;Zn>=0;Zn--){var jn=fe.ranges[Zn],Ei=jn.from(),Ai=jn.to();jn.empty()&&(ge&&ge>0?Ei=hn(Ei.line,Ei.ch-ge):ie.state.overwrite&&!at?Ai=hn(Ai.line,Math.min(Kt(ke,Ai.line).text.length,Ai.ch+pt(it).length)):at&&cu&&cu.lineWise&&cu.text.join(`
|
|
|
`)==it.join(`
|
|
|
`)&&(Ei=Ai=hn(Ei.line,0)));var Zi={from:Ei,to:Ai,text:bt?bt[Zn%bt.length]:it,origin:ye||(at?"paste":ie.state.cutIncoming>We?"cut":"+input")};fs(ie.doc,Zi),Ti(ie,"inputRead",ie,Zi)}ae&&!at&&np(ie,ae),ru(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=jt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function tp(ie,ae){var ge=ie.clipboardData&&ie.clipboardData.getData("Text");if(ge)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&Wt(ae,function(){return Pf(ae,ge,0,null,"paste")}),!0}function np(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var ge=ie.doc.sel,fe=ge.ranges.length-1;fe>=0;fe--){var ye=ge.ranges[fe];if(!(ye.head.ch>100||fe&&ge.ranges[fe-1].head.line==ye.head.line)){var ke=ie.getModeAt(ye.head),We=!1;if(ke.electricChars){for(var at=0;at<ke.electricChars.length;at++)if(ae.indexOf(ke.electricChars.charAt(at))>-1){We=rl(ie,ye.head.line,"smart");break}}else ke.electricInput&&ke.electricInput.test(Kt(ie.doc,ye.head.line).text.slice(0,ye.head.ch))&&(We=rl(ie,ye.head.line,"smart"));We&&Ti(ie,"electricInput",ie,ye.head.line)}}}function ip(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var ye=ie.doc.sel.ranges[fe].head.line,ke={anchor:hn(ye,0),head:hn(ye+1,0)};ge.push(ke),ae.push(ie.getRange(ke.anchor,ke.head))}return{text:ae,ranges:ge}}function rp(ie,ae,ge,fe){ie.setAttribute("autocorrect",ge?"":"off"),ie.setAttribute("autocapitalize",fe?"":"off"),ie.setAttribute("spellcheck",!!ae)}function op(){var ie=Ke("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Ke("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?ie.style.width="1000px":ie.setAttribute("wrap","off"),Ae&&(ie.style.border="1px solid black"),rp(ie),ae}function Oc(ie){var ae=ie.optionHandlers,ge=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(fe,ye){var ke=this.options,We=ke[fe];ke[fe]==ye&&fe!="mode"||(ke[fe]=ye,ae.hasOwnProperty(fe)&&Fn(this,ae[fe])(this,ye,We),Qt(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,ye){this.state.keyMaps[ye?"push":"unshift"](Vh(fe))},removeKeyMap:function(fe){for(var ye=this.state.keyMaps,ke=0;ke<ye.length;++ke)if(ye[ke]==fe||ye[ke].name==fe)return ye.splice(ke,1),!0},addOverlay:wn(function(fe,ye){var ke=fe.token?fe:ie.getMode(this.options,fe);if(ke.startState)throw new Error("Overlays may not be stateful.");Un(this.state.overlays,{mode:ke,modeSpec:fe,opaque:ye&&ye.opaque,priority:ye&&ye.priority||0},function(We){return We.priority}),this.state.modeGen++,Ar(this)}),removeOverlay:wn(function(fe){for(var ye=this.state.overlays,ke=0;ke<ye.length;++ke){var We=ye[ke].modeSpec;if(We==fe||typeof fe=="string"&&We.name==fe){ye.splice(ke,1),this.state.modeGen++,Ar(this);return}}}),indentLine:wn(function(fe,ye,ke){typeof ye!="string"&&typeof ye!="number"&&(ye==null?ye=this.options.smartIndent?"smart":"prev":ye=ye?"add":"subtract"),Rn(this.doc,fe)&&rl(this,fe,ye,ke)}),indentSelection:wn(function(fe){for(var ye=this.doc.sel.ranges,ke=-1,We=0;We<ye.length;We++){var at=ye[We];if(at.empty())at.head.line>ke&&(rl(this,at.head.line,fe,!0),ke=at.head.line,We==this.doc.sel.primIndex&&ru(this));else{var it=at.from(),bt=at.to(),pn=Math.max(ke,it.line);ke=Math.min(this.lastLine(),bt.line-(bt.ch?0:1))+1;for(var jt=pn;jt<ke;++jt)rl(this,jt,fe);var Zn=this.doc.sel.ranges;it.ch==0&&ye.length==Zn.length&&Zn[We].from().ch>0&&ja(this.doc,We,new gr(it,Zn[We].to()),Ft)}}}),getTokenAt:function(fe,ye){return Ni(this,fe,ye)},getLineTokens:function(fe,ye){return Ni(this,hn(fe),ye,!0)},getTokenTypeAt:function(fe){fe=hi(this.doc,fe);var ye=br(this,Kt(this.doc,fe.line)),ke=0,We=(ye.length-1)/2,at=fe.ch,it;if(at==0)it=ye[2];else for(;;){var bt=ke+We>>1;if((bt?ye[bt*2-1]:0)>=at)We=bt;else if(ye[bt*2+1]<at)ke=bt+1;else{it=ye[bt*2+2];break}}var pn=it?it.indexOf("overlay "):-1;return pn<0?it:pn==0?null:it.slice(0,pn-1)},getModeAt:function(fe){var ye=this.doc.mode;return ye.innerMode?ie.innerMode(ye,this.getTokenAt(fe).state).mode:ye},getHelper:function(fe,ye){return this.getHelpers(fe,ye)[0]},getHelpers:function(fe,ye){var ke=[];if(!ge.hasOwnProperty(ye))return ke;var We=ge[ye],at=this.getModeAt(fe);if(typeof at[ye]=="string")We[at[ye]]&&ke.push(We[at[ye]]);else if(at[ye])for(var it=0;it<at[ye].length;it++){var bt=We[at[ye][it]];bt&&ke.push(bt)}else at.helperType&&We[at.helperType]?ke.push(We[at.helperType]):We[at.name]&&ke.push(We[at.name]);for(var pn=0;pn<We._global.length;pn++){var jt=We._global[pn];jt.pred(at,this)&&Nt(ke,jt.val)==-1&&ke.push(jt.val)}return ke},getStateAfter:function(fe,ye){var ke=this.doc;return fe=di(ke,fe==null?ke.first+ke.size-1:fe),Wr(this,fe+1,ye).state},cursorCoords:function(fe,ye){var ke,We=this.doc.sel.primary();return fe==null?ke=We.head:typeof fe=="object"?ke=hi(this.doc,fe):ke=fe?We.from():We.to(),va(this,ke,ye||"page")},charCoords:function(fe,ye){return $s(this,hi(this.doc,fe),ye||"page")},coordsChar:function(fe,ye){return fe=Ws(this,fe,ye||"page"),Vt(this,fe.left,fe.top)},lineAtHeight:function(fe,ye){return fe=Ws(this,{top:fe,left:0},ye||"page").top,gn(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,ye,ke){var We=!1,at;if(typeof fe=="number"){var it=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>it&&(fe=it,We=!0),at=Kt(this.doc,fe)}else at=fe;return Ka(this,at,{top:0,left:0},ye||"page",ke||We).top+(We?this.doc.height-wo(at):0)},defaultTextHeight:function(){return zr(this.display)},defaultCharWidth:function(){return jo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,ye,ke,We,at){var it=this.display;fe=va(this,hi(this.doc,fe));var bt=fe.bottom,pn=fe.left;if(ye.style.position="absolute",ye.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ye),it.sizer.appendChild(ye),We=="over")bt=fe.top;else if(We=="above"||We=="near"){var jt=Math.max(it.wrapper.clientHeight,this.doc.height),Zn=Math.max(it.sizer.clientWidth,it.lineSpace.clientWidth);(We=="above"||fe.bottom+ye.offsetHeight>jt)&&fe.top>ye.offsetHeight?bt=fe.top-ye.offsetHeight:fe.bottom+ye.offsetHeight<=jt&&(bt=fe.bottom),pn+ye.offsetWidth>Zn&&(pn=Zn-ye.offsetWidth)}ye.style.top=bt+"px",ye.style.left=ye.style.right="",at=="right"?(pn=it.sizer.clientWidth-ye.offsetWidth,ye.style.right="0px"):(at=="left"?pn=0:at=="middle"&&(pn=(it.sizer.clientWidth-ye.offsetWidth)/2),ye.style.left=pn+"px"),ke&&ju(this,{left:pn,top:bt,right:pn+ye.offsetWidth,bottom:bt+ye.offsetHeight})},triggerOnKeyDown:wn(Kg),triggerOnKeyPress:wn(Th),triggerOnKeyUp:Ug,triggerOnMouseDown:wn(Dh),execCommand:function(fe){if(il.hasOwnProperty(fe))return il[fe].call(null,this)},triggerElectric:wn(function(fe){np(this,fe)}),findPosH:function(fe,ye,ke,We){var at=1;ye<0&&(at=-1,ye=-ye);for(var it=hi(this.doc,fe),bt=0;bt<ye&&(it=wf(this.doc,it,at,ke,We),!it.hitSide);++bt);return it},moveH:wn(function(fe,ye){var ke=this;this.extendSelectionsBy(function(We){return ke.display.shift||ke.doc.extend||We.empty()?wf(ke.doc,We.head,fe,ye,ke.options.rtlMoveVisually):fe<0?We.from():We.to()},en)}),deleteH:wn(function(fe,ye){var ke=this.doc.sel,We=this.doc;ke.somethingSelected()?We.replaceSelection("",null,"+delete"):Ll(this,function(at){var it=wf(We,at.head,fe,ye,!1);return fe<0?{from:it,to:at.head}:{from:at.head,to:it}})}),findPosV:function(fe,ye,ke,We){var at=1,it=We;ye<0&&(at=-1,ye=-ye);for(var bt=hi(this.doc,fe),pn=0;pn<ye;++pn){var jt=va(this,bt,"div");if(it==null?it=jt.left:jt.left=it,bt=Ic(this,jt,at,ke),bt.hitSide)break}return bt},moveV:wn(function(fe,ye){var ke=this,We=this.doc,at=[],it=!this.display.shift&&!We.extend&&We.sel.somethingSelected();if(We.extendSelectionsBy(function(pn){if(it)return fe<0?pn.from():pn.to();var jt=va(ke,pn.head,"div");pn.goalColumn!=null&&(jt.left=pn.goalColumn),at.push(jt.left);var Zn=Ic(ke,jt,fe,ye);return ye=="page"&&pn==We.sel.primary()&&Nh(ke,$s(ke,Zn,"div").top-jt.top),Zn},en),at.length)for(var bt=0;bt<We.sel.ranges.length;bt++)We.sel.ranges[bt].goalColumn=at[bt]}),findWordAt:function(fe){var ye=this.doc,ke=Kt(ye,fe.line).text,We=fe.ch,at=fe.ch;if(ke){var it=this.getHelper(fe,"wordChars");(fe.sticky=="before"||at==ke.length)&&We?--We:++at;for(var bt=ke.charAt(We),pn=ut(bt,it)?function(jt){return ut(jt,it)}:/\s/.test(bt)?function(jt){return/\s/.test(jt)}:function(jt){return!/\s/.test(jt)&&!ut(jt)};We>0&&pn(ke.charAt(We-1));)--We;for(;at<ke.length&&pn(ke.charAt(at));)++at}return new gr(hn(fe.line,We),hn(fe.line,at))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Et(this.display.cursorDiv,"CodeMirror-overwrite"):Ie(this.display.cursorDiv,"CodeMirror-overwrite"),Qt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==qe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:wn(function(fe,ye){zu(this,fe,ye)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Ys(this)-this.display.barHeight,width:fe.scrollWidth-Ys(this)-this.display.barWidth,clientHeight:Mh(this),clientWidth:ul(this)}},scrollIntoView:wn(function(fe,ye){fe==null?(fe={from:this.doc.sel.primary().head,to:null},ye==null&&(ye=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:hn(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=ye||0,fe.from.line!=null?aa(this,fe):Wh(this,fe.from,fe.to,fe.margin)}),setSize:wn(function(fe,ye){var ke=this,We=function(it){return typeof it=="number"||/^\d+$/.test(String(it))?it+"px":it};fe!=null&&(this.display.wrapper.style.width=We(fe)),ye!=null&&(this.display.wrapper.style.height=We(ye)),this.options.lineWrapping&&ds(this);var at=this.display.viewFrom;this.doc.iter(at,this.display.viewTo,function(it){if(it.widgets){for(var bt=0;bt<it.widgets.length;bt++)if(it.widgets[bt].noHScroll){ir(ke,at,"widget");break}}++at}),this.curOp.forceUpdate=!0,Qt(this,"refresh",this)}),operation:function(fe){return Wt(this,fe)},startOperation:function(){return Hn(this)},endOperation:function(){return yr(this)},refresh:wn(function(){var fe=this.display.cachedTextHeight;Ar(this),this.curOp.forceUpdate=!0,es(this),zu(this,this.doc.scrollLeft,this.doc.scrollTop),Pr(this.display),(fe==null||Math.abs(fe-zr(this.display))>.5||this.options.lineWrapping)&&_i(this),Qt(this,"refresh",this)}),swapDoc:wn(function(fe){var ye=this.doc;return ye.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,fe),es(this),this.display.input.reset(),zu(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,Ti(this,"swapDoc",this,ye),ye}),phrase:function(fe){var ye=this.options.phrases;return ye&&Object.prototype.hasOwnProperty.call(ye,fe)?ye[fe]:fe},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}},Dn(ie),ie.registerHelper=function(fe,ye,ke){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][ye]=ke},ie.registerGlobalHelper=function(fe,ye,ke,We){ie.registerHelper(fe,ye,We),ge[fe]._global.push({pred:ke,val:We})}}function wf(ie,ae,ge,fe,ye){var ke=ae,We=ge,at=Kt(ie,ae.line),it=ye&&ie.direction=="rtl"?-ge:ge;function bt(){var Kr=ae.line+it;return Kr<ie.first||Kr>=ie.first+ie.size?!1:(ae=new hn(Kr,ae.ch,ae.sticky),at=Kt(ie,Kr))}function pn(Kr){var Nr;if(fe=="codepoint"){var io=at.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(io)?Nr=null:Nr=new hn(ae.line,Math.max(0,Math.min(at.text.length,ae.ch+ge*(io>=55296&&io<56320?2:1))),-ge)}else ye?Nr=ns(ie.cm,at,ae,ge):Nr=As(at,ae,ge);if(Nr==null)if(!Kr&&bt())ae=ba(ye,ie.cm,at,ae.line,it);else return!1;else ae=Nr;return!0}if(fe=="char"||fe=="codepoint")pn();else if(fe=="column")pn(!0);else if(fe=="word"||fe=="group")for(var jt=null,Zn=fe=="group",jn=ie.cm&&ie.cm.getHelper(ae,"wordChars"),Ei=!0;!(ge<0&&!pn(!Ei));Ei=!1){var Ai=at.text.charAt(ae.ch)||`
|
|
|
`,Zi=ut(Ai,jn)?"w":Zn&&Ai==`
|
|
|
`?"n":!Zn||/\s/.test(Ai)?null:"p";if(Zn&&!Ei&&!Zi&&(Zi="s"),jt&&jt!=Zi){ge<0&&(ge=1,pn(),ae.sticky="after");break}if(Zi&&(jt=Zi),ge>0&&!pn(!Ei))break}var pr=Cu(ie,ae,ke,We,!0);return Xn(ke,pr)&&(pr.hitSide=!0),pr}function Ic(ie,ae,ge,fe){var ye=ie.doc,ke=ae.left,We;if(fe=="page"){var at=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),it=Math.max(at-.5*zr(ie.display),3);We=(ge>0?ae.bottom:ae.top)+ge*it}else fe=="line"&&(We=ge>0?ae.bottom+3:ae.top-3);for(var bt;bt=Vt(ie,ke,We),!!bt.outside;){if(ge<0?We<=0:We>=ye.height){bt.hitSide=!0;break}We+=ge*5}return bt}var ss=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $e,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ss.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,ye=ge.div=ie.lineDiv;rp(ye,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function ke(at){for(var it=at.target;it;it=it.parentNode){if(it==ye)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(it.className))break}return!1}ft(ye,"paste",function(at){!ke(at)||En(fe,at)||tp(at,fe)||ht<=11&&setTimeout(Fn(fe,function(){return ae.updateFromDOM()}),20)}),ft(ye,"compositionstart",function(at){ae.composing={data:at.data,done:!1}}),ft(ye,"compositionupdate",function(at){ae.composing||(ae.composing={data:at.data,done:!1})}),ft(ye,"compositionend",function(at){ae.composing&&(at.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),ft(ye,"touchstart",function(){return ge.forceCompositionEnd()}),ft(ye,"input",function(){ae.composing||ae.readFromDOMSoon()});function We(at){if(!(!ke(at)||En(fe,at))){if(fe.somethingSelected())dd({lineWise:!1,text:fe.getSelections()}),at.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var it=ip(fe);dd({lineWise:!0,text:it.text}),at.type=="cut"&&fe.operation(function(){fe.setSelections(it.ranges,0,Ft),fe.replaceSelection("",null,"cut")})}else return;if(at.clipboardData){at.clipboardData.clearData();var bt=cu.text.join(`
|
|
|
`);if(at.clipboardData.setData("Text",bt),at.clipboardData.getData("Text")==bt){at.preventDefault();return}}var pn=op(),jt=pn.firstChild;fe.display.lineSpace.insertBefore(pn,fe.display.lineSpace.firstChild),jt.value=cu.text.join(`
|
|
|
`);var Zn=document.activeElement;Bt(jt),setTimeout(function(){fe.display.lineSpace.removeChild(pn),Zn.focus(),Zn==ye&&ge.showPrimarySelection()},50)}}ft(ye,"copy",We),ft(ye,"cut",We)},ss.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},ss.prototype.prepareSelection=function(){var ie=or(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},ss.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},ss.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ss.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,ge=ae.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(ae.display.viewTo==ae.display.viewFrom||fe.line>=ae.display.viewTo||ye.line<ae.display.viewFrom){ie.removeAllRanges();return}var ke=Cf(ae,ie.anchorNode,ie.anchorOffset),We=Cf(ae,ie.focusNode,ie.focusOffset);if(!(ke&&!ke.bad&&We&&!We.bad&&Jt(Qn(ke,We),fe)==0&&Jt(ui(ke,We),ye)==0)){var at=ae.display.view,it=fe.line>=ae.display.viewFrom&&rg(ae,fe)||{node:at[0].measure.map[2],offset:0},bt=ye.line<ae.display.viewTo&&rg(ae,ye);if(!bt){var pn=at[at.length-1].measure,jt=pn.maps?pn.maps[pn.maps.length-1]:pn.map;bt={node:jt[jt.length-1],offset:jt[jt.length-2]-jt[jt.length-3]}}if(!it||!bt){ie.removeAllRanges();return}var Zn=ie.rangeCount&&ie.getRangeAt(0),jn;try{jn=Re(it.node,it.offset,bt.offset,bt.node)}catch(Ei){}jn&&(!ce&&ae.state.focused?(ie.collapse(it.node,it.offset),jn.collapsed||(ie.removeAllRanges(),ie.addRange(jn))):(ie.removeAllRanges(),ie.addRange(jn)),Zn&&ie.anchorNode==null?ie.addRange(Zn):ce&&this.startGracePeriod()),this.rememberSelection()}},ss.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},ss.prototype.showMultipleSelections=function(ie){Je(this.cm.display.cursorDiv,ie.cursors),Je(this.cm.display.selectionDiv,ie.selection)},ss.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},ss.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return At(this.div,ae)},ss.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ss.prototype.blur=function(){this.div.blur()},ss.prototype.getField=function(){return this.div},ss.prototype.supportsTouch=function(){return!0},ss.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():Wt(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ae(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ae))}this.polling.set(this.cm.options.pollInterval,ae)},ss.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},ss.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&ct&&this.cm.display.gutterSpecs.length&&ap(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ge=Cf(ae,ie.anchorNode,ie.anchorOffset),fe=Cf(ae,ie.focusNode,ie.focusOffset);ge&&fe&&Wt(ae,function(){Za(ae.doc,Vo(ge,fe),Ft),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},ss.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,ge=ie.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(fe.ch==0&&fe.line>ie.firstLine()&&(fe=hn(fe.line-1,Kt(ie.doc,fe.line-1).length)),ye.ch==Kt(ie.doc,ye.line).text.length&&ye.line<ie.lastLine()&&(ye=hn(ye.line+1,0)),fe.line<ae.viewFrom||ye.line>ae.viewTo-1)return!1;var ke,We,at;fe.line==ae.viewFrom||(ke=Tr(ie,fe.line))==0?(We=St(ae.view[0].line),at=ae.view[0].node):(We=St(ae.view[ke].line),at=ae.view[ke-1].node.nextSibling);var it=Tr(ie,ye.line),bt,pn;if(it==ae.view.length-1?(bt=ae.viewTo-1,pn=ae.lineDiv.lastChild):(bt=St(ae.view[it+1].line)-1,pn=ae.view[it+1].node.previousSibling),!at)return!1;for(var jt=ie.doc.splitLines(Ud(ie,at,pn,We,bt)),Zn=ln(ie.doc,hn(We,0),hn(bt,Kt(ie.doc,bt).text.length));jt.length>1&&Zn.length>1;)if(pt(jt)==pt(Zn))jt.pop(),Zn.pop(),bt--;else if(jt[0]==Zn[0])jt.shift(),Zn.shift(),We++;else break;for(var jn=0,Ei=0,Ai=jt[0],Zi=Zn[0],pr=Math.min(Ai.length,Zi.length);jn<pr&&Ai.charCodeAt(jn)==Zi.charCodeAt(jn);)++jn;for(var Kr=pt(jt),Nr=pt(Zn),io=Math.min(Kr.length-(jt.length==1?jn:0),Nr.length-(Zn.length==1?jn:0));Ei<io&&Kr.charCodeAt(Kr.length-Ei-1)==Nr.charCodeAt(Nr.length-Ei-1);)++Ei;if(jt.length==1&&Zn.length==1&&We==fe.line)for(;jn&&jn>fe.ch&&Kr.charCodeAt(Kr.length-Ei-1)==Nr.charCodeAt(Nr.length-Ei-1);)jn--,Ei++;jt[jt.length-1]=Kr.slice(0,Kr.length-Ei).replace(/^\u200b+/,""),jt[0]=jt[0].slice(jn).replace(/\u200b+$/,"");var Go=hn(We,jn),Lr=hn(bt,Zn.length?pt(Zn).length-Ei:0);if(jt.length>1||jt[0]||Jt(Go,Lr))return gh(ie.doc,jt,Go,Lr,"+input"),!0},ss.prototype.ensurePolled=function(){this.forceCompositionEnd()},ss.prototype.reset=function(){this.forceCompositionEnd()},ss.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ss.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},ss.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&Wt(this.cm,function(){return Ar(ie.cm)})},ss.prototype.setUneditable=function(ie){ie.contentEditable="false"},ss.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Fn(this.cm,Pf)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},ss.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},ss.prototype.onContextMenu=function(){},ss.prototype.resetPosition=function(){},ss.prototype.needsContentAttribute=!0;function rg(ie,ae){var ge=Ru(ie,ae.line);if(!ge||ge.hidden)return null;var fe=Kt(ie.doc,ae.line),ye=Lh(ge,fe,ae.line),ke=_e(fe,ie.doc.direction),We="left";if(ke){var at=Se(ke,ae.ch);We=at%2?"right":"left"}var it=qu(ye.map,ae.ch,We);return it.offset=it.collapse=="right"?it.end:it.start,it}function ap(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function Vd(ie,ae){return ae&&(ie.bad=!0),ie}function Ud(ie,ae,ge,fe,ye){var ke="",We=!1,at=ie.doc.lineSeparator(),it=!1;function bt(jn){return function(Ei){return Ei.id==jn}}function pn(){We&&(ke+=at,it&&(ke+=at),We=it=!1)}function jt(jn){jn&&(pn(),ke+=jn)}function Zn(jn){if(jn.nodeType==1){var Ei=jn.getAttribute("cm-text");if(Ei){jt(Ei);return}var Ai=jn.getAttribute("cm-marker"),Zi;if(Ai){var pr=ie.findMarks(hn(fe,0),hn(ye+1,0),bt(+Ai));pr.length&&(Zi=pr[0].find(0))&&jt(ln(ie.doc,Zi.from,Zi.to).join(at));return}if(jn.getAttribute("contenteditable")=="false")return;var Kr=/^(pre|div|p|li|table|br)$/i.test(jn.nodeName);if(!/^br$/i.test(jn.nodeName)&&jn.textContent.length==0)return;Kr&&pn();for(var Nr=0;Nr<jn.childNodes.length;Nr++)Zn(jn.childNodes[Nr]);/^(pre|p)$/i.test(jn.nodeName)&&(it=!0),Kr&&(We=!0)}else jn.nodeType==3&&jt(jn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Zn(ae),ae!=ge;)ae=ae.nextSibling,it=!1;return ke}function Cf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Vd(ie.clipPos(hn(ie.display.viewTo-1)),!0);ae=null,ge=0}else for(fe=ae;;fe=fe.parentNode){if(!fe||fe==ie.display.lineDiv)return null;if(fe.parentNode&&fe.parentNode==ie.display.lineDiv)break}for(var ye=0;ye<ie.display.view.length;ye++){var ke=ie.display.view[ye];if(ke.node==fe)return hm(ke,ae,ge)}}function hm(ie,ae,ge){var fe=ie.text.firstChild,ye=!1;if(!ae||!At(fe,ae))return Vd(hn(St(ie.line),0),!0);if(ae==fe&&(ye=!0,ae=fe.childNodes[ge],ge=0,!ae)){var ke=ie.rest?pt(ie.rest):ie.line;return Vd(hn(St(ke),ke.text.length),ye)}var We=ae.nodeType==3?ae:null,at=ae;for(!We&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(We=ae.firstChild,ge&&(ge=We.nodeValue.length));at.parentNode!=fe;)at=at.parentNode;var it=ie.measure,bt=it.maps;function pn(Zi,pr,Kr){for(var Nr=-1;Nr<(bt?bt.length:0);Nr++)for(var io=Nr<0?it.map:bt[Nr],Go=0;Go<io.length;Go+=3){var Lr=io[Go+2];if(Lr==Zi||Lr==pr){var oa=St(Nr<0?ie.line:ie.rest[Nr]),Ss=io[Go]+Kr;return(Kr<0||Lr!=Zi)&&(Ss=io[Go+(Kr?1:0)]),hn(oa,Ss)}}}var jt=pn(We,at,ge);if(jt)return Vd(jt,ye);for(var Zn=at.nextSibling,jn=We?We.nodeValue.length-ge:0;Zn;Zn=Zn.nextSibling){if(jt=pn(Zn,Zn.firstChild,0),jt)return Vd(hn(jt.line,jt.ch-jn),ye);jn+=Zn.textContent.length}for(var Ei=at.previousSibling,Ai=ge;Ei;Ei=Ei.previousSibling){if(jt=pn(Ei,Ei.firstChild,-1),jt)return Vd(hn(jt.line,jt.ch+Ai),ye);Ai+=Ei.textContent.length}}var Qs=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new $e,this.hasSelection=!1,this.composing=null};Qs.prototype.init=function(ie){var ae=this,ge=this,fe=this.cm;this.createField(ie);var ye=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Ae&&(ye.style.width="0px"),ft(ye,"input",function(){Ze&&ht>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),ft(ye,"paste",function(We){En(fe,We)||tp(We,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function ke(We){if(!En(fe,We)){if(fe.somethingSelected())dd({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var at=ip(fe);dd({lineWise:!0,text:at.text}),We.type=="cut"?fe.setSelections(at.ranges,null,Ft):(ge.prevInput="",ye.value=at.text.join(`
|
|
|
`),Bt(ye))}else return;We.type=="cut"&&(fe.state.cutIncoming=+new Date)}}ft(ye,"cut",ke),ft(ye,"copy",ke),ft(ie.scroller,"paste",function(We){if(!(vs(ie,We)||En(fe,We))){if(!ye.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var at=new Event("paste");at.clipboardData=We.clipboardData,ye.dispatchEvent(at)}}),ft(ie.lineSpace,"selectstart",function(We){vs(ie,We)||ii(We)}),ft(ye,"compositionstart",function(){var We=fe.getCursor("from");ge.composing&&ge.composing.range.clear(),ge.composing={start:We,range:fe.markText(We,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),ft(ye,"compositionend",function(){ge.composing&&(ge.poll(),ge.composing.range.clear(),ge.composing=null)})},Qs.prototype.createField=function(ie){this.wrapper=op(),this.textarea=this.wrapper.firstChild},Qs.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,ge=ie.doc,fe=or(ie);if(ie.options.moveInputWithCursor){var ye=va(ie,ge.sel.primary().head,"div"),ke=ae.wrapper.getBoundingClientRect(),We=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,ye.top+We.top-ke.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,ye.left+We.left-ke.left))}return fe},Qs.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;Je(ge.cursorDiv,ie.cursors),Je(ge.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},Qs.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var ge=ae.getSelection();this.textarea.value=ge,ae.state.focused&&Bt(this.textarea),Ze&&ht>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",Ze&&ht>=9&&(this.hasSelection=null))}},Qs.prototype.getField=function(){return this.textarea},Qs.prototype.supportsTouch=function(){return!1},Qs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||qe()!=this.textarea))try{this.textarea.focus()}catch(ie){}},Qs.prototype.blur=function(){this.textarea.blur()},Qs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Qs.prototype.receivedFocus=function(){this.slowPoll()},Qs.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},Qs.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function ge(){var fe=ae.poll();!fe&&!ie?(ie=!0,ae.polling.set(60,ge)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,ge)},Qs.prototype.poll=function(){var ie=this,ae=this.cm,ge=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!ae.state.focused||be(ge)&&!fe&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var ye=ge.value;if(ye==fe&&!ae.somethingSelected())return!1;if(Ze&&ht>=9&&this.hasSelection===ye||he&&/[\uf700-\uf7ff]/.test(ye))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var ke=ye.charCodeAt(0);if(ke==8203&&!fe&&(fe="\u200B"),ke==8666)return this.reset(),this.cm.execCommand("undo")}for(var We=0,at=Math.min(fe.length,ye.length);We<at&&fe.charCodeAt(We)==ye.charCodeAt(We);)++We;return Wt(ae,function(){Pf(ae,ye.slice(We),fe.length-We,null,ie.composing?"*compose":null),ye.length>1e3||ye.indexOf(`
|
|
|
`)>-1?ge.value=ie.prevInput="":ie.prevInput=ye,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Qs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Qs.prototype.onKeyPress=function(){Ze&&ht>=9&&(this.hasSelection=null),this.fastPoll()},Qs.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,ye=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var ke=Wi(ge,ie),We=fe.scroller.scrollTop;if(!ke||He)return;var at=ge.options.resetSelectionOnContextMenu;at&&ge.doc.sel.contains(ke)==-1&&Fn(ge,Za)(ge.doc,Vo(ke),Ft);var it=ye.style.cssText,bt=ae.wrapper.style.cssText,pn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",ye.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-pn.top-5)+"px; left: "+(ie.clientX-pn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ze?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var jt;Me&&(jt=window.scrollY),fe.input.focus(),Me&&window.scrollTo(null,jt),fe.input.reset(),ge.somethingSelected()||(ye.value=ae.prevInput=" "),ae.contextMenuPending=jn,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function Zn(){if(ye.selectionStart!=null){var Ai=ge.somethingSelected(),Zi="\u200B"+(Ai?ye.value:"");ye.value="\u21DA",ye.value=Zi,ae.prevInput=Ai?"":"\u200B",ye.selectionStart=1,ye.selectionEnd=Zi.length,fe.selForContextMenu=ge.doc.sel}}function jn(){if(ae.contextMenuPending==jn&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=bt,ye.style.cssText=it,Ze&&ht<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=We),ye.selectionStart!=null)){(!Ze||Ze&&ht<9)&&Zn();var Ai=0,Zi=function(){fe.selForContextMenu==ge.doc.sel&&ye.selectionStart==0&&ye.selectionEnd>0&&ae.prevInput=="\u200B"?Fn(ge,La)(ge):Ai++<10?fe.detectingSelectAll=setTimeout(Zi,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Zi,200)}}if(Ze&&ht>=9&&Zn(),Ne){Ii(ie);var Ei=function(){an(window,"mouseup",Ei),setTimeout(jn,20)};ft(window,"mouseup",Ei)}else setTimeout(jn,50)},Qs.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},Qs.prototype.setUneditable=function(){},Qs.prototype.needsContentAttribute=!1;function cm(ie,ae){if(ae=ae?Ut(ae):{},ae.value=ie.value,!ae.tabindex&&ie.tabIndex&&(ae.tabindex=ie.tabIndex),!ae.placeholder&&ie.placeholder&&(ae.placeholder=ie.placeholder),ae.autofocus==null){var ge=qe();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=at.getValue()}var ye;if(ie.form&&(ft(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var ke=ie.form;ye=ke.submit;try{var We=ke.submit=function(){fe(),ke.submit=ye,ke.submit(),ke.submit=We}}catch(it){}}ae.finishInit=function(it){it.save=fe,it.getTextArea=function(){return ie},it.toTextArea=function(){it.toTextArea=isNaN,fe(),ie.parentNode.removeChild(it.getWrapperElement()),ie.style.display="",ie.form&&(an(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=ye))}},ie.style.display="none";var at=Na(function(it){return ie.parentNode.insertBefore(it,ie.nextSibling)},ae);return at}function Yd(ie){ie.off=an,ie.on=ft,ie.wheelEventPixels=no,ie.Doc=Js,ie.splitLines=mr,ie.countColumn=lt,ie.findColumn=Nn,ie.isWordChar=Lt,ie.Pass=sn,ie.signal=Qt,ie.Line=yo,ie.changeEnd=wa,ie.scrollbarModel=Fc,ie.Pos=hn,ie.cmpPos=Jt,ie.modes=oi,ie.mimeModes=vi,ie.resolveMode=bn,ie.getMode=Mt,ie.modeExtensions=Ot,ie.extendMode=Ve,ie.copyState=Yt,ie.startState=xt,ie.innerMode=qt,ie.commands=il,ie.keyMap=_l,ie.keyName=Hd,ie.isModifierKey=Tc,ie.lookupKey=hu,ie.normalizeKeyMap=_d,ie.StringStream=nt,ie.SharedTextMarker=ph,ie.TextMarker=nn,ie.LineWidget=_s,ie.e_preventDefault=ii,ie.e_stopPropagation=gi,ie.e_stop=Ii,ie.addClass=Et,ie.contains=At,ie.rmClass=Ie,ie.keyNames=nh}lm(Na),Oc(Na);var fc="iter insert remove copy getEditor constructor".split(" ");for(var Ef in Js.prototype)Js.prototype.hasOwnProperty(Ef)&&Nt(fc,Ef)<0&&(Na.prototype[Ef]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Js.prototype[Ef]));return Dn(Js),Na.inputStyles={textarea:Qs,contenteditable:ss},Na.defineMode=function(ie){!Na.defaults.mode&&ie!="null"&&(Na.defaults.mode=ie),Fi.apply(this,arguments)},Na.defineMIME=Vn,Na.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),Na.defineMIME("text/plain","null"),Na.defineExtension=function(ie,ae){Na.prototype[ie]=ae},Na.defineDocExtension=function(ie,ae){Js.prototype[ie]=ae},Na.fromTextArea=cm,Yd(Na),Na.version="5.58.2",Na})},25419:function(Cn,un,ve){(function(ce){ce(ve(89780),ve(15525),ve(98101))})(function(ce){"use strict";ce.defineMode("markdown",function(De,ze){var wt=ce.getMode(De,"text/html"),Ze=wt.name=="null";function ht(lt){if(ce.findModeByName){var $e=ce.findModeByName(lt);$e&&(lt=$e.mime||$e.mimes[0])}var Nt=ce.getMode(De,lt);return Nt.name=="null"?null:Nt}ze.highlightFormatting===void 0&&(ze.highlightFormatting=!1),ze.maxBlockquoteDepth===void 0&&(ze.maxBlockquoteDepth=0),ze.taskLists===void 0&&(ze.taskLists=!1),ze.strikethrough===void 0&&(ze.strikethrough=!1),ze.emoji===void 0&&(ze.emoji=!1),ze.fencedCodeBlockHighlighting===void 0&&(ze.fencedCodeBlockHighlighting=!0),ze.fencedCodeBlockDefaultMode===void 0&&(ze.fencedCodeBlockDefaultMode="text/plain"),ze.xml===void 0&&(ze.xml=!0),ze.tokenTypeOverrides===void 0&&(ze.tokenTypeOverrides={});var Me={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 yt in Me)Me.hasOwnProperty(yt)&&ze.tokenTypeOverrides[yt]&&(Me[yt]=ze.tokenTypeOverrides[yt]);var ct=/^([*\-_])(?:\s*\1){2,}\s*$/,He=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,st=/^\[(x| )\](?=\s)/i,mt=ze.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,dt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ae=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,he=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,se=" ";function de(lt,$e,Nt){return $e.f=$e.inline=Nt,Nt(lt,$e)}function me(lt,$e,Nt){return $e.f=$e.block=Nt,Nt(lt,$e)}function we(lt){return!lt||!/\S/.test(lt.string)}function Ne(lt){if(lt.linkTitle=!1,lt.linkHref=!1,lt.linkText=!1,lt.em=!1,lt.strong=!1,lt.strikethrough=!1,lt.quote=0,lt.indentedCode=!1,lt.f==Ie){var $e=Ze;if(!$e){var Nt=ce.innerMode(wt,lt.htmlState);$e=Nt.mode.name=="xml"&&Nt.state.tagStart===null&&!Nt.state.context&&Nt.state.tokenize.isInText}$e&&(lt.f=gt,lt.block=Fe,lt.htmlState=null)}return lt.trailingSpace=0,lt.trailingSpaceNewLine=!1,lt.prevLine=lt.thisLine,lt.thisLine={stream:null},null}function Fe(lt,$e){var Nt=lt.column()===$e.indentation,cn=we($e.prevLine.stream),sn=$e.indentedCode,Ft=$e.prevLine.hr,$t=$e.list!==!1,en=($e.listStack[$e.listStack.length-1]||0)+3;$e.indentedCode=!1;var Nn=$e.indentation;if($e.indentationDiff===null&&($e.indentationDiff=$e.indentation,$t)){for($e.list=null;Nn<$e.listStack[$e.listStack.length-1];)$e.listStack.pop(),$e.listStack.length?$e.indentation=$e.listStack[$e.listStack.length-1]:$e.list=!1;$e.list!==!1&&($e.indentationDiff=Nn-$e.listStack[$e.listStack.length-1])}var fn=!cn&&!Ft&&!$e.prevLine.header&&(!$t||!sn)&&!$e.prevLine.fencedCodeEnd,Mn=($e.list===!1||Ft||cn)&&$e.indentation<=en&<.match(ct),pt=null;if($e.indentationDiff>=4&&(sn||$e.prevLine.fencedCodeEnd||$e.prevLine.header||cn))return lt.skipToEnd(),$e.indentedCode=!0,Me.code;if(lt.eatSpace())return null;if(Nt&&$e.indentation<=en&&(pt=lt.match(mt))&&pt[1].length<=6)return $e.quote=0,$e.header=pt[1].length,$e.thisLine.header=!0,ze.highlightFormatting&&($e.formatting="header"),$e.f=$e.inline,Je($e);if($e.indentation<=en&<.eat(">"))return $e.quote=Nt?1:$e.quote+1,ze.highlightFormatting&&($e.formatting="quote"),lt.eatSpace(),Je($e);if(!Mn&&!$e.setext&&Nt&&$e.indentation<=en&&(pt=lt.match(He))){var Ln=pt[1]?"ol":"ul";return $e.indentation=Nn+lt.current().length,$e.list=!0,$e.quote=0,$e.listStack.push($e.indentation),$e.em=!1,$e.strong=!1,$e.code=!1,$e.strikethrough=!1,ze.taskLists&<.match(st,!1)&&($e.taskList=!0),$e.f=$e.inline,ze.highlightFormatting&&($e.formatting=["list","list-"+Ln]),Je($e)}else{if(Nt&&$e.indentation<=en&&(pt=lt.match(te,!0)))return $e.quote=0,$e.fencedEndRE=new RegExp(pt[1]+"+ *$"),$e.localMode=ze.fencedCodeBlockHighlighting&&ht(pt[2]||ze.fencedCodeBlockDefaultMode),$e.localMode&&($e.localState=ce.startState($e.localMode)),$e.f=$e.block=je,ze.highlightFormatting&&($e.formatting="code-block"),$e.code=-1,Je($e);if($e.setext||(!fn||!$t)&&!$e.quote&&$e.list===!1&&!$e.code&&!Mn&&!ee.test(lt.string)&&(pt=lt.lookAhead(1))&&(pt=pt.match(dt)))return $e.setext?($e.header=$e.setext,$e.setext=0,lt.skipToEnd(),ze.highlightFormatting&&($e.formatting="header")):($e.header=pt[0].charAt(0)=="="?1:2,$e.setext=$e.header),$e.thisLine.header=!0,$e.f=$e.inline,Je($e);if(Mn)return lt.skipToEnd(),$e.hr=!0,$e.thisLine.hr=!0,Me.hr;if(lt.peek()==="[")return de(lt,$e,kt)}return de(lt,$e,$e.inline)}function Ie(lt,$e){var Nt=wt.token(lt,$e.htmlState);if(!Ze){var cn=ce.innerMode(wt,$e.htmlState);(cn.mode.name=="xml"&&cn.state.tagStart===null&&!cn.state.context&&cn.state.tokenize.isInText||$e.md_inside&<.current().indexOf(">")>-1)&&($e.f=gt,$e.block=Fe,$e.htmlState=null)}return Nt}function je(lt,$e){var Nt=$e.listStack[$e.listStack.length-1]||0,cn=$e.indentation<Nt,sn=Nt+3;if($e.fencedEndRE&&$e.indentation<=sn&&(cn||lt.match($e.fencedEndRE))){ze.highlightFormatting&&($e.formatting="code-block");var Ft;return cn||(Ft=Je($e)),$e.localMode=$e.localState=null,$e.block=Fe,$e.f=gt,$e.fencedEndRE=null,$e.code=0,$e.thisLine.fencedCodeEnd=!0,cn?me(lt,$e,$e.block):Ft}else return $e.localMode?$e.localMode.token(lt,$e.localState):(lt.skipToEnd(),Me.code)}function Je(lt){var $e=[];if(lt.formatting){$e.push(Me.formatting),typeof lt.formatting=="string"&&(lt.formatting=[lt.formatting]);for(var Nt=0;Nt<lt.formatting.length;Nt++)$e.push(Me.formatting+"-"+lt.formatting[Nt]),lt.formatting[Nt]==="header"&&$e.push(Me.formatting+"-"+lt.formatting[Nt]+"-"+lt.header),lt.formatting[Nt]==="quote"&&(!ze.maxBlockquoteDepth||ze.maxBlockquoteDepth>=lt.quote?$e.push(Me.formatting+"-"+lt.formatting[Nt]+"-"+lt.quote):$e.push("error"))}if(lt.taskOpen)return $e.push("meta"),$e.length?$e.join(" "):null;if(lt.taskClosed)return $e.push("property"),$e.length?$e.join(" "):null;if(lt.linkHref?$e.push(Me.linkHref,"url"):(lt.strong&&$e.push(Me.strong),lt.em&&$e.push(Me.em),lt.strikethrough&&$e.push(Me.strikethrough),lt.emoji&&$e.push(Me.emoji),lt.linkText&&$e.push(Me.linkText),lt.code&&$e.push(Me.code),lt.image&&$e.push(Me.image),lt.imageAltText&&$e.push(Me.imageAltText,"link"),lt.imageMarker&&$e.push(Me.imageMarker)),lt.header&&$e.push(Me.header,Me.header+"-"+lt.header),lt.quote&&($e.push(Me.quote),!ze.maxBlockquoteDepth||ze.maxBlockquoteDepth>=lt.quote?$e.push(Me.quote+"-"+lt.quote):$e.push(Me.quote+"-"+ze.maxBlockquoteDepth)),lt.list!==!1){var cn=(lt.listStack.length-1)%3;cn?cn===1?$e.push(Me.list2):$e.push(Me.list3):$e.push(Me.list1)}return lt.trailingSpaceNewLine?$e.push("trailing-space-new-line"):lt.trailingSpace&&$e.push("trailing-space-"+(lt.trailingSpace%2?"a":"b")),$e.length?$e.join(" "):null}function Ke(lt,$e){if(lt.match(Ae,!0))return Je($e)}function gt(lt,$e){var Nt=$e.text(lt,$e);if(typeof Nt!="undefined")return Nt;if($e.list)return $e.list=null,Je($e);if($e.taskList){var cn=lt.match(st,!0)[1]===" ";return cn?$e.taskOpen=!0:$e.taskClosed=!0,ze.highlightFormatting&&($e.formatting="task"),$e.taskList=!1,Je($e)}if($e.taskOpen=!1,$e.taskClosed=!1,$e.header&<.match(/^#+$/,!0))return ze.highlightFormatting&&($e.formatting="header"),Je($e);var sn=lt.next();if($e.linkTitle){$e.linkTitle=!1;var Ft=sn;sn==="("&&(Ft=")"),Ft=(Ft+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var $t="^\\s*(?:[^"+Ft+"\\\\]+|\\\\\\\\|\\\\.)"+Ft;if(lt.match(new RegExp($t),!0))return Me.linkHref}if(sn==="`"){var en=$e.formatting;ze.highlightFormatting&&($e.formatting="code"),lt.eatWhile("`");var Nn=lt.current().length;if($e.code==0&&(!$e.quote||Nn==1))return $e.code=Nn,Je($e);if(Nn==$e.code){var fn=Je($e);return $e.code=0,fn}else return $e.formatting=en,Je($e)}else if($e.code)return Je($e);if(sn==="\\"&&(lt.next(),ze.highlightFormatting)){var Mn=Je($e),pt=Me.formatting+"-escape";return Mn?Mn+" "+pt:pt}if(sn==="!"&<.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return $e.imageMarker=!0,$e.image=!0,ze.highlightFormatting&&($e.formatting="image"),Je($e);if(sn==="["&&$e.imageMarker&<.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return $e.imageMarker=!1,$e.imageAltText=!0,ze.highlightFormatting&&($e.formatting="image"),Je($e);if(sn==="]"&&$e.imageAltText){ze.highlightFormatting&&($e.formatting="image");var Mn=Je($e);return $e.imageAltText=!1,$e.image=!1,$e.inline=$e.f=At,Mn}if(sn==="["&&!$e.image)return $e.linkText&<.match(/^.*?\]/)||($e.linkText=!0,ze.highlightFormatting&&($e.formatting="link")),Je($e);if(sn==="]"&&$e.linkText){ze.highlightFormatting&&($e.formatting="link");var Mn=Je($e);return $e.linkText=!1,$e.inline=$e.f=lt.match(/\(.*?\)| ?\[.*?\]/,!1)?At:gt,Mn}if(sn==="<"&<.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){$e.f=$e.inline=Re,ze.highlightFormatting&&($e.formatting="link");var Mn=Je($e);return Mn?Mn+=" ":Mn="",Mn+Me.linkInline}if(sn==="<"&<.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){$e.f=$e.inline=Re,ze.highlightFormatting&&($e.formatting="link");var Mn=Je($e);return Mn?Mn+=" ":Mn="",Mn+Me.linkEmail}if(ze.xml&&sn==="<"&<.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ln=lt.string.indexOf(">",lt.pos);if(Ln!=-1){var Un=lt.string.substring(lt.start,Ln);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Un)&&($e.md_inside=!0)}return lt.backUp(1),$e.htmlState=ce.startState(wt),me(lt,$e,Ie)}if(ze.xml&&sn==="<"&<.match(/^\/\w*?>/))return $e.md_inside=!1,"tag";if(sn==="*"||sn==="_"){for(var Zt=1,tn=lt.pos==1?" ":lt.string.charAt(lt.pos-2);Zt<3&<.eat(sn);)Zt++;var Rt=lt.peek()||" ",Lt=!/\s/.test(Rt)&&(!he.test(Rt)||/\s/.test(tn)||he.test(tn)),ut=!/\s/.test(tn)&&(!he.test(tn)||/\s/.test(Rt)||he.test(Rt)),Ge=null,Dt=null;if(Zt%2&&(!$e.em&&Lt&&(sn==="*"||!ut||he.test(tn))?Ge=!0:$e.em==sn&&ut&&(sn==="*"||!Lt||he.test(Rt))&&(Ge=!1)),Zt>1&&(!$e.strong&&Lt&&(sn==="*"||!ut||he.test(tn))?Dt=!0:$e.strong==sn&&ut&&(sn==="*"||!Lt||he.test(Rt))&&(Dt=!1)),Dt!=null||Ge!=null){ze.highlightFormatting&&($e.formatting=Ge==null?"strong":Dt==null?"em":"strong em"),Ge===!0&&($e.em=sn),Dt===!0&&($e.strong=sn);var fn=Je($e);return Ge===!1&&($e.em=!1),Dt===!1&&($e.strong=!1),fn}}else if(sn===" "&&(lt.eat("*")||lt.eat("_"))){if(lt.peek()===" ")return Je($e);lt.backUp(1)}if(ze.strikethrough){if(sn==="~"&<.eatWhile(sn)){if($e.strikethrough){ze.highlightFormatting&&($e.formatting="strikethrough");var fn=Je($e);return $e.strikethrough=!1,fn}else if(lt.match(/^[^\s]/,!1))return $e.strikethrough=!0,ze.highlightFormatting&&($e.formatting="strikethrough"),Je($e)}else if(sn===" "&<.match(/^~~/,!0)){if(lt.peek()===" ")return Je($e);lt.backUp(2)}}if(ze.emoji&&sn===":"&<.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){$e.emoji=!0,ze.highlightFormatting&&($e.formatting="emoji");var Tt=Je($e);return $e.emoji=!1,Tt}return sn===" "&&(lt.match(/^ +$/,!1)?$e.trailingSpace++:$e.trailingSpace&&($e.trailingSpaceNewLine=!0)),Je($e)}function Re(lt,$e){var Nt=lt.next();if(Nt===">"){$e.f=$e.inline=gt,ze.highlightFormatting&&($e.formatting="link");var cn=Je($e);return cn?cn+=" ":cn="",cn+Me.linkInline}return lt.match(/^[^>]+/,!0),Me.linkInline}function At(lt,$e){if(lt.eatSpace())return null;var Nt=lt.next();return Nt==="("||Nt==="["?($e.f=$e.inline=Et(Nt==="("?")":"]"),ze.highlightFormatting&&($e.formatting="link-string"),$e.linkHref=!0,Je($e)):"error"}var qe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Et(lt){return function($e,Nt){var cn=$e.next();if(cn===lt){Nt.f=Nt.inline=gt,ze.highlightFormatting&&(Nt.formatting="link-string");var sn=Je(Nt);return Nt.linkHref=!1,sn}return $e.match(qe[lt]),Nt.linkHref=!0,Je(Nt)}}function kt(lt,$e){return lt.match(/^([^\]\\]|\\.)*\]:/,!1)?($e.f=Bt,lt.next(),ze.highlightFormatting&&($e.formatting="link"),$e.linkText=!0,Je($e)):de(lt,$e,gt)}function Bt(lt,$e){if(lt.match(/^\]:/,!0)){$e.f=$e.inline=Gt,ze.highlightFormatting&&($e.formatting="link");var Nt=Je($e);return $e.linkText=!1,Nt}return lt.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function Gt(lt,$e){return lt.eatSpace()?null:(lt.match(/^[^\s]+/,!0),lt.peek()===void 0?$e.linkTitle=!0:lt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),$e.f=$e.inline=gt,Me.linkHref+" url")}var Ut={startState:function(){return{f:Fe,prevLine:{stream:null},thisLine:{stream:null},block:Fe,htmlState:null,indentation:0,inline:gt,text:Ke,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(lt){return{f:lt.f,prevLine:lt.prevLine,thisLine:lt.thisLine,block:lt.block,htmlState:lt.htmlState&&ce.copyState(wt,lt.htmlState),indentation:lt.indentation,localMode:lt.localMode,localState:lt.localMode?ce.copyState(lt.localMode,lt.localState):null,inline:lt.inline,text:lt.text,formatting:!1,linkText:lt.linkText,linkTitle:lt.linkTitle,linkHref:lt.linkHref,code:lt.code,em:lt.em,strong:lt.strong,strikethrough:lt.strikethrough,emoji:lt.emoji,header:lt.header,setext:lt.setext,hr:lt.hr,taskList:lt.taskList,list:lt.list,listStack:lt.listStack.slice(0),quote:lt.quote,indentedCode:lt.indentedCode,trailingSpace:lt.trailingSpace,trailingSpaceNewLine:lt.trailingSpaceNewLine,md_inside:lt.md_inside,fencedEndRE:lt.fencedEndRE}},token:function(lt,$e){if($e.formatting=!1,lt!=$e.thisLine.stream){if($e.header=0,$e.hr=!1,lt.match(/^\s*$/,!0))return Ne($e),null;if($e.prevLine=$e.thisLine,$e.thisLine={stream:lt},$e.taskList=!1,$e.trailingSpace=0,$e.trailingSpaceNewLine=!1,!$e.localState&&($e.f=$e.block,$e.f!=Ie)){var Nt=lt.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if($e.indentation=Nt,$e.indentationDiff=null,Nt>0)return null}}return $e.f(lt,$e)},innerMode:function(lt){return lt.block==Ie?{state:lt.htmlState,mode:wt}:lt.localState?{state:lt.localState,mode:lt.localMode}:{state:lt,mode:Ut}},indent:function(lt,$e,Nt){return lt.block==Ie&&wt.indent?wt.indent(lt.htmlState,$e,Nt):lt.localState&<.localMode.indent?lt.localMode.indent(lt.localState,$e,Nt):ce.Pass},blankLine:Ne,getType:Je,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ut},"xml"),ce.defineMIME("text/markdown","markdown"),ce.defineMIME("text/x-markdown","markdown")})},98101:function(Cn,un,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";ce.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var De=0;De<ce.modeInfo.length;De++){var ze=ce.modeInfo[De];ze.mimes&&(ze.mime=ze.mimes[0])}ce.findModeByMIME=function(wt){wt=wt.toLowerCase();for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var ht=ce.modeInfo[Ze];if(ht.mime==wt)return ht;if(ht.mimes){for(var Me=0;Me<ht.mimes.length;Me++)if(ht.mimes[Me]==wt)return ht}}if(/\+xml$/.test(wt))return ce.findModeByMIME("application/xml");if(/\+json$/.test(wt))return ce.findModeByMIME("application/json")},ce.findModeByExtension=function(wt){wt=wt.toLowerCase();for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var ht=ce.modeInfo[Ze];if(ht.ext){for(var Me=0;Me<ht.ext.length;Me++)if(ht.ext[Me]==wt)return ht}}},ce.findModeByFileName=function(wt){for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var ht=ce.modeInfo[Ze];if(ht.file&&ht.file.test(wt))return ht}var Me=wt.lastIndexOf("."),yt=Me>-1&&wt.substring(Me+1,wt.length);if(yt)return ce.findModeByExtension(yt)},ce.findModeByName=function(wt){wt=wt.toLowerCase();for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var ht=ce.modeInfo[Ze];if(ht.name.toLowerCase()==wt)return ht;if(ht.alias){for(var Me=0;Me<ht.alias.length;Me++)if(ht.alias[Me].toLowerCase()==wt)return ht}}}})},67549:function(Cn,un,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";ce.defineMode("stex",function(De,ze){"use strict";function wt(Ae,te){Ae.cmdState.push(te)}function Ze(Ae){return Ae.cmdState.length>0?Ae.cmdState[Ae.cmdState.length-1]:null}function ht(Ae){var te=Ae.cmdState.pop();te&&te.closeBracket()}function Me(Ae){for(var te=Ae.cmdState,ee=te.length-1;ee>=0;ee--){var he=te[ee];if(he.name!="DEFAULT")return he}return{styleIdentifier:function(){return null}}}function yt(Ae,te,ee){return function(){this.name=Ae,this.bracketNo=0,this.style=te,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ct={};ct.importmodule=yt("importmodule","tag",["string","builtin"]),ct.documentclass=yt("documentclass","tag",["","atom"]),ct.usepackage=yt("usepackage","tag",["atom"]),ct.begin=yt("begin","tag",["atom"]),ct.end=yt("end","tag",["atom"]),ct.label=yt("label","tag",["atom"]),ct.ref=yt("ref","tag",["atom"]),ct.eqref=yt("eqref","tag",["atom"]),ct.cite=yt("cite","tag",["atom"]),ct.bibitem=yt("bibitem","tag",["atom"]),ct.Bibitem=yt("Bibitem","tag",["atom"]),ct.RBibitem=yt("RBibitem","tag",["atom"]),ct.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function He(Ae,te){Ae.f=te}function st(Ae,te){var ee;if(Ae.match(/^\\[a-zA-Z@]+/)){var he=Ae.current().slice(1);return ee=ct.hasOwnProperty(he)?ct[he]:ct.DEFAULT,ee=new ee,wt(te,ee),He(te,dt),ee.style}if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/\\]/))return"tag";if(Ae.match("\\["))return He(te,function(de,me){return mt(de,me,"\\]")}),"keyword";if(Ae.match("\\("))return He(te,function(de,me){return mt(de,me,"\\)")}),"keyword";if(Ae.match("$$"))return He(te,function(de,me){return mt(de,me,"$$")}),"keyword";if(Ae.match("$"))return He(te,function(de,me){return mt(de,me,"$")}),"keyword";var se=Ae.next();if(se=="%")return Ae.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=Ze(te),ee)ee.closeBracket(se),He(te,dt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=ct.DEFAULT,ee=new ee,wt(te,ee),"bracket"):/\d/.test(se)?(Ae.eatWhile(/[\w.%]/),"atom"):(Ae.eatWhile(/[\w\-_]/),ee=Me(te),ee.name=="begin"&&(ee.argument=Ae.current()),ee.styleIdentifier())}function mt(Ae,te,ee){if(Ae.eatSpace())return null;if(ee&&Ae.match(ee))return He(te,st),"keyword";if(Ae.match(/^\\[a-zA-Z@]+/))return"tag";if(Ae.match(/^[a-zA-Z]+/))return"variable-2";if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/]/)||Ae.match(/^[\^_&]/))return"tag";if(Ae.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ae.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var he=Ae.next();return he=="{"||he=="}"||he=="["||he=="]"||he=="("||he==")"?"bracket":he=="%"?(Ae.skipToEnd(),"comment"):"error"}function dt(Ae,te){var ee=Ae.peek(),he;return ee=="{"||ee=="["?(he=Ze(te),he.openBracket(ee),Ae.eat(ee),He(te,st),"bracket"):/[ \t\r]/.test(ee)?(Ae.eat(ee),null):(He(te,st),ht(te),st(Ae,te))}return{startState:function(){var Ae=ze.inMathMode?function(te,ee){return mt(te,ee)}:st;return{cmdState:[],f:Ae}},copyState:function(Ae){return{cmdState:Ae.cmdState.slice(),f:Ae.f}},token:function(Ae,te){return te.f(Ae,te)},blankLine:function(Ae){Ae.f=st,Ae.cmdState.length=0},lineComment:"%"}}),ce.defineMIME("text/x-stex","stex"),ce.defineMIME("text/x-latex","stex")})},15525:function(Cn,un,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";var De={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},ze={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ce.defineMode("xml",function(wt,Ze){var ht=wt.indentUnit,Me={},yt=Ze.htmlMode?De:ze;for(var ct in yt)Me[ct]=yt[ct];for(var ct in Ze)Me[ct]=Ze[ct];var He,st;function mt(Re,At){function qe(Bt){return At.tokenize=Bt,Bt(Re,At)}var Et=Re.next();if(Et=="<")return Re.eat("!")?Re.eat("[")?Re.match("CDATA[")?qe(te("atom","]]>")):null:Re.match("--")?qe(te("comment","-->")):Re.match("DOCTYPE",!0,!0)?(Re.eatWhile(/[\w\._\-]/),qe(ee(1))):null:Re.eat("?")?(Re.eatWhile(/[\w\._\-]/),At.tokenize=te("meta","?>"),"meta"):(He=Re.eat("/")?"closeTag":"openTag",At.tokenize=dt,"tag bracket");if(Et=="&"){var kt;return Re.eat("#")?Re.eat("x")?kt=Re.eatWhile(/[a-fA-F\d]/)&&Re.eat(";"):kt=Re.eatWhile(/[\d]/)&&Re.eat(";"):kt=Re.eatWhile(/[\w\.\-:]/)&&Re.eat(";"),kt?"atom":"error"}else return Re.eatWhile(/[^&<]/),null}mt.isInText=!0;function dt(Re,At){var qe=Re.next();if(qe==">"||qe=="/"&&Re.eat(">"))return At.tokenize=mt,He=qe==">"?"endTag":"selfcloseTag","tag bracket";if(qe=="=")return He="equals",null;if(qe=="<"){At.tokenize=mt,At.state=me,At.tagName=At.tagStart=null;var Et=At.tokenize(Re,At);return Et?Et+" tag error":"tag error"}else return/[\'\"]/.test(qe)?(At.tokenize=Ae(qe),At.stringStartCol=Re.column(),At.tokenize(Re,At)):(Re.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ae(Re){var At=function(qe,Et){for(;!qe.eol();)if(qe.next()==Re){Et.tokenize=dt;break}return"string"};return At.isInAttribute=!0,At}function te(Re,At){return function(qe,Et){for(;!qe.eol();){if(qe.match(At)){Et.tokenize=mt;break}qe.next()}return Re}}function ee(Re){return function(At,qe){for(var Et;(Et=At.next())!=null;){if(Et=="<")return qe.tokenize=ee(Re+1),qe.tokenize(At,qe);if(Et==">")if(Re==1){qe.tokenize=mt;break}else return qe.tokenize=ee(Re-1),qe.tokenize(At,qe)}return"meta"}}function he(Re,At,qe){this.prev=Re.context,this.tagName=At,this.indent=Re.indented,this.startOfLine=qe,(Me.doNotIndent.hasOwnProperty(At)||Re.context&&Re.context.noIndent)&&(this.noIndent=!0)}function se(Re){Re.context&&(Re.context=Re.context.prev)}function de(Re,At){for(var qe;;){if(!Re.context||(qe=Re.context.tagName,!Me.contextGrabbers.hasOwnProperty(qe)||!Me.contextGrabbers[qe].hasOwnProperty(At)))return;se(Re)}}function me(Re,At,qe){return Re=="openTag"?(qe.tagStart=At.column(),we):Re=="closeTag"?Ne:me}function we(Re,At,qe){return Re=="word"?(qe.tagName=At.current(),st="tag",je):Me.allowMissingTagName&&Re=="endTag"?(st="tag bracket",je(Re,At,qe)):(st="error",we)}function Ne(Re,At,qe){if(Re=="word"){var Et=At.current();return qe.context&&qe.context.tagName!=Et&&Me.implicitlyClosed.hasOwnProperty(qe.context.tagName)&&se(qe),qe.context&&qe.context.tagName==Et||Me.matchClosing===!1?(st="tag",Fe):(st="tag error",Ie)}else return Me.allowMissingTagName&&Re=="endTag"?(st="tag bracket",Fe(Re,At,qe)):(st="error",Ie)}function Fe(Re,At,qe){return Re!="endTag"?(st="error",Fe):(se(qe),me)}function Ie(Re,At,qe){return st="error",Fe(Re,At,qe)}function je(Re,At,qe){if(Re=="word")return st="attribute",Je;if(Re=="endTag"||Re=="selfcloseTag"){var Et=qe.tagName,kt=qe.tagStart;return qe.tagName=qe.tagStart=null,Re=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(Et)?de(qe,Et):(de(qe,Et),qe.context=new he(qe,Et,kt==qe.indented)),me}return st="error",je}function Je(Re,At,qe){return Re=="equals"?Ke:(Me.allowMissing||(st="error"),je(Re,At,qe))}function Ke(Re,At,qe){return Re=="string"?gt:Re=="word"&&Me.allowUnquoted?(st="string",je):(st="error",je(Re,At,qe))}function gt(Re,At,qe){return Re=="string"?gt:je(Re,At,qe)}return{startState:function(Re){var At={tokenize:mt,state:me,indented:Re||0,tagName:null,tagStart:null,context:null};return Re!=null&&(At.baseIndent=Re),At},token:function(Re,At){if(!At.tagName&&Re.sol()&&(At.indented=Re.indentation()),Re.eatSpace())return null;He=null;var qe=At.tokenize(Re,At);return(qe||He)&&qe!="comment"&&(st=null,At.state=At.state(He||qe,Re,At),st&&(qe=st=="error"?qe+" error":st)),qe},indent:function(Re,At,qe){var Et=Re.context;if(Re.tokenize.isInAttribute)return Re.tagStart==Re.indented?Re.stringStartCol+1:Re.indented+ht;if(Et&&Et.noIndent)return ce.Pass;if(Re.tokenize!=dt&&Re.tokenize!=mt)return qe?qe.match(/^(\s*)/)[0].length:0;if(Re.tagName)return Me.multilineTagIndentPastTag!==!1?Re.tagStart+Re.tagName.length+2:Re.tagStart+ht*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(At))return 0;var kt=At&&/^<(\/)?([\w_:\.-]*)/.exec(At);if(kt&&kt[1])for(;Et;)if(Et.tagName==kt[2]){Et=Et.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(Et.tagName))Et=Et.prev;else break;else if(kt)for(;Et;){var Bt=Me.contextGrabbers[Et.tagName];if(Bt&&Bt.hasOwnProperty(kt[2]))Et=Et.prev;else break}for(;Et&&Et.prev&&!Et.startOfLine;)Et=Et.prev;return Et?Et.indent+ht:Re.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(Re){Re.state==Ke&&(Re.state=je)},xmlCurrentTag:function(Re){return Re.tagName?{name:Re.tagName,close:Re.type=="closeTag"}:null},xmlCurrentContext:function(Re){for(var At=[],qe=Re.context;qe;qe=qe.prev)qe.tagName&&At.push(qe.tagName);return At.reverse()}}}),ce.defineMIME("text/xml","xml"),ce.defineMIME("application/xml","xml"),ce.mimeModes.hasOwnProperty("text/html")||ce.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Cn,un,ve){"use strict";ve.d(un,{$u:function(){return ct},BD:function(){return Zt},E9:function(){return yt},FF:function(){return ti},FJ:function(){return me},Hn:function(){return de},KX:function(){return Ne},NB:function(){return Te},S0:function(){return pt},UL:function(){return He},Vk:function(){return se},Vm:function(){return Se},YI:function(){return Ln},ZA:function(){return ze},Zt:function(){return st},al:function(){return Ge},bn:function(){return ut},bx:function(){return tn},g2:function(){return Un},h1:function(){return Ke},hD:function(){return Dn},l4:function(){return ht},rU:function(){return xe},s_:function(){return Rt},uz:function(){return et},z6:function(){return mt}}),Cn=ve.hmd(Cn),function(){var be;function ci(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Hi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:ci(a)}}function dn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var oi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},vi;if(typeof Object.setPrototypeOf=="function")vi=Object.setPrototypeOf;else{var Fi;e:{var Vn={a:!0},bn={};try{bn.__proto__=Vn,Fi=bn.a;break e}catch(a){}Fi=!1}vi=Fi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Mt=vi;function Ot(a,y){if(a.prototype=oi(y.prototype),a.prototype.constructor=a,Mt)Mt(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 Ve=typeof ve.g!="undefined"&&ve.g!=null?ve.g:self,Yt=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},qt=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function xt(a,y){if(y){var x=Ve;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&&qt(x,a,{writable:!0,value:y})}}xt("Object.assign",function(a){return a||Yt}),xt("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 nt=typeof globalThis=="object"&&globalThis||typeof ve.g=="object"&&ve.g.global===ve.g&&ve.g||typeof self=="object"&&self.self===self&&self||{};nt.requestAnimationFrame===void 0&&(nt.setImmediate===void 0?nt.requestAnimationFrame=function(a){nt.setTimeout(a,0)}:nt.requestAnimationFrame=nt.setImmediate);function Kt(){}function ln(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&nt.clearTimeout(x),x=xn(function(){x=-1,a.apply(E,b)},y)}}function xn(a,y){return nt.setTimeout(a,y)}function On(a){return nt.document.createElement(a)}function St(a){throw Error(a)}function gn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),St(a)}function Rn(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),St(x+" is not in the range "+y+": "+a)}function ai(a){nt.console&&nt.console.log(a)}function hn(a){return typeof a=="object"&&a!==null}function Jt(a){return Array.isArray(a)||nt.NodeList&&a instanceof nt.NodeList||nt.HTMLCollection&&a instanceof nt.HTMLCollection}function Xn(a){return Array.prototype.slice.call(a)}function si(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):St("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ui(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):St("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Qn(){var a=Wr.pop();return a===void 0?[]:a}function di(a){a.length=0,Wr.push(a)}function hi(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(hn(a)&&a.constructor)return hi(a.constructor);return typeof a}function Ri(a){var y=a;return hn(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 Xi(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 tr(a,y,x){Object.defineProperty(Vr.prototype,a,{get:y,set:x})}function yn(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="",ne=0;ne<a.length;ne++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(ne)^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 Br=nt.navigator!==void 0&&0<nt.navigator.userAgent.indexOf("Trident/7"),br=nt.navigator!==void 0&&nt.navigator.platform!==void 0&&nt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Wr=[];Object.freeze([]),Kt.className="Util",Kt.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Kt.adym="gojs.net",Kt.vfo="28e645fdb266",Kt.className="Util";function mn(a,y,x){_r(this),this.j=a,this.xa=y,this.o=x}mn.prototype.toString=function(){return"EnumValue."+this.xa};function _n(a,y){return y==null||y===""?null:a[y]}Ve.Object.defineProperties(mn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),mn.className="EnumValue";function Si(){this.ew=[]}Si.prototype.toString=function(){return this.ew.join("")},Si.prototype.add=function(a){a!==""&&this.ew.push(a)},Si.className="StringBuilder";function zi(){}zi.className="PropertyCollection";var Ni={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){nt.console&&nt.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(ne,re){return function(){throw Error("Property "+ne.Zl[re.Tj]+" of "+ne.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"},Ve.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 ar=null;ji.className="EmptyIterator",ar=new ji;function Qi(a){this.key=-1,this.value=a}Qi.prototype.reset=function(){this.key=-1},Qi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Qi.prototype.Ad=function(){return this.next()},Qi.prototype.first=function(){return this.key=0,this.value},Qi.prototype.any=function(a){return this.key=-1,a(this.value)},Qi.prototype.all=function(a){return this.key=-1,a(this.value)},Qi.prototype.each=function(a){return this.key=-1,a(this.value),this},Qi.prototype.map=function(a){return new Qi(a(this.value))},Qi.prototype.filter=function(a){return a(this.value)?new Qi(this.value):ar},Qi.prototype.de=function(){this.value=null},Qi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ve.Object.defineProperties(Qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Qi.prototype.first=Qi.prototype.first,Qi.prototype.hasNext=Qi.prototype.Ad,Qi.prototype.next=Qi.prototype.next,Qi.prototype.reset=Qi.prototype.reset,Qi.className="SingletonIterator";function nr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}nr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},nr.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},nr.prototype.Ad=function(){return this.next()},nr.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},nr.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},nr.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},nr.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},nr.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 ne=y[z];(b===null||b(ne))&&x.push(a(ne))}return a=new An,a.s=x,a.xb(),a.iterator},nr.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 ne=y[z];(b===null||b(ne))&&a(ne)&&x.push(ne)}return a=new An,a.s=x,a.xb(),a.iterator},nr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},nr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ve.Object.defineProperties(nr.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}}}),nr.prototype.first=nr.prototype.first,nr.prototype.hasNext=nr.prototype.Ad,nr.prototype.next=nr.prototype.next,nr.prototype.reset=nr.prototype.reset,nr.className="ListIterator";function hr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}hr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},hr.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)},hr.prototype.Ad=function(){return this.next()},hr.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},hr.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},hr.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},hr.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},hr.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 An,a.s=x,a.xb(),a.iterator},hr.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 An,a.s=x,a.xb(),a.iterator},hr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},hr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ve.Object.defineProperties(hr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),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="ListIteratorBackwards";function An(a){_r(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}be=An.prototype,be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return this._isFrozen=!1,this},be.toString=function(){return"List()#"+Bi(this)},be.add=function(a){return a===null?this:(this._isFrozen&&gn(this,a),this.s.push(a),this.xb(),this)},be.push=function(a){this.add(a)},be.addAll=function(a){if(a===null)return this;this._isFrozen&&gn(this);var y=this.s;if(Jt(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},be.clear=function(){this._isFrozen&&gn(this),this.s.length=0,this.xb()},be.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},be.has=function(a){return this.contains(a)},be.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},be.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Rn(a,"0 <= i < length",An,"elt:i"),y[a]},be.get=function(a){return this.M(a)},be.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Rn(a,"0 <= i < length",An,"setElt:i"),this._isFrozen&&gn(this,a),x[a]=y},be.set=function(a,y){this.cd(a,y)},be.first=function(){var a=this.s;return a.length===0?null:a[0]},be.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},be.pop=function(){this._isFrozen&&gn(this);var a=this.s;return 0<a.length?a.pop():null},An.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},An.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},An.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},An.prototype.map=function(a){for(var y=new An,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},An.prototype.filter=function(a){for(var y=new An,x=[],E=this.s,b=E.length,z=0;z<b;z++){var ne=E[z];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},be=An.prototype,be.Gb=function(a,y){0>a&&Rn(a,">= 0",An,"insertAt:i"),this._isFrozen&&gn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},be.remove=function(a){if(a===null)return!1;this._isFrozen&&gn(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)},be.delete=function(a){return this.remove(a)},be.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Rn(a,"0 <= i < length",An,"removeAt:i"),this._isFrozen&&gn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},be.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&&gn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},An.prototype.copy=function(){var a=new An,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},be=An.prototype,be.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},be.Iv=function(){for(var a=new Bn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},be.sort=function(a){return this._isFrozen&&gn(this),this.s.sort(a),this.xb(),this},be.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&gn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Rn(y,"0 <= from < length",An,"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},be.reverse=function(){return this._isFrozen&&gn(this),this.s.reverse(),this.xb(),this},Ve.Object.defineProperties(An.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 ar;var a=this.Sa;return a!==null?(a.reset(),a):new nr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return ar;var a=this.Hg;return a!==null?(a.reset(),a):new hr(this)}}}),An.prototype.reverse=An.prototype.reverse,An.prototype.sortRange=An.prototype.zi,An.prototype.sort=An.prototype.sort,An.prototype.toSet=An.prototype.Iv,An.prototype.toArray=An.prototype.Fa,An.prototype.removeRange=An.prototype.removeRange,An.prototype.removeAt=An.prototype.mb,An.prototype.delete=An.prototype.delete,An.prototype.remove=An.prototype.remove,An.prototype.insertAt=An.prototype.Gb,An.prototype.pop=An.prototype.pop,An.prototype.last=An.prototype.jc,An.prototype.first=An.prototype.first,An.prototype.set=An.prototype.set,An.prototype.setElt=An.prototype.cd,An.prototype.get=An.prototype.get,An.prototype.elt=An.prototype.M,An.prototype.indexOf=An.prototype.indexOf,An.prototype.has=An.prototype.has,An.prototype.contains=An.prototype.contains,An.prototype.clear=An.prototype.clear,An.prototype.addAll=An.prototype.addAll,An.prototype.push=An.prototype.push,An.prototype.add=An.prototype.add,An.prototype.thaw=An.prototype.ka,An.prototype.freeze=An.prototype.freeze,An.className="List";function Jr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Jr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Jr.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)},Jr.prototype.Ad=function(){return this.next()},Jr.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},Jr.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},Jr.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},Jr.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},Jr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new An;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Jr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new An;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Jr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Jr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ve.Object.defineProperties(Jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset,Jr.className="SetIterator";function Bn(a){_r(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}be=Bn.prototype,be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return this._isFrozen=!1,this},be.toString=function(){return"Set()#"+Bi(this)},be.add=function(a){if(a===null)return this;this._isFrozen&&gn(this,a);var y=a;return hn(a)&&(y=co(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Zr(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},be.addAll=function(a){if(a===null)return this;if(this._isFrozen&&gn(this),Jt(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},be.contains=function(a){if(a===null)return!1;var y=a;return hn(a)&&(y=Bi(a),y===void 0)?!1:this.Tb[y]!==void 0},be.has=function(a){return this.contains(a)},be.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},be.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},be.first=function(){var a=this.ea;return a===null?null:a.value},Bn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Bn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Bn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Bn.prototype.map=function(a){for(var y=new Bn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Bn.prototype.filter=function(a){for(var y=new Bn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},be=Bn.prototype,be.remove=function(a){if(a===null)return!1;this._isFrozen&&gn(this,a);var y=a;if(hn(a)&&(y=Bi(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},be.delete=function(a){return this.remove(a)},be.hp=function(a){if(a===null)return this;if(this._isFrozen&&gn(this),Jt(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},be.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&gn(this);var y=new Bn;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},be.clear=function(){this._isFrozen&&gn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Bn.prototype.copy=function(){var a=new Bn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Bn.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},Bn.prototype.Hv=function(){var a=new An,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function _r(a){a.__gohashid=Po++}function co(a){var y=a.__gohashid;return y===void 0&&(y=Po++,a.__gohashid=y),y}function Bi(a){return a.__gohashid}Ve.Object.defineProperties(Bn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return ar;var a=this.Sa;return a!==null?(a.reset(),a):new Jr(this)}}}),Bn.prototype.toList=Bn.prototype.Hv,Bn.prototype.toArray=Bn.prototype.Fa,Bn.prototype.clear=Bn.prototype.clear,Bn.prototype.retainAll=Bn.prototype.pA,Bn.prototype.removeAll=Bn.prototype.hp,Bn.prototype.delete=Bn.prototype.delete,Bn.prototype.remove=Bn.prototype.remove,Bn.prototype.first=Bn.prototype.first,Bn.prototype.containsAny=Bn.prototype.Ty,Bn.prototype.containsAll=Bn.prototype.Sy,Bn.prototype.has=Bn.prototype.has,Bn.prototype.contains=Bn.prototype.contains,Bn.prototype.addAll=Bn.prototype.addAll,Bn.prototype.add=Bn.prototype.add,Bn.prototype.thaw=Bn.prototype.ka,Bn.prototype.freeze=Bn.prototype.freeze;var Po=1;Bn.className="Set",Bn.uniqueHash=_r,Bn.hashIdUnique=co,Bn.hashId=Bi;function ao(a){this.ma=a,this.qa=a.Ja,this.sa=null}ao.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ao.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)},ao.prototype.Ad=function(){return this.next()},ao.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},ao.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},ao.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},ao.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},ao.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new An;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ao.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new An;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},ao.prototype.de=function(){this.value=this.key=null,this.qa=-1},ao.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ve.Object.defineProperties(ao.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ao.prototype.first=ao.prototype.first,ao.prototype.hasNext=ao.prototype.Ad,ao.prototype.next=ao.prototype.next,ao.prototype.reset=ao.prototype.reset,ao.className="MapKeySetIterator";function Ki(a){Bn.call(this),_r(this),this._isFrozen=!0,this.ma=a}Ot(Ki,Bn),be=Ki.prototype,be.freeze=function(){return this},be.ka=function(){return this},be.toString=function(){return"MapKeySet("+this.ma.toString()+")"},be.add=function(){St("This Set is read-only: "+this.toString())},be.contains=function(a){return this.ma.contains(a)},be.has=function(a){return this.contains(a)},be.remove=function(){St("This Set is read-only: "+this.toString())},be.delete=function(a){return this.remove(a)},be.clear=function(){St("This Set is read-only: "+this.toString())},be.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 Bn,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 Bn,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 Bn,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 An,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ve.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?ar:new ao(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 qi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}qi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},qi.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)},qi.prototype.Ad=function(){return this.next()},qi.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},qi.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},qi.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},qi.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},qi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new An;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},qi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new An;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},qi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},qi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ve.Object.defineProperties(qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),qi.prototype.first=qi.prototype.first,qi.prototype.hasNext=qi.prototype.Ad,qi.prototype.next=qi.prototype.next,qi.prototype.reset=qi.prototype.reset,qi.className="MapValueSetIterator";function Zr(a,y){this.key=a,this.value=y,this.ll=this.va=null}Zr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Zr.className="KeyValuePair";function ro(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ro.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},ro.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)},ro.prototype.Ad=function(){return this.next()},ro.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},ro.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},ro.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},ro.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},ro.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new An;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},ro.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new An;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},ro.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},ro.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ve.Object.defineProperties(ro.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ro.prototype.first=ro.prototype.first,ro.prototype.hasNext=ro.prototype.Ad,ro.prototype.next=ro.prototype.next,ro.prototype.reset=ro.prototype.reset,ro.className="MapIterator";function wi(a){_r(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"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}be=wi.prototype,be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return this._isFrozen=!1,this},be.toString=function(){return"Map()#"+Bi(this)},be.add=function(a,y){this._isFrozen&&gn(this,a);var x=a;hn(a)&&(x=co(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Zr(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},be.set=function(a,y){return this.add(a,y)},be.addAll=function(a){if(a===null)return this;if(Jt(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 wi)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},be.first=function(){return this.ea},wi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},wi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},wi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},wi.prototype.map=function(a){for(var y=new wi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},wi.prototype.filter=function(a){for(var y=new wi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},be=wi.prototype,be.contains=function(a){var y=a;return hn(a)&&(y=Bi(a),y===void 0)?!1:this.Tb[y]!==void 0},be.has=function(a){return this.contains(a)},be.I=function(a){var y=a;return hn(a)&&(y=Bi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},be.get=function(a){return this.I(a)},be.remove=function(a){if(a===null)return!1;this._isFrozen&&gn(this,a);var y=a;if(hn(a)&&(y=Bi(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},be.delete=function(a){return this.remove(a)},be.clear=function(){this._isFrozen&&gn(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()},wi.prototype.copy=function(){var a=new wi,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},wi.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 Zr(b.key,b.value),x++}return y},wi.prototype.Lf=function(){return new Ki(this)},Ve.Object.defineProperties(wi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return ar;var a=this.Sa;return a!==null?(a.reset(),a):new ro(this)}},iteratorKeys:{get:function(){return 0>=this.count?ar:new ao(this)}},iteratorValues:{get:function(){if(0>=this.count)return ar;var a=this.jf;return a!==null?(a.reset(),a):new qi(this)}}}),wi.prototype.toKeySet=wi.prototype.Lf,wi.prototype.toArray=wi.prototype.Fa,wi.prototype.clear=wi.prototype.clear,wi.prototype.delete=wi.prototype.delete,wi.prototype.remove=wi.prototype.remove,wi.prototype.get=wi.prototype.get,wi.prototype.getValue=wi.prototype.I,wi.prototype.has=wi.prototype.has,wi.prototype.contains=wi.prototype.contains,wi.prototype.first=wi.prototype.first,wi.prototype.addAll=wi.prototype.addAll,wi.prototype.set=wi.prototype.set,wi.prototype.add=wi.prototype.add,wi.prototype.thaw=wi.prototype.ka,wi.prototype.freeze=wi.prototype.freeze,wi.className="Map";function Qe(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):St("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var uo,Zo,ga,Pa,ia;Qe.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Qe.prototype.h=function(a,y){return this.x=a,this.y=y,this},Qe.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Qe.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Qe.prototype.copy=function(){var a=new Qe;return a.x=this.x,a.y=this.y,a},be=Qe.prototype,be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Dr(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 Qe(x,b)}return new Qe}function kr(a){return a.x.toString()+" "+a.y.toString()}be.toString=function(){return"Point("+this.x+","+this.y+")"},be.D=function(a){return a instanceof Qe?this.x===a.x&&this.y===a.y:!1},be.hi=function(a,y){return this.x===a&&this.y===y},be.Xa=function(a){return tt.B(this.x,a.x)&&tt.B(this.y,a.y)},be.add=function(a){return this.x+=a.x,this.y+=a.y,this},be.re=function(a){return this.x-=a.x,this.y-=a.y,this},be.offset=function(a,y){return this.x+=a,this.y+=y,this},Qe.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},be=Qe.prototype,be.scale=function(a,y){return this.x*=a,this.y*=y,this},be.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},be.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},be.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},be.ab=function(a){return fo(a.x-this.x,a.y-this.y)},be.direction=function(a,y){return fo(a-this.x,y-this.y)};function fo(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}be.Ry=function(a,y){return tt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},be.fA=function(a,y,x,E){return tt.qh(a,y,x,E,this.x,this.y,this),this},be.gA=function(a,y){return tt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},be.uA=function(a,y,x,E){return tt.No(this.x,this.y,a,y,x,E,this),this},be.vA=function(a,y){return tt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},be.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},be.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},be.transform=function(a){return a.Ga(this),this};function Rr(a,y){return y.Cd(a),a}function To(a,y,x,E,b,z){var ne=b-x,re=z-E,oe=ne*ne+re*re;x-=a,E-=y;var le=-x*ne-E*re;return 0>=le||le>=oe?(ne=b-a,re=z-y,Math.min(x*x+E*E,ne*ne+re*re)):(a=ne*E-re*x,a*a/oe)}function qa(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Mr(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)}be.w=function(){return isFinite(this.x)&&isFinite(this.y)},Qe.alloc=function(){var a=sr.pop();return a===void 0?new Qe:a},Qe.allocAt=function(a,y){var x=sr.pop();return x===void 0?new Qe(a,y):(x.x=a,x.y=y,x)},Qe.free=function(a){sr.push(a)},Qe.prototype.isReal=Qe.prototype.w,Qe.prototype.setSpot=Qe.prototype.yi,Qe.prototype.setRectSpot=Qe.prototype.xi,Qe.prototype.snapToGridPoint=Qe.prototype.vA,Qe.prototype.snapToGrid=Qe.prototype.uA,Qe.prototype.projectOntoLineSegmentPoint=Qe.prototype.gA,Qe.prototype.projectOntoLineSegment=Qe.prototype.fA,Qe.intersectingLineSegments=function(a,y,x,E,b,z,ne,re){return tt.Rl(a,y,x,E,b,z,ne,re)},Qe.prototype.compareWithLineSegmentPoint=Qe.prototype.Ry,Qe.compareWithLineSegment=function(a,y,x,E,b,z){return tt.Fl(a,y,x,E,b,z)},Qe.prototype.direction=Qe.prototype.direction,Qe.prototype.directionPoint=Qe.prototype.ab,Qe.prototype.normalize=Qe.prototype.normalize,Qe.prototype.distanceSquared=Qe.prototype.zd,Qe.prototype.distanceSquaredPoint=Qe.prototype.Bf,Qe.prototype.scale=Qe.prototype.scale,Qe.prototype.rotate=Qe.prototype.rotate,Qe.prototype.offset=Qe.prototype.offset,Qe.prototype.subtract=Qe.prototype.re,Qe.prototype.add=Qe.prototype.add,Qe.prototype.equalsApprox=Qe.prototype.Xa,Qe.prototype.equalTo=Qe.prototype.hi,Qe.prototype.equals=Qe.prototype.D,Qe.prototype.set=Qe.prototype.set,Qe.prototype.setTo=Qe.prototype.sg;var sr=[];Qe.className="Point",Qe.parse=Dr,Qe.stringify=kr,Qe.distanceLineSegmentSquared=To,Qe.distanceSquared=qa,Qe.direction=Mr,Qe.Origin=uo=new Qe(0,0).ja(),Qe.InfiniteTopLeft=Zo=new Qe(-1/0,-1/0).ja(),Qe.InfiniteBottomRight=ga=new Qe(1/0,1/0).ja(),Qe.SixPoint=Pa=new Qe(6,6).ja(),Qe.NoPoint=ia=new Qe(NaN,NaN).ja(),Qe.parse=Dr,Qe.stringify=kr,Qe.distanceLineSegmentSquared=To,Qe.distanceSquared=qa,Qe.direction=Mr;function qn(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):St("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var vr,wo,ua,Bo,yo,ta,na;qn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},qn.prototype.h=function(a,y){return this.width=a,this.height=y,this},qn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},qn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},qn.prototype.copy=function(){var a=new qn;return a.width=this.width,a.height=this.height,a},be=qn.prototype,be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ba(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 qn(x,b)}return new qn}function ka(a){return a.width.toString()+" "+a.height.toString()}be.toString=function(){return"Size("+this.width+","+this.height+")"},be.D=function(a){return a instanceof qn?this.width===a.width&&this.height===a.height:!1},be.hi=function(a,y){return this.width===a&&this.height===y},be.Xa=function(a){return tt.B(this.width,a.width)&&tt.B(this.height,a.height)},be.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},be.w=function(){return isFinite(this.width)&&isFinite(this.height)},qn.alloc=function(){var a=is.pop();return a===void 0?new qn:a},qn.free=function(a){is.push(a)},qn.prototype.isReal=qn.prototype.w,qn.prototype.inflate=qn.prototype.Bc,qn.prototype.equalsApprox=qn.prototype.Xa,qn.prototype.equalTo=qn.prototype.hi,qn.prototype.equals=qn.prototype.D,qn.prototype.set=qn.prototype.set,qn.prototype.setTo=qn.prototype.sg;var is=[];qn.className="Size",qn.parse=Ba,qn.stringify=ka,qn.ZeroSize=vr=new qn(0,0).ja(),qn.OneSize=wo=new qn(1,1).ja(),qn.SixSize=ua=new qn(6,6).ja(),qn.EightSize=Bo=new qn(8,8).ja(),qn.TenSize=yo=new qn(10,10).ja(),qn.InfiniteSize=ta=new qn(1/0,1/0).ja(),qn.NoSize=na=new qn(NaN,NaN).ja(),qn.parse=Ba,qn.stringify=ka;function vn(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 Qe?(x=a.x,a=a.y,y instanceof Qe?(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 qn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):St("Incorrect second argument supplied to Rect constructor "+y)):St("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}be=vn.prototype,be.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},be.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Oa(a,y,x){a.width=y,a.height=x}be.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},be.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},be.dd=function(a){return this.x=a.x,this.y=a.y,this},be.tA=function(a){return this.width=a.width,this.height=a.height,this},vn.prototype.copy=function(){var a=new vn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},be=vn.prototype,be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Vl(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 ne=0;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),new vn(x,b,z,ne)}return new vn}function Hs(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}be.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},be.D=function(a){return a instanceof vn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},be.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},be.Xa=function(a){return tt.B(this.x,a.x)&&tt.B(this.y,a.y)&&tt.B(this.width,a.width)&&tt.B(this.height,a.height)};function wl(a,y){return tt.$(a.x,y.x)&&tt.$(a.y,y.y)&&tt.$(a.width,y.width)&&tt.$(a.height,y.height)}be.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},be.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},be.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},be.offset=function(a,y){return this.x+=a,this.y+=y,this},be.Bc=function(a,y){return Ma(this,y,a,y,a)},be.Co=function(a){return Ma(this,a.top,a.right,a.bottom,a.left)},be.Fv=function(a){return Ma(this,-a.top,-a.right,-a.bottom,-a.left)},be.Hz=function(a,y,x,E){return Ma(this,a,y,x,E)};function Ma(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}be.Ex=function(a){return yu(this,a.x,a.y,a.width,a.height)},be.Uu=function(a,y,x,E){return yu(this,a,y,x,E)};function yu(a,y,x,E,b){var z=Math.max(a.x,y),ne=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=ne,a.width=Math.max(0,y-z),a.height=Math.max(0,x-ne),a}be.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},be.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 Cl(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))}be.Ye=function(a){return ma(this,a.x,a.y,0,0)},be.ed=function(a){return ma(this,a.x,a.y,a.width,a.height)},be.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),ma(this,a,y,x,E)};function ma(a,y,x,E,b){var z=Math.min(a.x,y),ne=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=ne,a.width=y-z,a.height=x-ne,a}be.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 Fo(a,y,x,E,b,z,ne,re){return ne===void 0&&(ne=0),re===void 0&&(re=0),a<=b&&b+ne<=a+x&&y<=z&&z+re<=y+E}function Ul(a,y,x,E,b,z,ne,re){return a>ne+b||b>x+a?!1:!(y>re+z||z>E+y)}be.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},be.Mz=function(){return this.width===0&&this.height===0},vn.alloc=function(){var a=So.pop();return a===void 0?new vn:a},vn.allocAt=function(a,y,x,E){var b=So.pop();return b===void 0?new vn(a,y,x,E):b.h(a,y,x,E)},vn.free=function(a){So.push(a)},Ve.Object.defineProperties(vn.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 Qe(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new qn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Qe(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}}}),vn.prototype.isEmpty=vn.prototype.Mz,vn.prototype.isReal=vn.prototype.w,vn.intersectsLineSegment=function(a,y,x,E,b,z,ne,re){return tt.Fx(a,y,x,E,b,z,ne,re)},vn.prototype.setSpot=vn.prototype.yi,vn.prototype.union=vn.prototype.Kv,vn.prototype.unionRect=vn.prototype.ed,vn.prototype.unionPoint=vn.prototype.Ye,vn.prototype.intersects=vn.prototype.Vu,vn.prototype.intersectsRect=vn.prototype.Yc,vn.prototype.intersect=vn.prototype.Uu,vn.prototype.intersectRect=vn.prototype.Ex,vn.prototype.grow=vn.prototype.Hz,vn.prototype.subtractMargin=vn.prototype.Fv,vn.prototype.addMargin=vn.prototype.Co,vn.prototype.inflate=vn.prototype.Bc,vn.prototype.offset=vn.prototype.offset,vn.prototype.contains=vn.prototype.contains,vn.prototype.containsRect=vn.prototype.Re,vn.prototype.containsPoint=vn.prototype.ca,vn.prototype.equalsApprox=vn.prototype.Xa,vn.prototype.equalTo=vn.prototype.hi,vn.prototype.equals=vn.prototype.D,vn.prototype.setSize=vn.prototype.tA,vn.prototype.setPoint=vn.prototype.dd,vn.prototype.set=vn.prototype.set,vn.prototype.setTo=vn.prototype.sg;var $r=null,Ko=null,So=[];vn.className="Rect",vn.parse=Vl,vn.stringify=Hs,vn.contains=Fo,vn.intersects=Ul,vn.ZeroRect=$r=new vn(0,0,0,0).ja(),vn.NoRect=Ko=new vn(NaN,NaN,NaN,NaN).ja(),vn.parse=Vl,vn.stringify=Hs,vn.contains=Fo,vn.intersects=Ul;function Ti(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):St("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ti.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ti.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Ti.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ti.prototype.copy=function(){var a=new Ti;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},be=Ti.prototype,be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Wa(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 Ti;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Ti(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Ti(x,b);for(var ne=NaN;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),isNaN(ne)?new Ti(x,b):new Ti(x,b,z,ne)}return new Ti}function $a(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}be.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},be.D=function(a){return a instanceof Ti?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},be.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},be.Xa=function(a){return tt.B(this.top,a.top)&&tt.B(this.right,a.right)&&tt.B(this.bottom,a.bottom)&&tt.B(this.left,a.left)},be.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ti.alloc=function(){var a=Dl.pop();return a===void 0?new Ti:a},Ti.free=function(a){Dl.push(a)},Ti.prototype.isReal=Ti.prototype.w,Ti.prototype.equalsApprox=Ti.prototype.Xa,Ti.prototype.equalTo=Ti.prototype.hi,Ti.prototype.equals=Ti.prototype.D,Ti.prototype.set=Ti.prototype.set,Ti.prototype.setTo=Ti.prototype.sg;var bs=null,El=null,Dl=[];Ti.className="Margin",Ti.parse=Wa,Ti.stringify=$a,Ti.ZeroMargin=bs=new Ti(0,0,0,0).ja(),Ti.TwoMargin=El=new Ti(2,2,2,2).ja(),Ti.parse=Wa,Ti.stringify=$a;function bi(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 Fa,cs,bl,Ol,Il,Qr,Ju,nl,vs,ys,Su,Iu,Ys,ul,Mh,uc,Lh,hc,Fh,Ru,Qu,Rl,Hh,qu,eh,Co,Uo,Gs,ds,es,Aa,za,rs,Ka,Ws,$s;bi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},bi.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},bi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},bi.prototype.copy=function(){var a=new bi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},be=bi.prototype,be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function va(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function rd(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Fa;if(a==="TopLeft")return cs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return bl;if(a==="TopRight")return Ol;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Il;if(a==="Center")return Qr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Ju;if(a==="BottomLeft")return nl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return vs;if(a==="BottomRight")return ys;if(a==="TopSide")return Su;if(a==="LeftSide")return Iu;if(a==="RightSide")return Ys;if(a==="BottomSide")return ul;if(a==="TopBottomSides")return Mh;if(a==="LeftRightSides")return uc;if(a==="TopLeftSides")return Lh;if(a==="TopRightSides")return hc;if(a==="BottomLeftSides")return Fh;if(a==="BottomRightSides")return Ru;if(a==="NotTopSide")return Qu;if(a==="NotLeftSide")return Rl;if(a==="NotRightSide")return Hh;if(a==="NotBottomSide")return qu;if(a==="AllSides")return eh;if(a==="Default")return Co;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 ne=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(ne=parseFloat(E)),new bi(x,b,z,ne)}return new bi}function Mc(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}be.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(Fa)?"None":this.D(cs)?"TopLeft":this.D(bl)?"Top":this.D(Ol)?"TopRight":this.D(Il)?"Left":this.D(Qr)?"Center":this.D(Ju)?"Right":this.D(nl)?"BottomLeft":this.D(vs)?"Bottom":this.D(ys)?"BottomRight":this.D(Su)?"TopSide":this.D(Iu)?"LeftSide":this.D(Ys)?"RightSide":this.D(ul)?"BottomSide":this.D(Mh)?"TopBottomSides":this.D(uc)?"LeftRightSides":this.D(Lh)?"TopLeftSides":this.D(hc)?"TopRightSides":this.D(Fh)?"BottomLeftSides":this.D(Ru)?"BottomRightSides":this.D(Qu)?"NotTopSide":this.D(Rl)?"NotLeftSide":this.D(Hh)?"NotRightSide":this.D(qu)?"NotBottomSide":this.D(eh)?"AllSides":this.D(Co)?"Default":"None"},be.D=function(a){return a instanceof bi?(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},be.gv=function(){return new bi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},be.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Uo))a=Iu;else if(a.D(Gs))a=Ys;else if(a.D(ds))a=Su;else if(a.D(es))a=ul;else return!1;return a=a.offsetY,(this.offsetY&a)===a},be.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},be.Mc=function(){return isNaN(this.x)||isNaN(this.y)},be.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},be.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},be.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},bi.alloc=function(){var a=Vt.pop();return a===void 0?new bi:a},bi.free=function(a){Vt.push(a)},bi.prototype.isDefault=bi.prototype.Xb,bi.prototype.isNone=bi.prototype.ys,bi.prototype.isSide=bi.prototype.$c,bi.prototype.isNoSpot=bi.prototype.Mc,bi.prototype.isSpot=bi.prototype.sb,bi.prototype.includesSide=bi.prototype.Hf,bi.prototype.opposite=bi.prototype.gv,bi.prototype.equals=bi.prototype.D,bi.prototype.set=bi.prototype.set,bi.prototype.setTo=bi.prototype.sg;var Vt=[];bi.className="Spot",bi.parse=rd,bi.stringify=Mc,bi.None=Fa=va(new bi(0,0,0,0),0).ja(),bi.Default=Co=va(new bi(0,0,-1,0),-1).ja(),bi.TopLeft=cs=new bi(0,0,0,0).ja(),bi.TopCenter=bl=new bi(.5,0,0,0).ja(),bi.TopRight=Ol=new bi(1,0,0,0).ja(),bi.LeftCenter=Il=new bi(0,.5,0,0).ja(),bi.Center=Qr=new bi(.5,.5,0,0).ja(),bi.RightCenter=Ju=new bi(1,.5,0,0).ja(),bi.BottomLeft=nl=new bi(0,1,0,0).ja(),bi.BottomCenter=vs=new bi(.5,1,0,0).ja(),bi.BottomRight=ys=new bi(1,1,0,0).ja(),bi.MiddleTop=Aa=bl,bi.MiddleLeft=za=Il,bi.MiddleRight=rs=Ju,bi.MiddleBottom=Ka=vs,bi.Top=ds=bl,bi.Left=Uo=Il,bi.Right=Gs=Ju,bi.Bottom=es=vs,bi.TopSide=Su=va(new bi(0,0,1,1),1).ja(),bi.LeftSide=Iu=va(new bi(0,0,1,2),1).ja(),bi.RightSide=Ys=va(new bi(0,0,1,4),1).ja(),bi.BottomSide=ul=va(new bi(0,0,1,8),1).ja(),bi.TopBottomSides=Mh=va(new bi(0,0,1,9),1).ja(),bi.LeftRightSides=uc=va(new bi(0,0,1,6),1).ja(),bi.TopLeftSides=Lh=va(new bi(0,0,1,3),1).ja(),bi.TopRightSides=hc=va(new bi(0,0,1,5),1).ja(),bi.BottomLeftSides=Fh=va(new bi(0,0,1,10),1).ja(),bi.BottomRightSides=Ru=va(new bi(0,0,1,12),1).ja(),bi.NotTopSide=Qu=va(new bi(0,0,1,14),1).ja(),bi.NotLeftSide=Rl=va(new bi(0,0,1,13),1).ja(),bi.NotRightSide=Hh=va(new bi(0,0,1,11),1).ja(),bi.NotBottomSide=qu=va(new bi(0,0,1,7),1).ja(),bi.AllSides=eh=va(new bi(0,0,1,15),1).ja(),Ws=new bi(.156,.156).ja(),$s=new bi(.844,.844).ja(),bi.parse=rd,bi.stringify=Mc;function Ht(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Ht.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},Ht.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},Ht.prototype.copy=function(){var a=new Ht;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},Ht.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Ht.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},Ht.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Ht.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Ht.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},Ht.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,ne=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*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Ht.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},Ht.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,ne=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=ne,this.translate(-y,-x),this},be=Ht.prototype,be.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},be.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},be.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)},be.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))},be.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))},be.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,ne=this.m12,re=this.m21,oe=this.m22,le=this.dx,ue=this.dy,pe=y*z+x*re+le,Pe=y*ne+x*oe+ue,Ce=E*z+x*re+le,Le=E*ne+x*oe+ue;return x=y*z+b*re+le,y=y*ne+b*oe+ue,z=E*z+b*re+le,E=E*ne+b*oe+ue,b=Math.min(pe,Ce),pe=Math.max(pe,Ce),Ce=Math.min(Pe,Le),Pe=Math.max(Pe,Le),b=Math.min(b,x),pe=Math.max(pe,x),Ce=Math.min(Ce,y),Pe=Math.max(Pe,y),b=Math.min(b,z),pe=Math.max(pe,z),Ce=Math.min(Ce,E),Pe=Math.max(Pe,E),a.h(b,Ce,pe-b,Pe-Ce),a},Ht.alloc=function(){var a=Sn.pop();return a===void 0?new Ht:a},Ht.free=function(a){Sn.push(a)},Ht.prototype.transformRect=Ht.prototype.pp,Ht.prototype.transformPoint=Ht.prototype.Ga,Ht.prototype.scale=Ht.prototype.scale,Ht.prototype.translate=Ht.prototype.translate,Ht.prototype.rotate=Ht.prototype.rotate,Ht.prototype.invert=Ht.prototype.Vj,Ht.prototype.multiplyInverted=Ht.prototype.bv,Ht.prototype.multiply=Ht.prototype.multiply,Ht.prototype.reset=Ht.prototype.reset,Ht.prototype.isIdentity=Ht.prototype.ws,Ht.prototype.equals=Ht.prototype.D,Ht.prototype.setTransform=Ht.prototype.setTransform,Ht.prototype.set=Ht.prototype.set;var Sn=[];Ht.className="Transform",Ht.xF="54a702f3e53909c447824c6706603faf4c";var tt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=tt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);tt.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,ne){if(0>=b&&(b=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<E)var le=y,ue=E;else le=E,ue=y;if(a===x)return le<=ne&&ne<=ue&&a-b<=z&&z<=a+b;if(y===E)return re<=z&&z<=oe&&y-b<=ne&&ne<=y+b;if(oe+=b,re-=b,re<=z&&z<=oe&&(ue+=b,le-=b,le<=ne&&ne<=ue))if(oe-re>ue-le)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=ne&&ne<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(ne=(x-a)/(E-y)*(ne-y)+a,ne-b<=z&&z<=ne+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe){if(tt.Yb(a,y,ne,re,pe,x,E)&&tt.Yb(a,y,ne,re,pe,b,z))return tt.Yb(a,y,ne,re,pe,le,ue);var Pe=(a+x)/2,Ce=(y+E)/2,Le=(x+b)/2,Oe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Pe+Le)/2,x=(Ce+Oe)/2,Le=(Le+b)/2,Oe=(Oe+z)/2;var rt=(E+Le)/2,Ye=(x+Oe)/2;return tt.cs(a,y,Pe,Ce,E,x,rt,Ye,oe,le,ue,pe)||tt.cs(rt,Ye,Le,Oe,b,z,ne,re,oe,le,ue,pe)},ax:function(a,y,x,E,b,z,ne,re,oe){var le=(x+b)/2,ue=(E+z)/2;return oe.h((((a+x)/2+le)/2+(le+(b+ne)/2)/2)/2,(((y+E)/2+ue)/2+(ue+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ne,re){var oe=(x+b)/2,le=(E+z)/2;return Mr(((a+x)/2+oe)/2,((y+E)/2+le)/2,(oe+(b+ne)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ne,re,oe,le){if(tt.Yb(a,y,ne,re,oe,x,E)&&tt.Yb(a,y,ne,re,oe,b,z))ma(le,a,y,0,0),ma(le,ne,re,0,0);else{var ue=(a+x)/2,pe=(y+E)/2,Pe=(x+b)/2,Ce=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ue+Pe)/2,x=(pe+Ce)/2,Pe=(Pe+b)/2,Ce=(Ce+z)/2;var Le=(E+Pe)/2,Oe=(x+Ce)/2;tt.Dl(a,y,ue,pe,E,x,Le,Oe,oe,le),tt.Dl(Le,Oe,Pe,Ce,b,z,ne,re,oe,le)}return le},Qe:function(a,y,x,E,b,z,ne,re,oe,le){if(tt.Yb(a,y,ne,re,oe,x,E)&&tt.Yb(a,y,ne,re,oe,b,z))le.length===0&&(le.push(a),le.push(y)),le.push(ne),le.push(re);else{var ue=(a+x)/2,pe=(y+E)/2,Pe=(x+b)/2,Ce=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ue+Pe)/2,x=(pe+Ce)/2,Pe=(Pe+b)/2,Ce=(Ce+z)/2;var Le=(E+Pe)/2,Oe=(x+Ce)/2;tt.Qe(a,y,ue,pe,E,x,Le,Oe,oe,le),tt.Qe(Le,Oe,Pe,Ce,b,z,ne,re,oe,le)}return le},jv:function(a,y,x,E,b,z,ne,re,oe,le){if(tt.Yb(a,y,b,z,le,x,E))return tt.Yb(a,y,b,z,le,re,oe);var ue=(a+x)/2,pe=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var Pe=(ue+x)/2,Ce=(pe+E)/2;return tt.jv(a,y,ue,pe,Pe,Ce,ne,re,oe,le)||tt.jv(Pe,Ce,x,E,b,z,ne,re,oe,le)},OA:function(a,y,x,E,b,z,ne){return ne.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),ne},iv:function(a,y,x,E,b,z,ne,re){if(tt.Yb(a,y,b,z,ne,x,E))ma(re,a,y,0,0),ma(re,b,z,0,0);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ue=(oe+x)/2,pe=(le+E)/2;tt.iv(a,y,oe,le,ue,pe,ne,re),tt.iv(ue,pe,x,E,b,z,ne,re)}return re},ep:function(a,y,x,E,b,z,ne,re){if(tt.Yb(a,y,b,z,ne,x,E))re.length===0&&(re.push(a),re.push(y)),re.push(b),re.push(z);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ue=(oe+x)/2,pe=(le+E)/2;tt.ep(a,y,oe,le,ue,pe,ne,re),tt.ep(ue,pe,x,E,b,z,ne,re)}return re},Eo:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe,Pe,Ce){if(tt.Yb(a,y,ne,re,Pe,x,E)&&tt.Yb(a,y,ne,re,Pe,b,z))return!tt.Rl(a,y,ne,re,oe,le,ue,pe)||(Pe=(a-ne)*(le-pe)-(y-re)*(oe-ue),Pe===0)?!1:(Ce.h(((a*re-y*ne)*(oe-ue)-(a-ne)*(oe*pe-le*ue))/Pe,((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ue))/Pe),!0);var Le=(a+x)/2,Oe=(y+E)/2,rt=(x+b)/2,Ye=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Le+rt)/2,x=(Oe+Ye)/2,rt=(rt+b)/2,Ye=(Ye+z)/2;var vt=(E+rt)/2,Pt=(x+Ye)/2,Ct=1/0,It=!1,rn=0,ri=0;return tt.Eo(a,y,Le,Oe,E,x,vt,Pt,oe,le,ue,pe,Pe,Ce)&&(a=(Ce.x-oe)*(Ce.x-oe)+(Ce.y-le)*(Ce.y-le),a<Ct&&(Ct=a,It=!0,rn=Ce.x,ri=Ce.y)),tt.Eo(vt,Pt,rt,Ye,b,z,ne,re,oe,le,ue,pe,Pe,Ce)&&(Ce.x-oe)*(Ce.x-oe)+(Ce.y-le)*(Ce.y-le)<Ct&&(It=!0,rn=Ce.x,ri=Ce.y),It&&(Ce.x=rn,Ce.y=ri),It},Fo:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe,Pe){var Ce=0;if(tt.Yb(a,y,ne,re,Pe,x,E)&&tt.Yb(a,y,ne,re,Pe,b,z)){if(Pe=(a-ne)*(le-pe)-(y-re)*(oe-ue),Pe===0)return Ce;var Le=((a*re-y*ne)*(oe-ue)-(a-ne)*(oe*pe-le*ue))/Pe,Oe=((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ue))/Pe;if(Le>=ue)return Ce;if((oe>ue?oe-ue:ue-oe)<(le>pe?le-pe:pe-le)){if(y<re?(oe=y,a=re):(oe=re,a=y),Oe<oe||Oe>a)return Ce}else if(a<ne?(oe=a,a=ne):oe=ne,Le<oe||Le>a)return Ce;0<Pe?Ce++:0>Pe&&Ce--}else{Le=(a+x)/2,Oe=(y+E)/2;var rt=(x+b)/2,Ye=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Le+rt)/2,x=(Oe+Ye)/2,rt=(rt+b)/2,Ye=(Ye+z)/2;var vt=(E+rt)/2,Pt=(x+Ye)/2;Ce+=tt.Fo(a,y,Le,Oe,E,x,vt,Pt,oe,le,ue,pe,Pe),Ce+=tt.Fo(vt,Pt,rt,Ye,b,z,ne,re,oe,le,ue,pe,Pe)}return Ce},qh:function(a,y,x,E,b,z,ne){return tt.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(ne.h(a,x),!1):z>y?(ne.h(a,y),!1):(ne.h(a,z),!0)):tt.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(ne.h(E,y),!1):b>a?(ne.h(a,y),!1):(ne.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(ne.h(a,y),!1):1.000005<b?(ne.h(x,E),!1):(ne.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,ne,re,oe){return tt.B(a,x)&&tt.B(y,E)?(oe.h(a,y),!1):tt.$(b,ne)?tt.$(a,x)?(tt.qh(a,y,x,E,b,z,oe),!1):tt.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ne-b),tt.$(a,x)?(x=re*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(oe.h(a,b),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(ne=(E-y)/(x-a),tt.$(re,ne)?(tt.qh(a,y,x,E,b,z,oe),!1):(b=(ne*a-re*b+z-y)/(ne-re),tt.$(ne,0)?(a<x?(E=a,a=x):E=x,b<E?(oe.h(E,y),!1):b>a?(oe.h(a,y),!1):(oe.h(b,y),!0)):tt.qh(a,y,x,E,b,ne*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return tt.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,ne,re,oe,le){function ue(rt,Ye){var vt=(rt-a)*(rt-a)+(Ye-y)*(Ye-y);vt<pe&&(pe=vt,oe.h(rt,Ye))}var pe=1/0;ue(oe.x,oe.y);var Pe=0,Ce=0,Le=0,Oe=0;if(b<ne?(Pe=b,Ce=ne):(Pe=ne,Ce=b),z<re?(Le=b,Oe=ne):(Le=ne,Oe=b),Pe=(Ce-Pe)/2+le,le=(Oe-Le)/2+le,b=(b+ne)/2,z=(z+re)/2,Pe===0||le===0)return oe;if(.5>(x>a?x-a:a-x)){if(Pe=1-(x-b)*(x-b)/(Pe*Pe),0>Pe)return oe;Pe=Math.sqrt(Pe),E=-le*Pe+z,ue(x,le*Pe+z),ue(x,E)}else{if(x=(E-y)/(x-a),E=1/(Pe*Pe)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*b/(Pe*Pe),Pe=re*re-4*E*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+b*b/(Pe*Pe)-1+(y-x*a)*(y-x*a)/(le*le)),0>Pe)return oe;Pe=Math.sqrt(Pe),le=(-re+Pe)/(2*E),ue(le,x*le-x*a+y),Pe=(-re-Pe)/(2*E),ue(Pe,x*Pe-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ne,re,oe){var le=1e21,ue=a,pe=y;if(tt.Ve(a,y,a,E,b,z,ne,re,oe)){var Pe=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);Pe<le&&(le=Pe,ue=oe.x,pe=oe.y)}return tt.Ve(x,y,x,E,b,z,ne,re,oe)&&(Pe=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),Pe<le&&(le=Pe,ue=oe.x,pe=oe.y)),tt.Ve(a,y,x,y,b,z,ne,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<le&&(le=y,ue=oe.x,pe=oe.y)),tt.Ve(a,E,x,E,b,z,ne,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<le&&(le=a,ue=oe.x,pe=oe.y)),oe.h(ue,pe),1e21>le},us:function(a,y,x){return tt.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,ne,re){var oe=a+x,le=y+E;return b===ne?(z<re?(ne=z,z=re):ne=re,a<=b&&b<=oe&&ne<=le&&z>=y):z===re?(b<ne?(re=b,b=ne):re=ne,y<=z&&z<=le&&re<=oe&&b>=a):!!(Fo(a,y,x,E,b,z)||Fo(a,y,x,E,ne,re)||tt.Rl(a,y,oe,y,b,z,ne,re)||tt.Rl(oe,y,oe,le,b,z,ne,re)||tt.Rl(oe,le,a,le,b,z,ne,re)||tt.Rl(a,le,a,y,b,z,ne,re))},Rl:function(a,y,x,E,b,z,ne,re){return a===x&&y===E&&b===ne&&z===re?a===b&&y===z:0>=tt.Fl(a,y,x,E,b,z)*tt.Fl(a,y,x,E,ne,re)&&0>=tt.Fl(b,z,ne,re,a,y)*tt.Fl(b,z,ne,re,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 ne=Math.PI;z||(E*=ne/180,b*=ne/180);var re=E>b?-1:1;z=[];var oe=ne/2,le=E;if(E=Math.min(2*ne,Math.abs(b-E)),1e-5>E)return oe=le+re*Math.min(E,oe),re=a+x*Math.cos(le),le=y+x*Math.sin(le),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(le+y)/2,z.push([re,le,x,oe,x,oe,a,y]),z;for(;1e-5<E;)b=le+re*Math.min(E,oe),z.push(tt.Vy(x,le,b,a,y)),E-=Math.abs(b-le),le=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,ne=a*Math.cos(z),re=a*Math.sin(z),oe=-re,le=ne*ne+oe*oe,ue=le+ne*ne+oe*re;return le=4/3*(Math.sqrt(2*le*ue)-ue)/(ne*re-oe*ne),re=ne-le*oe,ne=oe+le*ne,oe=-ne,le=z+y,z=Math.cos(le),le=Math.sin(le),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ne*le,b+re*le+ne*z,E+re*z-oe*le,b+re*le+oe*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,ne){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var re=x;return x+b-a<b/2&&(re=x+b),a=E,E+z-y<z/2&&(a=E+z),ne.h(re,a),ne},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 ne=1,re=0;else ne=0,re=1;var oe=ne===0?a:y,le=ne===0?x:E;return(ne===0?b:z)&&(le=-le),ne=re,x=ne===0?x:E,(ne===0?b:z)&&(x=-x),tt.az(oe,ne===0?a:y,le,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 ne=y*E,re=-z+ne,oe=-z+Math.sqrt(a*a+ne*ne);y=re;for(var le=0;9999999999>le&&(y=.5*(re+oe),!(y===re||y===oe));++le){var ue=a/(y+b),pe=ne/(y+z);if(ue=ue*ue+pe*pe-1,0<ue)re=y;else if(0>ue)oe=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 zi,um:new zi,Mf:new zi,Nf:0,vm:100};tt.za=tt.AA;function Pn(a){_r(this),this.l=2,a===void 0&&(a=Pn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Pn.o?this.ee=new An:(Pn.V===null&&(Pn.V=new An().freeze()),this.ee=Pn.V),this.aq=this.ee.Ja,this.Ip=new vn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=cs,this.gg=ys,this.Rk=this.Sk=NaN,this.Uf=Zn}Pn.prototype.copy=function(){var a=new Pn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===Pn.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},Pn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Pn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Pn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},Pn.prototype.ka=function(){if(Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Pn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Pn.prototype.Xa=function(a){if(!(a instanceof Pn))return!1;if(this.type!==a.type)return this.type===Pn.j&&a.type===Pn.o?jr(this,a):a.type===Pn.j&&this.type===Pn.o?jr(a,this):!1;if(this.type===Pn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return tt.B(this.startX,a.startX)&&tt.B(this.startY,a.startY)&&tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)};function jr(a,y){return a.type!==Pn.j||y.type!==Pn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&tt.B(a.startX,y.startX)&&tt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ir&&tt.B(a.endX,y.endX)&&tt.B(a.endY,y.endY))))}Pn.ia=function(a){return a.toString()},Pn.prototype.qb=function(a){a.classType===Pn&&(this.type=a)},Pn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Pn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case Pn.u:var y=new vn(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case Pn.F:if(y=new vn(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case Pn.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},Pn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},Pn.parse=function(a,y){function x(){return Oe>=Ct-1?!0:le[Oe+1].match(It)!==null}function E(){return Oe++,le[Oe]}function b(ur){var Ji=parseFloat(E()),vo=parseFloat(E());rt===rt.toLowerCase()&&(Ji=Pt.x+Ji,vo=Pt.y+vo),ur.h(Ji,vo)}function z(){return b(Pt),Pt}function ne(){return b(vt),vt}function re(){var ur=Ye.toLowerCase();return ur!=="c"&&ur!=="s"&&ur!=="q"&&ur!=="t"?Pt:new Qe(2*Pt.x-vt.x,2*Pt.y-vt.y)}y===void 0&&(y=!1);var oe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(oe,"$1 $2"),a=a.replace(oe,"$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 le=a.split(" ");for(a=0;a<le.length;a++){var ue=le[a];if(ue.match(/(\.[0-9]*)(\.)/gm)!==null){oe=Qn();for(var pe="",Pe=!1,Ce=0;Ce<ue.length;Ce++){var Le=ue[Ce];Le!=="."||Pe?Le==="."?(oe.push(pe),pe="."):pe+=Le:(Pe=!0,pe+=Le)}for(oe.push(pe),le.splice(a,1),ue=0;ue<oe.length;ue++)le.splice(a+ue,0,oe[ue]);a+=oe.length-1,di(oe)}}var Oe=-1,rt="",Ye="";oe=new Qe(0,0);var vt=new Qe(0,0),Pt=new Qe(0,0),Ct=le.length;a=B1(null),Pe=pe=ue=!1,Ce=!0,Le=null;for(var It=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Oe>=Ct-1);)if(Ye=rt,rt=E(),rt!=="")switch(rt.toUpperCase()){case"X":Ce=!0,pe=ue=!1;break;case"M":for(Le=z(),a.mc===null||Ce===!0?(yg(a,Le.x,Le.y,ue,!pe,Pe),Ce=!1):a.moveTo(Le.x,Le.y),oe.assign(Pt);!x();)Le=z(),a.lineTo(Le.x,Le.y);break;case"L":for(;!x();)Le=z(),a.lineTo(Le.x,Le.y);break;case"H":for(;!x();)Pt=new Qe((rt===rt.toLowerCase()?Pt.x:0)+parseFloat(E()),Pt.y),a.lineTo(Pt.x,Pt.y);break;case"V":for(;!x();)Pt=new Qe(Pt.x,(rt===rt.toLowerCase()?Pt.y:0)+parseFloat(E())),a.lineTo(Pt.x,Pt.y);break;case"C":for(;!x();){Le=new Qe,b(Le);var rn=ne(),ri=z();_c(a,Le.x,Le.y,rn.x,rn.y,ri.x,ri.y)}break;case"S":for(;!x();)Le=re(),rn=ne(),ri=z(),_c(a,Le.x,Le.y,rn.x,rn.y,ri.x,ri.y);break;case"Q":for(;!x();)Le=ne(),rn=z(),Zm(a,Le.x,Le.y,rn.x,rn.y);break;case"T":for(;!x();)vt=Le=re(),rn=z(),Zm(a,Le.x,Le.y,rn.x,rn.y);break;case"B":for(;!x();){Le=parseFloat(E()),rn=parseFloat(E()),ri=parseFloat(E());var Pi=parseFloat(E()),fi=parseFloat(E()),$n=fi,In=!1;x()||($n=parseFloat(E()),x()||(In=parseFloat(E())!==0)),rt===rt.toLowerCase()&&(ri+=Pt.x,Pi+=Pt.y),a.arcTo(Le,rn,ri,Pi,fi,$n,In)}break;case"A":for(;!x();)Le=Math.abs(parseFloat(E())),rn=Math.abs(parseFloat(E())),ri=parseFloat(E()),fi=Pi=!1,In=$n=0,$n=E(),$n.length===1?(Pi=!!parseFloat($n),fi=!!parseFloat(E()),$n=parseFloat(E())):$n.length===2?(Pi=!!parseFloat($n[0]),fi=!!parseFloat($n[1]),$n=parseFloat(E())):(Pi=!!parseFloat($n[0]),fi=!!parseFloat($n[1]),$n=parseFloat($n.slice(2))),In=parseFloat(E()),rt===rt.toLowerCase()&&($n=Pt.x+$n,In=Pt.y+In),Pt.h($n,In),wx(a,Le,rn,ri,Pi,fi,$n,In);break;case"Z":Px(a),Pt.assign(oe);break;case"F":for(Le="",rn=1;le[Oe+rn];)if(le[Oe+rn]==="0")Pe=!0,rn++;else if(le[Oe+rn].match(/[Uu]/)!==null)rn++;else if(le[Oe+rn].match(It)===null)rn++;else{Le=le[Oe+rn];break}Le.match(/[Mm]/)?ue=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Le="",rn=1;le[Oe+rn];)if(le[Oe+rn].match(/[Ff]/)!==null)rn++;else if(le[Oe+rn].match(It)===null)rn++;else{Le=le[Oe+rn];break}Le.match(/[Mm]/)?pe=!0:a.mc.isShadowed=!1}if(oe=a.os,Hm=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},Pn.Ha=function(a,y){for(var x=a.length,E=Qe.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}Qe.free(E)},Pn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Pn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},Pn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Pn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var ne=E[z];ne._isInvalidBounds=!1,ne.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),No(this,a,!1),ma(a,0,0,0,0),a.freeze()},Pn.prototype.ix=function(){var a=new vn;return No(this,a,!0),a};function No(a,y,x){switch(a.type){case Pn.j:case Pn.u:case Pn.F:x?y.h(a.od,a.pd,0,0):ma(y,a.od,a.pd,0,0),ma(y,a.Dc,a.Ec,0,0);break;case Pn.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):ma(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,le=z.startY,ue=0;ue<re;ue++){var pe=ne[ue];switch(pe.type){case ir:case Ar:oe=pe.endX,le=pe.endY,ma(y,oe,le,0,0);break;case wr:tt.Dl(oe,le,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case Lo:tt.iv(oe,le,pe.point1X,pe.point1Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case Ir:case er:var Pe=pe.type===Ir?Wi(pe,z):Tr(pe,z,oe,le),Ce=Pe.length;if(Ce===0){oe=pe.type===Ir?pe.centerX:pe.endX,le=pe.type===Ir?pe.centerY:pe.endY,ma(y,oe,le,0,0);break}pe=null;for(var Le=0;Le<Ce;Le++)pe=Pe[Le],tt.Dl(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.5,y);pe!==null&&(oe=pe[6],le=pe[7]);break;default:St("Unknown Segment type: "+pe.type)}}}break;default:St("Unknown Geometry type: "+a.type)}}Pn.prototype.normalize=function(){this._isFrozen&&gn(this);var a=this.ix();return this.offset(-a.x,-a.y),new Qe(-a.x,-a.y)},Pn.prototype.offset=function(a,y){return this._isFrozen&&gn(this),this.transform(1,0,0,1,a,y),this},Pn.prototype.scale=function(a,y){return this._isFrozen&&gn(this),this.transform(a,0,0,y,0,0),this},Pn.prototype.rotate=function(a,y,x){this._isFrozen&&gn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Ht.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Ht.free(E),this},be=Pn.prototype,be.transform=function(a,y,x,E,b,z){switch(this.type){case Pn.j:case Pn.u:case Pn.F:var ne=this.od,re=this.pd;this.od=ne*a+re*x+b,this.pd=ne*y+re*E+z,ne=this.Dc,re=this.Ec,this.Dc=ne*a+re*x+b,this.Ec=ne*y+re*E+z;break;case Pn.o:for(var oe=this.figures.s,le=oe.length,ue=0;ue<le;ue++){var pe=oe[ue];ne=pe.startX,re=pe.startY,pe.startX=ne*a+re*x+b,pe.startY=ne*y+re*E+z,pe=pe.segments.s;for(var Pe=pe.length,Ce=0;Ce<Pe;Ce++){var Le=pe[Ce];switch(Le.type){case ir:case Ar:ne=Le.endX,re=Le.endY,Le.endX=ne*a+re*x+b,Le.endY=ne*y+re*E+z;break;case wr:ne=Le.point1X,re=Le.point1Y,Le.point1X=ne*a+re*x+b,Le.point1Y=ne*y+re*E+z,ne=Le.point2X,re=Le.point2Y,Le.point2X=ne*a+re*x+b,Le.point2Y=ne*y+re*E+z,ne=Le.endX,re=Le.endY,Le.endX=ne*a+re*x+b,Le.endY=ne*y+re*E+z;break;case Lo:ne=Le.point1X,re=Le.point1Y,Le.point1X=ne*a+re*x+b,Le.point1Y=ne*y+re*E+z,ne=Le.endX,re=Le.endY,Le.endX=ne*a+re*x+b,Le.endY=ne*y+re*E+z;break;case Ir:ne=Le.centerX,re=Le.centerY,Le.centerX=ne*a+re*x+b,Le.centerY=ne*y+re*E+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Le.startAngle+=ne),0>a&&(Le.startAngle=180-Le.startAngle,Le.sweepAngle=-Le.sweepAngle),0>E&&(Le.startAngle=-Le.startAngle,Le.sweepAngle=-Le.sweepAngle),Le.radiusX*=Math.sqrt(a*a+x*x),Le.radiusY!==void 0&&(Le.radiusY*=Math.sqrt(y*y+E*E));break;case er:if(ne=Le.endX,re=Le.endY,Le.endX=ne*a+re*x+b,Le.endY=ne*y+re*E+z,Le.radiusX===0||Le.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Le.xAxisRotation+=ne),0>a&&(Le.xAxisRotation=180-Le.xAxisRotation,Le.isClockwiseArc=!Le.isClockwiseArc),0>E&&(Le.xAxisRotation=-Le.xAxisRotation,Le.isClockwiseArc=!Le.isClockwiseArc),Le.radiusX*=Math.sqrt(a*a+x*x),Le.radiusY*=Math.sqrt(y*y+E*E);break;default:St("Unknown Segment type: "+Le.type)}}}}return this._isInvalidBounds=!0,this},be.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case Pn.j:return tt.Yb(x,E,b,z,y,a.x,a.y);case Pn.u:var ne=vn.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=ne.ca(a),vn.free(ne),a;case Pn.F:ne=Math.min(x,b)-y;var re=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:(ne=a.x-(ne+x),re=a.y-(re+y),1>=ne*ne/(x*x)+re*re/(y*y));case Pn.o:return Or(this,a,y,!0,!1);default:return!1}};function Or(a,y,x,E,b){var z=y.x;y=y.y;for(var ne=a.bounds.x-20,re=0,oe,le,ue,pe,Pe=a.figures.s,Ce=Pe.length,Le=0;Le<Ce;Le++){var Oe=Pe[Le],rt=!Oe.isEvenOdd;if(Oe.isFilled){if(E&&Oe.ca(z,y,x))return!0;var Ye=Oe.segments;oe=Oe.startX,le=Oe.startY;for(var vt=oe,Pt=le,Ct=Ye.s,It=0;It<=Ye.length;It++){var rn=void 0;if(It!==Ye.length){rn=Ct[It];var ri=rn.type;a=rn.endX,pe=rn.endY}else ri=ir,a=vt,pe=Pt;switch(ri){case Ar:if(vt=zr(z,y,ne,y,oe,le,vt,Pt),isNaN(vt))return!0;re+=vt,vt=a,Pt=pe;break;case ir:if(oe=zr(z,y,ne,y,oe,le,a,pe),isNaN(oe))return!0;re+=oe;break;case wr:ue=tt.Fo(oe,le,rn.point1X,rn.point1Y,rn.point2X,rn.point2Y,a,pe,ne,y,z,y,.5),re+=ue;break;case Lo:ue=tt.Fo(oe,le,(oe+2*rn.point1X)/3,(le+2*rn.point1Y)/3,(2*rn.point1X+a)/3,(2*rn.point1Y+pe)/3,a,pe,ne,y,z,y,.5),re+=ue;break;case Ir:case er:ri=rn.type===Ir?Wi(rn,Oe):Tr(rn,Oe,oe,le);var Pi=ri.length;if(Pi===0){if(oe=zr(z,y,ne,y,oe,le,rn.type===Ir?rn.centerX:rn.endX,rn.type===Ir?rn.centerY:rn.endY),isNaN(oe))return!0;re+=oe;break}rn=null;for(var fi=0;fi<Pi;fi++){if(rn=ri[fi],fi===0){if(ue=zr(z,y,ne,y,oe,le,rn[0],rn[1]),isNaN(ue))return!0;re+=ue}ue=tt.Fo(rn[0],rn[1],rn[2],rn[3],rn[4],rn[5],rn[6],rn[7],ne,y,z,y,.5),re+=ue}rn!==null&&(a=rn[6],pe=rn[7]);break;default:St("Unknown Segment type: "+rn.type)}oe=a,le=pe}if(rt){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(Oe.ca(z,y,b?x:x+2))return!0}return!1}function zr(a,y,x,E,b,z,ne,re){if(tt.Yb(b,z,ne,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var le=((a*E-y*x)*(b-ne)-(a-x)*(b*re-z*ne))/oe;if(y=(a*E-y*x)*(z-re)/oe,le>=a)return 0;if((b>ne?b-ne:ne-b)<(z>re?z-re:re-z)){if(z<re){if(y<z||y>re)return 0}else if(y<re||y>z)return 0}else if(b<ne){if(le<b||le>ne)return 0}else if(le<ne||le>b)return 0;return 0<oe?1:-1}function jo(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}be.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Qe),this.type===Pn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(ne+ue>=z)return E=z-ne,E=ue===0?0:E/ue,x=x[re],re=x[2*a],b=x[2*a+1],y.h(re+(x[2*a+2]-re)*E,b+(x[2*a+3]-b)*E),y;ne+=ue}}return y},be.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Pn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,ne=0;ne<E;ne++){var re=x[ne],oe=re.length;for(a=0;a<oe;a++){var le=re[a];if(z+le>=b)return b=y[ne],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+=le}}return NaN},be.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Pn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(ne+ue>=z)return E=z-ne,E=ue===0?0:E/ue,ue=x[re],x=ue[2*a],re=ue[2*a+1],b=ue[2*a+2],a=ue[2*a+3],y[0]=x+(b-x)*E,y[1]=re+(a-re)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-re)?0:1>Math.abs(b-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=b-x?0:180:180*Math.atan2(a-re,b-x)/Math.PI,y;ne+=ue}}return y},be.xx=function(a){if(this.type===Pn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var ne=x;E=b}else ne=b,E=x;return a<=ne?ne===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-ne)}if(x===b)return y<E?ne=y:(ne=E,E=y),z<=ne?ne===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-ne);ne=(E-y)*(E-y)+(b-x)*(b-x);var re=Qe.alloc();return tt.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,Qe.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===Pn.u){ne=this.startX,re=this.startY;var oe=this.endX;if(b=this.endY,ne!==oe||re!==b){y=oe-ne,x=b-re,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,ne),oe),a=Math.min(Math.max(a,re),b),ne=Math.abs(E-ne),oe=Math.abs(E-oe),re=Math.abs(a-re),b=Math.abs(a-b);var le=Math.min(ne,oe,re,b);if(le===re)return E/z;if(le===oe)return(y+a)/z;if(le===b)return(2*y+x-E)/z;if(le===ne)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Qe.alloc(),b=1/0,re=ne=0,oe=y.length;for(var ue=le=0,pe=0;pe<oe;pe++)for(var Pe=y[pe],Ce=x[pe],Le=Pe.length,Oe=0;Oe<Le;Oe+=2){var rt=Pe[Oe],Ye=Pe[Oe+1];if(Oe!==0){tt.qh(le,ue,rt,Ye,a.x,a.y,E);var vt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);vt<b&&(b=vt,ne=re,ne+=Math.sqrt((E.x-le)*(E.x-le)+(E.y-ue)*(E.y-ue))),re+=Ce[(Oe-2)/2]}le=rt,ue=Ye}return Qe.free(E),a=ne/z,0>a?0:1<a?1:a}return 0};function po(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===Pn.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===Pn.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===Pn.F){var z=new ho;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new _i(Ir);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,z.add(ne),a=Wi(ne,z),b=a.length,b===0)E.push(ne.centerX),E.push(ne.centerY);else{ne=z.startX,z=z.startY;for(var re=0;re<b;re++){var oe=a[re];tt.Qe(ne,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,E),ne=oe[6],z=oe[7]}}y.push(E),x.push(Wo(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),ne=b.startX,z=b.startY,re=ne,oe=z;for(var le=b.segments.s,ue=le.length,pe=0;pe<ue;pe++){var Pe=le[pe];switch(Pe.type){case Ar:4<=E.length&&(y.push(E),x.push(Wo(E))),E=[],E.push(Pe.endX),E.push(Pe.endY),ne=Pe.endX,z=Pe.endY,re=ne,oe=z;break;case ir:E.push(Pe.endX),E.push(Pe.endY),ne=Pe.endX,z=Pe.endY;break;case wr:tt.Qe(ne,z,Pe.point1X,Pe.point1Y,Pe.point2X,Pe.point2Y,Pe.endX,Pe.endY,.5,E),ne=Pe.endX,z=Pe.endY;break;case Lo:tt.ep(ne,z,Pe.point1X,Pe.point1Y,Pe.endX,Pe.endY,.5,E),ne=Pe.endX,z=Pe.endY;break;case Ir:var Ce=Wi(Pe,b),Le=Ce.length;if(Le===0){E.push(Pe.centerX),E.push(Pe.centerY),ne=Pe.centerX,z=Pe.centerY;break}for(var Oe=0;Oe<Le;Oe++){var rt=Ce[Oe];tt.Qe(ne,z,rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],.5,E),ne=rt[6],z=rt[7]}break;case er:if(Ce=Tr(Pe,b,ne,z),Le=Ce.length,Oe=Pe.endX,rt=Pe.endY,Le===0){E.push(Oe),E.push(rt),ne=Oe,z=rt;break}for(Oe=0;Oe<Le;Oe++)rt=Ce[Oe],tt.Qe(ne,z,rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],.5,E),ne=rt[6],z=rt[7];break;default:St("Segment not of valid type: "+Pe.type)}Pe.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(Wo(E)))}}}function Wo(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var ne=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(qa(x,E,ne,re))),x=ne,E=re}return y}be.add=function(a){return this.ee.add(a),this},be.pm=function(a,y,x,E,b,z,ne,re){return this._isFrozen&&gn(this),this.fg=new bi(a,y,b,z).freeze(),this.gg=new bi(x,E,ne,re).freeze(),this},Ve.Object.defineProperties(Pn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return po(this),this.tk}},flattenedLengths:{get:function(){return po(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Pn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===Pn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,ne=0;ne<z;ne++)a+=b[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&gn(this,a),this.na=a,a===Pn.o?this.ee=new An:(Pn.V===null&&(Pn.V=new An().freeze()),this.ee=Pn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&gn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&gn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&gn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&gn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&gn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&gn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&gn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&gn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Pn.prototype.setSpots=Pn.prototype.pm,Pn.prototype.add=Pn.prototype.add,Pn.prototype.getFractionForPoint=Pn.prototype.xx,Pn.prototype.getPointAndAngleAlongPath=Pn.prototype.Qu,Pn.prototype.getAngleAlongPath=Pn.prototype.wx,Pn.prototype.getPointAlongPath=Pn.prototype.Pu,Pn.prototype.containsPoint=Pn.prototype.ca,Pn.prototype.transform=Pn.prototype.transform,Pn.prototype.rotate=Pn.prototype.rotate,Pn.prototype.scale=Pn.prototype.scale,Pn.prototype.offset=Pn.prototype.offset,Pn.prototype.normalize=Pn.prototype.normalize,Pn.prototype.computeBoundsWithoutOrigin=Pn.prototype.ix,Pn.prototype.equalsApprox=Pn.prototype.Xa,Pn.className="Geometry",Pn.j=new mn(Pn,"Line",0),Pn.u=new mn(Pn,"Rectangle",1),Pn.F=new mn(Pn,"Ellipse",2),Pn.o=new mn(Pn,"Path",3),Pn.V=null,Pn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Pn.className="Geometry",Pn.stringify=Pn.ia,Pn.fillPath=Pn.nb,Pn.parse=Pn.parse,Pn.Line=Pn.j,Pn.Rectangle=Pn.u,Pn.Ellipse=Pn.F,Pn.Path=Pn.o;function ho(a,y,x,E,b){_r(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 An,this.sr=this.pl.Ja,this.fw=null}ho.prototype.copy=function(){var a=new ho;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},be=ho.prototype,be.Xa=function(a){if(!(a instanceof ho&&tt.B(this.startX,a.startX)&&tt.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},be.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},be.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},be.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},be.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},be.add=function(a){return this.pl.add(a),this},be.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,ne=b,re=this.segments.s,oe=re.length,le=0;le<oe;le++){var ue=re[le];switch(ue.type){case Ar:z=ue.endX,ne=ue.endY,E=ue.endX,b=ue.endY;break;case ir:if(tt.Yb(E,b,ue.endX,ue.endY,x,a,y))return!0;E=ue.endX,b=ue.endY;break;case wr:if(tt.cs(E,b,ue.point1X,ue.point1Y,ue.point2X,ue.point2Y,ue.endX,ue.endY,.5,a,y,x))return!0;E=ue.endX,b=ue.endY;break;case Lo:if(tt.jv(E,b,ue.point1X,ue.point1Y,ue.endX,ue.endY,.5,a,y,x))return!0;E=ue.endX,b=ue.endY;break;case Ir:case er:var pe=ue.type===Ir?Wi(ue,this):Tr(ue,this,E,b),Pe=pe.length,Ce=ue.type===Ir?ue.centerX:ue.endX,Le=ue.type===Ir?ue.centerY:ue.endY;if(Pe===0){if(tt.Yb(E,b,Ce,Le,x,a,y))return!0;E=Ce,b=Le;break}for(Ce=null,Le=0;Le<Pe;Le++)if(Ce=pe[Le],Le===0&&tt.Yb(E,b,Ce[0],Ce[1],x,a,y)||tt.cs(Ce[0],Ce[1],Ce[2],Ce[3],Ce[4],Ce[5],Ce[6],Ce[7],.5,a,y,x))return!0;Ce!==null&&(E=Ce[6],b=Ce[7]);break;default:St("Unknown Segment type: "+ue.type)}if(ue.isClosed&&(E!==z||b!==ne)&&tt.Yb(E,b,z,ne,x,a,y))return!0}return!1},Ve.Object.defineProperties(ho.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&&gn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&gn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&gn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&gn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&gn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&gn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ho.prototype.add=ho.prototype.add,ho.prototype.equalsApprox=ho.prototype.Xa,ho.className="PathFigure";function _i(a,y,x,E,b,z,ne,re){_r(this),a===void 0&&(a=ir),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),ne===void 0&&(ne=0),a===er?(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 ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Ir&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===Ir&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}_i.prototype.copy=function(){var a=new _i;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},be=_i.prototype,be.Xa=function(a){if(!(a instanceof _i)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ar:case ir:return tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY);case wr:return tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)&&tt.B(this.point1X,a.point1X)&&tt.B(this.point1Y,a.point1Y)&&tt.B(this.point2X,a.point2X)&&tt.B(this.point2Y,a.point2Y);case Lo:return tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)&&tt.B(this.point1X,a.point1X)&&tt.B(this.point1Y,a.point1Y);case Ir:return tt.B(this.startAngle,a.startAngle)&&tt.B(this.sweepAngle,a.sweepAngle)&&tt.B(this.centerX,a.centerX)&&tt.B(this.centerY,a.centerY)&&tt.B(this.radiusX,a.radiusX)&&tt.B(this.radiusY,a.radiusY);case er:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&tt.B(this.xAxisRotation,a.xAxisRotation)&&tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)&&tt.B(this.radiusX,a.radiusX)&&tt.B(this.radiusY,a.radiusY);default:return!1}},be.qb=function(a){a.classType===_i&&(this.type=a)},be.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ar:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ir:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case wr: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 Lo: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 Ir: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 er: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":"")},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return this._isFrozen=!1,this},be.close=function(){return this.isClosed=!0,this};function Wi(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=tt.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ne=Ht.alloc();ne.reset(),x<E?ne.scale(1,E/x):ne.scale(x/E,1),Pn.Ha(z,ne),Ht.free(ne)}for(x=z.length,E=0;E<x;E++)ne=z[E],ne[0]+=y,ne[1]+=b,ne[2]+=y,ne[3]+=b,ne[4]+=y,ne[5]+=b,ne[6]+=y,ne[7]+=b;return a.ae=z,a.ae}function Tr(a,y,x,E){function b(Oe,rt,Ye,vt){return(Oe*vt<rt*Ye?-1:1)*Math.acos((Oe*Ye+rt*vt)/(Math.sqrt(Oe*Oe+rt*rt)*Math.sqrt(Ye*Ye+vt*vt)))}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 ne=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,le=a.Dc,ue=a.Ec,pe=Math.cos(ne),Pe=Math.sin(ne),Ce=pe*(x-le)/2+Pe*(E-ue)/2;ne=-Pe*(x-le)/2+pe*(E-ue)/2;var Le=Ce*Ce/(y*y)+ne*ne/(z*z);return 1<Le&&(y*=Math.sqrt(Le),z*=Math.sqrt(Le)),Le=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*Ce*Ce)/(y*y*ne*ne+z*z*Ce*Ce)),isNaN(Le)&&(Le=0),re=Le*y*ne/z,Le=Le*-z*Ce/y,isNaN(re)&&(re=0),isNaN(Le)&&(Le=0),x=(x+le)/2+pe*re-Pe*Le,E=(E+ue)/2+Pe*re+pe*Le,ue=b(1,0,(Ce-re)/y,(ne-Le)/z),pe=(Ce-re)/y,le=(ne-Le)/z,Ce=(-Ce-re)/y,re=(-ne-Le)/z,ne=b(pe,le,Ce,re),Ce=(pe*Ce+le*re)/(Math.sqrt(pe*pe+le*le)*Math.sqrt(Ce*Ce+re*re)),-1>=Ce?ne=Math.PI:1<=Ce&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,Ce=y>z?z/y:1,y=tt.jx(0,0,y>z?y:z,ue,ue+ne,!0),z=Ht.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,Ce),Pn.Ha(y,z),Ht.free(z),a.ae=y,a.ae}Ve.Object.defineProperties(_i.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&&gn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&gn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&gn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&gn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&gn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&gn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&gn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&gn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&gn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Rn(a,">= zero",_i,"radiusX"),this._isFrozen&&gn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Rn(a,">= zero",_i,"radiusY"),this._isFrozen&&gn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&gn(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&&gn(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&&gn(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&&gn(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&&gn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),_i.prototype.equalsApprox=_i.prototype.Xa;var Ar=new mn(_i,"Move",0),ir=new mn(_i,"Line",1),wr=new mn(_i,"Bezier",2),Lo=new mn(_i,"QuadraticBezier",3),Ir=new mn(_i,"Arc",4),er=new mn(_i,"SvgArc",4);_i.className="PathSegment",_i.Move=Ar,_i.Line=ir,_i.Bezier=wr,_i.QuadraticBezier=Lo,_i.Arc=Ir,_i.SvgArc=er;function lr(){this.H=null,this.xu=new Qe(0,0).freeze(),this.mt=new Qe(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}lr.prototype.copy=function(){var a=new lr;return this.clone(a)},lr.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},lr.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},lr.prototype.So=function(a,y){var x=this.diagram;return x===null||Zd(x,a,y),y},lr.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Zd(x,a,y),y.assign(x.Ps(y))),y},Ve.Object.defineProperties(lr.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}}}),lr.prototype.getMultiTouchDocumentPoint=lr.prototype.Bz,lr.prototype.getMultiTouchViewPoint=lr.prototype.So,lr.className="InputEvent";function or(){this.H=null,this.xa="",this.ar=this.Lr=null}or.prototype.copy=function(){var a=new or;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},or.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ve.Object.defineProperties(or.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}}}),or.className="DiagramEvent";function Oi(){this.Fm=Yr,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Oi.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Oi.prototype.copy=function(){var a=new Oi;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=hn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=hn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=hn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=hn(y)&&typeof y.J=="function"?y.J():y,a},Oi.prototype.qb=function(a){a.classType===Oi&&(this.change=a)},Oi.prototype.toString=function(){var a="";return a=this.change===Do?a+"* ":this.change===Yr?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===Do?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Ri(this.object)),this.oldValue!==null&&(a+=" old: "+Ri(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Ri(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Oi.prototype.I=function(a){return a?this.oldValue:this.newValue},Oi.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Oi.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Oi.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Oi.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Oi.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ve.Object.defineProperties(Oi.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===Do&&(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}}}),Oi.prototype.redo=Oi.prototype.redo,Oi.prototype.canRedo=Oi.prototype.canRedo,Oi.prototype.undo=Oi.prototype.undo,Oi.prototype.canUndo=Oi.prototype.canUndo,Oi.prototype.getParam=Oi.prototype.Dz,Oi.prototype.getValue=Oi.prototype.I,Oi.prototype.clear=Oi.prototype.clear;var Do=new mn(Oi,"Transaction",-1),Yr=new mn(Oi,"Property",0),ko=new mn(Oi,"Insert",1),Yo=new mn(Oi,"Remove",2);Oi.className="ChangedEvent",Oi.Transaction=Do,Oi.Property=Yr,Oi.Insert=ko,Oi.Remove=Yo;function Er(){this.o=new An().freeze(),this.xa="",this.j=!1}Er.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},Er.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()},Er.prototype.canUndo=function(){return this.isComplete},Er.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()}},Er.prototype.canRedo=function(){return this.isComplete},Er.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()}},Er.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new wi,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Yr&&E.object){var b=y.get(E.object);b||(b=new wi,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()}},Ve.Object.defineProperties(Er.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}}}),Er.prototype.optimize=Er.prototype.ak,Er.prototype.redo=Er.prototype.redo,Er.prototype.canRedo=Er.prototype.canRedo,Er.prototype.undo=Er.prototype.undo,Er.prototype.canUndo=Er.prototype.canUndo,Er.prototype.clear=Er.prototype.clear,Er.className="Transaction";function Oo(){this.Pt=new Bn,this.Jd=!1,this.u=new An().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new An().freeze(),this.hl=new An,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Oo.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},Oo.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},Oo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},be=Oo.prototype,be.Xw=function(a){this.Pt.add(a)},be.Rx=function(a){this.Pt.remove(a)},be.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},be.eb=function(a){return a===void 0&&(a=""),Ns(this,!0,a)},be.Kf=function(){return Ns(this,!1,"")};function Ns(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&ai("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 ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(z=a.hl.M(ne-1),a.hl.mb(ne-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}be.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()}},Oo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Oo.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){ai("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Oo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Oo.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){ai("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Oo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Oi;for(E.change=Do,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Oo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Er);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||ai("Change not within a transaction: "+x.toString()))}},Oo.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},Ve.Object.defineProperties(Oo.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}}}),Oo.prototype.handleChanged=Oo.prototype.Tu,Oo.prototype.redo=Oo.prototype.redo,Oo.prototype.undo=Oo.prototype.undo,Oo.prototype.canUndo=Oo.prototype.canUndo,Oo.prototype.discardHistoryAfterIndex=Oo.prototype.lx,Oo.prototype.rollbackTransaction=Oo.prototype.Kf,Oo.prototype.commitTransaction=Oo.prototype.eb,Oo.prototype.startTransaction=Oo.prototype.Ea,Oo.prototype.removeModel=Oo.prototype.Rx,Oo.prototype.addModel=Oo.prototype.Xw,Oo.prototype.clear=Oo.prototype.clear,Oo.className="UndoManager";function Gi(){_r(this),this.H=ph,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new lr,this.Zr=-1}Gi.prototype.toString=function(){return this.name!==""?this.name+" Tool":hi(this.constructor)},Gi.prototype.updateAdornments=function(){},Gi.prototype.canStart=function(){return this.isEnabled},Gi.prototype.doStart=function(){},Gi.prototype.doActivate=function(){this.isActive=!0},Gi.prototype.doDeactivate=function(){this.isActive=!1},Gi.prototype.doStop=function(){},Gi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Gi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Gi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Gi.prototype.doMouseMove=function(){},Gi.prototype.doMouseUp=function(){this.stopTool()},Gi.prototype.doMouseWheel=function(){},Gi.prototype.canStartMultiTouch=function(){return!0},Gi.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Qe.allocAt(NaN,NaN)),E=y.So(1,Qe.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}Qe.free(x),Qe.free(E)},Gi.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Qe.allocAt(NaN,NaN)),E=y.So(1,Qe.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 Qe((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 ne=a.commandHandler;if(z!==a.scale&&ne.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=b,ne.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}Qe.free(x),Qe.free(E)},Gi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Gi.prototype.doKeyUp=function(){},Gi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Gi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Gi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(br?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||(br?y.meta:y.control)||y.shift||a.clearSelection()}},Gi.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,Ia(a,E,x),E.handled};function Ia(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)}}}Gi.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,ne=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(E===z||E!==null&&E.rg(z)||(re(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=ne,y.handled=!1;E!==null&&(ne=E.mouseEnter,!(ne!==null&&(z===E||z!==null&&z.rg(E)||(ne(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,ne="";z!==null&&(ne=z.cursor,ne==="");)z=z.panel;for(a.currentCursor=ne,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}},Gi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Gi.prototype.doCurrentObjectChanged=function(){},Gi.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===ju&&!y.shift||b===Is&&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===ju&&y.shift||b===Is&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var ne=z.deltaX;z=z.deltaY;var re="pixel";if(ne===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(re,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(re,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(re,0<ne?"right":"left",Math.abs(ne))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},Gi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Gi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=xn(function(){x.doWaitAfter(E)},a)},Gi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&nt.clearTimeout(this.Zr),this.Zr=-1},Gi.prototype.doWaitAfter=function(){},Gi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof lo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Gi.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},Ve.Object.defineProperties(Gi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof nn&&(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}}}),Gi.prototype.startTransaction=Gi.prototype.Ea,Gi.className="Tool";function Vr(){Gi.call(this),this.name="ToolManager",this.hb=new An,this.ob=new An,this.Hb=new An,this.F=this.V=850,this.o=new qn(2,2).ja(),this.Ha=5e3,this.ia=Is,this.u=Nh,this.Mp=this.j=null,this.zj=-1}Ot(Vr,Gi),Vr.prototype.initializeStandardTools=function(){},Vr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof lo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Vr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ru&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===zu){y.bubbles=!0;return}if(this.gestureBehavior===ru)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===Is?this.mouseWheelBehavior=ju:this.mouseWheelBehavior===ju&&(this.mouseWheelBehavior=Is)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Vr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===zu){y.bubbles=!0;return}if(this.gestureBehavior===ru)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}}_a(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function _a(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Vr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof lo&&(y===a||y.rg(a))||this.hideToolTip()},Vr.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()))},Vr.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)},Vr.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 lo)||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()},Vr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof lo){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 Fr&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(nt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=xn(function(){b.hideToolTip()},a)}},Vr.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}},Vr.prototype.hideToolTip=function(){this.zj!==-1&&(nt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof lo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fr&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Vr.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()},Vr.prototype.doMouseWheel=function(){this.standardMouseWheel()},Vr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Vr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Vr.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},Vr.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},Vr.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)},Ve.Object.defineProperties(Vr.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 lo?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}}}),Vr.prototype.replaceStandardTool=Vr.prototype.gb;var Is=new mn(Vr,"WheelScroll",0),ju=new mn(Vr,"WheelZoom",1),Gh=new mn(Vr,"WheelNone",2),Nh=new mn(Vr,"GestureZoom",3),ru=new mn(Vr,"GestureCancel",4),zu=new mn(Vr,"GestureNone",5);Vr.className="ToolManager",Vr.WheelScroll=Is,Vr.WheelZoom=ju,Vr.WheelNone=Gh,Vr.GestureZoom=Nh,Vr.GestureCancel=ru,Vr.GestureNone=zu;function aa(){Gi.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 Qe(NaN,NaN),this.Fr=new Qe,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Bn().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ml;Ot(aa,Gi),aa.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},aa.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},aa.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,(br?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},aa.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),_t=null,this.isActive=!0,this.tl.set(a.position),Wh(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&&Js(a),Jf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,_t=this,on=this.diagram,this.doSimulatedDragOut()))};function Wh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Kn?(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 xi,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}aa.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},aa.prototype.Pd=function(a){return a===void 0?new fc(uo):this.isGridSnapEnabled?new fc(new Qe(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new fc(a.copy())},aa.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Bh(this),ud(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Ml.count){for(var y=Ml,x=y.length,E=0;E<x;E++){var b=y.M(E);xu(b),ou(b),Bh(b),b.diagram.ug()}y.clear()}xu(this),this.tl.h(NaN,NaN),on!==null&&(on.currentCursor=""),_t=on=null,ou(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ad(a,!0)},aa.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Bh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Fc(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Od(){var a=_t;ou(a),dh(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}aa.prototype.doCancel=function(){ou(this),dh(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},aa.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},aa.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function _u(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):dh(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 wi,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 Kn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Wh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Gc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ou(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 Kn&&(x.value.point=new Qe(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function xu(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 Pu(a,y,x){var E=a.diagram,b=a.startPoint,z=Qe.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Qe.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Js(E),E.hk())}aa.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Ah(E,a,y,this.dragOptions,x)};function dh(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 Kn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Gc(E,-b.x,-b.y)}y.bd()}}function Lc(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Hn(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Fc(a,b,E),!a.isActive&&_t===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof cr)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ne=!0)}if(!a.isActive&&_t===null||(a.doDragOver(y,E),!a.isActive&&_t===null))return}finally{x.skipsUndoManager=z,ne&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}aa.prototype.findDragOverObject=function(a){var y=this;return nh(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof lo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},aa.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 Fc(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 ne=0;ne<b;ne++){var re=a.Cg[ne],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&_t===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Nc(b);for(b=a.Cg.length,x=0;x<b&&(ne=a.Cg[x],re=ne.mouseDragEnter,re===null||(re(y,ne,z),E=!0,!y.handled));x++);return E}function Nc(a){var y=a.panel;return y!==null?y:a instanceof Di&&!(a instanceof cr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function od(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(le){return E.findValidLinkablePort(le,x)});a=Qe.alloc();var z=1/0,ne=null;for(b=b.iterator;b.next();){var re=b.value;if(re.part!==null){var oe=re.ga(Qr,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return Qe.free(a),ne}function Hn(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,ne=null;x.fromNode===null&&(z=od(a,x.i(0),!1),z!==null&&(ne=z.part));var re=null,oe=null;x.toNode===null&&(re=od(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),b.isValidLink(ne,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):rr(b,ne,z,oe,re):rr(b,null,null,null,null)}}}}aa.prototype.doDragOver=function(){};function yr(a,y){var x=a.diagram;a.dragsLink&&Hn(a,!0),Bh(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 ne=z.mouseDrop;if(ne!==null&&(ne(b,z),b.handled))break;Jo(a,b,z),z=Nc(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||_t!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof li&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||_t!==null){for(a=vn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof li&&Xe(x,E,a);vn.free(a)}}}function Jo(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof cr||(x=a.mouseDrop,x!==null&&x(y))}function Xe(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 Kn},!0,function(b){return b instanceof Kn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}aa.prototype.doDropOnto=function(){},aa.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(_u(this,!1),Jf(a,this.copiedParts),Pu(this,this.copiedParts,!1),ud(a,this.copiedParts)):this.mayMove()?(ou(this),Pu(this,this.draggedParts,!0)):this.mayDragOut()?(_u(this,!1),Pu(this,this.copiedParts,!1)):ou(this),Lc(this,a.lastInput.documentPoint))}},aa.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?(ou(this),_u(this,!0),Jf(a,this.copiedParts),Pu(this,this.copiedParts,!1),ud(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,ou(this),this.mayMove()&&(Pu(this,this.draggedParts,!0),Lc(this,a.lastInput.documentPoint))),this.Ym=!0,yr(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Ue(this),a.Ya(),ud(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},aa.prototype.simulatedMouseMove=function(a,y,x){if(_t===null)return!1;var E=_t.diagram;x instanceof nn||(x=null);var b=on;return x!==b&&(b!==null&&b!==E&&(b.ug(),_t.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),on=x,x!==null&&x!==E&&(Od(),b=x.toolManager.findTool("Dragging"),b!==null&&(Ml.contains(b)||Ml.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)},aa.prototype.simulatedMouseUp=function(a,y,x){if(_t===null)return!1;var E=on,b=_t.diagram;if(x===null)return _t.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),_t.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;on=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Od(),Ml.contains(E)||Ml.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 Qe),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=_t,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Ue(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof li&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}aa.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(br?!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())},aa.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())},aa.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())},aa.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},aa.prototype.Az=function(){return _t},aa.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=_t;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},aa.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ll(a),a.animationManager.Cc(),a=_t,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},aa.prototype.doSimulatedDragLeave=function(){var a=_t;a!==null&&a.doSimulatedDragOut(),this.doCancel()},aa.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=_t;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;zt(this,y.draggedParts.Lf(),!1,a.firstInput),Pu(this,this.copiedParts,!1),Lc(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},aa.prototype.doSimulatedDrop=function(){var a=this.diagram,y=_t;if(y!==null){var x=y.diagram;if(y.Ym=!0,ou(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),zt(this,y.draggedParts.Lf(),!0,a.lastInput),Pu(this,this.copiedParts,!1);var E=new Bn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),yr(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 zt(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=vn.alloc();b=E=1/0;for(var ne=-1/0,re=-1/0,oe=y.iterator;oe.next();){var le=oe.value;if(le.isVisible()){var ue=le.location;le=ue.x,ue=ue.y,isNaN(le)||isNaN(ue)||(le<E&&(E=le),ue<b&&(b=ue),le>ne&&(ne=le),ue>re&&(re=ue))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,ne-E,re-b),E=z.x+z.width/2,b=z.y+z.height/2,vn.free(z),z=a.Fr,ne=new wi,re=Qe.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof Kn&&le.canCopy()&&(ue=x.I(le),ue!==null&&(ue.points=le.points,Gc(ue,z.x-E,z.y-b),ue.suspendsRouting=!0,ne.add(ue,a.Pd())));for(y=y.iterator;y.next();)le=y.value,le.Zc()&&le.canCopy()&&(oe=x.I(le),oe!==null&&(le=le.location,re.h(z.x-(E-le.x),z.y-(b-le.y)),oe.location=re,oe.Va(),ne.add(oe,a.Pd(re))));Qe.free(re),a.copiedParts=ne,Wh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Gc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}aa.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},aa.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Qe},Ve.Object.defineProperties(aa.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}}}),aa.prototype.getDraggingSource=aa.prototype.Az;var _t=null,on=null;aa.className="DraggingTool",Ml=new An,tr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Vr.prototype.doCancel=function(){_t!==null&&_t.doCancel(),Gi.prototype.doCancel.call(this)};function Wt(){Gi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Kn,y=new Cr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Cr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new li,y=new Cr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=wo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new li,y=new Cr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=wo,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 wi,this.Of=this.gj=this.Pf=null}Ot(Wt,Gi),Wt.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Wt.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ne=qn.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,E.desiredSize=ne,qn.free(ne),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Qr,z=Qe.alloc(),x.location=y.ga(Qr,z),Qe.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Wt.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=wo,y.fromSpot=Fa,y.toSpot=Fa),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Wt.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Wt.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof li){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)}},Wt.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof li))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof li)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Wt.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(pe){return b.findValidLinkablePort(pe,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ne=z.value,re=ne.part;if(re instanceof li){var oe=ne.ga(Qr,Qe.alloc()),le=x.x-oe.x,ue=x.y-oe.y;Qe.free(oe),oe=le*le+ue*ue,oe<E&&(le=this.validPortsCache.I(ne),le!==null?le&&(y=ne,E=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,ne)||!a&&this.isValidLink(re,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,E=oe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof li&&(x.layer===null||x.layer.allowLink))?y:null},Wt.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},Wt.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},Wt.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Wt.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof li))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof li))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},Wt.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)},Wt.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 Bn;return E.add(a),Fn(this,x,y,E)};function Fn(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Fn(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Fn(a,y.labeledLink,x,E))))}Wt.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==Pf){if(E===rp){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!wn(this,a,y,x,!0)}if(E===op){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!wn(this,a,y,x,!0)}if(E===tp)return a===y?a=!0:(E=new Bn,E.add(y),a=kn(this,E,a,y,x)),!a;if(E===np)return!wn(this,a,y,x,!1);if(E===ip)return a===y?a=!0:(E=new Bn,E.add(y),a=ni(this,E,a,y,x)),!a}return!0};function wn(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 ne=z.value;if(ne!==E&&(!b||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&wn(a,ne,x,E,b)))return!0}return!1}function kn(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&kn(a,y,ne,E,b)))return!0}return!1}function ni(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 ne=z.value;if(ne!==b){var re=ne.fromNode;if(ne=ne.toNode,re=re===x?ne:re,re!==x&&ni(a,y,re,E,b))return!0}}return!1}Ve.Object.defineProperties(Wt.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}}}),Wt.className="LinkingBaseTool";function Tn(){Wt.call(this),this.name="Linking",this.V={},this.F=null,this.K=ei,this.Xd=null}Ot(Tn,Wt),Tn.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},Tn.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 li)))return null;var x=this.direction;if(x===ei||x===ki){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===ei||x===Ci)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Tn.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 li&&(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 li&&(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)},Tn.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()},Tn.prototype.doStop=function(){Wt.prototype.doStop.call(this),this.startObject=null},Tn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var re=ne.part;re instanceof li&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=re,b=ne):(y=re,x=ne,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?(ne===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)}}},Tn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Kn)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)},Tn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Tn.prototype.doNoLink=function(){},Ve.Object.defineProperties(Tn.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 ei=new mn(Tn,"Either",0),ki=new mn(Tn,"ForwardsOnly",0),Ci=new mn(Tn,"BackwardsOnly",0);Tn.className="LinkingTool",Tn.Either=ei,Tn.ForwardsOnly=ki,Tn.BackwardsOnly=Ci;function xi(){Wt.call(this),this.name="Relinking";var a=new Cr;a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Cr,a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new vn}Ot(xi,Wt),xi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Kn){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)}},xi.prototype.makeAdornment=function(a,y){var x=new lo;return x.type=Gn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},xi.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},xi.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 lo&&x.adornedPart instanceof Kn))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=vr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=vr),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},xi.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Pg||x===Wc)&&(x=pl),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}},xi.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()},xi.prototype.doStop=function(){Wt.prototype.doStop.call(this),this.handle=null},xi.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 ne=this.targetPort.part;ne instanceof li&&(this.isForwards?(E=ne,b=this.targetPort):(y=ne,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()}}},xi.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},xi.prototype.doNoRelink=function(){};function rr(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)}Ve.Object.defineProperties(xi.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 lo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),xi.className="RelinkingTool",tr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),tr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Mi(){Gi.call(this),this.name="LinkReshaping";var a=new Cr;a.figure="Rectangle",a.desiredSize=ua,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Cr,a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Qe,this.Yq=new An}Ot(Mi,Gi),Mi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ui},Mi.prototype.om=function(a,y){a.reshapingBehavior=y},Mi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Kn){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)}},Mi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new lo,b.type=Gn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ne=E?1:0;if(y.resegmentable&&y.computeCurve()!==pu)for(var re=x+ne;re<z-ne;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,b.add(oe))}for(ne=x+1;ne<z;ne++)if(re=this.makeHandle(a,ne),re!==null){if(re.segmentIndex=ne,ne!==x)if(ne===x+1&&E){oe=y.i(x);var le=y.i(x+1);tt.B(oe.x,le.x)&&tt.B(oe.y,le.y)&&(le=y.i(x-1)),tt.B(oe.x,le.x)?(this.om(re,Xr),re.cursor="n-resize"):tt.B(oe.y,le.y)&&(this.om(re,Pr),re.cursor="w-resize")}else ne===z-1&&E?(oe=y.i(z-1),le=y.i(z),tt.B(oe.x,le.x)&&tt.B(oe.y,le.y)&&(oe=y.i(z+1)),tt.B(oe.x,le.x)?(this.om(re,Xr),re.cursor="n-resize"):tt.B(oe.y,le.y)&&(this.om(re,Pr),re.cursor="w-resize")):ne!==z&&(this.om(re,so),re.cursor="move");b.add(re)}b.adornedObject=a}return b},Mi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Mi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Mi.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},Mi.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 Kn){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}}},Mi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Mi.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Mi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Mi.prototype.getResegmentingPoint=function(){return this.handle.ga(Qr)},Mi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Mi.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 ne=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Vi(this,ne,E,b,z,!0)||Vi(this,ne,E,b,z,!1))){var re=y.points.copy();Vi(this,ne,E,b,z,!0)?(re.cd(x-2,new Qe(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new Qe(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new Qe((z.x+ne.x)/2,ne.y)),re.cd(x+1,new Qe((z.x+ne.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else ne=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Vi(this,E,b,z,ne,!0)||Vi(this,E,b,z,ne,!1))&&(re=y.points.copy(),Vi(this,E,b,z,ne,!0)?(re.cd(x-1,new Qe(E.x,(E.y+ne.y)/2)),re.cd(x+2,new Qe(ne.x,(E.y+ne.y)/2))):(re.cd(x-1,new Qe((E.x+ne.x)/2,E.y)),re.cd(x+2,new Qe((E.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=Qe.alloc(),tt.qh(E.x,E.y,z.x,z.y,b.x,b.y,ne)&&ne.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Qe.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Vi(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}Mi.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===Xr?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===Pr&&(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===Xr?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===Pr&&(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),ne=y.i(E+1);tt.B(z.x,b.x)&&tt.B(b.y,ne.y)?(tt.B(z.x,y.i(E-2).x)&&!tt.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),tt.B(ne.y,y.i(E+2).y)&&!tt.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)):tt.B(z.y,b.y)&&tt.B(b.x,ne.x)?(tt.B(z.y,y.i(E-2).y)&&!tt.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),tt.B(ne.x,y.i(E+2).x)&&!tt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):tt.B(z.x,b.x)&&tt.B(b.x,ne.x)?(tt.B(z.x,y.i(E-2).x)&&!tt.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),tt.B(ne.x,y.i(E+2).x)&&!tt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):tt.B(z.y,b.y)&&tt.B(b.y,ne.y)&&(tt.B(z.y,y.i(E-2).y)&&!tt.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),tt.B(ne.y,y.i(E+2).y)&&!tt.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.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(Qr,Qe.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Qe.alloc()),y.L(0,E.x,E.y),Qe.free(z),Qe.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(Qr,Qe.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Qe.alloc()),y.L(y.pointsCount-1,a.x,a.y),Qe.free(x),Qe.free(a));y.zf()},Mi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case so:return a;case Xr:return new Qe(y.i(x).x,a.y);case Pr:return new Qe(a.x,y.i(x).y);default:case Ui:return y.i(x)}},Ve.Object.defineProperties(Mi.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 lo))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}}}),Mi.prototype.setReshapingBehavior=Mi.prototype.om,Mi.prototype.getReshapingBehavior=Mi.prototype.Ru;var Ui=new mn(Mi,"None",0),Pr=new mn(Mi,"Horizontal",1),Xr=new mn(Mi,"Vertical",2),so=new mn(Mi,"All",3);Mi.className="LinkReshapingTool",Mi.None=Ui,Mi.Horizontal=Pr,Mi.Vertical=Xr,Mi.All=so,tr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function fr(){Gi.call(this),this.name="Resizing",this.o=new qn(1,1).freeze(),this.j=new qn(9999,9999).freeze(),this.yg=new qn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Cr;a.alignmentFocus=Qr,a.figure="Rectangle",a.desiredSize=ua,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Qe,this.Dw=new qn,this.Tn=new Qe,this.rt=new qn(0,0),this.qt=new qn(1/0,1/0),this.pt=new qn(1,1)}Ot(fr,Gi),fr.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Kn)){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(),pd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},fr.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new lo,y.type=Gn.Spot,y.locationSpot=Qr;var x=new gl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,cs)),y.add(this.makeHandle(a,Ol)),y.add(this.makeHandle(a,ys)),y.add(this.makeHandle(a,nl)),y.add(this.makeHandle(a,Aa)),y.add(this.makeHandle(a,rs)),y.add(this.makeHandle(a,Ka)),y.add(this.makeHandle(a,za))}else if($u(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},fr.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},fr.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=Qr),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 e;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 Gn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},fr.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},fr.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))},fr.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},fr.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},fr.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},fr.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,Qe.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Qe.free(b)}},fr.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,Qe.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Qe.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},fr.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 cr){var E=new An;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new ae;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()}},fr.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Qr);var ne=this.adornedObject.naturalBounds,re=ne.x,oe=ne.y,le=ne.x+ne.width,ue=ne.y+ne.height,pe=1;if(!z){pe=ne.width;var Pe=ne.height;0>=pe&&(pe=1),0>=Pe&&(Pe=1),pe=Pe/pe}return Pe=Qe.alloc(),tt.No(a.x,a.y,re,oe,b.width,b.height,Pe),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Pe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(Pe.y,ue-E.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=le-a.width,a.y=ue-a.height)):1<=y.y?(a.x=Math.max(Pe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.height=Math.max(Math.min(Pe.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=le-a.width)):(a.x=Math.max(Pe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ue-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Pe.x-re,E.width),x.width),a.y=Math.max(Pe.y,ue-E.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.y=ue-a.height)):1<=y.y?(a.width=Math.max(Math.min(Pe.x-re,E.width),x.width),a.height=Math.max(Math.min(Pe.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width))):(a.width=Math.max(Math.min(Pe.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ue-oe-a.height))):0>=y.y?(a.y=Math.max(Pe.y,ue-E.height),a.y=Math.min(a.y,ue-x.height),a.height=ue-a.y,z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Pe.y-oe,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))),Qe.free(Pe),a},fr.prototype.computeReshape=function(){var a=jn;return this.adornedObject instanceof Cr&&(a=Ev(this.adornedObject)),!(a===Ei||this.diagram.lastInput.shift)},fr.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},fr.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},fr.prototype.computeCellSize=function(){var a=new qn(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},Ve.Object.defineProperties(fr.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 lo))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 lo)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}}}),fr.className="ResizingTool",tr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ur(){Gi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Qe,this.ue=null;var a=new Cr;a.figure="Ellipse",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Qe(NaN,NaN),this.u=0,this.F=50}Ot(Ur,Gi),Ur.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)}},Ur.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new lo,y.type=Gn.Position,y.locationSpot=Qr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if($u(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ur.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},Ur.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)},Ur.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(Qr)},Ur.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)},Ur.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Qe(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ur.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ur.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ur.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ur.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()},Ur.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()}},Ur.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},Ve.Object.defineProperties(Ur.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 lo))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 lo)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}}}),Ur.className="RotatingTool",tr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function zo(){Gi.call(this),this.name="ClickSelecting"}Ot(zo,Gi),zo.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},zo.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},zo.className="ClickSelectingTool";function xr(){Gi.call(this),this.name="Action",this.pk=null}Ot(xr,Gi),xr.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},xr.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()},xr.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))}},xr.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()},xr.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())},xr.prototype.doStop=function(){this.pk=null},xr.className="ActionTool";function Hr(){Gi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Qe(0,0)}Ot(Hr,Gi),Hr.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)},Hr.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Hr.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Di)x.Zc()&&($u(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);hn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Qe.allocAt(a.x,a.y);this.isGridSnapEnabled&&Xf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Qe.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Ve.Object.defineProperties(Hr.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}}}),Hr.className="ClickCreatingTool";function Sr(){Gi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Di;a.layerName="Tool",a.selectable=!1;var y=new Cr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ot(Sr,Gi),Sr.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))},Sr.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Sr.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Sr.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=qn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),qn.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Sr.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()},Sr.prototype.computeBoxBounds=function(){var a=this.diagram;return new vn(a.firstInput.documentPoint,a.lastInput.documentPoint)},Sr.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),br?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 An,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)}},Ve.Object.defineProperties(Sr.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}}}),Sr.className="DragSelectingTool";function $i(){Gi.call(this),this.name="Panning",this.Xt=new Qe,this.xy=new Qe,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(nt.document,"scroll",a.Kw,!1),a.stopTool()}}Ot($i,Gi),$i.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())},$i.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(nt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},$i.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},$i.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},$i.prototype.doMouseMove=function(){this.move()},$i.prototype.doMouseUp=function(){this.move(),this.stopTool()},$i.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)}},Ve.Object.defineProperties($i.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),$i.className="PanningTool",tr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),tr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),tr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),tr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),tr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Fr(){this.F=this.u=this.j=this.o=null}Ve.Object.defineProperties(Fr.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}}}),Fr.className="HTMLInfo";function no(a,y,x){this.text=a,this.hx=y,this.visible=x}no.className="ContextMenuButtonInfo";function xo(){Gi.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Qe,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ot(xo,Gi);function Eo(a){var y=new Fr;y.show=function(b,z,ne){ne.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},sa=y,a.tu=function(){a.stopTool()},y=On("div");var x=On("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=On("style");nt.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",gr,!1),E.addEventListener(y,"selectstart",gr,!1),E.addEventListener(x,"contextmenu",gr,!1)),y.className="goCXforeground",x.className="goCXbackground",nt.document.body&&(nt.document.body.appendChild(y),nt.document.body.appendChild(x)),$o=y,ts=x,os=!0}function gr(a){return a.preventDefault(),!1}xo.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)},xo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},xo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},xo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof nn||(a instanceof jt?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},xo.prototype.doActivate=function(){},xo.prototype.doMouseDown=function(){if(Gi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof lo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Ho(this)},xo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof lo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Ho(this)};function Ho(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Fr||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Vo(a,!0),a.isActive||a.stopTool())}xo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Vo(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=sa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof jt?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof lo&&!a.currentContextMenu.visible&&a.stopTool()}}xo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},xo.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof lo){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 Fr&&a.show(y,x,this);this.currentContextMenu=a},xo.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}},xo.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof lo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fr&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function wa(a){var y=new An;return y.add(new no("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new no("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new no("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new no("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new no("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new no("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new no("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new no("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new no("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new no("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new no("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new no("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new no("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}xo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=wa(this)),$o.innerHTML="",ts.addEventListener("pointerdown",this.tu,!1);var y=this,x=On("ul");x.className="goCXul",$o.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=On("li"),z.className="goCXli";var ne=On("a");ne.className="goCXa",ne.href="#",ne.ky=b.hx,ne.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),ne.textContent=b.text,z.appendChild(ne),x.appendChild(z)}}$o.style.display="block",ts.style.display="block"},xo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===sa){$o.style.display="none",ts.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ts,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ve.Object.defineProperties(xo.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof lo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return os===!1&&sa===null&&Na&&Eo(this),sa},set:function(a){a===null&&(os=!0),sa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var sa=null,os=!1,ts=null,$o=null;xo.className="ContextMenuTool",tr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function oo(){Gi.call(this),this.name="TextEditing",this.Zh=new Qo,this.ia=null,this.V=qr,this.vj=null,this.qa=eo,this.u=1,this.F=!0,this.o=null,this.j=new Fr,this.kt=null,pa(this,this.j)}Ot(oo,Gi);function pa(a,y){if(Na){var x=On("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(mo)):b==="Tab"?(a.acceptText(bo),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==eo){var E=a.kt;a.qa===_o&&(a.qa=ha),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==eo){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 oo)if(z.state===Vs)x.style.border="3px solid red",x.focus();else{var ne=E.ga(Qr),re=b.position,oe=b.scale,le=E.Df()*oe;le<z.minimumEditorScale&&(le=z.minimumEditorScale);var ue=E.naturalBounds.width*le+6,pe=E.naturalBounds.height*le+2,Pe=(ne.x-re.x)*oe;ne=(ne.y-re.y)*oe,re=E.verticalAlignment,oe=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*le,pe=re.y*pe-re.y*oe+re.offsetY-(.5*pe-.5*oe)-oe/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*le+"%",x.style.lineHeight="normal",x.style.width=ue+"px",x.style.left=(Pe-ue/2|0)-1+"px",x.style.top=(ne+pe|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=le,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)}}}oo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||hl&&hl!==this&&(hl.acceptText(Ms),hl&&hl!==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===qr&&!y.isSelected||this.starting===ya&&2>a.lastInput.clickCount)):!1},oo.prototype.doStart=function(){hl=this,this.textBlock!==null&&this.doActivate()},oo.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=_o;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new vn(this.textBlock.ga(cs),this.textBlock.ga(ys));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},oo.prototype.doCancel=function(){this.stopTool()},oo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},oo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Ms)},oo.prototype.acceptText=function(a){switch(a){case Ms:this.qa===Bs?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===_o||this.qa===Vs||this.qa===ha)&&(this.qa=ca,as(this));break;case Va:case mo:case bo:(mo!==a||this.textBlock.isMultiline!==!0)&&(this.qa===_o||this.qa===Vs||this.qa===ha)&&(this.qa=ca,as(this))}};function as(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=Bs,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=Vs,a.doError(b,z))}}oo.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)},oo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},oo.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=eo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},oo.prototype.doStop=function(){hl=null},oo.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)))},oo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ve.Object.defineProperties(oo.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)}}}),oo.prototype.measureTemporaryTextBlock=oo.prototype.Lx;var Va=new mn(oo,"LostFocus",0),Ms=new mn(oo,"MouseDown",1),bo=new mn(oo,"Tab",2),mo=new mn(oo,"Enter",3),Mo=new mn(oo,"SingleClick",0),qr=new mn(oo,"SingleClickSelected",1),ya=new mn(oo,"DoubleClick",2),eo=new mn(oo,"StateNone",0),_o=new mn(oo,"StateActive",1),ha=new mn(oo,"StateEditing",2),ca=new mn(oo,"StateValidating",3),Vs=new mn(oo,"StateInvalid",4),Bs=new mn(oo,"StateValidated",5),hl=null;oo.className="TextEditingTool",oo.LostFocus=Va,oo.MouseDown=Ms,oo.Tab=bo,oo.Enter=mo,oo.SingleClick=Mo,oo.SingleClickSelected=qr,oo.DoubleClick=ya,oo.StateNone=eo,oo.StateActive=_o,oo.StateEditing=ha,oo.StateValidating=ca,oo.StateInvalid=Vs,oo.StateValidated=Bs,tr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ca(a){Yl||(jl(),Yl=!0),this.H=ph,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=wu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Bn,this.ce=new La,this.ce.Yd=this,this.Ei=new Bn,this.pu=new Bn,this.Sr=new Bn,this.pr=new Bn,a&&Object.assign(this,a)}Ca.prototype.Xe=function(a){this.H=a},Ca.prototype.canStart=function(){return!0};function Us(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),As(a.H),a.zb=!0)}function ws(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===wu?(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===su&&y.vc.clear(),a.Qw=!!(a.Pk===Cu&&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(),Xs(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==rl&&E!==null&&(delete E.start.scale,delete E.end.scale),nt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Js(x),Rd(x),a.zb=!1,y.start(),y.bc&&(ja(a),x.Ya(),kh(y,0),Ll(x,!0),ms(a),x.R("AnimationStarting",a)))}))}}function Rs(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function fh(a,y,x,E){a.isTicking||Rs(a)||y instanceof Kn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}be=Ca.prototype,be.fv=function(a){return this.ce.fv(a)},be.Xu=function(a){return this.ce.Xu(a)};function Ea(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 ne=z.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var re=!0;else{for(re=ne.vc.iterator;re.next();){var oe=re.key;if(oe instanceof jt&&oe.diagram!==null||oe instanceof nn){re=!0;break e}}re=!1}re?lu(ne,!1):ne.Xk=!0}}b.pu.clear(),b.bc!==!1&&(ja(b),Ll(b.H),ms(b)),nt.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),nt.requestAnimationFrame(function(){x()}))}function Ta(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ja(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 ms(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}be.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(),Xs(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Xs(y,this.H)},be.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))},be.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Za(this,a))},be.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),fs(this.ce,y,"position",y.position,y.position),Za(this,a))};function js(a,y,x){!a.zb||y.D(x)||Rs(a)||(a.H.pi||(y=x.copy()),fs(a.ce,a.H,"position",y,x))}function ra(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Za(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function zs(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],ne=a[1],re=a[2];a=a[3];var oe=y[0],le=y[1],ue=y[2];return y=y[3],re===0||re===100?(z=oe,ne=le):(ue===0||ue===100)&&(oe=z,le=ne),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ne=b(x,ne,le-ne,E),re=b(x,re,ue-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function jl(){function a(x,E,b,z,ne,re){x.position=new Qe(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}var y=new wi;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new Qe(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("location",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!0):x.location=new Qe(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:placeholder",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new Qe(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:nodeCollapse",function(x,E,b,z,ne,re){var oe=x.actualBounds,le=b.actualBounds;b=le.x+le.width/2-oe.width/2,oe=le.y+le.height/2-oe.height/2,ne<re?x.mm(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re),!1):x.position=new Qe(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re))}),y.add("desiredSize",function(x,E,b,z,ne,re){x.desiredSize=new vn(z(ne,E.width,b.width-E.width,re),z(ne,E.height,b.height-E.height,re))}),y.add("width",function(x,E,b,z,ne,re){x.width=z(ne,E,b-E,re)}),y.add("height",function(x,E,b,z,ne,re){x.height=z(ne,E,b-E,re)}),y.add("fill",function(x,E,b,z,ne,re){x.fill=zs(E,b,ne,re,z)}),y.add("stroke",function(x,E,b,z,ne,re){x.stroke=zs(E,b,ne,re,z)}),y.add("strokeWidth",function(x,E,b,z,ne,re){x.strokeWidth=z(ne,E,b-E,re)}),y.add("strokeDashOffset",function(x,E,b,z,ne,re){x.strokeDashOffset=z(ne,E,b-E,re)}),y.add("background",function(x,E,b,z,ne,re){x.background=zs(E,b,ne,re,z)}),y.add("areaBackground",function(x,E,b,z,ne,re){x.areaBackground=zs(E,b,ne,re,z)}),y.add("opacity",function(x,E,b,z,ne,re){x.opacity=z(ne,E,b-E,re)}),y.add("scale",function(x,E,b,z,ne,re){x.scale=z(ne,E,b-E,re)}),y.add("angle",function(x,E,b,z,ne,re){x.angle=z(ne,E,b-E,re)}),au=y}Ve.Object.defineProperties(Ca.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&&Rn(a,">= 1",Ca,"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}}}),Ca.prototype.stopAnimation=Ca.prototype.Cc;var au=null,Yl=!1,wu=new mn(Ca,"Default",1),Cu=new mn(Ca,"AnimateLocations",2),su=new mn(Ca,"None",3);Ca.className="AnimationManager",Ca.defineAnimationEffect=function(a,y){Yl||(jl(),Yl=!0),au.add(a,y)},Ca.Default=wu,Ca.AnimateLocations=Cu,Ca.None=su;function La(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=Eu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=uo,this.vc=new wi,this.Tt=new wi,this.yl=new Bn,this.Ut=new Bn,this.dw=Oc,a&&Object.assign(this,a)}La.prototype.suspend=function(){this.Xk=!0},La.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,lu(this,!0),ja(this.Yd),Ll(this.H),ms(this.Yd),this.H.redraw()};function Xs(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}be=La.prototype,be.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 nn?a=x:x instanceof jt&&(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===wu&&this===y.defaultAnimation&&(this.Lp=th,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=wf),ja(y),this.yl.each(function(E){E.data=null,a.add(E)}),ms(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Ea(y,this),this)},be.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},be.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof nn?this.H=a:a instanceof jt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Di){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return fs(this,a,y,x,E,b),this};function fs(a,y,x,E,b,z){var ne=a.vc;if(y instanceof nn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(pc(E),av(),E=[gu.j,gu.u,gu.o,gu.F],pc(b),av(),b=[gu.j,gu.u,gu.o,gu.F]),ne.contains(y)){var re=ne.I(y),oe=re.start,le=re.end;oe[x]===void 0&&(oe[x]=Ha(E)),le[x]=Ha(b)}else oe={},le={},oe[x]=Ha(E),le[x]=Ha(b),re=oe.position,y instanceof jt&&re instanceof Qe&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(le.position),re=new gh(oe,le,z),ne.add(y,re);ne=oe[x],ne instanceof Qe&&!ne.w()&&ne.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Di?re.Ku.location=Ha(y.location):z&&(re.Ku[x]=Ha(E))}function Ha(a){return a instanceof Qe||a instanceof qn?a.copy():a}be.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},be.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function lu(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),ja(x),kh(a,b),Ll(a.H,!0),ms(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 kh(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof jt&&z.diagram===null)){var ne=E.value,re=b?ne.end:ne.start;ne=b?ne.start:ne.end;var oe=au,le;for(le in ne)le==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||oe.get(le)===null||oe.get(le)(z,re[le],ne[le],a.Lp,y,x,a)}}}be.stop=function(){return this.bc?(this.Ml(!0),this):this},be.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,ja(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=au;E.next();){var ne=E.key,re=E.value,oe=b?re.end:re.start,le=b?re.start:re.end,ue=re.Ku,pe;for(pe in le)if(z.get(pe)!==null){var Pe=pe;!re.Hu||Pe!=="position:nodeCollapse"&&Pe!=="position:placeholder"||(Pe="position"),z.get(Pe)(ne,oe[pe],ue[pe]!==void 0?ue[pe]:re.Hu?oe[pe]:le[pe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ue.location!==void 0&&ne instanceof Di&&(ne.location=ue.location),re.nv&&ne instanceof Di&&ne.Zb(!1)}if(y.As.clear(),ad(y,!1),y.Ya(),y.N(),Ll(y,!0),x.defaultAnimation===this){for(pe=x.pr.iterator;pe.next();)b=pe.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ll(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),ms(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Xs(this,null),x.Ml(this),y.$b())}},be.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof cr&&(E=y.placeholder),E!==null?(x=E.ga(cs),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Qe(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof cr)for(a=a.memberParts;a.next();)E=a.value,E instanceof li&&this.Cj(E,y)},be.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof cr&&(x=y.placeholder),x!==null){var E=x.ga(cs);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 cr)for(a=a.memberParts;a.next();)E=a.value,E instanceof li&&this.Aj(E,y)}},be.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ve.Object.defineProperties(La.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Rn(a,">= 1",La,"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:St("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}}}),La.prototype.getTemporaryState=La.prototype.Ez,La.prototype.stop=La.prototype.stop,La.prototype.add=La.prototype.add,La.prototype.addTemporaryPart=La.prototype.Iy;function Eu(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function th(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}La.className="Animation",La.EaseLinear=function(a,y,x,E){return x*a/E+y},La.EaseInOutQuad=Eu,La.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},La.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},La.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},La.EaseOutExpo=th;function gh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}gh.className="AnimationState";function Xl(a,y,x){this.xd=null,this.rf=a,this.so=x||Ua,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ks))}Xl.prototype.copy=function(){var a=new Xl(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 Sa(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))}Ve.Object.defineProperties(Xl.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 Ua=new mn(Xl,"Default",1),ks=new mn(Xl,"Immediate",2),Ya=new mn(Xl,"Bundled",3);Xl.className="AnimationTrigger",Xl.Default=Ua,Xl.Immediate=ks,Xl.Bundled=Ya;function fa(a){_r(this),this.H=null,this.Pa=new An,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)}be=fa.prototype,be.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,el(x)}a.clear(),this.Zq.length=0},be.Xe=function(a){this.H=a},be.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,ne=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof cr?b++:oe instanceof li?E++:oe instanceof Kn?z++:oe instanceof lo?ne++:x++}if(re="",0<x&&(re+=x+" Parts "),0<E&&(re+=E+" Nodes "),0<b&&(re+=b+" Groups "),0<z&&(re+=z+" Links "),0<ne&&(re+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
|
|
|
`+x.toString(),E=x.data,E!==null&&Bi(E)&&(re+=" #"+Bi(E)),x instanceof li?re+=" "+Ri(E):x instanceof Kn&&(re+=" "+Ri(x.fromNode)+" "+Ri(x.toNode));return y+" "+this.Pa.count+": "+re},be.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=Qe.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((E!==!0||pd(re)!==!1)&&re.isVisible()&&(b.assign(a),Rr(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return Qe.free(b),re}return Qe.free(b),null},be.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof An||E instanceof Bn||(E=new Bn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Qe.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((b!==!0||pd(oe)!==!1)&&oe.isVisible()){z.assign(a),Rr(z,oe.oe);var le=oe;oe.ji(z,y,x,E)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||E.add(le))}}return Qe.free(z),E},be.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 An||b instanceof Bn||(b=new Bn),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((z!==!0||pd(oe)!==!1)&&oe.isVisible()){var le=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||b.add(le))}}return b},be.Nu=function(a,y,x,E,b,z,ne){if(this.Uh===!1)return b;for(var re=this.Pa.s,oe=re.length;oe--;){var le=re[oe];if((ne!==!0||pd(le)!==!1)&&z(le)&&le.isVisible()){var ue=le;le.Cf(a,y,x,E,b)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||b.add(ue))}}return b},be.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 An||b instanceof Bn)&&(z=b),b=!0),z instanceof An||z instanceof Bn||(z=new Bn),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=Qe.alloc(),oe=Qe.alloc(),le=this.Pa.s,ue=le.length;ue--;){var pe=le[ue];if((ne!==!0||pd(pe)!==!1)&&pe.isVisible()){re.assign(a),Rr(re,pe.oe),oe.h(a.x+y,a.y),Rr(oe,pe.oe);var Pe=pe;pe.og(re,oe,x,E,b,z)&&(x!==null&&(Pe=x(Pe)),Pe===null||E!==null&&!E(Pe)||z.add(Pe))}}return Qe.free(re),Qe.free(oe),z},be.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Qn();for(var b=Qn(),z=0;z<E;z++){var ne=x[z];if(ne.vw=z,ne instanceof Kn){if(ne.fd===!1)continue}else if(ne instanceof lo&&ne.adornedPart!==null)continue;var re=ne.actualBounds;ne.isVisible()&&Cl(re,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&b.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Ov(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++)Ov(b[y]);di(a),di(b)}}};function _s(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}be.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=_s(this,a);var z=this.Zq;z.length=0;for(var ne=y.scale,re=vn.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(vn.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function zl(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 ne=_s(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,le=vn.alloc(),ue=0;ue<z;ue++){var pe=b[ue];E.contains(pe)&&a.Oj(y,pe,x,re,oe,le,!1)}vn.free(le),y.globalAlpha=ne}}}be.Oj=function(a,y,x,E,b,z,ne){if(ne&&!pd(y))a.Hs(y);else{if(E!==null&&y instanceof Kn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,E=y.containingGroup;E!==null;)ne?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(ne=!0,z.assign(E.tb)),E=E.containingGroup;var re=y.actualBounds;if(E=!1,ne&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}E=!z.Re(re)}E&&(a.save(),a instanceof Jl?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*b>x.Oq||re.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&&(Da(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Da(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),Da(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))}},be.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Yr,a,this,y,x,E,b)},be.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&el(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)),Zu(this,a,y),a},be.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,el(y),a};function Zu(a,y,x){if(y=pf(a,y,x),x instanceof cr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];if(re===x&&(y=ne,0<=E)||0>E&&re.containingGroup===x&&(E=ne,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Zu(a,-1,y)}x.svg!==null&&x.svg.remove()}function pf(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,ne=NaN;0<=z&&(ne=a.M(z).zOrder,!!isNaN(ne));)z--;for(var re=y+1,oe=NaN;re<b&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(ne)&&ne>E)for(;;){if(z===-1||ne<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(ne=NaN;0<=--z&&(ne=a.M(z).zOrder,isNaN(ne)););}else if(!isNaN(oe)&&oe<E)for(;;){if(re===b||oe>=E){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<b&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}Ve.Object.defineProperties(fa.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===""&&St("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&St("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)&&Rn(a,"0 <= value <= 1",fa,"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))}}}),fa.prototype.findObjectsNear=fa.prototype.og,fa.prototype.findObjectsIn=fa.prototype.Cf,fa.prototype.findObjectsAt=fa.prototype.ji,fa.prototype.findObjectAt=fa.prototype.ic,fa.className="Layer";function nn(a,y){if(hm||(Qs(),hm=!0),_r(this),ph=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Na){var x=this,E=function(){x.removeEventListener(nt.document,"DOMContentLoaded",E,!1),x.setRTL()};nt.document.body!==null?this.setRTL():x.addEventListener(nt.document,"DOMContentLoaded",E,!1)}this.ol=null,ig.add("Model",Io);var b=this;return this.Hb=function(z){var ne=b.partManager;if(z.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===Yr&&ne.updateDataBindings(z.object,z.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,mf(this),this.model=hy(),this.Wg=!0,sd(this),this.layout=new da,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 cm,a!==void 0&&(typeof a=="string"||nt.Element&&a instanceof Element?Id(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var $h,ph;function mf(a){a.Yd=new Ca,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new An,a.pj=new wi,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Qe(NaN,NaN).freeze(),a.du=new Qe(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Qe(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Ht,a.zu=new Qe(NaN,NaN).freeze(),a.ut=new vn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ti(0,0,0,0).freeze(),a.sj=Oc,a.nu=!1,a.Zt=null,a.fu=null,a.yh=rl,a.zk=Co,a.Fg=rl,a.pq=Co,a.yt=cs,a.Bt=cs,a.Fc=!0,a.pn=!1,a.De=new Bn,a.Eh=new wi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ti(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new lr,a.bq.diagram=a,a.Qg=new lr,a.Qg.diagram=a,a.cj=new lr,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,tv(a),a.ai=new Bn,a.Ht=!0,a.uu=Ic,a.pw=!1,a.wu=Pf,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new wi,a.Xn=new An,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 Ti(5).freeze(),a.Hw=new Bn().freeze(),a.Nt=999999999,a.nw=new Bn().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 Bn,a.ow=new Bn,a.Xh=null,a.aw=new qn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Qe,bounds:new vn,Py:new qn,bA:new qn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new vn(NaN,NaN,NaN,NaN).freeze(),a.wo=new qn(NaN,NaN).freeze(),a.Sp=new vn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new wi;var y=new li,x=new Qo;x.bind(new Xa("text","",Ri)),y.add(x),a.ny=y,a.Lg.add("",y),y=new li,x=new Qo,x.stroke="brown",x.bind(new Xa("text","",Ri)),y.add(x),a.Lg.add("Comment",y),y=new li,y.selectable=!1,y.avoidable=!1,x=new Cr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new qn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new wi,y=new cr,y.selectionObjectName="GROUPPANEL",y.type=Gn.Vertical,x=new Qo,x.font="bold 12pt sans-serif",x.bind(new Xa("text","",Ri)),y.add(x),x=new Gn(Gn.Auto),x.name="GROUPPANEL";var E=new Cr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new gl,E.padding=new Ti(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new wi,y=new Kn,x=new Cr,x.isPanelMain=!0,y.add(x),x=new Cr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Kn,x=new Cr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new lo,y.type=Gn.Auto,x=new Cr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new gl,x.margin=new Ti(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new lo,y.type=Gn.Link,x=new Cr,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 Io,a.toolManager=new Vr,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ae,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=cc(),a.eq=null,a.fq=ia,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 Qe,a.zy=500,a.wp=new Qe,a.wq=!1}nn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Kd=null,cd="",Bc(this,!1),this.Xn.clear(),mg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Bc(a,y){a.animationManager.Cc(!0),a.Hw=new Bn().freeze(),a.nw=new Bn().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=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==b&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<ne;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(),mg(),a.Og.clear(),Wr=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function cc(){return null}nn.prototype.reset=function(){this.clear(),this.vb=!0,mf(this),Dh(this),this.Wg=!0,sd(this),this.layout=new da,this.Wg=!1,this.model=hy(),this.model.undoManager=new Oo,this.vb=this.rn=!1,this.N()},nn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=nt.document.body);var y=On("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},nn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=nt.document.body);var y=0;if(Na){var x=um;y=$h,x===null&&(x=um=On("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=$h=On("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||br||(y=11)}this.Db=y,this.Gw=!0},nn.prototype.qb=function(a){a.classType===nn&&(this.autoScale=a)},nn.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 Id(a,y){if(Na){if(y!=null||St("Diagram setup requires an argument DIV."),a.Ka!==null&&St("Diagram has already completed setup."),typeof y=="string"?a.Ka=nt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:St("No DIV or DIV id supplied: "+y),a.Ka===null&&St("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&St("Invalid div id; div already has a Diagram associated with it."),!a.ol&&nt.ResizeObserver){var x=ln(function(){a.$b()},250);a.ol=new nt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}nt.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=nt.go;var b=new Wu(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",nt.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),Wd(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Wu(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Na){b=On("div");var z=On("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=Uf,b.addEventListener("pointerdown",yf),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=ln(function(){a.Yh=null,a.N()},300),a.Ov=ln(function(){Rd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var re=_l(a,ne,!0);re.bubbles=!0;var oe=0,le=0;re.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(oe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(le=0<ne.deltaY?1:-1),re.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-oe:-le):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(oe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(le=0<ne.wheelDeltaY?-1:1),re.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-oe:-le):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(re.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),hu(re,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,_l(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[ne.pointerId]===void 0&&(re[ne.pointerId]=ne),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType)if(re[1]!==null&&re[1].pointerId===ne.pointerId)re[1]=ne,oe=!0;else if(re[0]===null)re[0]=ne;else if(re[1]===null)re[1]=ne,oe=!0;else{ne.preventDefault();return}else re[0]=ne;(re=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var le=oe;oe=_d(a,ne,!0,!1,!0,le),Tc(a,ne,oe),oe.targetDiagram=zd(ne,ne.target),oe.targetObject=null,le||oe.clone(a.bq),le=a.uw,re=re?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(le.x-ne.screenX)>re||Math.abs(le.y-ne.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():hu(oe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType){if(re[1]!==null&&re[1].pointerId===ne.pointerId){re[1]=ne;return}if(re[0]===null)re[0]=ne;else return}else re[0]=ne;if(re[0].pointerId===ne.pointerId){re=_d(a,ne,!1,!1,!1,re[1]!==null);var oe=nt.document.elementFromPoint(ne.clientX,ne.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var le=a,ue=ne;oe&&oe.H&&(ue=ne,le=oe.H),re.targetDiagram=le,Tc(a,ue,re),re.targetObject=null,a.doMouseMove(),hu(re,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var re=ne.pointerType==="touch"||ne.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[ne.pointerId],ne.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==ne.pointerId&&oe[0].pointerType===ne.pointerType)oe[1]!==null&&oe[1].pointerId===ne.pointerId&&(oe[1]=null);else{oe[0]=null,oe=_d(a,ne,!1,!0,!0,!1);var le=nt.document.elementFromPoint(ne.clientX,ne.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),le!==null&&le.H instanceof nn&&le.H!==a&&Tc(le.H,ne,oe),le===null&&(le=ne.target),Tc(a,ne,oe),oe.clickCount=a.yq,oe.targetDiagram=zd(ne,le),oe.targetObject=null,a.doMouseUp(),hu(oe,ne),re&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[ne.pointerId]&&delete re[ne.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===ne.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var re=a.oj;re[0]!==null&&re[0].pointerId===ne.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null)},a.Vp=E.Z["d"+Ef[1]+Ef[2]+"wI"+Ud.slice(1,5)]["b"+Ax.slice(1,y)](E.Z,Cf,y,y),E.Vc(!0),$g(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}nn.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},nn.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function $g(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(nt,"resize",a.Ov,!1)}function Js(a){30<a.Sq&&(a.Yh=1)}function ad(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Ni&&Ni.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}nn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:nt.devicePixelRatio||1},nn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},nn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},nn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},nn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},nn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},nn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},nn.prototype.doFocus=function(){this.focus()},nn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=nt.scrollX||nt.pageXOffset,y=nt.scrollY||nt.pageYOffset;this.ta.focus(),nt.scrollTo(a,y)}},nn.prototype.Oy=function(){this.H.R("GainedFocus")},nn.prototype.Ny=function(){this.H.R("LostFocus")};function Rd(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===rl&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function sd(a){var y=new fa;y.name="Background",a.Al(y),y=new fa,y.name="",a.Al(y),y=new fa,y.name="Foreground",a.Al(y),y=new fa,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new fa,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new fa,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function vf(a){var y=new Gn(Gn.Grid);y.name="GRID";var x=new Cr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Cr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Cr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Cr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Cr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Cr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Di,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function Uf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Uh(this.H)}function yf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Uh(this.H)}nn.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,ne=E.x-z.left,re=E.y-z.top,oe=E.width+z.left+z.right,le=E.height+z.top+z.bottom,ue=E.right+z.right;z=E.bottom+z.bottom;var pe=b.x;E=b.y;var Pe=b.width,Ce=b.height,Le=b.right,Oe=b.bottom;b=this.scale;var rt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":rt=rt+a.scrollWidth-a.clientWidth;break;case"reverse":rt=a.scrollWidth-rt-a.clientWidth}var Ye=rt;Pe<oe||Ce<le?(rt=Qe.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ye&&(rt.x=Ye/b+ne,this.ju=Ye),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(rt.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=rt,Qe.free(rt),this.Ee=this.qr=!1):(rt=Qe.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<pe&&(this.position=rt.h(Ye+ne,this.position.y)),ue>Le&&(this.position=rt.h(-(y.scrollWidth-this.Aa)+Ye-this.Aa/b+ue,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=rt.h(this.position.x,a.scrollTop+re)),z>Oe&&(this.position=rt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Qe.free(rt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ue=E.right,Le=b.right,z=E.bottom,Oe=b.bottom,ne=E.x,pe=b.x,re=E.y,E=b.y,Pe>=oe&&ne>=pe&&ue<=Le&&(x.style.width="1px"),Ce>=le&&re>=E&&z<=Oe&&(x.style.height="1px"))}},nn.prototype.computeBounds=function(a){return a===void 0&&(a=new vn),As(this),jd(this,a)};function jd(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 ne=E[z];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var re=ne.length,oe=0;oe<re;oe++){var le=ne[oe];le.isInDocumentBounds&&le.isVisible()&&(le=le.actualBounds,le.w()&&(x?(x=!1,y.assign(le)):y.ed(le)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}nn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Jt(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Kn||(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 Kn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new vn(NaN,NaN,0,0):x};function uu(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=Qe.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=vn.allocAt(0,0,E.width,E.height);var b=Qe.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,vn.free(E),Qe.free(b),Qe.free(x)}x=a.yh,y&&a.Fg!==rl&&(x=a.Fg);var z=x!==rl?kc(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var ne=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?Qr:oe),Sf(a,a.documentBounds,b,ne,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,tt.B(z.x,x)&&tt.B(z.y,E)&&tt.B(z.width,b)&&tt.B(z.height,ne)||a.onViewportBoundsChanged(new vn(x,E,b,ne),z,y,!1)}}function kc(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),ne=a.ya+(a.Be?a.Db:0),re=z/b,oe=ne/E;return y===cu?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===dd?(y=oe>re?(ne-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}nn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Oc,this.scale=kc(this,cu),a!==Oc&&(uu(this,!1),Sf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},be=nn.prototype,be.BA=function(a,y){y===void 0&&(y=cu);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===cu||y===dd)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===dd?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 Qe(a.x,a.y)}},be.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Qe(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))},be.zz=function(a){if(a instanceof jt){this.eq=a;var y=Qe.alloc();this.fq=this.op(a.ga(cs,y)),Qe.free(y)}else this.eq=null,this.fq=ia};function Sf(a,y,x,E,b,z){var ne=Qe.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var le=Qe.alloc();le=a.eq.ga(cs,le),re=le.x-a.fq.x/a.scale,oe=le.y-a.fq.y/a.scale,b=Fa,Qe.free(le)}(z||a.scrollMode===Oc)&&(b.sb()&&(x>y.width&&(re=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(oe=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?(re=Math.min(re+x/2,y.right+Math.max(z,b.right)-x/2),re=Math.max(re,y.left-Math.max(z,b.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(oe=Math.min(oe+E/2,y.bottom+Math.max(x,b.bottom)-E/2),oe=Math.max(oe,y.top-Math.max(x,b.top)+E/2),oe-=E/2):oe>y.top?oe=y.top:oe<y.bottom-E&&(oe=y.bottom-E)),ne.x=isFinite(re)?re:-a.yb.left,ne.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),js(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Dh(a),Qe.free(ne)}be.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=nh(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Di)return a}else if(a=nh(this,a,function(x){return x.part}),a instanceof Di)return a;return null},be.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),As(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 nh(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),As(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}be.lz=function(a,y,x){return y===void 0&&(y=!0),Kh(this,a,function(E){return E.part},y?function(E){return E instanceof Di&&E.canSelect()}:null,x)};function Kh(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof An||b instanceof Bn||(b=new Bn),As(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}be.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof An||E instanceof Bn||(E=new Bn),As(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},be.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Ac(this,a,function(b){return b instanceof Di&&(!x||b.canSelect())},y,E)},be.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof An||b instanceof Bn||(b=new Bn),As(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ne=z.value;ne.visible&&ne.Cf(a,y,x,E,b)}return b},be.Nu=function(a,y,x,E,b,z){var ne=new Bn;As(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,E,ne,b,z)}return ne};function Ac(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 An||b instanceof Bn||(b=new Bn),As(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,z,x,E,b)}return b}be.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),dc(this,a,y,function(z){return z instanceof Di&&(!E||z.canSelect())},x,b)},be.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 An||b instanceof Bn)&&(z=b),b=!0),z instanceof An||z instanceof Bn||(z=new Bn),As(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var re=ne.value;re.visible&&re.og(a,y,x,E,b,z)}return z};function dc(a,y,x,E,b,z){var ne=null;for(ne===void 0&&(ne=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof An||b instanceof Bn)&&(z=b),b=!0),z instanceof An||z instanceof Bn||(z=new Bn),As(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,ne,E,b,z)}return z}nn.prototype.acceptEvent=function(a){return _l(this,a,a instanceof MouseEvent)};function _l(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Tc(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),br&&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=zd(y,y.target),E.targetObject=null,E}function zd(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 _d(a,y,x,E,b,z){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,br&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=E,ne.handled=!1,ne.bubbles=b,ne.isMultiTouch=z,ne}function hu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}nn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=_l(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(),hu(x,a)},nn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(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(),hu(x,a)},nn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),hu(x,a)},nn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),hu(x,a)},nn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Qe(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?Rr(new Qe(y,a),this.Ab):new Qe(y,a)};function Tc(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,ne=0,re=0;E!==null&&(E=E.getBoundingClientRect(),ne=y.clientX-b/E.width*E.left,re=y.clientY-z/E.height*E.top),x.viewPoint.h(ne,re),a.Ab!==null?(y=Qe.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),Qe.free(y)):x.documentPoint.h(ne,re)}function Zd(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))}}nn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Hd(a){a.ld||As(a),a.Va()}nn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},be=nn.prototype,be.Pz=function(){return this.kg},be.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ll(this),this.hf=!1,this.du=new Qe(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&xn(function(){E.ld=!1,Us(y,"Model"),a(E)},1)},be.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;nt.requestAnimationFrame(function(){y.kg&&y.bd()})}},be.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ll(this))};function Vh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Uh(a)||(y&&As(a),x&&uu(a,!1))}function Ll(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,ne=0;ne<z;ne++){var re=b[ne];ls(re,!1),re.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(oe){oe.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Rd(a),Vh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Th(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),As(a),z=!1,(!a.hf||a.xh)&&(a.hf?Qg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Qg(a,!1)),z=!0),a.Jk=!1,As(a),a.ou||Hd(a),Vh(a,!0,!1),ne=!1,z?(x=vn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Gd(a)),a.R("LayoutCompleted"),Vh(a,!0,!1),vn.free(x)):x.Ok&&x.Qw&&(a.Fg!==rl?a.scale=kc(a,a.Fg):a.yh!==rl?a.scale=kc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),uu(a,!0)),z&&ne&&a.eb("Initial Layout"),As(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Gd(a){if(a.Fg!==rl)a.scale=kc(a,a.Fg);else if(a.yh!==rl)a.scale=kc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}uu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Th(a)}function As(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 Bn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof cr&&E.U&65536&&(E.U=E.U^65536)})}}be.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof cr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof cr&&x.isVisible()&&ba(this,x);for(a.reset();a.next();)x=a.value,x instanceof Kn&&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 lo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ba(a,y){for(var x=Qn(),E=Qn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof cr?(fu(z)||dl(z)||gd(z))&&ba(a,z):z instanceof Kn?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(di(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();di(E)}be.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},be.gc=function(a){if(this.Ka!==null){if(this.ta===null&&St("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Mu(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,ne=Math.round(y.y*b)/b,re=this.Ab;for(re.reset(),b!==1&&re.scale(b),y.x===0&&y.y===0||re.translate(-z,-ne),a.ti=null,Uy(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),il(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?Yd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Ht.prototype.Cd=Ht.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Mu(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 e;z=this.Ab,z.reset(),ne=this.Mb,re=this.pa;var oe=this.Ca,le=Math.round(re.x*oe)/oe,ue=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-le,-ue),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),il(this,a),re=0;re<b;re++)a.setTransform(ne,0,0,ne,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?Yd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Ht.prototype.Cd=Ht.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Ni&&Ni.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 ns(a,y,x,E,b,z,ne,re,oe,le){if(a.Ka!==null){a.ta===null&&St("No canvas specified"),ne===void 0&&(ne=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),le===void 0&&(le=!1),Mu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ue=a.Ca;a.Ca=b;var pe=a.Wa.s,Pe=pe.length;try{var Ce=new vn(z.x,z.y,E.width/b,E.height/b),Le=Ce.copy();Le.Co(x),Th(a,Le),As(a),a.Fd(pe,Pe,a,Ce),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,E.width,E.height));var Oe=a.Mb;y.scale(Oe,Oe);var rt=Ht.alloc();rt.reset(),rt.translate(x.left,x.top),rt.scale(b),z.x===0&&z.y===0||rt.translate(-z.x,-z.y),y.setTransform(rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),y.yc(),y instanceof Jl&&Uy(y,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),Ht.free(rt),il(a,y),y.globalAlpha=a.pb;var Ye=a.Qj("Grid");if(ne){var vt=new Bn,Pt=ne.iterator;for(Pt.reset();Pt.next();){var Ct=Pt.value;Ct instanceof Di&&(le||Ct.layer!==Ye)&&(Ct.Gj(),vt.add(Ct))}for(le=0;le<Pe;le++)zl(pe[le],y,a,vt,oe);vt.each(function(rn){return rn.Gj()})}else for(vt=0;vt<Pe;vt++){var It=pe[vt];It===Ye?le&&It.gc(y,a,!0):It.gc(y,a,oe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=ue,a.ib.Vc(!0),a.vd=!0,a.Fd(pe,Pe,a,a.viewportBounds),Th(a),a.ib instanceof Jl&&(a.ib.Nj.PA(),a.redraw())}}}be.Gf=function(a){return this.Rg[a]},be.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},be.Tx=function(){this.Rg=new zi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(br||Br),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function il(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}be.Ql=function(a){return this.on[a]},be.sA=function(a,y){this.on[a]=y},be.Sx=function(){this.on=new zi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},be.set=function(a){return Object.assign(this,a),this},be.Du=function(a){return this.nm(a)},be.nm=function(a){return bu(this,a),this};function bu(a,y){var x=a instanceof Gn,E=a instanceof nn,b;for(b in y){b===""&&St("Setting properties requires non-empty property names");var z=a,ne=b;if(x||E){var re=b.indexOf(".");if(0<re){var oe=b.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),hn(z)?ne=b.substr(re+1):St("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ne[0]!=="_"&&!Xi(z,ne))if(E&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(E&&ne==="Changed"){a.Pe(y[ne]);continue}else if(E&&Xi(a.toolManager,ne))z=a.toolManager;else if(E&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof Li&&ne==="Changed"){a.Pe(y[ne]);continue}else St('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[b],ne[0]==="_"&&z instanceof jt&&z.Vw(ne)}}be.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new wi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},be.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")},nn.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!==wf&&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=vn.alloc(),Jg(this,this.computeBounds(E)),vn.free(E)),E=this.ta,E===null||E instanceof Oh)))){var ne=this.Mb;b=this.Aa*ne;var re=this.ya*ne,oe=this.scale*ne;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==b&&(oe.width=b),oe.height!==re&&(oe.height=re),a.clearRect(0,0,b,re),oe=190*ne;var le=70*ne,ue=Math.max(z,0),pe=Math.max(y,0),Pe=Math.floor(b-ue),Ce=Math.floor(re-pe);a.drawImage(E.Oa,ue,pe,Pe,Ce,0,0,Pe,Ce),Yd(this.Yf,this)&&a.clearRect(0,0,oe,le),E=Qn(),a=Qn(),Ce=Math.abs(z),Pe=Math.abs(y);var Le=ue===0?0:b-Ce;ue=Qe.allocAt(Le,0),Ce=Qe.allocAt(Ce+Le,re),a.push(new vn(Math.min(ue.x,Ce.x),Math.min(ue.y,Ce.y),Math.abs(ue.x-Ce.x),Math.abs(ue.y-Ce.y)));var Oe=this.Ab;if(Oe.reset(),Oe.scale(ne,ne),this.Ca!==1&&Oe.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&Oe.translate(-ne.x,-ne.y),Rr(ue,Oe),Rr(Ce,Oe),E.push(new vn(Math.min(ue.x,Ce.x),Math.min(ue.y,Ce.y),Math.abs(ue.x-Ce.x),Math.abs(ue.y-Ce.y))),Le=pe===0?0:re-Pe,ue.h(0,Le),Ce.h(b,Pe+Le),a.push(new vn(Math.min(ue.x,Ce.x),Math.min(ue.y,Ce.y),Math.abs(ue.x-Ce.x),Math.abs(ue.y-Ce.y))),Rr(ue,Oe),Rr(Ce,Oe),E.push(new vn(Math.min(ue.x,Ce.x),Math.min(ue.y,Ce.y),Math.abs(ue.x-Ce.x),Math.abs(ue.y-Ce.y))),Yd(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,ue.h(b,re),Ce.h(oe+b,le+re),a.push(new vn(Math.min(ue.x,Ce.x),Math.min(ue.y,Ce.y),Math.abs(ue.x-Ce.x),Math.abs(ue.y-Ce.y))),Rr(ue,Oe),Rr(Ce,Oe),E.push(new vn(Math.min(ue.x,Ce.x),Math.min(ue.y,Ce.y),Math.abs(ue.x-Ce.x),Math.abs(ue.y-Ce.y)))),Qe.free(ue),Qe.free(Ce),Vh(this,!1,!0),this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Mu(this),re=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*re,this.ya*re),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,ne=this.Ca,oe=Math.round(z.x*ne)/ne,le=Math.round(z.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),z.x===0&&z.y===0||y.translate(-oe,-le),b.save(),b.beginPath(),z=a.length,ne=0;ne<z;ne++)oe=a[ne],oe.width!==0&&oe.height!==0&&b.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(b.clip(),b.setTransform(re,0,0,re,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),il(this,b),b.globalAlpha=this.pb,re=0;re<z;re++)if(ne=y[re],oe=E,ne.visible&&ne.pb!==0){le=_s(ne,b),pe=ne.Zq,pe.length=0,ue=this.scale,Pe=vn.alloc(),Ce=ne.Pa.s,Oe=Ce.length,Le=oe.length;for(var rt=0;rt<Oe;rt++){var Ye=Ce[rt],vt=nf(Ye,Ye.actualBounds);e:{for(var Pt=2/ue,Ct=4/ue,It=0;It<Le;It++){var rn=oe[It];if(rn.width!==0&&rn.height!==0&&vt.Vu(rn.x-Pt,rn.y-Pt,rn.width+Ct,rn.height+Ct)){vt=!0;break e}}vt=!1}vt&&ne.Oj(b,Ye,this,pe,ue,Pe,!0)}vn.free(Pe),b.globalAlpha=le}b.restore(),b.Vc(!0),this.Yf&&Yd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}di(E),di(a),this.ld=!1}}else this.bd();x&&(Js(this),this.bd(),ad(this,!0))}else x?(Js(this),this.bd(),ad(this,!0)):this.bd()}};function Mu(a){a.pn!==!1&&(a.pn=!1,Wd(a,a.Aa,a.ya))}function Wd(a,y,x){Dh(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Uh(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,ne=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=b.clientWidth||x+ne,le=b.clientHeight||E+re,ue=a.viewportBounds;b=ue.x;var pe=ue.y,Pe=ue.width,Ce=ue.height;if((oe!==x+ne||le!==E+re)&&(a.gf=!1,a.Be=!1,re=ne=0,a.Aa=oe,a.ya=le,z=a.pn=!0,Dh(a)),!a.hf||!a.viewportBounds.w())return!0;var Le=a.ku,Oe=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var rt=a.documentBounds,Ye=0,vt=0,Pt=0,Ct=0,It=ue.width,rn=ue.height,ri=a.rj;a.contentAlignment.sb()?(rt.width>It&&(Ye=ri.left,vt=ri.right),rt.height>rn&&(Pt=ri.top,Ct=ri.bottom)):(Ye=ri.left,vt=ri.right,Pt=ri.top,Ct=ri.bottom);var Pi=rt.width+Ye+vt,fi=rt.height+Pt+Ct;ri=a.scale;var $n=Pi>oe/ri,In=fi>le/ri;if(!(z||a.gf||a.Be||$n||In))return!0;Ye=rt.x-Ye,oe=ue.x,vt=rt.right+vt,le=ue.right+ne,Pt=rt.y-Pt;var ur=ue.y;rt=rt.bottom+Ct,ue=ue.bottom+re;var Ji="1px";if(Ct="1px",a.scrollMode===Oc&&($n||In)&&($n&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&($n=1,Ye+1<oe&&($n=Math.max((oe-Ye)*ri+a.Aa,$n)),vt>le+1&&($n=Math.max((vt-le)*ri+a.Aa,$n)),It+ne+1<Pi&&($n=Math.max((Pi-It)*ri+a.Aa,$n)),Ji=$n.toString()+"px"),In&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&($n=1,Pt+1<ur&&($n=Math.max((ur-Pt)*ri+a.ya,$n)),rt>ue+1&&($n=Math.max((rt-ue)*ri+a.ya,$n)),rn+re+1<fi&&($n=Math.max((fi-rn)*ri+a.ya,$n)),Ct=$n.toString()+"px")),$n=Ji!=="1px",In=Ct!=="1px",$n&&In||!$n&&!In||(In&&(le-=a.Db),$n&&(ue-=a.Db),Pi<It+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Ye+1<oe&&(ne=Math.max((oe-Ye)*ri+a.Aa,ne)),vt>le+1&&(ne=Math.max((vt-le)*ri+a.Aa,ne)),It+1<Pi&&(ne=Math.max((Pi-It)*ri+a.Aa,ne)),Ji=ne.toString()+"px"),$n=Ji!=="1px",ne=a.ya,$n!==a.Be&&(ne=$n?a.ya-a.Db:a.ya+a.Db),fi<rn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,Pt+1<ur&&(re=Math.max((ur-Pt)*ri+ne,re)),rt>ue+1&&(re=Math.max((rt-ue)*ri+ne,re)),rn+1<fi&&(re=Math.max((fi-rn)*ri+ne,re)),Ct=re.toString()+"px"),In=Ct!=="1px"),a.qr&&$n===a.Be&&In===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if($n!==a.Be&&(Ji==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=$n,Oe.style.width=Ji,In!==a.gf&&(Ct==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=Qe.alloc(),In?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),Qe.free(re))),z&&Dh(a),a.gf=In,Oe.style.height=Ct,a.gu=!0,z&&(a.pn=!0),y=Le.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(It+1<Pi?y=(a.position.x-Ye)*ri:Ye+1<oe?y=Le.scrollWidth-Le.clientWidth:vt>le+1&&(y=a.position.x*ri)),a.tn)switch(a.bu){case"negative":y=-(Le.scrollWidth-y-Le.clientWidth);break;case"reverse":y=Le.scrollWidth-y-Le.clientWidth}return Le.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(rn+1<fi?Le.scrollTop=(a.position.y-Pt)*ri:Pt+1<ur?Le.scrollTop=Le.scrollHeight-Le.clientHeight:rt>ue+1&&(Le.scrollTop=a.position.y*ri)),oe=a.Aa,le=a.ya,Le.style.width=oe+(a.gf?a.Db:0)+"px",Le.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||E!==le||a.animationManager.zb?(x=vn.allocAt(b,pe,Pe,Ce),a.onViewportBoundsChanged(x,a.viewportBounds,ri,z),vn.free(x),!1):!0}be=nn.prototype,be.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&St("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&&St('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(ko,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},be.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){$d(y,x)}),(a instanceof lo||a instanceof cr&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){sy(y.partManager,x)}),dl(a)!==!0&&gd(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},be.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&qd(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},be.remove=function(a){ld(this,a,!0)};function ld(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(Yo,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}be.Is=function(a,y){if(y===void 0&&(y=!1),Jt(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 Bn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},be.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},nn.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Yf(this)),this.toolManager!==null){var b=new wi;if(a!==null)if(Jt(a))for(var z=0;z<a.length;z++)Hu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Hu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Hu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Hu(this,b,a.value,x,E);for(a=this.links;a.next();)Hu(this,b,a.value,x,E)}Ah(this,b,y,E,x)}};function Hu(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=Yf(a)),x instanceof li){if(y.add(x,a.Pd(b,x,x.location)),x instanceof cr&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Hu(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var ne=z.value;if(!y.contains(ne)){var re=ne.fromNode,oe=ne.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Hu(a,y,ne,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Hu(a,y,x.value,E,b)}else if(x instanceof Kn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Hu(a,y,x.value,E,b);else x instanceof lo||y.add(x,a.Pd(b,x,x.location))}function Ah(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Qe.alloc(),ne=Qe.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Jf(a,y);for(var re=Qn(),oe=Qn(),le=y.iterator,ue=Qe.alloc();le.next();){var pe=le.key,Pe=le.value;if(pe.Zc()){var Ce=Kg(a,pe,y);Ce!==null?re.push(new ie(pe,Pe,Ce)):(!b||pe.canMove())&&(Ce=Pe.point,z.assign(Ce),a.computeMove(pe,z.add(ne),E,ue),pe.location=ue,Pe.shifted===void 0&&(Pe.shifted=new Qe),Pe.shifted.assign(ue.re(Ce)))}else le.key instanceof Kn&&oe.push(le.sa)}for(Qe.free(ue),b=re.length,le=0;le<b;le++)pe=re[le],z.assign(pe.info.point),pe.Su.shifted===void 0&&(pe.Su.shifted=new Qe),pe.node.location=z.add(pe.Su.shifted);for(b=Qe.alloc(),le=Qe.alloc(),pe=oe.length,Pe=0;Pe<pe;Pe++){var Le=oe[Pe];if(Ce=Le.key,Ce instanceof Kn)if(Ce.suspendsRouting){Ce.Tg=null,ue=Ce.fromNode;var Oe=Ce.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Oe=Le.value.point,Ce.dragComputation===null)y.add(Ce,a.Pd(E,Ce,ne)),Gc(Ce,ne.x-Oe.x,ne.y-Oe.y);else{Le=Qe.allocAt(0,0),(ue=Ce.i(0))&&ue.w()&&Le.assign(ue);var rt=ue=Qe.alloc().assign(Le).add(ne);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(rt=Qe.alloc(),Xf(a,Ce,ue,rt,E)),ue.assign(Ce.dragComputation(Ce,ue,rt)).re(Le),y.add(Ce,a.Pd(E,Ce,ue)),Gc(Ce,ue.x-Oe.x,ue.y-Oe.y),Qe.free(Le),Qe.free(ue),rt!==ue&&Qe.free(rt)}else ue!==null&&(b.assign(ue.location),rt=y.I(ue),rt!==null&&b.re(rt.point)),Oe!==null&&(le.assign(Oe.location),rt=y.I(Oe),rt!==null&&le.re(rt.point)),ue!==null&&Oe!==null?b.Xa(le)?(ue=Le.value.point,Oe=z,Oe.assign(b),Oe.re(ue),y.add(Ce,a.Pd(E,Ce,b)),Gc(Ce,Oe.x,Oe.y)):(Ce.suspendsRouting=!1,Ce.bb()):(Le=Le.value.point,ue=ue!==null?b:Oe!==null?le:ne,y.add(Ce,a.Pd(E,Ce,ue)),Gc(Ce,ue.x-Le.x,ue.y-Le.y))}else(Ce.fromNode===null||Ce.toNode===null)&&(ue=Le.value.point,y.add(Ce,a.Pd(E,Ce,ne)),Gc(Ce,ne.x-ue.x,ne.y-ue.y))}Qe.free(z),Qe.free(ne),Qe.free(b),Qe.free(le),di(re),di(oe),x||(As(a),ud(a,y))}}nn.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Qe),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Qe.alloc(),Xf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var ne=a.minLocation,re=ne.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,le=oe.x;return isNaN(le)&&(le=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(re,Math.min(x.x,le)),Math.max(ne,Math.min(x.y,oe))),b!==y&&Qe.free(b),E};function Yf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Xf(a,y,x,E,b){if(b===void 0&&(b=Yf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var ne=b.gridSnapOrigin,re=ne.x;if(ne=ne.y,b=b.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(ne)&&(ne=z.y)}z=Qe.allocAt(0,0),z.yi(0,0,a,y,b),tt.No(x.x,x.y,re+z.x,ne+z.y,a,y,E),Qe.free(z)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Kn&&(y.suspendsRouting=!0)}function ud(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Kn&&(x.suspendsRouting=!1,Vv(x)&&x.bb())}a.Mr=!1}}function Kg(a,y,x){return y=y.containingGroup,y!==null&&(a=Kg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}be=nn.prototype,be.Pd=function(a,y,x){if(x===void 0)return new fc(uo);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new fc(new Qe(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new fc(x.copy())};function Vg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&St("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&St("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&St("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&St("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&&St("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}be.Al=function(a){Vg(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(ko,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},be.Ww=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Yo,"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(ko,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},be.Cy=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Yo,"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(ko,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},be.kA=function(a){if(a.diagram!==this&&St("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(Yo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},be.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},be.Yw=function(a){return this.pf===null&&(this.pf=new An),this.pf.add(a),this.model.Pe(a),this},be.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},be.Pe=function(a){return this.zg===null&&(this.zg=new An),this.zg.add(a),this},be.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},be.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Do&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},be.cb=function(a,y,x,E,b,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new Oi;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=E,re.oldParam=z,re.newValue=b,re.newParam=ne,this.ds(re)},be.g=function(a,y,x,E,b){this.cb(Yr,a,this,y,x,E,b)},nn.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===Yr){var b=a.object;if(la(b,a.propertyName,a.I(y)),b instanceof jt){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===ko){var ne=a.object,re=a.newParam,oe=a.newValue;if(ne instanceof Gn)if(typeof re=="number"&&oe instanceof jt){y?ne.pc(re):ne.Gb(re,oe);var le=ne.part;le!==null&&le.Wb()}else typeof re=="number"&&oe instanceof us&&(oe.isRow?h1(ne,re,y?void 0:oe):c1(ne,re,y?void 0:oe));else if(ne instanceof fa){var ue=a.oldParam===!0;typeof re=="number"&&oe instanceof Di&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(ue?re:-1,oe,ue)):ne.oi(re,oe,ue))}else ne instanceof nn?typeof re=="number"&&oe instanceof fa&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):St("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Yo){var pe=a.object,Pe=a.oldParam,Ce=a.oldValue;if(pe instanceof Gn)typeof Pe=="number"&&Ce instanceof jt?y?pe.Gb(Pe,Ce):pe.pc(Pe):typeof Pe=="number"&&Ce instanceof us&&(Ce.isRow?h1(pe,Pe,y?Ce:void 0):c1(pe,Pe,y?Ce:void 0));else if(pe instanceof fa){var Le=a.newParam===!0;typeof Pe=="number"&&Ce instanceof Di&&(y?0>pe.Pa.indexOf(Ce)&&pe.oi(Pe,Ce,Le):(Ce.isSelected=!1,Ce.isHighlighted=!1,Ce.Wb(),pe.pc(Le?Pe:-1,Ce,Le)))}else pe instanceof nn?typeof Pe=="number"&&Ce instanceof fa&&(y?(Ce.Xe(this),this.Wa.Gb(Pe,Ce)):this.Wa.mb(Pe)):St("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Do&&St("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},nn.prototype.Ea=function(a){return this.undoManager.Ea(a)},nn.prototype.eb=function(a){return this.undoManager.eb(a)},nn.prototype.Kf=function(){return this.undoManager.Kf()},nn.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}},nn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},nn.prototype.rp=function(){this.partManager.rp()};function Ug(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Dh(a),a.N(),a.Ee=!0,E.zb&&(Rs(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Dh(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ne=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(Iu)?re=0:le.Hf(Ys)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(oe)&&(le.$c()?le.Hf(Su)?oe=0:le.Hf(ul)&&(oe=ne-1):oe=le.sb()?le.y*(ne-1):ne/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=Qe.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,Qe.free(z),a.Ca=x,Dh(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),uu(a,!1),E.zb&&(Rs(E)||E.ce.add(E.H,"scale",y,a.Ca))}}nn.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!==rl||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Vr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),_a(b,this)),this.vb||this.invalidateViewport(a,y),Th(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 Th(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=qn.alloc(),b=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe],ue=Math.abs(le.interval);2>ue||(pv(le.figure)?z=z*ue/tt.vx(z,ue):b=b*ue/tt.vx(b,ue))}if(ne=x.gridCellSize,E.h(z*ne.width,b*ne.height),y!==void 0)b=y.width,z=y.height,a=y.x,ne=y.y;else{if(y=vn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){vn.free(y);return}b=y.width,z=y.height,a=y.x,ne=y.y,vn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Qe.alloc(),tt.No(a,ne,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),qn.free(E),x.part.location=y,Qe.free(y)}}nn.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)}},nn.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))},nn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Di||St("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Di||St("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},nn.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()}},be=nn.prototype,be.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},be.Jz=function(a){a=new Bn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Di||St("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},be.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Qe.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)),Qe.free(z);return}St("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):St("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Qe.free(z)},be.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)},be.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},be.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)},be.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,ne=y.m11,re=y.m12,oe=y.m21,le=y.m22,ue=y.dx,pe=y.dy,Pe=x*ne+E*oe+ue;y=x*re+E*le+pe;var Ce=b*ne+E*oe+ue;return a=b*re+E*le+pe,E=x*ne+z*oe+ue,x=x*re+z*le+pe,ne=b*ne+z*oe+ue,b=b*re+z*le+pe,z=Math.min(Pe,Ce),Pe=Math.max(Pe,Ce),Ce=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),Pe=Math.max(Pe,E),Ce=Math.min(Ce,x),y=Math.max(y,x),z=Math.min(z,ne),Pe=Math.max(Pe,ne),Ce=Math.min(Ce,b),y=Math.max(y,b),new vn(z,Ce,Pe-z,y-Ce)},be.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),Rr(a.copy(),this.Ab)};function rm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Yg(a){return a=ig.get(a),a!==null?new a:new Io}nn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Do&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=b}),a.mouseMoveTools.each(function(oe){return oe.diagram=b}),a.mouseUpTools.each(function(oe){return oe.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===Do){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),As(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ws(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 ne=a.isTransactionFinished;if(ne&&(rm(this),this.As.clear(),Ta(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;xn(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function $d(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)hd(a,y[E])}function hd(a,y){if(y instanceof kl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Bn&&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 Xg(a,y){if(y instanceof kl){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 Bn&&x.Bg.remove(a),mg(E));break}}}}}nn.prototype.Wd=function(){this.partManager.Wd()},nn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},nn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},nn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},nn.prototype.Vb=function(a){return this.partManager.Vb(a)},nn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},be=nn.prototype,be.Lc=function(a){return this.partManager.Lc(a)},be.ii=function(a){return this.partManager.ii(a)},be.Kc=function(a){return this.partManager.Kc(a)},be.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:dn(Hi(y)))},be.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:dn(Hi(y)))};function Dh(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 Jg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),uu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}be.Va=function(){if(this.Zi){var a=vn.alloc();Jg(this,this.computeBounds(a)),vn.free(a)}},be.rz=function(){for(var a=new Bn,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},be.qz=function(){return this.ai.iterator},be.Uz=function(a){As(this),a&&Qf(this,!0),this.ld?Qg(this,!1):(this.Jk=!0,Ll(this))};function Qf(a,y){for(var x=a.ai.iterator;x.next();)om(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function om(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)om(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Qg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Us(z,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)qg(a,ne.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),As(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||ws(z),a.aa=x}}}function qg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)qg(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),ba(a,y),b.isValidLayout=!0):a.xh=!0)}}be.yz=function(){for(var a=new An,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function tv(a){function y(b){var z=b.toLowerCase(),ne=new An;x.add(b,ne),x.add(z,ne),E.add(b,b),E.add(z,b)}var x=new wi,E=new wi;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 am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function qf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;St("Unknown DiagramEvent name: "+y)}be.Bj=function(a,y){return a=qf(this,a),a!==null&&a.add(y),this},be.am=function(a,y){a=qf(this,a),a!==null&&a.remove(y)},be.R=function(a,y,x){var E=qf(this,a),b=new or;if(b.diagram=this,a=am(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 eg(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}be.Yj=function(a,y){return tg(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},nn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?jd(this,a):a.assign(this.documentBounds)};function tg(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Fp(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=sm(a,x)),x===null){y=vn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var ne=z.value,re=ne.layer;re!==null&&re.visible&&!re.isTemporary&&ng(a,ne,E,y)}vn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=vn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof li&&ng(a,ne,E,y);vn.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&rS(b);return b}function sm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?sm(a,y.containingGroup):null}function ng(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(wg(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill($c,x,y+1);else for(var ne=x;ne<=y;ne++)z[ne]=$c}else if(y instanceof cr)for(y=y.memberParts;y.next();)b=y.value,b instanceof li&&ng(a,b,x,E)}}function Dc(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}nn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():ep(this)};function ep(a){a.vk===-1&&(a.vk=xn(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=vn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Jg(a,y),vn.free(y),a.Fc=!0,a.bd(),ep(a))}},a.vp))}nn.prototype.ug=function(){this.vk!==-1&&(nt.clearTimeout(this.vk),this.vk=-1)},nn.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=vn.allocAt(0,0,E.width*b,E.height*b);var z=Qe.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,z.x-=ne,a.x<E.x+x.left/2&&(z.x-=ne),a.x<E.x+x.left/4&&(z.x-=4*ne)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,z.x+=ne,a.x>E.x+E.width-x.right/2&&(z.x+=ne),a.x>E.x+E.width-x.right/4&&(z.x+=4*ne));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y-=ne,a.y<E.y+x.top/2&&(z.y-=ne),a.y<E.y+x.top/4&&(z.y-=4*ne)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y+=ne,a.y>E.y+E.height-x.bottom/2&&(z.y+=ne),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*ne)),z.Xa(uo)||(y=new Qe(y.x+z.x/b,y.y+z.y/b)),vn.free(E),Qe.free(z),y},be=nn.prototype,be.Cs=function(){return null},be.av=function(){return null},be.bs=function(a,y){this.pj.add(a,y)},be.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof cr&&(y.$p=null)})};function xf(a,y,x){function E(){var ue=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||ue-le>oe?y(x,b,re):nt.requestAnimationFrame(E)}for(var b=x.callback,z=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var re=a,oe=x.callbackTimeout||300,le=+new Date;return nt.requestAnimationFrame(function(){E()}),null}be.Wz=function(a){return Na?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},be.Jx=function(a){return a===void 0&&(a={}),xf(this,this.Xz,a)},be.Xz=function(a,y,x){var E=lm(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Ud+"data":b=E.getImageData(0,0,x.width,x.height);break;case Ud:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&St('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function lm(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&St("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 ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new qn(1/0,1/0):new qn(2e3,2e3));var re=y.position||null,oe=y.parts||null,le=y.padding===void 0?1:y.padding,ue=y.background||null,pe=y.omitTemporary;pe===void 0&&(pe=!0);var Pe=y.document||document,Ce=y.elementFinished||null,Le=y.showTemporary;Le===void 0&&(Le=!pe),y=y.showGrid,y===void 0&&(y=Le),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof le=="number"?le=new Ti(le):le instanceof Ti||St("MakeImage padding must be a Margin or a number."),le.left=Math.max(le.left,0),le.right=Math.max(le.right,0),le.top=Math.max(le.top,0),le.bottom=Math.max(le.bottom,0),a.ib.Vc(!0),pe=new Wu(null,Pe,void 0,!0);var Oe=pe.context;if(!(b||z||oe||re))return pe.width=a.Aa+Math.ceil(le.left+le.right),pe.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=Pe,E.hs=Ce,ns(a,E.context,le,new qn(pe.width,pe.height),a.Ca,a.pa,oe,ue,Le,y),E.context):(a.Xm=!1,ns(a,Oe,le,new qn(pe.width,pe.height),a.Ca,a.pa,oe,ue,Le,y),a.Xm=!0,pe.context);var rt=a.Pp,Ye=a.documentBounds.copy();if(Ye.Fv(a.yb),Le)for(var vt=a.Wa.s,Pt=vt.length,Ct=0;Ct<Pt;Ct++){var It=vt[Ct];if(It.visible&&It.isTemporary){It=It.Pa.s;for(var rn=It.length,ri=0;ri<rn;ri++){var Pi=It[ri];Pi.isInDocumentBounds&&Pi.isVisible()&&(Pi=Pi.actualBounds,Pi.w()&&Ye.ed(Pi))}}}if(vt=new Qe(Ye.x,Ye.y),oe!==null){for(Pt=new vn(0,0,0,0),Ct=!0,It=oe.iterator,It.reset();It.next();)rn=It.value,rn instanceof Di&&(ri=rn.layer,ri!==null&&!ri.visible||ri!==null&&!Le&&ri.isTemporary||!rn.isVisible()||(rn=rn.actualBounds,rn.w()&&(Ct?(Ct=!1,Pt.assign(rn)):Pt.ed(rn))));Ye.width=Pt.width,Ye.height=Pt.height,vt.x=Pt.x,vt.y=Pt.y}return re!==null&&re.w()&&(vt=re,z||(z=rt)),Pt=re=0,le!==null&&(re=le.left+le.right,Pt=le.top+le.bottom),Ct=It=0,b!==null&&(It=b.width,Ct=b.height,isFinite(It)&&(It=Math.max(0,It-re)),isFinite(Ct)&&(Ct=Math.max(0,Ct-Pt))),b!==null&&z!==null?(z==="NaN"&&(z=rt),b.w()?(b=It,Ye=Ct):isNaN(Ct)?(b=It,Ye=Ye.height*z):(b=Ye.width*z,Ye=Ct)):b!==null?b.w()?(z=Math.min(It/Ye.width,Ct/Ye.height),b=It,Ye=Ct):isNaN(Ct)?(z=It/Ye.width,b=It,Ye=Ye.height*z):(z=Ct/Ye.height,b=Ye.width*z,Ye=Ct):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/Ye.width,(ne.height-Pt)/Ye.height),z>rt?(z=rt,b=Ye.width,Ye=Ye.height):(b=ne.width,Ye=ne.height)):(b=Ye.width*z,Ye=Ye.height*z):(z=rt,b=Ye.width,Ye=Ye.height),le!==null?(b+=re,Ye+=Pt):le=new Ti(0),ne!==null&&(rt=ne.width,ne=ne.height,isNaN(rt)&&(rt=2e3),isNaN(ne)&&(ne=2e3),isFinite(rt)&&(b=Math.min(b,rt)),isFinite(ne)&&(Ye=Math.min(Ye,ne))),pe.width=Math.ceil(b),pe.height=Math.ceil(Ye),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=Pe,E.hs=Ce,ns(a,E.context,le,new qn(Math.ceil(b),Math.ceil(Ye)),z,vt,oe,ue,Le,y),E.context):(a.Xm=!1,ns(a,Oe,le,new qn(Math.ceil(b),Math.ceil(Ye)),z,vt,oe,ue,Le,y),a.Xm=!0,pe.context)}Ve.Object.defineProperties(nn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof ye||(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 Oh(this,nt.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 Oh(this,nt.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(nt,"resize",this.Ov,!1),this.removeEventListener(nt,"wheel",this.$j,!0),ph===this&&(ph=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Id(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)&&Rn(a,"0 <= value <= 1",nn,"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),uu(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),uu(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),uu(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),uu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Rn(a,">= 0",nn,"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&&Rn(a,">= 0",nn,"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 Rn(a,">= 0",nn,"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||rm(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&&St("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Bc(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Us(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=Yg(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(nt,"pointermove",this.dk,!0),this.addEventListener(nt,"pointerdown",this.ui,!0),this.addEventListener(nt,"pointerup",this.fk,!0),this.addEventListener(nt,"pointerout",this.ek,!0),this.addEventListener(nt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(nt,"wheel",this.$j,!0),this.addEventListener(nt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(nt,"pointermove",this.dk,!0),this.removeEventListener(nt,"pointerdown",this.ui,!0),this.removeEventListener(nt,"pointerup",this.fk,!0),this.removeEventListener(nt,"pointerout",this.ek,!0),this.removeEventListener(nt,"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(nt,"wheel",this.$j,!0),this.removeEventListener(nt,"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=Qe.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),js(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Dh(this):(this.vb=!0,a=this.scale,Sf(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)}Qe.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=vf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=vf(this)),a.type!==Gn.Grid&&St("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),Th(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),Dh(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||St("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 Ti(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===Oc&&uu(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,uu(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,Ug(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&&Ug(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!==rl&&uu(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()||St("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()||St("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)):Rn(a,"> 0",nn,"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)):Rn(a,"> 0",nn,"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),uu(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 Ti(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&&St("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)yp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ic&&a!==ss&&a!==rg&&St("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 qn(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 Ti(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ve.Object.defineProperties(nn,{licenseKey:{get:function(){return ap.jc()},set:function(a){ap.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),nn.prototype.makeImageData=nn.prototype.Jx,nn.prototype.makeImage=nn.prototype.Wz,nn.prototype.cacheGroupExternalLinks=nn.prototype.Fu,nn.prototype.addRenderer=nn.prototype.bs,nn.prototype.makeSVG=nn.prototype.av,nn.prototype.makeSvg=nn.prototype.Cs,nn.prototype.stopAutoScroll=nn.prototype.ug,nn.prototype.doAutoScroll=nn.prototype.gs,nn.prototype.isUnoccupied=nn.prototype.Yj,nn.prototype.raiseDiagramEvent=nn.prototype.R,nn.prototype.removeDiagramListener=nn.prototype.am,nn.prototype.addDiagramListener=nn.prototype.Bj,nn.prototype.findTreeRoots=nn.prototype.yz,nn.prototype.layoutDiagram=nn.prototype.Uz,nn.prototype.findTopLevelGroups=nn.prototype.qz,nn.prototype.findTopLevelNodesAndLinks=nn.prototype.rz,nn.prototype.ensureBounds=nn.prototype.Va,nn.prototype.findLinksByExample=nn.prototype.ls,nn.prototype.findNodesByExample=nn.prototype.ms,nn.prototype.findLinkForData=nn.prototype.Kc,nn.prototype.findNodeForData=nn.prototype.ii,nn.prototype.findPartForData=nn.prototype.Lc,nn.prototype.findLinkForKey=nn.prototype.findLinkForKey,nn.prototype.findNodeForKey=nn.prototype.Vb,nn.prototype.findPartForKey=nn.prototype.findPartForKey,nn.prototype.rebuildParts=nn.prototype.Wd,nn.prototype.transformViewToDoc=nn.prototype.Ps,nn.prototype.transformRectDocToView=nn.prototype.zA,nn.prototype.transformDocToView=nn.prototype.op,nn.prototype.centerRect=nn.prototype.es,nn.prototype.scrollToRect=nn.prototype.tv,nn.prototype.scroll=nn.prototype.scroll,nn.prototype.highlightCollection=nn.prototype.Jz,nn.prototype.highlight=nn.prototype.Iz,nn.prototype.selectCollection=nn.prototype.rA,nn.prototype.select=nn.prototype.select,nn.prototype.updateAllRelationshipsFromData=nn.prototype.rp,nn.prototype.updateAllTargetBindings=nn.prototype.updateAllTargetBindings,nn.prototype.commit=nn.prototype.commit,nn.prototype.rollbackTransaction=nn.prototype.Kf,nn.prototype.commitTransaction=nn.prototype.eb,nn.prototype.startTransaction=nn.prototype.Ea,nn.prototype.raiseChanged=nn.prototype.g,nn.prototype.raiseChangedEvent=nn.prototype.cb,nn.prototype.removeChangedListener=nn.prototype.ik,nn.prototype.addChangedListener=nn.prototype.Pe,nn.prototype.removeModelChangedListener=nn.prototype.mA,nn.prototype.addModelChangedListener=nn.prototype.Yw,nn.prototype.findLayer=nn.prototype.Qj,nn.prototype.removeLayer=nn.prototype.kA,nn.prototype.addLayerAfter=nn.prototype.Cy,nn.prototype.addLayerBefore=nn.prototype.Ww,nn.prototype.addLayer=nn.prototype.Al,nn.prototype.moveParts=nn.prototype.moveParts,nn.prototype.copyParts=nn.prototype.Kj,nn.prototype.removeParts=nn.prototype.Is,nn.prototype.remove=nn.prototype.remove,nn.prototype.add=nn.prototype.add,nn.prototype.clearDelayedGeometries=nn.prototype.bx,nn.prototype.setProperties=nn.prototype.nm,nn.prototype.attach=nn.prototype.Du,nn.prototype.set=nn.prototype.set,nn.prototype.resetInputOptions=nn.prototype.Sx,nn.prototype.setInputOption=nn.prototype.sA,nn.prototype.getInputOption=nn.prototype.Ql,nn.prototype.resetRenderingHints=nn.prototype.Tx,nn.prototype.setRenderingHint=nn.prototype.Xx,nn.prototype.getRenderingHint=nn.prototype.Gf,nn.prototype.maybeUpdate=nn.prototype.bd,nn.prototype.requestUpdate=nn.prototype.$b,nn.prototype.delayInitialization=nn.prototype.Xy,nn.prototype.isUpdateRequested=nn.prototype.Pz,nn.prototype.invalidateDocumentBounds=nn.prototype.Ya,nn.prototype.findObjectsNear=nn.prototype.og,nn.prototype.findPartsNear=nn.prototype.mz,nn.prototype.findObjectsIn=nn.prototype.Cf,nn.prototype.findPartsIn=nn.prototype.ux,nn.prototype.findObjectsAt=nn.prototype.ji,nn.prototype.findPartsAt=nn.prototype.lz,nn.prototype.findObjectAt=nn.prototype.ic,nn.prototype.findPartAt=nn.prototype.Ol,nn.prototype.focusObject=nn.prototype.zz,nn.prototype.alignDocument=nn.prototype.Jy,nn.prototype.zoomToRect=nn.prototype.BA,nn.prototype.zoomToFit=nn.prototype.zoomToFit,nn.prototype.diagramScroll=nn.prototype.kx,nn.prototype.focus=nn.prototype.focus;var ig=new wi,um=null,Na=nt.document!==void 0,Kd=null,cd="",rl=new mn(nn,"None",0),cu=new mn(nn,"Uniform",1),dd=new mn(nn,"UniformToFill",2),Pf=new mn(nn,"CycleAll",10),tp=new mn(nn,"CycleNotDirected",11),np=new mn(nn,"CycleNotDirectedFast",12),ip=new mn(nn,"CycleNotUndirected",13),rp=new mn(nn,"CycleDestinationTree",14),op=new mn(nn,"CycleSourceTree",15),Oc=new mn(nn,"DocumentScroll",1),wf=new mn(nn,"InfiniteScroll",2),Ic=new mn(nn,"TreeParentCollapsed",21),ss=new mn(nn,"AllParentsCollapsed",22),rg=new mn(nn,"AnyParentsCollapsed",23),ap=new An,Vd="2.3.10",Ud="image",Cf=null,hm=!1;function Qs(){if(Na){var a=nt.document.createElement("canvas"),y=a.getContext("2d"),x=yn("7ca11abfd022028846");y[x]=yn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Kt.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ht.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",tt.za],b=1;5>b;b++)y[yn("7ca11abfd7330390")](yn(E[b-1]),10,15*b);for(y[x]=yn("39f046ebb36e4b"),x=1;5>x;x++)y[yn("7ca11abfd7330390")](yn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Ht.prototype.Cd=Ht.prototype.Eu),Cf=a}}nn.className="Diagram",nn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=nt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof nn?y.H:null},nn.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},nn.useDOM=function(a){Na=a?nt.document!==void 0:!1},nn.isUsingDOM=function(){return Na},nn.None=rl,nn.Uniform=cu,nn.UniformToFill=dd,nn.CycleAll=Pf,nn.CycleNotDirected=tp,nn.CycleNotDirectedFast=np,nn.CycleNotUndirected=ip,nn.CycleDestinationTree=rp,nn.CycleSourceTree=op,nn.DocumentScroll=Oc,nn.InfiniteScroll=wf,nn.TreeParentCollapsed=Ic,nn.AllParentsCollapsed=ss,nn.AnyParentsCollapsed=rg;function cm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Yd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=nt[yn("76a715b2f73f148a")][yn("72ba13b5")]||"";if(a.Rc=!0,Na){var E=nn[yn("76a115b6ed251eaf4692")];if(E)for(var b=ap.iterator;b.next()&&(E=b.value,E=yn(E).split(yn("39e9")),!(6>E.length));){var z=yn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ne=yn(Kt[yn("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=nt[yn("74a900bae4370f8b51")][yn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[yn("73a612b6fb191d")](yn("3aad1ab6e022098b4dc4")),z=yn(E[2]),-1<ne&&(re=re[yn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[yn("76ad18b4f73e")],re=x[yn("73a612b6fb191d")](yn("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[yn("73a612b6fb191d")](z),0>ne&&z!==yn("7da71ca0ad381e90")&&(ne=y[yn("73a612b6fb191d")](yn("76a715b2ef3e149757"))),0>ne&&(ne=y[yn("73a612b6fb191d")](yn("76a715b2ef3e149757"))),0>ne&&(ne=y[yn("73a612b6fb191d")](yn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[yn("73a612b6fb191d")](yn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[yn("73a612b6fb191d")](yn("35"))||y[yn("73a612b6fb191d")](yn("35"))===-1),!a.Rc||x[yn("73a612b6fb191d")](yn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[yn("73a612b6fb191d")](z)),!a.Rc)||(ne=nt[yn("76a715b2f73f148a")][yn("69ad17a1e03e")],re=ne[yn("73a612b6fb191d")](yn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[yn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=nt.document.createElement("div");for(var oe=E[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),E="",E+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],ne[yn("79a417a0f0181a8946")]=E,nt.document[yn("78a712aa")]){nt.document[yn("78a712aa")][yn("7bb806b6ed32388c4a875b")](ne),oe=nt.getComputedStyle(ne).getPropertyValue(yn("78a704b7e62456904c9b12701b6532a8"));var le=nt.getComputedStyle(ne).getPropertyValue(yn("75b817b0ea2202"));if(nt.document[yn("78a712aa")][yn("68ad1bbcf533388c4a875b")](ne),oe){if(ne=nt[yn("77a902b0eb1b1e804a8a")],le==="0."+parseInt(re,10)%100||oe.indexOf(parseInt(z[1]+z[2],16))!==-1&&oe.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(yn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ue in ne)if(E===ne[ue].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ue=x[yn("76ad18b4f73e")],b=x[yn("73a612b6fb191d")](yn("35e7"))+2;b<ue;b++)y+=x[b];x=y[yn("73a612b6fb191d")](yn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[yn("73a612b6fb191d")](yn("35")))}}}return 0<a.Rc&&a!==a.wy}cm.className="DiagramHelper";function fc(a){this.j=a===void 0?new Qe:a,this.o=new Qe}Ve.Object.defineProperties(fc.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 Ef="DraggingInfo";fc.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new qn(NaN,NaN).freeze(),this.gridSnapCellSpot=cs,this.gridSnapOrigin=new Qe(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function ge(a,y){if(typeof a=="string"||nt.Element&&a instanceof Element)var x=nn.call(this,a)||this;else x=nn.call(this)||this,y=a;return fe(x),y&&x.nm(y),x}Ot(ge,nn);function fe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=bl,a.layout=new Ds}ge.prototype.reset=function(){nn.prototype.reset.call(this),fe(this)},ge.className="Palette";function ye(a,y){if(typeof a=="string"||nt.Element&&a instanceof Element)var x=nn.call(this,a)||this;else x=nn.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Di;var b=new Cr;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 Ti(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new at,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ne=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new Qe(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){E.Ya(),We(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&&We(E)},x.autoScale=cu,x.vb=!1,y&&Object.assign(x,y),x}Ot(ye,nn),ye.prototype.computePixelRatio=function(){return 1},ye.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(Mu(this),this.ql===null){var x=new Wu(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),ke(this)}finally{this.ta=a,this.ib=y}}}nn.prototype.redraw.call(this)},ye.prototype.gc=function(){if(this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!(this.ta instanceof Oh)&&(Ov(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Mu(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?ke(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 ke(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=vn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Th(y,b),vn.free(b),As(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 ne=0;ne<z;ne++){var re=y[ne],oe=a;if(re.visible&&re.opacity!==0){var le=re.diagram.grid.part;if(!x&&re.isTemporary)E&&le.layer===re&&(re=_s(re,b),le.gc(b,oe),b.globalAlpha=re);else{for(var ue=_s(re,b),pe=oe.scale,Pe=vn.alloc(),Ce=re.Pa.s,Le=Ce.length,Oe=0;Oe<Le;Oe++){var rt=Ce[Oe];(E||rt!==le)&&re.Oj(b,rt,oe,null,pe,Pe,!1)}vn.free(Pe),b.globalAlpha=ue}}}}}function We(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=qn.alloc();b.h(x.width,x.height),E.desiredSize=b,qn.free(b),a=2/a.scale,E instanceof Cr&&(E.strokeWidth=a),y.location=new Qe(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ye.prototype.computeBounds=function(){var a=this.observed;if(a===null)return $r;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},ye.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},ye.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),We(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))},Ve.Object.defineProperties(ye.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ye&&St("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),We(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),We(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)}}}),ye.className="Overview";function at(){aa.call(this),this.j=null}Ot(at,aa),at.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 Qe(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Qe(a.x-this.j.x,a.y-this.j.y)),!0)},at.prototype.doActivate=function(){this.j=null,aa.prototype.doActivate.call(this)},at.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},at.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 Qe(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Qe(a.x-this.j.x,a.y-this.j.y)}}},at.className="OverviewDraggingTool";function it(){_r(this),this.H=ph,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=$r,this.hb=!0,this.cg=null,this.ob=200}it.prototype.toString=function(){return"CommandHandler"},it.prototype.Xe=function(a){this.H=a},it.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=br?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()},it.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},it.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Vr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},it.prototype.canStopCommand=function(){return!0},it.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=""}},it.prototype.canSelectAll=function(){return this.diagram.allowSelect},it.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 Bn,x=a.selection.iterator;x.next();)md(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=""}},it.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},it.prototype.copySelection=function(){var a=this.diagram,y=new Bn;for(a=a.selection.iterator;a.next();)md(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},it.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},it.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},it.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},it.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Kd=null,cd="";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 An,x.addAll(z),Kd=x,cd=y.model.dataFormat}}y.R("ClipboardChanged",x)},it.prototype.pasteFromClipboard=function(){var a=new Bn,y=Kd;if(y===null)return a;var x=this.diagram;if(cd!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,ne=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=ne.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},it.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);Ah(y,z,new Qe(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=""}},it.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Kd===null||Kd.count===0||cd!==a.model.dataFormat)},it.prototype.undo=function(){this.diagram.undoManager.undo()},it.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},it.prototype.redo=function(){this.diagram.undoManager.redo()},it.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},it.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===rl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},it.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},it.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===rl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},it.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},it.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},it.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},it.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Us(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=$r):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ws(y)},it.prototype.canZoomToFit=function(){return this.diagram.allowZoom},it.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(oe){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;Us(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=bt(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 oe=b.pop();0<b.length&&oe instanceof li&&oe.isTreeExpanded&&(!(oe instanceof cr)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof Di&&y.tv(oe.actualBounds),oe instanceof li&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof cr&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof Di&&y.es(oe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){xn(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",ne),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function bt(a,y,x){if(y.isVisible())return x;if(y instanceof lo)bt(a,y.adornedPart,x);else if(y instanceof Kn){var E=y.fromNode;E!==null&&bt(a,E,x),y=y.toNode,y!==null&&bt(a,y,x)}else y instanceof li&&(E=y.labeledLink,E!==null&&bt(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),bt(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),bt(a,y,x));return x}it.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Di)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},it.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Us(y.animationManager,"Collapse Tree");var x=new An;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 li&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},it.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof li&&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 li&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},it.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Us(y.animationManager,"Expand Tree");var x=new An;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 li&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},it.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof li)||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 li&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},it.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 An,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&b.add(ne)}for(var re=new An,oe=b.iterator;oe.next();){var le=oe.value;z=!1;for(var ue=b.iterator;ue.next();)if(le.Td(ue.value)){z=!0;break}z||re.add(le)}if(0<re.count){var pe=re.first().containingGroup;if(pe!==null)for(;pe!==null;){b=!1;for(var Pe=re.iterator;Pe.next();)if(!Pe.value.Td(pe)){b=!0;break}if(b)pe=pe.containingGroup;else break}if(x instanceof cr)$u(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Ce=y.copyNodeData(x);hn(Ce)&&(y.xf(Ce),E=a.ii(Ce))}if(E!==null){pe!==null&&this.isValidMember(pe,E)&&(E.containingGroup=pe);for(var Le=re.iterator;Le.next();){var Oe=Le.value;this.isValidMember(E,Oe)&&(Oe.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},it.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 pn(a){var y=Qn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Kn||y.push(x)}a=new Bn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,ne=0;ne<x;ne++)if(b.Td(y[ne])){z=!1;break}z&&a.add(b)}return di(y),a}it.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Kn)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},it.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 An;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof cr&&z.canUngroup()&&E.add(z)}var ne=new An;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var le=oe.containingGroup,ue=le!==null&&le.data!==null?x.wa(le.data):void 0;ne.addAll(oe.memberParts);for(var pe=ne.iterator;pe.next();){var Pe=pe.value;if(Pe.isSelected=!0,!(Pe instanceof Kn)){var Ce=Pe.data;Ce!==null?x.mp(Ce,ue):Pe.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",E,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},it.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 cr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof cr&&y.canUngroup())return!0;return!1},it.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=pn(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},it.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Us(y.animationManager,"Collapse SubGraph");var x=new An;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 cr&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},it.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof cr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof cr&&y.isSubGraphExpanded)return!0;return!1},it.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Us(y.animationManager,"Expand SubGraph");var x=new An;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 cr&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},it.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof cr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof cr&&!y.isSubGraphExpanded)return!0;return!1},it.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)}},it.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},it.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 jt?b=a.ga(Qr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Qe(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,Vo(x,!1,a)}},it.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)},it.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 wi,a===null)return E;for(var z=a.iterator;z.next();)Hu(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 Kn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Ve.Object.defineProperties(it.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||St("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}}}),it.className="CommandHandler",cc=function(){return new it};function jt(){_r(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Qe(NaN,NaN).freeze(),this.jd=na,this.Ab=new Ht,this.wh=new Ht,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=bs,this.uc=new vn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new vn(NaN,NaN,NaN,NaN).freeze(),this.dc=new vn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Co,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 Zn,jn,Ei,Ai,Zi,pr,Kr,Nr,io,Go;jt.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=Xn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},jt.prototype.Vw=function(a){var y=this.Dh;if(Jt(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},jt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},jt.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},jt.prototype.copy=function(){return this.clone()},be=jt.prototype,be.qb=function(a){a.classType===Kn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:St("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===jt&&(this.stretch=a)},be.toString=function(){return hi(this.constructor)+"#"+Bi(this)},be.th=function(){this.A!==null&&(this.A.nc=!0)};function Lr(a){a.A===null?a.A=new Mf:a.A.nc&&(a.A=a.A.copy())}be.Xc=function(){if(this.ba===null){var a=new sp;a.Xi=Fa,a.yj=Fa,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},be.cb=function(a,y,x,E,b,z,ne){var re=this.part;if(re!==null&&(re.gk(a,y,x,E,b,z,ne),x===this&&a===Yr&&Zs(this)&&oa(this,re,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 wi),ne=z.undoManager.transactionLevel===0,a.startCondition===ks?ne=!0:a.startCondition===Ya&&(ne=!1),ne?(z=new La,Sa(a,z),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(Us(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Gn&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)re=x[b],re instanceof Gn&&qd(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function oa(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,ne=null;if(z.sourceName!==null){if(ne=MS(z,E,a),ne===null)continue;z.sp(a,ne,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,E)}else{if(re=E.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,E)}ne===a&&(re=E.ks(z.Ai),re!==null&&z.Mv(re,ne,x))}}be.ks=function(a){return this.bindingId===a?this:null},be.g=function(a,y,x){this.cb(Yr,a,this,y,x)},be.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 Ht);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Ss(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}be.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?To(a.x,a.y,0,0,0,E.height)<=y||To(a.x,a.y,0,E.height,E.width,E.height)<=y||To(a.x,a.y,E.width,E.height,E.width,0)<=y||To(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},be.se=function(){return!0},be.ca=function(a){var y=Qe.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Qe.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),ne=z/2,re=this.naturalBounds;E=this.Df()*E.scale;var oe=1/E;if(re.width*E<b&&re.height*E<b)return a=Fo(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),Qe.free(y),a}return b=!1,(this instanceof lo||this instanceof Cr?Fo(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)),Qe.free(y),b},be.gh=function(a){var y=this.naturalBounds;return Fo(0,0,y.width,y.height,a.x,a.y)},be.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=vn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Qe.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)))),Qe.free(b),vn.free(y),E},be.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Qe.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)))),Qe.free(b),E},be.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Qe.allocAt(0,0),b=Qe.allocAt(0,x.height),z=Qe.allocAt(x.width,x.height),ne=Qe.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(ne)))re=!0;else{x=vn.allocAt(0,0,x.width,x.height);var oe=Qe.allocAt(a.x,a.y);x.ca(y.Cd(oe))?re=!0:(oe.h(a.x,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.y),x.ca(y.Cd(oe))&&(re=!0)))),Qe.free(oe),vn.free(x),!re&&(tt.us(a,E,b)||tt.us(a,b,z)||tt.us(a,z,ne)||tt.us(a,ne,E))&&(re=!0)}return Qe.free(E),Qe.free(b),Qe.free(z),Qe.free(ne),re},be.ga=function(a,y){if(y===void 0&&(y=new Qe),a instanceof bi){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},be.mi=function(a){a===void 0&&(a=new vn);var y=this.naturalBounds,x=this.oe,E=Qe.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),ma(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),ma(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),ma(a,E.x,E.y,0,0),Qe.free(E),a},be.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},be.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},be.qs=function(a,y){return y===void 0&&(y=new Qe),y.assign(a),this.oe.Cd(y),y},be.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},be.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ue=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),Pe=ne*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,tt.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ne=a*re+y*le+pe,a=a*oe+y*ue+Pe,y=x*re+E*le+pe,x=x*oe+E*ue+Pe,b.h(0,0),E=this.naturalBounds,x=tt.Ff(0,0,E.width,E.height,ne,a,y,x,b),b.transform(z),x)},jt.prototype.measure=function(a,y,x,E){if(fu(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 ne=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+ne:a,y=isFinite(b.width)?b.width+ne:y):(a=isFinite(b.width)?b.width+ne:a,y=isFinite(b.height)?b.height+ne:y),b=x||0,ne=E||0;var re=this instanceof Gn;switch(Nl(this,!0)){case jn:ne=b=0,re&&(y=a=1/0);break;case Zn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ne=y);break;case Ai:isFinite(a)&&a>x&&(b=a),ne=0,re&&(y=1/0);break;case Zi:isFinite(y)&&y>E&&(ne=y),b=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;b>re.width&&oe.width<re.width&&(b=re.width),ne>re.height&&oe.height<re.height&&(ne=re.height),x=Math.max(b,oe.width),E=Math.max(ne,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<E&&(E=Math.min(oe.height,E)),a=Math.min(re.width,a),y=Math.min(re.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()||St("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ls(this,!1)}},jt.prototype.Wl=function(){},jt.prototype.Dd=function(){return!1},jt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=vn.alloc();z.assign(this.Ib),this.Ib.ka(),dl(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&&zc(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()||St("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Yh(this,!1),vn.free(z)},be=jt.prototype,be.eh=function(){};function ol(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 ne=x.top+x.bottom;switch(x=z.width+y,z=z.height+ne,E+=y,b+=ne,y=Nl(a,!0),x===E&&z===b&&(y=jn),y){case jn:(x>E||z>b)&&(ls(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Zn:ls(a,!0),a.measure(E,b,0,0);break;case Ai:ls(a,!0),a.measure(E,z,0,0);break;case Zi:ls(a,!0),a.measure(x,b,0,0)}}}be.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(),wl(a,y)||(x.oh(),this.Pn(x)))},be.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof li&&G1(a,this))},be.gc=function(a,y){if(!Lu(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 Gn&&zc(this),ne=this.Ib;if(z){var re=this.Ib,oe=this.dc,le=this.areaBackground,ue=this.Ma;le===null&&ue===null||a.yc(),le!==null&&(Da(this,a,le,!0,!0,oe,re),le instanceof Ao&&le.type===Bu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(le)):a.fillRect(re.x,re.y,re.width,re.height)),ue!==null&&(Da(this,a,ue,!0,!1,oe,re),ue instanceof Ao&&ue.type===Bu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ue)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){z=this.transform,re=this.panel,this.l&4096&&Ts(this),le=this.part,oe=!1;var pe=0;le&&y.Gf("drawShadows")&&(oe=le.isShadowed)&&(ue=le.shadowOffset,pe=Math.max(ue.y,ue.x)*y.scale*y.Mb),ue=this.Dd();var Pe;if(!(Pe=y.$i||!ue)){var Ce=this.naturalBounds;Pe=this.wh;var Le=Pe.m11,Oe=Pe.m21,rt=Pe.dx,Ye=Pe.m12,vt=Pe.m22,Pt=Pe.dy,Ct,It=Ct=0;Pe=Ct*Le+It*Oe+rt;var rn=Ct*Ye+It*vt+Pt;Ct=Ce.width+pe,It=0;var ri=Ct*Le+It*Oe+rt;Ct=Ct*Ye+It*vt+Pt,It=Math.min(Pe,ri);var Pi=Math.min(rn,Ct),fi=Math.max(Pe+0,ri)-It,$n=Math.max(rn+0,Ct)-Pi;Pe=It,rn=Pi,Ct=Ce.width+pe,It=Ce.height+pe,ri=Ct*Le+It*Oe+rt,Ct=Ct*Ye+It*vt+Pt,It=Math.min(Pe,ri),Pi=Math.min(rn,Ct),fi=Math.max(Pe+fi,ri)-It,$n=Math.max(rn+$n,Ct)-Pi,Pe=It,rn=Pi,Ct=0,It=Ce.height+pe,ri=Ct*Le+It*Oe+rt,Ct=Ct*Ye+It*vt+Pt,It=Math.min(Pe,ri),Pi=Math.min(rn,Ct),fi=Math.max(Pe+fi,ri)-It,$n=Math.max(rn+$n,Ct)-Pi,Pe=It,rn=Pi,pe=y.viewportBounds,Ce=pe.x,Le=pe.y,Pe=!(Pe>pe.width+Ce||Ce>fi+Pe||rn>pe.height+Le||Le>$n+rn)}if(Pe){if(Pe=(this.l&256)!==0,a.clipInsteadOfFill&&(Pe=!1),this instanceof Qo&&(a.font=this.font),Pe){if(rn=re.se()?re.naturalBounds:re.actualBounds,fi=Math.max(ne.x,rn.x),$n=Math.max(ne.y,rn.y),pe=Math.min(ne.right,rn.right)-fi,Ce=Math.min(ne.bottom,rn.bottom)-$n,Le=this.tb,Le!==null&&(fi=Le.x,$n=Le.y,pe=Le.width,Ce=Le.height),fi>ne.width+ne.x||ne.x>rn.width+rn.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(fi,$n,pe,Ce),a.clip()}if(ue){if(!le.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(rn=le.shadowOffset,a.Ev(rn.x*y.scale*this.scale*y.Mb,rn.y*y.scale*this.scale*y.Mb,le.shadowBlur),gc(a),a.shadowColor=le.shadowColor)}oe&&this.shadowVisible===!0?gc(a):oe&&this.shadowVisible===!1&&Xh(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),du(this,a,le,ne)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&Ls(this,re)&&this.shadowVisible===null&&Xh(a),this.Ma!==null&&(a.yc(),Zl(this,a,le,ne)),oe&&(this.Ma!==null||this.areaBackground!==null||Ls(this,re))?(ih(this,!0),this.shadowVisible===null&&Xh(a)):ih(this,!1),this.hh(a,y),oe&&this.l&512&&gc(a),ue&&oe&&Xh(a),Pe&&(a.restore(),a.Vc(this instanceof Gn)),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 Ls(a,y){return y===null?!1:(zc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Gn.Auto||y.type===Gn.Spot)&&y.Pb()!==a)}be.Dv=function(){};function du(a,y,x,E){Da(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Ao&&a.areaBackground.type===Bu?(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 Zl(a,y,x,E){var b=a.kq(),z=x.x,ne=x.y,re=x.width+b,oe=x.height+b;Da(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Ao&&a.Ma.type===Bu?(y.beginPath(),y.rect(z-b/2,ne-b/2,re,oe),y.ng(a.Ma)):y.fillRect(z-b/2,ne-b/2,re,oe)}function qs(a,y,x){for(var E=y.O.s,b=E.length,z=-1,ne=0;ne<b;ne++)if(E[ne]===a){z=ne;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===Gn.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 Lu(a,y,x){if(!(y instanceof Jl))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&&qs(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),gc(y),y.shadowColor=a.shadowColor}a instanceof Qo&&(y.font=a.font),y.yd=null;var ne=a.transform;z=a instanceof Gn;var re=a instanceof Gn?zc(a):!1;a.l&4096&&Ts(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&re?(lp(y,1,0,0,1,0,0),a.svg=y.ad):z?(lp(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):lp(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var le=ne.copy().Vj();y.rb.ha=[le.m11,le.m12,le.m21,le.m22,le.dx,le.dy],du(a,y,b,oe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Zl(a,y,b,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Zl(a,y,b,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,b=a.part,re=!1,b&&x.Gf("drawShadows")&&(re=b.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&gc(y),re&&a.shadowVisible===!0?gc(y):re&&a.shadowVisible===!1&&Xh(y),b=a.panel,re&&Ls(a,b)&&a.shadowVisible===null&&Xh(y),y.Il&&(le=x.computePixelRatio(),le="drop-shadow("+y.shadowOffsetX/le+"px "+y.shadowOffsetY/le+"px "+y.shadowBlur/le/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",le),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",le)),re&&(a.Ma!==null||a.areaBackground!==null||Ls(a,b))?(ih(a,!0),a.shadowVisible===null&&Xh(y)):ih(a,!1),b=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,re=z?a.svg:y.yd,le=a.svg,!z&&le!==null&&re!==le&&le.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,E,oe,re),Fl(y,le),!0):(a.svg=re,ne!==null&&re===null&&(fm(y),y.nh.pop()),re===null||(a.$o(y,E,oe,re),y.Il&&(x=x.computePixelRatio(),a.Dv(re,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&gc(y),a.Dd()&&Xh(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&re.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&re.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(re):y.Nj.prepend(re),y.ti=re):E!==null&&qs(a,E,re),ne!==null&&ne(a,re)),!0)}be.$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 ne=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,ne=z.width,x=z.height),z=E.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+Po++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ne,height:x}),this instanceof Gn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),re.appendChild(y),a.svg.appendChild(re),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),Fl(a,E)};function Fl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function el(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Hi(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()}}be.hh=function(){},be.lv=function(){this.Uc=!0},be.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 Gn?zc(this):!1;if(!(this instanceof Gn&&b))if(this instanceof kl){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 Gn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Cr){z=y.getElementsByTagName("path");for(var ne=0;ne<z.length;ne++)z[ne].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):(ne=E.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],du(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&gm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Gn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Zl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&gm(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},be.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 Da(a,y,x,E,b,z,ne){if(x!==null){var re=1,oe=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===jc)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var le=a.kq();if(re=z.width,oe=z.height,b?(re=ne.width,oe=ne.height):E||(re+=le,oe+=le),(z=y instanceof Qd)&&x.xe&&(x.type===cg||x.yk===re&&x.ft===oe))var ue=x.xe;else{var pe=0,Pe=0,Ce=0,Le=0,Oe=0,rt=0;if(rt=Oe=0,b?(Oe=ne.x,rt=ne.y):E||(Oe-=le/2,rt-=le/2),pe=x.start.x*re+x.start.offsetX,Pe=x.start.y*oe+x.start.offsetY,Ce=x.end.x*re+x.end.offsetX,Le=x.end.y*oe+x.end.offsetY,pe+=Oe,Ce+=Oe,Pe+=rt,Le+=rt,x.type===mc)ue=y.createLinearGradient(pe,Pe,Ce,Le);else if(x.type===Bu)rt=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(Oe=0,rt=Math.max(re,oe)/2):Oe=x.startRadius,ue=y.createRadialGradient(pe,Pe,Oe,Ce,Le,rt);else if(x.type===cg)try{ue=y.createPattern(x.pattern,"repeat")}catch(vt){ue=null}if(x.type!==cg&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ue.addColorStop(b.key,b.value);if(z&&(x.xe=ue,ue!==null&&(x.yk=re,x.ft=oe),ue===null&&x.type===cg&&x.yk!==-1)){x.yk=-1;var Ye=a.diagram;Ye!==null&&x.yk===-1&&xn(function(){Ye.redraw()},600)}}E?y.fillStyle=ue:y.strokeStyle=ue}}}be.rg=function(a){if(a instanceof Gn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},be.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},be.If=function(){for(var a=this instanceof Gn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ts(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Gu(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)}Gu(a,!1),Fu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Fu(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,Fu(a,!1)))}be.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Qe.alloc();z.yi(y,x,E,b,Qr),a.rotate(this.Kb,z.x,z.y),Qe.free(z)}},be.v=function(a){if(!fu(this)){a===void 0&&(a=!1),ls(this,!0),Yh(this,!0);var y=this.panel;y===null||a||y.v()}},be.Uj=function(){fu(this)||(ls(this,!0),Yh(this,!0))};function cl(a){if(!dl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof li&&a.Bd(),y.$b())),Yh(a,!0)}}be.Uk=function(){!(this.l&2048)&&(Gu(this,!0),Fu(this,!0))},be.Wu=function(){Fu(this,!0)},be.N=function(){var a=this.part;a!==null&&a.N()};function Nl(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Gn.Table?mh(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Gn.Auto&&E.Pb()===a?Fs(a,Zn,y):x===pr?E!==null?E.type===Gn.Spot&&E.Pb()===a?Fs(a,Zn,y):(x=E.defaultStretch,x===pr?Fs(a,jn,y):Fs(a,x,y)):Fs(a,jn,y):Fs(a,x,y)}function mh(a,y,x,E){var b=a.stretch;if(b!==pr)return Fs(a,b,E);var z=b=null;switch(y.stretch){case Zi:z=!0;break;case Zn:z=!0}switch(x.stretch){case Ai:b=!0;break;case Zn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Ai||y===Zn),z===null&&(z=y===Zi||y===Zn),b===!0&&z===!0?Fs(a,Zn,E):b===!0?Fs(a,Ai,E):z===!0?Fs(a,Zi,E):Fs(a,jn,E)}function Fs(a,y,x){if(x)return y;if(y===jn||(x=a.desiredSize,x.w()))return jn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Ai)return jn;if(y===Zn)return Zi}else{if(y===Zi)return jn;if(y===Zn)return Ai}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Zi)return jn;if(y===Zn)return Ai}else{if(y===Ai)return jn;if(y===Zn)return Zi}return y}function ih(a,y){a.l=y?a.l|512:a.l&-513}function Zs(a){return(a.l&1024)!==0}function bf(a,y){a.l=y?a.l|1024:a.l&-1025}function Gu(a,y){a.l=y?a.l|2048:a.l&-2049}function Fu(a,y){a.l=y?a.l|4096:a.l&-4097}function fu(a){return(a.l&8192)!==0}function ls(a,y){a.l=y?a.l|8192:a.l&-8193}function dl(a){return(a.l&16384)!==0}function Yh(a,y){a.l=y?a.l|16384:a.l&-16385}be.Gj=function(){this.svg=null},be.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},be.Av=function(){},be.zv=function(a){return this.pa=a,cl(this),!0},be.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},be.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof li&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||G1(y,a)}}function Vy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Gn?a instanceof li?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}be.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Xa(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&d1(a)&&St("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new An),this.localBindings.add(b),this},be.set=function(a){return Object.assign(this,a),this},be.Du=function(a){return nv(this,a),this},be.apply=function(a){return a(this),this},be.nm=function(a){return bu(this,a),this},be.pz=function(){return this.ih()},be.ih=function(){for(var a=this instanceof Gn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},be.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new wi),this.animationTriggers.add(a.propertyName,a),this};function Nu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=og.I(a);typeof z=="function"?(x=Xn(arguments),E=z(x),hn(E)||St('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=nt.go[a]}if(E===null&&(b!=null&&b.constructor||St("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 nn&&1<x.length){z=E;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Id(z,ne),b++)}for(;b<x.length;b++)z=x[b],z===void 0?St("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 Cr)a.figure=y;else if(a instanceof kl)a.source=y;else if(a instanceof Gn)y=rh.I(y),y!==null&&(a.type=y);else if(a instanceof Ao){var x=_n(Ao,y);x!==null?a.type=x:St("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Pn?(y=_n(Pn,y),y!==null&&(a.type=y)):a instanceof _i&&(y=_n(_i,y),y!==null&&(a.type=y));else if(y instanceof jt)a instanceof Gn||St("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof us){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 us?Bm(E,y):St("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof mn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof gs)a.type=y;else if(y instanceof Xa)a instanceof jt||a instanceof us?a.bind(y):St("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Xl)a instanceof jt?a.Jv(y):St("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ho)a instanceof Pn&&a.type===Pn.o?a.figures.add(y):St("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof _i)a instanceof ho?a.segments.add(y):St("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof da)a instanceof nn||a instanceof cr?a.layout=y:St("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 Ao){x=new zi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);bu(a,x)}else if(a instanceof us){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&St("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)&&St("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new zi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);bu(a,b)}else bu(a,y);else St('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Rc(a,y){og.add(a,y)}function dm(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}Ve.Object.defineProperties(jt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Mf),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 Mf),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 Mf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Lr(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&&(Lr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:pl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new fd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===pl&&(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 fd),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 fd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:uo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new fd),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:pr},set:function(a){var y=this.stretch;y!==a&&(Lr(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&&(Lr(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)&&Rn(a,"0 <= value <= 1",jt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(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(nf(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(),Vy(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&&Ff(a,"GraphObject.areaBackground"),a instanceof Ao&&a.freeze(),Lr(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&&Ff(a,"GraphObject.background"),a instanceof Ao&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof Di)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Qe(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&&St("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,Vy(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 Cr&&this.qc(),this.g("desiredSize",E,a),Zs(this)&&(a=this.part,a!==null&&(oa(this,a,"width"),oa(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 qn(a,this.jd.height).freeze(),this.v(),this instanceof Cr&&this.qc(),this.g("desiredSize",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 qn(this.jd.width,a).freeze(),this.v(),this instanceof Cr&&this.qc(),this.g("desiredSize",y,a),Zs(this)&&(a=this.part,a!==null&&oa(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:vr},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(),Lr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ta},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(),Lr(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 Ti(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&&Ts(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ts(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Lr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:jn},set:function(a){this.reshapingBehavior!==a&&(Lr(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()&&St("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),cl(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&&Rn(a,">= 0",jt,"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&&Rn(a,">= 1",jt,"columnSpan"),Lr(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&&Rn(a,">= 0",jt,"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&&Rn(a,">= 1",jt,"rowSpan"),Lr(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&&(Lr(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 li||St("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Hv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Fa},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Xd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Rn(a,">= 0",jt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Xd(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),Xd(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&&Rn(a,">= 0",jt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Fa},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Xd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Rn(a,">= 0",jt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Xd(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),Xd(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&&Rn(a,">= 0",jt,"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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),jt.prototype.trigger=jt.prototype.Jv,jt.prototype.findBindingPanel=jt.prototype.ih,jt.prototype.findTemplateBinder=jt.prototype.pz,jt.prototype.setProperties=jt.prototype.nm,jt.prototype.apply=jt.prototype.apply,jt.prototype.attach=jt.prototype.Du,jt.prototype.set=jt.prototype.set,jt.prototype.isEnabledObject=jt.prototype.If,jt.prototype.isVisibleObject=jt.prototype.Ed,jt.prototype.isContainedBy=jt.prototype.rg,jt.prototype.getNearestIntersectionPoint=jt.prototype.rs,jt.prototype.getLocalPoint=jt.prototype.qs,jt.prototype.getDocumentScale=jt.prototype.Df,jt.prototype.getDocumentAngle=jt.prototype.li,jt.prototype.getDocumentBounds=jt.prototype.mi,jt.prototype.getDocumentPoint=jt.prototype.ga,jt.prototype.intersectsRect=jt.prototype.Yc,jt.prototype.containedInRect=jt.prototype.fh,jt.prototype.containsRect=jt.prototype.Re,jt.prototype.containsPoint=jt.prototype.ca,jt.prototype.raiseChanged=jt.prototype.g,jt.prototype.raiseChangedEvent=jt.prototype.cb,jt.prototype.addCopyProperty=jt.prototype.Vw;var og=null;jt.className="GraphObject",og=new wi,Rc("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=Nu(Gn,Gn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Gn){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"},Nu(Cr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new bi(0,0,2.76142374915397,2.761423749153969),spot2:new bi(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 Gn&&(x=E.fb("ButtonBorder"),x instanceof Cr)){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 Gn&&(x=E.fb("ButtonBorder"),x instanceof Cr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Gn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Cr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=ne,ne=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=ne,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof Gn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Cr){var z=x.diagram,ne=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=ne}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof Gn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Cr){var z=x.diagram,ne=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=ne}}},y.actionMove=function(x,E){if(E.If()&&E instanceof Gn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Cr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var ne=E._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=E._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),b.skipsUndoManager=z}}},y}),Rc("TreeExpanderButton",function(){var a=Nu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Nu(Cr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Xa("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Xa("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof lo&&(x=x.adornedPart),x instanceof li){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}),Rc("SubGraphExpanderButton",function(){var a=Nu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Nu(Cr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Xa("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 lo&&(x=x.adornedPart),x instanceof cr){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}),Rc("ToolTip",function(){return Nu(lo,Gn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Qe(0,3),shadowBlur:5},Nu(Cr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new bi(0,0,4,6),spot2:new bi(1,1,-4,-4)}))}),Rc("ContextMenu",function(){return Nu(lo,Gn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Qe(0,3),shadowBlur:5},new Xa("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Rc("ContextMenuButton",function(){var a=Nu("Button");a.stretch=Ai;var y=a.fb("ButtonBorder");return y instanceof Cr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new bi(0,0,2,3),y.spot2=new bi(1,1,-2,-2)),a}),Rc("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=Nu("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},Nu(Cr,{name:"ButtonIcon",strokeWidth:2},new Xa("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Cr&&(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 ne=b.ih();ne===null&&(ne=b.part),ne!==null&&(b=ne.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Rc("CheckBoxButton",function(a){var y=dm(a);return a=Nu("Button",{desiredSize:new qn(14,14)},Nu(Cr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Zn,geometryStretch:Ei,visible:!1},y!==""?new Xa("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Gn){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}),Rc("CheckBox",function(a){a=dm(a),a=Nu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ti(0,1,0,0)});var y=Nu(Gn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ti(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}),jt.None=jn=new mn(jt,"None",0),jt.Default=pr=new mn(jt,"Default",0),jt.Vertical=Zi=new mn(jt,"Vertical",4),jt.Horizontal=Ai=new mn(jt,"Horizontal",5),jt.Fill=Zn=new mn(jt,"Fill",3),jt.Uniform=Ei=new mn(jt,"Uniform",1),jt.UniformToFill=Kr=new mn(jt,"UniformToFill",2),jt.FlipVertical=Nr=new mn(jt,"FlipVertical",1),jt.FlipHorizontal=io=new mn(jt,"FlipHorizontal",2),jt.FlipBoth=Go=new mn(jt,"FlipBoth",3),jt.make=Nu,jt.getBuilders=function(){var a=new wi,y;for(y in og)if(y!==y.toLowerCase()){var x=og.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},jt.defineBuilder=Rc,jt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=og.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof jt))return y&&E.set(y),E;St('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},jt.takeBuilderArgument=dm;function Mf(){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=vr,this.o=ta,this.hg=pr,this.ob=this.Bi=1,this.Pf=jn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Mf.prototype.copy=function(){var a=new Mf;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 fd(){this.u=-1/0,this.o=0,this.F=uo,this.rr=pl,this.j=this.V="None"}fd.prototype.copy=function(){var a=new fd;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},fd.className="LinkElementSettings";function sp(){this.yj=this.Xi=Co,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}sp.prototype.copy=function(){var a=new sp;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},sp.className="LinkSettings";function Jd(){this.ha=[1,0,0,1,0,0]}Jd.prototype.copy=function(){var a=new Jd;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},Jd.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},Jd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Jd.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,ne=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]=ne,this.translate(-y,-x)}},Jd.className="STransform";function Lf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Lf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Lf.className="SGradient";function Oh(a,y,x){this.ownerDocument=a=y===void 0?nt.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 Jl(this,x)}Oh.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},Oh.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),hn(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},Oh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Oh.prototype.focus=function(){this.Oa.focus()},Oh.prototype.mx=function(){this.ownerDocument=null},Ve.Object.defineProperties(Oh.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}}}),Oh.className="SVGSurface";function Jl(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 Jd,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Po++,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 Uy(a,y,x,E,b,z,ne){a.Nj===void 0?lp(a,y,x,E,b,z,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ne+")")}be=Jl.prototype,be.arc=function(a,y,x,E,b,z,ne,re){var oe=2*Math.PI,le=oe-1e-6,ue=x*Math.cos(E),pe=x*Math.sin(E),Pe=a+ue,Ce=y+pe,Le=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ne-Pe)||1e-6<Math.abs(re-Ce))&&this.path.push(["L",Pe,+Ce]),0>E&&(E=E%oe+oe),E>le?(this.path.push(["A",x,x,0,1,Le,a-ue,y-pe]),this.path.push(["A",x,x,0,1,Le,Pe,Ce])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Le,a+x*Math.cos(b),y+x*Math.sin(b)])},be.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},be.Se=function(a){this.addPath(this.path,this.rb,a||0)},be.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},be.clearRect=function(){},be.clip=function(){this.Yl.clipPath=!0},be.closePath=function(){this.path.push(["z"])},be.createLinearGradient=function(a,y,x,E){var b=new Lf("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},be.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"+Po++,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(Ud,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},be.createRadialGradient=function(a,y,x,E,b,z){var ne=new Lf("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=E,ne.y2=b,ne.r2=z,ne};function Yy(a,y,x,E,b,z,ne,re,oe){E=re/E,b=oe/b,z===0&&ne===0||a.rb.translate(z,ne),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}be.drawImage=function(a,y,x,E,b,z,ne,re,oe){var le="";a instanceof HTMLCanvasElement&&(le=a.toDataURL()),a instanceof HTMLImageElement&&(le=a.getAttribute("src"));var ue=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ne=x,re=E=ue,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,Yy(this,y,x,E,b,z||0,ne||0,re,oe),z={x:0,y:0,width:ue||E,height:a||b,href:le},tt.$(E,re)&&tt.$(b,oe)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ue||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),ag(this,Ud,z,this.rb),this.addElement(Ud,z)},be.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},be.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},be.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},ag(this,"fill",a,this.rb),this.addElement("rect",a)},be.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},ag(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},be.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},ag(this,"fill",y,this.rb),this.addElement("text",y,a[0])},be.lineTo=function(a,y){this.path.push(["L",a,y])},be.moveTo=function(a,y){this.path.push(["M",a,y])},be.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},be.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"])},be.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},be.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())},be.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||lp(this,a,y,x,E,b,z)};function Xy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}be.scale=function(a,y){this.rb.scale(a,y)},be.translate=function(a,y){this.rb.translate(a,y)},be.transform=function(){},be.yc=function(){},be.stroke=function(){Qy(this,this.Yl)},be.jk=function(){this.clipInsteadOfFill||this.stroke()},be.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},be.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 ag(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 Lf?y.fill=rv(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 Lf?y.setAttributeNS(null,"fill",rv(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 Lf)y.stroke=rv(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 rv(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"+Po++,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=[],ne=0;ne<y;ne++){var re=b[ne],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(le,ue){return le.offset>ue.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}be.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=Xn(a[b]),ne=[z.shift()];if(ne[0]==="A")ne.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)ne.push(z.shift()+","+z.shift());E.push(ne.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,ag(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var re in a)re!=="transform"&&y.setAttributeNS(null,re,a[re]);else{re=y.getElementsByTagName("path");for(var oe in a)oe!=="transform"&&re[x].setAttributeNS(null,oe,a[oe])}else this.addElement("path",a)};function lp(a,y,x,E,b,z,ne){var re=new Jd;re.ha=[y,x,E,b,z,ne],y={},ag(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function fm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}be.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Xh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function gc(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}be.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},be.fs=function(){this.Ct=!1},be.Vc=function(){},be.Wx=function(){},Jl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Jl.prototype.getImageData=function(){return null},Jl.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Jl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Jl.className="SVGContext",nn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Oh(this,nt.document));var y=new Oh(this,nt.document,!0);a===void 0&&(a=new zi);var x=this;return xf(this,function(E,b){return E=lm(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},nn.prototype.makeSvg=nn.prototype.Cs,nn.prototype.av=function(a){return this.Cs(a)},nn.prototype.makeSVG=nn.prototype.av;function Wu(a,y,x,E){this.ownerDocument=y=y===void 0?nt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Qd(y,x,E),y.H=a}Wu.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},Wu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Wu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Wu.prototype.focus=function(){this.Oa.focus()},Wu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ve.Object.defineProperties(Wu.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}}}),Wu.className="CanvasSurface";function Qd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&St("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 Ht,this.isTemporary=!!x}be=Qd.prototype,be.Wx=function(a){this.Z.imageSmoothingEnabled=a},be.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},be.beginPath=function(){this.Z.beginPath()},be.Se=function(){},be.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},be.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},be.clip=function(){this.Z.clip()},be.closePath=function(){this.Z.closePath()},be.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},be.createPattern=function(a,y){return this.Z.createPattern(a,y)},be.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},be.drawImage=function(a,y,x,E,b,z,ne,re,oe){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,ne,re,oe)},be.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},be.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},be.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},be.fillText=function(a,y,x){this.Z.fillText(a,y,x)},be.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},be.lineTo=function(a,y){this.Z.lineTo(a,y)},be.measureText=function(a){return this.Z.measureText(a)},be.moveTo=function(a,y){this.Z.moveTo(a,y)},be.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},be.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},be.restore=function(){this.Z.restore()},be.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},be=Qd.prototype,be.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},be.scale=function(a,y){this.El.scale(a,y)},be.translate=function(a,y){this.El.translate(a,y)},be.stroke=function(){this.Z.stroke()},be.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var ne=this.El,re=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*E,x=ne.m12*x+ne.m22*E,ne.dx=ne.m11*b+ne.m21*z+ne.dx,ne.dy=ne.m12*b+ne.m22*z+ne.dy,ne.m11=re,ne.m12=a,ne.m21=y,ne.m22=x}},be.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},be.ng=function(a,y){if(a instanceof Ao&&a.type===Bu){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)},be.jk=function(){this.Hm||this.stroke()},be.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},be.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},be.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},be.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},be.Hs=function(){},Ve.Object.defineProperties(Qd.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([]);Qd.className="CanvasSurfaceContext";function up(){this.F=this.o=this.u=this.j=0}up.className="ColorNumbers";function Ao(a,y){hg||(hv(),hg=!0),_r(this),this._isFrozen=!1,a===void 0?(this.na=jc,this.xk="black"):typeof a=="string"?(this.na=jc,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===mc?(this.Qd=bl,this.Lk=vs):this.Lk=a===Bu?this.Qd=Qr:this.Qd=Fa,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ao.prototype.copy=function(){var a=new Ao;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},be=Ao.prototype,be.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},be.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},be.qb=function(a){a.classType===Ao&&(this.type=a)},be.toString=function(){var a="Brush(";if(this.type===jc)a+=this.color;else if(a=this.type===mc?a+"Linear ":this.type===Bu?a+"Radial ":this.type===cg?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+")"},be.addColorStop=function(a,y){return this._isFrozen&&gn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Rn(a,"0 <= loc <= 1",Ao,"addColorStop:loc"),this.we===null&&(this.we=new wi),this.we.add(a,y),this.na===jc&&(this.type=mc),this.xe=null,this},be.Vz=function(a,y){if(this._isFrozen&&gn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===jc)pc(this.color),this.color=lg(a,y);else if((this.type===mc||this.type===Bu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)pc(x.value),this.addColorStop(x.key,lg(a,y));return this};function qy(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,pc(a),lg(y,x)}be.Wy=function(a,y){if(this._isFrozen&&gn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===jc)pc(this.color),this.color=lg(-a,y);else if((this.type===mc||this.type===Bu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)pc(x.value),this.addColorStop(x.key,lg(-a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,pc(a),lg(-y,x)}function ov(a,y,x){pc(a),a=ea.j;var E=ea.u,b=ea.o,z=ea.F;return pc(y),x===void 0&&(x=.5),"rgba("+Math.round((ea.j-a)*x+a)+", "+Math.round((ea.u-E)*x+E)+", "+Math.round((ea.o-b)*x+b)+", "+Math.round((ea.F-z)*x+z)+")"}be.Gx=function(){if(this.type===jc)return sg(this.color);if((this.type===mc||this.type===Bu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Bu)return sg(a.first().value);if(a.get(.5)!==null)return sg(a.get(.5));if(a.count===2)return a=a.Fa(),sg(ov(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var ne=y.key,re=Math.abs(.5-y.key);b>z&&re<b?(x=ne,b=re):z>=b&&re<z&&(E=ne,z=re)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,sg(ov(a.get(x),a.get(E),1-z/b))}return!1};function sg(a){return a?a instanceof Ao?a.Gx():(pc(a),128>(299*ea.j+587*ea.u+114*ea.o)/1e3):!1}function lg(a,y){switch(y){case dg:y=100*sv(ea.j);var x=100*sv(ea.u),E=100*sv(ea.o);return fl.j=.4124564*y+.3575761*x+.1804375*E,fl.u=.2126729*y+.7151522*x+.072175*E,fl.o=.0193339*y+.119192*x+.9503041*E,fl.F=ea.F,y=uv(fl.j/ug[0]),x=uv(fl.u/ug[1]),E=uv(fl.o/ug[2]),Jh.j=116*x-16,Jh.u=500*(y-x),Jh.o=200*(x-E),Jh.F=fl.F,Jh.j=Math.min(100,Math.max(0,Jh.j+100*a)),a=(Jh.j+16)/116,y=a-Jh.o/200,fl.j=ug[0]*t1(Jh.u/500+a),fl.u=ug[1]*(Jh.j>pm*cv?Math.pow(a,3):Jh.j/pm),fl.o=ug[2]*t1(y),fl.F=Jh.F,a=-.969266*fl.j+1.8760108*fl.u+.041556*fl.o,y=.0556434*fl.j+-.2040259*fl.u+1.0572252*fl.o,ea.j=255*lv((3.2404542*fl.j+-1.5371385*fl.u+-.4985314*fl.o)/100),ea.u=255*lv(a/100),ea.o=255*lv(y/100),ea.F=fl.F,ea.j=Math.round(ea.j),255<ea.j?ea.j=255:0>ea.j&&(ea.j=0),ea.u=Math.round(ea.u),255<ea.u?ea.u=255:0>ea.u&&(ea.u=0),ea.o=Math.round(ea.o),255<ea.o?ea.o=255:0>ea.o&&(ea.o=0),"rgba("+ea.j+", "+ea.u+", "+ea.o+", "+ea.F+")";case n1:return av(),gu.o=Math.min(100,Math.max(0,gu.o+100*a)),"hsla("+gu.j+", "+gu.u+"%, "+gu.o+"%, "+gu.F+")";default:St("Unknown color space: "+y)}}function pc(a){hg||(hv(),hg=!0);var y=dv;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,ea.j=a[0],ea.u=a[1],ea.o=a[2],ea.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ea.j=0,ea.u=0,ea.o=0,ea.F=1)}}function av(){var a=ea.j/255,y=ea.u/255,x=ea.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 ne=a=0;else{switch(E){case a:ne=(y-x)/z%6;break;case y:ne=(x-a)/z+2;break;case x:ne=(a-y)/z+4}ne*=60,0>ne&&(ne+=360),a=z/(1-Math.abs(2*b-1))}gu.j=Math.round(ne),gu.u=Math.round(100*a),gu.o=Math.round(100*b),gu.F=ea.F}function sv(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>cv?Math.pow(a,1/3):(pm*a+16)/116}function t1(a){var y=a*a*a;return y>cv?y:(116*a-16)/pm}function Ff(a,y){typeof a!="string"&&(a instanceof Ao||St("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){dv=Na?new Wu(null,void 0,{willReadFrequently:!0}).context:null}Ve.Object.defineProperties(Ao.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&gn(this,a),this.na=a,this.start.Mc()&&(a===mc?this.start=bl:a===Bu&&(this.start=Qr)),this.end.Mc()&&(a===mc?this.end=vs:a===Bu&&(this.end=Qr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&gn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&gn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&gn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&gn(this,a),0>a&&Rn(a,">= zero",Ao,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&gn(this,a),0>a&&Rn(a,">= zero",Ao,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&gn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&gn(this,a),this.cr=a,this.xe=null}}}),Ao.prototype.isDark=Ao.prototype.Gx,Ao.prototype.darkenBy=Ao.prototype.Wy,Ao.prototype.lightenBy=Ao.prototype.Vz,Ao.prototype.addColorStop=Ao.prototype.addColorStop;var cv=216/24389,pm=24389/27,ug=[95.047,100,108.883],dv=null,ea=new up,gu=new up,fl=new up,Jh=new up,hg=!1;Ao.className="Brush";var jc;Ao.Solid=jc=new mn(Ao,"Solid",0);var mc;Ao.Linear=mc=new mn(Ao,"Linear",1);var Bu;Ao.Radial=Bu=new mn(Ao,"Radial",2);var cg;Ao.Pattern=cg=new mn(Ao,"Pattern",4);var dg;Ao.Lab=dg=new mn(Ao,"Lab",5);var n1;Ao.HSL=n1=new mn(Ao,"HSL",6),Ao.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},Ao.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;hg||(hv(),hg=!0);var y=dv;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},Ao.lighten=function(a){return qy(a)},Ao.lightenBy=qy,Ao.darken=function(a){return e1(a)},Ao.darkenBy=e1,Ao.mix=ov,Ao.isDark=sg;function gs(){this.xa="Base"}gs.prototype.measure=function(){},gs.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},gs.prototype.arrange=function(){},gs.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},gs.prototype.iA=function(a){a.Uj()},gs.prototype.gc=function(){},Ve.Object.defineProperties(gs.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Gn}}}),gs.prototype.remeasureObject=gs.prototype.iA,gs.prototype.arrangeElement=gs.prototype.Ly,gs.prototype.measureElement=gs.prototype.Yz,gs.className="PanelLayout";function mm(){this.xa="Base"}Ot(mm,gs),mm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;a=vc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===a){var ue=le.margin,pe=ue.right+ue.left;ue=ue.top+ue.bottom,le.measure(y,x,z,ne);var Pe=le.measuredBounds;pe=Math.max(Pe.width+pe,0),ue=Math.max(Pe.height+ue,0),Pe=le.position.x;var Ce=le.position.y;isFinite(Pe)||(Pe=0),isFinite(Ce)||(Ce=0),le instanceof Cr&&le.isGeometryPositioned&&(le=le.strokeWidth/2,Pe-=le,Ce-=le),ma(b,Pe,Ce,pe,ue)}}},mm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],ne=z.measuredBounds,re=z.margin,oe=z.position.x,le=z.position.y;if(oe=isNaN(oe)?-a:oe-a,le=isNaN(le)?-x:le-x,z instanceof Cr&&z.isGeometryPositioned){var ue=z.strokeWidth/2;oe-=ue,le-=ue}z.visible&&z.arrange(oe+re.left,le+re.top,ne.width,ne.height)}};function vm(){this.xa="Base"}Ot(vm,gs),vm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;y=Qn(),z=vc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===z){var ue=Nl(le,!1);if(ue!==jn&&ue!==Ai)y.push(le);else{le.measure(1/0,x,0,ne),ue=le.margin,le=le.measuredBounds;var pe=Math.max(le.height+ue.top+ue.bottom,0);b.width+=Math.max(le.width+ue.right+ue.left,0),b.height=Math.max(b.height,pe)}}}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++)oe=y[a],(oe.visible||oe===z)&&(ue=oe.margin,re=ue.right+ue.left,ue=ue.top+ue.bottom,oe.measure(1/0,x,0,ne),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,ue));di(y)},vm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,ne=a.isOpposite,re=ne?x.width:b.left,oe=0;oe<E;oe++){var le=z,ue=y[oe];if(ue.visible){var pe=ue.measuredBounds,Pe=ue.margin,Ce=Pe.top+Pe.bottom,Le=z+b.bottom,Oe=pe.height,rt=Nl(ue,!1);(isNaN(ue.desiredSize.height)&&rt===Zn||rt===Zi)&&(Oe=Math.max(x.height-Ce-Le,0)),Ce=Oe+Ce+Le,Le=ue.alignment,Le.Xb()&&(Le=a.defaultAlignment),Le.sb()||(Le=Qr),ne&&(re-=pe.width+Pe.left+Pe.right),ue.arrange(re+Le.offsetX+Pe.left,le+Le.offsetY+Pe.top+(x.height*Le.y-Ce*Le.y),pe.width,Oe),ne||(re+=pe.width+Pe.left+Pe.right)}}};function ym(){this.xa="Base"}Ot(ym,gs),ym.prototype.measure=function(a,y,x,E,b,z){var ne=E.length;x=Qn();for(var re=vc(a),oe=0;oe<ne;oe++){var le=E[oe];if(le.visible||le===re){var ue=Nl(le,!1);if(ue!==jn&&ue!==Zi)x.push(le);else{var pe=le.margin;ue=pe.right+pe.left,pe=pe.top+pe.bottom,le.measure(y,1/0,z,0),le=le.measuredBounds,Oa(b,Math.max(b.width,Math.max(le.width+ue,0)),b.height+Math.max(le.height+pe,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++)oe=x[a],(oe.visible||oe===re)&&(le=oe.margin,ne=le.right+le.left,le=le.top+le.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,le=Math.max(oe.height+le,0),b.width=Math.max(b.width,Math.max(oe.width+ne,0)),b.height+=le);di(x)}},ym.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,ne=a.isOpposite,re=ne?x.height:b.top,oe=0;oe<E;oe++){var le=z,ue=y[oe];if(ue.visible){var pe=ue.measuredBounds,Pe=ue.margin,Ce=Pe.left+Pe.right,Le=z+b.right,Oe=pe.width,rt=Nl(ue,!1);(isNaN(ue.desiredSize.width)&&rt===Zn||rt===Ai)&&(Oe=Math.max(x.width-Ce-Le,0)),Ce=Oe+Ce+Le,Le=ue.alignment,Le.Xb()&&(Le=a.defaultAlignment),Le.sb()||(Le=Qr),ne&&(re-=pe.height+Pe.bottom+Pe.top),ue.arrange(le+Le.offsetX+Pe.left+(x.width*Le.x-Ce*Le.x),re+Le.offsetY+Pe.top,Oe,pe.height),ne||(re+=pe.height+Pe.bottom+Pe.top)}}};function Sm(){this.xa="Base"}Ot(Sm,gs),Sm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),le=oe.margin,ue=le.right+le.left,pe=le.top+le.bottom;oe.measure(y,x,z,ne);var Pe=oe.measuredBounds;z=Pe.width,ne=Pe.height;var Ce=Math.max(z+ue,0),Le=Math.max(ne+pe,0),Oe=a.isClipping,rt=vn.allocAt(-le.left,-le.top,Ce,Le),Ye=vn.allocAt(0,0,z,ne);fv(oe,Ye,!0),z=Ye.width,ne=Ye.height;for(var vt=!0,Pt=vc(a),Ct=0;Ct<re;Ct++){var It=E[Ct];Pe=y;var rn=x;if(It!==oe&&(It.visible||It===Pt)){le=It.margin;var ri=le.left,Pi=le.top;switch(Ce=le.right+le.left,Le=le.top+le.bottom,le=Nl(It,!1),le){case Zn:Pe=z,rn=ne,Pi=ri=Le=Ce=0;break;case Ai:Pe=z,ri=Ce=0;break;case Zi:rn=ne,Pi=Le=0}It.measure(Pe,rn,0,0),Pe=It.measuredBounds,Ce=Math.max(Pe.width+Ce,0),Le=Math.max(Pe.height+Le,0),le=It.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=Qr);var fi=It.alignmentFocus;if(fi.Xb()&&(fi=Qr),rn=null,It instanceof Gn&&It.$e!==""&&(rn=It.fb(It.$e),rn===It&&(rn=null)),ri=Ye.x-ri,Pi=Ye.y-Pi,rn!==null){for(It.arrange(0,0,Pe.width,Pe.height),Pe=rn.actualBounds,Pe=Qe.allocAt(Pe.x+(fi.x*Pe.width-fi.offsetX),Pe.y+(fi.y*Pe.height-fi.offsetY)),rn=rn.panel;rn!==It;)rn.transform.Ga(Pe),rn=rn.panel;ri+=le.x*z+le.offsetX-Pe.x,Pi+=le.y*ne+le.offsetY-Pe.y,Qe.free(Pe)}else ri+=le.x*z+le.offsetX-(fi.x*Pe.width+fi.offsetX),Pi+=le.y*ne+le.offsetY-(fi.y*Pe.height+fi.offsetY);vt?(vt=!1,b.h(ri,Pi,Ce,Le)):ma(b,ri,Pi,Ce,Le)}}switch(vt?b.assign(rt):Oe?b.Uu(Ye.x,Ye.y,Ye.width,Ye.height):ma(b,rt.x,rt.y,rt.width,rt.height),vn.free(rt),vn.free(Ye),le=oe.stretch,le===pr&&(le=Nl(oe,!1)),le){case jn:return;case Zn:if(!isFinite(y)&&!isFinite(x))return;break;case Ai:if(!isFinite(y))return;break;case Zi:if(!isFinite(x))return}for(Pe=oe.measuredBounds,z=Pe.width,ne=Pe.height,Ce=Math.max(z+ue,0),Le=Math.max(ne+pe,0),le=oe.margin,Ye=vn.allocAt(-le.left,-le.top,Ce,Le),fv(oe,Ye,!0),z=Ye.width,ne=Ye.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==Pt||(le=x.margin,Ce=le.right+le.left,Le=le.top+le.bottom,Pe=x.measuredBounds,Ce=Math.max(Pe.width+Ce,0),Le=Math.max(Pe.height+Le,0),ue=x.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Qr),x=x.alignmentFocus,x.Xb()&&(x=Qr),vt?(vt=!1,b.h(ue.x*z+ue.offsetX-(x.x*Pe.width+x.offsetX)-le.left,ue.y*ne+ue.offsetY-(x.y*Pe.height+x.offsetY)-le.top,Ce,Le)):ma(b,ue.x*z+ue.offsetX-(x.x*Pe.width+x.offsetX)-le.left,ue.y*ne+ue.offsetY-(x.y*Pe.height+x.offsetY)-le.top,Ce,Le));vt?b.assign(rt):Oe?b.Uu(Ye.x,Ye.y,Ye.width,Ye.height):ma(b,rt.x,rt.y,rt.width,rt.height),vn.free(Ye)},Sm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,ne=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var le=z-x.x,ue=oe-x.y;for(b.arrange(le,ue,ne,re),ne=vn.allocAt(0,0,ne,re),fv(b,ne,!1),re=0;re<E;re++){var pe=y[re];if(pe!==b){le=pe.measuredBounds;var Pe=le.width,Ce=le.height;ue=pe.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Qr);var Le=pe.alignmentFocus;if(Le.Xb()&&(Le=Qr),le=null,pe instanceof Gn&&pe.$e!==""&&(le=pe.fb(pe.$e),le===pe&&(le=null)),le!==null){var Oe=le.actualBounds;for(Le=Qe.allocAt(Oe.x+(Le.x*Oe.width-Le.offsetX),Oe.y+(Le.y*Oe.height-Le.offsetY)),le=le.panel;le!==pe;)le.transform.Ga(Le),le=le.panel;le=ue.x*ne.width+ue.offsetX-Le.x,ue=ue.y*ne.height+ue.offsetY-Le.y,Qe.free(Le)}else le=ue.x*ne.width+ue.offsetX-(Le.x*Pe+Le.offsetX),ue=ue.y*ne.height+ue.offsetY-(Le.y*Ce+Le.offsetY);le+=ne.x-x.x,ue+=ne.y-x.y,pe.visible&&pe.arrange(z+le,oe+ue,Pe,Ce)}}vn.free(ne)};function fv(a,y,x){var E=null;if(a instanceof Gn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function xm(){this.xa="Base"}Ot(xm,gs),xm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),le=oe.margin,ue=y,pe=x,Pe=le.right+le.left,Ce=le.top+le.bottom;oe.measure(y,x,z,ne),le=oe.measuredBounds;var Le=0,Oe=null;oe instanceof Cr&&(Oe=oe,Le=Oe.strokeWidth*Oe.scale);var rt=Math.max(le.width+Pe,0);le=Math.max(le.height+Ce,0);var Ye=vv(oe),vt=Ye.x*rt+Ye.offsetX;Ye=Ye.y*le+Ye.offsetY;var Pt=yv(oe),Ct=Pt.x*rt+Pt.offsetX;for(Pt=Pt.y*le+Pt.offsetY,isFinite(y)&&(ue=Math.max(Math.abs(vt-Ct)-Le,0)),isFinite(x)&&(pe=Math.max(Math.abs(Ye-Pt)-Le,0)),Le=qn.alloc(),Le.h(0,0),a=vc(a),Pt=0;Pt<re;Pt++)Ye=E[Pt],Ye===oe||!Ye.visible&&Ye!==a||(le=Ye.margin,rt=le.right+le.left,vt=le.top+le.bottom,Ye.measure(ue,pe,0,0),le=Ye.measuredBounds,rt=Math.max(le.width+rt,0),le=Math.max(le.height+vt,0),Le.h(Math.max(rt,Le.width),Math.max(le,Le.height)));if(re===1)b.width=rt,b.height=le,qn.free(Le);else{switch(Ye=vv(oe),Pt=yv(oe),re=E=0,Pt.x!==Ye.x&&Pt.y!==Ye.y&&(E=Le.width/Math.abs(Pt.x-Ye.x),re=Le.height/Math.abs(Pt.y-Ye.y)),qn.free(Le),Le=0,Oe!==null&&(Le=Oe.strokeWidth*Oe.scale,Ev(Oe)===Ei&&(E=re=Math.max(E,re))),E+=Math.abs(Ye.offsetX)+Math.abs(Pt.offsetX)+Le,re+=Math.abs(Ye.offsetY)+Math.abs(Pt.offsetY)+Le,Oe=oe.stretch,Oe===pr&&(Oe=Nl(oe,!1)),Oe){case jn:ne=z=0;break;case Zn:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case Ai:isFinite(y)&&(E=y),ne=0;break;case Zi:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ne),b.width=oe.measuredBounds.width+Pe,b.height=oe.measuredBounds.height+Ce}},xm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=vn.alloc();z.h(0,0,1,1);var ne=E.margin,re=ne.left;ne=ne.top;var oe=a.padding,le=oe.left;oe=oe.top,E.arrange(le+re,oe+ne,b.width,b.height);var ue=vv(E),pe=yv(E),Pe=ue.y*b.height+ue.offsetY,Ce=pe.x*b.width+pe.offsetX;for(pe=pe.y*b.height+pe.offsetY,z.x=ue.x*b.width+ue.offsetX,z.y=Pe,ma(z,Ce,pe,0,0),z.x+=re+le,z.y+=ne+oe,b=0;b<x;b++)re=y[b],re!==E&&(le=re.measuredBounds,ne=re.margin,oe=Math.max(le.width+ne.right+ne.left,0),ue=Math.max(le.height+ne.top+ne.bottom,0),Pe=re.alignment,Pe.Xb()&&(Pe=a.defaultAlignment),Pe.sb()||(Pe=Qr),oe=z.width*Pe.x+Pe.offsetX-oe*Pe.x+ne.left+z.x,ne=z.height*Pe.y+Pe.offsetY-ue*Pe.y+ne.top+z.y,re.visible&&(Fo(z.x,z.y,z.width,z.height,oe,ne,le.width,le.height)?re.arrange(oe,ne,le.width,le.height):re.arrange(oe,ne,le.width,le.height,new vn(z.x,z.y,z.width,z.height))));vn.free(z)};function Pm(){this.xa="Base",this.name="Table"}Ot(Pm,gs),Pm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ne=Qn(),re=Qn(),oe=0;oe<z;oe++){var le=E[oe],ue=le instanceof Gn?le:null;if(ue!==null&&zc(ue)&&le.visible){re.push(ue);for(var pe=ue.O.s,Pe=pe.length,Ce=0;Ce<Pe;Ce++){var Le=pe[Ce];ue.type===Gn.TableRow?Le.row=le.row:ue.type===Gn.TableColumn&&(Le.column=le.column),ne.push(Le)}}else ne.push(le)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var Oe=[],rt=0;rt<z;rt++){var Ye=ne[rt];Ye.visible&&(ls(Ye,!0),Yh(Ye,!0),Oe[Ye.row]||(Oe[Ye.row]=[]),Oe[Ye.row][Ye.column]||(Oe[Ye.row][Ye.column]=[]),Oe[Ye.row][Ye.column].push(Ye))}di(ne);var vt=Qn(),Pt=Qn(),Ct=Qn(),It={count:0},rn={count:0},ri=y,Pi=x,fi=a.rowDefs,$n=a.colDefs,In=null;z=fi.length;for(var ur=0;ur<z;ur++)In=fi[ur],In!==void 0&&(In.actual=0);z=$n.length;for(var Ji=0;Ji<z;Ji++)In=$n[Ji],In!==void 0&&(In.actual=0);for(var vo=Oe.length,Xo=0,xs=0;xs<vo;xs++)Oe[xs]&&(Xo=Math.max(Xo,Oe[xs].length));var Es=Math.min(a.topIndex,vo-1),al=Math.min(a.leftIndex,Xo-1),Ps=0;vo=Oe.length;for(var Yc=vc(a),Ja=0;Ja<vo;Ja++)if(Oe[Ja]){Xo=Oe[Ja].length;var Ph=a.Fb(Ja);Ph.actual=0;for(var sl=Ph.oc=0;sl<Xo;sl++)if(Oe[Ja][sl]){var Xc=a.Eb(sl);vt[sl]===void 0&&(Xc.actual=0,Xc.oc=0,vt[sl]=!0);for(var vu=Oe[Ja][sl],Uu=vu.length,eu=0;eu<Uu;eu++){var Gl=vu[eu];if(Gl.visible||Gl===Yc){var Ld=1<Gl.rowSpan||1<Gl.columnSpan;Ld&&(Ja<Es||sl<al||Pt.push(Gl));var wh=Gl.margin,Og=wh.right+wh.left,tu=wh.top+wh.bottom,ll=mh(Gl,Ph,Xc,!1),Xp=Gl.desiredSize,_f=!isNaN(Xp.height),jh=!isNaN(Xp.width)&&_f;if(Ld||ll===jn||jh||Ja<Es||sl<al||(It[sl]!==void 0||ll!==Zn&&ll!==Ai||(It[sl]=-1,It.count++),rn[Ja]!==void 0||ll!==Zn&&ll!==Zi||(rn[Ja]=-1,rn.count++),Ct.push(Gl)),Gl.measure(1/0,1/0,0,0),!(Ja<Es||sl<al)){var Wl=Gl.measuredBounds,lf=Math.max(Wl.width+Og,0),nu=Math.max(Wl.height+tu,0);if(Gl.rowSpan===1&&(ll===jn||ll===Ai)){In=a.Fb(Ja);var Fd=In.Wc();Ps=Math.max(nu-In.actual,0),Ps+Fd>Pi&&(Ps=Math.max(Pi-Fd,0));var W0=In.oa===0;In.oc=In.oc+Ps,In.actual=In.oa+Ps,Pi=Math.max(Pi-(Ps+(W0?Fd:0)),0)}if(Gl.columnSpan===1&&(ll===jn||ll===Zi)){In=a.Eb(sl);var Jp=In.Wc();Ps=Math.max(lf-In.actual,0),Ps+Jp>ri&&(Ps=Math.max(ri-Jp,0));var _y=In.oa===0;In.oc=In.oc+Ps,In.actual=In.oa+Ps,ri=Math.max(ri-(Ps+(_y?Jp:0)),0)}Ld&&Gl.Uj()}}}}}di(vt);var ac=0,xc=0;z=a.columnCount;for(var Zf=0;Zf<z;Zf++){var Nd=$n[Zf];Nd!==void 0&&(ac+=isNaN(Nd.Hc)?Nd.oc:Nd.Hc,Nd.oc!==0&&(ac+=Nd.Wc()))}z=a.rowCount;for(var Ig=0;Ig<z;Ig++){var Bd=fi[Ig];Bd!==void 0&&(xc+=isNaN(Bd.Hc)?Bd.oc:Bd.Hc,Bd.oc!==0&&(xc+=Bd.Wc()))}ri=Math.max(y-ac,0);var sc=Pi=Math.max(x-xc,0),Jc=ri;z=Ct.length;for(var $l=0;$l<z;$l++){var zh=Ct[$l],$0=a.Fb(zh.row),Pc=a.Eb(zh.column),Rg=zh.measuredBounds,Ch=zh.margin,uf=Ch.right+Ch.left,_h=Ch.top+Ch.bottom;It[zh.column]=Pc.oc===0&&It[zh.column]!==void 0?Math.max(Rg.width+uf,It[zh.column]):null,rn[zh.row]=$0.oc===0&&rn[zh.row]!==void 0?Math.max(Rg.height+_h,rn[zh.row]):null}var Hf=0,jg=0,hh;for(hh in rn)hh!=="count"&&(Hf+=rn[hh]);for(hh in It)hh!=="count"&&(jg+=It[hh]);for(var Os=qn.alloc(),Qp=0;Qp<z;Qp++){var xl=Ct[Qp];if(xl.visible||xl===Yc){var Qa=a.Fb(xl.row),Pl=a.Eb(xl.column),wc=0;isFinite(Pl.width)?wc=Pl.width:(isFinite(ri)&&It[xl.column]!==null?jg===0?wc=Pl.actual+ri:wc=It[xl.column]/jg*Jc:It[xl.column]!==null?wc=ri:wc=Pl.actual||ri,wc=Math.max(0,wc-Pl.Wc()));var Qc=0;switch(isFinite(Qa.height)?Qc=Qa.height:(isFinite(Pi)&&rn[xl.row]!==null?Hf===0?Qc=Qa.actual+Pi:Qc=rn[xl.row]/Hf*sc:rn[xl.row]!==null?Qc=Pi:Qc=Qa.actual||Pi,Qc=Math.max(0,Qc-Qa.Wc())),Os.h(Math.max(Pl.minimum,Math.min(wc,Pl.maximum)),Math.max(Qa.minimum,Math.min(Qc,Qa.maximum))),ll=mh(xl,Qa,Pl,!1),ll){case Ai:Os.height=Math.max(Os.height,Qa.actual+Pi);break;case Zi:Os.width=Math.max(Os.width,Pl.actual+ri)}var hf=xl.margin,Zy=hf.right+hf.left,K0=hf.top+hf.bottom;xl.Uj(),xl.measure(Os.width,Os.height,Pl.minimum,Qa.minimum);var zg=xl.measuredBounds,cf=Math.max(zg.width+Zy,0),Gf=Math.max(zg.height+K0,0);isFinite(ri)&&(cf=Math.min(cf,Os.width)),isFinite(Pi)&&(Gf=Math.min(Gf,Os.height));var Kl=0;Kl=Qa.actual,Qa.actual=Math.max(Qa.actual,Gf),Qa.oc=Math.max(Qa.oc,Gf),Ps=Qa.actual-Kl,Pi=Math.max(Pi-Ps,0),rn[xl.row]===null&&(sc=Math.max(sc-Ps,0)),Kl=Pl.actual,Pl.actual=Math.max(Pl.actual,cf),Pl.oc=Math.max(Pl.oc,cf),Ps=Pl.actual-Kl,ri=Math.max(ri-Ps,0),It[xl.column]===null&&(Jc=Math.max(Jc-Ps,0))}}di(Ct);var Cc=qn.alloc(),Eh=Qn(),Ou=Qn();if(z=Pt.length,z!==0){for(var kd=0;kd<vo;kd++)if(Oe[kd]){Xo=Oe[kd].length;var _g=a.Fb(kd);Eh[kd]=_g.actual;for(var Ad=0;Ad<Xo;Ad++)if(Oe[kd][Ad]){var V0=a.Eb(Ad);Ou[Ad]=V0.actual}}}for(var Zg=0;Zg<z;Zg++){var Ra=Pt[Zg];if(Ra.visible||Ra===Yc){var ch=a.Fb(Ra.row),Yu=a.Eb(Ra.column);switch(Os.h(Math.max(Yu.minimum,Math.min(y,Yu.maximum)),Math.max(ch.minimum,Math.min(x,ch.maximum))),ll=mh(Ra,ch,Yu,!1),ll){case Zn:Ou[Yu.index]!==0&&(Os.width=Math.min(Os.width,Ou[Yu.index])),Eh[ch.index]!==0&&(Os.height=Math.min(Os.height,Eh[ch.index]));break;case Ai:Ou[Yu.index]!==0&&(Os.width=Math.min(Os.width,Ou[Yu.index]));break;case Zi:Eh[ch.index]!==0&&(Os.height=Math.min(Os.height,Eh[ch.index]))}isFinite(Yu.width)&&(Os.width=Yu.width),isFinite(ch.height)&&(Os.height=ch.height),Cc.h(0,0);for(var U0=Yu.minimum,iu=ch.minimum,qc=1;qc<Ra.rowSpan&&!(Ra.row+qc>=a.rowCount);qc++)In=a.Fb(Ra.row+qc),Ps=0,Ps=ll===Zn||ll===Zi?Math.max(In.minimum,Eh[Ra.row+qc]===0?In.maximum:Math.min(Eh[Ra.row+qc],In.maximum)):Math.max(In.minimum,isNaN(In.Hc)?In.maximum:Math.min(In.Hc,In.maximum)),Cc.height+=Ps,iu+=In.minimum;for(var Xu=1;Xu<Ra.columnSpan&&!(Ra.column+Xu>=a.columnCount);Xu++)In=a.Eb(Ra.column+Xu),Ps=0,Ps=ll===Zn||ll===Ai?Math.max(In.minimum,Ou[Ra.column+Xu]===0?In.maximum:Math.min(Ou[Ra.column+Xu],In.maximum)):Math.max(In.minimum,isNaN(In.Hc)?In.maximum:Math.min(In.Hc,In.maximum)),Cc.width+=Ps,U0+=In.minimum;Os.width+=Cc.width,Os.height+=Cc.height;var Hg=Ra.margin,Td=Hg.right+Hg.left,qp=Hg.top+Hg.bottom;Ra.measure(Os.width,Os.height,U0,iu);for(var Gg=Ra.measuredBounds,Zh=Math.max(Gg.width+Td,0),df=Math.max(Gg.height+qp,0),Dd=0,Wg=0;Wg<Ra.rowSpan&&!(Ra.row+Wg>=a.rowCount);Wg++)In=a.Fb(Ra.row+Wg),Dd+=In.total||0;if(Dd<df){var ed=df-Dd,lc=df-Dd;if(Ra.spanAllocation!==null)for(var td=Ra.spanAllocation,Ec=0;Ec<Ra.rowSpan&&!(0>=ed)&&!(Ra.row+Ec>=a.rowCount);Ec++){In=a.Fb(Ra.row+Ec);var nd=In.oa||0,ff=td(Ra,In,lc);In.actual=Math.min(In.maximum,nd+ff),In.oa!==nd&&(ed-=In.oa-nd)}for(;0<ed;){var bh=In.oa||0;if(isNaN(In.height)&&In.maximum>bh&&(In.actual=Math.min(In.maximum,bh+ed),In.oa!==bh&&(ed-=In.oa-bh)),In.index===0)break;In=a.Fb(In.index-1)}}for(var Wf=0,id=0;id<Ra.columnSpan&&!(Ra.column+id>=a.columnCount);id++)In=a.Eb(Ra.column+id),Wf+=In.total||0;if(Wf<Zh){var $f=Zh-Wf,Hy=Zh-Wf;if(Ra.spanAllocation!==null)for(var bc=Ra.spanAllocation,gf=0;gf<Ra.columnSpan&&!(0>=$f)&&!(Ra.column+gf>=a.columnCount);gf++){In=a.Eb(Ra.column+gf);var em=In.oa||0,Gy=bc(Ra,In,Hy);In.actual=Math.min(In.maximum,em+Gy),In.oa!==em&&($f-=In.oa-em)}for(;0<$f;){var Y0=In.oa||0;if(isNaN(In.width)&&In.maximum>Y0&&(In.actual=Math.min(In.maximum,Y0+$f),In.oa!==Y0&&($f-=In.oa-Y0)),In.index===0)break;In=a.Eb(In.index-1)}}}}di(Pt),qn.free(Cc),qn.free(Os),Eh!==void 0&&di(Eh),Ou!==void 0&&di(Ou);var Kf=0,Vf=0,X0=a.desiredSize,gx=a.maxSize;ll=Nl(a,!0);var tm=xc=ac=0,nm=0;z=a.columnCount;for(var J0=0;J0<z;J0++)$n[J0]!==void 0&&(In=a.Eb(J0),isFinite(In.width)?(tm+=In.width,tm+=In.Wc()):km(In)===fp?(tm+=In.oa,tm+=In.Wc()):In.oa!==0&&(ac+=In.oa,ac+=In.Wc()));isFinite(X0.width)?Kf=Math.min(X0.width,gx.width):Kf=ll!==jn&&isFinite(y)?y:ac,Kf=Math.max(Kf,a.minSize.width),Kf=Math.max(Kf-tm,0);for(var Jx=ac===0?1:Math.max(Kf/ac,1),Q0=0;Q0<z;Q0++)$n[Q0]!==void 0&&(In=a.Eb(Q0),isFinite(In.width)||km(In)===fp||(In.actual=In.oa*Jx),In.position=b.width,In.oa!==0&&(b.width+=In.oa,b.width+=In.Wc()));z=a.rowCount;for(var q0=0;q0<z;q0++)fi[q0]!==void 0&&(In=a.Fb(q0),isFinite(In.height)?(nm+=In.height,nm+=In.Wc()):km(In)===fp?(nm+=In.oa,nm+=In.Wc()):In.oa!==0&&(xc+=In.oa,xc+=In.Wc()));isFinite(X0.height)?Vf=Math.min(X0.height,gx.height):Vf=ll!==jn&&isFinite(x)?x:xc,Vf=Math.max(Vf,a.minSize.height),Vf=Math.max(Vf-nm,0);for(var Qx=xc===0?1:Math.max(Vf/xc,1),ev=0;ev<z;ev++)fi[ev]!==void 0&&(In=a.Fb(ev),isFinite(In.height)||km(In)===fp||(In.actual=In.oa*Qx),In.position=b.height,In.oa!==0&&(b.height+=In.oa,b.height+=In.Wc()));z=re.length;for(var Wy=0;Wy<z;Wy++){var im=re[Wy],$y=0,Ky=0;im.type===Gn.TableRow?($y=b.width,In=a.Fb(im.row),Ky=In.actual):(In=a.Eb(im.column),$y=In.actual,Ky=b.height),im.measuredBounds.h(0,0,$y,Ky),ls(im,!1)}di(re),a.inRowsCols=Oe},Pm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var ne=a.inRowsCols;if(ne!==null){for(var re,oe,le=ne.length,ue=0,pe=0;pe<le;pe++)ne[pe]&&(ue=Math.max(ue,ne[pe].length));oe=a.rowDefs,re=a.colDefs;var Pe=pe=0,Ce=Math.min(a.topIndex,le-1);if(0<oe.length){for(;Ce!==le&&(oe[Ce]===void 0||oe[Ce].oa===0);)Ce++;Ce=Math.max(Math.min(Ce,le-1),0),pe=-oe[Ce].position}var Le=Math.min(a.leftIndex,ue-1);if(0<re.length){for(;Le!==ue&&(re[Le]===void 0||re[Le].oa===0);)Le++;Le=Math.max(Math.min(Le,ue-1),0),Pe=-re[Le].position}for(var Oe=0,rt=0;Oe!==le&&oe[Oe]===void 0;)Oe++;for(;rt!==le&&re[rt]===void 0;)rt++;ue=a.part,a.Fb(Oe),a.Eb(rt);for(var Ye=0;Ye<y.length;Ye++){var vt=y[Ye];if(vt instanceof Gn&&vt.visible&&zc(vt)){if(vt.type===Gn.TableRow){re=a.Fb(vt.row);var Pt=a.Eb(rt)}else re=a.Fb(Oe),Pt=a.Eb(vt.column);oe=re.position+pe+b,re.oa!==0&&(oe+=re.Io(Math.max(Oe,Ce))),re=Pt.position+Pe+z,Pt.oa!==0&&(re+=Pt.Io(Math.max(rt,Le))),Pt=vt.measuredBounds,vt.Uk(),vt.actualBounds.ka();var Ct=vt.actualBounds,It=vn.allocAt(Ct.x,Ct.y,Ct.width,Ct.height);Ct.x=vt.type===Gn.TableRow?z:re,Ct.y=vt.type===Gn.TableColumn?b:oe,Ct.width=Pt.width,Ct.height=Pt.height,vt.actualBounds.freeze(),Yh(vt,!1),wl(It,Ct)||ue===null||(ue.oh(),vt.Pn(ue)),vn.free(It)}}for(Ye=qn.alloc(),vt=0;vt<le;vt++)if(ne[vt]){for(ue=ne[vt].length,Pt=a.Fb(vt),oe=Pt.position+pe+b,Pt.oa!==0&&(oe+=Pt.Io(Math.max(Oe,Ce))),Ct=0;Ct<ue;Ct++)if(ne[vt][Ct]){It=a.Eb(Ct),re=It.position+Pe+z,It.oa!==0&&(re+=It.Io(Math.max(rt,Le)));for(var rn=ne[vt][Ct],ri=rn.length,Pi=0;Pi<ri;Pi++){var fi=rn[Pi],$n=fi.measuredBounds;Ye.h(0,0);for(var In=1;In<fi.rowSpan&&!(vt+In>=a.rowCount);In++){var ur=a.Fb(vt+In);ur.oa!==0&&(Ye.height+=ur.total)}for(In=1;In<fi.columnSpan&&!(Ct+In>=a.columnCount);In++)ur=a.Eb(Ct+In),ur.oa!==0&&(Ye.width+=ur.total);var Ji=It.oa+Ye.width,vo=Pt.oa+Ye.height;In=re,ur=oe;var Xo=Ji,xs=vo,Es=re,al=oe,Ps=Ji,Yc=vo;re+Ji>x.width&&(Ps=Math.max(x.width-re,0)),oe+vo>x.height&&(Yc=Math.max(x.height-oe,0));var Ja=fi.alignment;if(Ja.Xb()){Ja=a.defaultAlignment,Ja.sb()||(Ja=Qr);var Ph=Ja.x,sl=Ja.y,Xc=Ja.offsetX;Ja=Ja.offsetY;var vu=It.alignment,Uu=Pt.alignment;vu.sb()&&(Ph=vu.x,Xc=vu.offsetX),Uu.sb()&&(sl=Uu.y,Ja=Uu.offsetY)}else Ph=Ja.x,sl=Ja.y,Xc=Ja.offsetX,Ja=Ja.offsetY;(isNaN(Ph)||isNaN(sl))&&(sl=Ph=.5,Ja=Xc=0),vu=$n.width,Uu=$n.height;var eu=fi.margin,Gl=eu.left+eu.right,Ld=eu.top+eu.bottom,wh=mh(fi,Pt,It,!1);!isNaN(fi.desiredSize.width)||wh!==Zn&&wh!==Ai||(vu=Math.max(Ji-Gl,0)),!isNaN(fi.desiredSize.height)||wh!==Zn&&wh!==Zi||(Uu=Math.max(vo-Ld,0)),Ji=fi.maxSize,vo=fi.minSize,vu=Math.min(Ji.width,vu),Uu=Math.min(Ji.height,Uu),vu=Math.max(vo.width,vu),Uu=Math.max(vo.height,Uu),Ji=Uu+Ld,In+=Xo*Ph-(vu+Gl)*Ph+Xc+eu.left,ur+=xs*sl-Ji*sl+Ja+eu.top,fi.visible&&(Fo(Es,al,Ps,Yc,In,ur,$n.width,$n.height)?fi.arrange(In,ur,vu,Uu):fi.arrange(In,ur,vu,Uu,new vn(Es,al,Ps,Yc)))}}}for(qn.free(Ye),a=0;a<E;a++)x=y[a],z=x instanceof Gn?x:null,z!==null&&zc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function wm(){this.xa="Base"}Ot(wm,gs),wm.prototype.measure=function(){},wm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Ot(Cm,gs),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Em(){this.xa="Base"}Ot(Em,gs),Em.prototype.measure=function(a,y,x,E,b,z,ne){1<E.length&&St("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,ne);var re=E.measuredBounds,oe=E.margin,le=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ue=E.scale,pe=re.width;re=re.height;var Pe=Math.max(y-le,0),Ce=Math.max(x-oe,0),Le=1;a.viewboxStretch===Ei?pe!==0&&re!==0&&(Le=Math.min(Pe/pe,Ce/re)):pe!==0&&re!==0&&(Le=Math.max(Pe/pe,Ce/re)),Le===0&&(Le=1e-4),E.Ca*=Le,ue!==E.scale&&(ls(E,!0),E.measure(1/0,1/0,z,ne))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+le,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Em.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 ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=Qr),y.arrange(x.width*ne.x-z*ne.x+ne.offsetX,x.height*ne.y-b*ne.y+ne.offsetY,E.width,E.height)};function hp(){this.xa="Base"}Ot(hp,gs),hp.prototype.measure=function(){},hp.prototype.arrange=function(){},hp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,ne=a.actualBounds,re=z.width,oe=z.height,le=Math.ceil(re/b),ue=Math.ceil(oe/E),pe=a.gridOrigin,Pe=pe.x;pe=pe.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Ce=[],Le=a.O.s,Oe=Le.length,rt=0;rt<Oe;rt++){var Ye=Le[rt],vt=[];if(Ce.push(vt),Ye.visible){var Pt=Ye.interval;if(!(0>Pt)){Ye=pv(Ye.figure);for(var Ct=0;Ct<Oe;Ct++)if(Ct!==rt){var It=Le[Ct];It.visible&&pv(It.figure)===Ye&&(It=It.interval,It>Pt&&vt.push(It))}}}}for(Le=a.O.s,Oe=Le.length,rt=0;rt<Oe;rt++){var rn=Le[rt];if(rn.visible&&(vt=rn.interval||1,Ye=Math.abs(vt),!(2>b*Ye*x))){if(Pt=rn.segmentIndex,(!isFinite(Pt)||isNaN(Pt))&&(Pt=0),0>Pt&&(Pt=Ye-Math.min(-Pt,Ye)),Pt=Math.round(Pt%Ye),Ye=rn.opacity,Ct=1,Ye!==1){if(Ye===0)continue;Ct=y.globalAlpha,y.globalAlpha=Ct*Ye}It=Ce[rt];var ri=!1,Pi=rn.strokeDashArray;if(Pi!==null&&(ri=!0,y.js(Pi,rn.strokeDashOffset)),rn.figure==="LineV"&&rn.stroke!==null&&0<rn.strokeWidth){for(y.lineWidth=rn.strokeWidth,Da(a,y,rn.stroke,!1,!1,z,ne),y.beginPath(),Pi=rn=Math.floor((Pe-b)/b);Pi<=rn+le;Pi++){var fi=Pi*b+Pe;0<=fi&&fi<=re&&bm(Pi,vt,Pt,It)&&(y.moveTo(fi,0),y.lineTo(fi,oe))}y.stroke(),y.Se()}else if(rn.figure==="LineH"&&rn.stroke!==null&&0<rn.strokeWidth){for(y.lineWidth=rn.strokeWidth,Da(a,y,rn.stroke,!1,!1,z,ne),y.beginPath(),Pi=rn=Math.floor((pe-E)/E);Pi<=rn+ue;Pi++)fi=Pi*E+pe,0<=fi&&fi<=oe&&bm(Pi,vt,Pt,It)&&(y.moveTo(0,fi),y.lineTo(re,fi));y.stroke(),y.Se()}else if(rn.figure==="BarV"&&rn.fill!==null)for(Da(a,y,rn.fill,!0,!1,z,ne),rn=rn.width,isNaN(rn)&&(rn=b),fi=Pi=Math.floor((Pe-b)/b);fi<=Pi+le;fi++){var $n=fi*b+Pe;0<=$n+rn&&$n<=re&&bm(fi,vt,Pt,It)&&y.fillRect($n,0,rn,oe)}else if(rn.figure==="BarH"&&rn.fill!==null)for(Da(a,y,rn.fill,!0,!1,z,ne),rn=rn.height,isNaN(rn)&&(rn=E),fi=Pi=Math.floor((pe-E)/E);fi<=Pi+ue;fi++)$n=fi*E+pe,0<=$n+rn&&$n<=oe&&bm(fi,vt,Pt,It)&&y.fillRect(0,$n,re,rn);ri&&y.fs(),Ye!==1&&(y.globalAlpha=Ct)}}y.restore(),y.Vc(!1)};function bm(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 Mm(){this.xa="Base"}Ot(Mm,gs),Mm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof lo||a instanceof Kn){var ne=null,re=null;if(a instanceof Kn&&(ne=a),a instanceof lo&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof Kn){var oe=ne;if(z===0)Oa(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var le=a instanceof lo?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ue=oe.points,pe=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var Pe=y.height,Ce=a.j;if(Ce.length=0,le!==null){i1(a,re,Pe,le);var Le=le.measuredBounds;x.ed(Le),Ce.push(Le)}Le=Ht.alloc();for(var Oe=Qe.alloc(),rt=Qe.alloc(),Ye=0;Ye<z;Ye++){var vt=E[Ye];if(vt!==le)if(vt.isPanelMain&&vt instanceof Cr){i1(a,re,Pe,vt);var Pt=vt.measuredBounds;x.ed(Pt),Ce.push(Pt)}else if(2>pe)vt.measure(1/0,1/0,0,0),Pt=vt.measuredBounds,x.ed(Pt),Ce.push(Pt);else{var Ct=vt.segmentIndex,It=vt.segmentFraction,rn=vt.alignmentFocus;rn.Mc()&&(rn=Qr);var ri=vt.segmentOrientation,Pi=vt.segmentOffset;if(isNaN(Ct)){var fi=oe.ua;Pt=Qn(),fi.Qu(It,Pt);var $n=Qe.allocAt(Pt[0],Pt[1]);if($n.add(oe.i(0)),fi.type===Pn.j?$n.offset(-fi.startX,-fi.startY):(fi=fi.figures.first(),fi!==null&&$n.offset(-fi.startX,-fi.startY)),fi=Pt[2],ri!==pl){var In=oe.computeAngle(vt,ri,fi);vt.Kb=In}In=$n.x-y.x;var ur=$n.y-y.y;Qe.free($n),di(Pt)}else if(Ct<-pe||Ct>=pe)Pt=Qe.alloc(),oe.vg(),oe.computeMidPoint(Pt),fi=oe.midAngle,ri!==pl&&(In=oe.computeAngle(vt,ri,fi),vt.Kb=In),In=Pt.x-y.x,ur=Pt.y-y.y,Qe.free(Pt);else{if(In=0,0<=Ct?(ur=ue.M(Ct),Pt=Ct<pe-1?ue.M(Ct+1):ur):(In=pe+Ct,ur=ue.M(In),Pt=0<In?ue.M(In-1):ur),ur.Xa(Pt)){0<=Ct?(fi=0<Ct?ue.M(Ct-1):ur,In=Ct<pe-2?ue.M(Ct+2):Pt):(fi=In<pe-1?ue.M(In+1):ur,In=1<In?ue.M(In-2):Pt),$n=fi.Bf(ur);var Ji=Pt.Bf(In);fi=$n>Ji+10?0<=Ct?fi.ab(ur):ur.ab(fi):Ji>$n+10?0<=Ct?Pt.ab(In):In.ab(Pt):0<=Ct?fi.ab(In):In.ab(fi)}else fi=0<=Ct?ur.ab(Pt):Pt.ab(ur);ri!==pl&&(In=oe.computeAngle(vt,ri,fi),vt.Kb=In),In=ur.x+(Pt.x-ur.x)*It-y.x,ur=ur.y+(Pt.y-ur.y)*It-y.y}vt.measure(1/0,1/0,0,0),Pt=vt.measuredBounds,$n=vt.naturalBounds;var vo=0;vt instanceof Cr&&(vo=vt.strokeWidth),Ji=$n.width+vo;var Xo=$n.height+vo;Le.reset(),Le.translate(-Pt.x,-Pt.y),Le.scale(vt.scale,vt.scale),Le.rotate(ri===pl?vt.angle:fi,Ji/2,Xo/2),ri!==Cp&&ri!==bp||Le.rotate(90,Ji/2,Xo/2),ri!==Ep&&ri!==Mp||Le.rotate(-90,Ji/2,Xo/2),ri===n0&&(45<fi&&135>fi||225<fi&&315>fi)&&Le.rotate(-fi,Ji/2,Xo/2),$n=new vn(0,0,Ji,Xo),Oe.xi($n,rn),Le.Ga(Oe),rn=-Oe.x+vo/2*vt.scale,vt=-Oe.y+vo/2*vt.scale,rt.assign(Pi),vo=isNaN(Pi.x);var xs=isNaN(Pi.y);if(vo||xs){Ji=Ji/2+3,Xo=Xo/2+3;var Es=45<=fi&&135>=fi,al=225<=fi&&315>=fi;ri===pl&&(Es||al)?(rt.x=xs?Ji:Pi.y,rt.y=vo?Xo:Pi.x,Es?0<=Ct||isNaN(Ct)&&.5>It||!vo||(rt.y=-Xo):al&&((0<=Ct||isNaN(Ct)&&.5>It)&&vo&&(rt.y=-Xo),xs&&(rt.x=-Ji))):(vo&&(rt.x=0<=Ct||isNaN(Ct)&&.5>It?Ji:-Ji),xs&&(rt.y=-Xo),rt.rotate(fi))}else rt.rotate(fi);In+=rt.x,ur+=rt.y,$n.set(Pt),$n.h(In+rn,ur+vt,Pt.width,Pt.height),Ce.push($n),x.ed($n)}}if(ne!==null)for(E=ne.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Oa(b,x.width||0,x.height||0),Ht.free(Le),Qe.free(Oe),Qe.free(rt)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof lo||a instanceof Kn){var E=a,b=null;a instanceof lo&&(b=a,E=b.adornedPart);var z=a instanceof lo?null:E.path,ne=a.j;if(ne.length!==0){var re=0;if(z!==null&&re<ne.length){var oe=ne[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var le=y[oe];if(le!==z&&re<ne.length){var ue=ne[re];re++,le.arrange(ue.x-a.jg.x,ue.y-a.jg.y,ue.width,ue.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Kn)for(z=a.labelNodes;z.next();){var pe=a;ne=z.value,re=ne.segmentIndex,oe=ne.segmentFraction;var Pe=ne.alignmentFocus;if(le=ne.segmentOrientation,ue=ne.segmentOffset,isNaN(re)){var Ce=pe.ua,Le=Qn();Ce.Qu(oe,Le);var Oe=Qe.allocAt(Le[0],Le[1]);Oe.add(pe.i(0)),Ce.type===Pn.j||(Ce=Ce.figures.first()),Oe.offset(-Ce.startX,-Ce.startY),Ce=Le[2],le!==pl&&(pe=pe.computeAngle(ne,le,Ce),ne.angle=pe),pe=Oe.x;var rt=Oe.y;Qe.free(Oe),di(Le)}else if(re<-x||re>=x)Le=Qe.alloc(),Ce=pe,rt=Le,Ce.vg(),Ce.computeMidPoint(rt),Ce=pe.midAngle,le!==pl&&(pe=pe.computeAngle(ne,le,Ce),ne.angle=pe),pe=Le.x,rt=Le.y,Qe.free(Le);else{if(Oe=0,0<=re?(Le=y.s[re],rt=re<x-1?y.s[re+1]:Le):(Oe=x+re,Le=y.s[Oe],rt=0<Oe?y.s[Oe-1]:Le),Le.Xa(rt)){0<=re?(Ce=0<re?y.s[re-1]:Le,Oe=re<x-2?y.s[re+2]:rt):(Ce=Oe<x-1?y.s[Oe+1]:Le,Oe=1<Oe?y.s[Oe-2]:rt);var Ye=Ce.Bf(Le),vt=rt.Bf(Oe);Ce=Ye>vt+10?0<=re?Ce.ab(Le):Le.ab(Ce):vt>Ye+10?0<=re?rt.ab(Oe):Oe.ab(rt):0<=re?Ce.ab(Oe):Oe.ab(Ce)}else Ce=0<=re?Le.ab(rt):rt.ab(Le);le!==pl&&(pe=pe.computeAngle(ne,le,Ce),ne.angle=pe),pe=Le.x+(rt.x-Le.x)*oe,rt=Le.y+(rt.y-Le.y)*oe}if(Pe.ys())ne.location=new Qe(pe,rt);else{Pe.Mc()&&(Pe=Qr),Le=Ht.alloc(),Le.reset(),Le.scale(ne.scale,ne.scale),Le.rotate(ne.angle,0,0);var Pt=ne.naturalBounds;Oe=vn.allocAt(0,0,Pt.width,Pt.height),Ye=Qe.alloc(),Ye.xi(Oe,Pe),Le.Ga(Ye),Pe=-Ye.x,vt=-Ye.y;var Ct=Pt.width,It=Pt.height;Pt=Qe.alloc(),Pt.assign(ue);var rn=isNaN(ue.x),ri=isNaN(ue.y);if(rn||ri){Ct=Ct/2+3,It=It/2+3;var Pi=45<=Ce&&135>=Ce,fi=225<=Ce&&315>=Ce;le===pl&&(Pi||fi)?(Pt.x=ri?Ct:ue.y,Pt.y=rn?It:ue.x,Pi?0<=re||isNaN(re)&&.5>oe||!rn||(Pt.y=-It):fi&&((0<=re||isNaN(re)&&.5>oe)&&rn&&(Pt.y=-It),ri&&(Pt.x=-Ct))):(rn&&(Pt.x=0<=re||isNaN(re)&&.5>oe?Ct:-Ct),ri&&(Pt.y=-It),Pt.rotate(Ce))}else Pt.rotate(Ce);pe+=Pt.x,rt+=Pt.y,Le.pp(Oe),Pe+=Oe.x,vt+=Oe.y,re=Qe.allocAt(pe+Pe,rt+vt),ne.move(re),Qe.free(re),Qe.free(Pt),Qe.free(Ye),vn.free(Oe),Ht.free(Le)}}b!==null?b.Ul(!1):E.Ul(!1),E=A1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Qe.free(E)}};function i1(a,y,x,E){if(fu(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof lo&&a.type===Gn.Link&&a.adornedObject instanceof Cr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Kn&&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 lo&&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),ls(E,!1)}}function cp(){this.xa="Base"}Ot(cp,gs),cp.prototype.measure=function(a,y,x,E,b,z,ne){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,le=oe.right+oe.left,ue=oe.top+oe.bottom;re.measure(y,x,z,ne);var pe=re.measuredBounds,Pe=new vn(-oe.left,-oe.top,Math.max(pe.width+le,0),Math.max(pe.height+ue,0));a.graduatedBounds.push(Pe),b.assign(Pe);for(var Ce=re.geometry,Le=re.strokeWidth,Oe=Ce.flattenedSegments,rt=Ce.flattenedLengths,Ye=Ce.flattenedTotalLength,vt=Oe.length,Pt=0,Ct=0,It=Qn(),rn=0;rn<vt;rn++){var ri=Oe[rn],Pi=[];Ct=Pt=0;for(var fi=ri.length,$n=0;$n<fi;$n+=2){var In=ri[$n],ur=ri[$n+1];if($n!==0){var Ji=180*Math.atan2(ur-Ct,In-Pt)/Math.PI;0>Ji&&(Ji+=360),Pi.push(Ji)}Pt=In,Ct=ur}It.push(Pi)}if(a.graduatedIntervals===null){for(var vo=[],Xo=a.O.s,xs=Xo.length,Es=0;Es<xs;Es++){var al=Xo[Es],Ps=[];if(vo.push(Ps),al.visible){var Yc=al.interval;if(!(0>Yc)){for(var Ja=0;Ja<xs;Ja++)if(Ja!==Es){var Ph=Xo[Ja];if(Ph.visible&&al.constructor===Ph.constructor){var sl=Ph.interval;sl>Yc&&Ps.push(sl)}}}}}a.graduatedIntervals=vo}var Xc=a.graduatedIntervals,vu=a.O.s,Uu=vu.length,eu=0,Gl=0,Ld=Ye;a.graduatedMarks=[];for(var wh,Og=0;Og<Uu;Og++){var tu=vu[Og];if(wh=[],tu.visible&&tu!==re){var ll=Math.abs(tu.interval),Xp=a.graduatedTickUnit;if(!(2>Xp*ll*Ye/a.graduatedRange&&tu.graduatedSkip===null)){var _f=rt[0][0],jh=0,Wl=0;Gl=Ye*tu.graduatedStart-1e-4,Ld=Ye*tu.graduatedEnd+1e-4;var lf=Xp*ll,nu=a.graduatedTickBase;if(nu<a.graduatedMin){var Fd=(a.graduatedMin-nu)/lf;Fd=Fd%1===0?Fd:Math.floor(Fd+1),nu+=Fd*lf}else nu>a.graduatedMin+lf&&(nu-=Math.floor((nu-a.graduatedMin)/lf)*lf);for(var W0=Xc[Og],Jp=nu,_y=1e-6*a.graduatedMax,ac=1;nu<=a.graduatedMax+_y;ac++){e:{for(var xc=W0.length,Zf=0;Zf<xc;Zf++){var Nd=(nu-a.graduatedTickBase)%(W0[Zf]*a.graduatedTickUnit),Ig=1e-6*a.graduatedTickUnit;if(Nd<Ig&&Nd>-Ig){var Bd=!1;break e}}Bd=!0}if(Bd&&(nu>a.graduatedMax&&(nu=a.graduatedMax),tu.graduatedSkip===null||tu instanceof Qo&&!tu.graduatedSkip(nu,tu)||tu instanceof Cr&&!tu.graduatedSkip(nu,tu))&&(eu=(nu-a.graduatedMin)*Ye/a.graduatedRange,eu>Ye&&(eu=Ye),Gl<=eu&&eu<=Ld)){for(var sc=It[jh][Wl],Jc=rt[jh][Wl];jh<rt.length;){for(;eu>_f&&Wl<rt[jh].length-1;)Wl++,sc=It[jh][Wl],Jc=rt[jh][Wl],_f+=Jc;if(eu<=_f)break;jh++,Wl=0,sc=It[jh][Wl],Jc=rt[jh][Wl],_f+=Jc}var $l=Oe[jh],zh=$l[2*Wl],$0=$l[2*Wl+1],Pc=(eu-(_f-Jc))/Jc,Rg=new Qe(zh+($l[2*Wl+2]-zh)*Pc+Le/2-Ce.bounds.x,$0+($l[2*Wl+3]-$0)*Pc+Le/2-Ce.bounds.y);Rg.scale(re.scale,re.scale);e:{var Ch=sc,uf=It[jh];if(!(.5005>Pc&&.4995<Pc)){var _h=Ch;if(.5>Pc?0<Wl?_h=uf[Wl-1]:tt.$($l[0],$l[$l.length-2])&&tt.$($l[1],$l[$l.length-1])&&(_h=uf[uf.length-1]):.5<Pc&&(Wl+1<uf.length?_h=uf[Wl+1]:tt.$($l[0],$l[$l.length-2])&&tt.$($l[1],$l[$l.length-1])&&(_h=uf[0])),Ch!==_h){var Hf=Math.abs(Ch-_h);if(180<Hf&&(Ch<_h?Ch+=360:_h+=360,Hf=Math.abs(Ch-_h)),5e-4>Pc||.9995<Pc){sc=(Ch+_h)/2%360;break e}if(10>Hf){var jg=1-Math.abs(.5-Pc);sc=(Ch*jg+_h*(1-jg))%360;break e}}}sc=Ch}if(tu instanceof Qo){var hh="";tu.graduatedFunction!==null?(hh=tu.graduatedFunction(nu,tu),hh=hh!=null?hh.toString():""):hh=(+nu.toFixed(2)).toString(),hh!==""&&wh.push({$l:Rg,angle:sc,text:hh})}else wh.push({$l:Rg,angle:sc})}nu=Jp+ac*lf}}}a.graduatedMarks.push(wh)}di(It);var Os=a.graduatedMarks;if(Os!==null)for(var Qp=E.length,xl=0;xl<Qp;xl++){var Qa=E[xl],Pl=Os[xl];if(Qa.visible&&Qa!==re&&Pl.length!==0){if(Qa instanceof Cr){var wc=a,Qc=b,hf=Qa.alignmentFocus;hf.Mc()&&(hf=bl);var Zy=Qa.angle;Qa.Kb=0,Qa.measure(1/0,1/0,0,0),Qa.Kb=Zy;var K0=Qa.measuredBounds,zg=K0.width,cf=K0.height,Gf=vn.allocAt(0,0,zg,cf),Kl=Qe.alloc();Kl.xi(Gf,hf),vn.free(Gf);for(var Cc=-Kl.x,Eh=-Kl.y,Ou=new vn,kd=Pl.length,_g=0;_g<kd;_g++)for(var Ad=Pl[_g],V0=Ad.$l.x,Zg=Ad.$l.y,Ra=Ad.angle,ch=0;4>ch;ch++){switch(ch){case 0:Kl.h(Cc,Eh);break;case 1:Kl.h(Cc+zg,Eh);break;case 2:Kl.h(Cc,Eh+cf);break;case 3:Kl.h(Cc+zg,Eh+cf)}Kl.rotate(Ra+Qa.angle),Kl.offset(V0,Zg),_g===0&&ch===0?Ou.h(Kl.x,Kl.y,0,0):Ou.Ye(Kl),Kl.offset(-V0,-Zg),Kl.rotate(-Ra-Qa.angle)}Qe.free(Kl),wc.graduatedBounds!==null&&wc.graduatedBounds.push(Ou),ma(Qc,Ou.x,Ou.y,Ou.width,Ou.height)}else if(Qa instanceof Qo){var Yu=a,U0=b;Yu.temporaryTextBlock===null&&(Yu.temporaryTextBlock=new Qo);var iu=Yu.temporaryTextBlock;y1(iu,Qa);var qc=Qa.alignmentFocus;qc.Mc()&&(qc=bl);for(var Xu=Qa.segmentOrientation,Hg=Qa.segmentOffset,Td=new vn,qp=0,Gg=0,Zh=0,df=0,Dd=0,Wg=Pl.length,ed=0;ed<Wg;ed++){var lc=Pl[ed];qp=lc.$l.x,Gg=lc.$l.y,Zh=lc.angle,Dd=df=Qa.angle,Xu!==pl&&(Dd=Xu===wp||Xu===t0?Zh+Qa.angle:Zh,df=Kn.computeAngle(Xu,Dd)),iu.Kb=df,iu.text=lc.text||"",iu.measure(1/0,1/0,0,0);var td=iu.measuredBounds,Ec=iu.naturalBounds,nd=Ec.width,ff=Ec.height,bh=Ht.alloc();bh.reset(),bh.translate(-td.x,-td.y),bh.scale(iu.scale,iu.scale),bh.rotate(Dd,nd/2,ff/2),Xu!==Cp&&Xu!==bp||bh.rotate(90,nd/2,ff/2),Xu!==Ep&&Xu!==Mp||bh.rotate(-90,nd/2,ff/2),Xu===n0&&(45<Zh&&135>Zh||225<Zh&&315>Zh)&&bh.rotate(-Zh,nd/2,ff/2);var Wf=vn.allocAt(0,0,nd,ff),id=Qe.alloc();id.xi(Wf,qc),bh.Ga(id);var $f=-id.x,Hy=-id.y,bc=Qe.alloc();bc.assign(Hg),isNaN(bc.x)&&(bc.x=nd/2+3),isNaN(bc.y)&&(bc.y=-(ff/2+3)),bc.rotate(Zh),qp+=bc.x+$f,Gg+=bc.y+Hy;var gf=new vn(qp,Gg,td.width,td.height),em=new vn(td.x,td.y,td.width,td.height),Gy=new vn(Ec.x,Ec.y,Ec.width,Ec.height);lc.Sz=df,lc.lineCount=iu.lineCount,lc.lines=[iu.Cb,iu.Ih,iu.df,iu.Le,iu.Qc,iu.Qb,iu.ze],lc.actualBounds=gf,lc.measuredBounds=em,lc.naturalBounds=Gy,ed===0?Td.assign(gf):Td.ed(gf),Qe.free(bc),Qe.free(id),vn.free(Wf),Ht.free(bh)}Yu.graduatedBounds!==null&&Yu.graduatedBounds.push(Td),ma(U0,Td.x,Td.y,Td.width,Td.height)}ls(Qa,!1)}}},cp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,ne=0,re=z[ne];ne++,E!==null&&E.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,le=0;le<oe;le++){var ue=y[le];re=b[le],ue.visible&&ue!==E&&re.length!==0&&(re=z[ne],ne++,ue.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},cp.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,ne=b.height;b=y instanceof Jl,y.save(),y.beginPath(),y.rect(-1,-1,z+1,ne+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var re=z.actualBounds,oe=a.O.s,le=a.graduatedMarks,ue=oe.length,pe=0;pe<ue;pe++){var Pe=oe[pe],Ce=le[pe],Le=Ce.length;if(Pe.visible&&Pe!==z&&Ce.length!==0){if(Pe instanceof Cr){if(!(2>a.graduatedTickUnit*Pe.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&Pe.graduatedSkip===null)){var Oe=Pe.measuredBounds,rt=Pe.strokeWidth*Pe.scale,Ye=Pe.alignmentFocus;Ye.Mc()&&(Ye=bl);for(var vt=0;vt<Le;vt++){var Pt=Ce[vt].$l,Ct=Ce[vt].angle,It=Ye,rn=Pe.Ab;rn.reset(),rn.translate(Pt.x+re.x,Pt.y+re.y),rn.rotate(Ct+Pe.angle,0,0),rn.translate(-Oe.width*It.x+It.offsetX+rt/2,-Oe.height*It.y+It.offsetY+rt/2),rn.scale(Pe.scale,Pe.scale),Gu(Pe,!1),Pe.wh.set(Pe.Ab),Pe.Kk=Pe.scale,Fu(Pe,!1),Pe.gc(y,x),b&&(a.svg.appendChild(Pe.svg),Pe.svg=null),Pe.Ab.reset()}}}else if(Pe instanceof Qo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Qo),Oe=a.temporaryTextBlock,y1(Oe,Pe),rt=0;rt<Le;rt++)Ye=Ce[rt],Ye.actualBounds&&Ye.measuredBounds&&Ye.naturalBounds&&(Oe.ec=Ye.text||"",Oe.Kb=Ye.Sz||0,Oe.Gc=Ye.lineCount||0,vt=Ye.lines,vt!==void 0&&(Oe.Cb=vt[0],Oe.Ih=vt[1],Oe.df=vt[2],Oe.Le=vt[3],Oe.Qc=vt[4],Oe.Qb=vt[5],Oe.ze=vt[6]),Ye.naturalBounds&&(Oe.dc=Ye.naturalBounds),Ye.actualBounds&&(vt=Ye.actualBounds,Oe.arrange(vt.x,vt.y,vt.width,vt.height)),vt=Ye.actualBounds,Oe.arrange(vt.x,vt.y,vt.width,vt.height),Pt=Ye.measuredBounds,Ye=Ye.naturalBounds,Ct=Oe.Ab,Ct.reset(),Ct.translate(vt.x+re.x,vt.y+re.y),Ct.translate(-Pt.x,-Pt.y),Oe.no(Ct,Ye.x,Ye.y,Ye.width,Ye.height),Gu(Oe,!1),Oe.wh.set(Oe.Ab),Oe.Kk=Oe.scale,Fu(Oe,!1),Oe.Ng=Pe.part,Oe.Me=Pe.panel,Oe.gc(y,x),Oe.Me=null,Oe.Ng=null,b&&(a.svg.appendChild(Oe.svg),Oe.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Gn(a,y){if(jt.call(this),this.na=null,a===void 0)this.na=Gn.Position;else if(typeof a=="string"){var x=rh.I(a);x!==null&&(this.na=x)}else a instanceof gs?this.na=a:a&&(this.na=Gn.Position,y=a);this.na===null&&St("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Gn.Grid?1048576:0),this.O=new An,this.yb=bs,this.Tm=Co,this.Uf=pr,this.$g=null,this.$e="",this.jg=new vn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Ei,this.jn=yo,this.kn=uo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ot(Gn,jt),Gn.prototype.cloneProtected=function(a){jt.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},Gn.prototype.Af=function(a){jt.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},Gn.prototype.copy=function(){var a=jt.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,ne=z.count;if(z.Gb(ne,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof li&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(ko,"elements",a,null,b,null,ne)}}return a}return null},be=Gn.prototype,be.toString=function(){return"Panel("+this.type.name+")#"+Bi(this)},be.Pn=function(a){jt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},be.hh=function(a,y){if(this.na===Gn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Gn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Gn.Table)if(a.yc(),a instanceof Jl){var x=a.yd;a.yd=fm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Gn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x&&re===E&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===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&&Lm(a,y,!0,x,!0),E!==null&&Lm(a,y,!1,E,!0),x!==null&&r1(a,y,!0,x),E!==null&&r1(a,y,!1,E),x!==null&&Lm(a,y,!0,x,!1),E!==null&&Lm(a,y,!1,E,!1)}function r1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ne=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var le=E[oe];if(le!==void 0&&le.actual!==0)if(re)re=!1;else{if(x){if(le.position>ne.height)continue}else if(le.position>ne.width)continue;var ue=le.separatorStrokeWidth;isNaN(ue)&&(ue=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pe=le.separatorStroke;if(pe===null&&(pe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ue!==0&&pe!==null){Da(a,y,pe,!1,!1,ne,z),pe=!1;var Pe=le.separatorDashArray;Pe===null&&(Pe=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Pe!==null&&(pe=!0,y.js(Pe,0)),y.beginPath(),Pe=le.position+ue,x?Pe>ne.height&&(ue-=Pe-ne.height):Pe>ne.width&&(ue-=Pe-ne.width),le=le.position+ue/2,y.lineWidth=ue,ue=a.yb,x?(le+=ue.top,Pe=ne.width-ue.right,y.moveTo(ue.left,le),y.lineTo(Pe,le)):(le+=ue.left,Pe=ne.height-ue.bottom,y.moveTo(le,ue.top),y.lineTo(le,Pe)),y.stroke(),y.Se(),pe&&y.fs()}}}}function Lm(a,y,x,E,b){for(var z=E.length,ne=a.actualBounds,re=a.naturalBounds,oe=o1(a,!0),le=o1(a,!1),ue=0;ue<z;ue++){var pe=E[ue];if(pe!==void 0&&pe.background!==null&&pe.coversSeparators!==b&&pe.actual!==0){var Pe=x?ne.height:ne.width;if(!(pe.position>Pe)){var Ce=pe.Wc(),Le=pe.separatorStrokeWidth;isNaN(Le)&&(Le=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Oe=pe.separatorStroke;Oe===null&&(Oe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Oe===null||pe.index===(x?oe:le))&&(Le=0),Ce-=Le,Le=pe.position+Le,Ce+=pe.actual,Le+Ce>Pe&&(Ce=Pe-Le),0>=Ce||(Pe=a.yb,Da(a,y,pe.background,!0,!1,re,ne),x?y.fillRect(Pe.left,Le+Pe.top,ne.width-(Pe.left+Pe.right),Ce):y.fillRect(Le+Pe.left,Pe.top,Ce,ne.height-(Pe.top+Pe.bottom)))}}}}function o1(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"}be.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},be.kk=function(a,y,x){if(!jt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Gn.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===Gn.Grid||this.na===Gn.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},be.nk=function(){return!0},be.$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,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var re=y[ne].actualBounds;b=ne===0?re.x:Math.min(re.x,b),z=ne===0?re.y:Math.min(re.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 jt.prototype.$o.call(this,a,y,x,E)},be.Sj=function(a,y,x,E,b){var z=this.se(),ne=this.transform,re=1/(ne.m11*ne.m22-ne.m12*ne.m21),oe=ne.m22*re,le=-ne.m12*re,ue=-ne.m21*re,pe=ne.m11*re,Pe=re*(ne.m21*ne.dy-ne.m22*ne.dx),Ce=re*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,tt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*ue+Pe,re=a*le+y*pe+Ce,a=x*oe+E*ue+Pe,oe=x*le+E*pe+Ce,b.h(0,0),x=this.naturalBounds,z=tt.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ne),z;z||(oe=1,ue=le=0,pe=1,Ce=Pe=0),re=a*oe+y*ue+Pe,a=a*le+y*pe+Ce,oe=x*oe+E*ue+Pe,x=x*le+E*pe+Ce,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,pe=this.O.s,Ce=pe.length,ue=Qe.alloc(),Pe=null,y=1/0;var Le=null,Oe=this.isClipping&&this.na===Gn.Spot;Oe&&(Le=Qe.alloc(),Pe=this.Pb(),(le=Pe.Sj(re,a,oe,x,Le))&&(y=(re-Le.x)*(re-Le.x)+(a-Le.y)*(a-Le.y)));for(var rt=0;rt<Ce;rt++){var Ye=pe[rt];Ye.visible&&Ye!==Pe&&Ye.Sj(re,a,oe,x,ue)&&(le=!0,Ye=(re-ue.x)*(re-ue.x)+(a-ue.y)*(a-ue.y),Ye<E&&(E=Ye,b.set(ue)))}return Oe&&(y>E&&b.set(Le),Qe.free(Le)),Qe.free(ue),z&&b.transform(ne),le},be.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();jt.prototype.Gj.call(this)},be.v=function(a){if(!fu(this)){jt.prototype.v.call(this,a),a=null,(this.na===Gn.Auto||this.na===Gn.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=Nl(b,!1);(b instanceof gl||b instanceof Gn||b instanceof Qo||z!==jn)&&b.v(!0)}}}},be.Uj=function(){if(!fu(this)){ls(this,!0),Yh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},be.Uk=function(){if(!(this.l&2048)){Gu(this,!0),Fu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},be.Wu=function(){Fu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},be.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,E=ne.height),x=Math.max(x,ne.width),E=Math.max(E,ne.height);var re=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,re.width)),isNaN(z.height)||(y=Math.min(z.height,re.height)),a=Math.max(x,a),y=Math.max(E,y);var oe=this.yb;a=Math.max(a-oe.left-oe.right,0),y=Math.max(y-oe.top-oe.bottom,0);var le=this.O.s;le.length!==0&&this.na.measure(this,a,y,le,b,x,E),a=b.width+oe.left+oe.right,oe=b.height+oe.top+oe.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(oe=z.height),a=Math.min(re.width,a),oe=Math.min(re.height,oe),a=Math.max(ne.width,a),oe=Math.max(ne.height,oe),a=Math.max(x,a),oe=Math.max(E,oe),Oa(b,a,oe),Oa(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},be.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 vc(a){return a.part!==null?a.part.locationObject:null}be.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=Nl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var ne=this.Kg,re=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&z===E&&(a=jn),a){case jn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Zn:this.v(!0),this.measure(x+re,E+ne,0,0);break;case Ai:this.v(!0),this.measure(x+re,z+ne,0,0);break;case Zi:this.v(!0),this.measure(y+re,E+ne,0,0)}}this.na.arrange(this,b,this.jg)}},be.gh=function(a){var y=this.naturalBounds,x=vc(this);if(Fo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Qe.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Rr(b.set(a),z.transform),z.ca(b)))return Qe.free(b),!0}return Qe.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},be.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},be.qm=function(a,y){if(y(this,a),a instanceof Gn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function qd(a,y){a1(a,a,y)}function a1(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 Gn&&a1(a,z,x)}}function vx(a,y){s1(a,a,y)}function s1(a,y,x){if(x(y),y instanceof Gn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)s1(a,y[b],x)}}be.Nl=function(a){return l1(this,this,a)};function l1(a,y,x){if(x(y))return y;if(y instanceof Gn){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}be.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=dp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Gn){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 Gn?x=Math.max(x,u1(b)):b instanceof Cr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}be.se=function(){return!(this.type===Gn.TableRow||this.type===Gn.TableColumn)};function zc(a){return a.type===Gn.TableRow||a.type===Gn.TableColumn}be.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),dl(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ne=z?a:Rr(Qe.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,le=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),le=oe/2),Fo(-(le*b),-(le*b),E.width+oe*b,E.height+oe*b,ne.x,ne.y)){if(!this.isAtomic){b=this.O.s;var ue=b.length;if(re=Qe.alloc(),le=(oe=this.isClipping&&this.na===Gn.Spot)?this.Pb():null,oe&&(le.se()?Rr(re.set(a),le.transform):re.set(a),!le.ca(re)))return Qe.free(re),z||Qe.free(ne),null;for(var pe=vc(this);ue--;){var Pe=b[ue];if((Pe.visible||Pe===pe)&&(Pe.se()?Rr(re.set(a),Pe.transform):re.set(a),!oe||Pe!==le)){var Ce=null;if(Pe instanceof Gn?Ce=Pe.ic(re,y,x):Pe.pickable===!0&&Pe.ca(re)&&(Ce=Pe),Ce!==null&&(y!==null&&(Ce=y(Ce)),Ce!==null&&(x===null||x(Ce))))return Qe.free(re),z||Qe.free(ne),Ce}}Qe.free(re)}return this.background===null&&this.areaBackground===null?(z||Qe.free(ne),null):(a=Fo(0,0,E.width,E.height,ne.x,ne.y)?this:null,z||Qe.free(ne),a)}return z||Qe.free(ne),null},be.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(),ne=z?a:Rr(Qe.allocAt(a.x,a.y),this.transform);if(b=Fo(0,0,b.width,b.height,ne.x,ne.y),zc(this)||b){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,le=Qe.alloc(),ue=vc(this);oe--;){var pe=re[oe];if(pe.visible||pe===ue){pe.se()?Rr(le.set(a),pe.transform):le.set(a);var Pe=pe;pe=pe instanceof Gn?pe:null,(pe!==null?pe.ji(le,y,x,E):Pe.ca(le))&&Pe.pickable!==!1&&(y!==null&&(Pe=y(Pe)),Pe===null||x!==null&&!x(Pe)||E.add(Pe))}}Qe.free(le)}return z||Qe.free(ne),b&&(this.background!==null||this.areaBackground!==null)}return z||Qe.free(ne),!1},be.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 ne=z;if(z===void 0&&(ne=Ht.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return mv(this,y,x,b),z===void 0&&Ht.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var re=vc(this),oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===re){var pe=ue.actualBounds,Pe=this.naturalBounds;pe.x>Pe.width||pe.y>Pe.height||0>pe.x+pe.width||0>pe.y+pe.height||(pe=ue,ue=ue instanceof Gn?ue:null,Pe=Ht.alloc(),Pe.set(ne),(ue!==null?ue.Cf(a,y,x,E,b,Pe):Ss(pe,a,E,Pe))&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe)),Ht.free(Pe))}}return z===void 0&&Ht.free(ne),E}return z===void 0&&Ht.free(ne),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var ne=b[z];if(ne.visible){var re=ne.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(ne instanceof Gn&&mv(ne,y,x,E),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||E.add(ne))}}}be.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 ne=this.naturalBounds,re=this.se(),oe=re?a:Rr(Qe.allocAt(a.x,a.y),this.transform),le=re?y:Rr(Qe.allocAt(y.x,y.y),this.transform),ue=oe.Bf(le),pe=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||To(oe.x,oe.y,0,0,0,ne.height)<=ue||To(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=ue||To(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=ue||To(oe.x,oe.y,ne.width,0,0,0)<=ue;if(ne=oe.zd(0,0)<=ue&&oe.zd(0,ne.height)<=ue&&oe.zd(ne.width,0)<=ue&&oe.zd(ne.width,ne.height)<=ue,re||(Qe.free(oe),Qe.free(le)),pe){if(!this.isAtomic){oe=Qe.alloc(),le=Qe.alloc(),ue=vc(this);for(var Pe=this.O.s,Ce=Pe.length;Ce--;){var Le=Pe[Ce];if(Le.visible||Le===ue){var Oe=Le.actualBounds,rt=this.naturalBounds;(!re||!(Oe.x>rt.width||Oe.y>rt.height||0>Oe.x+Oe.width||0>Oe.y+Oe.height))&&(Le.se()?(Oe=Le.transform,Rr(oe.set(a),Oe),Rr(le.set(y),Oe)):(oe.set(a),le.set(y)),Oe=Le,Le=Le instanceof Gn?Le:null,(Le!==null?Le.og(oe,le,x,E,b,z):Oe.tx(oe,le,b))&&(x!==null&&(Oe=x(Oe)),Oe===null||E!==null&&!E(Oe)||z.add(Oe)))}}Qe.free(oe),Qe.free(le)}return b?pe:ne}return!1};function vv(a){var y=null;return a instanceof Cr&&(y=a.spot1,y===Co&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=cs),y}function yv(a){var y=null;return a instanceof Cr&&(y=a.spot2,y===Co&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ys),y}be.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},be.M=function(a){return this.O.M(a)},be.Gb=function(a,y){y instanceof Di&&St("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&St("Cannot make a Panel contain itself: "+this.toString()),St("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&St("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!==Gn.Grid||y instanceof Cr||St("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Gn.Graduated||y instanceof Cr||y instanceof Qo||St("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 wi),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,ne=this.O.s,re=ne.length,oe=0;oe<re;oe++)if(ne[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else St("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),fu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Gn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Nm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof li&&(x.Te=!0),x.Te&&x instanceof li&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Yo,"elements",this,y,null,E,null),x.cb(ko,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}be.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)},be.mb=function(a){0<=a&&this.pc(a,!0)},be.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),ls(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 li&&(E instanceof Gn?E.qm(E,function(ne,re){Hv(z,re,y)}):Hv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Yo,"elements",this,E,null,a,null))},be.Fb=function(a){0>a&&Rn(a,">= 0",Gn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new us;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ko,"rowdefs",this,null,x,null,a)}return y[a]},be.oA=function(a){if(0>a&&Rn(a,">= 0",Gn,"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(Yo,"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 us?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}be.Eb=function(a){0>a&&Rn(a,">= 0",Gn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new us;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ko,"coldefs",this,null,x,null,a)}return y[a]},be.jA=function(a){if(0>a&&Rn(a,">= 0",Gn,"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(Yo,"coldefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof us?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}be.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Bm(y,a),this},be.Hy=function(a,y){return(a=this.Fb(a))&&Bm(a,new us(y)),this},be.By=function(a,y){return(a=this.Eb(a))&&Bm(a,new us(y)),this},be.nz=function(a){if(0>a||this.type!==Gn.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},be.fz=function(a){if(0>a||this.type!==Gn.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},be.Fz=function(a,y){if(y===void 0&&(y=new Qe(NaN,NaN)),this.type!==Gn.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)},be.Gz=function(a){if(this.type!==Gn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function $u(a){var y=a.allBindings;if(y===null)a.data!==null&&St("Template cannot have .data be non-null: "+a),a.allBindings=y=new An;else if(y._isFrozen)return;var x=new An;Sv(a,!1),a.qm(a,function(le,ue){ue.th();var pe=ue.localBindings;if(pe!==null)for(bf(ue,!1),pe=pe.iterator;pe.next();){var Pe=pe.value;Pe.mode===Dp&&bf(ue,!0);var Ce=Pe.sourceName;Ce!==null&&(Ce==="/"&&Sv(le,!0),Ce=MS(Pe,le,ue),Ce!==null&&(x.add(Ce),Ce.srcBindings===null&&(Ce.srcBindings=new An),Ce.srcBindings.add(Pe))),y.add(Pe)}if(ue instanceof Gn&&ue.type===Gn.Table){if(0<ue.rowCount){for(le=ue.rowDefs,pe=le.length,Pe=0;Pe<pe;Pe++)if(Ce=le[Pe],Ce!==void 0&&Ce.be!==null)for(var Le=Ce.be.iterator;Le.next();){var Oe=Le.value;Oe.xd=Ce,Oe.to=2,Oe.wl=Ce.index,y.add(Oe)}}if(0<ue.columnCount){for(ue=ue.colDefs,le=ue.length,pe=0;pe<le;pe++)if(Pe=ue[pe],Pe!==void 0&&Pe.be!==null)for(Ce=Pe.be.iterator;Ce.next();)Le=Ce.value,Le.xd=Pe,Le.to=1,Le.wl=Pe.index,y.add(Le)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){bf(b,!0);for(var z=b.srcBindings.iterator;z.next();){var ne=z.value;b.localBindings===null&&(b.localBindings=new An),b.localBindings.add(ne)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var re=b.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof Gn&&(ne=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ne),oe!==null?(z=oe,b.targetProperty=re):ai('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+b.toString())),z instanceof us?(ne=Bi(z.panel),b.Ai=ne===void 0?-1:ne,z.panel.bindingId=b.Ai):z instanceof jt?(ne=Bi(z),b.Ai=ne===void 0?-1:ne,z.bindingId=b.Ai):St("Unknown type of binding target: "+z)}y.freeze(),a instanceof Di&&a.Zc()&&a.Va()}be.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof Gn&&(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&&$u(y),y},be.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,ne=x.Ai;if(ne!==-1){if(z=this.ks(ne),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 Gn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},be.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 Gn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var ne=0;b<x&&ne<E;){if(z=a[b],!(z instanceof Gn)||z.data!==y[ne])return!0;b++,ne++}return!1}function dp(a){if(a.type===Gn.Spot||a.type===Gn.Auto)return Math.min(a.O.length,1);if(a.type===Gn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Cr&&E.isPanelMain))break}return x}return a.type===Gn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Gn&&zc(a))?1:0}be.mv=function(){for(var a=dp(this);this.O.length>a;)this.pc(this.O.length-1,!1);f1(this,this.itemArray)};function f1(a,y){var x=dp(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++)Fm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],ne=E<a.O.length?a.O.M(E):null;if(ne instanceof Gn){if(ne.data!==z){var re=Pv(a,ne.data),oe=Pv(a,z),le=oe!==re;le||(re=wv(a,re),le=wv(a,oe)!==re),le?(a.pc(E,!1),Fm(a,z,b,!1)):ne.data=z}}else Fm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),fu(a)||a.v(),a.graduatedIntervals=null,a.If()||Nm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof li&&(y.Te=!0),y.Te&&y instanceof li&&(y.wc=null))}}function Fm(a,y,x,E){if(!(y==null||0>x)){var b=Pv(a,y);if(b=wv(a,b),b!==null){if($u(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 wi),a.ge.add(y,b)),z=x+dp(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 Gn){var b=y,z=x;E.type===Gn.TableRow?E.row=b:E.type===Gn.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=Ga(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;St("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,ai('No item template Panel found for category "'+y+'" on '+a),ai(" Using default item template."),a=new Gn,y=new Qo,y.bind(new Xa("text","",Ri)),a.add(y),p1=a),E=p1)),E}function Nm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Gn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Gn&&!z.isEnabled||Nm(a,z,x)}}}function Ih(a,y){y.name=a,rh.add(a,y)}Ve.Object.defineProperties(Gn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Gn.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&&Rn(a,">= 0",Gn,"padding"),a=new Ti(a)):(0>a.left&&Rn(a.left,">= 0",Gn,"padding:value.left"),0>a.right&&Rn(a.right,">= 0",Gn,"padding:value.right"),0>a.top&&Rn(a.top,">= 0",Gn,"padding:value.top"),0>a.bottom&&Rn(a.bottom,">= 0",Gn,"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:bs},set:function(a){typeof a=="number"&&(a=new Ti(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new ku),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new ku),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 ku),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)||St("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 ku),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new ku),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 ku),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)||St("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 ku),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 ku),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||St("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Th(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()||St("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Th(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 yc),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 yc),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 yc),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 yc),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 yc,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 yc,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 yc,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 yc,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 ku),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new ku),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Am},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new ku),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Am},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new ku),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)&&St("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new ku),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)&&St("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new ku),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof Di&&!(this instanceof lo);$u(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Kn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Di&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Mf),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&&sy(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 wi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Di||a.isPanelMain)&&St("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(););Lr(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&&(Lr(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 cr&&(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&&Nm(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))}}}),Ve.Object.defineProperties(Gn,{Position:{get:function(){return rh.I("Position")}},Horizontal:{get:function(){return rh.I("Horizontal")}},Vertical:{get:function(){return rh.I("Vertical")}},Spot:{get:function(){return rh.I("Spot")}},Auto:{get:function(){return rh.I("Auto")}},Table:{get:function(){return rh.I("Table")}},Viewbox:{get:function(){return rh.I("Viewbox")}},TableRow:{get:function(){return rh.I("TableRow")}},TableColumn:{get:function(){return rh.I("TableColumn")}},Link:{get:function(){return rh.I("Link")}},Grid:{get:function(){return rh.I("Grid")}},Graduated:{get:function(){return rh.I("Graduated")}}}),Gn.prototype.rebuildItemElements=Gn.prototype.mv,Gn.prototype.findItemPanelForData=Gn.prototype.sx,Gn.prototype.updateTargetBindings=Gn.prototype.La,Gn.prototype.copyTemplate=Gn.prototype.Uy,Gn.prototype.graduatedValueForPoint=Gn.prototype.Gz,Gn.prototype.graduatedPointForValue=Gn.prototype.Fz,Gn.prototype.findColumnForLocalX=Gn.prototype.fz,Gn.prototype.findRowForLocalY=Gn.prototype.nz,Gn.prototype.addColumnDefinition=Gn.prototype.By,Gn.prototype.addRowDefinition=Gn.prototype.Hy,Gn.prototype.addRowColumnDefinition=Gn.prototype.Gy,Gn.prototype.removeColumnDefinition=Gn.prototype.jA,Gn.prototype.getColumnDefinition=Gn.prototype.Eb,Gn.prototype.removeRowDefinition=Gn.prototype.oA,Gn.prototype.getRowDefinition=Gn.prototype.Fb,Gn.prototype.removeAt=Gn.prototype.mb,Gn.prototype.remove=Gn.prototype.remove,Gn.prototype.insertAt=Gn.prototype.Gb,Gn.prototype.elt=Gn.prototype.M,Gn.prototype.add=Gn.prototype.add,Gn.prototype.findObject=Gn.prototype.fb,Gn.prototype.findInVisualTree=Gn.prototype.Nl,Gn.prototype.walkVisualTreeFrom=Gn.prototype.qm,Gn.prototype.findMainElement=Gn.prototype.Pb;var g1=!1,p1=null,rh=new wi;Gn.className="Panel",Gn.definePanelLayout=Ih,Ih("Position",new mm),Ih("Vertical",new ym),Ih("Auto",new xm),Ih("Link",new Mm);function yc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}yc.prototype.copy=function(){var a=new yc;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},yc.className="GradPanelSettings";function ku(){this.Pc=[],this.Oc=[],this.j=this.ob=Am,this.hb=this.Hb=0,this.Qp=bs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}ku.prototype.copy=function(a){for(var y=new ku,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var ne=x[z].copy();ne.wi(a),b[z]=ne}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(ne=x[z].copy(),ne.wi(a),b[z]=ne);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},ku.className="TablePanelSettings";function us(a){_r(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Co,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=pr,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))}us.prototype.copy=function(){var a=new us;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=Xn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Bm(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=Xn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}be=us.prototype,be.qb=function(a){a.classType===us&&(this.sizing=a)},be.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Bi(this)},be.wi=function(a){this.Me=a},be.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)},be.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Gn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var ne=E?y.rowDefs[z]:y.colDefs[z];if(ne!==void 0&&ne.oa!==0){x=ne.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)},be.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Yr,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 km(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}be.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Xa(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&St("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new An),this.be.add(b),this},Ve.Object.defineProperties(us.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&&Rn(a,">= 0",us,"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&&Rn(a,">= 0",us,"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))&&Rn(a,">= 0",us,"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&&Rn(a,">= 0",us,"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 Ti(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&&Ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Ao&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||St("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&&Ff(a,"RowColumnDefinition.background"),a instanceof Ao&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),us.prototype.computeEffectiveSpacing=us.prototype.Wc,us.prototype.computeEffectiveSpacingTop=us.prototype.Io;var Cv=new mn(us,"Default",0),fp=new mn(us,"None",1),Am=new mn(us,"ProportionalExtra",2);us.className="RowColumnDefinition",us.Default=Cv,us.None=fp,us.ProportionalExtra=Am;function Cr(a,y){jt.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)}Ot(Cr,jt),Cr.prototype.cloneProtected=function(a){jt.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=Xn(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 ef(a){a.Na===null?a.Na=new Mv:a.Na.nc&&(a.Na=a.Na.copy())}be=Cr.prototype,be.th=function(){jt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},be.qb=function(a){a===jn||a===Ei||a===Kr||a===pr?this.geometryStretch=a:jt.prototype.qb.call(this,a)},be.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Bi(this)};function fg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,ne=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],le,ue,pe,Pe,Ce,Le,Oe=0,rt=Qn(),Ye=2;Ye<b;Ye+=2)le=x[Ye],ue=x[Ye+1],pe=le-re,re=ue-oe,pe===0&&(pe=.001),Pe=re/pe,Ce=Math.atan2(re,pe),Le=Math.sqrt(pe*pe+re*re),rt.push([pe,Ce,Pe,Le]),Oe+=Le,re=le,oe=ue;re=x[0],oe=x[1],pe=E.measuredBounds.width,E instanceof Cr&&(pe-=E.strokeWidth),1>pe&&(pe=1),b=x=pe,le=ne/2,ue=le!==0,Ye=0,Le=rt[Ye],pe=Le[0],Ce=Le[1],Pe=Le[2],Le=Le[3];for(var vt=0;.1<=Oe;){if(vt===0&&(ue?(b=x,b-=le,Oe-=le,ue=!1):b=x,b===0&&(b=1)),b>Oe){di(rt);return}b>Le?(vt=b-Le,b=Le):vt=0;var Pt=Math.sqrt(b*b/(1+Pe*Pe));if(0>pe&&(Pt=-Pt),re+=Pt,oe+=Pe*Pt,a.translate(re,oe),a.rotate(Ce),a.translate(-(ne/2),-(z/2)),vt===0&&E.hh(a,y),a.translate(ne/2,z/2),a.rotate(-Ce),a.translate(-re,-oe),Oe-=b,Le-=b,vt!==0){if(Ye++,Ye===rt.length){di(rt);return}Le=rt[Ye],pe=Le[0],Ce=Le[1],Pe=Le[2],Le=Le[3],b=vt}}di(rt)}}be.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,ne=this.naturalBounds;E!==null&&Da(this,a,E,!0,!1,ne,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===Gn.Link&&re instanceof lo&&re.category==="Selection"&&re.adornedObject instanceof Cr&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Da(this,a,x,!1,!1,ne,z),a.lineWidth=oe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||E!==null&&E!=="transparent"||(re=!1),ne=!1,oe=this.strokeDashArray,oe!==null&&(ne=!0,a.js(oe,this.strokeDashOffset)),b.type===Pn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===Pn.u){var le=b.startX;oe=b.startY;var ue=b.endX,pe=b.endY;b=Math.min(le,ue);var Pe=Math.min(oe,pe);le=Math.abs(ue-le),oe=Math.abs(pe-oe),a.beginPath(),a.rect(b,Pe,le,oe),E!==null&&a.ng(E),x!==null&&(re&&z&&Xh(a),a.jk(),re&&z&&gc(a)),a.Se()}else if(b.type===Pn.F)le=b.startX,oe=b.startY,ue=b.endX,pe=b.endY,b=Math.abs(ue-le)/2,Pe=Math.abs(pe-oe)/2,le=Math.min(le,ue)+b,oe=Math.min(oe,pe)+Pe,a.beginPath(),a.moveTo(le,oe-Pe),a.bezierCurveTo(le+tt.wg*b,oe-Pe,le+b,oe-tt.wg*Pe,le+b,oe),a.bezierCurveTo(le+b,oe+tt.wg*Pe,le+tt.wg*b,oe+Pe,le,oe+Pe),a.bezierCurveTo(le-tt.wg*b,oe+Pe,le-b,oe+tt.wg*Pe,le-b,oe),a.bezierCurveTo(le-b,oe-tt.wg*Pe,le-tt.wg*b,oe-Pe,le,oe-Pe),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&Xh(a),a.jk(),re&&z&&gc(a)),a.Se();else if(b.type===Pn.o)for(b=b.figures,oe=b.length,Pe=0;Pe<oe;Pe++){le=b.s[Pe],a.beginPath(),a.moveTo(le.startX,le.startY),ue=le.segments.s,pe=ue.length;for(var Ce=null,Le=0;Le<pe;Le++){var Oe=ue[Le];switch(Oe.type){case Ar:a.moveTo(Oe.endX,Oe.endY);break;case ir:a.lineTo(Oe.endX,Oe.endY);break;case wr:a.bezierCurveTo(Oe.point1X,Oe.point1Y,Oe.point2X,Oe.point2Y,Oe.endX,Oe.endY);break;case Lo:a.quadraticCurveTo(Oe.point1X,Oe.point1Y,Oe.endX,Oe.endY);break;case Ir:if(Oe.radiusX===Oe.radiusY){var rt=Math.PI/180;a.arc(Oe.point1X,Oe.point1Y,Oe.radiusX,Oe.startAngle*rt,(Oe.startAngle+Oe.sweepAngle)*rt,0>Oe.sweepAngle,Ce!==null?Ce.endX:le.startX,Ce!==null?Ce.endY:le.startY)}else if(Ce=Wi(Oe,le),rt=Ce.length,rt===0)a.lineTo(Oe.centerX,Oe.centerY);else for(var Ye=0;Ye<rt;Ye++){var vt=Ce[Ye];Ye===0&&a.lineTo(vt[0],vt[1]),a.bezierCurveTo(vt[2],vt[3],vt[4],vt[5],vt[6],vt[7])}break;case er:if(Ye=rt=0,Ce!==null&&Ce.type===Ir){if(Ce=Wi(Ce,le),vt=Ce.length,vt===0){a.lineTo(Oe.endX,Oe.endY);break}Ce=Ce[vt-1]||null,Ce!==null&&(rt=Ce[6],Ye=Ce[7])}else rt=Ce!==null?Ce.endX:le.startX,Ye=Ce!==null?Ce.endY:le.startY;if(Ce=Tr(Oe,le,rt,Ye),rt=Ce.length,rt===0){a.lineTo(Oe.endX,Oe.endY);break}for(Ye=0;Ye<rt;Ye++)vt=Ce[Ye],a.bezierCurveTo(vt[2],vt[3],vt[4],vt[5],vt[6],vt[7]);break;default:St("Segment not of valid type: "+Oe.type)}Oe.isClosed&&a.closePath(),Ce=Oe}ue=le.isFilled,z?le.isShadowed?(ue===!0&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&(ue&&re&&Xh(a),a.jk(),ue&&re&&gc(a))):(Xh(a),ue&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk(),gc(a)):(ue&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk()),a.Se(Pe)}if(ne&&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=Qn(),z.type===Pn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),fg(a,y,E,x);else if(z.type===Pn.o)for(z=z.figures.iterator;z.next();){for(re=z.value,E.length=0,E.push(re.startX),E.push(re.startY),ne=re.startX,b=re.startY,oe=ne,Pe=b,le=re.segments.s,ue=le.length,pe=0;pe<ue;pe++){switch(Le=le[pe],Le.type){case Ar:fg(a,y,E,x),E.length=0,E.push(Le.endX),E.push(Le.endY),ne=Le.endX,b=Le.endY,oe=ne,Pe=b;break;case ir:E.push(Le.endX),E.push(Le.endY),ne=Le.endX,b=Le.endY;break;case wr:tt.Qe(ne,b,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.5,E),ne=Le.endX,b=Le.endY;break;case Lo:tt.ep(ne,b,Le.point1X,Le.point1Y,Le.endX,Le.endY,.5,E),ne=Le.endX,b=Le.endY;break;case Ir:if(Oe=Wi(Le,re),Ce=Oe.length,Ce===0){E.push(Le.centerX),E.push(Le.centerY),ne=Le.centerX,b=Le.centerY;break}for(rt=0;rt<Ce;rt++)Ye=Oe[rt],tt.Qe(ne,b,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,E),ne=Ye[6],b=Ye[7];break;case er:if(Oe=Tr(Le,re,ne,b),Ce=Oe.length,Ce===0){E.push(Le.endX),E.push(Le.endY),ne=Le.endX,b=Le.endY;break}for(rt=0;rt<Ce;rt++)Ye=Oe[rt],tt.Qe(ne,b,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,E),ne=Ye[6],b=Ye[7];break;default:St("Segment not of valid type: "+Le.type)}Le.isClosed&&(E.push(oe),E.push(Pe),fg(a,y,E,x))}fg(a,y,E,x)}else if(z.type===Pn.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),fg(a,y,E,x);else if(z.type===Pn.F){if(b=new ho,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ne=new _i(Ir),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(z.startX+z.endX)/2,ne.centerY=(z.startY+z.endY)/2,ne.radiusX=Math.abs(z.startX-z.endX)/2,ne.radiusY=Math.abs(z.startY-z.endY)/2,b.add(ne),z=Wi(ne,b),re=z.length,re===0)E.push(ne.centerX),E.push(ne.centerY);else for(ne=b.startX,b=b.startY,oe=0;oe<re;oe++)Pe=z[oe],tt.Qe(ne,b,Pe[2],Pe[3],Pe[4],Pe[5],Pe[6],Pe[7],.5,E),ne=Pe[6],b=Pe[7];fg(a,y,E,x)}di(E),a.restore(),a.Vc(!1)}}}},be.kk=function(a,y,x){return!jt.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)},be.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:jt.prototype.nk.call(this,a)},be.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)}},be.ga=function(a,y){if(y===void 0&&(y=new Qe),a instanceof bi){a.Mc()&&St("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},be.mi=function(a){a===void 0&&(a=new vn);var y=this.naturalBounds,x=this.oe;y=vn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Qe.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),ma(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),ma(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),ma(a,E.x,E.y,0,0),vn.free(y),Qe.free(E),a},be.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==Pn.j||y||(b+=2);var z=vn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return vn.free(z),!1;if(E=b+1e-4,x.type===Pn.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(vn.free(z),tt.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===Pn.u){y=x.startX;var ne=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ne,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ne),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return vn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),vn.free(z),a}if(x.type===Pn.F){ne=x.startX,b=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(ne,re),y=Math.min(b,oe),ne=Math.abs(re-ne)/2,b=Math.abs(oe-b)/2,x=a.x-(x+ne),y=a.y-(y+b),this.fill===null){if(ne-=E,b-=E,0>=ne||0>=b||1>=x*x/(ne*ne)+y*y/(b*b))return vn.free(z),!1;ne+=E,b+=E}return this.stroke!==null&&(ne+=E,b+=E),vn.free(z),0>=ne||0>=b?!1:1>=x*x/(ne*ne)+y*y/(b*b)}if(x.type===Pn.o)return vn.free(z),this.fill===null?jo(x,a.x,a.y,b):Or(x,a,b,1<this.strokeWidth,y);St("Unknown Geometry type: "+x.type)},be.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 ne=this.geometry.bounds;else{var re=this.figure,oe=bv[re];if(oe===void 0){var le=tt.Ze[re];typeof le=="string"&&(le=tt.Ze[le]),typeof le=="function"?(oe=le(null,100,100),bv[re]=oe):St("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,le=ne.width;var ue=ne.height;switch(Nl(this,!0)){case jn:E=x=0;break;case Zn:le=Math.max(a-z,0),ue=Math.max(y-z,0);break;case Ai:le=Math.max(a-z,0),E=0;break;case Zi:x=0,ue=Math.max(y-z,0)}isFinite(b.width)&&(le=b.width),isFinite(b.height)&&(ue=b.height);var pe=this.maxSize,Pe=this.minSize;switch(x=Math.max(x-z,Pe.width),E=Math.max(E-z,Pe.height),le=Math.min(pe.width,le),ue=Math.min(pe.height,ue),le=isFinite(le)?Math.max(x,le):Math.max(re,x),ue=isFinite(ue)?Math.max(E,ue):Math.max(oe,E),x=Ev(this),x){case jn:break;case Zn:re=le,oe=ue;break;case Ei:x=Math.min(le/re,ue/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:St(x+" is not a valid geometryStretch.")}this.Rd!==null?(re===0&&(re=.001),oe===0&&(oe=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,E=re/ne.width,ne=oe/ne.height,isFinite(E)||(E=1),isFinite(ne)||(ne=1),this.ua=E===1&&ne===1?x:x.copy().scale(E,ne)):this.ua!==null&&tt.$(this.ua.Sk,a-z)&&tt.$(this.ua.Rk,y-z)||(this.ua=Cr.makeGeometry(this,re,oe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-z/2,ne.y-z/2,a===0&&re===0?0:ne.width+z,y===0&&oe===0?0:ne.height+z):this.Ge(-(z/2),-(z/2),le+z,ue+z),b.w()?(le=b.width,ue=b.height,le=Math.min(pe.width,le),ue=Math.min(pe.height,ue),le=Math.max(Pe.width,le),ue=Math.max(Pe.height,ue),this.dc.h(0,0,le,ue)):this.dc.assign(ne)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===pr?Zn:y:y===pr?bv[a.figure].defaultStretch:y}be.eh=function(a,y,x,E){ol(this,a,y,x,E)},be.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},be.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ue=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),Pe=ne*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*le+pe,ne=a*oe+y*ue+Pe,re=x*re+E*le+pe,oe=x*oe+E*ue+Pe,pe=this.ig/2,le=this.ua,le===null&&(this.measure(1/0,1/0),le=this.ua);var Ce=le.bounds;if(ue=!1,le.type===Pn.j)if(1.5>=this.strokeWidth)ue=tt.Ve(le.startX,le.startY,le.endX,le.endY,z,ne,re,oe,b);else{if(le.startX===le.endX?(E=pe,ue=0):(y=(le.endY-le.startY)/(le.endX-le.startX),ue=pe/Math.sqrt(1+y*y),E=ue*y),y=Qn(),a=new Qe,tt.Ve(le.startX+E,le.startY+ue,le.endX+E,le.endY+ue,z,ne,re,oe,a)&&y.push(a),a=new Qe,tt.Ve(le.startX-E,le.startY-ue,le.endX-E,le.endY-ue,z,ne,re,oe,a)&&y.push(a),a=new Qe,tt.Ve(le.startX+E,le.startY+ue,le.startX-E,le.startY-ue,z,ne,re,oe,a)&&y.push(a),a=new Qe,tt.Ve(le.endX+E,le.endY+ue,le.endX-E,le.endY-ue,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return di(y),!1;for(ue=!0,oe=1/0,E=0;E<re;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-ne)*(a.y-ne),x<oe&&(oe=x,b.x=a.x,b.y=a.y);di(y)}else if(le.type===Pn.u)ue=tt.Ff(Ce.x-pe,Ce.y-pe,Ce.x+Ce.width+pe,Ce.y+Ce.height+pe,z,ne,re,oe,b);else if(le.type===Pn.F){y=vn.allocAt(Ce.x,Ce.y,Ce.width,Ce.height).Bc(pe,pe);e:if(y.width===0)ue=tt.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,b);else if(y.height===0)ue=tt.Ve(y.x,y.y,y.x+y.width,y.y,z,ne,re,oe,b);else{if(a=y.width/2,le=y.height/2,E=y.x+a,ue=y.y+le,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-ue-x*(z-E),0>a*a*x*x+le*le-oe*oe){b.x=NaN,b.y=NaN,ue=!1;break e}pe=Math.sqrt(a*a*x*x+le*le-oe*oe),re=(-(a*a*x*oe)+a*le*pe)/(le*le+a*a*x*x)+E,a=(-(a*a*x*oe)-a*le*pe)/(le*le+a*a*x*x)+E,le=x*(re-E)+oe+ue,oe=x*(a-E)+oe+ue,Math.abs((z-re)*(z-re))+Math.abs((ne-le)*(ne-le))<Math.abs((z-a)*(z-a))+Math.abs((ne-oe)*(ne-oe))?(b.x=re,b.y=le):(b.x=a,b.y=oe)}else{if(re=le*le,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,ue=!1;break e}oe=Math.sqrt(re),re=ue+oe,oe=ue-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}ue=!0}vn.free(y)}else if(le.type===Pn.o){Pe=Qe.alloc();var Le=re-z,Oe=oe-ne,rt=Le*Le+Oe*Oe,Ye=z,vt=ne;if(0<rt&&Ce.contains(Ye,vt)&&(Pe.x=Ye,Pe.y=vt,this.ca(Pe)))for(Le!==0&&.5>Math.abs(Le)?(Oe*=.5/Le,Le=.5):Oe!==0&&.5>Math.abs(Oe)&&(Le*=.5/Oe,Oe=.5),Ye-=Le,vt-=Oe;Ce.contains(Ye,vt);)Ye-=Le,vt-=Oe;for(b.x=re,b.y=oe,Oe=0;Oe<le.figures.count;Oe++){var Pt=le.figures.s[Oe],Ct=Pt.isFilled?Ye:z,It=Pt.isFilled?vt:ne,rn=Pt.segments;Ce=Pt.startX,Le=Pt.startY;for(var ri=Ce,Pi=Le,fi=0;fi<rn.count;fi++){var $n=rn.s[fi],In=$n.type,ur=$n.endX,Ji=$n.endY,vo=!1;switch(In){case Ar:ri=ur,Pi=Ji;break;case ir:vo=Dm(Ce,Le,ur,Ji,Ct,It,re,oe,Pe);break;case wr:vo=tt.Eo(Ce,Le,$n.point1X,$n.point1Y,$n.point2X,$n.point2Y,ur,Ji,Ct,It,re,oe,.6,Pe);break;case Lo:vo=tt.Eo(Ce,Le,Ce+2/3*($n.point1X-Ce),Le+2/3*($n.point1Y-Le),ur+2/3*($n.point1X-ur),Ji+2/3*($n.point1Y-Ji),ur,Ji,Ct,It,re,oe,.6,Pe);break;case Ir:case er:In=$n.type===Ir?Wi($n,Pt):Tr($n,Pt,Ce,Le);var Xo=In.length;if(Xo===0){vo=Dm(Ce,Le,$n.type===Ir?$n.centerX:$n.endX,$n.type===Ir?$n.centerY:$n.endY,Ct,It,re,oe,Pe);break}for(Ji=null,ur=0;ur<Xo;ur++){if(Ji=In[ur],ur===0&&Dm(Ce,Le,Ji[0],Ji[1],Ct,It,re,oe,Pe)){var xs=Tm(Ct,It,Pe,rt,b);xs<rt&&(rt=xs,ue=!0)}tt.Eo(Ji[0],Ji[1],Ji[2],Ji[3],Ji[4],Ji[5],Ji[6],Ji[7],Ct,It,re,oe,.6,Pe)&&(xs=Tm(Ct,It,Pe,rt,b),xs<rt&&(rt=xs,ue=!0))}ur=Ji[6],Ji=Ji[7];break;default:St("Unknown Segment type: "+In)}Ce=ur,Le=Ji,vo&&(vo=Tm(Ct,It,Pe,rt,b),vo<rt&&(rt=vo,ue=!0)),$n.isClosed&&(ur=ri,Ji=Pi,Dm(Ce,Le,ur,Ji,Ct,It,re,oe,Pe)&&($n=Tm(Ct,It,Pe,rt,b),$n<rt&&(rt=$n,ue=!0)))}}z=x-a,ne=E-y,re=Math.sqrt(z*z+ne*ne),re!==0&&(z/=re,ne/=re),b.x-=z*pe,b.y-=ne*pe,Qe.free(Pe)}else St("Unknown Geometry type: "+le.type);return ue?(this.transform.Ga(b),!0):!1};function Tm(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 Dm(a,y,x,E,b,z,ne,re,oe){if(tt.$(a,x)&&tt.$(y,E)||tt.$(b,ne)&&tt.$(z,re))return!1;var le=!1,ue=(b-ne)*(y-E)-(z-re)*(a-x);return ue===0?!1:(oe.x=((b*re-z*ne)*(a-x)-(b-ne)*(a*E-y*x))/ue,oe.y=((b*re-z*ne)*(y-E)-(z-re)*(a*E-y*x))/ue,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(oe.y>a||tt.$(oe.y,a))&&(oe.y<y||tt.$(oe.y,y))&&(le=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||tt.$(oe.x,y))&&(oe.x<a||tt.$(oe.x,a))&&(le=!0)),le)}be.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=Qe.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)))),Qe.free(z),b},be.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Ht.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ne=Qe.alloc();if(ne.h(E,z),x.Ga(ne),this.gh(ne,!0)||(ne.h(b,z),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0)))return Qe.free(ne),!0;var re=Qe.alloc(),oe=Qe.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=b,re.y=z,re.transform(x),ne.x=E,ne.y=z,ne.transform(x),y=!1,tf(this,ne,re,oe)?y=!0:(ne.x=b,ne.y=a,ne.transform(x),tf(this,ne,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),tf(this,ne,re,oe)?y=!0:(ne.x=E,ne.y=z,ne.transform(x),tf(this,ne,re,oe)&&(y=!0)))),Qe.free(ne),Ht.free(x),Qe.free(re),Qe.free(oe),y};function tf(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)}be.tx=function(a,y,x){function E(rt,Ye){for(var vt=rt.length,Pt=0;Pt<vt;Pt+=2)if(Ye.zd(rt[Pt],rt[Pt+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 ne=y.bounds,re=ne.x,oe=ne.y,le=ne.x+ne.width;if(ne=ne.y+ne.height,qa(a.x,a.y,re,oe)<=b&&qa(a.x,a.y,le,oe)<=b&&qa(a.x,a.y,re,ne)<=b&&qa(a.x,a.y,le,ne)<=b)return!0}if(re=y.startX,oe=y.startY,le=y.endX,ne=y.endY,y.type===Pn.j){if(x=(re-le)*(a.x-le)+(oe-ne)*(a.y-ne),To(a.x,a.y,re,oe,le,ne)<=(0<=(le-re)*(a.x-re)+(ne-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===Pn.u)return y=!1,x&&(y=To(a.x,a.y,re,oe,re,ne)<=b||To(a.x,a.y,re,oe,le,oe)<=b||To(a.x,a.y,le,oe,le,ne)<=b||To(a.x,a.y,re,ne,le,ne)<=b),y;if(y.type===Pn.F){y=a.x-(re+le)/2,z=a.y-(oe+ne)/2;var ue=Math.abs(le-re)/2,pe=Math.abs(ne-oe)/2;if(ue===0||pe===0)return To(a.x,a.y,re,oe,le,ne)<=b;if(x){if(a=tt.$y(ue,pe,y,z),a*a<=b)return!0}else return!(qa(y,z,-ue,0)>=b||qa(y,z,0,-pe)>=b||qa(y,z,0,pe)>=b||qa(y,z,ue,0)>=b)}else if(y.type===Pn.o){if(le=y.bounds,z=le.x,re=le.y,oe=le.x+le.width,le=le.y+le.height,a.x>oe&&a.x<z&&a.y>le&&a.y<re&&To(a.x,a.y,z,re,z,le)>b&&To(a.x,a.y,z,re,oe,re)>b&&To(a.x,a.y,oe,le,z,le)>b&&To(a.x,a.y,oe,le,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?jo(y,a.x,a.y,z):Or(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],ne=z.startX,ue=z.startY,a.zd(ne,ue)>b)return!1;for(re=z.segments.s,oe=re.length,le=0;le<oe;le++)switch(pe=re[le],pe.type){case Ar:case ir:if(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b)return!1;break;case wr:var Pe=Qn();if(tt.Qe(ne,ue,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.8,Pe),ne=E(Pe,a),di(Pe),ne||(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b))return!1;break;case Lo:if(Pe=Qn(),tt.ep(ne,ue,pe.point1X,pe.point1Y,pe.endX,pe.endY,.8,Pe),ne=E(Pe,a),di(Pe),ne||(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b))return!1;break;case Ir:case er:Pe=pe.type===Ir?Wi(pe,z):Tr(pe,z,ne,ue);var Ce=Pe.length;if(Ce===0){if(ne=pe.type===Ir?pe.centerX:pe.endX,ue=pe.type===Ir?pe.centerY:pe.endY,a.zd(ne,ue)>b)return!1;break}pe=null;for(var Le=Qn(),Oe=0;Oe<Ce;Oe++)if(pe=Pe[Oe],Le.length=0,tt.Qe(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.8,Le),E(Le,a))return di(Le),!1;di(Le),pe!==null&&(ne=pe[6],ue=pe[7]);break;default:St("Unknown Segment type: "+pe.type)}}return!0}}}return!1},be.qc=function(){this.ua=null},be.kq=function(){return this.ig};function m1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=wp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=rs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new bi(1-rs.x,rs.y)))}Cr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Qh[a.toArrow];else a.fromArrow!=="None"?E=Qh[a.fromArrow]:(E=tt.Ze[a.figure],typeof E=="string"&&(E=tt.Ze[E]),E===void 0&&St("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=tt.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function v1(a){var y=Qh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Qh[x],y===void 0){var E=null,b;for(b in tt.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=Pn.parse(tt.um[E],!1),Qh[E]=a,x!==E&&(Qh[x]=E),E}}return typeof y=="string"?y:y instanceof Pn?a:null}Ve.Object.defineProperties(Cr.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),Zs(this)&&(a=this.part,a!==null&&oa(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Pn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Qe.allocAt(-y.x,-y.y),Qe.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&&Ff(a,"Shape.fill"),a instanceof Ao&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Ff(a,"Shape.stroke"),a instanceof Ao&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Rn(a,"value >= 0",Cr,"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"?Rn(a,'"butt", "round", or "square"',Cr,"strokeCap"):(ef(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"?Rn(a,'"miter", "bevel", or "round"',Cr,"strokeJoin"):(ef(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){ef(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)||St("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&&(ef(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=tt.Ze[a];typeof x=="function"?x=a:(x=tt.Ze[a.toLowerCase()])||St("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?St("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new fd),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?St("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new fd),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:Co},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),ef(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Co},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),ef(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&&(ef(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:pr},set:function(a){var y=this.geometryStretch;y!==a&&(ef(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 qh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Th(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 qh),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 qh),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 qh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Cr.prototype.intersectsRect=Cr.prototype.Yc,Cr.prototype.containedInRect=Cr.prototype.fh,Cr.prototype.getNearestIntersectionPoint=Cr.prototype.rs,Cr.prototype.getDocumentBounds=Cr.prototype.mi,Cr.prototype.getDocumentPoint=Cr.prototype.ga;var Qh=new zi,bv=new zi;Cr.className="Shape",Cr.getFigureGenerators=function(){var a=new wi,y;for(y in tt.Ze)y!==y.toLowerCase()&&a.add(y,tt.Ze[y]);return a.freeze(),a},Cr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=tt.Ze;E[a]=y,E[x]=a},Cr.getArrowheadGeometries=function(){var a=new wi;for(E in tt.um)if(Qh[E]===void 0){var y=Pn.parse(tt.um[E],!1);Qh[E]=y,y=E.toLowerCase(),y!==E&&(Qh[y]=E)}for(var x in Qh)if(x!==x.toLowerCase()){var E=Qh[x];E instanceof Pn&&a.add(x,E)}return a.freeze(),a},Cr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Pn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||St("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Qh;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=pr,this.gg=this.fg=Co}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 jt.call(this),zm||(Bl=Na?new Wu(null).context:null,zm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Ot(Qo,jt),Qo.prototype.cloneProtected=function(a){jt.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 Rh(a){a.da===null?a.da=new Tv:a.da.nc&&(a.da=a.da.copy())}be=Qo.prototype,be.th=function(){jt.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}be.qb=function(a){a.classType===Qo?this.wrap=a:jt.prototype.qb.call(this,a)},be.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},be.v=function(){jt.prototype.v.call(this)},be.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,ne=pp(this),re=a.textAlign=this.textAlign,oe=y.tn;re==="start"?re=oe?"right":"left":re==="end"&&(re=oe?"left":"right"),oe=this.isUnderline;var le=this.isStrikethrough;Da(this,a,this.xc,!0,!1,x,E),(oe||le)&&Da(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ue=this.oe,pe=ue.dx-(ne*ue.m21+ue.dx);ue=ue.dy-(ne*ue.m22+ue.dy);var Pe=y.scale;switch(8>(pe*pe+ue*ue)*Pe*Pe&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Jl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,pe=this.spacingBelow,this.flip){case io:a.translate(b,0),a.scale(-1,1);break;case Nr:a.translate(0,z),a.scale(1,-1);break;case Go:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ue=this.Gc,Pe=(y+ne+pe)*ue,z>Pe&&(E=this.verticalAlignment,E=E.y*z-E.y*Pe+E.offsetY),ue===1&&this.ze!==null)pe=this.Cb,pe>b&&(pe=b),this.Oj(this.ze,a,0,E+y,b,ne,pe,x,re,oe,le);else if(this.Qc!==null&&this.Qb!==null)for(Pe=0;Pe<ue;Pe++){var Ce=this.Qc[Pe];Ce>b&&(Ce=b),E+=y,this.Oj(this.Qb[Pe],a,0,E,b,ne,Ce,x,re,oe,le),E+=ne+pe}switch(this.flip){case io:a.scale(-1,1),a.translate(-b,0);break;case Nr:a.scale(1,-1),a.translate(0,-z);break;case Go:a.scale(-1,-1),a.translate(-b,-z)}}},be.Oj=function(a,y,x,E,b,z,ne,re,oe,le,ue){var pe=0;if(re)oe==="left"?pe=0:oe==="right"?pe=b-ne:oe==="center"&&(pe=(b-ne)/2),y.fillRect(x+pe,E+.25*z,ne,1);else{if(oe==="left"?pe=0:oe==="right"?pe=b:oe==="center"&&(pe=b/2),b=Om!==null?Om(this,z):.75*z,y.fillText(a,x+pe,E+b),a=z/20|0,a===0&&(a=1),oe==="right"?pe-=ne:oe==="center"&&(pe-=ne/2),le){re=Im!==null?Im(this,z):.8*z,oe=x+pe,le=E+re,b=x+pe+ne,re=E+re;var Pe=a;y.beginPath(),y.lineWidth=Pe,y.moveTo(oe,le),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Jl&&y.ad.classList.add("gojs-td")}ue&&(ue=E+z-z/2.2|0,a%2!==0&&(ue+=.5),E=x+pe,z=ue,x=x+pe+ne,ne=ue,pe=a,y.beginPath(),y.lineWidth=pe,y.moveTo(E,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Jl&&y.ad.classList.add("gojs-td"))}},be.kk=function(a,y,x){if(!jt.prototype.kk.call(this,a,y,x))return!1;if(Da(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},be.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:jt.prototype.nk.call(this,a)},be.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)}},be.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;Bl!==null&&b1!==z&&(b1=Bl.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;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 re=ne=0,oe=!1;!oe;){var le=z.indexOf(`
|
|
|
`,re);le===-1&&(le=z.length,oe=!0),re=z.substr(re,le-re),this.formatting===mp&&(re=re.trim()),ne=Math.max(ne,oh(re)),re=le+1}z=ne}else ne=z.indexOf(`
|
|
|
`,0),0<=ne&&(z=z.substr(0,ne)),z=oh(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)),ne=x1(this,z),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,oe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Rm&&(y=this.Ae,y=this.overflow===Rm?S1(y):0,le=this.spacingAbove+this.spacingBelow,le=Math.max(0,pp(this)+le),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/le+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,le=this.Qb[oe],y=Math.max(1,a-y);oh(le)>y&&1<le.length;)le=le.substr(0,le.length-1);le+=vp,y=oh(le),this.Qb[oe]=le,this.Qb=this.Qb.slice(0,oe+1),this.Qc[oe]=y,this.Qc=this.Qc.slice(0,oe+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),ne=Math.max(E,ne),Oa(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},be.eh=function(a,y,x,E){ol(this,a,y,x,E)};function gp(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Lv(a,y,x,E){var b=a.formatting===mp;b&&(y=y.trim());var z=0,ne=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,pp(a)+re);var oe=a.overflow===Rm?S1(ne):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ne=y,a.wrap===Fv){a.Le=1;var le=oh(y);if(oe===0||le<=x)a.Cb=Math.max(a.Cb,le),gp(a,y,a.Cb),E!==null&&E.h(le,re);else{for(z=gg(a,ne),ne=ne.substr(z.length),y=gg(a,ne),le=oh(z+y);0<y.length&&le<=x;)z+=y,ne=ne.substr(y.length),y=gg(a,ne),le=z+y,b&&(le=le.trim()),le=oh(le);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);oh(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=vp;var ue=oh(z);a.Cb=ue,gp(a,z,ue),E!==null&&E.h(ue,re)}}else{for(oe=0,ne.length===0&&(oe=1,gp(a,ne,0));0<ne.length;){for(y=gg(a,ne),ne=ne.substr(y.length);oh(y)>x;){var pe=1;for(le=oh(y.substr(0,pe)),ue=0;le<=x;)pe++,ue=le,le=oh(y.substr(0,pe));if(pe===1){var Pe=le;z=Math.max(z,le)}else Pe=ue,z=Math.max(z,ue);if(pe--,1>pe&&(pe=1),gp(a,y.substr(0,pe),Pe),oe++,y=y.substr(pe),a.Gc+oe>a.maxLines)break}for(ue=gg(a,ne),le=oh(y+ue);0<ue.length&&le<=x;)y+=ue,ne=ne.substr(ue.length),ue=gg(a,ne),le=y+ue,b&&(le=le.trim()),le=oh(le);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ue.length===0?(pe=le,z=Math.max(z,le)):(pe=ue=oh(y),z=Math.max(z,ue)),gp(a,y,pe),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,re*a.Le)}}function gg(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 oh(a){return Bl===null?8*a.length:Bl.measureText(a).width}function pp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Bl===null){var x=16;return a.df=x}return kv[y]!==void 0&&5e3>E1?x=kv[y]:(x=1.3*Bl.measureText("M").width,kv[y]=x,E1++),a.df=x}function S1(a){if(Bl===null)return 6;if(jm[a]!==void 0&&5e3>Av)var y=jm[a];else y=Bl.measureText(vp).width,jm[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,pp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
|
|
|
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,ne,re=!1;!re;){if(ne=x.indexOf(`
|
|
|
`,z),ne===-1&&(ne=x.length,re=!0),z<=ne){if(z=x.substr(z,ne-z),a.wrap!==Fv){a.Le=0;var oe=qn.alloc();Lv(a,z,y,oe),b+=oe.height,qn.free(oe),a.Gc+=a.Le}else Lv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ne+1}return a.Lq=b}Ve.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"||(Rh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:jn},set:function(a){var y=this.flip;y!==a&&(Rh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ds},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Rh(this),this.da.Yr=a,cl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=qn.alloc();Lv(this,this.ec,999999,a);var y=a.width;qn.free(a),a=x1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Oa(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:Nv},set:function(a){var y=this.wrap;y!==a&&(Rh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Bv},set:function(a){var y=this.overflow;y!==a&&(Rh(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&&Ff(a,"TextBlock.stroke"),a instanceof Ao&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return pp(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(Rh(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&&(Rh(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 qh),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 qh),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 qh),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 qh),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 qh),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&&(Rh(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&&(Rh(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&&(Rh(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&&(Rh(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:mp},set:function(a){var y=this.formatting;y!==a&&(Rh(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&&Rn(a,"> 0",Qo,"maxLines"),Rh(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 Om=null,Im=null,Fv=new mn(Qo,"None",0),P1=new mn(Qo,"WrapFit",1),Nv=new mn(Qo,"WrapDesiredSize",2),w1=new mn(Qo,"WrapBreakAll",3),Bv=new mn(Qo,"OverflowClip",0),Rm=new mn(Qo,"OverflowEllipsis",1),mp=new mn(Qo,"FormatTrim",0),C1=new mn(Qo,"FormatNone",0),Sx=/[ \u200b\u00ad]/,kv=new zi,E1=0,jm=new zi,Av=0,vp="...",b1="",Bl=null,zm=!1;Qo.className="TextBlock";function Tv(){this.nc=!1,this.Hd=null,this.Xf=jn,this.gq=mp,this.Jq=1/0,this.$q=Bv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ds,this.$r=Nv}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 vp},Qo.setEllipsis=function(a){vp=a,jm=new zi,Av=0},Qo.getBaseline=function(){return Om},Qo.setBaseline=function(a){Om=a},Qo.getUnderline=function(){return Im},Qo.setUnderline=function(a){Im=a},Qo.isValidFont=function(a){if(zm||(Bl=Na?new Wu(null).context:null,zm=!0),Bl===null)return!0;var y=Bl.font;if(a===y||a==="10px sans-serif")return!0;Bl.font="10px sans-serif",Bl.font=a;var x=Bl.font;if(x!=="10px sans-serif")return Bl.font=y,!0;Bl.font="19px serif";var E=Bl.font;return Bl.font=a,x=Bl.font,Bl.font=y,x!==E},Qo.FormatNone=C1,Qo.FormatTrim=mp,Qo.None=Fv,Qo.OverflowClip=Bv,Qo.OverflowEllipsis=Rm,Qo.WrapBreakAll=w1,Qo.WrapDesiredSize=Nv,Qo.WrapFit=P1;function qh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}qh.prototype.copy=function(){var a=new qh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},qh.className="GradElementSettings";function kl(a,y){jt.call(this),this.Eg=null,this.qo="",this.Xg=Ko,this.Nk=Zn,this.Zg=this.Hd=null,this.Mk=Qr,this.Xf=jn,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 pg;Ot(kl,jt),kl.prototype.cloneProtected=function(a){jt.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},kl.prototype.qb=function(a){a===jn||a===Ei||a===Kr?this.imageStretch=a:jt.prototype.qb.call(this,a)},kl.prototype.toString=function(){return"Picture("+this.source+")#"+Bi(this)};function mg(a){a===void 0&&(a=""),a!==""?pg[a]&&(delete pg[a],_m--):(pg=new zi,_m=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")||"",ne=b.Og.I(z);if(ne!==null)for(var re=ne.length,oe=0;oe<re;oe++)z=ne[oe],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()||(ls(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")||"",ne=b.Og.I(z);if(ne!==null){b=ne.length,z=Qn();for(var re=0;re<b;re++)z.push(ne[re]);if(y.hn)for(re=0;re<b;re++)ne=z[re],ne.Hd!==null&&ne.Hd(ne,x);di(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}kl.prototype.hA=function(){if(this.source!==""){mg(this.source);var a=this.source;this.source="",this.source=a}},kl.prototype.redraw=function(){this.N(),this.Uc=!0},kl.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 Qd)){var b=a instanceof Jl;E=this.naturalBounds;var z=0,ne=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||E.width,re=re||E.height,oe!==0&&re!==0){var le=oe,ue=re;this.sourceRect.w()&&(z=this.Xg.x,ne=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var pe=oe,Pe=re,Ce=this.Nk,Le=this.Mk;switch(Ce){case jn:if(this.sourceRect.w())break;pe>=E.width&&(z=z+Le.offsetX+(pe*Le.x-E.width*Le.x)),Pe>=E.height&&(ne=ne+Le.offsetY+(Pe*Le.y-E.height*Le.y)),oe=Math.min(E.width,pe),re=Math.min(E.height,Pe);break;case Zn:pe=E.width,Pe=E.height;break;case Ei:case Kr:Ce===Ei?(Ce=Math.min(E.height/Pe,E.width/pe),pe*=Ce,Pe*=Ce):Ce===Kr&&(Ce=Math.max(E.height/Pe,E.width/pe),pe*=Ce,Pe*=Ce,pe>=E.width&&(z=(z+Le.offsetX+(pe*Le.x-E.width*Le.x)/pe)*oe),Pe>=E.height&&(ne=(ne+Le.offsetY+(Pe*Le.y-E.height*Le.y)/Pe)*re),oe*=1/(pe/E.width),re*=1/(Pe/E.height),pe=E.width,Pe=E.height)}Ce=this.Df()*y.scale;var Oe=pe*Ce*Pe*Ce,rt=oe*re/Oe,Ye=x.__goCache;Ce=null;var vt=xx;if(!b){if(x.sq&&Ye!==void 0&&4<Oe&&rt>vt*vt)for(Ye.gi===null&&(F1(Ye,4,le,ue,x),F1(Ye,16,le,ue,x)),b=Ye.gi,le=b.length,ue=0;ue<le&&b[ue].ratio*b[ue].ratio<rt;ue++)Ce=b[ue];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Wu(null).context;try{b.drawImage(this.Eg,0,0)}catch(Pt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Pt){this.vl=!0}}if(this.vl)return}}switch(b=pe<E.width?Le.offsetX+(E.width*Le.x-pe*Le.x):0,Le=Pe<E.height?Le.offsetY+(E.height*Le.y-Pe*Le.y):0,this.flip){case io:a.translate(Math.min(E.width,pe),0),a.scale(-1,1);break;case Nr:a.translate(0,Math.min(E.height,Pe)),a.scale(1,-1);break;case Go:a.translate(Math.min(E.width,pe),Math.min(E.height,Pe)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ye!==void 0&&Ce!==null&&Ce.ratio!==1){a.save(),y=Ce.ratio;try{a.drawImage(Ce.source,z/y,ne/y,Math.min(Ce.source.width,oe/y),Math.min(Ce.source.height,re/y),b,Le,Math.min(E.width,pe),Math.min(E.height,Pe)),a instanceof Jl&&(this.bt=[z/y,ne/y,Math.min(Ce.source.width,oe/y),Math.min(Ce.source.height,re/y),b,Le,Math.min(E.width,pe),Math.min(E.height,Pe)])}catch(Pt){this.en=!1}a.restore()}else try{a.drawImage(x,z,ne,oe,re,b,Le,Math.min(E.width,pe),Math.min(E.height,Pe)),a instanceof Jl&&(this.bt=[z,ne,oe,re,b,Le,Math.min(E.width,pe),Math.min(E.height,Pe)])}catch(Pt){this.en=!1}switch(this.flip){case io:a.scale(-1,1),a.translate(-Math.min(E.width,pe),0);break;case Nr:a.scale(1,-1),a.translate(0,-Math.min(E.height,Pe));break;case Go:a.scale(-1,-1),a.translate(-Math.min(E.width,pe),-Math.min(E.height,Pe))}}}}},kl.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Nl(this,!0),ne=this.Eg,re=this.qn,oe=0,le=0;(re||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(oe=re?+ne.width:ne.naturalWidth,le=re?+ne.height:ne.naturalHeight),isFinite(b.width)||z===Zn||z===Ai?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=oe)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(b.height)||z===Zn||z===Zi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=le)),E=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:le),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),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Oa(this.dc,a,y),this.Ge(0,0,a,y)},kl.prototype.eh=function(a,y,x,E){ol(this,a,y,x,E)},Ve.Object.defineProperties(kl.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||St("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Xg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Bn),E!==null&&x&&hd(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()||(ls(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=pg;if(Na){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<_m&&(mg(),x=pg),E=On("img"),E.hn=!0,M1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,_m++}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}}}),kl.prototype.redraw=kl.prototype.redraw,kl.prototype.reloadSource=kl.prototype.hA;var _m=0,xx=4;kl.className="Picture",pg=new zi,kl.clearCache=mg;function L1(){this.gi=null}function F1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Wu(null),ne=z.context,re=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new N1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),ne.setTransform(re*x,0,0,re*x,0,0),ne.yc(),ne.drawImage(b,0,0),a.gi.push(y))}L1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function vg(){this.os=new Pn,this.mc=null}vg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Pn,this.mc=null};function yg(a,y,x,E,b,z){a.mc=new ho,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()}vg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new _i(Ar);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},vg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new _i(ir);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function _c(a,y,x,E,b,z,ne){var re;re===void 0&&(re=!1);var oe=new _i(wr);oe.point1X=y,oe.point1Y=x,oe.point2X=E,oe.point2Y=b,oe.endX=z,oe.endY=ne,re&&oe.close(),a.mc.segments.add(oe)}function Zm(a,y,x,E,b){var z;z===void 0&&(z=!1);var ne=new _i(Lo);ne.point1X=y,ne.point1Y=x,ne.endX=E,ne.endY=b,z&&ne.close(),a.mc.segments.add(ne)}vg.prototype.arcTo=function(a,y,x,E,b,z,ne){z===void 0&&(z=0),ne===void 0&&(ne=!1);var re=new _i(Ir);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=E,re.radiusX=b,re.radiusY=z!==0?z:b,ne&&re.close(),this.mc.segments.add(re)};function wx(a,y,x,E,b,z,ne,re){var oe;oe===void 0&&(oe=!1),y=new _i(er,ne,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function B1(a){var y=Hm;return y!==null?(Hm=null,y.reset(a),y):(y=new vg,y.reset(a),y)}var Hm=null;vg.className="StreamGeometryContext";function tl(a,y){var x=a.toLowerCase(),E=tt.Ze;E[a]=y,E[x]=a}tl("Rectangle",function(a,y,x){a="r"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new Pn(Pn.u),E.endX=y,E.endY=x,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),tl("Square",function(a,y,x){a="s"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new Pn(Pn.u),E.endX=y,E.endY=x,E.defaultStretch=Ei,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),tl("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=tt.Mf[E];if(b!==void 0)return b;var z=a*tt.wg;return b=new Pn().add(new ho(a,0,!0).add(new _i(ir,y-a,0)).add(new _i(wr,y,a,y-z,0,y,z)).add(new _i(ir,y,x-a)).add(new _i(wr,y-a,x,y,x-z,y-z,x)).add(new _i(ir,a,x)).add(new _i(wr,0,x-a,z,x,0,x-z)).add(new _i(ir,0,a)).add(new _i(wr,a,0,0,z,z,0).close())),1<z&&(b.spot1=new bi(0,0,z,z),b.spot2=new bi(1,1,-z,-z)),tt.Nf<tt.vm&&(tt.Mf[E]=b,tt.Nf++),b}),tl("Border","RoundedRectangle"),tl("Ellipse",function(a,y,x){a="e"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new Pn(Pn.F),E.endX=y,E.endY=x,E.spot1=Ws,E.spot2=$s,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),tl("Circle",function(a,y,x){a="c"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new Pn(Pn.F),E.endX=y,E.endY=x,E.spot1=Ws,E.spot2=$s,E.defaultStretch=Ei,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),tl("TriangleRight",function(a,y,x){return new Pn().add(new ho(0,0).add(new _i(ir,y,.5*x)).add(new _i(ir,0,x).close())).pm(0,.25,.5,.75)}),tl("TriangleDown",function(a,y,x){return new Pn().add(new ho(0,0).add(new _i(ir,y,0)).add(new _i(ir,.5*y,x).close())).pm(.25,0,.75,.5)}),tl("TriangleLeft",function(a,y,x){return new Pn().add(new ho(y,x).add(new _i(ir,0,.5*x)).add(new _i(ir,y,0).close())).pm(.5,.25,1,.75)}),tl("TriangleUp",function(a,y,x){return new Pn().add(new ho(y,x).add(new _i(ir,0,x)).add(new _i(ir,.5*y,0).close())).pm(.25,.5,.75,1)}),tl("Triangle","TriangleUp"),tl("Diamond",function(a,y,x){return new Pn().add(new ho(.5*y,0).add(new _i(ir,0,.5*x)).add(new _i(ir,.5*y,x)).add(new _i(ir,y,.5*x).close())).pm(.25,.25,.75,.75)}),tl("LineH",function(a,y,x){return a=new Pn(Pn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),tl("LineV",function(a,y,x){return a=new Pn(Pn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),tl("None","Rectangle"),tl("BarH","Rectangle"),tl("BarV","Rectangle"),tl("MinusLine","LineH"),tl("PlusLine",function(a,y,x){return new Pn().add(new ho(0,x/2,!1).add(new _i(ir,y,x/2)).add(new _i(Ar,y/2,0)).add(new _i(ir,y/2,x)))}),tl("XLine",function(a,y,x){return new Pn().add(new ho(0,x,!1).add(new _i(ir,y,0)).add(new _i(Ar,0,0)).add(new _i(ir,y,x)))}),tl("LineRight",function(a,y,x){return new Pn().add(new ho(.25*y,0,!1).add(new _i(ir,.75*y,.5*x)).add(new _i(ir,.25*y,x)))}),tl("LineDown",function(a,y,x){return new Pn().add(new ho(0,.25*x,!1).add(new _i(ir,.5*y,.75*x)).add(new _i(ir,y,.25*x)))}),tl("LineLeft",function(a,y,x){return new Pn().add(new ho(.75*y,0,!1).add(new _i(ir,.25*y,.5*x)).add(new _i(ir,.75*y,x)))}),tl("LineUp",function(a,y,x){return new Pn().add(new ho(0,.75*x,!1).add(new _i(ir,.5*y,.25*x)).add(new _i(ir,y,.75*x)))}),tt.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 Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=na,this.ir=null,this.jr="",this.lr=Co,this.Gq="",this.Hq=cs,this.Pq=Zo,this.Kq=ga,this.Up=null,this.Cq=127,this.zr=Pa,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Di(a,y){a===void 0||a instanceof gs||typeof a=="string"?Gn.call(this,a):(Gn.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 Qe(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new vn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ot(Di,Gn),Di.prototype.cloneProtected=function(a){Gn.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},be=Di.prototype,be.Af=function(a){Gn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},be.toString=function(){var a=hi(this.constructor)+"#"+Bi(this);return this.data!==null&&(a+="("+Ri(this.data)+")"),a};function Al(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}be.th=function(){Gn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},be.gk=function(a,y,x,E,b,z,ne){var re=this.diagram;re!==null&&(a===ko&&y==="elements"?b instanceof Gn?qd(b,function(oe){sy(re.partManager,oe),$d(re,oe)}):hd(re,b):a===Yo&&y==="elements"&&(b instanceof Gn?qd(b,function(oe){ly(re.partManager,oe,re)}):Xg(re,b)),re.cb(a,y,x,E,b,z,ne))},be.La=function(a){if(Gn.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 Gn&&qd(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Di.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Di.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Di.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new wi),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Di.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Di.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Qn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);di(y)}},Di.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{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 cr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof lo))break e;$u(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Gn.Link),x.adornedObject=y)}if(x!==null){x.type===Gn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Di.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Ov(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 Gm(a){if(gd(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,gd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var E=vn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),vn.free(E),Rv(a,!1)}}Di.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Ht);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Di.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Qr;this.locationSpot.sb()&&(z=this.locationSpot);var ne=Qe.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(ne),ne.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else ne.yi(y,x,E,b,z);a.rotate(this.Kb,ne.x,ne.y),Qe.free(ne)}},Di.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Di.prototype.moveTo=function(a,y,x){a=Qe.allocAt(a,y),this.move(a,x),Qe.free(a)},Di.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},Di.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},Di.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new wi),y.I(a)!==null)return y.I(a);var x=Gn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Zc(a,y,x,E){E===void 0&&(E=new Qe),x=x.Mc()?Qr:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}Di.prototype.mi=function(a){return a===void 0&&(a=new vn),a.assign(this.actualBounds)},Di.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function A1(a){var y=Qe.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Cr?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 nf(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 ne=a.shadowBlur;return a=a.shadowOffset,z+=ne,y+=ne,E-=ne/2,b-=ne/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Di.prototype.arrange=function(){if(dl(this)===!1)k1(this);else{Yh(this,!1);var a=this.Ib,y=vn.alloc();y.assign(a);var x=pd(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;D1(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()||tt.B(y.width,a.width)&&tt.B(y.height,a.height)||0<=this.vw&&this.C(16),vn.free(y),Rv(this,!1)}},be=Di.prototype,be.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=vn.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),vn.free(b)}!(this.G&65536)&&a.D(y)||R1(this,E,x),x.N(),!a.w()&&!y.w()||wl(a,y)||(this instanceof li&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},be.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 Qe(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),gd(this)===!1&&dl(this)===!1&&(Gm(this),k1(this)),!0};function T1(a,y,x,E,b){y===null||a instanceof lo||(y=y.animationManager,y.zb&&fh(y,a,new Qe(E,b),x))}be.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;gd(this)||dl(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)}Gm(this)},be.Av=function(){this.G&=-2097153,Gm(this)};function D1(a,y,x){var E=A1(a),b=a.diagram,z=x.w(),ne=y.w();z&&ne?a.G&2097152?O1(a,y,x,b,E):I1(a,y,x,b,E):z?O1(a,y,x,b,E):ne&&I1(a,y,x,b,E),a.G|=2097152,Qe.free(E),a.Uk()}function O1(a,y,x,E,b){var z=y.x,ne=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 lo||fh(x,a,new Qe(z,ne),y),E||y.x===z&&y.y===ne||a.g("position",new Qe(z,ne),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 li&&Dc(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?pd(a)?(Cl(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}be.si=function(){return!0},be.Zc=function(){return!0},be.ph=function(){return!1},be.Dd=function(){return!0};function Iv(a,y,x,E){y.constructor===a.constructor||_1||(_1=!0,ai('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),ai(" Old class: "+hi(a.constructor)+", new class: "+hi(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,ne=a.isHighlighted,re=!0,oe=!0,le=!1;a instanceof li&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,le=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=ne?a.G|524288:a.G&-524289,a instanceof li&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=le?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}Di.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},Di.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},Di.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},Di.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},Di.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},Di.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},Di.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},Di.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},Di.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function gd(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 pd(a){return(a.G&131072)!==0}be=Di.prototype,be.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Wm(a,y){a.G=y?a.G|1048576:a.G&-1048577}be.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},be.N=function(){var a=this.diagram;a!==null&&!dl(this)&&!gd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},be.v=function(){Gn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof li&&this.labeledLink!==null&&cl(this.labeledLink),a.$b(!0))},be.Vo=function(a){a||(a=this.Ah,a!==null&&Wv(a,this))},be.Wo=function(a){a||(a=this.Ah,a!==null&&$v(a,this))},be.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},be.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof li&&(y=y.labeledLink,y!==null)?zv(a,y):0}be.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof li&&(x=y.labeledLink,x!==null)?j1(a,x):y}be.Td=function(a){return a instanceof cr?_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 li&&(y=y.labeledLink,y!==null)?_v(a,y,x):!1:!0}be.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof cr&&Wm(y,!0),y instanceof li){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 li&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof cr&&Wm(y,!1),y instanceof li&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Di.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof li&&this.isLinkLabel)},Di.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof li&&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 md(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof lo)){if(a.add(y),y instanceof li){if(x&&y instanceof cr)for(var ne=y.memberParts;ne.next();)md(a,ne.value,x,E,b,z);if(b!==!1)for(ne=y.linksConnected;ne.next();){var re=ne.value;if(!a.contains(re)){var oe=re.fromNode,le=re.toNode;oe=oe===null||a.contains(oe),le=le===null||a.contains(le),(b?oe&&le:oe||le)&&md(a,re,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)md(a,y.value,x,E-1,b,z)}else if(y instanceof Kn)for(y=y.labelNodes;y.next();)md(a,y.value,x,E,b,z)}}Ve.Object.defineProperties(Di.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?ar: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(Yo,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(ko,"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&&(Al(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&&Zu(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 lo?this.type!==Gn.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:Zo},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Al(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ga},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Al(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&&(Al(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:cs},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Al(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,dl(this)===!1&&(Gm(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 lo)){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 lo?this instanceof lo&&(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&&($u(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(z!==null&&z.jm(E,a),x=cS(x.partManager,E,a),x!==null&&($u(x),x=x.copy(),x===null||x instanceof Kn||(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&&(Al(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&&(Al(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&&(Al(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 Kn?(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&&(Al(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&&(Al(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&&(Al(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:na},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Al(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&&(Al(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&&(Al(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:Co},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Al(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&&St("Cannot make a Group a member of itself: "+this.toString()),St("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?$v(y,this):this instanceof cr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Wv(a,this):this instanceof cr&&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 cr){for(x=new Bn,md(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof li)for(E=E.linksConnected;E.next();)Sg(E.value)}if(this instanceof li){for(x=this.linksConnected;x.next();)Sg(x.value);x=this.labeledLink,x!==null&&Sg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Zu(y,-1,a))}}else St("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&&(Al(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof li&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Al(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&&(Al(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Pa},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Al(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&&(Al(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&&(Al(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Di.prototype.invalidateLayout=Di.prototype.C,Di.prototype.findCommonContainingGroup=Di.prototype.px,Di.prototype.isMemberOf=Di.prototype.Td,Di.prototype.findTopLevelPart=Di.prototype.sz,Di.prototype.findSubGraphLevel=Di.prototype.oz,Di.prototype.ensureBounds=Di.prototype.Va,Di.prototype.getDocumentBounds=Di.prototype.mi,Di.prototype.findObject=Di.prototype.fb,Di.prototype.moveTo=Di.prototype.moveTo,Di.prototype.invalidateAdornments=Di.prototype.Wb,Di.prototype.clearAdornments=Di.prototype.Ej,Di.prototype.removeAdornment=Di.prototype.Jf,Di.prototype.addAdornment=Di.prototype.bh,Di.prototype.findAdornment=Di.prototype.Pj,Di.prototype.updateTargetBindings=Di.prototype.La;var _1=!1;Di.className="Part",Di.LayoutNone=0,Di.LayoutAdded=1,Di.LayoutRemoved=2,Di.LayoutShown=4,Di.LayoutHidden=8,Di.LayoutNodeSized=16,Di.LayoutGroupLayout=32,Di.LayoutNodeReplaced=64,Di.LayoutStandard=127,Di.LayoutAll=16777215;function lo(a,y){a===void 0||a instanceof gs||typeof a=="string"?Di.call(this,a):(Di.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}Ot(lo,Di),lo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},lo.prototype.updateRelationshipsFromData=function(){},lo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Kn&&y instanceof Cr){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 Cr&&(b.ua=a)}}},lo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!dl(a))},lo.prototype.Zc=function(){return!1},lo.prototype.gk=function(a,y,x,E,b,z,ne){if(a===ko&&y==="elements"){if(b instanceof gl)this.$a===null&&(this.$a=b);else if(b instanceof Gn){var re=b.Nl(function(oe){return oe instanceof gl});re instanceof gl&&this.$a===null&&(this.$a=re)}}else a===Yo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Gn&&this.$a.rg(E)&&(this.$a=null));Di.prototype.gk.call(this,a,y,x,E,b,z,ne)},lo.prototype.updateAdornments=function(){},lo.prototype.Lj=function(){},Ve.Object.defineProperties(lo.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}}}),lo.className="Adornment";function Zv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=El,this.er=Vm,this.Kr=this.ij=this.Nq=this.Mq=null}Zv.prototype.copy=function(){var a=new Zv;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 li(a,y){a===void 0||a instanceof gs||typeof a=="string"?Di.call(this,a):(Di.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new An,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ot(li,Di),li.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},be=li.prototype,be.Af=function(a){Di.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Hc(a){a.Ba===null?a.Ba=new Zv:a.Ba.nc&&(a.Ba=a.Ba.copy())}be.th=function(){Di.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function Z1(a,y){y!==null&&(a.af===null&&(a.af=new Bn),a.af.add(y))}function H1(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}be.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},be.gk=function(a,y,x,E,b,z,ne){a===ko&&y==="elements"?this.wc=null:a===Yo&&y==="elements"&&(this.wc=null),Di.prototype.gk.call(this,a,y,x,E,b,z,ne)},be.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ql(x.fromPort),Ql(x.toPort),x.bb())}};function G1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ql(x.fromPort),Ql(x.toPort),x.bb())}}function Ql(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ql(y.port)}}be.si=function(){return!0},li.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},li.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},li.prototype.isVisible=function(){if(!Di.prototype.isVisible.call(this))return!1;var a=!0,y=Ic,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ic){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ss){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===rg&&(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},li.prototype.Zb=function(a){Di.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},li.prototype.qx=function(){var a=new Bn,y=new Bn;return W1(this,this,a,y),y.iterator};function W1(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(ne){ne.isTreeLink?(b?ne.fromNode===y:ne.toNode===y)&&W1(a,b?ne.toNode:ne.fromNode,x,E):E.add(ne)})}}li.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new nr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},be=li.prototype,be.Mo=function(a){a===void 0&&(a=null);var y=new nr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},be.Sd=function(a){a===void 0&&(a=null);var y=new nr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},be.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 Bn,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 Bn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Qi(x):ar},be.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 Bn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Qi(x):ar},be.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 Bn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Qi(x):ar},be.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new nr(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},be.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new nr(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 $m(a,y,x){Ql(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,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,y,x),ne!==null&&(ne.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 Km(a,y,x){Ql(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 ne=!0;b!==null&&(ne=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=ne)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):yp(y)))}function yp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}li.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},be=li.prototype,be.Vo=function(a){Di.prototype.Vo.call(this,a),a||(yp(this),a=this.Yk,a!==null&&q1(a,this))},be.Wo=function(a){Di.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},be.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Di.prototype.Lj.call(this)},be.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;$1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function $1(a){a.wc===null?a.wc=new wi:a.wc.clear(),a.qm(a,function(y,x){K1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function K1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Hv(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=Qn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);di(x)}}}be.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},be.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}},be.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Wm(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;)Wm(y,!1),y=y.pg();return x},be.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},be.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof li)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},be.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 Bn;return a(this,y),y},be.uz=function(){return V1(this,this)};function V1(a,y){return y=y.pg(),y===null?0:1+V1(a,y)}be.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new nr(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},be.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 An,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 An,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Qi(x):ar},be.wz=function(a){a===void 0&&(a=1/0);var y=new Bn;return md(y,this,!1,a,!0),y},li.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 Bn;x.add(this),U1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ic),y.Ue=!1}};function U1(a,y,x,E,b,z,ne){if(1<E)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),U1(oe,y,x,E-1,b,z,ne)))}else Y1(a,y,x,b,z,ne)}function Y1(a,y,x,E,b,z){for(var ne=b===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var le=re.value;if(le.isTreeLink&&(le=le.To(a),le!==null&&le!==a)){var ue=y.contains(le);if(ue||y.add(le),ne){var pe=x?le.Oo():le.Po();oe.uv=a,pe.all(function(Pe){return function(Ce){return Ce===Pe.uv||!Ce.isTreeExpanded}}(oe))&&E.Aj(le,b),le.oh(),le.Zb(!1)}le.isTreeExpanded&&(le.wasTreeExpanded=le.isTreeExpanded,ue||Y1(le,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}li.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 Bn;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ic),y.Ue=!1}};function X1(a,y,x,E,b,z,ne){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),le={};oe.next();){var ue=oe.value;if(ue.isTreeLink&&(re||ue.fd||ue.bb(),ue=ue.To(a),ue!==null&&ue!==a&&!y.contains(ue))){if(y.add(ue),!re){ue.Zb(!0),ue.oh();var pe=x?ue.Oo():ue.Po();le.vv=a,pe.all(function(Pe){return function(Ce){return Ce===Pe.vv||!Ce.isTreeExpanded}}(le))&&b.Cj(ue,z)}(2<E||ue.wasTreeExpanded)&&(ue.wasTreeExpanded=!1,X1(ue,y,x,E-1,b,z,ne))}le={vv:le.vv}}a.isTreeExpanded=!0}Ve.Object.defineProperties(li.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Vm},set:function(a){var y=this.portSpreading;y!==a&&(Hc(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&&Dc(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:El},set:function(a){typeof a=="number"&&(a=new Ti(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Hc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Dc(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&&(Hc(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&&(Hc(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&&(Hc(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 ne=z.wa(E);ne!==void 0&&z.Qx(b,ne)}}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),cl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&$1(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&&(Hc(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))}}}),li.prototype.expandTree=li.prototype.expandTree,li.prototype.collapseTree=li.prototype.collapseTree,li.prototype.findTreeParts=li.prototype.wz,li.prototype.findTreeChildrenNodes=li.prototype.Ou,li.prototype.findTreeChildrenLinks=li.prototype.Qo,li.prototype.findTreeLevel=li.prototype.uz,li.prototype.findTreeParentChain=li.prototype.vz,li.prototype.findTreeParentNode=li.prototype.pg,li.prototype.findTreeParentLink=li.prototype.kh,li.prototype.findCommonTreeParent=li.prototype.gz,li.prototype.findTreeRoot=li.prototype.xz,li.prototype.isInTreeOf=li.prototype.Nz,li.prototype.findPort=li.prototype.ns,li.prototype.findLinksTo=li.prototype.kz,li.prototype.findLinksBetween=li.prototype.jz,li.prototype.findNodesInto=li.prototype.Oo,li.prototype.findNodesOutOf=li.prototype.Po,li.prototype.findNodesConnected=li.prototype.Mu,li.prototype.findLinksInto=li.prototype.Sd,li.prototype.findLinksOutOf=li.prototype.Mo,li.prototype.findExternalTreeLinksConnected=li.prototype.qx,li.prototype.invalidateConnectedLinks=li.prototype.Bd,li.prototype.invalidateLinkBundle=li.prototype.Lz;var Ex=new mn(li,"SpreadingNone",10),Vm=new mn(li,"SpreadingEvenly",11),Gv=new mn(li,"SpreadingPacked",12);li.className="Node",li.SpreadingNone=Ex,li.SpreadingEvenly=Vm,li.SpreadingPacked=Gv;function cr(a,y){a===void 0||a instanceof gs||typeof a=="string"?li.call(this,a):(li.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Bn,this.$a=null,this.Sc=new da,this.Sc.group=this,this.gl=new Bn,this.tb=this.$p=null,y&&Object.assign(this,y)}Ot(cr,li),cr.prototype.cloneProtected=function(a){li.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof gl});y instanceof gl?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())},be=cr.prototype,be.Af=function(a){li.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 li)x.Bd(y);else if(x instanceof Kn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},be.gk=function(a,y,x,E,b,z,ne){if(a===ko&&y==="elements"){if(b instanceof gl)this.$a===null?this.$a=b:this.$a!==b&&St("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Gn){var re=b.Nl(function(oe){return oe instanceof gl});re instanceof gl&&(this.$a===null?this.$a=re:this.$a!==re&&St("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Yo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Gn&&this.$a.rg(E)&&(this.$a=null));li.prototype.gk.call(this,a,y,x,E,b,z,ne)},be.Xl=function(a,y){li.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Gn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Gn&&(a=a.Pb()),this.tb===null&&(this.tb=new vn),a.mi(this.tb),a instanceof Cr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},be.eh=function(a,y,x,E){this.nf=this.$a,li.prototype.eh.call(this,a,y,x,E)},be.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Kn||y.Va()}),li.prototype.Va.call(this)},be.si=function(){if(!li.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof li){if(y.isVisible()&&dl(y))return!1}else if(y instanceof Kn&&y.isVisible()&&dl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Wv(a,y){if(a.Gn.add(y)){y instanceof cr&&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 Kn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function $v(a,y){if(a.Gn.remove(y)){y instanceof cr&&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 Kn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}be.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)}li.prototype.Lj.call(this)},cr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=pn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},cr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=pn(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},cr.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))},be=cr.prototype,be.Bd=function(a){var y=(this.U&65536)!==0;if(li.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()?(Ql(x.fromPort),Ql(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Ql(x.fromPort),Ql(x.toPort),x.bb()))}}},be.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 Bn,E=y.iterator;E.next();){var b=E.value;if(b instanceof li)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},be.iz=function(){var a=this.Rj();a.add(this);for(var y=new Bn,x=a.iterator;x.next();){var E=x.value;if(E instanceof li)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},be.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Bn;return a(this,y),y},be.Rj=function(){var a=new Bn;return md(a,this,!0,0,!0),a.remove(this),a},be.Zb=function(a){li.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},cr.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 cr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,J1(z,y,x,E)),z instanceof li)z.Bd(y),x.Aj(z,E);else if(z instanceof Kn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}cr.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 cr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,Q1(z,y,x,E)),z instanceof li)z.Bd(y),x.Cj(z,E);else if(z instanceof Kn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}cr.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=Qe.alloc(),li.prototype.move.call(this,a,y),a=new Bn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Kn&&(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 li&&b.isLinkLabel)){var ne=b.position,re=b.location;ne.w()?(z.x=ne.x+E,z.y=ne.y+x,b.position=z):re.w()&&(z.x=re.x+E,z.y=re.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Kn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(ne=b.position,z.x=ne.x+E,z.y=ne.y+x,z.w()?b.move(z):b.bb(),Vv(b)&&b.bb());Qe.free(z)}},Ve.Object.defineProperties(cr.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&&St("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&&(Hc(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&&(Hc(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&&(Hc(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&&(Hc(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)}}}),cr.prototype.expandSubGraph=cr.prototype.expandSubGraph,cr.prototype.collapseSubGraph=cr.prototype.collapseSubGraph,cr.prototype.findSubGraphParts=cr.prototype.Rj,cr.prototype.findContainingGroupChain=cr.prototype.hz,cr.prototype.findExternalNodesConnected=cr.prototype.iz,cr.prototype.findExternalLinksConnected=cr.prototype.Lu,cr.prototype.ensureBounds=cr.prototype.Va,cr.className="Group";function gl(a){jt.call(this),this.yb=bs,this.ko=new vn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ot(gl,jt),gl.prototype.cloneProtected=function(a){jt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},gl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Fo(0,0,y.width,y.height,a.x,a.y)},gl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof cr||a instanceof lo)||St("Placeholder is not inside a Group or Adornment."),a instanceof cr){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Oa(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=Qe.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Qe.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 ne=0;z instanceof Cr&&(ne=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,le=(oe.width+ne)*re;ne=(oe.height+ne)*re,a.type!==Gn.Link&&(re=z.ga(a.category==="Selection"?cs:a.locationSpot,Qe.alloc()),a.location=re,Qe.free(re)),isNaN(le)||isNaN(ne)?(a=z.ga(cs,Qe.alloc()),le=vn.allocAt(a.x,a.y,0,0),le.Ye(z.ga(ys,a)),le.Ye(z.ga(Ol,a)),le.Ye(z.ga(nl,a)),Oa(y,le.width+E||0,le.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Qe.free(a),vn.free(le)):(Oa(y,le+E||0,ne+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},gl.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},gl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof cr&&!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=vn.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof cr&&!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)),vn.free(x),E&&y instanceof cr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},gl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof cr))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,ne=y.memberParts;ne.next();){var re=ne.value;if(re.isVisible()){if(re instanceof Kn&&(!y.computesBoundsIncludingLinks||fu(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<E&&(E=re.top),re.right>b&&(b=re.right),re.bottom>z&&(z=re.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},Ve.Object.defineProperties(gl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ti(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),gl.className="Placeholder";function Kn(a){Di.call(this,Gn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=pl,this.Om=0,this.Qm=pl,this.Rm=NaN,this.qj=Xv,this.po=.5,this.wd=null,this.Nb=new An().freeze(),this.Tg=this.Mg=null,this.ml=new vn,this.ua=new Pn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Qe,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ot(Kn,Di),Kn.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},be=Kn.prototype,be.Af=function(a){Di.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Ql(y),a=a.toPort,a!==null&&Ql(a)},be.qb=function(a){a.classType===Kn?(a.value&2)===2?this.routing=a:a===pu||a===Wc||a===Pg?this.curve=a:a===Pp||a===qm||a===e0?this.adjusting=a:a!==Xv&&a!==pl&&St("Unknown Link enum value for a Link property: "+a):Di.prototype.qb.call(this,a)},be.Xc=function(){this.ba===null&&(this.ba=new sp)},be.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),dl(a)||gd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),dl(a)||gd(a)))},be.zv=function(){return!1},be.Av=function(){},be.Zc=function(){return!1},Kn.prototype.computeAngle=function(a,y,x){return Kn.computeAngle(y,x)},Kn.computeAngle=function(a,y){switch(a){default:case pl:a=0;break;case wp:a=y;break;case Cp:a=y+90;break;case Ep:a=y-90;break;case Jv:a=y+180;break;case t0:a=tt.bp(y),90<a&&270>a&&(a-=180);break;case bp:a=tt.bp(y+90),90<a&&270>a&&(a-=180);break;case Mp:a=tt.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=tt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return tt.bp(a)};function Sg(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&&$v(x,a),a.Ah=y,y!==null&&Wv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,x,y),ne!==null&&(ne.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}be=Kn.prototype,be.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Di.prototype.oh.call(this)},be.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},be.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function q1(a,y){a.wd===null&&(a.wd=new Bn),a.wd.add(y),a.v()}be.Vo=function(a){if(Di.prototype.Vo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,$m(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||$m(x,this,E)}Sp(this)}},be.Wo=function(a){if(Di.prototype.Wo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Km(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Km(x,this,E)}xp(this)}},be.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))},Kn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Kn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Di.prototype.move.call(this,a,!1):(a=Qe.allocAt(x.x+E,x.y+b),Di.prototype.move.call(this,a,!1),Qe.free(a)),Gc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Kn.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},Kn.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},Kn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ia),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()===pu))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()===pu){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return tt.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),tt.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 ne=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=ne[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},Kn.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()===pu))return this.ua.wx(.5);if(this.computeCurve()===pu&&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),tt.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)},be=Kn.prototype,be.i=function(a){return this.Nb.s[a]},be.dd=function(a,y){this.Nb.cd(a,y)},be.L=function(a,y,x){this.Nb.cd(a,new Qe(y,x))},be.Kz=function(a,y){this.Nb.Gb(a,y)},be.m=function(a,y,x){this.Nb.Gb(a,new Qe(y,x))},be.ne=function(a){this.Nb.add(a)},be.yf=function(a,y){this.Nb.add(new Qe(a,y))},be.pv=function(a){this.Nb.mb(a)},be.Fj=function(){this.Nb.clear()};function Gc(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 An,z=a.Nb.iterator;z.next();){var ne=z.value;b.add(new Qe(ne.x+y,ne.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.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),cl(a)),E?Um(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ra(ne.animationManager,a,b),a.g("points",z,b)}}be.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},be.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,ne=0;ne<z;ne++){var re=b[ne];x=Math.min(re.x,x),E=Math.min(re.y,E)}re=ne=1/0;for(var oe=y.s,le=oe.length,ue=0;ue<le;ue++){var pe=oe[ue];ne=Math.min(pe.x,ne),re=Math.min(pe.y,re),pe.freeze()}if(y.freeze(),le===z){for(z=0;z<le;z++)if(ue=b[z],pe=oe[z],ue.x-x!==pe.x-ne||ue.y-E!==pe.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ra(x.animationManager,this,y),Um(this),this.g("points",a,y)}},be.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),Qm(a,!1))}be.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())}},be.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()}}},Kn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kf||(kf=new li,kf.desiredSize=vr,kf.Va()),this.defaultFromPoint&&(kf.location=this.defaultFromPoint,kf.Va(),y=a=kf)):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?(Af||(Af=new li,Af.desiredSize=vr,Af.Va()),this.defaultToPoint&&(Af.location=this.defaultToPoint,Af.Va(),b=E=Af)):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,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var re=xg(ne),oe=xg(x),le=y===b&&y!==null,ue=this.isOrthogonal,pe=this.curve===pu;this.Wf=le&&!ue?pe=!0:!1;var Pe=this.computeAdjusting()===pl||le;if(!ue&&!le&&re&&oe){if(re=!1,!Pe&&3<=z&&(Pe=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,Pe,z-1,oe))&&(Pe=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,Pe,z-1,oe)),!re)if(this.Fj(),pe){z=this.getLinkPoint(a,y,ne,!0,!1,E,b),Pe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=Pe.x-z.x,oe=Pe.y-z.y,le=this.computeCurviness(),pe=ue=0;var Ce=z.x+re/3,Le=z.y+oe/3,Oe=Ce,rt=Le;tt.B(oe,0)?rt=0<re?rt-le:rt+le:(ue=-re/oe,pe=Math.sqrt(le*le/(ue*ue+1)),0>le&&(pe=-pe),Oe=(0>oe?-1:1)*pe+Ce,rt=ue*(Oe-Ce)+Le),Ce=z.x+2*re/3,Le=z.y+2*oe/3;var Ye=Ce,vt=Le;tt.B(oe,0)?vt=0<re?vt-le:vt+le:(Ye=(0>oe?-1:1)*pe+Ce,vt=ue*(Ye-Ce)+Le),this.Fj(),this.ne(z),this.yf(Oe,rt),this.yf(Ye,vt),this.ne(Pe),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,Pe=b,E=this.getLinkPoint(a,y,ne,!0,!1,z,Pe),b=this.getLinkPoint(z,Pe,x,!1,!1,a,y),this.hasCurviness()?(Pe=b.x-E.x,x=b.y-E.y,ne=this.computeCurviness(),a=E.x+Pe/2,y=E.y+x/2,z=a,re=y,tt.B(x,0)?re=0<Pe?re-ne:re+ne:(Pe=-Pe/x,z=Math.sqrt(ne*ne/(Pe*Pe+1)),0>ne&&(z=-z),z=(0>x?-1:1)*z+a,re=Pe*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=vn.alloc(),y.mi(re),oe=re.ca(b),Pe.mi(re),le=re.ca(E),(oe||le)&&(ne=y.ga(Xm(ne),new Qe),this.dd(0,this.getLinkPointFromPoint(a,y,ne,b,!0,ne)),x=Pe.ga(Xm(x),new Qe),this.dd(1,this.getLinkPointFromPoint(z,Pe,x,E,!1,x))),vn.free(re))}else{pe=this.isAvoiding,Pe&&(ue&&pe||le)&&this.Fj();var Pt=le?this.computeCurviness():0;pe=this.getLinkPoint(a,y,ne,!0,ue,E,b),Ce=Oe=Le=0,(ue||!re||le)&&(rt=this.computeEndSegmentLength(a,y,ne,!0),Ce=this.getLinkDirection(a,y,pe,ne,!0,ue,E,b),le&&(re||ne.D(x)||!ue&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ce-=ue?90:30,0>Pt&&(Ce-=180)),0>Ce?Ce+=360:360<=Ce&&(Ce-=360),le&&(rt+=Math.abs(Pt)*(ue?1:2)),Ce===0?Le=rt:Ce===90?Oe=rt:Ce===180?Le=-rt:Ce===270?Oe=-rt:(Le=rt*Math.cos(Ce*Math.PI/180),Oe=rt*Math.sin(Ce*Math.PI/180)),ne.Mc()&&le&&(rt=y.ga(Qr,Qe.alloc()),Ye=Qe.allocAt(rt.x+1e3*Le,rt.y+1e3*Oe),this.getLinkPointFromPoint(a,y,rt,Ye,!0,pe),Qe.free(rt),Qe.free(Ye))),rt=this.getLinkPoint(E,b,x,!1,ue,a,y);var Ct=vt=Ye=0;if(ue||!oe||le){var It=this.computeEndSegmentLength(E,b,x,!1);Ct=this.getLinkDirection(E,b,rt,x,!1,ue,a,y),le&&(oe||ne.D(x)||!ue&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ct+=ue?0:30,0>Pt&&(Ct+=180)),0>Ct?Ct+=360:360<=Ct&&(Ct-=360),le&&(It+=Math.abs(Pt)*(ue?1:2)),Ct===0?Ye=It:Ct===90?vt=It:Ct===180?Ye=-It:Ct===270?vt=-It:(Ye=It*Math.cos(Ct*Math.PI/180),vt=It*Math.sin(Ct*Math.PI/180)),x.Mc()&&le&&(x=b.ga(Qr,Qe.alloc()),ne=Qe.allocAt(x.x+1e3*Ye,x.y+1e3*vt),this.getLinkPointFromPoint(E,b,x,ne,!1,rt),Qe.free(x),Qe.free(ne))}x=pe,(ue||!re||le)&&(x=new Qe(pe.x+Le,pe.y+Oe)),ne=rt,(ue||!oe||le)&&(ne=new Qe(rt.x+Ye,rt.y+vt)),!Pe&&!ue&&re&&3<z&&this.adjustPoints(0,pe,z-2,ne)?this.dd(z-1,rt):!Pe&&!ue&&oe&&3<z&&this.adjustPoints(1,x,z-1,rt)?this.dd(0,pe):!Pe&&(ue?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,pe),this.dd(z-1,rt)):(this.Fj(),this.ne(pe),(ue||!re||le)&&this.ne(x),ue&&this.addOrthoPoints(x,Ce,ne,Ct,a,E),(ue||!oe||le)&&this.ne(ne),this.ne(rt))}return!0};function Kv(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}Kn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Qe),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 ne=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*b;var re=-a.m12*b,oe=-a.m21*b,le=a.m11*b,ue=b*(a.m21*a.dy-a.m22*a.dx),pe=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ne+E.y*oe+ue,E=E.x*re+E.y*le+pe,ne=x.x*ne+x.y*oe+ue,x=x.x*re+x.y*le+pe}return y.Sj(b,E,ne,x,z),a!==null&&z.transform(a),z};function Ym(a,y){var x=y.Zn;return x===null&&(x=new Tf,x.port=y,x.node=y.part,y.Zn=x),sS(x,a)}Kn.prototype.getLinkPoint=function(a,y,x,E,b,z,ne,re){if(re===void 0&&(re=new Qe),x.sb()&&!xg(x))return y.ga(x,re),re;if(x.$c()){var oe=Ym(this,y);if(oe!==null){if(re.assign(oe.Zo),b&&this.routing===tS){var le=Ym(this,ne);if(le!==null&&oe.Gl<le.Gl){oe=Qe.alloc(),le=Qe.alloc();var ue=new vn(y.ga(cs,oe),y.ga(ys,le)),pe=this.computeSpot(!E,ne);a=this.getLinkPoint(z,ne,pe,!E,b,a,y,le),(x.Hf(Iu)||x.Hf(Ys))&&a.y>=ue.y&&a.y<=ue.y+ue.height?re.y=a.y:(x.Hf(Su)||x.Hf(ul))&&a.x>=ue.x&&a.x<=ue.x+ue.width&&(re.x=a.x),Qe.free(oe),Qe.free(le)}}return re}}return x=y.ga(Xm(x),Qe.alloc()),this.pointsCount>(b?6:2)?(ne=E?this.i(1):this.i(this.pointsCount-2),b&&(ne=Kv(x,ne.copy()))):(oe=this.computeSpot(!E,ne),z=Qe.alloc(),ne=ne.ga(Xm(oe),z),b&&(ne=Kv(x,ne)),Qe.free(z)),this.getLinkPointFromPoint(a,y,x,ne,E,re),Qe.free(x),re},Kn.prototype.getLinkDirection=function(a,y,x,E,b,z,ne,re){e:if(E.sb())var oe=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()&&(oe=Ym(this,y),oe!==null))switch(oe.Nc){case 1:oe=270;break e;case 2:oe=180;break e;default:case 4:oe=0;break e;case 8:oe=90;break e}oe=y.ga(Qr,Qe.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?Kv(oe,re.copy()):x):(x=Qe.alloc(),re=re.ga(Qr,x),Qe.free(x)),x=Math.abs(re.x-oe.x)>Math.abs(re.y-oe.y)?re.x>=oe.x?0:180:re.y>=oe.y?90:270,Qe.free(oe),oe=x}return E.Mc()&&ne.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),xg(E)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},Kn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Ym(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)},Kn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Qr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Co?Fa:y)):(a=y||this.toPort,a===null?a=Qr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Co?Fa:y)),a};function xg(a){return a===Fa||a.x===.5&&a.y===.5}function Xm(a){return a.x===.5&&a.y===.5?a:Qr}Kn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==pl&&4<this.pointsCount?this.computeMidPoint(new Qe):(a=y.Zn,a=a!==null?sS(a,this):null,a!==null?a.Zo:y.ga(Qr))},Kn.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},Kn.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 ne=z;if(z===void 0&&(ne=Ht.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return mv(this,y,x,b),z===void 0&&Ht.free(ne),!0;if(this.Yc(a,ne)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===this.locationObject){var pe=ue.actualBounds,Pe=this.naturalBounds;if(!(pe.x>Pe.width||pe.y>Pe.height||0>pe.x+pe.width||0>pe.y+pe.height)){if(pe=Ht.alloc(),pe.set(ne),ue instanceof Gn)re=ue.Cf(a,y,x,E,b,pe);else if(this.path===ue){if(ue instanceof Cr)if(re=a,Pe=E,ue.pickable===!1)re=!1;else if(pe.multiply(ue.transform),Pe)e:{var Ce=re,Le=pe;if(ue.fh(Ce,Le))re=!0;else{if(Le===void 0&&(Le=ue.transform,Ce.Re(ue.actualBounds))){re=!0;break e}re=Ce.left,Pe=Ce.right;var Oe=Ce.top;Ce=Ce.bottom;var rt=Qe.alloc(),Ye=Qe.alloc(),vt=Qe.alloc(),Pt=Ht.alloc();Pt.set(Le),Pt.bv(ue.transform),Pt.Vj(),Ye.x=Pe,Ye.y=Oe,Ye.transform(Pt),rt.x=re,rt.y=Oe,rt.transform(Pt),Le=!1,tf(ue,rt,Ye,vt)?Le=!0:(rt.x=Pe,rt.y=Ce,rt.transform(Pt),tf(ue,rt,Ye,vt)?Le=!0:(Ye.x=re,Ye.y=Ce,Ye.transform(Pt),tf(ue,rt,Ye,vt)?Le=!0:(rt.x=re,rt.y=Oe,rt.transform(Pt),tf(ue,rt,Ye,vt)&&(Le=!0)))),Ht.free(Pt),Qe.free(rt),Qe.free(Ye),Qe.free(vt),re=Le}}else re=ue.fh(re,pe)}else re=Ss(ue,a,E,pe);re&&(Pe=ue,y!==null&&(Pe=y(ue)),Pe&&(x===null||x(Pe))&&b.add(Pe)),Ht.free(pe)}}}return z===void 0&&Ht.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&Ht.free(ne),!1},Kn.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?pu:this.curve},Kn.prototype.computeCorner=function(){if(this.curve===pu)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Kn.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},Kn.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,ne=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===wp||E===t0||E===Jv?a=Math.max(a,b):E===Ep||E===Mp||E===Cp||E===bp?a=Math.max(a,ne):(y=y.ga(Qr).ab(x.ga(Qr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*b)+1)),this.curve===pu&&(a*=1.333)}}return a},Kn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===pl&&x.bb()}},Kn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=nS;var y=this.Sf;if(y!==null){for(var x=Qn(),E=0,b=y.links,z=0;z<b.length;z++){var ne=b[z].computeSpacing();x.push(ne),E+=ne}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),di(x)}}return a},Kn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Kn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Kn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===qm)return!1;b===e0&&(b=Pp)}switch(b){case qm:var z=this.i(a),ne=this.i(x);if(!z.Xa(y)||!ne.Xa(E)){b=z.x,z=z.y;var re=ne.x-b,oe=ne.y-z,le=Math.sqrt(re*re+oe*oe);if(!tt.$(le,0)){if(tt.$(re,0))var ue=0>oe?-Math.PI/2:Math.PI/2;else ue=Math.atan(oe/Math.abs(re)),0>re&&(ue=Math.PI-ue);ne=y.x;var pe=y.y;re=E.x-ne;var Pe=E.y-pe;for(oe=Math.sqrt(re*re+Pe*Pe),tt.$(re,0)?Pe=0>Pe?-Math.PI/2:Math.PI/2:(Pe=Math.atan(Pe/Math.abs(re)),0>re&&(Pe=Math.PI-Pe)),le=oe/le,ue=Pe-ue,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-b,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),tt.$(y,0)||(tt.$(re,0)?oe=0>oe?-Math.PI/2:Math.PI/2:(oe=Math.atan(oe/Math.abs(re)),0>re&&(oe=Math.PI-oe)),re=oe+ue,y*=le,this.L(a,ne+y*Math.cos(re),pe+y*Math.sin(re)));this.dd(x,E)}}return!0;case e0:if(z=this.i(a),pe=this.i(x),!z.Xa(y)||!pe.Xa(E)){b=z.x,z=z.y,ne=pe.x,pe=pe.y,le=(ne-b)*(ne-b)+(pe-z)*(pe-z),re=y.x,ue=y.y,oe=E.x,Pe=E.y;var Ce=1;if(oe-re!==0){var Le=(Pe-ue)/(oe-re);Ce=Math.sqrt(1+1/(Le*Le))}else Le=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Oe=y.x,rt=y.y,Ye=.5;le!==0&&(Ye=((b-Oe)*(b-ne)+(z-rt)*(z-pe))/le);var vt=b+Ye*(ne-b),Pt=z+Ye*(pe-z);y=Math.sqrt((Oe-vt)*(Oe-vt)+(rt-Pt)*(rt-Pt)),rt<Le*(Oe-vt)+Pt&&(y=-y),0<Le&&(y=-y),Oe=re+Ye*(oe-re),Ye=ue+Ye*(Pe-ue),Le!==0?(y=Oe+y/Ce,this.L(a,y,Ye-(y-Oe)/Le)):this.L(a,Oe,Ye+y)}this.dd(x,E)}return!0;case Pp:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ne=this.i(a+2),re=z.x,ue=z.y,pe=re,le=ue,tt.B(b.y,z.y)?tt.B(z.x,ne.x)?ue=y.y:tt.B(z.y,ne.y)&&(re=y.x):tt.B(b.x,z.x)&&(tt.B(z.y,ne.y)?re=y.x:tt.B(z.x,ne.x)&&(ue=y.y)),this.L(a+1,re,ue),b=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,ue=z.y,oe=re,Pe=ue,tt.B(b.y,z.y)?tt.B(z.x,ne.x)?ue=E.y:tt.B(z.y,ne.y)&&(re=E.x):tt.B(b.x,z.x)&&(tt.B(z.y,ne.y)?re=E.x:tt.B(z.x,ne.x)&&(ue=E.y)),this.L(x-1,re,ue),Vv(this))){this.L(a+1,pe,le),this.L(x-1,oe,Pe),x=!1;break e}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Kn.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 ne=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 re=b.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(Lp,Lp),oe.Bc(Lp,Lp),re.Ye(a),oe.Ye(x);var le=Qe.alloc(),ue=Qe.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&oe.right>a.x||E===90&&x.y>a.y&&oe.right>a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),E===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(le.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,ue.x=le.x,ue.y=x.y):E===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===180&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(E===90||E===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===0?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&oe.left<a.x||E===90&&x.y>a.y&&oe.left<a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),E===0?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(le.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,ue.x=le.x,ue.y=x.y):E===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===0&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(E===90||E===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===180?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&oe.bottom>a.y||E===0&&x.x>a.x&&oe.bottom>a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),E===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(le.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,ue.x=x.x,ue.y=le.y):E===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===270&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(E===0||E===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===90?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&oe.top<a.y||E===0&&x.x>a.x&&oe.top<a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),E===90?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(le.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,ue.x=x.x,ue.y=le.y):E===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===90&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(E===0||E===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===270?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y)));var pe=x;if(this.isAvoiding){var Pe=this.diagram;if(Pe===null||b===z||this.layer.isTemporary||!eg(Pe)||re.ca(pe)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var Ce=tg(Pe,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ce.Yj(Math.min(a.x,le.x),Math.min(a.y,le.y),Math.abs(a.x-le.x),Math.abs(a.y-le.y))&&Ce.Yj(Math.min(le.x,ue.x),Math.min(le.y,ue.y),Math.abs(le.x-ue.x),Math.abs(le.y-ue.y))&&Ce.Yj(Math.min(ue.x,pe.x),Math.min(ue.y,pe.y),Math.abs(ue.x-pe.x),Math.abs(ue.y-pe.y)))y=!1;else{b=a,z=pe;var Le=x=null;if(Pe.isVirtualized){Pe=Ce.bounds.copy(),Pe.Bc(-Ce.Ho,-Ce.Go);var Oe=Qe.alloc();wg(Ce,a.x,a.y)||(tt.Ff(Pe.x,Pe.y,Pe.x+Pe.width,Pe.y+Pe.height,a.x,a.y,le.x,le.y,Oe)?(x=a=Oe.copy(),y=Oe.ab(le)):tt.Ff(Pe.x,Pe.y,Pe.x+Pe.width,Pe.y+Pe.height,le.x,le.y,ue.x,ue.y,Oe)?(x=a=Oe.copy(),y=Oe.ab(ue)):tt.Ff(Pe.x,Pe.y,Pe.x+Pe.width,Pe.y+Pe.height,ue.x,ue.y,pe.x,pe.y,Oe)&&(x=a=Oe.copy(),y=Oe.ab(pe))),wg(Ce,pe.x,pe.y)||(tt.Ff(Pe.x,Pe.y,Pe.x+Pe.width,Pe.y+Pe.height,pe.x,pe.y,ue.x,ue.y,Oe)?(Le=pe=Oe.copy(),E=ue.ab(Oe)):tt.Ff(Pe.x,Pe.y,Pe.x+Pe.width,Pe.y+Pe.height,ue.x,ue.y,le.x,le.y,Oe)?(Le=pe=Oe.copy(),E=le.ab(Oe)):tt.Ff(Pe.x,Pe.y,Pe.x+Pe.width,Pe.y+Pe.height,le.x,le.y,a.x,a.y,Oe)&&(Le=pe=Oe.copy(),E=a.ab(Oe))),Qe.free(Oe)}re=re.copy().ed(oe),re.Bc(Ce.Ho*Ce.Os,Ce.Go*Ce.Os),oS(Ce,a,y,pe,E,re,!0),oe=ec(Ce,pe.x,pe.y),!Ce.abort&&oe>=Cg&&(rS(Ce),re.Bc(Ce.Ho*Ce.Hx,Ce.Go*Ce.Ix),oS(Ce,a,y,pe,E,re,!1),oe=ec(Ce,pe.x,pe.y)),!Ce.abort&&oe<Cg&&ec(Ce,pe.x,pe.y)!==$c?(Uv(this,Ce,pe.x,pe.y,E,!0,ne),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=pe.y):(re.x=pe.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(ne=this.i(3),y===0||y===180?tt.B(re.x,ne.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,ne.y)):tt.B(re.y,ne.y)?(Math.abs(a.y-re.y)<=Ce.Go/2&&(this.L(2,re.x,a.y),this.L(3,ne.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(tt.B(re.y,ne.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,ne.x,re)):tt.B(re.x,ne.x)?(Math.abs(a.x-re.x)<=Ce.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ne.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Le!==null&&(E===0||E===180?this.yf(z.x,Le.y):this.yf(Le.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(ue.copy())),Qe.free(le),Qe.free(ue)}},Kn.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 Vv(a){if(a.diagram===null||!a.isAvoiding||!eg(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=tg(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Uv(a,y,x,E,b,z,ne){var re=y.Ho,oe=y.Go,le=ec(y,x,E),ue=x,pe=E;for(b===0?ue+=re:b===90?pe+=oe:b===180?ue-=re:pe-=oe,b!==ne&&le>of&&ec(y,ue,pe)!==le-1&&(ec(y,x-re,E)===le-1?(b=180,ue=x-re,pe=E):ec(y,x+re,E)===le-1?(b=0,ue=x+re,pe=E):ec(y,x,E-oe)===le-1?(b=270,ue=x,pe=E-oe):ec(y,x,E+oe)===le-1&&(b=90,ue=x,pe=E+oe));le>of&&ec(y,ue,pe)===le-1;)x=ue,E=pe,b===0?ue+=re:b===90?pe+=oe:b===180?ue-=re:pe-=oe,--le;z?le>of&&(b===180||b===0?x=Math.floor(x/re)*re+re/2:(b===90||b===270)&&(E=Math.floor(E/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,E=Math.floor(E/oe)*oe+oe/2),le>of&&(z=b,ne=x,ue=E,b===0?(z=90,ue+=oe):b===90?(z=180,ne-=re):b===180?(z=270,ue-=oe):b===270&&(z=0,ne+=re),ec(y,ne,ue)===le-1?Uv(a,y,ne,ue,z,!1,z):(ne=x,ue=E,b===0?(z=270,ue-=oe):b===90?(z=0,ne+=re):b===180?(z=90,ue+=oe):b===270&&(z=180,ne-=re),ec(y,ne,ue)===le-1&&Uv(a,y,ne,ue,z,!1,z))),a.yf(x,E)}Kn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=To(y,a,x.x,x.y,E.x,E.y),z=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var re=To(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ne,b=re)}return z},Kn.prototype.qc=function(){this.lk=!1,this.v()},Kn.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 Cr&&(b.ua=this.ua)}}},Kn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&rf(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 ne=this.computeCurve();if(ne===pu&&3<=y&&!tt.$(this.smoothness,0))if(y===3){var re=this.i(1);E=Math.min(b.x,re.x);var oe=Math.min(b.y,re.y);re=this.i(2),E=Math.min(E,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),oe=this.i(E),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);E=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);E=z.x,oe=z.y}if(E-=this.su.x,oe-=this.su.y,b.x-=E,b.y-=oe,y!==2||rf(this)){if(a.type=Pn.o,re=B1(a),this.computeShortLength(!0)!==0&&(b=Nf(this,b,!0,z)),yg(re,b.x,b.y,!1),ne===pu&&3<=y&&!tt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-oe,b=this.i(2).copy(),b.x-=E,b.y-=oe,this.computeShortLength(!1)!==0&&(b=Nf(this,b,!1,z)),_c(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Qe.allocAt(E,oe),x=Qe.alloc(),x.assign(this.i(1)),z=Qe.allocAt(E,oe),b=Qe.allocAt(E,oe),ne=this.i(0);for(var le,ue=this.smoothness/3,pe=1;pe<this.pointsCount-1;pe++){le=this.i(pe);var Pe=ne,Ce=le,Le=this.i(Yv(this,le,pe,!1));if((!tt.$(Pe.x,Ce.x)||!tt.$(Ce.x,Le.x))&&(!tt.$(Pe.y,Ce.y)||!tt.$(Ce.y,Le.y))){var Oe=ue;isNaN(Oe)&&(Oe=this.smoothness/3);var rt=Pe.x;Pe=Pe.y;var Ye=Ce.x;Ce=Ce.y;var vt=Le.x;Le=Le.y;var Pt=Oe*Jm(rt,Pe,Ye,Ce);Oe*=Jm(Ye,Ce,vt,Le),tt.$(Pe,Ce)&&tt.$(Ye,vt)&&(Ye>rt?Le>Ce?(z.x=Ye-Pt,z.y=Ce-Pt,b.x=Ye+Oe,b.y=Ce+Oe):(z.x=Ye-Pt,z.y=Ce+Pt,b.x=Ye+Oe,b.y=Ce-Oe):Le>Ce?(z.x=Ye+Pt,z.y=Ce-Pt,b.x=Ye-Oe,b.y=Ce+Oe):(z.x=Ye+Pt,z.y=Ce+Pt,b.x=Ye-Oe,b.y=Ce-Oe)),tt.$(rt,Ye)&&tt.$(Ce,Le)&&(Ce>Pe?(vt>Ye?(z.x=Ye-Pt,z.y=Ce-Pt,b.x=Ye+Oe):(z.x=Ye+Pt,z.y=Ce-Pt,b.x=Ye-Oe),b.y=Ce+Oe):(vt>Ye?(z.x=Ye-Pt,z.y=Ce+Pt,b.x=Ye+Oe):(z.x=Ye+Pt,z.y=Ce+Pt,b.x=Ye-Oe),b.y=Ce-Oe)),(tt.$(rt,Ye)&&tt.$(Ye,vt)||tt.$(Pe,Ce)&&tt.$(Ce,Le))&&(rt=.5*(rt+vt),Pe=.5*(Pe+Le),z.x=rt,z.y=Pe,b.x=rt,b.y=Pe),(pe===1||pe===2&&tt.$(ne.x,this.i(0).x)&&tt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+le.x),x.y=.5*(ne.y+le.y)),_c(re,x.x-E,x.y-oe,z.x-E,z.y-oe,le.x-E,le.y-oe),y.set(z),x.set(b),ne=le}}le=ne.x,ne=ne.y,ue=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ue=Nf(this,ue.copy(),!1,uo)),le=.5*(le+ue.x),ne=.5*(ne+ue.y),_c(re,b.x-E,b.y-oe,le-E,ne-oe,ue.x-E,ue.y-oe),Qe.free(y),Qe.free(x),Qe.free(z),Qe.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),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Nf(this,ne.copy(),!1,uo)),_c(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ne.x-E,ne.y-oe);else{for(z=Qe.alloc(),z.assign(this.i(0)),b=Qe.alloc(),b.assign(z),ne=this.computeCorner(),pe=1,le=0;pe<y;){if(pe=Yv(this,z,pe,1<pe),ue=this.i(pe),pe>=y-1){if(!z.D(ue))this.computeShortLength(!1)!==0&&(ue=Nf(this,ue.copy(),!1,uo)),Bf(this,re,-E,-oe,z,ue,x);else if(le===0)for(pe=1;pe<y;)b.assign(z),ue=this.i(pe++),Bf(this,re,-E,-oe,z,ue,x),z.assign(ue);break}if(le=Yv(this,ue,pe+1,pe<y-3),pe=-E,rt=-oe,Pe=ue,Ye=this.i(le),Oe=x,tt.B(z.y,Pe.y)&&tt.B(Pe.x,Ye.x))if(Le=Math.min(ne,Math.abs(Pe.x-b.x)/2),Le=Pt=Math.min(Le,Math.abs(Ye.y-Pe.y)/2),tt.B(Le,0))Bf(this,re,pe,rt,z,Pe,Oe),z.assign(Pe);else{var Ct=Pe.x,It=Pe.y;Ce=Ct,vt=It,Pe.x>z.x?Ct=Pe.x-Le:Ct=Pe.x+Le,Ye.y>Pe.y?vt=Pe.y+Pt:vt=Pe.y-Pt,Ye=Qe.allocAt(Ct,It),Bf(this,re,pe,rt,z,Ye,Oe),Qe.free(Ye),Zm(re,Pe.x+pe,Pe.y+rt,Ce+pe,vt+rt),z.h(Ce,vt)}else tt.B(z.x,Pe.x)&&tt.B(Pe.y,Ye.y)?(Le=Math.min(ne,Math.abs(Pe.y-b.y)/2),Le=Pt=Math.min(Le,Math.abs(Ye.x-Pe.x)/2),tt.B(Pt,0)?(Bf(this,re,pe,rt,z,Pe,Oe),z.assign(Pe)):(Ct=Pe.x,It=Pe.y,Ce=Ct,vt=It,Pe.y>z.y?It=Pe.y-Le:It=Pe.y+Le,Ye.x>Pe.x?Ce=Pe.x+Pt:Ce=Pe.x-Pt,Ye=Qe.allocAt(Ct,It),Bf(this,re,pe,rt,z,Ye,Oe),Qe.free(Ye),Zm(re,Pe.x+pe,Pe.y+rt,Ce+pe,vt+rt),z.h(Ce,vt))):(Bf(this,re,pe,rt,z,Pe,Oe),z.assign(Pe));b.assign(ue),pe=le}Qe.free(z)}Hm=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Nf(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Nf(this,re,!1,z)),a.type=Pn.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function Jm(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),tt.$(a,0)?y:tt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Nf(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=Jm(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=Jm(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;tt.$(y.x,z.x)&&tt.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!tt.$(y.x,z.x)&&!tt.$(y.y,z.y))return x-1;for(var ne=z;tt.$(y.x,z.x)&&tt.$(z.x,ne.x)&&(!E||(y.y>=z.y?z.y>=ne.y:z.y<=ne.y))||tt.$(y.y,z.y)&&tt.$(z.y,ne.y)&&(!E||(y.x>=z.x?z.x>=ne.x:z.x<=ne.x));){if(x>=b)return b-1;ne=a.i(x++)}return x-2}Kn.prototype.computeJumpLength=function(){return 10};function Bf(a,y,x,E,b,z,ne){if(!ne&&rf(a)){ne=a.computeJumpLength();var re=ne/2,oe=[],le=0;if(a.isVisible()&&(le=bx(a,b,z,oe)),0<le){if(tt.B(b.y,z.y))if(b.x<z.x)for(var ue=0;ue<le;){var pe=Math.max(b.x,Math.min(oe[ue++]-re,z.x-ne));y.lineTo(pe+x,z.y+E);for(var Pe=pe+x,Ce=Math.min(pe+ne,z.x);ue<le&&(pe=oe[ue],pe<Ce+ne);)ue++,Ce=Math.min(pe+re,z.x);pe=z.y-ne+E,Ce+=x;var Le=z.y+E;a.curve===Wc?yg(y,Ce,Le,!1):_c(y,Pe,pe,Ce,pe,Ce,Le)}else for(--le;0<=le;){for(ue=Math.min(b.x,Math.max(oe[le--]+re,z.x+ne)),y.lineTo(ue+x,z.y+E),Pe=ue+x,pe=Math.max(ue-ne,z.x);0<=le&&(ue=oe[le],ue>pe-ne);)le--,pe=Math.max(ue-re,z.x);ue=z.y-ne+E,pe+=x,Ce=z.y+E,a.curve===Wc?yg(y,pe,Ce,!1):_c(y,Pe,ue,pe,ue,pe,Ce)}else if(tt.B(b.x,z.x))if(b.y<z.y)for(ue=0;ue<le;){for(pe=Math.max(b.y,Math.min(oe[ue++]-re,z.y-ne)),y.lineTo(z.x+x,pe+E),Pe=pe+E,pe=Math.min(pe+ne,z.y);ue<le&&(Ce=oe[ue],Ce<pe+ne);)ue++,pe=Math.min(Ce+re,z.y);Ce=z.x-ne+x,Le=z.x+x,pe+=E,a.curve===Wc?yg(y,Le,pe,!1):_c(y,Ce,Pe,Ce,pe,Le,pe)}else for(--le;0<=le;){for(ue=Math.min(b.y,Math.max(oe[le--]+re,z.y+ne)),y.lineTo(z.x+x,ue+E),Pe=ue+E,ue=Math.max(ue-ne,z.y);0<=le&&(pe=oe[le],pe>ue-ne);)le--,ue=Math.max(pe-re,z.y);pe=z.x-ne+x,Ce=z.x+x,ue+=E,a.curve===Wc?yg(y,Ce,ue,!1):_c(y,pe,Pe,pe,ue,Ce,ue)}}}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 ne=z.length,re=0;re<ne;re++){var oe=z[re];if(oe instanceof Kn){if(oe===a)return 0<E.length&&E.sort(function(ue,pe){return ue-pe}),E.length;if(oe.isVisible()&&rf(oe)){var le=oe.routeBounds;le.w()&&a.routeBounds.Yc(le)&&!a.usesSamePort(oe)&&(le=oe.path,le!==null&&le.Ed()&&Mx(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(ue,pe){return ue-pe}),E.length}function Mx(a,y,x,E){for(var b=tt.B(a.y,y.y),z=E.pointsCount,ne=E.i(0),re=Qe.alloc(),oe=1;oe<z;oe++){var le=E.i(oe);if(oe<z-1){var ue=E.i(oe+1);if(ne.y===le.y&&le.y===ue.y){if(le.x>ne.x&&ue.x>=le.x||le.x<ne.x&&ue.x<=le.x)continue}else if(ne.x===le.x&&le.x===ue.x&&(le.y>ne.y&&ue.y>=le.y||le.y<ne.y&&ue.y<=le.y))continue}e:{ue=a.x;var pe=a.y,Pe=y.x,Ce=y.y,Le=ne.x;ne=ne.y;var Oe=le.x,rt=le.y;if(tt.B(ue,Pe)){if(!tt.B(pe,Ce)&&tt.B(ne,rt)&&Math.min(pe,Ce)<ne&&Math.max(pe,Ce)>ne&&Math.min(Le,Oe)<ue&&Math.max(Le,Oe)>ue&&!tt.B(Le,Oe)){re.x=ue,re.y=ne,ue=!0;break e}}else if(tt.B(pe,Ce)&&tt.B(Le,Oe)&&Math.min(ue,Pe)<Le&&Math.max(ue,Pe)>Le&&Math.min(ne,rt)<pe&&Math.max(ne,rt)>pe&&!tt.B(ne,rt)){re.x=Le,re.y=pe,ue=!0;break e}re.x=0,re.y=0,ue=!1}ue&&(b?x.push(re.x):x.push(re.y)),ne=le}Qe.free(re)}function rf(a){return a=a.curve,a===Pg||a===Wc}function Qm(a,y){(y||rf(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()))}Kn.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 ne=b.length,re=0;re<ne;re++){var oe=b[re];oe instanceof Kn&&(oe===this?z=!0:z&&eS(this,oe,a))}}else if(E)for(z=b.Pa.s,b=z.length,ne=0;ne<b;ne++)re=z[ne],re instanceof Kn&&eS(this,re,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&rf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Kn.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},Kn.prototype.isVisible=function(){if(!Di.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Kn.prototype.Zb=function(a){if(Di.prototype.Zb.call(this,a),a&&Qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Kn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Pp:this.qk};function Sp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,ne=y.jb.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe];(le.ef===y&&le.ff===E&&le.uf===x&&le.vf===b||le.ef===x&&le.ff===b&&le.uf===y&&le.vf===E)&&(z===null?z=le:(a===null&&(a=[],a.push(z)),a.push(le)))}if(a!==null){for(z=H1(y,x,E,b),z===null&&(z=new i0(y,E,x,b),Z1(y,z),Z1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function xp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ui(y.links,a),y.Sl()))}Kn.prototype.ph=function(){return!0},Ve.Object.defineProperties(Kn.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&&Km(y,this,x),xp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.uf!==a&&$m(a,this,b),Sp(this),this.C(1)),this.g("fromNode",y,a),Sg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ql(x),xp(this),this.ff=a;var E=this.fromPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),Sp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Km(y,this,x),xp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.ef!==a&&$m(a,this,b),Sp(this),this.C(1)),this.g("toNode",y,a),Sg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ql(x),xp(this),this.vf=a;var E=this.toPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),Sp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Co},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&&Ql(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&&Rn(a,">= 0",Kn,"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:Co},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&&Ql(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&&Rn(a,">= 0",Kn,"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?ar:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&yp(this.fromNode),this.toNode!==null&&yp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Cr?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()===pu&&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),tt.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 ne=this.i(z-2);z+3>=E&&(z=E-1);var re=this.i(z-1),oe=this.i(z);tt.Dl(b.x,b.y,ne.x,ne.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),b=oe}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 Qe)}},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);tt.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):tt.$(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 An,E=0;E<a.length/2;E++)b=new Qe(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(!hn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new An,E=0;E<a.length;E++)b=a[E],x.add(new Qe(b.x,b.y).freeze())}}else if(a instanceof An)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else St("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&&ra(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||!xg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!xg(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),Qm(this,y===Wc||y===Pg||a===Wc||a===Pg),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),Qm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Kn.prototype.invalidateOtherJumpOvers=Kn.prototype.Xo,Kn.prototype.findClosestSegment=Kn.prototype.ez,Kn.prototype.updateRoute=Kn.prototype.vg,Kn.prototype.invalidateRoute=Kn.prototype.bb,Kn.prototype.rollbackRoute=Kn.prototype.rv,Kn.prototype.commitRoute=Kn.prototype.zf,Kn.prototype.startRoute=Kn.prototype.uh,Kn.prototype.clearPoints=Kn.prototype.Fj,Kn.prototype.removePoint=Kn.prototype.pv,Kn.prototype.addPointAt=Kn.prototype.yf,Kn.prototype.addPoint=Kn.prototype.ne,Kn.prototype.insertPointAt=Kn.prototype.m,Kn.prototype.insertPoint=Kn.prototype.Kz,Kn.prototype.setPointAt=Kn.prototype.L,Kn.prototype.setPoint=Kn.prototype.dd,Kn.prototype.getPoint=Kn.prototype.i,Kn.prototype.getOtherPort=Kn.prototype.Cz,Kn.prototype.getOtherNode=Kn.prototype.To;var kf=null,Af=null,Xv=new mn(Kn,"Normal",1),Lx=new mn(Kn,"Orthogonal",2),Fx=new mn(Kn,"AvoidsNodes",6),tS=new mn(Kn,"AvoidsNodesStraight",7),pl=new mn(Kn,"None",0),pu=new mn(Kn,"Bezier",9),Wc=new mn(Kn,"JumpGap",10),Pg=new mn(Kn,"JumpOver",11),Pp=new mn(Kn,"End",17),qm=new mn(Kn,"Scale",18),e0=new mn(Kn,"Stretch",19),wp=new mn(Kn,"OrientAlong",21),Cp=new mn(Kn,"OrientPlus90",22),Ep=new mn(Kn,"OrientMinus90",23),Jv=new mn(Kn,"OrientOpposite",24),t0=new mn(Kn,"OrientUpright",25),bp=new mn(Kn,"OrientPlus90Upright",26),Mp=new mn(Kn,"OrientMinus90Upright",27),n0=new mn(Kn,"OrientUpright45",28),nS=16,iS=14,Lp=8;Kn.className="Link",Kn.Normal=Xv,Kn.Orthogonal=Lx,Kn.AvoidsNodes=Fx,Kn.AvoidsNodesStraight=tS,Kn.None=pl,Kn.Bezier=pu,Kn.JumpGap=Wc,Kn.JumpOver=Pg,Kn.End=Pp,Kn.Scale=qm,Kn.Stretch=e0,Kn.OrientAlong=wp,Kn.OrientPlus90=Cp,Kn.OrientMinus90=Ep,Kn.OrientOpposite=Jv,Kn.OrientUpright=t0,Kn.OrientPlus90Upright=bp,Kn.OrientMinus90Upright=Mp,Kn.OrientUpright45=n0,Kn.EndSegmentStep=8,Kn.CurvinessStart=nS,Kn.SpacingMin=iS,Kn.OrthoShortCut=Lp;function i0(a,y,x,E){_r(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}i0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},i0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},i0.className="LinkBundle";function Fp(a){_r(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}Fp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=Qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function wg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ec(a,y,x){return wg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):Qv}function rS(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]>=of&&(x[E]=Qv)}Fp.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]===$c)return!1}return!0};function tc(a,y,x,E,b,z,ne,re,oe){if(!(y<z||y>ne||x<re||x>oe)){var le=y|0,ue=x|0,pe=a.ac[le][ue];if(pe>=of&&pe<Cg)for(b?ue+=E:le+=E,pe+=1;z<=le&&le<=ne&&re<=ue&&ue<=oe&&!(pe>=a.ac[le][ue]);)a.ac[le][ue]=pe,pe+=1,b?ue+=E:le+=E;if(le=b?ue:le,b)if(0<E)for(x+=E;x<le;x+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else for(x+=E;x>le;x+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else if(0<E)for(y+=E;y<le;y+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else for(y+=E;y>le;y+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe)}}function r0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var le=$c,ue=of;for(a.ac[y][x]=ue;le===$c&&y>z&&y<ne&&x>re&&x<oe;)ue+=1,a.ac[y][x]=ue,b?x+=E:y+=E,le=a.ac[y][x]}function o0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var le=$c,ue=Cg;for(a.ac[y][x]=ue;le===$c&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=ue,b?x+=E:y+=E,le=a.ac[y][x]}function oS(a,y,x,E,b,z,ne){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(wg(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var le=E.x,ue=E.y;if(wg(a,le,ue))if(le-=a.Nd,le/=a.rc,ue-=a.Od,ue/=a.sc,1>=Math.abs(re-le)&&1>=Math.abs(oe-ue))a.abort=!0;else{var pe=z.x;E=z.y,y=z.x+z.width;var Pe=z.y+z.height;pe-=a.Nd,pe/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,Pe-=a.Od,Pe/=a.sc,z=Math.max(0,Math.min(a.di,pe|0)),y=Math.min(a.di,Math.max(0,y|0)),pe=Math.max(0,Math.min(a.ei,E|0)),Pe=Math.min(a.ei,Math.max(0,Pe|0)),E=a.ac,re|=0,oe|=0,le|=0,ue|=0;var Ce=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===$c?(r0(a,re,oe,Ce,x,z,y,pe,Pe),r0(a,re,oe,1,!x,z,y,pe,Pe),r0(a,re,oe,-1,!x,z,y,pe,Pe)):r0(a,re,oe,Ce,x,re,oe,re,oe),E[le][ue]===$c?(o0(a,le,ue,b===0||b===90?1:-1,b===90||b===270,z,y,pe,Pe),o0(a,le,ue,1,!(b===90||b===270),z,y,pe,Pe),o0(a,le,ue,-1,!(b===90||b===270),z,y,pe,Pe)):o0(a,le,ue,Ce,x,le,ue,le,ue),x=Qn(),ne&&aS(a,le,ue,b,re,oe,x))for((x[0]!==le||x[1]!==ue)&&(x.unshift(ue),x.unshift(le)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=of,b=x[x.length-2],ne=x[x.length-1],E[b][ne]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],ne=x[z+3],y=x[z],le=x[z+1];y>b?b++:y<b?b--:le>ne?ne++:le<ne&&ne--,E[b][ne]=a++,b!==y||ne!==le;);else tc(a,re,oe,1,!1,z,y,pe,Pe),tc(a,re,oe,-1,!1,z,y,pe,Pe),tc(a,re,oe,1,!0,z,y,pe,Pe),tc(a,re,oe,-1,!0,z,y,pe,Pe);di(x)}}}}function aS(a,y,x,E,b,z,ne){for(var re=a.ac,oe=y,le=x;;){if(oe===b&&le===z)return!0;var ue=oe,pe=le;if(E===0)if(ue<b)ue++;else break;else if(E===90)if(pe<z)pe++;else break;else if(E===180)if(ue>b)ue--;else break;else if(pe>z)pe--;else break;var Pe=re[ue][pe];if(Pe===0||Pe===qv)break;oe=ue,le=pe}for(;;){if(ue=E,pe=oe,Pe=le,E===0?Pe<z?(ue=90,Pe++):Pe>z&&(ue=270,Pe--):E===90?pe<b?(ue=0,pe++):pe>b&&(ue=180,pe--):E===180?Pe<z?(ue=90,Pe++):Pe>z&&(ue=270,Pe--):pe<b?(ue=0,pe++):pe>b&&(ue=180,pe--),pe=re[pe][Pe],ue!==E&&pe!==0&&pe!==qv){if(ne.push(oe),ne.push(le),aS(a,oe,le,ue,b,z,ne))return!0;ne.pop(),ne.pop()}if(re[oe][le]=qv,E===0){if(oe===y)return!1;oe--}else if(E===90){if(le===x)return!1;le--}else if(E===180){if(oe===y)return!1;oe++}else{if(le===x)return!1;le++}}}Ve.Object.defineProperties(Fp.prototype,{bounds:{get:function(){return new vn(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 $c=0,of=1,Cg=999999,Qv=Cg+1,qv=Cg+2;Fp.className="PositionArray";function Tf(){_r(this),this.port=this.node=null,this.pe=[],this.ap=!1}Tf.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 Nx(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}Tf.prototype.Sl=function(){this.pe.length=0};function sS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof cr?b:null;if(z===null||z.isSubGraphExpanded)var ne=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}E=z,ne=E.Lu()}z=a.pe.length=0;var re=a.port.ga(cs,Qe.alloc()),oe=a.port.ga(ys,Qe.alloc());for(b=vn.allocAt(re.x,re.y,0,0),b.Ye(oe),Qe.free(re),Qe.free(oe),re=Qe.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ne=ne.iterator;ne.next();){var le=ne.value;if(le.isVisible()&&le.fromPort!==le.toPort){var ue=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(E),pe=le.computeSpot(ue,a.port);if(pe.$c()&&(ue=ue?le.toPort:le.fromPort,ue!==null)){var Pe=ue.part;if(Pe!==null){var Ce=Pe.findVisibleNode();Ce!==null&&Ce!==Pe&&(Pe=Ce,ue=Pe.port),ue=le.computeOtherPoint(Pe,ue),Pe=re.ab(ue),Pe-=oe,0>Pe?Pe+=360:360<=Pe&&(Pe-=360),pe=Nx(b,pe,Pe,le.isOrthogonal),pe===0?(pe=4,180<Pe&&(Pe-=360)):pe===90?(pe=8,270<Pe&&(Pe-=360)):pe===180?pe=2:(pe=1,90>Pe&&(Pe+=360)),Ce=a.pe[z],Ce===void 0?(Ce=new ey(le,Pe,pe),a.pe[z]=Ce):(Ce.link=le,Ce.angle=Pe,Ce.Nc=pe),Ce.hv.set(ue),z++}}}}for(Qe.free(re),a.pe.sort(Tf.prototype.j),oe=a.pe.length,E=-1,z=re=0;z<oe;z++)ne=a.pe[z],ne!==void 0&&(ne.Nc!==E&&(E=ne.Nc,re=0),ne.Uo=re,re++);for(E=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==E&&(E=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,pe=a.port,E=a.node.portSpreading,re=Qe.alloc(),oe=Qe.alloc(),ne=Qe.alloc(),le=Qe.alloc(),pe.ga(cs,re),pe.ga(Ol,oe),pe.ga(ys,ne),pe.ga(nl,le),Ce=Pe=ue=pe=0,E===Gv)for(var Le=0;Le<z.length;Le++){var Oe=z[Le];if(Oe!==null){var rt=Oe.link.computeThickness();switch(Oe.Nc){case 8:Pe+=rt;break;case 2:Ce+=rt;break;case 1:pe+=rt;break;default:case 4:ue+=rt}}}var Ye=Le=0,vt=1,Pt=Oe=0;for(rt=0;rt<z.length;rt++){var Ct=z[rt];if(Ct!==null){if(Le!==Ct.Nc){switch(Le=Ct.Nc,Le){case 8:var It=ne;Ye=le;break;case 2:It=le,Ye=re;break;case 1:It=re,Ye=oe;break;default:case 4:It=oe,Ye=ne}switch(Oe=Ye.x-It.x,Pt=Ye.y-It.y,Le){case 8:Pe>Math.abs(Oe)?(vt=Math.abs(Oe)/Pe,Pe=Math.abs(Oe)):vt=1;break;case 2:Ce>Math.abs(Pt)?(vt=Math.abs(Pt)/Ce,Ce=Math.abs(Pt)):vt=1;break;case 1:pe>Math.abs(Oe)?(vt=Math.abs(Oe)/pe,pe=Math.abs(Oe)):vt=1;break;default:case 4:ue>Math.abs(Pt)?(vt=Math.abs(Pt)/ue,ue=Math.abs(Pt)):vt=1}Ye=0}var rn=Ct.Zo;if(E===Gv){switch(Ct=Ct.link.computeThickness(),Ct*=vt,rn.set(It),Le){case 8:rn.x=It.x+Oe/2+Pe/2-Ye-Ct/2;break;case 2:rn.y=It.y+Pt/2+Ce/2-Ye-Ct/2;break;case 1:rn.x=It.x+Oe/2-pe/2+Ye+Ct/2;break;default:case 4:rn.y=It.y+Pt/2-ue/2+Ye+Ct/2}Ye+=Ct}else{var ri=.5;E===Vm&&(ri=(Ct.Uo+1)/(Ct.Gl+1)),rn.x=It.x+Oe*ri,rn.y=It.y+Pt*ri}}}for(Qe.free(re),Qe.free(oe),Qe.free(ne),Qe.free(le),It=a.pe,z=0;z<It.length;z++)E=It[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,vn.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}Tf.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},Tf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Fa,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)},Tf.className="Knot";function ey(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Qe,this.Gl=this.Uo=0,this.Zo=new Qe,this.Ju=0}ey.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()},ey.className="LinkInfo";function da(a){_r(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Qe(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}da.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},da.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},da.prototype.qb=function(){},da.prototype.toString=function(){var a=hi(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},da.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())}}},da.prototype.createNetwork=function(){return new qo(this)},da.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof nn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof cr?y.lg(a.memberParts):y.lg(a.iterator),y},da.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")}},da.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()}},da.prototype.doLayout=function(a){var y=new Bn;a instanceof nn?(vd(this,y,a.nodes,!0,this.rh,!0,!1,!0),vd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof cr?vd(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},da.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,ne=0;for(a=a.iterator;a.next();){var re=a.value;Np(re);var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(E,b),re instanceof cr&&(re.rh=!1),E+=Math.max(le,50)+20,ne=Math.max(ne,Math.max(oe,50)),z>=y-1?(z=0,E=x,b+=ne+20,ne=0):z++}},da.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,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value.node;if(!(re===null||re instanceof Kn)&&(Np(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof cr&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(oe,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},da.prototype.rh=function(a){return!!(!a.location.w()||a instanceof cr&&a.rh)};function vd(a,y,x,E,b,z,ne,re){for(x=x.iterator;x.next();){var oe=x.value;E&&!oe.isTopLevel||b!==null&&!b(oe)||!oe.canLayout()||(z&&oe instanceof li?oe.isLinkLabel||(oe instanceof cr&&oe.layout===null?vd(a,y,oe.memberParts,!1,b,z,ne,re):(Np(oe),y.add(oe))):ne&&oe instanceof Kn?y.add(oe):!re||!oe.Zc()||oe instanceof li||(Np(oe),y.add(oe)))}}function Np(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}da.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new vn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},da.prototype.ex=function(a){var y=new Bn;return a instanceof nn?(vd(this,y,a.nodes,!0,null,!0,!0,!0),vd(this,y,a.links,!0,null,!0,!0,!0),vd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof cr?vd(this,y,a.memberParts,!1,null,!0,!0,!0):vd(this,y,a.iterator,!1,null,!0,!0,!0),y},da.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(cs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ve.Object.defineProperties(da.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())}}}),da.prototype.collectParts=da.prototype.ex,da.prototype.getLayoutBounds=da.prototype.ni,da.prototype.invalidateLayout=da.prototype.C,da.className="Layout";function qo(a){_r(this),this.Sc=a,this.wf=new Bn,this.ye=new Bn,this.Es=new wi,this.zs=new wi}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 Bn,this.ye=new Bn,this.Es=new wi,this.zs=new wi},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 ps(this)},qo.prototype.createEdge=function(){return new ql(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(ne){if(ne instanceof li)return!ne.isLinkLabel;if(ne instanceof Kn){var re=ne.fromNode;return re===null||re.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof li&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof cr&&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 Kn&&(!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},be=qo.prototype,be.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},be.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},be.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}be.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},be.ki=function(a){return a===null?null:this.Es.I(a)},be.Bo=function(a){if(a!==null){ty(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ty(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}}be.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},be.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))}be.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},be.Lo=function(a){return a===null?null:this.zs.I(a)},be.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},be.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))}},be.Ko=function(){for(var a=Qn(),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]);di(a)},qo.prototype.deleteArtificialVertexes=function(){for(var a=Qn(),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=Qn(),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]);di(a),di(y)};function Bx(a){for(var y=Qn(),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]);di(y)}qo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Bx(this),this.Ko()),a=new An;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),ty(y,b),iy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(ny(a,x),ty(y,x),iy(a,y,x.toVertex))}}qo.prototype.dz=function(){for(var a=new Bn,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},Ve.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 ps(a){_r(this),this.ob=a,this.j=new vn(0,0,10,10).freeze(),this.o=new Qe(5,5).freeze(),this.Sh=this.ub=null,this.tg=new An,this.mg=new An}ps.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new An,this.mg=new An},ps.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Bi(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},ps.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;hn(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 cr)){x=vn.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Qr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),vn.free(x);return}vn.free(x)}a.moveTo(y.x,y.y)}},ps.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ps.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ps.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ps.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function ry(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}Ve.Object.defineProperties(ps.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=vn.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),vn.free(x),!(a instanceof cr)&&(a=a.locationObject.ga(Qr),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 Bn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Bn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Bn,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 An,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}}}),ps.prototype.deleteDestinationEdge=ps.prototype.Jl,ps.prototype.addDestinationEdge=ps.prototype.zl,ps.prototype.deleteSourceEdge=ps.prototype.Kl,ps.prototype.addSourceEdge=ps.prototype.Cl,ps.className="LayoutVertex",ps.standardComparer=ry,ps.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 ql(a){_r(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}ql.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},ql.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Bi(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},ql.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ql.prototype.commit=function(){},ql.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ve.Object.defineProperties(ql.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)}}}),ql.prototype.getOtherVertex=ql.prototype.Ax,ql.className="LayoutEdge";function Ds(a){da.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new qn(NaN,NaN).freeze(),this.tf=new qn(10,10).freeze(),this.Jb=Bp,this.Rb=s0,this.nd=kp,this.hd=uS,a&&Object.assign(this,a)}Ot(Ds,da),Ds.prototype.cloneProtected=function(a){da.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},Ds.prototype.qb=function(a){a.classType===Ds?a===kp||a===u0||a===oy||a===l0?this.sorting=a:a===s0||a===vh?this.arrangement=a:a===Bp||a===a0?this.alignment=a:St("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Ds.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 cr)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case l0:b.reverse();break;case kp:b.sort(this.comparer);break;case u0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=z&&0>=ne&&(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 a0:var re=y,oe=x,le=vn.alloc(),ue=Math.max(this.cellSize.width,1);if(!isFinite(ue))for(var pe=ue=0;pe<b.length;pe++){var Pe=this.ni(b[pe],le);ue=Math.max(ue,Pe.width)}if(ue=Math.max(ue+re,1),pe=Math.max(this.cellSize.height,1),!isFinite(pe))for(Pe=pe=0;Pe<b.length;Pe++){var Ce=this.ni(b[Pe],le);pe=Math.max(pe,Ce.height)}pe=Math.max(pe+oe,1),Pe=this.arrangement;for(var Le=Ce=this.arrangementOrigin.x,Oe=this.arrangementOrigin.y,rt=0,Ye=0,vt=0;vt<b.length;vt++){var Pt=b[vt],Ct=this.ni(Pt,le),It=Math.ceil((Ct.width+re)/ue)*ue,rn=Math.ceil((Ct.height+oe)/pe)*pe;switch(Pe){case vh:var ri=Math.abs(Le-Ct.width);break;default:ri=Le+Ct.width}switch((0<z&&rt>z-1||0<ne&&0<rt&&ri-Ce>ne)&&(E.push(new vn(0,Oe,ne+re,Ye)),rt=0,Le=Ce,Oe+=Ye,Ye=0),Ye=Math.max(Ye,rn),Pe){case vh:Ct=-Ct.width;break;default:Ct=0}switch(Pt.moveTo(Le+Ct,Oe),Pe){case vh:Le-=It;break;default:Le+=It}rt++}E.push(new vn(0,Oe,ne+re,Ye)),vn.free(le);break;case Bp:for(oe=ne,ue=z,pe=y,Pe=x,ne=vn.alloc(),Ce=Math.max(this.cellSize.width,1),z=Oe=le=0,re=Qe.alloc(),Le=0;Le<b.length;Le++)Ye=b[Le],rt=this.ni(Ye,ne),Ye=Zc(Ye,Ye.locationObject,Ye.locationSpot,re),le=Math.max(le,Ye.x),Oe=Math.max(Oe,rt.width-Ye.x),z=Math.max(z,Ye.y);switch(Le=this.arrangement,Le){case vh:le+=pe;break;default:Oe+=pe}Ce=isFinite(Ce)?Math.max(Ce+pe,1):Math.max(le+Oe,1);var Pi=Ye=this.arrangementOrigin.x;for(vt=this.arrangementOrigin.y,Oe=0,oe>=le&&(oe-=le),le=Pt=0,It=Math.max(this.cellSize.height,1),Ct=z=0,rn=!0,rt=Qe.alloc(),ri=0;ri<b.length;ri++){var fi=b[ri],$n=this.ni(fi,ne),In=Zc(fi,fi.locationObject,fi.locationSpot,re);if(0<Oe)switch(Le){case vh:Pi=(Pi-Ye-($n.width-In.x))/Ce,Pi=tt.$(Math.round(Pi),Pi)?Math.round(Pi):Math.floor(Pi),Pi=Pi*Ce+Ye;break;default:Pi=(Pi-Ye+In.x)/Ce,Pi=tt.$(Math.round(Pi),Pi)?Math.round(Pi):Math.ceil(Pi),Pi=Pi*Ce+Ye}else switch(Le){case vh:Pt=Pi+In.x+$n.width;break;default:Pt=Pi-In.x}switch(Le){case vh:var ur=-(Pi+In.x)+Pt;break;default:ur=Pi+$n.width-In.x-Pt}if(0<ue&&Oe>ue-1||0<oe&&0<Oe&&ur>oe){for(E.push(new vn(0,rn?vt-z:vt,oe+pe,Ct+z+Pe)),Pi=0;Pi<Oe&&ri!==Oe;Pi++){ur=b[ri-Oe+Pi];var Ji=Zc(ur,ur.locationObject,ur.locationSpot,rt);ur.moveTo(ur.position.x,ur.position.y+z-Ji.y)}Ct+=Pe,vt=rn?vt+Ct:vt+(Ct+z),Oe=Ct=z=0,Pi=Ye,rn=!1}switch(Pi===Ye&&(le=Le===vh?Math.max(le,$n.width-In.x):Math.min(le,-In.x)),z=Math.max(z,In.y),Ct=Math.max(Ct,$n.height-In.y),isFinite(It)&&(Ct=Math.max(Ct,Math.max($n.height,It)-In.y)),rn?fi.moveTo(Pi-In.x,vt-In.y):fi.moveTo(Pi-In.x,vt),Le){case vh:Pi-=In.x+pe;break;default:Pi+=$n.width-In.x+pe}Oe++}if(E.push(new vn(0,vt,oe+pe,(rn?Ct:Ct+z)+Pe)),b.length!==Oe)for(oe=0;oe<Oe;oe++)ue=b[b.length-Oe+oe],pe=Zc(ue,ue.locationObject,ue.locationSpot,re),ue.moveTo(ue.position.x,ue.position.y+z-pe.y);if(Qe.free(re),Qe.free(rt),Le===vh)for(b=0;b<E.length;b++)z=E[b],z.width+=le,z.x-=le;else for(b=0;b<E.length;b++)z=E[b],z.x>le&&(z.width+=z.x-le,z.x=le);vn.free(ne)}for(re=z=ne=b=0;re<E.length;re++)oe=E[re],b=Math.min(b,oe.x),ne=Math.min(ne,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===vh?this.commitLayers(E,new Qe(b+y/2-(z+b),ne-x/2)):this.commitLayers(E,new Qe(b-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ds.prototype.commitLayers=function(){};function uS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ve.Object.defineProperties(Ds.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!==Bp&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==s0&&a!==vh||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==oy&&a!==l0&&a!==kp&&a!==u0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new mn(Ds,"Position",0),Bp=new mn(Ds,"Location",1),s0=new mn(Ds,"LeftToRight",2),vh=new mn(Ds,"RightToLeft",3),oy=new mn(Ds,"Forward",4),l0=new mn(Ds,"Reverse",5),kp=new mn(Ds,"Ascending",6),u0=new mn(Ds,"Descending",7);Ds.className="GridLayout",Ds.standardComparer=uS,Ds.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},Ds.Position=a0,Ds.Location=Bp,Ds.LeftToRight=s0,Ds.RightToLeft=vh,Ds.Forward=oy,Ds.Reverse=l0,Ds.Ascending=kp,Ds.Descending=u0;function Io(){this.On=new Bn,this.Dn=new Bn,this.Pa=new Bn,this.cf=new wi,this.bf=new wi,this.aj=new wi,this.H=null,this.tp=!1}be=Io.prototype,be.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},be.Xe=function(a){this.H=a},be.oi=function(a){if(a instanceof li){if(this.On.add(a),a instanceof cr){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 Kn?this.Dn.add(a):a instanceof lo||this.Pa.add(a);y=a.data,y===null||a instanceof lo||(a instanceof Kn?this.bf.add(y,a):this.cf.add(y,a))},be.pc=function(a){if(a.Ej(),a instanceof li){if(this.On.remove(a),a instanceof cr){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 Kn?this.Dn.remove(a):a instanceof lo||this.Pa.remove(a);y=a.data,y===null||a instanceof lo||(a instanceof Kn?this.bf.remove(y):this.cf.remove(y))},be.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 cr)&&St('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 cr||St('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 Kn||St('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Qn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Qn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Qn(),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]);di(y),di(x),di(a)}},Io.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Io.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&&Qf(this.diagram,!1)};function hS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=cS(a,y,E);if(b!==null&&($u(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 e}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}Io.prototype.insertLink=function(){return null},Io.prototype.resolveReferencesForData=function(){},Io.prototype.Ro=function(a){return this.H.model.Ro(a)};function cS(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,ai('No Group template found for category "'+x+'"'),ai(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fS||(fS=!0,ai('No Node template found for category "'+x+'"'),ai(" Using default node template")),y=a.ny))),y}Io.prototype.getLinkCategoryForData=function(){return""},Io.prototype.setLinkCategoryForData=function(){},Io.prototype.setFromNodeForLink=function(){},Io.prototype.setToNodeForLink=function(){},Io.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,ai('No Link template found for category "'+a+'"'),ai(" Using default link template")),x=y.my)),x},Io.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Io.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Io.prototype.ip=function(a){a=this.Lc(a),a!==null&&(ld(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Io.prototype.unresolveReferencesForPart=function(){},Io.prototype.removeDataForLink=function(){},Io.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Io.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof li?a:null)},Io.prototype.findLinkForKey=function(){return null},be=Io.prototype,be.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},be.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof li?a:null)},be.Kc=function(a){return a===null?null:this.bf.I(a)},be.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Bn;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 ne=arguments[z];if(hn(ne)&&ay(this,b,ne)){y.add(E);break}}}return y.iterator},be.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Bn;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 ne=arguments[z];if(hn(ne)&&ay(this,b,ne)){y.add(E);break}}}return y.iterator};function ay(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Jt(z)){if(!Jt(b)||b.length<z.length)return!1;for(var ne=0;ne<b.length;ne++){var re=z[ne];if(re!==void 0&&!dS(a,b[ne],re))return!1}}else if(!dS(a,b,z))return!1}return!0}function dS(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(hn(y)&&hn(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}Io.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===Yr){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===ko){var ne=a.newValue;E==="nodeDataArray"&&hn(ne)&&hS(this,ne),y.isModified=!0}else if(x===Yo){var re=a.oldValue;E==="nodeDataArray"&&hn(re)&&this.ip(re),y.isModified=!0}else x===Do&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Yr){var oe=a.propertyName,le=a.object;le===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(le,oe),y.isModified=!0}else if(x===ko||x===Yo){var ue=a.change===ko,pe=ue?a.newParam:a.oldParam,Pe=ue?a.newValue:a.oldValue,Ce=this.aj.I(a.object);if(Array.isArray(Ce))for(a=0;a<Ce.length;a++){var Le=Ce[a];if(ue)Fm(Le,Pe,pe,!0);else if(!(0>pe)){var Oe=pe+dp(Le);Le.pc(Oe,!0),xv(Le,Oe,pe)}}y.isModified=!0}}finally{y.aa=!0}}}}},Io.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)},Io.prototype.rp=function(){for(var a=this.H.model,y=new Bn,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),b.forEach(function(ne){ES(a,ne,!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()},Io.prototype.refreshDataBoundLinks=function(){},Io.prototype.updateRelationshipsFromData=function(){},Io.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 ne=b[z].sx(a);ne!==null&&(x===null&&(x=Qn()),x.push(ne))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);di(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function sy(a,y){var x=y.Hh;if(Jt(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){qd(y,function(ne){ne=ne.O.s;for(var re=ne.length,oe=0;oe<re;oe++)Xg(x,ne[oe])});var E=y.Hh;if(Jt(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}}}}Io.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new wi;if(Jt(a))for(var b=0;b<a.length;b++)h0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new Bn;for(var z=new wi,ne=E.iterator;ne.next();){var re=ne.value;if(re instanceof Kn)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof li&&re.data!==null&&x.Tl()){var oe=re;re=ne.key;var le=re.pg();le!==null&&(le=E.I(le),le!==null?(x.qe(oe.data,x.wa(le.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.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 ue=new wi;E.each(function(pe){pe.key.data!==null&&ue.add(pe.key.data,pe.value.data)}),x(ue,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function h0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Di))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof li){for(var ne=y.linksConnected;ne.next();){var re=ne.value;if(re.fromNode===y){var oe=E.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=E.I(re),re!==null&&(re.toNode=z))}if(y instanceof cr&&z instanceof cr)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,E,b),ne instanceof Kn||ne===null||(ne.containingGroup=z)}else if(y instanceof Kn&&z instanceof Kn)for(ne=y.fromNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.toNode=ne)),y=y.labelNodes;y.next();)ne=h0(a,y.value,x,E,b),ne!==null&&ne instanceof li&&(ne.labeledLink=z);return z}Io.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Kn||(E=b.copyNodeData(E),hn(E)&&(b.xf(E),x=y.Lc(E)))}else $u(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 Kn||(b=y.copyNodeData(E)),hn(b)&&(x.data=b)));return x},Ve.Object.defineProperties(Io.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}}}),Io.prototype.updateAllRelationshipsFromData=Io.prototype.rp,Io.prototype.findLinksByExample=Io.prototype.ls,Io.prototype.findNodesByExample=Io.prototype.ms,Io.prototype.findLinkForData=Io.prototype.Kc,Io.prototype.findNodeForData=Io.prototype.ii,Io.prototype.findPartForData=Io.prototype.Lc,Io.prototype.findNodeForKey=Io.prototype.Vb,Io.prototype.removeModeledPart=Io.prototype.ip,Io.prototype.removeModeledParts=Io.prototype.Gs,Io.prototype.rebuildParts=Io.prototype.Wd;var fS=!1,gS=!1,pS=!1;Io.className="PartManager";function Cs(a){Io.apply(this,arguments)}Ot(Cs,Io),Cs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mS(this,a.linkDataArray)},Cs.prototype.addModeledParts=function(a){for(Io.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Sg(a.value);Qf(this.diagram,!1)};function mS(a,y){y.forEach(function(x){vS(a,x)}),Qf(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){$u(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=g0(x,y,!0);z!==""&&(b.fromPortId=z),z=mu(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof li&&(b.fromNode=z)),z=g0(x,y,!1),z!==""&&(b.toPortId=z),z=mu(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof li&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}Cs.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)})}Cs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Cs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Cs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Cs.prototype.findPartForKey=function(a){var y=Io.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Cs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Cs.prototype.doModelChanged=function(a){var y=this;if(Io.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===Yr){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var ne=this.Vb(a.newValue);z.fromNode=ne}}else if(b==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(b==="linkFromPortId"){var le=this.Kc(a.object);if(le!==null){var ue=a.newValue;typeof ue=="string"&&(le.fromPortId=ue)}}else if(b==="linkToPortId"){var pe=this.Kc(a.object);if(pe!==null){var Pe=a.newValue;typeof Pe=="string"&&(pe.toPortId=Pe)}}else if(b==="nodeGroupKey"){var Ce=this.Lc(a.object);if(Ce!==null){var Le=a.newValue;if(Le!==void 0){var Oe=this.Vb(Le);Oe instanceof cr?Ce.containingGroup=Oe:Ce.containingGroup=null}else Ce.containingGroup=null}}else if(b==="linkLabelKeys"){var rt=this.Kc(a.object);if(rt!==null){var Ye=a.oldValue,vt=a.newValue;Array.isArray(Ye)&&Ye.forEach(function(In){0<=vt.indexOf(In)||(In=y.Vb(In),In!==null&&(In.labeledLink=null))}),Array.isArray(vt)&&vt.forEach(function(In){In=y.Vb(In),In!==null&&(In.labeledLink=rt)})}}else if(b==="linkCategory"){var Pt=this.Kc(a.object),Ct=a.newValue;Pt!==null&&typeof Ct=="string"&&(Pt.category=Ct)}else b==="linkDataArray"&&(yS(this,a.oldValue),mS(this,a.newValue));x.isModified=!0}else if(E===ko){var It=a.newValue;if(b==="linkDataArray"&&typeof It=="object"&&It!==null)vS(this,It);else if(b==="linkLabelKeys"&&Sd(It)){var rn=this.Kc(a.object),ri=this.Vb(It);rn!==null&&ri!==null&&(ri.labeledLink=rn)}x.isModified=!0}else if(E===Yo){var Pi=a.oldValue;if(b==="linkDataArray"&&typeof Pi=="object"&&Pi!==null)this.ip(Pi);else if(b==="linkLabelKeys"&&Sd(Pi)){var fi=this.Vb(Pi);fi!==null&&(fi.labeledLink=null)}x.isModified=!0}}else if(E===Yr){var $n=a.propertyName;a.object!==x.model||$n!=="linkFromKeyProperty"&&$n!=="linkToKeyProperty"&&$n!=="linkFromPortIdProperty"&&$n!=="linkToPortIdProperty"&&$n!=="linkLabelKeysProperty"&&$n!=="nodeIsGroupProperty"&&$n!=="nodeGroupKeyProperty"&&$n!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Cs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Bn,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){BS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&NS(y,z,!1)})},Cs.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 Kn){var b=mu(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=mu(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 Bn().addAll(y);var ne=new Bn;a.labelNodes.each(function(re){re.data!==null&&(re=E.wa(re.data),re!==void 0&&ne.add(re))}),y=ne.copy(),y.hp(b),b=b.copy(),b.hp(ne),(0<y.count||0<b.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),b.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof lo)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof cr)&&(a.containingGroup=y)}}},Cs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Ap(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var ne=E.value;y.lb(ne)?b instanceof cr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=b)):(z.link=this.Kc(ne),z.link!==null&&b instanceof li&&(mu(y,ne,!0)===x&&(z.link.fromNode=b),mu(y,ne,!1)===x&&(z.link.toNode=b),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(re){return function(oe){return oe===x?(b.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}Sh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof cr&&(b.containingGroup=a))}},Cs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof li){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)yh(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&yh(y,x,E.data)),a instanceof cr)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&yh(y,x,E)}}},Cs.prototype.copyPartData=function(a,y){var x=Io.prototype.copyPartData.call(this,a,y);if(a instanceof Kn)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},Cs.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,ne=b.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=ne.archetypeLinkData,E instanceof Kn){if($u(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,b.add(z),a=ne.archetypeLabelNodeData,a instanceof li&&($u(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&&bg(z,E,z.wa(a.data),!0),Mg(z,E,re,!0),x!==null&&bg(z,E,z.wa(x.data),!1),Mg(z,E,y,!1),z.fi(E),a=ne.archetypeLabelNodeData,a===null||a instanceof li||(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},Cs.prototype.findLinkForKey=Cs.prototype.findLinkForKey,Cs.prototype.findPartForKey=Cs.prototype.findPartForKey,Cs.prototype.removeAllModeledParts=Cs.prototype.removeAllModeledParts,Cs.prototype.addModeledParts=Cs.prototype.addModeledParts,Cs.prototype.addAllModeledParts=Cs.prototype.addAllModeledParts,Cs.className="GraphLinksPartManager";function Au(){Io.apply(this,arguments),this.Sg=null}Ot(Au,Io);function c0(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||!wn(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&($u(E),E=E.copy(),E!==null))){var ne=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=ne}}}Au.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Au.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Au.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}},Au.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))},Au.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Au.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Au.prototype.doModelChanged=function(a){if(Io.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===Yr){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),ne=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(ne!==null){var re=ne.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:c0(this,z,ne)}}else if(E==="parentLinkCategory"){var oe=this.ii(a.object),le=a.newValue;if(oe!==null&&typeof le=="string"){var ue=oe.kh();ue!==null&&(ue.category=le)}}y.isModified=!0}}else if(x===Yr){var pe=a.propertyName;a.object===y.model&&pe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Au.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof li&&(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:c0(this,y,a):E!==null&&ld(x,E,!1)))}}},Au.prototype.updateDataBindings=function(a,y){Io.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Au.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Ap(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 li&&y.mh(z)===x&&c0(this,b,this.ii(z))}Sh(y,x)}a=y.mh(a),a!==void 0&&b instanceof li&&(a=this.Vb(a),c0(this,a,b))}},Au.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof li){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(Yo,"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)&&yh(y,x,b)}},Au.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},Au.prototype.findLinkForKey=Au.prototype.findLinkForKey,Au.className="TreePartManager";function Li(a,y){this.kl=new Bn,this.il=new Bn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,_r(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new wi,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 wi,this.Lt=new An,this.Wg=!1,this.o=null,this.undoManager=new Oo,a!==void 0&&(Jt(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Li.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},Li.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Li.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Li.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)+":"+Ri(b)}}return y},Li.prototype.xA=function(a){a.change!==Do&&St("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Er?(xS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Li.prototype.Qv=function(a,y){var x=this,E=!1,b=new Bn,z=new Bn,ne=new Bn,re=this.vh;a.changes.each(function(pe){pe.model===x&&(pe.modelChange==="nodeDataArray"?pe.change===ko?b.add(pe.newValue):pe.change===Yo&&ne.add(pe.oldValue):x.lb(pe.object)?z.add(pe.object):pe.change!==Yr||x.modelData!==pe.object&&pe.propertyName!=="modelData"?pe.object!==null&&(re&&re.contains(pe.object)?re.get(pe.object).each(function(Pe){x.lb(Pe)&&z.add(Pe)}):pe.object instanceof Li||x.ri()&&x.Jc(pe.object)||PS(x,pe.object).each(function(Pe){z.add(Pe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(pe){oe.add(x.wa(pe)),y||z.add(pe)});var le=this.kl;le.clear(),ne.each(function(pe){le.add(x.wa(pe)),y&&z.add(pe)}),a=x.cloneDeep(z.Fa());var ue=null;return E&&(ue===null&&(ue={}),ue.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ue===null&&(ue={}),y?ue.removedNodeKeys=oe.Fa():ue.insertedNodeKeys=oe.Fa()),0<a.length&&(ue===null&&(ue={}),ue.modifiedNodeData=a),0<le.count&&(ue===null&&(ue={}),y?ue.insertedNodeKeys=le.Fa():ue.removedNodeKeys=le.Fa()),le.clear(),oe.clear(),ue},Li.prototype.cloneDeep=function(a){return Eg(this,a,!0)};function Eg(a,y,x,E,b,z){function ne(pe,Pe){re?(pe.__gohashid===void 0&&z.push(pe),E.set(pe,Pe)):(pe=Po++,E.set(pe,Pe),b.set(pe,y))}if(!hn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new wi),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new wi),oe=b.iterator;oe.next();){var le=oe.key;if(oe.value===y&&(le=E.get(le)))return le}if(Array.isArray(y)){oe=[],ne(y,oe);for(var ue=0;ue<y.length;ue++)oe.push(Eg(a,y[ue],!1,E,b,z))}else if(y instanceof Qe||y instanceof qn||y instanceof vn||y instanceof Ti||y instanceof bi)oe=y.copy(),ne(y,oe);else{if(y instanceof Ao||y instanceof Pn||y instanceof mn)return y;if(y instanceof An)oe=new An().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Bn)oe=new Bn().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof wi)oe=new wi().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),ne(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),ne(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),ne(y,oe);else for(ue in oe={},ne(y,oe),y)ue!=="__gohashid"&&(oe[ue]=Eg(a,y[ue],!1,E,b,z))}return x&&z.forEach(function(pe){delete pe.__gohashid}),oe}be=Li.prototype,be.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},be.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},be.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,hn(y)&&(a.dm(y),a.modelData=y)}be.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": `+yd(this,this.nodeDataArray,!0)},be.kv=function(a){SS(this,a),a=a.nodeDataArray,Jt(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 ne=E.get(b);ne===null?(ne=new Bn,ne.add(z),E.add(b,ne)):ne.add(z)}}var E=a.vh;E===null&&(E=new wi,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Yr?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===ko||z===Yo)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function PS(a,y){for(var x=new Bn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];d0(a,y,b,b,x)}return x}function d0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var ne=x[z];if(ne===y)return b.add(E),!0;if(d0(a,y,ne,E,b))return!0}else if(hn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ne=x[z],ne===y)return b.add(E),!0;if(d0(a,y,ne,E,b))return!0}return!1}be.Pv=function(a,y){var x=this,E=!1,b=new Bn,z=new Bn,ne=new Bn,re=this.vh;a.changes.each(function(ue){ue.model===x&&(ue.modelChange==="nodeDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Yo&&ne.add(ue.oldValue):x.lb(ue.object)?z.add(ue.object):ue.change!==Yr||x.modelData!==ue.object&&ue.propertyName!=="modelData"?ue.object!==null&&(re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){x.lb(pe)&&z.add(pe)}):ue.object instanceof Li||x.ri()&&x.Jc(ue.object)||PS(x,ue.object).each(function(pe){z.add(pe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(x.wa(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(x.wa(ue)),y&&z.add(ue)}),a="",E&&(a+=`,
|
|
|
"modelData": `+uy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+yd(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+yd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Wv:this.Yv)+yd(this,le.Fa(),!0)),le.clear(),oe.clear(),a},be.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)&&St("applyIncrementalJson cannot change Model properties"),SS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new wi;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],ne=this.wa(z);ne!=null&&E.set(ne,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){ne=y[z];var re=this.hc(ne);re===null&&(re=(re=E.get(ne))?re:this.copyNodeData({}),this.km(re,ne),this.xf(re))}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 oe in b)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,b[oe]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,oe=0;oe<x;oe++)y=this.hc(a[oe]),y!==null&&this.cm(y)},be.$x=function(a,y){a.change!==Do&&St("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Er?(y===void 0&&(y=Tp(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 }'},be.yA=function(a,y){return this.$x(a,y)},be.np=function(a){return a===void 0&&(a=Tp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},be.toJSON=function(a){return this.np(a)},be.Zw=function(a){var y=null;if(typeof a=="string")try{y=nt.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:St("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&St("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},be.Ky=function(a){return this.Zw(a)},Li.constructGraphLinksModel=function(){return new Li},be=Li.prototype,be.dm=function(a){if(Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(hn(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:St("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(hn(a)){for(y in a)if(x=a[y],hn(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 An,E=0;E<x.length/2;E++)b.add(new Qe(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return kx(a)}return a},be.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()):Jt(a)?yd(this,a):hn(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function yd(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Si;b.add("["),x&&1<E&&b.add(`
|
|
|
`);for(var z=0;z<E;z++){var ne=y[z];ne!==void 0&&(0<z&&(b.add(","),x&&b.add(`
|
|
|
`)),b.add(a.sm(ne)))}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 ml(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof Qe)y={class:"go.Point",x:ml(x.x),y:ml(x.y)};else if(x instanceof qn)y={class:"go.Size",width:ml(x.width),height:ml(x.height)};else if(x instanceof vn)y={class:"go.Rect",x:ml(x.x),y:ml(x.y),width:ml(x.width),height:ml(x.height)};else if(x instanceof Ti)y={class:"go.Margin",top:ml(x.top),right:ml(x.right),bottom:ml(x.bottom),left:ml(x.left)};else if(x instanceof bi)x.sb()?y={class:"go.Spot",x:ml(x.x),y:ml(x.y),offsetX:ml(x.offsetX),offsetY:ml(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ao){if(y={class:"go.Brush",type:x.type.name},x.type===jc?y.color=x.color:(x.type===mc||x.type===Bu)&&(y.start=x.start,y.end=x.end,x.type===Bu&&(x.startRadius!==0&&(y.startRadius=ml(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ml(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof Pn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ml(x.startX)),x.startY!==0&&(y.startY=ml(x.startY)),x.endX!==0&&(y.endX=ml(x.endX)),x.endY!==0&&(y.endY=ml(x.endY)),x.spot1.D(cs)||(y.spot1=x.spot1),x.spot2.D(ys)||(y.spot2=x.spot2),x.type===Pn.o&&(y.path=Pn.ia(x))):x instanceof mn&&(y={class:"go.EnumValue",classType:Tp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Ga(y,b);if(!wS(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof An){var ne="[";for(z=z.iterator;z.next();){var re=z.value;1<ne.length&&(ne+=","),ne+=a.sm(re.x),ne+=",",ne+=a.sm(re.y)}ne+="]",E+=ne}else E+=a.sm(z)}return E+"}"}function vl(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 Qe(vl(a.x),vl(a.y));else if(y==="Size")x=new qn(vl(a.width),vl(a.height));else if(y==="Rect")x=new vn(vl(a.x),vl(a.y),vl(a.width),vl(a.height));else if(y==="Margin")x=new Ti(vl(a.top),vl(a.right),vl(a.bottom),vl(a.left));else if(y==="Spot")typeof a.enum=="string"?x=rd(a.enum):x=new bi(vl(a.x),vl(a.y),vl(a.offsetX),vl(a.offsetY));else if(y==="Brush"){if(x=new Ao,x.type=_n(Ao,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof bi&&(x.start=a.start),a.end instanceof bi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=vl(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=vl(a.endRadius)),a=a.colorStops,hn(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Pn.parse(a.path):x=new Pn,x.type=_n(Pn,a.type),typeof a.startX=="number"&&(x.startX=vl(a.startX)),typeof a.startY=="number"&&(x.startY=vl(a.startY)),typeof a.endX=="number"&&(x.endX=vl(a.endX)),typeof a.endY=="number"&&(x.endY=vl(a.endY)),a.spot1 instanceof bi&&(x.spot1=a.spot1),a.spot2 instanceof bi&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=cy(E),typeof E=="function"&&(x=_n(E,a.name)));return x}be.Pe=function(a){return this.Lt.add(a),this},be.ik=function(a){this.Lt.remove(a)},be.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)},be.cb=function(a,y,x,E,b,z,ne){hs(this,"",a,y,x,E,b,z,ne)},be.g=function(a,y,x,E,b){hs(this,"",Yr,a,this,y,x,E,b)},be.Fs=function(a,y,x,E,b,z){hs(this,"",Yr,y,a,x,E,b,z)};function hs(a,y,x,E,b,z,ne,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var le=new Oi;le.model=a,le.change=x,le.modelChange=y,le.propertyName=E,le.object=b,le.oldValue=z,le.oldParam=re,le.newValue=ne,le.newParam=oe,a.ds(le)}Li.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Yr){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)),la(x,E,b)}else a.change===ko?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,hn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&ui(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&si(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Jt(E)&&a.propertyName&&(E=Ga(a.object,a.propertyName)),Jt(E)&&typeof x=="number"&&(a=a.newValue,y?ui(E,x):si(E,x,a))):St("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Yo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,hn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&si(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&ui(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Jt(E)&&a.propertyName&&(E=Ga(a.object,a.propertyName)),Jt(E)&&typeof x=="number"&&(a=a.oldValue,y?si(E,x,a):ui(E,x))):St("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Do&&St("unknown ChangedEvent: "+a.toString())},Li.prototype.Ea=function(a){return this.undoManager.Ea(a)},Li.prototype.eb=function(a){return this.undoManager.eb(a)},Li.prototype.Kf=function(){return this.undoManager.Kf()},Li.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},be=Li.prototype,be.La=function(a,y){y===void 0&&(y=""),hs(this,"SourceChanged",Do,y,a,null,null)},be.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("Key value for node data "+a+" is not a number or a string: "+y)}}},be.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E!==y&&this.hc(y)===null&&(la(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),hs(this,"nodeKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else la(a,x,y)}};function Sd(a){return typeof a=="number"||typeof a=="string"}be.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},be.hc=function(a){return a===null&&St("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Sd(a)?this.kb.I(a):null},be.$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))){la(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;la(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;la(a,y,x)}}}}},be.xf=function(a){a!==null&&(co(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&&St("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,si(a.Tc,E,y)),hs(a,"nodeDataArray",ko,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}be.Fy=function(a){if(Jt(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)},be.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){e: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 e}E=-1}if(0>E)return;ui(a.Tc,E)}hs(a,"nodeDataArray",Yo,"nodeDataArray",a,y,null,E,null),a.qp(y)}be.nA=function(a){if(Jt(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)},be.$z=function(a){if(a!==this.nodeDataArray&&Jt(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],ne=this.wa(z);if(ne!==void 0){x.add(ne);var re=this.hc(ne);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,ne),this.xf(z)))}else ne=this.cloneDeep(z),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},be.jp=function(a,y){y!==void 0&&(a=Ap(this,a),a instanceof Bn&&this.Vf.add(y,a))},be.Lv=function(){},be.fm=function(){},be.em=function(){},be.qp=function(){};function yh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Bn,a.Vf.add(y,E)),E.add(x)}}function Sh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Bn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Ap(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Bn?a:null)}be.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Li.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),hn(a)&&_r(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=f0(a,y[x],a.copiesArrayObjects);E.push(b)}return _r(E),E}if(x&&hn(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=Ga(y,E),ne=Tp(a,z);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||z instanceof Li||z instanceof Oo||z instanceof Er||z instanceof Oi||(z=f0(a,z,!1)),la(x,E,z)}return _r(x),x}return y instanceof Qe||y instanceof qn||y instanceof vn||y instanceof bi||y instanceof Ti?y.copy():y}Li.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 jt&&(bS=!0,ai('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),ai(" Is that really your intent?"));var E=Ga(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},be=Li.prototype,be.set=function(a,y,x){this.setDataProperty(a,y,x)},be.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])}},be.Ay=function(a,y){this.ts(a,-1,y)},be.ts=function(a,y,x){0>y&&(y=a.length),si(a,y,x),hs(this,"",ko,"",a,null,x,null,y)},be.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&St("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ui(a,y),hs(this,"",Yo,"",a,x,null,y,null)},be.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Ga(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForNodeData found a non-string category for "+a+": "+y)},be.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"nodeCategory",Yr,x,a,E,y))}else la(a,x,y)}},be.lm=function(a,y){this.jm(y,this.Ro(a))},be.Tl=function(){return!1},be.Wj=function(){return!1},be.ri=function(){return!1},be.xs=function(){return!1},be.Xj=function(){return!1};function hy(){return new Li}function Tp(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 Tp(a,y.constructor);return typeof y}function cy(a){return ah[a]?ah[a]:nt.go!==void 0&&nt.go[a]?nt.go[a]:null}function Ga(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 la(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){}}Ve.Object.defineProperties(Li.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===""&&St("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&St("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];hn(b)||St("Model.nodeDataArray must only contain Objects, not: "+b),co(b)}for(this.Tc=a,E=new An,b=0;b<x;b++){var z=a[b],ne=this.wa(z);ne===void 0||this.kb.I(ne)!==null?E.add(z):this.kb.add(ne,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(hs(this,"nodeDataArray",Yr,"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"}}}),Li.prototype.setCategoryForNodeData=Li.prototype.jm,Li.prototype.getCategoryForNodeData=Li.prototype.Ro,Li.prototype.removeArrayItem=Li.prototype.ov,Li.prototype.insertArrayItem=Li.prototype.ts,Li.prototype.addArrayItem=Li.prototype.Ay,Li.prototype.assignAllDataProperties=Li.prototype.Do,Li.prototype.set=Li.prototype.set,Li.prototype.clearUnresolvedReferences=Li.prototype.Qy,Li.prototype.mergeNodeDataArray=Li.prototype.$z,Li.prototype.removeNodeDataCollection=Li.prototype.nA,Li.prototype.removeNodeData=Li.prototype.cm,Li.prototype.addNodeDataCollection=Li.prototype.Fy,Li.prototype.addNodeData=Li.prototype.xf,Li.prototype.makeNodeDataKeyUnique=Li.prototype.$u,Li.prototype.findNodeDataForKey=Li.prototype.hc,Li.prototype.containsNodeData=Li.prototype.lb,Li.prototype.setKeyForNodeData=Li.prototype.km,Li.prototype.getKeyForNodeData=Li.prototype.wa,Li.prototype.updateTargetBindings=Li.prototype.La,Li.prototype.commit=Li.prototype.commit,Li.prototype.rollbackTransaction=Li.prototype.Kf,Li.prototype.commitTransaction=Li.prototype.eb,Li.prototype.startTransaction=Li.prototype.Ea,Li.prototype.raiseDataChanged=Li.prototype.Fs,Li.prototype.raiseChanged=Li.prototype.g,Li.prototype.raiseChangedEvent=Li.prototype.cb,Li.prototype.removeChangedListener=Li.prototype.ik,Li.prototype.addChangedListener=Li.prototype.Pe,Li.prototype.writeJsonValue=Li.prototype.sm,Li.prototype.replaceJsonObjects=Li.prototype.dm,Li.prototype.applyIncrementalJSON=Li.prototype.Ky,Li.prototype.applyIncrementalJson=Li.prototype.Zw,Li.prototype.toJSON=Li.prototype.toJSON,Li.prototype.toJson=Li.prototype.np,Li.prototype.toIncrementalJSON=Li.prototype.yA,Li.prototype.toIncrementalJson=Li.prototype.$x,Li.prototype.toIncrementalData=Li.prototype.xA,Li.prototype.clear=Li.prototype.clear;var bS=!1,ah={};Li.className="Model",Li.fromJSON=Li.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=nt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:St("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=cy(E)):(b=cy(E),b===null&&(b=nt[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Li?y=a:St("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Li.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Li.safePropertyValue=Ga,Li.safePropertySet=la,ah.Brush=Ao,ah.ChangedEvent=Oi,ah.Geometry=Pn,ah.Margin=Ti,ah.Panel=Gn,ah.Point=Qe,ah.Rect=vn,ah.Size=qn,ah.Spot=bi,ah.Transaction=Er,ah.UndoManager=Oo;function Xa(a,y,x,E){_r(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=Dp,this.wk=E),this.st=new Bn}Xa.prototype.copy=function(){var a=new Xa;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},be=Xa.prototype,be.qb=function(a){a.classType===Xa&&(this.mode=a)},be.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},be.freeze=function(){return this._isFrozen=!0,this},be.ka=function(){return this._isFrozen=!1,this},be.Kx=function(a){return a===void 0&&(a=null),this.mode=Dp,this.backConverter=a,this},be.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},be.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)}be.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==="")ai("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Ga(y,E)),z!==void 0)if(b===null)x!==""&&la(a,x,z);else try{if(x!==""){var ne=b(z,a);la(a,x,ne)}else b(z,a)}catch(re){}}}},be.sp=function(a,y,x,E){if(this.el===Dp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,ne=a;if(b!==""&&(ne=Ga(a,b)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=E!==null?E.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,ne):la(y,x,ne);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var le=E.itemIndex,ue=E.panel.itemArray;oe.ov(ue,le),oe.ts(ue,le,ne)}}else try{if(x!==""){var pe=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,pe):la(y,x,pe)}else{var Pe=z(ne,y,oe);if(Pe!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Ce=E.itemIndex,Le=E.panel.itemArray;oe.ov(Le,Ce),oe.ts(Le,Ce,Pe)}}}catch(Oe){}}finally{this.st.remove(a)}}}},Ve.Object.defineProperties(Xa.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&gn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&gn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&gn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&gn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&gn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&gn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&gn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&gn(this),this.el=a}}}),Xa.prototype.updateSource=Xa.prototype.sp,Xa.prototype.updateTarget=Xa.prototype.Mv,Xa.prototype.ofModel=Xa.prototype.dA,Xa.prototype.ofObject=Xa.prototype.cp,Xa.prototype.makeTwoWay=Xa.prototype.Kx;var Ax="Binding",LS=new mn(Xa,"OneWay",1),Dp=new mn(Xa,"TwoWay",2);Xa.className="Binding",Xa.parseEnum=function(a,y){return function(x){return x=_n(a,x),x===null?y:x}},Xa.toString=Ri,Xa.OneWay=LS,Xa.TwoWay=Dp;function to(a,y,x){Li.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Bn,this.wb=new wi,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&&(Jt(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ot(to,Li),to.constructGraphLinksModel=Li.constructGraphLinksModel,to.prototype.cloneProtected=function(a){Li.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},be=to.prototype,be.clear=function(){Li.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},be.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)+":"+Ri(b)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+mu(this,b,!0)+"-->"+mu(this,b,!1)}return y},be.Qv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Li.prototype.Qv.call(this,a,y),E=this,b=new Bn,z=new Bn,ne=new Bn,re=this.vh;a.changes.each(function(ue){ue.model===E&&(ue.modelChange==="linkDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Yo&&ne.add(ue.oldValue):E.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ue.object instanceof Li||E.lb(ue.object)||FS(E,ue.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(E.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(E.Ac(ue)),y&&z.add(ue)}),a=E.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<le.count&&(x===null&&(x={}),y?x.insertedLinkKeys=le.Fa():x.removedLinkKeys=le.Fa()),le.clear(),oe.clear(),x},be.rm=function(){var a=Li.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},be.gp=function(a){Li.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)},be.Rv=function(){var a=Li.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+yd(this,this.linkDataArray,!0);return a+y},be.kv=function(a){Li.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 Bn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];d0(a,y,b,b,x)}return x}be.Pv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Li.prototype.Pv.call(this,a,y),E=this,b=new Bn,z=new Bn,ne=new Bn,re=this.vh;a.changes.each(function(ue){ue.model===E&&(ue.modelChange==="linkDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Yo&&ne.add(ue.oldValue):E.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ue.object instanceof Li||E.lb(ue.object)||FS(E,ue.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(E.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(E.Ac(ue)),y&&z.add(ue)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+yd(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+yd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Vv:this.Xv)+yd(this,le.Fa(),!0)),le.clear(),oe.clear(),a},be.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)&&St("applyIncrementalJson cannot change Model properties"),Li.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 ne in b)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(z,ne,b[ne]);kS(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},to.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Yr){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),la(x,E,b);return}}else if(a.change===ko){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,hn(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===Yo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,hn(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}}Li.prototype.changeState.call(this,a,y)}},be=to.prototype,be.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),la(x,this.nodeKeyProperty,a),this.xf(x))}return a}},be.yx=function(a){return mu(this,a,!0)},be.wv=function(a,y){bg(this,a,y,!0)},be.Bx=function(a){return mu(this,a,!1)},be.Bv=function(a,y){bg(this,a,y,!1)};function mu(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Ga(y,a),a!==void 0))){if(Sd(a))return a;St((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bg(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=Ga(y,b);z!==x&&(Sh(a,z,y),la(y,b,x),a.hc(x)===null&&yh(a,x,y),hs(a,E?"linkFromKey":"linkToKey",Yr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else la(y,b,x)}}be.zx=function(a){return g0(this,a,!0)},be.xv=function(a,y){Mg(this,a,y,!0)},be.Cx=function(a){return g0(this,a,!1)},be.Cv=function(a,y){Mg(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Ga(y,a),y===void 0?"":y)}function Mg(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Ga(y,b);z===void 0&&(z=""),z!==x&&(la(y,b,x),hs(a,E?"linkFromPortId":"linkToPortId",Yr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else la(y,b,x)}}be.Ef=function(a){if(a===null)return p0;var y=this.je;return y===""?p0:(a=Ga(a,y),a===void 0?p0:a)},be.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Ga(a,x);if(E===void 0&&(E=p0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)Sh(this,E[z],a);for(la(a,x,y),b=y.length,z=0;z<b;z++){var ne=y[z];this.hc(ne)===null&&yh(this,ne,a)}hs(this,"linkLabelKeys",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else la(a,x,y)}},be.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Ga(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&&yh(this,y,a),hs(this,"linkLabelKeys",ko,x,a,null,y,null,b)))}else St(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},be.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Ga(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(Sh(this,y,a),hs(this,"linkLabelKeys",Yo,x,a,y,null,b,null)))}else E!==void 0&&St(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},be.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("Key value for link data "+a+" is not a number or a string: "+y)}}},be.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Ga(a,x);E!==y&&this.jh(y)===null&&(la(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),hs(this,"linkKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},be.jh=function(a){return a===null&&St("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Sd(a)?this.wb.I(a):null},be.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))){la(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;la(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;la(a,y,x)}}}}},be.Jc=function(a){return a===null?!1:this.$f.contains(a)},be.fi=function(a){a!==null&&(co(a),this.Jc(a)||NS(this,a,!0))};function NS(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&&St("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)),hs(a,"linkDataArray",ko,"linkDataArray",a,null,y,null,E),dy(a,y)}be.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)},be.bm=function(a){a!==null&&BS(this,a,!0)};function BS(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(hs(a,"linkDataArray",Yo,"linkDataArray",a,y,null,E,null),x=mu(a,y,!0),Sh(a,x,y),x=mu(a,y,!1),Sh(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],Sh(a,x,y)}be.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)},be.Zz=function(a){if(this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Jt(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],ne=this.Ac(z);if(ne!==void 0){x.add(ne);var re=this.jh(ne);re!==z&&(re!==null?(this.Do(re,z),kS(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,ne),this.fi(z)))}else ne=this.cloneDeep(z),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function dy(a,y){var x=mu(a,y,!0);x=a.Vl(x),a.hc(x)===null&&yh(a,x,y),x=mu(a,y,!1),x=a.Vl(x),a.hc(x)===null&&yh(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&&yh(a,x,y)}be.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),hn(a)&&(_r(a),this.lf!==""&&la(a,this.lf,void 0),this.mf!==""&&la(a,this.mf,void 0),this.je!==""&&la(a,this.je,[])),a},be.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Ga(a,y)},be.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},be.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E!==y&&(Sh(this,E,a),la(a,x,y),this.hc(y)===null&&yh(this,y,a),hs(this,"nodeGroupKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},to.prototype.copyNodeData=function(a){return a===null?null:(a=Li.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Ga(a,this.Je)===void 0||la(a,this.Je,void 0),a)},to.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){bg(this,a,x,!0);return}if(y===this.linkToKeyProperty){bg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Mg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Mg(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=Ga(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},be=to.prototype,be.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&&Ga(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},be.jp=function(a,y){Li.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(mu(this,E,!0)===b){var ne=this.lf;la(E,ne,z),hs(this,"linkFromKey",Yr,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)}if(mu(this,E,!1)===b&&(ne=this.mf,la(E,ne,z),hs(this,"linkToKey",Yr,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)),ne=this.Ef(E),Array.isArray(ne))for(var re=ne.length,oe=this.je,le=0;le<re;le++)ne[le]===b&&(ne[le]=z,hs(this,"linkLabelKeys",ko,oe,E,b,z,le,le))}},be.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;la(a,E,x),hs(this,"nodeGroupKey",Yr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},be.Lv=function(){Li.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},be.fm=function(a){Li.prototype.fm.call(this,a),a=this.wa(a);var y=Ap(this,a);if(y!==null){var x=Qn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;hs(this,"nodeGroupKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(mu(this,E,!0)===a&&(b=this.lf,hs(this,"linkFromKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),mu(this,E,!1)===a&&(b=this.mf,hs(this,"linkToKey",Yr,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,ne=this.je,re=0;re<z;re++)b[re]===a&&(hs(this,"linkLabelKeys",ko,ne,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)Sh(this,a,x[y]);di(x)}},be.em=function(a){Li.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&yh(this,y,a)},be.qp=function(a){Li.prototype.qp.call(this,a);var y=this.lh(a);Sh(this,y,a)},be.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Ga(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForLinkData found a non-string category for "+a+": "+y)},to.prototype.getLinkCategoryForData=function(a){return this.ps(a)},to.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Ga(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"linkCategory",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},to.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},be=to.prototype,be.lm=function(a,y){Li.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))}be.Wj=function(){return!0},be.ri=function(){return!0},be.xs=function(){return!0},be.Xj=function(){return!0},Ve.Object.defineProperties(to.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];hn(b)||St("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),co(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new An,b=0;b<x;b++){var z=a[b],ne=this.Ac(z);ne===void 0||this.wb.I(ne)!==null?E.add(z):this.wb.add(ne,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 Bn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,hs(this,"linkDataArray",Yr,"linkDataArray",this,y,a),y=0;y<x;y++)dy(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"}}}),to.prototype.setCategoryForLinkData=to.prototype.lp,to.prototype.getCategoryForLinkData=to.prototype.ps,to.prototype.assignAllDataProperties=to.prototype.Do,to.prototype.setGroupKeyForNodeData=to.prototype.mp,to.prototype.getGroupKeyForNodeData=to.prototype.lh,to.prototype.isGroupForNodeData=to.prototype.Yu,to.prototype.copyLinkData=to.prototype.Jo,to.prototype.mergeLinkDataArray=to.prototype.Zz,to.prototype.removeLinkDataCollection=to.prototype.lA,to.prototype.removeLinkData=to.prototype.bm,to.prototype.addLinkDataCollection=to.prototype.Ey,to.prototype.addLinkData=to.prototype.fi,to.prototype.containsLinkData=to.prototype.Jc,to.prototype.makeLinkDataKeyUnique=to.prototype.Bs,to.prototype.findLinkDataForKey=to.prototype.jh,to.prototype.setKeyForLinkData=to.prototype.Ks,to.prototype.getKeyForLinkData=to.prototype.Ac,to.prototype.removeLabelKeyForLinkData=to.prototype.Qx,to.prototype.addLabelKeyForLinkData=to.prototype.Bu,to.prototype.setLabelKeysForLinkData=to.prototype.Ls,to.prototype.getLabelKeysForLinkData=to.prototype.Ef,to.prototype.setToPortIdForLinkData=to.prototype.Cv,to.prototype.getToPortIdForLinkData=to.prototype.Cx,to.prototype.setFromPortIdForLinkData=to.prototype.xv,to.prototype.getFromPortIdForLinkData=to.prototype.zx,to.prototype.setToKeyForLinkData=to.prototype.Bv,to.prototype.getToKeyForLinkData=to.prototype.Bx,to.prototype.setFromKeyForLinkData=to.prototype.wv,to.prototype.getFromKeyForLinkData=to.prototype.yx,to.prototype.clear=to.prototype.clear;var p0=Object.freeze([]);to.className="GraphLinksModel",ah.GraphLinksModel=to,Li.constructGraphLinksModel=Li.constructGraphLinksModel=function(){return new to},Li.initDiagramModel=hy=function(){return new to};function yl(a,y){Li.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Jt(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ot(yl,Li),yl.constructGraphLinksModel=Li.constructGraphLinksModel,yl.prototype.cloneProtected=function(a){Li.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},be=yl.prototype,be.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)+":"+Ri(b)}}return y},be.rm=function(){var a=Li.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},be.gp=function(a){Li.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},be.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&St("applyIncrementalJson cannot change Model properties"),Li.prototype.fp.call(this,a)},be.Vl=function(a){return a},be.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},be.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=Ga(a,x);E!==y&&(Sh(this,E,a),la(a,x,y),this.hc(y)===null&&yh(this,y,a),hs(this,"nodeParentKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},be.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Ga(a,y),y===void 0)?"":typeof y=="string"?y:(St("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},yl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},yl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"parentLinkCategory",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},yl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},yl.prototype.copyNodeData=function(a){return a===null?null:(a=Li.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Ga(a,this.Ke)===void 0||la(a,this.Ke,void 0),a)},yl.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=Ga(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},be=yl.prototype,be.jp=function(a,y){Li.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},be.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;la(a,E,x),hs(this,"nodeParentKey",Yr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},be.fm=function(a){Li.prototype.fm.call(this,a),a=this.wa(a);var y=Ap(this,a);if(y!==null){var x=Qn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;hs(this,"nodeParentKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)Sh(this,a,x[y]);di(x)}},be.em=function(a){Li.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&yh(this,y,a)},be.qp=function(a){Li.prototype.qp.call(this,a);var y=this.mh(a);Sh(this,y,a)},be.lm=function(a,y){Li.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},be.Tl=function(){return!0},be.xs=function(){return!0},Ve.Object.defineProperties(yl.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"}}}),yl.prototype.setParentLinkCategoryForNodeData=yl.prototype.Ms,yl.prototype.getParentLinkCategoryForNodeData=yl.prototype.ss,yl.prototype.setParentKeyForNodeData=yl.prototype.qe,yl.prototype.getParentKeyForNodeData=yl.prototype.mh,yl.className="TreeModel",ah.TreeModel=yl;function xa(a){da.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=sh,this.Ti=0,this.Zv=new Qe,this.Jp=this.me=0,this.Xr=new jp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=sh,this.K=Sl,this.nd=Fg,this.hd=ry,this.tf=6,this.Nn=w0,a&&Object.assign(this,a)}Ot(xa,da),xa.prototype.cloneProtected=function(a){da.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},xa.prototype.qb=function(a){a.classType===xa?a===x0||a===P0||a===y0||a===S0||a===Fg?this.sorting=a:a===af||a===Lg||a===Sl||a===Pd?this.direction=a:a===Kc||a===xd||a===sh||a===lh?this.arrangement=a:(a===Df||a===w0)&&(this.nodeDiameterFormula=a):da.prototype.qb.call(this,a)},xa.prototype.createNetwork=function(){return new Ng(this)},xa.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 An;y.addAll(a.iterator),a=new An;var x=new An,E=this.sort(y),b,z,ne=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,le=this.radius;(!isFinite(le)||0>=le)&&(le=NaN);var ue=this.aspectRatio;(!isFinite(ue)||0>=ue)&&(ue=1);var pe=this.startAngle;isFinite(pe)||(pe=0);var Pe=this.sweepAngle;if((!isFinite(Pe)||360<Pe||1>Pe)&&(Pe=360),y=this.spacing,isFinite(y)||(y=NaN),re===lh&&oe===Df?re=sh:re===lh&&oe!==Df&&(re=this.arrangement),(this.direction===af||this.direction===Lg)&&this.sorting!==Fg){for(oe=0;!(oe>=E.length)&&(a.add(E.M(oe)),!(oe+1>=E.length));oe+=2)x.add(E.M(oe+1));this.direction===af?(this.arrangement===lh&&a.reverse(),E=new An,E.addAll(a),E.addAll(x)):(this.arrangement===lh&&x.reverse(),E=new An,E.addAll(x),E.addAll(a))}oe=E.length;for(var Ce=z=b=0;Ce<E.length;Ce++){var Le=pe+Pe*z*(this.direction===Sl?1:-1)/oe,Oe=E.M(Ce).diameter;isNaN(Oe)&&(Oe=wd(E.M(Ce),Le)),360>Pe&&(Ce===0||Ce===E.length-1)&&(Oe/=2),b+=Oe,z++}if(isNaN(le)||re===lh){if(isNaN(y)&&(y=6),re!==sh&&re!==lh){for(z=-1/0,ne=0;ne<oe;ne++)Ce=E.M(ne),b=E.M(ne===oe-1?0:ne+1),isNaN(Ce.diameter)&&wd(Ce,0),isNaN(b.diameter)&&wd(b,0),z=Math.max(z,(Ce.diameter+b.diameter)/2);ne=z+y,re===Kc?le=(z+y)/(2*Math.PI/oe):le=m0(this,ne*(360<=Pe?oe:oe-1),ue,pe*Math.PI/180,Pe*Math.PI/180)}else le=m0(this,b+(360<=Pe?oe:oe-1)*(re!==lh?y:1.6*y),ue,pe*Math.PI/180,Pe*Math.PI/180);z=le*ue}else if(z=le*ue,Ce=fy(this,le,z,pe*Math.PI/180,Pe*Math.PI/180),isNaN(y))(re===sh||re===lh)&&(y=(Ce-b)/(360<=Pe?oe:oe-1));else if(re===sh||re===lh)Ce=(Ce-b)/(360<=Pe?oe:oe-1),Ce<y?(le=m0(this,b+y*(360<=Pe?oe:oe-1),ue,pe*Math.PI/180,Pe*Math.PI/180),z=le*ue):y=Ce;else{for(ne=-1/0,b=0;b<oe;b++)Le=E.M(b),Oe=E.M(b===oe-1?0:b+1),isNaN(Le.diameter)&&wd(Le,0),isNaN(Oe.diameter)&&wd(Oe,0),ne=Math.max(ne,(Le.diameter+Oe.diameter)/2);ne+=y,b=m0(this,ne*(360<=Pe?oe:oe-1),ue,pe*Math.PI/180,Pe*Math.PI/180),b>le?(le=b,z=le*ue):ne=Ce/(360<=Pe?oe:oe-1)}if(this.kw=re,this.lc=le,this.Zm=ue,this.lw=pe,this.Wp=Pe,this.Ti=y,this.me=z,this.Jp=ne,y=E,E=this.kw,re=this.lc,le=this.lw,ue=this.Wp,pe=this.Ti,Pe=this.me,oe=this.Jp,this.direction!==af&&this.direction!==Lg||E!==lh)if(this.direction===af||this.direction===Lg){switch(ne=0,E){case xd:ne=180*v0(this,re,Pe,le,oe)/Math.PI;break;case sh:oe=y=0,ne=a.first(),ne!==null&&(y=wd(ne,Math.PI/2)),ne=x.first(),ne!==null&&(oe=wd(ne,Math.PI/2)),ne=180*v0(this,re,Pe,le,pe+(y+oe)/2)/Math.PI;break;case Kc:ne=ue/y.length}if(this.direction===af){switch(E){case xd:Rp(this,a,le,Pd);break;case sh:Ip(this,a,le,Pd);break;case Kc:Op(this,a,ue/2,le,Pd)}switch(E){case xd:Rp(this,x,le+ne,Sl);break;case sh:Ip(this,x,le+ne,Sl);break;case Kc:Op(this,x,ue/2,le+ne,Sl)}}else{switch(E){case xd:Rp(this,x,le,Pd);break;case sh:Ip(this,x,le,Pd);break;case Kc:Op(this,x,ue/2,le,Pd)}switch(E){case xd:Rp(this,a,le+ne,Sl);break;case sh:Ip(this,a,le+ne,Sl);break;case Kc:Op(this,a,ue/2,le+ne,Sl)}}}else switch(E){case xd:Rp(this,y,le,this.direction);break;case sh:Ip(this,y,le,this.direction);break;case Kc:Op(this,y,ue,le,this.direction);break;case lh:AS(this,y,ue,le,this.direction)}else AS(this,y,ue,le-ue/2,Sl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Op(a,y,x,E,b){var z=a.Wp,ne=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=E+(b===Sl?oe*x/(360<=z?re:re-1):-(oe*x)/re),ue=y.M(oe),pe=ne*Math.tan(le)/a;pe=Math.sqrt((ne*ne+a*a*pe*pe)/(1+pe*pe)),ue.centerX=pe*Math.cos(le),ue.centerY=pe*Math.sin(le),ue.actualAngle=180*le/Math.PI}}function Ip(a,y,x,E){var b=a.lc,z=a.me,ne=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe),ue=y.M(oe===re-1?0:oe+1),pe=z*Math.sin(x);le.centerX=b*Math.cos(x),le.centerY=pe,le.actualAngle=180*x/Math.PI,isNaN(le.diameter)&&wd(le,0),isNaN(ue.diameter)&&wd(ue,0),le=v0(a,b,z,E===Sl?x:-x,(le.diameter+ue.diameter)/2+ne),x+=E===Sl?le:-le}}function Rp(a,y,x,E){var b=a.lc,z=a.me,ne=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe);le.centerX=b*Math.cos(x),le.centerY=z*Math.sin(x),le.actualAngle=180*x/Math.PI,le=v0(a,b,z,E===Sl?x:-x,ne),x+=E===Sl?le:-le}}function AS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new jp,360>x){for(z=E+(b===Sl?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,DS(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,ne=a.Ti,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=a.me*Math.sin(E*Math.PI/180),ue=y.Fa();if(ue.length===3)ue[0].centerX=z,ue[0].centerY=0,ue[1].centerX=ue[0].centerX-ue[0].width/2-ue[1].width/2-ne,ue[1].y=ue[0].y,ue[2].centerX=(ue[0].centerX+ue[1].centerX)/2,ue[2].y=ue[0].y-ue[2].height-ne;else if(ue.length===4)ue[0].centerX=z,ue[0].centerY=0,ue[2].centerX=-ue[0].centerX,ue[2].centerY=ue[0].centerY,ue[1].centerX=0,ue[1].y=Math.min(ue[0].y,ue[2].y)-ue[1].height-ne,ue[3].centerX=0,ue[3].y=Math.max(ue[0].y+ue[0].height+ne,ue[2].y+ue[2].height+ne);else{z=Qe.alloc();for(var pe=0;pe<ue.length&&(ue[pe].centerX=oe,ue[pe].centerY=le,!(pe>=ue.length-1));pe++)OS(a,oe,le,ue,pe,b,z)||IS(a,oe,le,ue,pe,b,z),oe=z.x,le=z.y;if(Qe.free(z),a.mj++,!(23<a.mj)){oe=ue[0].centerX,le=ue[0].centerY,z=ue[ue.length-1].centerX,pe=ue[ue.length-1].centerY;var Pe=Math.abs(oe-z)-((ue[0].width+ue[ue.length-1].width)/2+ne),Ce=Math.abs(le-pe)-((ue[0].height+ue[ue.length-1].height)/2+ne);ne=0,1>Math.abs(Ce)?Math.abs(oe-z)<(ue[0].width+ue[ue.length-1].width)/2&&(ne=0):ne=0<Ce?Ce:1>Math.abs(Pe)?0:Pe,oe=Math.abs(z)>Math.abs(pe)?0<z!=le>pe:0<pe!=oe<z,(oe=b===Sl?oe:!oe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ue[ue.length-1].width),ne=Math.min(ne,-ue[ue.length-1].height)),a.Xr.compare(ne,ue),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ue.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*re,TS(a,y,x,E,b))}}}function DS(a,y,x,E,b){for(var z=a.lc,ne=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=ne*Math.sin(E*Math.PI/180),ue=Qe.alloc(),pe=y.Fa(),Pe=0;Pe<pe.length&&(pe[Pe].centerX=oe,pe[Pe].centerY=le,!(Pe>=pe.length-1));Pe++)OS(a,oe,le,pe,Pe,b,ue)||IS(a,oe,le,pe,Pe,b,ue),oe=ue.x,le=ue.y;if(Qe.free(ue),a.mj++,!(23<a.mj)){if(oe=Math.atan2(le,oe),oe=b===Sl?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+ne)/2,ne=a.Xr,Math.abs(z)<Math.abs(ne.Pl))for(ne.Pl=z,ne.mk=[],ne.tm=[],oe=0;oe<pe.length;oe++)ne.mk[oe]=pe[oe].bounds.x,ne.tm[oe]=pe[oe].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*re,DS(a,y,x,E,b))}}function OS(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,le=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ue=!1;if(0<=x!=(z===Sl)){if(z=y+a,z>re){if(z=y-a,z<-re)return ne.x=z,ne.y=le,!1;ue=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.y=le,!1;ue=!0}return le=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ue&&(le=-le),Math.abs(x-le)>(E[b].height+E[b+1].height)/2?(ne.x=z,ne.y=le,!1):(ne.x=z,ne.y=le,!0)}function IS(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,le=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Sl)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ne.x=le,ne.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ne.x=le,ne.y=z;return}E=!0}le=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(le=-le),ne.x=le,ne.y=z}xa.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},xa.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 Qe(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))},xa.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 ne=0,re=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),oe=0,le=0;le<=z;le++){E!==void 0&&b!==void 0?oe=E+le*b/z:oe=le*Math.PI/(2*z);var ue=Math.sin(oe);ne+=Math.sqrt(1-a*a*ue*ue)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function m0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function v0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(E+re*a);if(ne+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,ne>=b)return re*a}}xa.prototype.sort=function(a){switch(this.sorting){case y0:break;case S0:a.reverse();break;case x0:a.sort(this.comparer);break;case P0:a.sort(this.comparer),a.reverse();break;case Fg:return this.ak(Tx(a));default:St("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new An;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var ne=0;ne<a.length;ne++){var re=a.M(ne).edgesCount;re>b&&(b=re,z=ne)}else for(ne=0;ne<a.length;ne++)re=y[ne],re>b&&(b=re,z=ne);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),ne=z.sourceEdges;ne.next();)b=a.indexOf(ne.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}xa.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 ne=[],re=[];E=[],b=new An;for(var oe=0,le=0;le<y.length;le++){var ue=y[le].length;if(ue===1)E.push(le);else if(ue===0)b.add(a.M(le));else{if(oe===0)x.push(le);else{for(var pe=ue=1/0,Pe=-1,Ce=[],Le=0;Le<x.length;Le++)0>y[x[Le]].indexOf(x[Le===x.length-1?0:Le+1])&&Ce.push(Le===x.length-1?0:Le+1);if(Ce.length===0)for(Le=0;Le<x.length;Le++)Ce.push(Le);for(Le=0;Le<Ce.length;Le++){for(var Oe=Ce[Le],rt=y[le],Ye=0,vt=0;vt<ne.length;vt++){var Pt=z[ne[vt]],Ct=z[re[vt]];if(Pt<Ct){var It=Pt;Pt=Ct}else It=Ct;if(It<Oe&&Oe<=Pt)for(Ct=0;Ct<rt.length;Ct++){var rn=rt[Ct];0>x.indexOf(rn)||It<z[rn]&&z[rn]<Pt||It===z[rn]||Pt===z[rn]||Ye++}else for(Ct=0;Ct<rt.length;Ct++)rn=rt[Ct],0>x.indexOf(rn)||It<z[rn]&&z[rn]<Pt&&It!==z[rn]&&Pt!==z[rn]&&Ye++}for(rt=Ye,vt=Ye=0;vt<y[le].length;vt++)It=x.indexOf(y[le][vt]),0<=It&&(It=Math.abs(Oe-(It>=Oe?It+1:It)),Ye+=It<x.length+1-It?It:x.length+1-It);for(vt=0;vt<ne.length;vt++)It=z[ne[vt]],Pt=z[re[vt]],It>=Oe&&It++,Pt>=Oe&&Pt++,It>Pt&&(Ct=Pt,Pt=It,It=Ct),Pt-It<(x.length+2)/2==(It<Oe&&Oe<=Pt)&&Ye++;(rt<ue||rt===ue&&Ye<pe)&&(ue=rt,pe=Ye,Pe=Oe)}for(x.splice(Pe,0,le),ue=0;ue<x.length;ue++)z[x[ue]]=ue;for(ue=0;ue<y[le].length;ue++)pe=y[le][ue],0<=x.indexOf(pe)&&(ne.push(le),re.push(pe))}oe++}}for(ne=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],le=y[oe][0],ue=x.indexOf(le),0<=ue){for(Pe=pe=0;Pe<y[le].length;Pe++)Ce=x.indexOf(y[le][Pe]),0>Ce||Ce===ue||(Le=Ce>ue?Ce-ue:ue-Ce,pe+=Ce<ue!=Le>ne-Le?1:-1);x.splice(0>pe?ue:ue+1,0,oe),E.splice(re,1),re--}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},Ve.Object.defineProperties(xa.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!==lh&&a!==sh&&a!==xd&&a!==Kc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Sl&&a!==Pd&&a!==af&&a!==Lg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==y0&&a!==S0&&a!==x0&&!P0&&a!==Fg||(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!==w0&&a!==Df||(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 sh=new mn(xa,"ConstantSpacing",0),xd=new mn(xa,"ConstantDistance",1),Kc=new mn(xa,"ConstantAngle",2),lh=new mn(xa,"Packed",3),Sl=new mn(xa,"Clockwise",4),Pd=new mn(xa,"Counterclockwise",5),af=new mn(xa,"BidirectionalLeft",6),Lg=new mn(xa,"BidirectionalRight",7),y0=new mn(xa,"Forwards",8),S0=new mn(xa,"Reverse",9),x0=new mn(xa,"Ascending",10),P0=new mn(xa,"Descending",11),Fg=new mn(xa,"Optimized",12),w0=new mn(xa,"Pythagorean",13),Df=new mn(xa,"Circular",14);xa.className="CircularLayout",xa.ConstantSpacing=sh,xa.ConstantDistance=xd,xa.ConstantAngle=Kc,xa.Packed=lh,xa.Clockwise=Sl,xa.Counterclockwise=Pd,xa.BidirectionalLeft=af,xa.BidirectionalRight=Lg,xa.Forwards=y0,xa.Reverse=S0,xa.Ascending=x0,xa.Descending=P0,xa.Optimized=Fg,xa.Pythagorean=w0,xa.Circular=Df;function jp(){this.Pl=-1/0,this.tm=this.mk=null}jp.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},jp.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},jp.className="VertexArrangement";function Ng(a){qo.call(this,a)}Ot(Ng,qo),Ng.prototype.createVertex=function(){return new zp(this)},Ng.prototype.createEdge=function(){return new C0(this)},Ng.className="CircularNetwork";function zp(a){ps.call(this,a),this.u=this.Si=NaN}Ot(zp,ps);function wd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===lh)if(x.nodeDiameterFormula===Df)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===Df?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ve.Object.defineProperties(zp.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),zp.className="CircularVertex";function C0(a){ql.call(this,a)}Ot(C0,ql),C0.className="CircularEdge";function Ks(a){da.call(this),this.ah=null,this.An=0,this.$d=new qn(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)}Ot(Ks,da),Ks.prototype.cloneProtected=function(a){da.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},Ks.prototype.createNetwork=function(){return new Of(this)},Ks.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 ne=E=x.iterator;E=this.arrangementSpacing;var re=ne.count,oe=!0;z=b=0;for(var le=Qn(),ue=0;ue<re+y.vertexes.count+2;ue++)le[ue]=null;re=0,ne.reset();for(var pe=vn.alloc();ne.next();)if(ue=ne.value,this.computeBounds(ue,pe),oe)oe=!1,b=pe.x+pe.width/2,z=pe.y+pe.height/2,le[0]=new Qe(pe.x+pe.width+E.width,pe.y),le[1]=new Qe(pe.x,pe.y+pe.height+E.height),re=2;else{var Pe=jS(le,re,b,z,pe.width,pe.height,E),Ce=le[Pe],Le=new Qe(Ce.x+pe.width+E.width,Ce.y),Oe=new Qe(Ce.x,Ce.y+pe.height+E.height);for(Pe+1<re&&le.splice(Pe+1,0,null),le[Pe]=Le,le[Pe+1]=Oe,re++,Pe=Ce.x-pe.x,Ce=Ce.y-pe.y,ue=ue.vertexes.iterator;ue.next();)Le=ue.value,Le.centerX+=Pe,Le.centerY+=Ce}for(vn.free(pe),ue=y.vertexes.iterator;ue.next();)ne=ue.value,Pe=ne.bounds,2>re?(b=Pe.x+Pe.width/2,z=Pe.y+Pe.height/2,le[0]=new Qe(Pe.x+Pe.width+E.width,Pe.y),le[1]=new Qe(Pe.x,Pe.y+Pe.height+E.height),re=2):(oe=jS(le,re,b,z,Pe.width,Pe.height,E),pe=le[oe],Ce=new Qe(pe.x+Pe.width+E.width,pe.y),Pe=new Qe(pe.x,pe.y+Pe.height+E.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=Ce,le[oe+1]=Pe,re++,ne.centerX=pe.x+ne.width/2,ne.centerY=pe.y+ne.height/2);for(di(le),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},Ks.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},Ks.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(Dx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Ox(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(ne,re){return ne===null||re===null||ne===re?0:re.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=E}}function Dx(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 Ox(a,y){for(var x=a.network,E=new Of(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var ne=new ZS;ne.Rs=z.Vd,ne.Ss=z.width,ne.Qs=z.height,ne.Sv=z.focus.x,ne.Tv=z.focus.y,z.We===null&&(z.We=new An),z.We.add(ne),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;b=re.fromVertex,ne=re.toVertex,b.network===E&&ne.network===E?E.Bo(re):b.network===E?(re=b.Hj,re===null&&(re=new An,b.Hj=re),re.add(ne),b.Vd--,b.sh+=ne.sh):ne.network===E&&(re=ne.Hj,re===null&&(re=new An,ne.Hj=re),re.add(b),ne.Vd--,ne.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,tt.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var oe=b.Hj;if(oe!==null&&0<oe.count&&(ne=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=ne))){for(var le=re=0,ue=oe.count-ne;ue<oe.count;ue++){var pe=oe.M(ue),Pe=null;for(z=pe.edges.iterator;z.next();){var Ce=z.value;if(Ce.Ax(pe)===b){Pe=Ce;break}}Pe!==null&&(le+=Pe.length,re+=pe.width*pe.height)}z=b.centerX,oe=b.centerY,ue=b.width,pe=b.height,Pe=b.focus,Ce=ue*pe,1>Ce&&(Ce=1),re=tt.sqrt((re+Ce+le*le*4/(ne*ne))/Ce),ne=(re-1)*ue/2,re=(re-1)*pe/2,b.bounds=new vn(z-Pe.x-ne,oe-Pe.y-re,ue+2*ne,pe+2*re),b.focus=new Qe(Pe.x+ne,Pe.y+re)}}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,ne=b.Tv;E.bounds=new vn(E.centerX-z,E.centerY-ne,b.Ss,b.Qs),E.focus=new Qe(z,ne),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,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),z=ne.Ss,ne=ne.Qs),z=tt.sqrt(z*z+ne*ne)/2;for(var re=!1,oe=ne=0,le=0,ue=y.vertexes.iterator;ue.next();){var pe=ue.value;1>=pe.Vd?oe++:(re=!0,le++,ne+=Math.atan2(y.centerY-pe.centerY,y.centerX-pe.centerX))}if(oe!==0){for(0<le&&(ne/=le),le=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(le=y/2),1<x.count&&x.sort(function(Ce,Le){return Ce===null||Le===null||Ce===Le?0:Le.width*Le.height-Ce.width*Ce.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ue=null,pe=oe.edges.iterator;pe.next();){ue=pe.value;break}pe=oe.width;var Pe=oe.height;pe=tt.sqrt(pe*pe+Pe*Pe)/2,ue=z+ue.length+pe,pe=ne+(y*(re/2>>1)+le)*(re%2===0?1:-1),oe.centerX=E+ue*Math.cos(pe),oe.centerY=b+ue*Math.sin(pe),re++}}}}function jS(a,y,x,E,b,z,ne){var re=9e19,oe=-1,le=0;e:for(;le<y;le++){var ue=a[le],pe=ue.x-x,Pe=ue.y-E;if(pe=pe*pe+Pe*Pe,pe<re){for(Pe=le-1;0<=Pe;Pe--)if(a[Pe].y>ue.y&&a[Pe].x-ue.x<b+ne.width)continue e;for(Pe=le+1;Pe<y;Pe++)if(a[Pe].x>ue.x&&a[Pe].y-ue.y<z+ne.height)continue e;oe=le,re=pe}}return oe}Ks.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ks.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,ne=z.x;y=z.y;var re=z.width;return z=z.height,E+b<ne?a>y+z?(x=E+b-ne,a=a-y-z,tt.sqrt(x*x+a*a)):a+x<y?(E=E+b-ne,a=a+x-y,tt.sqrt(E*E+a*a)):ne-(E+b):E>ne+re?a>y+z?(x=E-ne-re,a=a-y-z,tt.sqrt(x*x+a*a)):a+x<y?(E=E-ne-re,a=a+x-y,tt.sqrt(E*E+a*a)):E-(ne+re):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,ne=1;ne<y.length;ne++){var re=y[ne];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,E=Math.min(E,oe),b=Math.max(b,oe),x=Math.min(x,re),z=Math.max(z,re)}(b=b-E>z-x)?y.sort(function(Oe,rt){return Oe===null||rt===null||Oe===rt?0:Oe.centerX-rt.centerX}):y.sort(function(Oe,rt){return Oe===null||rt===null||Oe===rt?0:Oe.centerY-rt.centerY}),x=a.Zf;var le=E=re=0;for(z=0;z<y.length;z++){ne=y[z],E=ne.bounds,re=ne.focus,oe=E.x+re.x;var ue=E.y+re.y;E=ne.charge*a.electricalFieldX(oe,ue),le=ne.charge*a.electricalFieldY(oe,ue),E+=ne.mass*a.gravitationalFieldX(oe,ue),le+=ne.mass*a.gravitationalFieldY(oe,ue),ne.forceX+=E,ne.forceY+=le;for(var pe=z+1;pe<y.length;pe++){var Pe=y[pe];if(Pe!==ne){E=Pe.bounds,re=Pe.focus,le=E.x+re.x;var Ce=E.y+re.y;if(oe-le>x||le-oe>x){if(b)break}else if(ue-Ce>x||Ce-ue>x){if(!b)break}else{var Le=zS(ne,Pe);1>Le?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new E0),Le=E.random(),re=E.random(),oe>le?(E=Math.abs(Pe.bounds.right-ne.bounds.x),E=(1+E)*Le):oe<le?(E=Math.abs(Pe.bounds.x-ne.bounds.right),E=-(1+E)*Le):(E=Math.max(Pe.width,ne.width),E=(1+E)*Le-E/2),ue>Ce?(le=Math.abs(Pe.bounds.bottom-ne.bounds.y),le=(1+le)*re):oe<le?(le=Math.abs(Pe.bounds.y-ne.bounds.bottom),le=-(1+le)*re):(le=Math.max(Pe.height,ne.height),le=(1+le)*re-le/2)):(re=-(ne.charge*Pe.charge)/(Le*Le),E=(le-oe)/Le*re,le=(Ce-ue)/Le*re),ne.forceX+=E,ne.forceY+=le,Pe.forceX-=E,Pe.forceY-=le}}}}for(b=a.network.edges.iterator;b.next();)re=b.value,x=re.fromVertex,z=re.toVertex,ne=x.bounds,oe=x.focus,E=ne.x+oe.x,ne=ne.y+oe.y,ue=z.bounds,pe=z.focus,oe=ue.x+pe.x,ue=ue.y+pe.y,pe=zS(x,z),1>pe?(pe=a.randomNumberGenerator,pe===null&&(a.randomNumberGenerator=pe=new E0),re=pe.random(),pe=pe.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(ne>ue?1:-1)*(1+(z.height>x.height?z.height:x.height))*pe):(re=re.stiffness*(pe-re.length),E=(oe-E)/pe*re,le=(ue-ne)/pe*re),x.forceX+=E,x.forceY+=le,z.forceX-=E,z.forceY-=le;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}Ks.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},Ks.prototype.moveFixedVertex=function(){},Ks.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ks.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Co,y.toSpot=Co)}},Ks.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=vn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,vn.free(x)}x=vn.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()}vn.free(x)},Ks.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ks.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ks.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ks.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ks.prototype.electricalFieldX=function(){return 0},Ks.prototype.electricalFieldY=function(){return 0},Ks.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ks.prototype.gravitationalFieldX=function(){return 0},Ks.prototype.gravitationalFieldY=function(){return 0},Ks.prototype.isFixed=function(a){return a.isFixed},Ve.Object.defineProperties(Ks.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"&&St('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())}}}),Ks.className="ForceDirectedLayout";function ZS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}ZS.className="ForceDirectedSubnet";function Of(a){qo.call(this,a)}Ot(Of,qo),Of.prototype.createVertex=function(){return new _p(this)},Of.prototype.createEdge=function(){return new Zp(this)},Of.className="ForceDirectedNetwork";function _p(a){ps.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}Ot(_p,ps),Ve.Object.defineProperties(_p.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)}}}),_p.className="ForceDirectedVertex";function Zp(a){ql.call(this,a),this.j=this.o=NaN}Ot(Zp,ql),Ve.Object.defineProperties(Zp.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)}}}),Zp.className="ForceDirectedEdge";function E0(){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()}E0.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},E0.className="RandomNumberGenerator";function Ro(a){da.call(this),this.kc=this.ie=25,this.K=0,this.Dk=N0,this.Zk=B0,this.Qk=k0,this.bj=4,this.rk=A0,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 Qe,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ot(Ro,da),Ro.prototype.cloneProtected=function(a){da.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},Ro.prototype.qb=function(a){a.classType===Ro?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:St("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Ro.prototype.createNetwork=function(){return new kg(this)},Ro.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!==Gp&&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===Gp&&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 ne=0,re=0,oe=0,le=0;if(E.link!==null){if(re=E.link,re===null)continue;var ue=b.node;if(ne=z.node,ue===null||ne===null)continue;var pe=re.fromNode;oe=re.toNode;for(var Pe=re.fromPort;Pe!==null&&!Pe.Ed();)Pe=Pe.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(E.rev){le=pe;var Ce=Pe;pe=oe,Pe=re,oe=le,re=Ce}var Le=b.focus;le=z.focus;var Oe=E.rev?z.bounds:b.bounds;Ce=Qe.alloc(),ue!==pe?Oe.w()&&pe.isVisible()?pe.actualBounds.w()?(Zc(pe,Pe,Qr,Ce),Ce.x+=pe.actualBounds.x-Oe.x,Ce.y+=pe.actualBounds.y-Oe.y):(Zc(pe,Pe,Qr,Ce),Ce.w()||Ce.assign(Le)):Ce.assign(Le):Oe.w()?(Zc(pe,Pe,Qr,Ce),Ce.w()||Ce.assign(Le)):Ce.assign(Le),pe=E.rev?b.bounds:z.bounds,ue=Qe.alloc(),ne!==oe?pe.w()&&oe.isVisible()?oe.actualBounds.w()?(Zc(oe,re,Qr,ue),ue.x+=oe.actualBounds.x-pe.x,ue.y+=oe.actualBounds.y-pe.y):(Zc(oe,re,Qr,ue),ue.w()||ue.assign(le)):ue.assign(le):pe.w()?(Zc(oe,re,Qr,ue),ue.w()||ue.assign(le)):ue.assign(le),this.K===90||this.K===270?(ne=Math.round((Ce.x-Le.x)/this.kc),oe=Ce.x,re=Math.round((ue.x-le.x)/this.kc),le=ue.x):(ne=Math.round((Ce.y-Le.y)/this.kc),oe=Ce.y,re=Math.round((ue.y-le.y)/this.kc),le=ue.y),Qe.free(Ce),Qe.free(ue),E.portFromColOffset=ne,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=le}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Ce=b.layer,ue=z.layer,pe=0,Oe=E.link,Oe!==null){var rt=Oe.fromPort,Ye=Oe.toPort;if(rt!==null&&Ye!==null){var vt=Oe.fromNode;if(Pe=Oe.toNode,vt!==null&&Pe!==null){var Pt=F0(this,!0),Ct=F0(this,!1),It=this.setsPortSpots?Pt:Oe.computeSpot(!0,rt);Le=this.setsPortSpots?Ct:Oe.computeSpot(!1,Ye);var rn=Oe.isOrthogonal;It.$c()&&It.Hf(Ct)&&Le.$c()&&Le.Hf(Pt)?pe=0:(Pt=Oe.getLinkPoint(vt,rt,It,!0,rn,Pe,Ye,Qe.alloc()),Ct=Oe.getLinkDirection(vt,rt,Pt,It,!0,rn,Pe,Ye),Qe.free(Pt),It.ys()||Ct!==XS(this,E,!0)?this.setsPortSpots&&vt!==null&&vt.ports.count===1&&E.rev&&(pe+=1):pe+=1,It=Oe.getLinkPoint(Pe,Ye,Le,!1,rn,vt,rt,Qe.alloc()),Oe=Oe.getLinkDirection(Pe,Ye,It,Le,!1,rn,vt,rt),Qe.free(It),Le.ys()||Oe!==XS(this,E,!1)?this.setsPortSpots&&Pe!==null&&Pe.ports.count===1&&E.rev&&(pe+=2):pe+=2)}}}if(Pe=pe,pe=Pe===1||Pe===3,(Pe=Pe===2||Pe===3)&&(Le=a.createVertex(),Le.node=null,Le.Dj=1,Le.layer=Ce,Le.near=b,a.dh(Le),b=a.Zj(b,Le,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ne,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=Le),Oe=1,pe&&Oe--,Ce-ue>Oe&&0<Ce){for(E.valid=!1,Le=a.createVertex(),Le.node=null,Le.Dj=2,Le.layer=Ce-1,a.dh(Le),b=a.Zj(b,Le,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=Pe?0:ne,b.portToColOffset=0,b.portFromPos=Pe?0:oe,b.portToPos=0,b=Le,Ce--;Ce-ue>Oe&&0<Ce;)Le=a.createVertex(),Le.node=null,Le.Dj=3,Le.layer=Ce-1,a.dh(Le),b=a.Zj(b,Le,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Le,Ce--;b=a.Zj(Le,z,E.link),b.valid=!pe,pe&&(Le.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=le}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=Cd(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),Ed(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Ro.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}Ro.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},Ro.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 Tl(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 Tu(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 HS(a,y,x){var E=Cd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,ne=0;ne<b;ne++){var re=0,oe=E[ne],le=oe.near;if(le!==null&&le.layer===oe.layer)if(oe=le.index,oe>ne)for(var ue=ne+1;ue<oe;ue++){var pe=E[ue];pe.near===le&&pe.Dj===le.Dj||re++}else for(ue=ne-1;ue>oe;ue--)pe=E[ue],pe.near===le&&pe.Dj===le.Dj||re++;var Pe;if(0<=x)for(oe=E[ne].sourceEdgesArrayAccess,le=0;le<oe.length;le++){var Ce=oe[le];if(Ce.valid&&Ce.fromVertex.layer!==y)for(pe=Ce.fromVertex.index,ue=Ce.portToPos,Ce=Ce.portFromPos,Pe=le+1;Pe<oe.length;Pe++){var Le=oe[Pe];if(Le.valid&&Le.fromVertex.layer!==y){var Oe=Le.fromVertex.index,rt=Le.portToPos;Le=Le.portFromPos,ue<rt&&(pe>Oe||pe===Oe&&Ce>Le)&&re++,rt<ue&&(Oe>pe||Oe===pe&&Le>Ce)&&re++}}}if(0>=x){for(oe=E[ne].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(Ce=oe[le],Ce.valid&&Ce.toVertex.layer!==y)for(pe=Ce.toVertex.index,ue=Ce.portToPos,Ce=Ce.portFromPos,Pe=le+1;Pe<oe.length;Pe++)Le=oe[Pe],Le.valid&&Le.toVertex.layer!==y&&(Oe=Le.toVertex.index,rt=Le.portToPos,Le=Le.portFromPos,Ce<Le&&(pe>Oe||pe===Oe&&ue>rt)&&re++,Le<Ce&&(Oe>pe||Oe===pe&&rt>ue)&&re++)}for(z[ne*b+ne]=re,oe=ne+1;oe<b;oe++){var Ye=0,vt=0;if(0<=x){re=E[ne].sourceEdgesArrayAccess;var Pt=E[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(Ce=re[le],Ce.valid&&Ce.fromVertex.layer!==y)for(pe=Ce.fromVertex.index,Ce=Ce.portFromPos,Pe=0;Pe<Pt.length;Pe++)Le=Pt[Pe],Le.valid&&Le.fromVertex.layer!==y&&(Oe=Le.fromVertex.index,Le=Le.portFromPos,(pe<Oe||pe===Oe&&Ce<Le)&&vt++,(Oe<pe||Oe===pe&&Le<Ce)&&Ye++)}if(0>=x){for(re=E[ne].destinationEdgesArrayAccess,Pt=E[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(Ce=re[le],Ce.valid&&Ce.toVertex.layer!==y)for(pe=Ce.toVertex.index,ue=Ce.portToPos,Pe=0;Pe<Pt.length;Pe++)Le=Pt[Pe],Le.valid&&Le.toVertex.layer!==y&&(Oe=Le.toVertex.index,rt=Le.portToPos,(pe<Oe||pe===Oe&&ue<rt)&&vt++,(Oe<pe||Oe===pe&&rt<ue)&&Ye++)}z[ne*b+oe]=Ye,z[oe*b+ne]=vt}}return Ed(a,y,E),z}Ro.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(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 b0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Cd(E,b),ne=E.tc[b],re=0,oe=0;oe<ne;oe++){var le=z[oe].destinationEdgesArrayAccess;if(le!==null)for(var ue=0;ue<le.length;ue++){var pe=le[ue];if(pe.valid&&pe.toVertex.layer!==b){var Pe=pe.fromVertex.column+pe.portFromColOffset,Ce=pe.toVertex.column+pe.portToColOffset;re+=(Math.abs(Pe-Ce)+1)*gy(pe)}}}Ed(E,b,z),y+=re}return y}Ro.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=Cd(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,pe=0,Pe=re.near;if(Pe!==null&&Pe.layer===re.layer&&(ue+=Pe.column-1,pe++),oe!==null)for(Pe=0;Pe<oe.length;Pe++){re=oe[Pe];var Ce=re.fromVertex;re.valid&&!re.rev&&Ce.layer!==y&&(ue+=Ce.column,pe++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],Pe=re.toVertex,re.valid&&!re.rev&&Pe.layer!==y&&(ue+=Pe.column,pe++);z[ne]=pe===0?-1:ue/pe}return Ed(a,y,E),z}function GS(a,y,x){for(var E=Cd(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,pe=[],Pe=re.near;if(Pe!==null&&Pe.layer===re.layer&&(pe[ue]=Pe.column-1,ue++),re=void 0,oe!==null)for(Pe=0;Pe<oe.length;Pe++){re=oe[Pe];var Ce=re.fromVertex;re.valid&&!re.rev&&Ce.layer!==y&&(pe[ue]=Ce.column+re.portFromColOffset,ue++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],Pe=re.toVertex,re.valid&&!re.rev&&Pe.layer!==y&&(pe[ue]=Pe.column+re.portToColOffset,ue++);ue===0?z[ne]=-1:(pe.sort(function(Le,Oe){return Le-Oe}),le=ue>>1,z[ne]=ue&1?pe[le]:pe[le-1]+pe[le]>>1)}return Ed(a,y,E),z}function Hp(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();){var re=ne.value,oe=re.toVertex,le=y.layer-oe.layer;re=a.linkMinLength(re),le===re&&Hp(a,oe,x,E,b,z)}if(z)for(ne=y.sourceEdges;ne.next();)re=ne.value,oe=re.fromVertex,le=oe.layer-y.layer,re=a.linkMinLength(re),le===re&&Hp(a,oe,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();)my(a,ne.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}Ro.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=WS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=WS(a);for(b=$S(a);b!==null;)E[y]=b,y++,b.valid=!1,b=$S(a);b=null;for(var z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value;if(re.valid){for(var oe=0,le=re.destinationEdges;le.next();)le.value.toVertex.valid&&oe++;le=0;for(var ue=re.sourceEdges;ue.next();)ue.value.fromVertex.valid&&le++;(b===null||z<oe-le)&&(b=re,z=oe-le)}}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 N0: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 Gp: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 WS(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 $S(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++}Ro.prototype.assignLayers=function(){switch(this.Zk){case xy:KS(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=US(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 B0:for(KS(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 KS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=VS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function VS(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,VS(a,z)+b)}y.layer=x}else x=y.layer;return x}function US(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,US(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 ne=E[z],re=ne.fromVertex,oe=ne.toVertex;ne=a.linkMinLength(ne),re.layer-oe.layer>ne&&Hp(a,re,0,-1,!0,!1)}for(Hp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,re=0,oe=null,ne=a.network.vertexes.iterator;ne.next();){var le=ne.value;if(le.component===1){var ue=0,pe=!1,Pe=le.sourceEdgesArrayAccess;b=Pe.length;for(var Ce=0;Ce<b;Ce++){var Le=Pe[Ce],Oe=Le.fromVertex;ue+=1,Oe.component!==1&&(z+=1,Oe=Oe.layer-le.layer,Le=a.linkMinLength(Le),E=Math.min(E,Oe-Le))}for(Pe=le.destinationEdgesArrayAccess,b=Pe.length,Ce=0;Ce<b;Ce++)Le=Pe[Ce].toVertex,--ue,Le.component!==1?--z:pe=!0;(oe===null||ue<re)&&!pe&&(oe=le,re=ue)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Hp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(ne=oe.value,ne.component===1){for(le=0,ue=!1,Pe=ne.sourceEdgesArrayAccess,pe=Pe.length,Ce=0;Ce<pe;Ce++)Le=Pe[Ce].fromVertex,le+=1,Le.component!==1?E+=1:ue=!0;for(Pe=ne.destinationEdgesArrayAccess,pe=Pe.length,Ce=0;Ce<pe;Ce++)Le=Pe[Ce],Oe=Le.toVertex,--le,Oe.component!==1&&(--E,Oe=ne.layer-Oe.layer,Le=a.linkMinLength(Le),b=Math.min(b,Oe-Le));(re===null||le>z)&&!ue&&(re=ne,z=le)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else re.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}Ro.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case k0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&JS(this,x);break;case wy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x)}};function JS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var 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))}Ro.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Tl(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)M0(this,E,1),Ku(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Tl(this)),E=this.Ia;0<=E;E--)M0(this,E,-1),Ku(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Tl(this))}for(Tu(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)M0(this,E,0),Ku(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Tl(this)),E=this.Ia;0<=E;E--)M0(this,E,0),Ku(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Tl(this))}Tu(this,y);var z,ne,re;switch(this.rk){case Ey:break;case by:for(re=a+1;(E=this.countCrossings())<re;)for(re=E,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,-1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,0)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,0)||z;b>=a?Tu(this,y):(a=b,y=Tl(this))}break;default:case A0:for(x=this.Ia,ne=0,re=a+1;(E=this.countCrossings())<re;){for(re=E,z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,-1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,0)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,0)||z;b>=a?Tu(this,y):(a=b,y=Tl(this))}}Tu(this,y)};function M0(a,y,x){var E=Cd(a,y),b=a.tc[y],z=GS(a,y,x),ne=py(a,y,x);for(x=0;x<b;x++)ne[x]===-1&&(ne[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&ne[x+1]<ne[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=ne[x],ne[x]=ne[x+1],ne[x+1]=oe,oe=E[x],E[x]=E[x+1],E[x+1]=oe);for(x=z=0;x<b;x++)oe=E[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Ed(a,y,E)}function Ku(a,y,x){var E=Cd(a,y),b=a.tc[y];x=HS(a,y,x);var z,ne=[];for(z=0;z<b;z++)ne[z]=-1;var re=[];for(z=0;z<b;z++)re[z]=-1;for(var oe=!1,le=!0;le;)for(le=!1,z=0;z<b-1;z++){var ue=x[E[z].index*b+E[z+1].index],pe=x[E[z+1].index*b+E[z].index],Pe=0,Ce=0,Le=E[z].column,Oe=E[z+1].column,rt=a.nodeMinColumnSpace(E[z],!0),Ye=a.nodeMinColumnSpace(E[z],!1),vt=a.nodeMinColumnSpace(E[z+1],!0),Pt=a.nodeMinColumnSpace(E[z+1],!1);rt=Le-rt+vt,Ye=Oe-Ye+Pt;var Ct=E[z].sourceEdges.iterator;for(Ct.reset();Ct.next();)if(vt=Ct.value,Pt=vt.fromVertex,vt.valid&&Pt.layer===y){for(vt=0;E[vt]!==Pt;)vt++;vt<z&&(Pe+=2*(z-vt),Ce+=2*(z+1-vt)),vt===z+1&&(Pe+=1),vt>z+1&&(Pe+=4*(vt-z),Ce+=4*(vt-(z+1)))}for(Ct=E[z].destinationEdges.iterator,Ct.reset();Ct.next();)if(vt=Ct.value,Pt=vt.toVertex,vt.valid&&Pt.layer===y){for(vt=0;E[vt]!==Pt;)vt++;vt===z+1&&(Ce+=1)}for(Ct=E[z+1].sourceEdges.iterator,Ct.reset();Ct.next();)if(vt=Ct.value,Pt=vt.fromVertex,vt.valid&&Pt.layer===y){for(vt=0;E[vt]!==Pt;)vt++;vt<z&&(Pe+=2*(z+1-vt),Ce+=2*(z-vt)),vt===z&&(Ce+=1),vt>z+1&&(Pe+=4*(vt-(z+1)),Ce+=4*(vt-z))}for(Ct=E[z+1].destinationEdges.iterator,Ct.reset();Ct.next();)if(vt=Ct.value,Pt=vt.toVertex,vt.valid&&Pt.layer===y){for(vt=0;E[vt]!==Pt;)vt++;vt===z&&(Pe+=1)}vt=Pt=0,Ct=ne[E[z].index];var It=re[E[z].index],rn=ne[E[z+1].index],ri=re[E[z+1].index];Ct!==-1&&(Pt+=Math.abs(Ct-Le),vt+=Math.abs(Ct-Ye)),It!==-1&&(Pt+=Math.abs(It-Le),vt+=Math.abs(It-Ye)),rn!==-1&&(Pt+=Math.abs(rn-Oe),vt+=Math.abs(rn-rt)),ri!==-1&&(Pt+=Math.abs(ri-Oe),vt+=Math.abs(ri-rt)),(Ce<Pe-.5||Ce===Pe&&pe<ue-.5||Ce===Pe&&pe===ue&&vt<Pt-.5)&&(le=oe=!0,E[z].column=Ye,E[z+1].column=rt,ue=E[z],E[z]=E[z+1],E[z+1]=ue)}for(z=0;z<b;z++)E[z].index=z;return Ed(a,y,E),oe}Ro.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Vx)!==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=Bg(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Bg(this,y,-1)||x;x=Bg(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=Bg(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Bg(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Bg(this,y,0)||x}}else Gx(this)};function Bg(a,y,x){for(var E=!1;_x(a,y,x);)E=!0;return E}function _x(a,y,x){var E,b=Cd(a,y),z=a.tc[y],ne=py(a,y,-1);if(0<x)for(E=0;E<z;E++)ne[E]=-1;var re=py(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,le=!0;le;)for(le=!1,E=0;E<z;E++){var ue=b[E].column,pe=a.nodeMinColumnSpace(b[E],!0),Pe=a.nodeMinColumnSpace(b[E],!1),Ce=0;0>E-1||ue-b[E-1].column-1>pe+a.nodeMinColumnSpace(b[E-1],!1)?Ce=ue-1:Ce=ue,pe=E+1>=z||b[E+1].column-ue-1>Pe+a.nodeMinColumnSpace(b[E+1],!0)?ue+1:ue;var Le=Pe=0,Oe=0;if(0>=x)for(var rt=b[E].sourceEdges.iterator;rt.next();){var Ye=rt.value,vt=Ye.fromVertex;if(Ye.valid&&vt.layer!==y){var Pt=gy(Ye),Ct=Ye.portFromColOffset;Ye=Ye.portToColOffset,vt=vt.column,Pe+=(Math.abs(ue+Ye-(vt+Ct))+1)*Pt,Le+=(Math.abs(Ce+Ye-(vt+Ct))+1)*Pt,Oe+=(Math.abs(pe+Ye-(vt+Ct))+1)*Pt}}if(0<=x)for(rt=b[E].destinationEdges.iterator;rt.next();)Ye=rt.value,vt=Ye.toVertex,Ye.valid&&vt.layer!==y&&(Pt=gy(Ye),Ct=Ye.portFromColOffset,Ye=Ye.portToColOffset,vt=vt.column,Pe+=(Math.abs(ue+Ct-(vt+Ye))+1)*Pt,Le+=(Math.abs(Ce+Ct-(vt+Ye))+1)*Pt,Oe+=(Math.abs(pe+Ct-(vt+Ye))+1)*Pt);Ye=Ct=Pt=0,rt=ne[b[E].index],vt=re[b[E].index],rt!==-1&&(Pt+=Math.abs(rt-ue),Ct+=Math.abs(rt-Ce),Ye+=Math.abs(rt-pe)),vt!==-1&&(Pt+=Math.abs(vt-ue),Ct+=Math.abs(vt-Ce),Ye+=Math.abs(vt-pe)),Le<Pe||Le===Pe&&Ct<Pt?(le=oe=!0,b[E].column=Ce):(Oe<Pe||Oe===Pe&&Ye<Pt)&&(le=oe=!0,b[E].column=pe)}return Ed(a,y,b),a.normalize(),oe}function yy(a,y,x){var E=Cd(a,y),b=a.tc[y],z=GS(a,y,x),ne=[];for(x=0;x<b;x++)ne[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var re=E[x].column,oe=a.nodeMinColumnSpace(E[x],!0),le=a.nodeMinColumnSpace(E[x],!1),ue=0;if(ne[x]===-1)if(x===0&&x===b-1)ue=re;else if(x===0){var pe=E[x+1].column;pe-re===le+a.nodeMinColumnSpace(E[x+1],!0)?ue=re-1:ue=re}else x===b-1?(pe=E[x-1].column,ue=re-pe===oe+a.nodeMinColumnSpace(E[x-1],!1)?re+1:re):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,ue=(oe+le)/2|0);else x===0&&x===b-1?ue=ne[x]:x===0?(pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,ue=Math.min(ne[x],le)):x===b-1?(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ue=Math.max(ne[x],oe)):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,oe<ne[x]&&ne[x]<le?ue=ne[x]:oe>=ne[x]?ue=oe:le<=ne[x]&&(ue=le));ue!==re&&(z=!0,E[x].column=ue)}Ed(a,y,E),a.normalize()}function Zx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),ne=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+ne>=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 Hx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){E=ne.value;var re=E.column-a.nodeMinColumnSpace(E,!0),oe=E.column+a.nodeMinColumnSpace(E,!1);re<=y&&oe>=y&&(b[E.layer]=!0),re<=x&&oe>=x&&(z[E.layer]=!0)}for(re=!0,x=!1,E=0;E<=a.Ia;E++)re=re&&!(b[E]&&z[E]);if(re)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function qS(a,y){for(var x=0;x<=a.Ra;x++)for(;Zx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=Tl(a),z=b0(a);for(E=z+1;z<E;){E=z,ex(a,x,1);var ne=b0(a);ne>z?Tu(a,b):ne<z&&(z=ne,b=Tl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Tl(a),z=b0(a),E=z+1;z<E;)E=z,ex(a,x,-1),ne=b0(a),ne>z?Tu(a,b):ne<z&&(z=ne,b=Tl(a));a.normalize()}function ex(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 ne=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)b[ne*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(ne=0;ne<a.Ra;ne++)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne+1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne+1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne-1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne-1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(oe=ne[ne.length-1],ne.pop(),b[oe])for(b[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&ne.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 Gx(a){for(var y=Qn(),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 Bn,Wx(y,x);var z=null,ne=null,re=null,oe=null,le=(a.ve&1)!==0,ue=(a.ve&2)!==0,pe=(a.ve&4)!==0,Pe=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=L0(a,y,!0,!1)),y.reverse(),pe&&(a.verticalAlignment(y,x,!1),re=L0(a,y,!1,!1)),E=Hi(y),b=E.next();!b.done;b=E.next())b.value.reverse();Pe&&(a.verticalAlignment(y,x,!1),oe=L0(a,y,!1,!0)),y.reverse(),ue&&(a.verticalAlignment(y,x,!0),ne=L0(a,y,!0,!0)),di(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(Ce){var Le=Qn();le&&Le.push(z.get(Ce)),ue&&Le.push(ne.get(Ce)),pe&&Le.push(re.get(Ce)),Pe&&Le.push(oe.get(Ce)),Le.sort(function(rt,Ye){return rt-Ye});var Oe=Le.length;Oe=(Le[Math.floor((Oe-1)/2)]+Le[Math.ceil((Oe-1)/2)])/2,di(Le),Ce.zc=Oe})}function Wx(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,ne=a[E],re=a[E+1],oe=0;z<re.length;oe++){var le=re[oe];e:{if(le.node===null){var ue=My(le);if(0<ue.length){ue=ue[0].node===null;break e}}ue=!1}var pe=ue;if(oe===re.length-1||pe){for(ue=ne.length-1,pe&&(ue=My(le)[0].index);z<=oe;){if(le=re[z],!le.bo){pe=[];for(var Pe=Hi(le.sourceEdgesArrayAccess),Ce=Pe.next();!Ce.done;Ce=Pe.next())Ce=Ce.value,Ce.valid&&pe.push(Ce);le.bo=pe}for(le=Hi(le.bo),pe=le.next();!pe.done;pe=le.next())pe=pe.value,Pe=pe.fromVertex.index,(Pe<b||Pe>ue)&&y.add(pe);z++}b=ue}}}Ro.prototype.verticalAlignment=function(a,y,x){$x(a),a=Hi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Hi(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ne=x?My(z):Ux(z),re=ne.length;if(0<re){ne.sort(function(pe,Pe){return pe.vi-Pe.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var le=ne[re],ue=void 0;ue=x?T0(le,z):T0(z,le),!y.contains(ue)&&b<le.vi&&(le.align=z,z.root=le.root,z.align=le.root,b=le.vi)}}}}};function $x(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 L0(a,y,x,E){for(var b=a.K===90||a.K===270,z=Hi(y),ne=z.next();!ne.done;ne=z.next()){var re=Hi(ne.value);for(ne=re.next();!ne.done;ne=re.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,z=Hi(y),re=z.next();!re.done;re=z.next()){re=Hi(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var le=0,ue=oe;ue.align!==oe;){var pe=ue.align,Pe=ne?ue.width:ue.height,Ce=ne?pe.width:pe.height;if(x){var Le=T0(ue,pe),Oe=Le.portFromPos,rt=Le.portToPos;Le.link!==null&&(ue.node&&ue.node!==Le.link.fromNode&&(Oe=ne?ue.focusX:ue.focusY),pe.node&&pe.node!==Le.link.toNode&&(rt=ne?pe.focusX:pe.focusY))}else Le=T0(pe,ue),Oe=Le.portToPos,rt=Le.portFromPos,Le.link!==null&&(ue.node&&ue.node!==Le.link.toNode&&(Oe=ne?ue.focusX:ue.focusY),pe.node&&pe.node!==Le.link.fromNode&&(rt=ne?pe.focusX:pe.focusY));Pe=E?ue.qg+(Pe-Oe)-(Ce-rt):ue.qg+Oe-rt,pe.qg=Pe,le=Math.min(le,Pe),ue=ue.align}ue=oe;do ue.qg=ue.qg-le,ue=ue.align;while(ue!==oe)}}for(x=Hi(y),ne=x.next();!ne.done;ne=x.next())for(z=Hi(ne.value),ne=z.next();!ne.done;ne=z.next())ne=ne.value,ne.root===ne&&tx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,re=0;do{for(z=y[ne][re];z.align!==z.root;)z=z.align,ne++,0<z.vi&&(re=nx(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(b?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(ne<y.length&&re<y[ne].length&&z.sd===y[ne][re].sd)}for(a=new wi,y=Hi(y),ne=y.next();!ne.done;ne=y.next())for(x=Hi(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,z=b?ne.width:ne.height,a.add(ne,E?-ne.zc-z:ne.zc);return a}function tx(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;tx(a,z,x),y.sd===y&&(y.sd=z.sd);var ne=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+ne-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&&St("Could not determine previous vertex in layer"),y[x][a-1]}Ro.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Qn(),b=Qn(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=Kx(this,y[ne],E,b,ne);re<z&&(x=ne,z=re)}for(z={},ne=0;4>ne;z={delta:z.delta},ne++)y[ne]&&(z.delta=ne===0||ne===2?E[x]-E[ne]:b[x]-b[ne],z.delta!==0&&y[ne].each(function(oe){return function(le){le.value+=oe.delta}}(z)));di(E),di(b)};function Kx(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,ne=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>ne&&(ne=re+oe)}),x[b]=z,E[b]=ne,ne-z}Ro.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=F0(this,!0),y=F0(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 F0(a,y){return a.K===270?y?Aa:Ka:a.K===90?y?Ka:Aa:a.K===180?y?za:rs:y?rs:za}Ro.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,ne=b=1/0,re=-1/0;a.next();){var oe=a.value,le=oe.layer,ue=oe.column|0;E?(ne=y.x+this.kc*ue,le=this.Kd[le]):(ne=this.Kd[le],le=y.y+this.kc*ue),oe.centerX=ne,oe.centerY=le,x&&isFinite(oe.zc)&&(E?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),b=Math.min(oe.y,b),E?(ne=z,re=Math.max(re,oe.bounds.right)):(ne=b,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-ne,z=y.x-z,y=y.y-b,this.Rf=new Qe(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Ro.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 vn(0,0,x,Math.abs(this.Ta[0]))):y.push(new vn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new vn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new vn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new vn(0,0,Math.abs(this.Ta[0]),x)):y.push(new vn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new vn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new vn(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Ro.prototype.commitLayers=function(){},Ro.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,ne=E.fromPort,re=E.toPort;if(b!==null){var oe=b.findVisibleNode();oe!==null&&oe!==b&&(b=oe,ne=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var le=y.computeSpot(!0,ne);oe=y.computeSpot(!1,re);var ue=x.fromVertex,pe=x.toVertex;if(x.valid)y.curve===pu&&y.pointsCount===4&&(ue.column===pe.column&&this.alignOption===0?(x=y.getLinkPoint(b,ne,le,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,b,ne),x.w()||x.set(b.actualBounds.center),re.w()||re.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+re.x)/3,(2*x.y+re.y)/3),y.yf((x.x+2*re.x)/3,(x.y+2*re.y)/3),y.yf(re.x,re.y)):(x=E=!1,ne!==null&&le===Fa&&(E=!0),re!==null&&oe===Fa&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ne,ne.ga(Qr),y.i(3),!0),oe.w()||oe.set(b.actualBounds.center),y.L(0,oe.x,oe.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,re,re.ga(Qr),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.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(ue.layer===pe.layer)y.zf();else{var Pe=!1,Ce=!1,Le=this.ie,Oe=y.firstPickIndex+1;if(y.isOrthogonal){Ce=!0;var rt=y.pointsCount;4<rt&&y.points.removeRange(2,rt-3)}else if(y.curve===pu)Pe=!0,rt=y.pointsCount,4<rt&&y.points.removeRange(2,rt-3),rt===4&&(Oe=2);else{rt=y.pointsCount;var Ye=le===Fa,vt=oe===Fa;2<rt&&Ye&&vt?y.points.removeRange(1,rt-2):3<rt&&Ye&&!vt?y.points.removeRange(1,rt-3):3<rt&&!Ye&&vt?y.points.removeRange(2,rt-2):4<rt&&!Ye&&!vt&&y.points.removeRange(2,rt-3)}if(x.rev){for(;pe!==null&&ue!==pe;){var Pt=rt=null;for(Ye=pe.sourceEdges.iterator;Ye.next()&&(vt=Ye.value,vt.link!==x.link||(rt=vt.fromVertex,Pt=vt.toVertex,rt.node!==null)););if(rt===null)break;if(rt!==ue){Ye=y.i(Oe-1).x,vt=y.i(Oe-1).y;var Ct=rt.centerX,It=rt.centerY;if(Ce)this.K===180||this.K===0?Oe===y.firstPickIndex+1?(y.m(Oe++,Ye,vt),y.m(Oe++,Ye,It)):(Pt!==null?Pt.centerY:vt)!==It&&(Pt=this.Ta[rt.layer-1]+this.Rf.x,y.m(Oe++,Pt,vt),y.m(Oe++,Pt,It)):Oe===y.firstPickIndex+1?(y.m(Oe++,Ye,vt),y.m(Oe++,Ct,vt)):(Pt!==null?Pt.centerX:Ye)!==Ct&&(Pt=this.Ta[rt.layer-1]+this.Rf.y,y.m(Oe++,Ye,Pt),y.m(Oe++,Ct,Pt));else if(Oe===y.firstPickIndex+1){Pt=Math.max(10,this.he[pe.layer]);var rn=Math.max(10,this.Ld[pe.layer]);if(Pe)this.K===180?Ct<=pe.bounds.x?(pe=pe.bounds.x,y.m(Oe++,pe-Pt,It),y.m(Oe++,pe,It),y.m(Oe++,pe+rn,It)):(y.m(Oe++,Ct-Pt,It),y.m(Oe++,Ct,It),y.m(Oe++,Ct+rn,It)):this.K===90?It>=pe.bounds.bottom?(pe=pe.bounds.y+pe.bounds.height,y.m(Oe++,Ct,pe+rn),y.m(Oe++,Ct,pe),y.m(Oe++,Ct,pe-Pt)):(y.m(Oe++,Ct,It+rn),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It-Pt)):this.K===270?It<=pe.bounds.y?(pe=pe.bounds.y,y.m(Oe++,Ct,pe-Pt),y.m(Oe++,Ct,pe),y.m(Oe++,Ct,pe+rn)):(y.m(Oe++,Ct,It-Pt),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It+rn)):this.K===0&&(Ct>=pe.bounds.right?(pe=pe.bounds.x+pe.bounds.width,y.m(Oe++,pe+rn,It),y.m(Oe++,pe,It),y.m(Oe++,pe-Pt,It)):(y.m(Oe++,Ct+rn,It),y.m(Oe++,Ct,It),y.m(Oe++,Ct-Pt,It)));else{y.m(Oe++,Ye,vt);var ri=0;this.K===180||this.K===0?((this.K===180?Ct>=pe.bounds.right:Ct<=pe.bounds.x)&&(ri=(this.K===0?-Pt:rn)/2),y.m(Oe++,Ye+ri,It)):((this.K===270?It>=pe.bounds.bottom:It<=pe.bounds.y)&&(ri=(this.K===90?-Pt:rn)/2),y.m(Oe++,Ct,vt+ri)),y.m(Oe++,Ct,It)}}else Pt=Math.max(10,this.he[rt.layer]),rn=Math.max(10,this.Ld[rt.layer]),Pe?this.K===180?(y.m(Oe++,Ct-Pt-Le,It),y.m(Oe++,Math.min(Ct-Pt+Le/2,Ct),It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Math.max(Ct+rn-Le/2,Ct),It),y.m(Oe++,Ct+rn+Le,It)):this.K===90?(y.m(Oe++,Ct,It+rn+Le),y.m(Oe++,Ct,Math.max(It+rn-Le/2,It)),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,Math.min(It-Pt+Le/2,It)),y.m(Oe++,Ct,It-Pt-Le)):this.K===270?(y.m(Oe++,Ct,It-Pt-Le),y.m(Oe++,Ct,Math.min(It-Pt+Le/2,It)),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,Math.max(It+rn-Le/2,It)),y.m(Oe++,Ct,It+rn+Le)):(y.m(Oe++,Ct+rn+Le,It),y.m(Oe++,Math.max(Ct+rn-Le/2,Ct),It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Math.min(Ct-Pt+Le/2,Ct),It),y.m(Oe++,Ct-Pt-Le,It)):y.m(Oe++,Ct,It)}pe=rt}(re===null||le!==Fa||Ce)&&(Ye=y.i(Oe-1).x,vt=y.i(Oe-1).y,Ct=y.i(Oe).x,It=y.i(Oe).y,Ce?(Le=this.Ld[ue.layer],this.K===180||this.K===0?(Ce=vt,Ce>=ue.bounds.y&&Ce<=ue.bounds.bottom&&(this.K===180?Ct>=ue.bounds.x:Ct<=ue.bounds.right)&&(pe=ue.centerX+(this.K===180?-Le:Le),Ce<ue.bounds.y+ue.bounds.height/2?Ce=ue.bounds.y-this.kc/2:Ce=ue.bounds.bottom+this.kc/2,y.m(Oe++,pe,vt),y.m(Oe++,pe,Ce)),y.m(Oe++,Ct,Ce)):(Ce=Ye,Ce>=ue.bounds.x&&Ce<=ue.bounds.right&&(this.K===270?It>=ue.bounds.y:It<=ue.bounds.bottom)&&(pe=ue.centerY+(this.K===270?-Le:Le),Ce<ue.bounds.x+ue.bounds.width/2?Ce=ue.bounds.x-this.kc/2:Ce=ue.bounds.right+this.kc/2,y.m(Oe++,Ye,pe),y.m(Oe++,Ce,pe)),y.m(Oe++,Ce,It)),y.m(Oe++,Ct,It)):Pe?(Pt=Math.max(10,this.he[ue.layer]),rn=Math.max(10,this.Ld[ue.layer]),this.K===180&&Ct>=ue.bounds.x?(pe=ue.bounds.x+ue.bounds.width,y.L(Oe-2,pe,vt),y.L(Oe-1,pe+rn,vt)):this.K===90&&It<=ue.bounds.bottom?(pe=ue.bounds.y,y.L(Oe-2,Ye,pe),y.L(Oe-1,Ye,pe-Pt)):this.K===270&&It>=ue.bounds.y?(pe=ue.bounds.y+ue.bounds.height,y.L(Oe-2,Ye,pe),y.L(Oe-1,Ye,pe+rn)):this.K===0&&Ct<=ue.bounds.right&&(pe=ue.bounds.x,y.L(Oe-2,pe,vt),y.L(Oe-1,pe-Pt,vt))):(Pt=Math.max(10,this.he[ue.layer]),rn=Math.max(10,this.Ld[ue.layer]),Ce=0,this.K===180||this.K===0?((this.K===180?Ct<=ue.bounds.x:Ct>=ue.bounds.right)&&(Ce=(this.K===0?rn:-Pt)/2),y.m(Oe++,Ct+Ce,vt)):((this.K===270?It<=ue.bounds.y:It>=ue.bounds.bottom)&&(Ce=(this.K===90?rn:-Pt)/2),y.m(Oe++,Ye,It+Ce)),y.m(Oe++,Ct,It)))}else{for(;ue!==null&&ue!==pe;){for(Pt=rt=null,ue=ue.destinationEdges.iterator;ue.next()&&(Ye=ue.value,Ye.link!==x.link||(rt=Ye.toVertex,Pt=Ye.fromVertex,Pt.node!==null&&(Pt=null),rt.node!==null)););if(rt===null)break;rt!==pe&&(Ye=y.i(Oe-1).x,vt=y.i(Oe-1).y,Ct=rt.centerX,It=rt.centerY,Ce?this.K===180||this.K===0?(Pt!==null?Pt.centerY:vt)!==It&&(Pt=this.Ta[rt.layer]+this.Rf.x,Oe===y.firstPickIndex+1&&(Pt=this.K===0?Math.max(Pt,Ye):Math.min(Pt,Ye)),y.m(Oe++,Pt,vt),y.m(Oe++,Pt,It)):(Pt!==null?Pt.centerX:Ye)!==Ct&&(Pt=this.Ta[rt.layer]+this.Rf.y,Oe===y.firstPickIndex+1&&(Pt=this.K===90?Math.max(Pt,vt):Math.min(Pt,vt)),y.m(Oe++,Ye,Pt),y.m(Oe++,Ct,Pt)):(Pt=Math.max(10,this.he[rt.layer]),rn=Math.max(10,this.Ld[rt.layer]),Pe?this.K===180?(y.m(Oe++,Ct+rn+Le,It),y.m(Oe++,Math.max(Ct+rn-Le/2,Ct),It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Math.min(Ct-Pt+Le/2,Ct),It),y.m(Oe++,Ct-Pt-Le,It)):this.K===90?(y.m(Oe++,Ct,It-Pt-Le),y.m(Oe++,Ct,Math.min(It-Pt+Le/2,It)),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,Math.max(It+rn-Le/2,It)),y.m(Oe++,Ct,It+rn+Le)):this.K===270?(y.m(Oe++,Ct,It+rn+Le),y.m(Oe++,Ct,Math.max(It+rn-Le/2,It)),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,Math.min(It-Pt+Le/2,It)),y.m(Oe++,Ct,It-Pt-Le)):(y.m(Oe++,Ct-Pt-Le,It),y.m(Oe++,Math.min(Ct-Pt+Le/2,Ct),It),y.m(Oe++,Ct,It),y.m(Oe++,Ct,It),y.m(Oe++,Math.max(Ct+rn-Le/2,Ct),It),y.m(Oe++,Ct+rn+Le,It)):this.K===180?(y.m(Oe++,Ct+rn,It),y.m(Oe++,Ct-Pt,It)):this.K===90?(y.m(Oe++,Ct,It-Pt),y.m(Oe++,Ct,It+rn)):this.K===270?(y.m(Oe++,Ct,It+rn),y.m(Oe++,Ct,It-Pt)):(y.m(Oe++,Ct-Pt,It),y.m(Oe++,Ct+rn,It)))),ue=rt}Ce&&(Ye=y.i(Oe-1).x,vt=y.i(Oe-1).y,Ct=y.i(Oe).x,It=y.i(Oe).y,this.K===180||this.K===0?vt!==It&&(Pt=this.K===0?Math.min(Math.max((Ct+Ye)/2,this.Ta[pe.layer]+this.Rf.x),Ct):Math.max(Math.min((Ct+Ye)/2,this.Ta[pe.layer]+this.Rf.x),Ct),y.m(Oe++,Pt,vt),y.m(Oe++,Pt,It)):Ye!==Ct&&(Pt=this.K===90?Math.min(Math.max((It+vt)/2,this.Ta[pe.layer]+this.Rf.y),It):Math.max(Math.min((It+vt)/2,this.Ta[pe.layer]+this.Rf.y),It),y.m(Oe++,Ye,Pt),y.m(Oe++,Ct,Pt)))}E!==null&&Pe&&4<=y.pointsCount&&(ne!==null&&(ne=le===Fa?y.getLinkPointFromPoint(b,ne,ne.ga(Qr),y.i(3),!0):y.i(0),le===Fa&&(le=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+le.x)/2,le.y),y.L(2,E.x,(le.y+E.y)/2)):(y.L(1,le.x,(ne.y+le.y)/2),y.L(2,(le.x+E.x)/2,E.y))),ne.w()||ne.set(b.actualBounds.center),y.L(0,ne.x,ne.y)),re!==null&&(b=oe===Fa?y.getLinkPointFromPoint(z,re,re.ga(Qr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Fa&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+re.x)/2,re.y),y.L(y.pointsCount-2,oe.x,(re.y+oe.y)/2)):(y.L(y.pointsCount-2,re.x,(b.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Ro.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new An,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),ne=E.i(b+1);if(this.B(z.y,ne.y)&&!this.B(z.x,ne.x)){var re=new bd;re.layer=Math.floor(z.y/2);var oe=E.i(0),le=E.i(E.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=le.x*le.x+le.y,re.rd=Math.min(z.x,ne.x),re.Ic=Math.max(z.x,ne.x),re.index=b,re.link=E,b+2<E.pointsCount){oe=E.i(b-1),le=E.i(b+2);var ue=0;oe.y<z.y?ue=le.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(ue=le.y>z.y?0:ne.x<z.x?2:1),re.j=ue}x.push(re)}}}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(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ue=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);this.zi(x,this.Ux,z,z+ne);var pe=1;for(re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ue<pe?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ue=0,pe=z;pe<b;pe++){var Pe=x[pe];(oe?Pe.first:Pe.jc)!==re&&(ue++,re=oe?Pe.first:Pe.jc);var Ce=Pe.link;z=Ce.i(Pe.index),ne=Ce.i(Pe.index+1);var Le=this.linkSpacing*(ue-(le-1)/2);y++,Ce.uh(),Ce.L(Pe.index,z.x,z.y+Le),Ce.L(Pe.index+1,ne.x,ne.y+Le),Ce.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),ne=E.i(b+1),this.B(z.x,ne.x)&&!this.B(z.y,ne.y)&&(re=new bd,re.layer=Math.floor(z.x/2),oe=E.i(0),le=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=le.x+le.y*le.y,re.rd=Math.min(z.y,ne.y),re.Ic=Math.max(z.y,ne.y),re.index=b,re.link=E,b+2<E.pointsCount&&(oe=E.i(b-1),le=E.i(b+2),ue=0,oe.x<z.x?ue=le.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(ue=le.x>z.x?0:ne.y<z.y?2:1),re.j=ue),x.push(re));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(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ue=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);for(this.zi(x,this.Ux,z,z+ne),pe=1,re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ue<pe?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ue=0,pe=z;pe<b;pe++)Pe=x[pe],(oe?Pe.first:Pe.jc)!==re&&(ue++,re=oe?Pe.first:Pe.jc),Ce=Pe.link,z=Ce.i(Pe.index),ne=Ce.i(Pe.index+1),Le=this.linkSpacing*(ue-(le-1)/2),y++,Ce.uh(),Ce.L(Pe.index,z.x+Le,z.y),Ce.L(Pe.index+1,ne.x+Le,ne.y),Ce.zf()}z=b}a=E}}}},be=Ro.prototype,be.Vx=function(a,y){return a instanceof bd&&y instanceof bd&&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},be.Ux=function(a,y){return a instanceof bd&&y instanceof bd&&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},be.Js=function(a,y){return a instanceof bd&&y instanceof bd&&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},be.B=function(a,y){return a-=y,-1<a&&1>a},be.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&St("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 Cd(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 Ed(a,y,x){a.He[a.tc[y]]=x}Ve.Object.defineProperties(Ro.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()):St("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==N0&&a!==Gp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==B0&&a!==xy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==k0&&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!==A0&&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 N0=new mn(Ro,"CycleDepthFirst",0),Sy=new mn(Ro,"CycleGreedy",1),Gp=new mn(Ro,"CycleFromLayers",2),B0=new mn(Ro,"LayerOptimalLinkLength",0),xy=new mn(Ro,"LayerLongestPathSink",1),Py=new mn(Ro,"LayerLongestPathSource",2),k0=new mn(Ro,"InitDepthFirstOut",0),wy=new mn(Ro,"InitDepthFirstIn",1),Cy=new mn(Ro,"InitNaive",2),Ey=new mn(Ro,"AggressiveNone",0),A0=new mn(Ro,"AggressiveLess",1),by=new mn(Ro,"AggressiveMore",2),Vx=8;Ro.className="LayeredDigraphLayout",Ro.CycleDepthFirst=N0,Ro.CycleGreedy=Sy,Ro.CycleFromLayers=Gp,Ro.LayerOptimalLinkLength=B0,Ro.LayerLongestPathSink=xy,Ro.LayerLongestPathSource=Py,Ro.InitDepthFirstOut=k0,Ro.InitDepthFirstIn=wy,Ro.InitNaive=Cy,Ro.AggressiveNone=Ey,Ro.AggressiveLess=A0,Ro.AggressiveMore=by,Ro.PackNone=0,Ro.PackExpand=1,Ro.PackStraighten=2,Ro.PackMedian=4,Ro.PackAll=15,Ro.AlignNone=0,Ro.AlignUpperLeft=1,Ro.AlignUpperRight=2,Ro.AlignLowerLeft=4,Ro.AlignLowerRight=8,Ro.AlignAll=15;function bd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}bd.className="SegInfo";function kg(a){qo.call(this,a)}Ot(kg,qo),kg.prototype.createVertex=function(){return new Du(this)},kg.prototype.createEdge=function(){return new Wp(this)},kg.className="LayeredDigraphNetwork";function Du(a){ps.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}Ot(Du,ps);function ix(a,y){return a.index-y.index}function T0(a,y){if(!a.$n){for(var x=[],E=Hi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Hi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;St("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Hi(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 Ux(a){if(!a.ao){for(var y=[],x=Hi(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}Du.prototype.Cl=function(a){ps.prototype.Cl.call(this,a),this.bo=this.co=null},Du.prototype.Kl=function(a){ps.prototype.Kl.call(this,a),this.bo=this.co=null},Du.prototype.zl=function(a){ps.prototype.zl.call(this,a),this.$n=this.ao=null},Du.prototype.Jl=function(a){ps.prototype.Jl.call(this,a),this.$n=this.ao=null},Ve.Object.defineProperties(Du.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)}}}),Du.prototype.deleteDestinationEdge=Du.prototype.Jl,Du.prototype.addDestinationEdge=Du.prototype.zl,Du.prototype.deleteSourceEdge=Du.prototype.Kl,Du.prototype.addSourceEdge=Du.prototype.Cl,Du.className="LayeredDigraphVertex";function Wp(a){ql.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ot(Wp,ql),Ve.Object.defineProperties(Wp.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)}}}),Wp.className="LayeredDigraphEdge";function Gr(a){da.call(this),this.Ub=new Bn,this.Wn=R0,this.ud=nc,this.vo=z0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=_0,this.$d=new qn(10,10).freeze();var y=new zf(this);this.W=new Vu(y),this.Y=new Vu(y),this.ru=[],a&&Object.assign(this,a)}Ot(Gr,da),Gr.prototype.cloneProtected=function(a){da.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)},Gr.prototype.qb=function(a){a.classType===Gr?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:St("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Gr.prototype.createNetwork=function(){return new zf(this)},Gr.prototype.makeNetwork=function(a){function y(E){if(E instanceof li)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Kn){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 nn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof cr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Gr.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 nn&&(y=a),this.path===R0&&y!==null?this.ud=y.isTreePathToChildren?nc:Rf:this.ud=this.path===R0?nc: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 Bn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof li?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Vu&&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=rx(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 Vu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&lx(this,y);if(this.Cu(),this.layerStyle===H0){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 Vu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Bn,this.isValidLayout=!0};function Yx(a){var y=new Bn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Gr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case nc:x.sourceEdges.count===0&&this.Ub.add(x);break;case Rf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:St("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=rx(this,a),a!==null&&this.Ub.add(a))};function rx(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case nc:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Rf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:St("Unhandled path value "+a.ud.toString())}}return E}function Ly(a,y){if(y!==null){switch(a.ud){case nc:if(0<y.destinationEdges.count){for(var x=new An,E=y.destinationVertexes;E.next();){var b=E.value;ox(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Rf:if(0<y.sourceEdges.count){for(x=new An,E=y.sourceVertexes;E.next();)b=E.value,ox(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:St("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 ox(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}Gr.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 ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===oc&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,ne=z.length,re=0;re<ne;re++){var oe=z[re];ax(a,oe),x+=oe.descendantCount+1,E=Math.max(E,oe.maxChildrenCount),b=Math.max(b,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Xx(a,y){switch(a.vo){default:case z0:return y.parent!==null?y.parent:a.W;case Oy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy: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}}Gr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Xx(this,a)),a.parent!==null&&a.parent.alignment===oc){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 sx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)sx(a,y[E])}}Gr.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==oc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}Gr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ag:break;case Kp:a.children.reverse();break;case Vp:a.children.sort(a.comparer);break;case Up:a.children.sort(a.comparer),a.children.reverse();break;default:St("Unhandled sorting value "+a.sorting.toString())}},Gr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Gr.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Md(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,ne=0,re=0,oe=a.commentSpacing;if(a.node!==null)for(var le=a.node.Mu();le.next();){var ue=le.value;ue.category==="Comment"&&ue.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ue),ue.Va(),ue=ue.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ue.width),ne+=ue.height+Math.abs(re)):(z+=ue.width+Math.abs(re),ne=Math.max(ne,ue.height)),re=oe)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=vn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=b,vn.free(b))};function Md(a){return a===Vc||a===oc||a===Uc||a===Sc}function $p(a){return a===Vc||a===oc}function Fy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Md(x)){if($p(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Uc)return!0}}return!1}Gr.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=Md(z)),E=E===90||E===270,x=b===90||b===270;for(var ne=a.childrenCount===0,re=Fy(a),oe=0,le=a.comments,ue=le.length,pe=Qe.alloc(),Pe=0;Pe<ue;Pe++){var Ce=le[Pe],Le=Ce.measuredBounds;if(E&&!ne||!z&&!x&&ne||z&&x&&ne){if(135<b&&!z||x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x-a.commentMargin-Le.width,a.bounds.y+oe),Ce.move(pe),Ce=Ce.Sd();Ce.next();){var Oe=Ce.value;Oe.fromSpot=za,Oe.toSpot=rs}else for(pe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Ce.move(pe),Ce=Ce.Sd();Ce.next();)Oe=Ce.value,Oe.fromSpot=rs,Oe.toSpot=za;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Ce.move(pe),Ce=Ce.Sd();Ce.next();)Oe=Ce.value,Oe.fromSpot=rs,Oe.toSpot=za;else for(pe.h(a.bounds.x+a.commentMargin-Le.width,a.bounds.y+oe),Ce.move(pe),Ce=Ce.Sd();Ce.next();)Oe=Ce.value,Oe.fromSpot=za,Oe.toSpot=rs;oe=0<=a.commentSpacing?oe+(Le.height+a.commentSpacing):oe+(a.commentSpacing-Le.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Le.height),Ce.move(pe),Ce=Ce.Sd();Ce.next();)Oe=Ce.value,Oe.fromSpot=Aa,Oe.toSpot=Ka;else for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Ce.move(pe),Ce=Ce.Sd();Ce.next();)Oe=Ce.value,Oe.fromSpot=Ka,Oe.toSpot=Aa;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Ce.move(pe),Ce=Ce.Sd();Ce.next();)Oe=Ce.value,Oe.fromSpot=Ka,Oe.toSpot=Aa;else for(pe.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Le.height),Ce.move(pe),Ce=Ce.Sd();Ce.next();)Oe=Ce.value,Oe.fromSpot=Aa,Oe.toSpot=Ka;oe=0<=a.commentSpacing?oe+(Le.width+a.commentSpacing):oe+(a.commentSpacing-Le.width)}}if(Qe.free(pe),y=oe-a.commentSpacing-(E?y.height:y.width),this.ud===nc)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)}},Gr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case j0:ux(this,a);break;case Yp:if(a.alignment===oc)ux(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Md(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=uh(a);y=b===90||b===270;var z=0,ne=a.children,re=ne.length;for(x=0;x<re;x++)E=ne[x],z=Math.max(z,y?E.Da.width:E.Da.height);var oe=a.alignment;E=oe===ic;var le=oe===rc,ue=Md(oe),pe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Pe=a.nodeSpacing,Ce=this.computeNodeIndent(a),Le=a.rowSpacing,Oe=0;(E||le||a.hm||a.im&&a.maxGenerationCount===1)&&(Oe=Math.max(0,a.rowIndent)),E=a.width;var rt=a.height,Ye=0,vt=0,Pt=0,Ct=null,It=null,rn=0,ri=0,Pi=0,fi=0,$n=0,In=0,ur=0,Ji=0;if(ue&&!$p(oe)&&135<b&&ne.reverse(),$p(oe))if(1<re)for(var vo=0;vo<re;vo++)vo%2===0&&vo!==re-1&&(Ji=Math.max(Ji,y?ne[vo].Da.width:ne[vo].Da.height));else re===1&&(Ji=y?ne[0].Da.width:ne[0].Da.height);if(ue){switch(oe){case Vc:vt=135>b?hx(this,a,ne,Ji,Ye,vt):cx(this,a,ne,Ji,Ye,vt),Ji=vt.x,Ye=vt.width,vt=vt.height;break;case Uc:for(Ct=0;Ct<re;Ct++)It=ne[Ct],pe=It.Da,Pt=In===0?0:Le,y?(It.S.h(z-pe.width,fi+Pt),Ye=Math.max(Ye,pe.width),vt=Math.max(vt,fi+Pt+pe.height),fi+=Pt+pe.height):(It.S.h(Pi+Pt,z-pe.height),Ye=Math.max(Ye,Pi+Pt+pe.width),vt=Math.max(vt,pe.height),Pi+=Pt+pe.width),In++;break;case Sc:for(Ct=0;Ct<re;Ct++)It=ne[Ct],z=It.Da,pe=In===0?0:Le,y?(It.S.h(Pe/2+a.focus.x,fi+pe),Ye=Math.max(Ye,z.width),vt=Math.max(vt,fi+pe+z.height),fi+=pe+z.height):(It.S.h(Pi+pe,Pe/2+a.focus.y),Ye=Math.max(Ye,Pi+pe+z.width),vt=Math.max(vt,z.height),Pi+=pe+z.width),In++}Ct=Hl(this,2),It=Hl(this,2),y?(Ct[0].h(0,0),Ct[1].h(0,vt),It[0].h(Ye,0)):(Ct[0].h(0,0),Ct[1].h(Ye,0),It[0].h(0,vt)),It[1].h(Ye,vt)}else for(vo=0;vo<re;vo++){var Xo=ne[vo],xs=Xo.Da;if(y){0<pe&&0<In&&Pi+Pe+xs.width>pe&&(Pi<z&&sf(a,oe,z-Pi,0,ur,vo-1),$n++,In=0,ur=vo,Pt=vt,Pi=0,fi=135<b?-vt-Le:vt+Le),O0(this,Xo,0,fi);var Es=0;if(In===0)Ct=Xo.Yo,It=Xo.kp,rn=xs.width,ri=xs.height,(Ct===null||It===null||b!==uh(Xo))&&(Ct=Hl(this,2),It=Hl(this,2),Ct[0].h(0,0),Ct[1].h(0,ri),It[0].h(rn,0),It[1].h(rn,ri));else{var al=Qn();ri=dx(this,a,Xo,Ct,It,rn,ri,al),Es=ri.x,Ct=al[0],It=al[1],rn=ri.width,ri=ri.height,di(al),Pi<xs.width&&0>Es&&(If(a,-Es,0,ur,vo-1),I0(Ct,-Es,0),I0(It,-Es,0),Es=0)}Xo.S.h(Es,fi),Ye=Math.max(Ye,rn),vt=Math.max(vt,Pt+($n===0?0:Le)+xs.height),Pi=rn}else 0<pe&&0<In&&fi+Pe+xs.height>pe&&(fi<z&&sf(a,oe,0,z-fi,ur,vo-1),$n++,In=0,ur=vo,Pt=Ye,fi=0,Pi=135<b?-Ye-Le:Ye+Le),O0(this,Xo,Pi,0),Es=0,In===0?(Ct=Xo.Yo,It=Xo.kp,rn=xs.width,ri=xs.height,(Ct===null||It===null||b!==uh(Xo))&&(Ct=Hl(this,2),It=Hl(this,2),Ct[0].h(0,0),Ct[1].h(rn,0),It[0].h(0,ri),It[1].h(rn,ri))):(al=Qn(),ri=dx(this,a,Xo,Ct,It,rn,ri,al),Es=ri.x,Ct=al[0],It=al[1],rn=ri.width,ri=ri.height,di(al),fi<xs.height&&0>Es&&(If(a,0,-Es,ur,vo-1),I0(Ct,0,-Es),I0(It,0,-Es),Es=0)),Xo.S.h(Pi,Es),vt=Math.max(vt,ri),Ye=Math.max(Ye,Pt+($n===0?0:Le)+xs.width),fi=ri;In++}switch(0<$n&&(y?(vt+=Math.max(0,x),Pi<Ye&&sf(a,oe,Ye-Pi,0,ur,re-1),0<Oe&&(le||If(a,Oe,0,0,re-1),Ye+=Oe)):(Ye+=Math.max(0,x),fi<vt&&sf(a,oe,0,vt-fi,ur,re-1),0<Oe&&(le||If(a,0,Oe,0,re-1),vt+=Oe))),Oe=le=0,oe){case Tg:y?le+=Ye/2-a.focus.x-Ce/2:Oe+=vt/2-a.focus.y-Ce/2;break;case jf:0<$n?y?le+=Ye/2-a.focus.x-Ce/2:Oe+=vt/2-a.focus.y-Ce/2:y?(Ji=ne[0].S.x+ne[0].la.x,le+=Ji+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-Ji)/2-a.focus.x-Ce/2):(Ji=ne[0].S.y+ne[0].la.y,Oe+=Ji+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-Ji)/2-a.focus.y-Ce/2);break;case ic:y?(le-=Ce,Ye+=Ce):(Oe-=Ce,vt+=Ce);break;case rc:y?(le+=Ye-a.width+Ce,Ye+=Ce):(Oe+=vt-a.height+Ce,vt+=Ce);break;case Vc:y?1<re?le+=Ji+Pe/2-a.focus.x:le+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?Oe+=Ji+Pe/2-a.focus.y:Oe+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uc:y?le+=Ye+Pe/2-a.focus.x:Oe+=vt+Pe/2-a.focus.y;break;case Sc:break;default:vt=this.customAlignment(a,le,Oe,Ye,vt),le=vt[0],Oe=vt[1],Ye=vt[2],vt=vt[3]}for(Ce=0;Ce<re;Ce++)Ji=ne[Ce],y?Ji.S.h(Ji.S.x+Ji.la.x-le,Ji.S.y+(135<b?(ue?-vt:-Ji.Da.height)+Ji.la.y-x:rt+x+Ji.la.y)):Ji.S.h(Ji.S.x+(135<b?(ue?-Ye:-Ji.Da.width)+Ji.la.x-x:E+x+Ji.la.x),Ji.S.y+Ji.la.y-Oe);if(re=ne=0,ue?y?(Ye=Ny(a,Ye,le),0>le&&(le=0),135<b&&(Oe+=vt+x),vt+=rt+x,oe===Sc&&(ne+=Pe/2+a.focus.x),re+=rt+x):(135<b&&(le+=Ye+x),Ye+=E+x,vt=By(a,vt,Oe),0>Oe&&(Oe=0),oe===Sc&&(re+=Pe/2+a.focus.y),ne+=E+x):y?(a.comments===null?E>Ye&&(Ye=ky(oe,E-Ye,0),ne=Ye.x,re=Ye.y,Ye=E,le=0):Ye=Ny(a,Ye,le),0>le&&(ne-=le,le=0),135<b&&(Oe+=vt+x),vt=Math.max(Math.max(vt,rt),vt+rt+x),re+=rt+x):(135<b&&(le+=Ye+x),Ye=Math.max(Math.max(Ye,E),Ye+E+x),a.comments===null?rt>vt&&(vt=ky(oe,0,rt-vt),ne=vt.x,re=vt.y,vt=rt,Oe=0):vt=By(a,vt,Oe),0>Oe&&(re-=Oe,Oe=0),ne+=E+x),0<$n)b=Hl(this,4),$n=Hl(this,4),y?(b[2].h(0,rt+x),b[3].h(b[2].x,vt),$n[2].h(Ye,b[2].y),$n[3].h($n[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Ye,b[2].y),$n[2].h(b[2].x,vt),$n[3].h(b[3].x,$n[2].y));else{for(b=Hl(this,Ct.length+2),$n=Hl(this,It.length+2),oe=0;oe<Ct.length;oe++)ue=Ct[oe],b[oe+2].h(ue.x+ne,ue.y+re);for(oe=0;oe<It.length;oe++)ue=It[oe],$n[oe+2].h(ue.x+ne,ue.y+re)}y?(b[0].h(le,0),b[1].h(b[0].x,rt),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])),$n[0].h(le+E,0),$n[1].h($n[0].x,rt),$n[2].y<$n[1].y&&($n[2].x<$n[0].x?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].y<$n[2].y&&($n[3].x<$n[0].x?$n[3].assign($n[2]):$n[2].assign($n[3])),b[2].y-=x/2,$n[2].y-=x/2):(b[0].h(0,Oe),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])),$n[0].h(0,Oe+rt),$n[1].h(E,$n[0].y),$n[2].x<$n[1].x&&($n[2].y<$n[0].y?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].x<$n[2].x&&($n[3].y<$n[0].y?$n[3].assign($n[2]):$n[2].assign($n[3])),b[2].x-=x/2,$n[2].x-=x/2),xh(this,Ct),xh(this,It),a.Yo=b,a.kp=$n,a.la.h(le,Oe),a.Da.h(Ye,vt)}break;default:St("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=Md(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=uh(y),x=E===90||E===270;var z=0;b=y.children;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var le=y.alignment,ue=le===ic,pe=le===rc;re=Md(le);var Pe=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Ce=y.nodeSpacing,Le=a.computeNodeIndent(y),Oe=ue||pe?0:Le/2,rt=y.rowSpacing,Ye=0;(ue||pe||y.hm||y.im&&y.maxGenerationCount===1)&&(Ye=Math.max(0,y.rowIndent)),ue=y.width;var vt=y.height,Pt=0,Ct=0,It=0,rn=0,ri=0,Pi=0,fi=0,$n=0,In=0,ur=0;if(re&&!$p(le)&&135<E&&b.reverse(),$p(le))if(1<ne)for(var Ji=0;Ji<ne;Ji++){var vo=b[Ji],Xo=vo.Da;Ji%2===0&&Ji!==ne-1?In=Math.max(In,(x?Xo.width:Xo.height)+a.computeBusNodeSpacing(vo)-Ce):Ji%2!==0&&(ur=Math.max(ur,(x?Xo.width:Xo.height)+a.computeBusNodeSpacing(vo)-Ce))}else ne===1&&(In=x?b[0].Da.width:b[0].Da.height);if(re)switch(le){case Vc:case oc:Ct=135>E?hx(a,y,b,In,Pt,Ct):cx(a,y,b,In,Pt,Ct),In=Ct.x,Pt=Ct.width,Ct=Ct.height;break;case Uc:for(Pe=0;Pe<ne;Pe++)Oe=b[Pe],It=Oe.Da,ur=fi===0?0:rt,x?(Oe.S.h(z-It.width,ri+ur),Pt=Math.max(Pt,It.width),Ct=Math.max(Ct,ri+ur+It.height),ri+=ur+It.height):(Oe.S.h(rn+ur,z-It.height),Pt=Math.max(Pt,rn+ur+It.width),Ct=Math.max(Ct,It.height),rn+=ur+It.width),fi++;break;case Sc:for(z=0;z<ne;z++)Pe=b[z],Oe=Pe.Da,It=fi===0?0:rt,x?(Pe.S.h(Ce/2+y.focus.x,ri+It),Pt=Math.max(Pt,Oe.width),Ct=Math.max(Ct,ri+It+Oe.height),ri+=It+Oe.height):(Pe.S.h(rn+It,Ce/2+y.focus.y),Pt=Math.max(Pt,rn+It+Oe.width),Ct=Math.max(Ct,Oe.height),rn+=It+Oe.width),fi++}else for(ur=0;ur<ne;ur++)Ji=b[ur],vo=Ji.Da,x?(0<Pe&&0<fi&&rn+Ce+vo.width>Pe&&(rn<z&&sf(y,le,z-rn,0,$n,ur-1),Pi++,fi=0,$n=ur,It=Ct,rn=0,ri=135<E?-Ct-rt:Ct+rt),Xo=fi===0?Oe:Ce,O0(a,Ji,0,ri),Ji.S.h(rn+Xo,ri),Pt=Math.max(Pt,rn+Xo+vo.width),Ct=Math.max(Ct,It+(Pi===0?0:rt)+vo.height),rn+=Xo+vo.width):(0<Pe&&0<fi&&ri+Ce+vo.height>Pe&&(ri<z&&sf(y,le,0,z-ri,$n,ur-1),Pi++,fi=0,$n=ur,It=Pt,ri=0,rn=135<E?-Pt-rt:Pt+rt),Xo=fi===0?Oe:Ce,O0(a,Ji,rn,0),Ji.S.h(rn,ri+Xo),Ct=Math.max(Ct,ri+Xo+vo.height),Pt=Math.max(Pt,It+(Pi===0?0:rt)+vo.width),ri+=Xo+vo.height),fi++;switch(0<Pi&&(x?(Ct+=Math.max(0,oe),rn<Pt&&sf(y,le,Pt-rn,0,$n,ne-1),0<Ye&&(pe||If(y,Ye,0,0,ne-1),Pt+=Ye)):(Pt+=Math.max(0,oe),ri<Ct&&sf(y,le,0,Ct-ri,$n,ne-1),0<Ye&&(pe||If(y,0,Ye,0,ne-1),Ct+=Ye))),Ye=pe=0,le){case Tg:x?pe+=Pt/2-y.focus.x-Le/2:Ye+=Ct/2-y.focus.y-Le/2;break;case jf:0<Pi?x?pe+=Pt/2-y.focus.x-Le/2:Ye+=Ct/2-y.focus.y-Le/2:x?(a=b[0].S.x+b[0].la.x,pe+=a+(b[ne-1].S.x+b[ne-1].la.x+2*b[ne-1].focus.x-a)/2-y.focus.x-Le/2):(a=b[0].S.y+b[0].la.y,Ye+=a+(b[ne-1].S.y+b[ne-1].la.y+2*b[ne-1].focus.y-a)/2-y.focus.y-Le/2);break;case ic:x?(pe-=Le,Pt+=Le):(Ye-=Le,Ct+=Le);break;case rc:x?(pe+=Pt-y.width+Le,Pt+=Le):(Ye+=Ct-y.height+Le,Ct+=Le);break;case Vc:case oc:x?1<ne?pe+=In+Ce/2-y.focus.x:pe+=b[0].focus.x-y.focus.x+b[0].la.x:1<ne?Ye+=In+Ce/2-y.focus.y:Ye+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Uc:x?pe+=Pt+Ce/2-y.focus.x:Ye+=Ct+Ce/2-y.focus.y;break;case Sc:break;default:a=a.customAlignment(y,pe,Ye,Pt,Ct),pe=a[0],Ye=a[1],Pt=a[2],Ct=a[3]}for(a=0;a<ne;a++)Le=b[a],x?Le.S.h(Le.S.x+Le.la.x-pe,Le.S.y+(135<E?(re?-Ct:-Le.Da.height)+Le.la.y-oe:vt+oe+Le.la.y)):Le.S.h(Le.S.x+(135<E?(re?-Pt:-Le.Da.width)+Le.la.x-oe:ue+oe+Le.la.x),Le.S.y+Le.la.y-Ye);x?(Pt=Ny(y,Pt,pe),0>pe&&(pe=0),135<E&&(Ye+=Ct+oe),Ct=Math.max(Math.max(Ct,vt),Ct+vt+oe)):(135<E&&(pe+=Pt+oe),Pt=Math.max(Math.max(Pt,ue),Pt+ue+oe),Ct=By(y,Ct,Ye),0>Ye&&(Ye=0)),y.la.h(pe,Ye),y.Da.h(Pt,Ct)}}Gr.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new vn(E,0,b,z);if(ne===1)return y=x[0],b=y.Da.width,z=y.Da.height,new vn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=uh(y)===90,ue=0,pe=0,Pe=0,Ce=0;Ce<ne;Ce++)if(!(Ce%2!==0||1<ne&&Ce===ne-1)){var Le=x[Ce],Oe=Le.Da,rt=ue===0?0:oe;if(le){var Ye=a.computeBusNodeSpacing(Le)-re;Le.S.h(E-(Oe.width+Ye),Pe+rt),b=Math.max(b,Oe.width+Ye),z=Math.max(z,Pe+rt+Oe.height),Pe+=rt+Oe.height}else Ye=a.computeBusNodeSpacing(Le)-re,Le.S.h(pe+rt,E-(Oe.height+Ye)),z=Math.max(z,Oe.height+Ye),b=Math.max(b,pe+rt+Oe.width),pe+=rt+Oe.width;ue++}for(ue=0,Le=pe,Ce=Pe,le?(pe=E+re,Pe=0):(pe=0,Pe=E+re),Oe=0;Oe<ne;Oe++)if(Oe%2!==0){rt=x[Oe],Ye=rt.Da;var vt=ue===0?0:oe;if(le){var Pt=a.computeBusNodeSpacing(rt)-re;rt.S.h(pe+Pt,Pe+vt),b=Math.max(b,pe+Ye.width+Pt),z=Math.max(z,Pe+vt+Ye.height),Pe+=vt+Ye.height}else Pt=a.computeBusNodeSpacing(rt)-re,rt.S.h(pe+vt,Pe+Pt),b=Math.max(b,pe+vt+Ye.width),z=Math.max(z,Pe+Ye.height+Pt),pe+=vt+Ye.width;ue++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(Ce),Math.abs(Pe)):Math.max(Math.abs(Le),Math.abs(pe))),le?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),le=E+re/2-x.focus.x-x.la.x,b=Math.max(b,le+ne.width),0>le&&(b-=le),z=Math.max(z,Math.max(Ce,Pe)+a+ne.height),0>x.S.x&&(E=D0(y,x.S.x,!1,E,re))):(x.S.h(b+a,E+re/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Le,pe)+a+ne.width),Pe=E+re/2-x.focus.y-x.la.y,z=Math.max(z,Pe+ne.height),0>Pe&&(z-=Pe),0>x.S.y&&(E=D0(y,x.S.y,!0,E,re)))),new vn(E,0,b,z)}function cx(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new vn(E,0,b,z);if(ne===1)return x=x[0],b=x.Da.width,z=x.Da.height,new vn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=uh(y)===270,ue=0,pe=0,Pe=0,Ce=0;Ce<ne;Ce++)if(!(Ce%2!==0||1<ne&&Ce===ne-1)){var Le=x[Ce],Oe=Le.Da,rt=ue===0?0:oe;if(le){var Ye=a.computeBusNodeSpacing(Le)-re;Pe-=rt+Oe.height,Le.S.h(E-(Oe.width+Ye),Pe),b=Math.max(b,Oe.width+Ye),z=Math.max(z,Math.abs(Pe))}else Ye=a.computeBusNodeSpacing(Le)-re,pe-=rt+Oe.width,Le.S.h(pe,E-(Oe.height+Ye)),z=Math.max(z,Oe.height+Ye),b=Math.max(b,Math.abs(pe));ue++}for(ue=0,Le=pe,Ce=Pe,le?(pe=E+re,Pe=0):(pe=0,Pe=E+re),Oe=0;Oe<ne;Oe++)if(Oe%2!==0){rt=x[Oe],Ye=rt.Da;var vt=ue===0?0:oe;if(le){var Pt=a.computeBusNodeSpacing(rt)-re;Pe-=vt+Ye.height,rt.S.h(pe+Pt,Pe),b=Math.max(b,pe+Ye.width+Pt),z=Math.max(z,Math.abs(Pe))}else Pt=a.computeBusNodeSpacing(rt)-re,pe-=vt+Ye.width,rt.S.h(pe,Pe+Pt),z=Math.max(z,Pe+Ye.height+Pt),b=Math.max(b,Math.abs(pe));ue++}for(1<ne&&ne%2===1&&(oe=x[ne-1],ue=oe.Da,a=a.computeBusLastRowSpacing(oe,le?Math.max(Math.abs(Ce),Math.abs(Pe)):Math.max(Math.abs(Le),Math.abs(pe))),le?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-ue.height-a),pe=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,pe+ue.width),0>pe&&(b-=pe),z=Math.max(z,Math.abs(Math.min(Ce,Pe))+a+ue.height),0>oe.S.x&&(E=D0(y,oe.S.x,!1,E,re))):(oe.S.h(-b-ue.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(Le,pe))+a+ue.width),Pe=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,Pe+ue.height),0>Pe&&(z-=Pe),0>oe.S.y&&(E=D0(y,oe.S.y,!0,E,re)))),y=0;y<ne;y++)re=x[y],le?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new vn(E,0,b,z)}Gr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Gr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function D0(a,y,x,E,b){a=a.children;for(var z=a.length,ne=0;ne<z;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].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 Ny(a,y,x){switch(a.alignment){case jf:case Tg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ic:return a.width>y?a.width:y;case rc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Vc:case oc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Uc:return a.width-a.focus.x+a.nodeSpacing/2+y;case Sc:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function By(a,y,x){switch(a.alignment){case jf:case Tg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ic:return a.height>y?a.height:y;case rc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Vc:case oc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Uc:return a.height-a.focus.y+a.nodeSpacing/2+y;case Sc:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function ky(a,y,x){switch(a){case Tg:y/=2,x/=2;break;case jf:y/=2,x/=2;break;case ic:x=y=0;break;case rc:break;default:St("Unhandled alignment value "+a.toString())}return new Qe(y,x)}function sf(a,y,x,E,b,z){y=ky(y,x,E),If(a,y.x,y.y,b,z)}function If(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 O0(a,y,x,E){var b=y.parent;switch(a.ud){case nc:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Rf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:St("Unhandled path value "+a.ud.toString())}}function I0(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function dx(a,y,x,E,b,z,ne,re){var oe=uh(y),le=oe===90||oe===270,ue=y.nodeSpacing;y=E;var pe=b;E=z;var Pe=ne,Ce=x.Yo,Le=x.kp;ne=x.Da;var Oe=le?Math.max(Pe,ne.height):Math.max(E,ne.width);if((Ce===null||oe!==uh(x))&&(Ce=Hl(a,2),Le=Hl(a,2),le?(Ce[0].h(0,0),Ce[1].h(0,ne.height),Le[0].h(ne.width,0),Le[1].h(Le[0].x,Ce[1].y)):(Ce[0].h(0,0),Ce[1].h(ne.width,0),Le[0].h(0,ne.height),Le[1].h(Ce[1].x,Le[0].y))),le){if(Pe=9999999,!(pe===null||2>pe.length||Ce===null||2>Ce.length))for(b=x=0;x<pe.length&&b<Ce.length;){z=pe[x];var rt=Ce[b];oe=rt.x,le=rt.y,oe+=E;var Ye=z;x+1<pe.length&&(Ye=pe[x+1]);var vt=rt;rt=vt.x,vt=vt.y,b+1<Ce.length&&(vt=Ce[b+1],rt=vt.x,vt=vt.y,rt+=E);var Pt=Pe;z.y===le?Pt=oe-z.x:z.y>le&&z.y<vt?Pt=oe+(z.y-le)/(vt-le)*(rt-oe)-z.x:le>z.y&&le<Ye.y&&(Pt=oe-(z.x+(le-z.y)/(Ye.y-z.y)*(Ye.x-z.x))),Pt<Pe&&(Pe=Pt),Ye.y<=z.y?x++:vt<=le?b++:(Ye.y<=vt&&x++,vt<=Ye.y&&b++)}if(Pe=E-Pe,Pe+=ue,x=Ce,b=Pe,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ue=Hl(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)le=x[z++],ue[E++].h(le.x+b,le.y);for(;oe<y.length;)le=y[oe++],ue[E++].h(le.x,le.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)le=x[z++],ue[E++].h(le.x+b,le.y);for(x=Hl(a,E),oe=0;oe<E;oe++)x[oe].assign(ue[oe]);xh(a,ue),E=x}if(z=Le,oe=Pe,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ue=Hl(a,pe.length+z.length),b=le=x=0;x<pe.length&&pe[x].y<z[0].y;)Ye=pe[x++],ue[b++].h(Ye.x,Ye.y);for(;le<z.length;)Ye=z[le++],ue[b++].h(Ye.x+oe,Ye.y);for(z=z[z.length-1].y;x<pe.length&&pe[x].y<=z;)x++;for(;x<pe.length&&pe[x].y>z;)oe=pe[x++],ue[b++].h(oe.x,oe.y);for(z=Hl(a,b),x=0;x<b;x++)z[x].assign(ue[x]);xh(a,ue),b=z}return z=Math.max(0,Pe)+ne.width,ne=Oe,xh(a,y),xh(a,Ce),xh(a,pe),xh(a,Le),re[0]=E,re[1]=b,new vn(Pe,0,z,ne)}if(E=9999999,!(pe===null||2>pe.length||Ce===null||2>Ce.length))for(b=x=0;x<pe.length&&b<Ce.length;)z=pe[x],rt=Ce[b],oe=rt.x,le=rt.y,le+=Pe,Ye=z,x+1<pe.length&&(Ye=pe[x+1]),vt=rt,rt=vt.x,vt=vt.y,b+1<Ce.length&&(vt=Ce[b+1],rt=vt.x,vt=vt.y,vt+=Pe),Pt=E,z.x===oe?Pt=le-z.y:z.x>oe&&z.x<rt?Pt=le+(z.x-oe)/(rt-oe)*(vt-le)-z.y:oe>z.x&&oe<Ye.x&&(Pt=le-(z.y+(oe-z.x)/(Ye.x-z.x)*(Ye.y-z.y))),Pt<E&&(E=Pt),Ye.x<=z.x?x++:rt<=oe?b++:(Ye.x<=rt&&x++,rt<=Ye.x&&b++);if(Pe-=E,Pe+=ue,x=Ce,b=Pe,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ue=Hl(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)le=x[z++],ue[E++].h(le.x,le.y+b);for(;oe<y.length;)le=y[oe++],ue[E++].h(le.x,le.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)le=x[z++],ue[E++].h(le.x,le.y+b);for(x=Hl(a,E),oe=0;oe<E;oe++)x[oe].assign(ue[oe]);xh(a,ue),E=x}if(z=Le,oe=Pe,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ue=Hl(a,pe.length+z.length),b=le=x=0;x<pe.length&&pe[x].x<z[0].x;)Ye=pe[x++],ue[b++].h(Ye.x,Ye.y);for(;le<z.length;)Ye=z[le++],ue[b++].h(Ye.x,Ye.y+oe);for(z=z[z.length-1].x;x<pe.length&&pe[x].x<=z;)x++;for(;x<pe.length&&pe[x].x>z;)oe=pe[x++],ue[b++].h(oe.x,oe.y);for(z=Hl(a,b),x=0;x<b;x++)z[x].assign(ue[x]);xh(a,ue),b=z}return z=Oe,ne=Math.max(0,Pe)+ne.height,xh(a,y),xh(a,Ce),xh(a,pe),xh(a,Le),re[0]=E,re[1]=b,new vn(Pe,0,z,ne)}function Hl(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 Qe;return a}function xh(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Gr.prototype.arrangeTrees=function(){if(this.Rb===Z0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Vu){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 Vu&&a.push(x);switch(this.sorting){case Ag:break;case Kp:a.reverse();break;case Vp:a.sort(this.comparer);break;case Up:a.sort(this.comparer),a.reverse();break;default:St("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 _0:x+=b.Da.height+this.$d.height;break;case Iy:y+=b.Da.width+this.$d.width;break;default:St("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 ne=y[z];Ay(a,ne,x+ne.S.x,E+ne.S.y)}}}Gr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Gr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Gr.prototype.Gu=function(){if(this.layerStyle===H0){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 Qe(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Qe(-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 ne=0;ne<a.length;ne++)z+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var re=a[ne]+y[ne];this.angle===270?(z-=re,b.push(new vn(0,z,x,re))):this.angle===90?(b.push(new vn(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new vn(z,0,re,x))):(b.push(new vn(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},Gr.prototype.commitLayers=function(){},Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Gr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Vu&&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])}}Gr.prototype.setPortSpots=function(a){var y=a.alignment;if(Md(y)){var x=this.ud===nc,E=uh(a);switch(E){case 0:var b=rs;break;case 90:b=Ka;break;case 180:b=za;break;default:b=Aa}var z=a.children,ne=z.length;switch(y){case Vc:case oc:for(y=0;y<ne;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=E===90||E===270?za:Aa;if(ne===1||y===ne-1&&ne%2===1)switch(E){case 0:oe=za;break;case 90:oe=Aa;break;case 180:oe=rs;break;default:oe=Ka}else y%2===0&&(oe=E===90||E===270?rs:Ka);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case Uc:for(E=E===90||E===270?rs:Ka,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)));break;case Sc:for(E=E===90||E===270?za:Aa,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)))}}else if(x=uh(a),this.ud===nc){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=rs;break;case 90:E.fromSpot=Ka;break;case 180:E.fromSpot=za;break;default:E.fromSpot=Aa}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=za;break;case 90:E.toSpot=Aa;break;case 180:E.toSpot=rs;break;default:E.toSpot=Ka}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=rs;break;case 90:E.toSpot=Ka;break;case 180:E.toSpot=za;break;default:E.toSpot=Aa}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=za;break;case 90:E.fromSpot=Aa;break;case 180:E.fromSpot=rs;break;default:E.fromSpot=Ka}else E.fromSpot=a.childPortSpot}};function uh(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Gr.prototype.computeLayerSpacing=function(a){var y=uh(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},Gr.prototype.computeNodeIndent=function(a){var y=uh(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)},Ve.Object.defineProperties(Gr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==z0&&a!==Dy&&a!==Ty&&a!==Oy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==jy&&a!==H0||(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!==_0&&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!==Ag&&a!==Kp&&a!==Vp&&!Up||(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()):St("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==j0&&a!==Yp||(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!==Ag&&a!==Kp&&a!==Vp&&!Up||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==j0&&a!==Yp||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var R0=new mn(Gr,"PathDefault",-1),nc=new mn(Gr,"PathDestination",0),Rf=new mn(Gr,"PathSource",1),Ag=new mn(Gr,"SortingForwards",10),Kp=new mn(Gr,"SortingReverse",11),Vp=new mn(Gr,"SortingAscending",12),Up=new mn(Gr,"SortingDescending",13),Tg=new mn(Gr,"AlignmentCenterSubtrees",20),jf=new mn(Gr,"AlignmentCenterChildren",21),ic=new mn(Gr,"AlignmentStart",22),rc=new mn(Gr,"AlignmentEnd",23),Vc=new mn(Gr,"AlignmentBus",24),oc=new mn(Gr,"AlignmentBusBranching",25),Uc=new mn(Gr,"AlignmentTopLeftBus",26),Sc=new mn(Gr,"AlignmentBottomRightBus",27),j0=new mn(Gr,"CompactionNone",30),Yp=new mn(Gr,"CompactionBlock",31),z0=new mn(Gr,"StyleLayered",40),Ty=new mn(Gr,"StyleLastParents",41),Dy=new mn(Gr,"StyleAlternating",42),Oy=new mn(Gr,"StyleRootOnly",43),_0=new mn(Gr,"ArrangementVertical",50),Iy=new mn(Gr,"ArrangementHorizontal",51),Z0=new mn(Gr,"ArrangementFixedRoots",52),Ry=new mn(Gr,"LayerIndividual",60),jy=new mn(Gr,"LayerSiblings",61),H0=new mn(Gr,"LayerUniform",62);Gr.className="TreeLayout",Gr.PathDefault=R0,Gr.PathDestination=nc,Gr.PathSource=Rf,Gr.SortingForwards=Ag,Gr.SortingReverse=Kp,Gr.SortingAscending=Vp,Gr.SortingDescending=Up,Gr.AlignmentCenterSubtrees=Tg,Gr.AlignmentCenterChildren=jf,Gr.AlignmentStart=ic,Gr.AlignmentEnd=rc,Gr.AlignmentBus=Vc,Gr.AlignmentBusBranching=oc,Gr.AlignmentTopLeftBus=Uc,Gr.AlignmentBottomRightBus=Sc,Gr.CompactionNone=j0,Gr.CompactionBlock=Yp,Gr.StyleLayered=z0,Gr.StyleLastParents=Ty,Gr.StyleAlternating=Dy,Gr.StyleRootOnly=Oy,Gr.ArrangementVertical=_0,Gr.ArrangementHorizontal=Iy,Gr.ArrangementFixedRoots=Z0,Gr.LayerIndividual=Ry,Gr.LayerSiblings=jy,Gr.LayerUniform=H0;function zf(a){qo.call(this,a)}Ot(zf,qo),zf.prototype.createVertex=function(){return new Vu(this)},zf.prototype.createEdge=function(){return new Dg(this)},zf.className="TreeNetwork";function Vu(a){ps.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 Qe(0,0),this.Da=new qn(0,0),this.la=new Qe(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ag,this.hd=ry,this.Kb=0,this.Jb=jf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Yp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Co,this.wr=!0,this.Dp=Co}Ot(Vu,ps),Vu.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)},Ve.Object.defineProperties(Vu.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)}}}),Vu.className="TreeVertex";function Dg(a){ql.call(this,a),this.$t=new Qe(0,0)}Ot(Dg,ql),Dg.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 nc:x=this.fromVertex,E=this.toVertex;break;case Rf:x=this.toVertex,E=this.fromVertex;break;default:St("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=uh(x),ne=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===pu,le=a.isOrthogonal,ue;if(a.uh(),le||oe){for(ue=2;4<a.pointsCount;)a.pv(2);var pe=a.i(1),Pe=a.i(2)}else{for(ue=1;3<a.pointsCount;)a.pv(1);pe=a.i(0),Pe=a.i(a.pointsCount-1)}var Ce=a.i(a.pointsCount-1);z===0?(x.alignment===rc?(z=E.bottom+b.y,b.y===0&&pe.y>Ce.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.top+b.y,b.y===0&&pe.y<Ce.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.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,oe?(a.m(ue,pe.x,z),ue++,a.m(ue,E.right+ne,z),ue++,a.m(ue,E.right+ne+(b.x-re)/3,z),ue++,a.m(ue,E.right+ne+2*(b.x-re)/3,z),ue++,a.m(ue,E.right+ne+(b.x-re),z),ue++,a.m(ue,Pe.x,z)):(le&&(a.m(ue,E.right+ne/2,pe.y),ue++),a.m(ue,E.right+ne/2,z),ue++,a.m(ue,E.right+ne+b.x-(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,Pe.y))):z===90?(x.alignment===rc?(z=E.right+b.x,b.x===0&&pe.x>Ce.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.left+b.x,b.x===0&&pe.x<Ce.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.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,oe?(a.m(ue,z,pe.y),ue++,a.m(ue,z,E.bottom+ne),ue++,a.m(ue,z,E.bottom+ne+(b.y-re)/3),ue++,a.m(ue,z,E.bottom+ne+2*(b.y-re)/3),ue++,a.m(ue,z,E.bottom+ne+(b.y-re)),ue++,a.m(ue,z,Pe.y)):(le&&(a.m(ue,pe.x,E.bottom+ne/2),ue++),a.m(ue,z,E.bottom+ne/2),ue++,a.m(ue,z,E.bottom+ne+b.y-(le?re/2:re)),ue++,le&&a.m(ue,Pe.x,a.i(ue-1).y))):z===180?(x.alignment===rc?(z=E.bottom+b.y,b.y===0&&pe.y>Ce.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.top+b.y,b.y===0&&pe.y<Ce.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.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,oe?(a.m(ue,pe.x,z),ue++,a.m(ue,E.left-ne,z),ue++,a.m(ue,E.left-ne+(b.x+re)/3,z),ue++,a.m(ue,E.left-ne+2*(b.x+re)/3,z),ue++,a.m(ue,E.left-ne+(b.x+re),z),ue++,a.m(ue,Pe.x,z)):(le&&(a.m(ue,E.left-ne/2,pe.y),ue++),a.m(ue,E.left-ne/2,z),ue++,a.m(ue,E.left-ne+b.x+(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,Pe.y))):z===270?(x.alignment===rc?(z=E.right+b.x,b.x===0&&pe.x>Ce.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.left+b.x,b.x===0&&pe.x<Ce.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.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,oe?(a.m(ue,z,pe.y),ue++,a.m(ue,z,E.top-ne),ue++,a.m(ue,z,E.top-ne+(b.y+re)/3),ue++,a.m(ue,z,E.top-ne+2*(b.y+re)/3),ue++,a.m(ue,z,E.top-ne+(b.y+re)),ue++,a.m(ue,z,Pe.y)):(le&&(a.m(ue,pe.x,E.top-ne/2),ue++),a.m(ue,z,E.top-ne/2),ue++,a.m(ue,z,E.top-ne+b.y+(le?re/2:re)),ue++,le&&a.m(ue,Pe.x,a.i(ue-1).y))):St("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=uh(x),y!==uh(b)&&(ne=E.computeLayerSpacing(x),re=x.bounds,x=b.bounds,y===0&&x.left-re.right<ne+1||y===90&&x.top-re.bottom<ne+1||y===180&&re.left-x.right<ne+1||y===270&&re.top-x.bottom<ne+1||(a.vg(),x=a.curve===pu,b=a.isOrthogonal,E=Md(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+ne/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=re.bottom+ne/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=re.left-ne/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=re.top-ne/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()))}}},Ve.Object.defineProperties(Dg.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)}}}),Dg.className="TreeEdge",Vr.prototype.initializeStandardTools=function(){this.gb("Action",new xr,this.mouseDownTools),this.gb("Relinking",new xi,this.mouseDownTools),this.gb("LinkReshaping",new Mi,this.mouseDownTools),this.gb("Rotating",new Ur,this.mouseDownTools),this.gb("Resizing",new fr,this.mouseDownTools),this.gb("Linking",new Tn,this.mouseMoveTools),this.gb("Dragging",new aa,this.mouseMoveTools),this.gb("DragSelecting",new Sr,this.mouseMoveTools),this.gb("Panning",new $i,this.mouseMoveTools),this.gb("ContextMenu",new xo,this.mouseUpTools),this.gb("TextEditing",new oo,this.mouseUpTools),this.gb("ClickCreating",new Hr,this.mouseUpTools),this.gb("ClickSelecting",new zo,this.mouseUpTools)},Ih("Horizontal",new vm),Ih("Spot",new Sm),Ih("Table",new Pm),Ih("Viewbox",new Em),Ih("TableRow",new wm),Ih("TableColumn",new Cm),Ih("Graduated",new cp),Ih("Grid",new hp),ig.add("GraphLinksModel",Cs),ig.add("TreeModel",Au);var G0=nt.go,zy={get licenseKey(){return nn.licenseKey},set licenseKey(a){nn.licenseKey=a},get version(){return nn.version},Group:cr,EnumValue:mn,List:An,Set:Bn,Map:wi,Point:Qe,Size:qn,Rect:vn,Margin:Ti,Spot:bi,Geometry:Pn,PathFigure:ho,PathSegment:_i,InputEvent:lr,DiagramEvent:or,ChangedEvent:Oi,Model:Li,GraphLinksModel:to,TreeModel:yl,Binding:Xa,Transaction:Er,UndoManager:Oo,CommandHandler:it,Tool:Gi,DraggingTool:aa,DraggingInfo:fc,DraggingOptions:ae,LinkingBaseTool:Wt,LinkingTool:Tn,RelinkingTool:xi,LinkReshapingTool:Mi,ResizingTool:fr,RotatingTool:Ur,ClickSelectingTool:zo,ActionTool:xr,ClickCreatingTool:Hr,HTMLInfo:Fr,ContextMenuTool:xo,DragSelectingTool:Sr,PanningTool:$i,TextEditingTool:oo,ToolManager:Vr,Animation:La,AnimationManager:Ca,AnimationTrigger:Xl,Layer:fa,Diagram:nn,Palette:ge,Overview:ye,Brush:Ao,GraphObject:jt,Panel:Gn,RowColumnDefinition:us,Shape:Cr,TextBlock:Qo,Picture:kl,Part:Di,Adornment:lo,Node:li,Link:Kn,Placeholder:gl,Layout:da,LayoutNetwork:qo,LayoutVertex:ps,LayoutEdge:ql,GridLayout:Ds,PanelLayout:gs,CircularLayout:xa,CircularNetwork:Ng,CircularVertex:zp,CircularEdge:C0,ForceDirectedLayout:Ks,ForceDirectedNetwork:Of,ForceDirectedVertex:_p,ForceDirectedEdge:Zp,LayeredDigraphLayout:Ro,LayeredDigraphNetwork:kg,LayeredDigraphVertex:Du,LayeredDigraphEdge:Wp,TreeLayout:Gr,TreeNetwork:zf,TreeVertex:Vu,TreeEdge:Dg};typeof G0=="object"&&G0.version&&ai("WARNING: a `go` object on the root object is already defined. "+("Debug"in G0?"debug ":"")+"version: "+G0.version+", replaced with version: "+zy.version),nn.prototype.go=zy,nt.go=zy,typeof Cn.exports=="object"&&(Cn.exports=typeof ve.g!="undefined"?ve.g.go:self.go)}();var ce=typeof ve.g!="undefined"?ve.g.go:self.go;const De=typeof ve.g!="undefined"?ve.g.go:self.go,ze=De.Group,wt=De.EnumValue,Ze=De.List,ht=De.Set,Me=De.Map,yt=De.Point,ct=De.Size,He=De.Rect,st=De.Margin,mt=De.Spot,dt=De.Geometry,Ae=De.PathFigure,te=De.PathSegment,ee=De.InputEvent,he=De.DiagramEvent,se=De.ChangedEvent,de=De.Model,me=De.GraphLinksModel,we=De.TreeModel,Ne=De.Binding,Fe=De.Transaction,Ie=De.UndoManager,je=De.CommandHandler,Je=De.Tool,Ke=De.DraggingTool,gt=De.DraggingInfo,Re=De.LinkingBaseTool,At=De.LinkingTool,qe=De.RelinkingTool,Et=De.LinkReshapingTool,kt=De.ResizingTool,Bt=De.RotatingTool,Gt=De.ClickSelectingTool,Ut=De.ActionTool,lt=De.ClickCreatingTool,$e=De.HTMLInfo,Nt=De.ContextMenuTool,cn=De.DragSelectingTool,sn=De.PanningTool,Ft=De.TextEditingTool,$t=De.ToolManager,en=De.Animation,Nn=De.AnimationManager,fn=De.AnimationTrigger,Mn=De.Layer,pt=De.Diagram,Ln=De.Palette,Un=De.Overview,Zt=De.Brush,tn=De.GraphObject,Rt=De.Panel,Lt=De.RowColumnDefinition,ut=De.Shape,Ge=De.TextBlock,Dt=De.TextBlockMetrics,Tt=De.Picture,ot=De.Part,et=De.Adornment,Te=De.Node,xe=De.Link,Se=De.Placeholder,Be=De.Layout,_e=De.LayoutNetwork,Ee=De.LayoutVertex,ft=De.LayoutEdge,Xt=De.GridLayout,an=De.PanelLayout,Qt=De.CircularLayout,En=De.CircularNetwork,Yn=De.CircularVertex,zn=De.CircularEdge,Dn=De.ForceDirectedLayout,ii=De.ForceDirectedNetwork,gi=De.ForceDirectedVertex,pi=De.ForceDirectedEdge,Ii=De.LayeredDigraphLayout,Yi=De.LayeredDigraphNetwork,Jn=De.LayeredDigraphVertex,Wn=De.LayeredDigraphEdge,ti=De.TreeLayout,yi=De.TreeNetwork,mi=De.TreeVertex,dr=De.TreeEdge,mr=De.version},24334:function(Cn,un,ve){var ce,De;(function(ze,wt){Cn.exports=wt(ze)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ve.g!="undefined"?ve.g:this,function(ze){"use strict";ze=ze||{};var wt=ze.Base64,Ze="2.6.4",ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(qe){for(var Et={},kt=0,Bt=qe.length;kt<Bt;kt++)Et[qe.charAt(kt)]=kt;return Et}(ht),yt=String.fromCharCode,ct=function(qe){if(qe.length<2){var Et=qe.charCodeAt(0);return Et<128?qe:Et<2048?yt(192|Et>>>6)+yt(128|Et&63):yt(224|Et>>>12&15)+yt(128|Et>>>6&63)+yt(128|Et&63)}else{var Et=65536+(qe.charCodeAt(0)-55296)*1024+(qe.charCodeAt(1)-56320);return yt(240|Et>>>18&7)+yt(128|Et>>>12&63)+yt(128|Et>>>6&63)+yt(128|Et&63)}},He=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,st=function(qe){return qe.replace(He,ct)},mt=function(qe){var Et=[0,2,1][qe.length%3],kt=qe.charCodeAt(0)<<16|(qe.length>1?qe.charCodeAt(1):0)<<8|(qe.length>2?qe.charCodeAt(2):0),Bt=[ht.charAt(kt>>>18),ht.charAt(kt>>>12&63),Et>=2?"=":ht.charAt(kt>>>6&63),Et>=1?"=":ht.charAt(kt&63)];return Bt.join("")},dt=ze.btoa&&typeof ze.btoa=="function"?function(qe){return ze.btoa(qe)}:function(qe){if(qe.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return qe.replace(/[\s\S]{1,3}/g,mt)},Ae=function(qe){return dt(st(String(qe)))},te=function(qe){return qe.replace(/[+\/]/g,function(Et){return Et=="+"?"-":"_"}).replace(/=/g,"")},ee=function(qe,Et){return Et?te(Ae(qe)):Ae(qe)},he=function(qe){return ee(qe,!0)},se;ze.Uint8Array&&(se=function(qe,Et){for(var kt="",Bt=0,Gt=qe.length;Bt<Gt;Bt+=3){var Ut=qe[Bt],lt=qe[Bt+1],$e=qe[Bt+2],Nt=Ut<<16|lt<<8|$e;kt+=ht.charAt(Nt>>>18)+ht.charAt(Nt>>>12&63)+(typeof lt!="undefined"?ht.charAt(Nt>>>6&63):"=")+(typeof $e!="undefined"?ht.charAt(Nt&63):"=")}return Et?te(kt):kt});var de=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,me=function(qe){switch(qe.length){case 4:var Et=(7&qe.charCodeAt(0))<<18|(63&qe.charCodeAt(1))<<12|(63&qe.charCodeAt(2))<<6|63&qe.charCodeAt(3),kt=Et-65536;return yt((kt>>>10)+55296)+yt((kt&1023)+56320);case 3:return yt((15&qe.charCodeAt(0))<<12|(63&qe.charCodeAt(1))<<6|63&qe.charCodeAt(2));default:return yt((31&qe.charCodeAt(0))<<6|63&qe.charCodeAt(1))}},we=function(qe){return qe.replace(de,me)},Ne=function(qe){var Et=qe.length,kt=Et%4,Bt=(Et>0?Me[qe.charAt(0)]<<18:0)|(Et>1?Me[qe.charAt(1)]<<12:0)|(Et>2?Me[qe.charAt(2)]<<6:0)|(Et>3?Me[qe.charAt(3)]:0),Gt=[yt(Bt>>>16),yt(Bt>>>8&255),yt(Bt&255)];return Gt.length-=[0,0,2,1][kt],Gt.join("")},Fe=ze.atob&&typeof ze.atob=="function"?function(qe){return ze.atob(qe)}:function(qe){return qe.replace(/\S{1,4}/g,Ne)},Ie=function(qe){return Fe(String(qe).replace(/[^A-Za-z0-9\+\/]/g,""))},je=function(qe){return we(Fe(qe))},Je=function(qe){return String(qe).replace(/[-_]/g,function(Et){return Et=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ke=function(qe){return je(Je(qe))},gt;ze.Uint8Array&&(gt=function(qe){return Uint8Array.from(Ie(Je(qe)),function(Et){return Et.charCodeAt(0)})});var Re=function(){var qe=ze.Base64;return ze.Base64=wt,qe};if(ze.Base64={VERSION:Ze,atob:Ie,btoa:dt,fromBase64:Ke,toBase64:ee,utob:st,encode:ee,encodeURI:he,btou:we,decode:Ke,noConflict:Re,fromUint8Array:se,toUint8Array:gt},typeof Object.defineProperty=="function"){var At=function(qe){return{value:qe,enumerable:!1,writable:!0,configurable:!0}};ze.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",At(function(){return Ke(this)})),Object.defineProperty(String.prototype,"toBase64",At(function(qe){return ee(this,qe)})),Object.defineProperty(String.prototype,"toBase64URI",At(function(){return ee(this,!0)}))}}return ze.Meteor&&(Base64=ze.Base64),Cn.exports?Cn.exports.Base64=ze.Base64:(ce=[],De=function(){return ze.Base64}.apply(un,ce),De!==void 0&&(Cn.exports=De)),{Base64:ze.Base64}})},17115:function(Cn,un,ve){"use strict";ve.d(un,{ZP:function(){return Me}});var ce=ve(52487),De=ve(59301),ze=ve(47273),wt=0,Ze=(0,ze.Z)();function ht(){var yt;return Ze?(yt=wt,wt+=1):yt="TEST_OR_SSR",yt}function Me(yt){var ct=De.useState(),He=(0,ce.Z)(ct,2),st=He[0],mt=He[1];return De.useEffect(function(){mt("rc_select_".concat(ht()))},[]),yt||st}},77861:function(Cn,un,ve){"use strict";ve.d(un,{Ac:function(){return Be},Xo:function(){return pi},Wx:function(){return Yi},ZP:function(){return qt},lk:function(){return we}});var ce=ve(72308),De=ve(80702),ze=ve(49618),wt=ve(77321),Ze=ve(52487),ht=ve(74416),Me=ve(62853),yt=ve(18929),ct=ve(48736),He=ve(59301),st=ve(92310),mt=ve.n(st),dt=ve(34280),Ae=ve(49658),te=ve(10228),ee=ve(8654),he=function(nt){var Kt=nt.className,ln=nt.customizeIcon,xn=nt.customizeIconProps,On=nt.onMouseDown,St=nt.onClick,gn=nt.children,Rn;return typeof ln=="function"?Rn=ln(xn):Rn=ln,He.createElement("span",{className:Kt,onMouseDown:function(hn){hn.preventDefault(),On&&On(hn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:St,"aria-hidden":!0},Rn!==void 0?Rn:He.createElement("span",{className:mt()(Kt.split(/\s+/).map(function(ai){return"".concat(ai,"-icon")}))},gn))},se=he;function de(xt,nt,Kt,ln,xn){var On=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,St=arguments.length>6?arguments[6]:void 0,gn=arguments.length>7?arguments[7]:void 0,Rn=He.useMemo(function(){if((0,Me.Z)(ln)==="object")return ln.clearIcon;if(xn)return xn},[ln,xn]),ai=He.useMemo(function(){return!!(!On&&ln&&(Kt.length||St)&&!(gn==="combobox"&&St===""))},[ln,On,Kt.length,St,gn]);return{allowClear:ai,clearIcon:He.createElement(se,{className:"".concat(xt,"-clear"),onMouseDown:nt,customizeIcon:Rn},"\xD7")}}var me=He.createContext(null);function we(){return He.useContext(me)}function Ne(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,nt=He.useState(!1),Kt=(0,Ze.Z)(nt,2),ln=Kt[0],xn=Kt[1],On=He.useRef(null),St=function(){window.clearTimeout(On.current)};He.useEffect(function(){return St},[]);var gn=function(ai,hn){St(),On.current=window.setTimeout(function(){xn(ai),hn&&hn()},xt)};return[ln,gn,St]}function Fe(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,nt=He.useRef(null),Kt=He.useRef(null);He.useEffect(function(){return function(){window.clearTimeout(Kt.current)}},[]);function ln(xn){(xn||nt.current===null)&&(nt.current=xn),window.clearTimeout(Kt.current),Kt.current=window.setTimeout(function(){nt.current=null},xt)}return[function(){return nt.current},ln]}function Ie(xt,nt,Kt,ln){var xn=He.useRef(null);xn.current={open:nt,triggerOpen:Kt,customizedTrigger:ln},He.useEffect(function(){function On(St){var gn;if(!((gn=xn.current)!==null&&gn!==void 0&&gn.customizedTrigger)){var Rn=St.target;Rn.shadowRoot&&St.composed&&(Rn=St.composedPath()[0]||Rn),xn.current.open&&xt().filter(function(ai){return ai}).every(function(ai){return!ai.contains(Rn)&&ai!==Rn})&&xn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",On),function(){return window.removeEventListener("mousedown",On)}},[])}var je=ve(26112),Je=ve(11780),Ke=function(nt,Kt){var ln,xn,On=nt.prefixCls,St=nt.id,gn=nt.inputElement,Rn=nt.disabled,ai=nt.tabIndex,hn=nt.autoFocus,Jt=nt.autoComplete,Xn=nt.editable,si=nt.activeDescendantId,ui=nt.value,Qn=nt.maxLength,di=nt.onKeyDown,hi=nt.onMouseDown,Ri=nt.onChange,Xi=nt.onPaste,tr=nt.onCompositionStart,yn=nt.onCompositionEnd,Br=nt.open,br=nt.attrs,Wr=gn||He.createElement("input",null),mn=Wr,_n=mn.ref,Si=mn.props,zi=Si.onKeyDown,Ni=Si.onChange,ji=Si.onMouseDown,ar=Si.onCompositionStart,Qi=Si.onCompositionEnd,nr=Si.style;return(0,ct.Kp)(!("maxLength"in Wr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Wr=He.cloneElement(Wr,(0,wt.Z)((0,wt.Z)((0,wt.Z)({type:"search"},Si),{},{id:St,ref:(0,ee.sQ)(Kt,_n),disabled:Rn,tabIndex:ai,autoComplete:Jt||"off",autoFocus:hn,className:mt()("".concat(On,"-selection-search-input"),(ln=Wr)===null||ln===void 0||(xn=ln.props)===null||xn===void 0?void 0:xn.className),role:"combobox","aria-label":"Search","aria-expanded":Br||!1,"aria-haspopup":"listbox","aria-owns":"".concat(St,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(St,"_list"),"aria-activedescendant":Br?si:void 0},br),{},{value:Xn?ui:"",maxLength:Qn,readOnly:!Xn,unselectable:Xn?null:"on",style:(0,wt.Z)((0,wt.Z)({},nr),{},{opacity:Xn?null:0}),onKeyDown:function(An){di(An),zi&&zi(An)},onMouseDown:function(An){hi(An),ji&&ji(An)},onChange:function(An){Ri(An),Ni&&Ni(An)},onCompositionStart:function(An){tr(An),ar&&ar(An)},onCompositionEnd:function(An){yn(An),Qi&&Qi(An)},onPaste:Xi})),Wr},gt=He.forwardRef(Ke);gt.displayName="Input";var Re=gt;function At(xt){return Array.isArray(xt)?xt:xt!==void 0?[xt]:[]}var qe=typeof window!="undefined"&&window.document&&window.document.documentElement,Et=qe;function kt(xt){return xt!=null}function Bt(xt){return!xt&&xt!==0}function Gt(xt){return["string","number"].includes((0,Me.Z)(xt))}function Ut(xt){var nt=void 0;return xt&&(Gt(xt.title)?nt=xt.title.toString():Gt(xt.label)&&(nt=xt.label.toString())),nt}function lt(xt,nt){Et?He.useLayoutEffect(xt,nt):He.useEffect(xt,nt)}function $e(xt){var nt;return(nt=xt.key)!==null&&nt!==void 0?nt:xt.value}var Nt=function(nt){nt.preventDefault(),nt.stopPropagation()},cn=function(nt){var Kt=nt.id,ln=nt.prefixCls,xn=nt.values,On=nt.open,St=nt.searchValue,gn=nt.autoClearSearchValue,Rn=nt.inputRef,ai=nt.placeholder,hn=nt.disabled,Jt=nt.mode,Xn=nt.showSearch,si=nt.autoFocus,ui=nt.autoComplete,Qn=nt.activeDescendantId,di=nt.tabIndex,hi=nt.removeIcon,Ri=nt.maxTagCount,Xi=nt.maxTagTextLength,tr=nt.maxTagPlaceholder,yn=tr===void 0?function(uo){return"+ ".concat(uo.length," ...")}:tr,Br=nt.tagRender,br=nt.onToggleOpen,Wr=nt.onRemove,mn=nt.onInputChange,_n=nt.onInputPaste,Si=nt.onInputKeyDown,zi=nt.onInputMouseDown,Ni=nt.onInputCompositionStart,ji=nt.onInputCompositionEnd,ar=He.useRef(null),Qi=(0,He.useState)(0),nr=(0,Ze.Z)(Qi,2),hr=nr[0],An=nr[1],Jr=(0,He.useState)(!1),Bn=(0,Ze.Z)(Jr,2),_r=Bn[0],co=Bn[1],Bi="".concat(ln,"-selection"),Po=On||Jt==="multiple"&&gn===!1||Jt==="tags"?St:"",ao=Jt==="tags"||Jt==="multiple"&&gn===!1||Xn&&(On||_r);lt(function(){An(ar.current.scrollWidth)},[Po]);function Ki(uo,Zo,ga,Pa,ia){return He.createElement("span",{className:mt()("".concat(Bi,"-item"),(0,ze.Z)({},"".concat(Bi,"-item-disabled"),ga)),title:Ut(uo)},He.createElement("span",{className:"".concat(Bi,"-item-content")},Zo),Pa&&He.createElement(se,{className:"".concat(Bi,"-item-remove"),onMouseDown:Nt,onClick:ia,customizeIcon:hi},"\xD7"))}function qi(uo,Zo,ga,Pa,ia){var Dr=function(fo){Nt(fo),br(!On)};return He.createElement("span",{onMouseDown:Dr},Br({label:Zo,value:uo,disabled:ga,closable:Pa,onClose:ia}))}function Zr(uo){var Zo=uo.disabled,ga=uo.label,Pa=uo.value,ia=!hn&&!Zo,Dr=ga;if(typeof Xi=="number"&&(typeof ga=="string"||typeof ga=="number")){var kr=String(Dr);kr.length>Xi&&(Dr="".concat(kr.slice(0,Xi),"..."))}var fo=function(To){To&&To.stopPropagation(),Wr(uo)};return typeof Br=="function"?qi(Pa,Dr,Zo,ia,fo):Ki(uo,Dr,Zo,ia,fo)}function ro(uo){var Zo=typeof yn=="function"?yn(uo):yn;return Ki({title:Zo},Zo,!1)}var wi=He.createElement("div",{className:"".concat(Bi,"-search"),style:{width:hr},onFocus:function(){co(!0)},onBlur:function(){co(!1)}},He.createElement(Re,{ref:Rn,open:On,prefixCls:ln,id:Kt,inputElement:null,disabled:hn,autoFocus:si,autoComplete:ui,editable:ao,activeDescendantId:Qn,value:Po,onKeyDown:Si,onMouseDown:zi,onChange:mn,onPaste:_n,onCompositionStart:Ni,onCompositionEnd:ji,tabIndex:di,attrs:(0,je.Z)(nt,!0)}),He.createElement("span",{ref:ar,className:"".concat(Bi,"-search-mirror"),"aria-hidden":!0},Po,"\xA0")),Qe=He.createElement(Je.Z,{prefixCls:"".concat(Bi,"-overflow"),data:xn,renderItem:Zr,renderRest:ro,suffix:wi,itemKey:$e,maxCount:Ri});return He.createElement(He.Fragment,null,Qe,!xn.length&&!Po&&He.createElement("span",{className:"".concat(Bi,"-placeholder")},ai))},sn=cn,Ft=function(nt){var Kt=nt.inputElement,ln=nt.prefixCls,xn=nt.id,On=nt.inputRef,St=nt.disabled,gn=nt.autoFocus,Rn=nt.autoComplete,ai=nt.activeDescendantId,hn=nt.mode,Jt=nt.open,Xn=nt.values,si=nt.placeholder,ui=nt.tabIndex,Qn=nt.showSearch,di=nt.searchValue,hi=nt.activeValue,Ri=nt.maxLength,Xi=nt.onInputKeyDown,tr=nt.onInputMouseDown,yn=nt.onInputChange,Br=nt.onInputPaste,br=nt.onInputCompositionStart,Wr=nt.onInputCompositionEnd,mn=nt.title,_n=He.useState(!1),Si=(0,Ze.Z)(_n,2),zi=Si[0],Ni=Si[1],ji=hn==="combobox",ar=ji||Qn,Qi=Xn[0],nr=di||"";ji&&hi&&!zi&&(nr=hi),He.useEffect(function(){ji&&Ni(!1)},[ji,hi]);var hr=hn!=="combobox"&&!Jt&&!Qn?!1:!!nr,An=mn===void 0?Ut(Qi):mn,Jr=function(){if(Qi)return null;var _r=hr?{visibility:"hidden"}:void 0;return He.createElement("span",{className:"".concat(ln,"-selection-placeholder"),style:_r},si)};return He.createElement(He.Fragment,null,He.createElement("span",{className:"".concat(ln,"-selection-search")},He.createElement(Re,{ref:On,prefixCls:ln,id:xn,open:Jt,inputElement:Kt,disabled:St,autoFocus:gn,autoComplete:Rn,editable:ar,activeDescendantId:ai,value:nr,onKeyDown:Xi,onMouseDown:tr,onChange:function(_r){Ni(!0),yn(_r)},onPaste:Br,onCompositionStart:br,onCompositionEnd:Wr,tabIndex:ui,attrs:(0,je.Z)(nt,!0),maxLength:ji?Ri:void 0})),!ji&&Qi?He.createElement("span",{className:"".concat(ln,"-selection-item"),title:An,style:hr?{visibility:"hidden"}:void 0},Qi.label):null,Jr())},$t=Ft;function en(xt){return![te.Z.ESC,te.Z.SHIFT,te.Z.BACKSPACE,te.Z.TAB,te.Z.WIN_KEY,te.Z.ALT,te.Z.META,te.Z.WIN_KEY_RIGHT,te.Z.CTRL,te.Z.SEMICOLON,te.Z.EQUALS,te.Z.CAPS_LOCK,te.Z.CONTEXT_MENU,te.Z.F1,te.Z.F2,te.Z.F3,te.Z.F4,te.Z.F5,te.Z.F6,te.Z.F7,te.Z.F8,te.Z.F9,te.Z.F10,te.Z.F11,te.Z.F12].includes(xt)}var Nn=function(nt,Kt){var ln=(0,He.useRef)(null),xn=(0,He.useRef)(!1),On=nt.prefixCls,St=nt.open,gn=nt.mode,Rn=nt.showSearch,ai=nt.tokenWithEnter,hn=nt.autoClearSearchValue,Jt=nt.onSearch,Xn=nt.onSearchSubmit,si=nt.onToggleOpen,ui=nt.onInputKeyDown,Qn=nt.domRef;He.useImperativeHandle(Kt,function(){return{focus:function(){ln.current.focus()},blur:function(){ln.current.blur()}}});var di=Fe(0),hi=(0,Ze.Z)(di,2),Ri=hi[0],Xi=hi[1],tr=function(nr){var hr=nr.which;(hr===te.Z.UP||hr===te.Z.DOWN)&&nr.preventDefault(),ui&&ui(nr),hr===te.Z.ENTER&&gn==="tags"&&!xn.current&&!St&&(Xn==null||Xn(nr.target.value)),en(hr)&&si(!0)},yn=function(){Xi(!0)},Br=(0,He.useRef)(null),br=function(nr){Jt(nr,!0,xn.current)!==!1&&si(!0)},Wr=function(){xn.current=!0},mn=function(nr){xn.current=!1,gn!=="combobox"&&br(nr.target.value)},_n=function(nr){var hr=nr.target.value;if(ai&&Br.current&&/[\r\n]/.test(Br.current)){var An=Br.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");hr=hr.replace(An,Br.current)}Br.current=null,br(hr)},Si=function(nr){var hr=nr.clipboardData,An=hr.getData("text");Br.current=An},zi=function(nr){var hr=nr.target;if(hr!==ln.current){var An=document.body.style.msTouchAction!==void 0;An?setTimeout(function(){ln.current.focus()}):ln.current.focus()}},Ni=function(nr){var hr=Ri();nr.target!==ln.current&&!hr&&gn!=="combobox"&&nr.preventDefault(),(gn!=="combobox"&&(!Rn||!hr)||!St)&&(St&&hn!==!1&&Jt("",!0,!1),si())},ji={inputRef:ln,onInputKeyDown:tr,onInputMouseDown:yn,onInputChange:_n,onInputPaste:Si,onInputCompositionStart:Wr,onInputCompositionEnd:mn},ar=gn==="multiple"||gn==="tags"?He.createElement(sn,(0,ce.Z)({},nt,ji)):He.createElement($t,(0,ce.Z)({},nt,ji));return He.createElement("div",{ref:Qn,className:"".concat(On,"-selector"),onClick:zi,onMouseDown:Ni},ar)},fn=He.forwardRef(Nn);fn.displayName="Selector";var Mn=fn,pt=ve(35593),Ln=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Un=function(nt){var Kt=nt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Kt,adjustY:1},htmlRegion:"scroll"}}},Zt=function(nt,Kt){var ln=nt.prefixCls,xn=nt.disabled,On=nt.visible,St=nt.children,gn=nt.popupElement,Rn=nt.animation,ai=nt.transitionName,hn=nt.dropdownStyle,Jt=nt.dropdownClassName,Xn=nt.direction,si=Xn===void 0?"ltr":Xn,ui=nt.placement,Qn=nt.builtinPlacements,di=nt.dropdownMatchSelectWidth,hi=nt.dropdownRender,Ri=nt.dropdownAlign,Xi=nt.getPopupContainer,tr=nt.empty,yn=nt.getTriggerDOMNode,Br=nt.onPopupVisibleChange,br=nt.onPopupMouseEnter,Wr=(0,ht.Z)(nt,Ln),mn="".concat(ln,"-dropdown"),_n=gn;hi&&(_n=hi(gn));var Si=He.useMemo(function(){return Qn||Un(di)},[Qn,di]),zi=Rn?"".concat(mn,"-").concat(Rn):ai,Ni=typeof di=="number",ji=He.useMemo(function(){return Ni?null:di===!1?"minWidth":"width"},[di,Ni]),ar=hn;Ni&&(ar=(0,wt.Z)((0,wt.Z)({},ar),{},{width:di}));var Qi=He.useRef(null);return He.useImperativeHandle(Kt,function(){return{getPopupElement:function(){return Qi.current}}}),He.createElement(pt.Z,(0,ce.Z)({},Wr,{showAction:Br?["click"]:[],hideAction:Br?["click"]:[],popupPlacement:ui||(si==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Si,prefixCls:mn,popupTransitionName:zi,popup:He.createElement("div",{ref:Qi,onMouseEnter:br},_n),stretch:ji,popupAlign:Ri,popupVisible:On,getPopupContainer:Xi,popupClassName:mt()(Jt,(0,ze.Z)({},"".concat(mn,"-empty"),tr)),popupStyle:ar,getTriggerDOMNode:yn,onPopupVisibleChange:Br}),St)},tn=He.forwardRef(Zt);tn.displayName="SelectTrigger";var Rt=tn,Lt=ve(68413);function ut(xt,nt){var Kt=xt.key,ln;return"value"in xt&&(ln=xt.value),Kt!=null?Kt:ln!==void 0?ln:"rc-index-key-".concat(nt)}function Ge(xt,nt){var Kt=xt||{},ln=Kt.label,xn=Kt.value,On=Kt.options,St=Kt.groupLabel,gn=ln||(nt?"children":"label");return{label:gn,value:xn||"value",options:On||"options",groupLabel:St||gn}}function Dt(xt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Kt=nt.fieldNames,ln=nt.childrenAsData,xn=[],On=Ge(Kt,!1),St=On.label,gn=On.value,Rn=On.options,ai=On.groupLabel;function hn(Jt,Xn){Jt.forEach(function(si){if(Xn||!(Rn in si)){var ui=si[gn];xn.push({key:ut(si,xn.length),groupOption:Xn,data:si,label:si[St],value:ui})}else{var Qn=si[ai];Qn===void 0&&ln&&(Qn=si.label),xn.push({key:ut(si,xn.length),group:!0,data:si,label:Qn}),hn(si[Rn],!0)}})}return hn(xt,!1),xn}function Tt(xt){var nt=(0,wt.Z)({},xt);return"props"in nt||Object.defineProperty(nt,"props",{get:function(){return(0,ct.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),nt}}),nt}function ot(xt,nt){if(!nt||!nt.length)return null;var Kt=!1;function ln(On,St){var gn=(0,Lt.Z)(St),Rn=gn[0],ai=gn.slice(1);if(!Rn)return[On];var hn=On.split(Rn);return Kt=Kt||hn.length>1,hn.reduce(function(Jt,Xn){return[].concat((0,De.Z)(Jt),(0,De.Z)(ln(Xn,ai)))},[]).filter(function(Jt){return Jt})}var xn=ln(xt,nt);return Kt?xn:null}var et=["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"],Te=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function xe(xt){return xt==="tags"||xt==="multiple"}var Se=He.forwardRef(function(xt,nt){var Kt,ln,xn=xt.id,On=xt.prefixCls,St=xt.className,gn=xt.showSearch,Rn=xt.tagRender,ai=xt.direction,hn=xt.omitDomProps,Jt=xt.displayValues,Xn=xt.onDisplayValuesChange,si=xt.emptyOptions,ui=xt.notFoundContent,Qn=ui===void 0?"Not Found":ui,di=xt.onClear,hi=xt.mode,Ri=xt.disabled,Xi=xt.loading,tr=xt.getInputElement,yn=xt.getRawInputElement,Br=xt.open,br=xt.defaultOpen,Wr=xt.onDropdownVisibleChange,mn=xt.activeValue,_n=xt.onActiveValueChange,Si=xt.activeDescendantId,zi=xt.searchValue,Ni=xt.autoClearSearchValue,ji=xt.onSearch,ar=xt.onSearchSplit,Qi=xt.tokenSeparators,nr=xt.allowClear,hr=xt.suffixIcon,An=xt.clearIcon,Jr=xt.OptionList,Bn=xt.animation,_r=xt.transitionName,co=xt.dropdownStyle,Bi=xt.dropdownClassName,Po=xt.dropdownMatchSelectWidth,ao=xt.dropdownRender,Ki=xt.dropdownAlign,qi=xt.placement,Zr=xt.builtinPlacements,ro=xt.getPopupContainer,wi=xt.showAction,Qe=wi===void 0?[]:wi,uo=xt.onFocus,Zo=xt.onBlur,ga=xt.onKeyUp,Pa=xt.onKeyDown,ia=xt.onMouseDown,Dr=(0,ht.Z)(xt,et),kr=xe(hi),fo=(gn!==void 0?gn:kr)||hi==="combobox",Rr=(0,wt.Z)({},Dr);Te.forEach(function(Co){delete Rr[Co]}),hn==null||hn.forEach(function(Co){delete Rr[Co]});var To=He.useState(!1),qa=(0,Ze.Z)(To,2),Mr=qa[0],sr=qa[1];He.useEffect(function(){sr((0,Ae.Z)())},[]);var qn=He.useRef(null),vr=He.useRef(null),wo=He.useRef(null),ua=He.useRef(null),Bo=He.useRef(null),yo=Ne(),ta=(0,Ze.Z)(yo,3),na=ta[0],Ba=ta[1],ka=ta[2];He.useImperativeHandle(nt,function(){var Co,Uo;return{focus:(Co=ua.current)===null||Co===void 0?void 0:Co.focus,blur:(Uo=ua.current)===null||Uo===void 0?void 0:Uo.blur,scrollTo:function(ds){var es;return(es=Bo.current)===null||es===void 0?void 0:es.scrollTo(ds)}}});var is=He.useMemo(function(){var Co;if(hi!=="combobox")return zi;var Uo=(Co=Jt[0])===null||Co===void 0?void 0:Co.value;return typeof Uo=="string"||typeof Uo=="number"?String(Uo):""},[zi,hi,Jt]),vn=hi==="combobox"&&typeof tr=="function"&&tr()||null,Oa=typeof yn=="function"&&yn(),Vl=(0,ee.x1)(vr,Oa==null||(Kt=Oa.props)===null||Kt===void 0?void 0:Kt.ref),Hs=He.useState(!1),wl=(0,Ze.Z)(Hs,2),Ma=wl[0],yu=wl[1];(0,dt.Z)(function(){yu(!0)},[]);var Cl=(0,yt.Z)(!1,{defaultValue:br,value:Br}),ma=(0,Ze.Z)(Cl,2),Fo=ma[0],Ul=ma[1],$r=Ma?Fo:!1,Ko=!Qn&&si;(Ri||Ko&&$r&&hi==="combobox")&&($r=!1);var So=Ko?!1:$r,Ti=He.useCallback(function(Co){var Uo=Co!==void 0?Co:!$r;Ri||(Ul(Uo),$r!==Uo&&(Wr==null||Wr(Uo)))},[Ri,$r,Ul,Wr]),Wa=He.useMemo(function(){return(Qi||[]).some(function(Co){return[`
|
|
|
`,`\r
|
|
|
`].includes(Co)})},[Qi]),$a=function(Uo,Gs,ds){var es=!0,Aa=Uo;_n==null||_n(null);var za=ds?null:ot(Uo,Qi);return hi!=="combobox"&&za&&(Aa="",ar==null||ar(za),Ti(!1),es=!1),ji&&is!==Aa&&ji(Aa,{source:Gs?"typing":"effect"}),es},bs=function(Uo){!Uo||!Uo.trim()||ji(Uo,{source:"submit"})};He.useEffect(function(){!$r&&!kr&&hi!=="combobox"&&$a("",!1,!1)},[$r]),He.useEffect(function(){Fo&&Ri&&Ul(!1),Ri&&Ba(!1)},[Ri]);var El=Fe(),Dl=(0,Ze.Z)(El,2),bi=Dl[0],Fa=Dl[1],cs=function(Uo){var Gs=bi(),ds=Uo.which;if(ds===te.Z.ENTER&&(hi!=="combobox"&&Uo.preventDefault(),$r||Ti(!0)),Fa(!!is),ds===te.Z.BACKSPACE&&!Gs&&kr&&!is&&Jt.length){for(var es=(0,De.Z)(Jt),Aa=null,za=es.length-1;za>=0;za-=1){var rs=es[za];if(!rs.disabled){es.splice(za,1),Aa=rs;break}}Aa&&Xn(es,{type:"remove",values:[Aa]})}for(var Ka=arguments.length,Ws=new Array(Ka>1?Ka-1:0),$s=1;$s<Ka;$s++)Ws[$s-1]=arguments[$s];if($r&&Bo.current){var va;(va=Bo.current).onKeyDown.apply(va,[Uo].concat(Ws))}Pa==null||Pa.apply(void 0,[Uo].concat(Ws))},bl=function(Uo){for(var Gs=arguments.length,ds=new Array(Gs>1?Gs-1:0),es=1;es<Gs;es++)ds[es-1]=arguments[es];if($r&&Bo.current){var Aa;(Aa=Bo.current).onKeyUp.apply(Aa,[Uo].concat(ds))}ga==null||ga.apply(void 0,[Uo].concat(ds))},Ol=function(Uo){var Gs=Jt.filter(function(ds){return ds!==Uo});Xn(Gs,{type:"remove",values:[Uo]})},Il=He.useRef(!1),Qr=function(){Ba(!0),Ri||(uo&&!Il.current&&uo.apply(void 0,arguments),Qe.includes("focus")&&Ti(!0)),Il.current=!0},Ju=function(){Ba(!1,function(){Il.current=!1,Ti(!1)}),!Ri&&(is&&(hi==="tags"?ji(is,{source:"submit"}):hi==="multiple"&&ji("",{source:"blur"})),Zo&&Zo.apply(void 0,arguments))},nl=[];He.useEffect(function(){return function(){nl.forEach(function(Co){return clearTimeout(Co)}),nl.splice(0,nl.length)}},[]);var vs=function(Uo){var Gs,ds=Uo.target,es=(Gs=wo.current)===null||Gs===void 0?void 0:Gs.getPopupElement();if(es&&es.contains(ds)){var Aa=setTimeout(function(){var Ws=nl.indexOf(Aa);if(Ws!==-1&&nl.splice(Ws,1),ka(),!Mr&&!es.contains(document.activeElement)){var $s;($s=ua.current)===null||$s===void 0||$s.focus()}});nl.push(Aa)}for(var za=arguments.length,rs=new Array(za>1?za-1:0),Ka=1;Ka<za;Ka++)rs[Ka-1]=arguments[Ka];ia==null||ia.apply(void 0,[Uo].concat(rs))},ys=He.useState({}),Su=(0,Ze.Z)(ys,2),Iu=Su[1];function Ys(){Iu({})}var ul;Oa&&(ul=function(Uo){Ti(Uo)}),Ie(function(){var Co;return[qn.current,(Co=wo.current)===null||Co===void 0?void 0:Co.getPopupElement()]},So,Ti,!!Oa);var Mh=He.useMemo(function(){return(0,wt.Z)((0,wt.Z)({},xt),{},{notFoundContent:Qn,open:$r,triggerOpen:So,id:xn,showSearch:fo,multiple:kr,toggleOpen:Ti})},[xt,Qn,So,$r,xn,fo,kr,Ti]),uc=!!hr||Xi,Lh;uc&&(Lh=He.createElement(se,{className:mt()("".concat(On,"-arrow"),(0,ze.Z)({},"".concat(On,"-arrow-loading"),Xi)),customizeIcon:hr,customizeIconProps:{loading:Xi,searchValue:is,open:$r,focused:na,showSearch:fo}}));var hc=function(){var Uo;di==null||di(),(Uo=ua.current)===null||Uo===void 0||Uo.focus(),Xn([],{type:"clear",values:Jt}),$a("",!1,!1)},Fh=de(On,hc,Jt,nr,An,Ri,is,hi),Ru=Fh.allowClear,Qu=Fh.clearIcon,Rl=He.createElement(Jr,{ref:Bo}),Hh=mt()(On,St,(ln={},(0,ze.Z)(ln,"".concat(On,"-focused"),na),(0,ze.Z)(ln,"".concat(On,"-multiple"),kr),(0,ze.Z)(ln,"".concat(On,"-single"),!kr),(0,ze.Z)(ln,"".concat(On,"-allow-clear"),nr),(0,ze.Z)(ln,"".concat(On,"-show-arrow"),uc),(0,ze.Z)(ln,"".concat(On,"-disabled"),Ri),(0,ze.Z)(ln,"".concat(On,"-loading"),Xi),(0,ze.Z)(ln,"".concat(On,"-open"),$r),(0,ze.Z)(ln,"".concat(On,"-customize-input"),vn),(0,ze.Z)(ln,"".concat(On,"-show-search"),fo),ln)),qu=He.createElement(Rt,{ref:wo,disabled:Ri,prefixCls:On,visible:So,popupElement:Rl,animation:Bn,transitionName:_r,dropdownStyle:co,dropdownClassName:Bi,direction:ai,dropdownMatchSelectWidth:Po,dropdownRender:ao,dropdownAlign:Ki,placement:qi,builtinPlacements:Zr,getPopupContainer:ro,empty:si,getTriggerDOMNode:function(){return vr.current},onPopupVisibleChange:ul,onPopupMouseEnter:Ys},Oa?He.cloneElement(Oa,{ref:Vl}):He.createElement(Mn,(0,ce.Z)({},xt,{domRef:vr,prefixCls:On,inputElement:vn,ref:ua,id:xn,showSearch:fo,autoClearSearchValue:Ni,mode:hi,activeDescendantId:Si,tagRender:Rn,values:Jt,open:$r,onToggleOpen:Ti,activeValue:mn,searchValue:is,onSearch:$a,onSearchSubmit:bs,onRemove:Ol,tokenWithEnter:Wa}))),eh;return Oa?eh=qu:eh=He.createElement("div",(0,ce.Z)({className:Hh},Rr,{ref:qn,onMouseDown:vs,onKeyDown:cs,onKeyUp:bl,onFocus:Qr,onBlur:Ju}),na&&!$r&&He.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Jt.map(function(Co){var Uo=Co.label,Gs=Co.value;return["number","string"].includes((0,Me.Z)(Uo))?Uo:Gs}).join(", "))),qu,Lh,Ru&&Qu),He.createElement(me.Provider,{value:Mh},eh)}),Be=Se,_e=function(xt,nt){var Kt=He.useRef({values:new Map,options:new Map}),ln=He.useMemo(function(){var On=Kt.current,St=On.values,gn=On.options,Rn=xt.map(function(Jt){if(Jt.label===void 0){var Xn;return(0,wt.Z)((0,wt.Z)({},Jt),{},{label:(Xn=St.get(Jt.value))===null||Xn===void 0?void 0:Xn.label})}return Jt}),ai=new Map,hn=new Map;return Rn.forEach(function(Jt){ai.set(Jt.value,Jt),hn.set(Jt.value,nt.get(Jt.value)||gn.get(Jt.value))}),Kt.current.values=ai,Kt.current.options=hn,Rn},[xt,nt]),xn=He.useCallback(function(On){return nt.get(On)||Kt.current.options.get(On)},[nt]);return[ln,xn]};function Ee(xt,nt){return At(xt).join("").toUpperCase().includes(nt)}var ft=function(xt,nt,Kt,ln,xn){return He.useMemo(function(){if(!Kt||ln===!1)return xt;var On=nt.options,St=nt.label,gn=nt.value,Rn=[],ai=typeof ln=="function",hn=Kt.toUpperCase(),Jt=ai?ln:function(si,ui){return xn?Ee(ui[xn],hn):ui[On]?Ee(ui[St!=="children"?St:"label"],hn):Ee(ui[gn],hn)},Xn=ai?function(si){return Tt(si)}:function(si){return si};return xt.forEach(function(si){if(si[On]){var ui=Jt(Kt,Xn(si));if(ui)Rn.push(si);else{var Qn=si[On].filter(function(di){return Jt(Kt,Xn(di))});Qn.length&&Rn.push((0,wt.Z)((0,wt.Z)({},si),{},(0,ze.Z)({},On,Qn)))}return}Jt(Kt,Xn(si))&&Rn.push(si)}),Rn},[xt,ln,xn,Kt,nt])},Xt=ve(17115),an=ve(11592),Qt=["children","value"],En=["children"];function Yn(xt){var nt=xt,Kt=nt.key,ln=nt.props,xn=ln.children,On=ln.value,St=(0,ht.Z)(ln,Qt);return(0,wt.Z)({key:Kt,value:On!==void 0?On:Kt,children:xn},St)}function zn(xt){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,an.Z)(xt).map(function(Kt,ln){if(!He.isValidElement(Kt)||!Kt.type)return null;var xn=Kt,On=xn.type.isSelectOptGroup,St=xn.key,gn=xn.props,Rn=gn.children,ai=(0,ht.Z)(gn,En);return nt||!On?Yn(Kt):(0,wt.Z)((0,wt.Z)({key:"__RC_SELECT_GRP__".concat(St===null?ln:St,"__"),label:St},ai),{},{options:zn(Rn)})}).filter(function(Kt){return Kt})}function Dn(xt,nt,Kt,ln,xn){return He.useMemo(function(){var On=xt,St=!xt;St&&(On=zn(nt));var gn=new Map,Rn=new Map,ai=function(Xn,si,ui){ui&&typeof ui=="string"&&Xn.set(si[ui],si)};function hn(Jt){for(var Xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,si=0;si<Jt.length;si+=1){var ui=Jt[si];!ui[Kt.options]||Xn?(gn.set(ui[Kt.value],ui),ai(Rn,ui,Kt.label),ai(Rn,ui,ln),ai(Rn,ui,xn)):hn(ui[Kt.options],!0)}}return hn(On),{options:On,valueOptions:gn,labelOptions:Rn}},[xt,nt,Kt,ln,xn])}function ii(xt){var nt=He.useRef();nt.current=xt;var Kt=He.useCallback(function(){return nt.current.apply(nt,arguments)},[]);return Kt}var gi=function(){return null};gi.isSelectOptGroup=!0;var pi=gi,Ii=function(){return null};Ii.isSelectOption=!0;var Yi=Ii,Jn=ve(80547),Wn=ve(2738),ti=ve(45680),yi=He.createContext(null),mi=yi;function dr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var mr=["disabled","title","children","style","className"];function be(xt){return typeof xt=="string"||typeof xt=="number"}var ci=function(nt,Kt){var ln=we(),xn=ln.prefixCls,On=ln.id,St=ln.open,gn=ln.multiple,Rn=ln.mode,ai=ln.searchValue,hn=ln.toggleOpen,Jt=ln.notFoundContent,Xn=ln.onPopupScroll,si=He.useContext(mi),ui=si.flattenOptions,Qn=si.onActiveValue,di=si.defaultActiveFirstOption,hi=si.onSelect,Ri=si.menuItemSelectedIcon,Xi=si.rawValues,tr=si.fieldNames,yn=si.virtual,Br=si.direction,br=si.listHeight,Wr=si.listItemHeight,mn="".concat(xn,"-item"),_n=(0,Jn.Z)(function(){return ui},[St,ui],function(Ki,qi){return qi[0]&&Ki[1]!==qi[1]}),Si=He.useRef(null),zi=function(qi){qi.preventDefault()},Ni=function(qi){Si.current&&Si.current.scrollTo(typeof qi=="number"?{index:qi}:qi)},ji=function(qi){for(var Zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ro=_n.length,wi=0;wi<ro;wi+=1){var Qe=(qi+wi*Zr+ro)%ro,uo=_n[Qe],Zo=uo.group,ga=uo.data;if(!Zo&&!ga.disabled)return Qe}return-1},ar=He.useState(function(){return ji(0)}),Qi=(0,Ze.Z)(ar,2),nr=Qi[0],hr=Qi[1],An=function(qi){var Zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;hr(qi);var ro={source:Zr?"keyboard":"mouse"},wi=_n[qi];if(!wi){Qn(null,-1,ro);return}Qn(wi.value,qi,ro)};(0,He.useEffect)(function(){An(di!==!1?ji(0):-1)},[_n.length,ai]);var Jr=He.useCallback(function(Ki){return Xi.has(Ki)&&Rn!=="combobox"},[Rn,(0,De.Z)(Xi).toString(),Xi.size]);(0,He.useEffect)(function(){var Ki=setTimeout(function(){if(!gn&&St&&Xi.size===1){var Zr=Array.from(Xi)[0],ro=_n.findIndex(function(wi){var Qe=wi.data;return Qe.value===Zr});ro!==-1&&(An(ro),Ni(ro))}});if(St){var qi;(qi=Si.current)===null||qi===void 0||qi.scrollTo(void 0)}return function(){return clearTimeout(Ki)}},[St,ai,ui.length]);var Bn=function(qi){qi!==void 0&&hi(qi,{selected:!Xi.has(qi)}),gn||hn(!1)};if(He.useImperativeHandle(Kt,function(){return{onKeyDown:function(qi){var Zr=qi.which,ro=qi.ctrlKey;switch(Zr){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var wi=0;if(Zr===te.Z.UP?wi=-1:Zr===te.Z.DOWN?wi=1:dr()&&ro&&(Zr===te.Z.N?wi=1:Zr===te.Z.P&&(wi=-1)),wi!==0){var Qe=ji(nr+wi,wi);Ni(Qe),An(Qe,!0)}break}case te.Z.ENTER:{var uo=_n[nr];uo&&!uo.data.disabled?Bn(uo.value):Bn(void 0),St&&qi.preventDefault();break}case te.Z.ESC:hn(!1),St&&qi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(qi){Ni(qi)}}}),_n.length===0)return He.createElement("div",{role:"listbox",id:"".concat(On,"_list"),className:"".concat(mn,"-empty"),onMouseDown:zi},Jt);var _r=Object.keys(tr).map(function(Ki){return tr[Ki]}),co=function(qi){return qi.label};function Bi(Ki,qi){var Zr=Ki.group;return{role:Zr?"presentation":"option",id:"".concat(On,"_list_").concat(qi)}}var Po=function(qi){var Zr=_n[qi];if(!Zr)return null;var ro=Zr.data||{},wi=ro.value,Qe=Zr.group,uo=(0,je.Z)(ro,!0),Zo=co(Zr);return Zr?He.createElement("div",(0,ce.Z)({"aria-label":typeof Zo=="string"&&!Qe?Zo:null},uo,{key:qi},Bi(Zr,qi),{"aria-selected":Jr(wi)}),wi):null},ao={role:"listbox",id:"".concat(On,"_list")};return He.createElement(He.Fragment,null,yn&&He.createElement("div",(0,ce.Z)({},ao,{style:{height:0,width:0,overflow:"hidden"}}),Po(nr-1),Po(nr),Po(nr+1)),He.createElement(ti.Z,{itemKey:"key",ref:Si,data:_n,height:br,itemHeight:Wr,fullHeight:!1,onMouseDown:zi,onScroll:Xn,virtual:yn,direction:Br,innerProps:yn?null:ao},function(Ki,qi){var Zr,ro=Ki.group,wi=Ki.groupOption,Qe=Ki.data,uo=Ki.label,Zo=Ki.value,ga=Qe.key;if(ro){var Pa,ia=(Pa=Qe.title)!==null&&Pa!==void 0?Pa:be(uo)?uo.toString():void 0;return He.createElement("div",{className:mt()(mn,"".concat(mn,"-group")),title:ia},uo!==void 0?uo:ga)}var Dr=Qe.disabled,kr=Qe.title,fo=Qe.children,Rr=Qe.style,To=Qe.className,qa=(0,ht.Z)(Qe,mr),Mr=(0,Wn.Z)(qa,_r),sr=Jr(Zo),qn="".concat(mn,"-option"),vr=mt()(mn,qn,To,(Zr={},(0,ze.Z)(Zr,"".concat(qn,"-grouped"),wi),(0,ze.Z)(Zr,"".concat(qn,"-active"),nr===qi&&!Dr),(0,ze.Z)(Zr,"".concat(qn,"-disabled"),Dr),(0,ze.Z)(Zr,"".concat(qn,"-selected"),sr),Zr)),wo=co(Ki),ua=!Ri||typeof Ri=="function"||sr,Bo=typeof wo=="number"?wo:wo||Zo,yo=be(Bo)?Bo.toString():void 0;return kr!==void 0&&(yo=kr),He.createElement("div",(0,ce.Z)({},(0,je.Z)(Mr),yn?{}:Bi(Ki,qi),{"aria-selected":sr,className:vr,title:yo,onMouseMove:function(){nr===qi||Dr||An(qi)},onClick:function(){Dr||Bn(Zo)},style:Rr}),He.createElement("div",{className:"".concat(qn,"-content")},Bo),He.isValidElement(Ri)||sr,ua&&He.createElement(se,{className:"".concat(mn,"-option-state"),customizeIcon:Ri,customizeIconProps:{isSelected:sr}},sr?"\u2713":null))}))},Hi=He.forwardRef(ci);Hi.displayName="OptionList";var dn=Hi;function oi(xt){var nt=xt.mode,Kt=xt.options,ln=xt.children,xn=xt.backfill,On=xt.allowClear,St=xt.placeholder,gn=xt.getInputElement,Rn=xt.showSearch,ai=xt.onSearch,hn=xt.defaultOpen,Jt=xt.autoFocus,Xn=xt.labelInValue,si=xt.value,ui=xt.inputValue,Qn=xt.optionLabelProp,di=isMultiple(nt),hi=Rn!==void 0?Rn:di||nt==="combobox",Ri=Kt||convertChildrenToData(ln);if(warning(nt!=="tags"||Ri.every(function(Br){return!Br.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),nt==="tags"||nt==="combobox"){var Xi=Ri.some(function(Br){return Br.options?Br.options.some(function(br){return typeof("value"in br?br.value:br.key)=="number"}):typeof("value"in Br?Br.value:Br.key)=="number"});warning(!Xi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(nt!=="combobox"||!Qn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(nt==="combobox"||!xn,"`backfill` only works with `combobox` mode."),warning(nt==="combobox"||!gn,"`getInputElement` only work with `combobox` mode."),noteOnce(nt!=="combobox"||!gn||!On||!St,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ai&&!hi&&nt!=="combobox"&&nt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!hn||Jt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),si!=null){var tr=toArray(si);warning(!Xn||tr.every(function(Br){return _typeof(Br)==="object"&&("key"in Br||"value"in Br)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!di||Array.isArray(si),"`value` should be array when `mode` is `multiple` or `tags`")}if(ln){var yn=null;toNodeArray(ln).some(function(Br){if(!React.isValidElement(Br)||!Br.type)return!1;var br=Br,Wr=br.type;if(Wr.isSelectOption)return!1;if(Wr.isSelectOptGroup){var mn=toNodeArray(Br.props.children).every(function(_n){return!React.isValidElement(_n)||!Br.type||_n.type.isSelectOption?!0:(yn=_n.type,!1)});return!mn}return yn=Wr,!0}),yn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(yn.displayName||yn.name||yn,"`.")),warning(ui===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function vi(xt,nt){if(xt){var Kt=function ln(xn){for(var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=0;St<xn.length;St++){var gn=xn[St];if(gn[nt==null?void 0:nt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!On&&Array.isArray(gn[nt==null?void 0:nt.options])&&ln(gn[nt==null?void 0:nt.options],!0))break}};Kt(xt)}}var Fi=null,Vn=["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"],bn=["inputValue"];function Mt(xt){return!xt||(0,Me.Z)(xt)!=="object"}var Ot=He.forwardRef(function(xt,nt){var Kt=xt.id,ln=xt.mode,xn=xt.prefixCls,On=xn===void 0?"rc-select":xn,St=xt.backfill,gn=xt.fieldNames,Rn=xt.inputValue,ai=xt.searchValue,hn=xt.onSearch,Jt=xt.autoClearSearchValue,Xn=Jt===void 0?!0:Jt,si=xt.onSelect,ui=xt.onDeselect,Qn=xt.dropdownMatchSelectWidth,di=Qn===void 0?!0:Qn,hi=xt.filterOption,Ri=xt.filterSort,Xi=xt.optionFilterProp,tr=xt.optionLabelProp,yn=xt.options,Br=xt.children,br=xt.defaultActiveFirstOption,Wr=xt.menuItemSelectedIcon,mn=xt.virtual,_n=xt.direction,Si=xt.listHeight,zi=Si===void 0?200:Si,Ni=xt.listItemHeight,ji=Ni===void 0?20:Ni,ar=xt.value,Qi=xt.defaultValue,nr=xt.labelInValue,hr=xt.onChange,An=(0,ht.Z)(xt,Vn),Jr=(0,Xt.ZP)(Kt),Bn=xe(ln),_r=!!(!yn&&Br),co=He.useMemo(function(){return hi===void 0&&ln==="combobox"?!1:hi},[hi,ln]),Bi=He.useMemo(function(){return Ge(gn,_r)},[JSON.stringify(gn),_r]),Po=(0,yt.Z)("",{value:ai!==void 0?ai:Rn,postState:function(Ko){return Ko||""}}),ao=(0,Ze.Z)(Po,2),Ki=ao[0],qi=ao[1],Zr=Dn(yn,Br,Bi,Xi,tr),ro=Zr.valueOptions,wi=Zr.labelOptions,Qe=Zr.options,uo=He.useCallback(function($r){var Ko=At($r);return Ko.map(function(So){var Ti,Wa,$a,bs,El;if(Mt(So))Ti=So;else{var Dl;$a=So.key,Wa=So.label,Ti=(Dl=So.value)!==null&&Dl!==void 0?Dl:$a}var bi=ro.get(Ti);if(bi){var Fa;if(Wa===void 0&&(Wa=bi==null?void 0:bi[tr||Bi.label]),$a===void 0&&($a=(Fa=bi==null?void 0:bi.key)!==null&&Fa!==void 0?Fa:Ti),bs=bi==null?void 0:bi.disabled,El=bi==null?void 0:bi.title,0)var cs}return{label:Wa,value:Ti,key:$a,disabled:bs,title:El}})},[Bi,tr,ro]),Zo=(0,yt.Z)(Qi,{value:ar}),ga=(0,Ze.Z)(Zo,2),Pa=ga[0],ia=ga[1],Dr=He.useMemo(function(){var $r,Ko=uo(Pa);return ln==="combobox"&&Bt(($r=Ko[0])===null||$r===void 0?void 0:$r.value)?[]:Ko},[Pa,uo,ln]),kr=_e(Dr,ro),fo=(0,Ze.Z)(kr,2),Rr=fo[0],To=fo[1],qa=He.useMemo(function(){if(!ln&&Rr.length===1){var $r=Rr[0];if($r.value===null&&($r.label===null||$r.label===void 0))return[]}return Rr.map(function(Ko){var So;return(0,wt.Z)((0,wt.Z)({},Ko),{},{label:(So=Ko.label)!==null&&So!==void 0?So:Ko.value})})},[ln,Rr]),Mr=He.useMemo(function(){return new Set(Rr.map(function($r){return $r.value}))},[Rr]);He.useEffect(function(){if(ln==="combobox"){var $r,Ko=($r=Rr[0])===null||$r===void 0?void 0:$r.value;qi(kt(Ko)?String(Ko):"")}},[Rr]);var sr=ii(function($r,Ko){var So,Ti=Ko!=null?Ko:$r;return So={},(0,ze.Z)(So,Bi.value,$r),(0,ze.Z)(So,Bi.label,Ti),So}),qn=He.useMemo(function(){if(ln!=="tags")return Qe;var $r=(0,De.Z)(Qe),Ko=function(Ti){return ro.has(Ti)};return(0,De.Z)(Rr).sort(function(So,Ti){return So.value<Ti.value?-1:1}).forEach(function(So){var Ti=So.value;Ko(Ti)||$r.push(sr(Ti,So.label))}),$r},[sr,Qe,ro,Rr,ln]),vr=ft(qn,Bi,Ki,co,Xi),wo=He.useMemo(function(){return ln!=="tags"||!Ki||vr.some(function($r){return $r[Xi||"value"]===Ki})||vr.some(function($r){return $r[Bi.value]===Ki})?vr:[sr(Ki)].concat((0,De.Z)(vr))},[sr,Xi,ln,vr,Ki,Bi]),ua=He.useMemo(function(){return Ri?(0,De.Z)(wo).sort(function($r,Ko){return Ri($r,Ko)}):wo},[wo,Ri]),Bo=He.useMemo(function(){return Dt(ua,{fieldNames:Bi,childrenAsData:_r})},[ua,Bi,_r]),yo=function(Ko){var So=uo(Ko);if(ia(So),hr&&(So.length!==Rr.length||So.some(function($a,bs){var El;return((El=Rr[bs])===null||El===void 0?void 0:El.value)!==($a==null?void 0:$a.value)}))){var Ti=nr?So:So.map(function($a){return $a.value}),Wa=So.map(function($a){return Tt(To($a.value))});hr(Bn?Ti:Ti[0],Bn?Wa:Wa[0])}},ta=He.useState(null),na=(0,Ze.Z)(ta,2),Ba=na[0],ka=na[1],is=He.useState(0),vn=(0,Ze.Z)(is,2),Oa=vn[0],Vl=vn[1],Hs=br!==void 0?br:ln!=="combobox",wl=He.useCallback(function($r,Ko){var So=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ti=So.source,Wa=Ti===void 0?"keyboard":Ti;Vl(Ko),St&&ln==="combobox"&&$r!==null&&Wa==="keyboard"&&ka(String($r))},[St,ln]),Ma=function(Ko,So,Ti){var Wa=function(){var Il,Qr=To(Ko);return[nr?{label:Qr==null?void 0:Qr[Bi.label],value:Ko,key:(Il=Qr==null?void 0:Qr.key)!==null&&Il!==void 0?Il:Ko}:Ko,Tt(Qr)]};if(So&&si){var $a=Wa(),bs=(0,Ze.Z)($a,2),El=bs[0],Dl=bs[1];si(El,Dl)}else if(!So&&ui&&Ti!=="clear"){var bi=Wa(),Fa=(0,Ze.Z)(bi,2),cs=Fa[0],bl=Fa[1];ui(cs,bl)}},yu=ii(function($r,Ko){var So,Ti=Bn?Ko.selected:!0;Ti?So=Bn?[].concat((0,De.Z)(Rr),[$r]):[$r]:So=Rr.filter(function(Wa){return Wa.value!==$r}),yo(So),Ma($r,Ti),ln==="combobox"?ka(""):(!xe||Xn)&&(qi(""),ka(""))}),Cl=function(Ko,So){yo(Ko);var Ti=So.type,Wa=So.values;(Ti==="remove"||Ti==="clear")&&Wa.forEach(function($a){Ma($a.value,!1,Ti)})},ma=function(Ko,So){if(qi(Ko),ka(null),So.source==="submit"){var Ti=(Ko||"").trim();if(Ti){var Wa=Array.from(new Set([].concat((0,De.Z)(Mr),[Ti])));yo(Wa),Ma(Ti,!0),qi("")}return}So.source!=="blur"&&(ln==="combobox"&&yo(Ko),hn==null||hn(Ko))},Fo=function(Ko){var So=Ko;ln!=="tags"&&(So=Ko.map(function(Wa){var $a=wi.get(Wa);return $a==null?void 0:$a.value}).filter(function(Wa){return Wa!==void 0}));var Ti=Array.from(new Set([].concat((0,De.Z)(Mr),(0,De.Z)(So))));yo(Ti),Ti.forEach(function(Wa){Ma(Wa,!0)})},Ul=He.useMemo(function(){var $r=mn!==!1&&di!==!1;return(0,wt.Z)((0,wt.Z)({},Zr),{},{flattenOptions:Bo,onActiveValue:wl,defaultActiveFirstOption:Hs,onSelect:yu,menuItemSelectedIcon:Wr,rawValues:Mr,fieldNames:Bi,virtual:$r,direction:_n,listHeight:zi,listItemHeight:ji,childrenAsData:_r})},[Zr,Bo,wl,Hs,yu,Wr,Mr,Bi,mn,di,zi,ji,_r]);return He.createElement(mi.Provider,{value:Ul},He.createElement(Be,(0,ce.Z)({},An,{id:Jr,prefixCls:On,ref:nt,omitDomProps:bn,mode:ln,displayValues:qa,onDisplayValuesChange:Cl,direction:_n,searchValue:Ki,onSearch:ma,autoClearSearchValue:Xn,onSearchSplit:Fo,dropdownMatchSelectWidth:di,OptionList:dn,emptyOptions:!Bo.length,activeValue:Ba,activeDescendantId:"".concat(Jr,"_list_").concat(Oa)})))}),Ve=Ot;Ve.Option=Yi,Ve.OptGroup=pi;var Yt=Ve,qt=Yt},9296:function(Cn,un,ve){"use strict";ve.r(un),ve.d(un,{ResizableTextArea:function(){return gt},default:function(){return Bt}});var ce=ve(72308),De=ve(77321),ze=ve(49618),wt=ve(62853),Ze=ve(52487),ht=ve(74416),Me=ve(80702),yt=ve(92310),ct=ve.n(yt),He=ve(93681),st=ve(5643),mt=ve(18929),dt=ve(59301),Ae=ve(29301),te=ve(34280),ee=ve(16089),he=`
|
|
|
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;
|
|
|
`,se=["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"],de={},me;function we(Gt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=Gt.getAttribute("id")||Gt.getAttribute("data-reactid")||Gt.getAttribute("name");if(Ut&&de[lt])return de[lt];var $e=window.getComputedStyle(Gt),Nt=$e.getPropertyValue("box-sizing")||$e.getPropertyValue("-moz-box-sizing")||$e.getPropertyValue("-webkit-box-sizing"),cn=parseFloat($e.getPropertyValue("padding-bottom"))+parseFloat($e.getPropertyValue("padding-top")),sn=parseFloat($e.getPropertyValue("border-bottom-width"))+parseFloat($e.getPropertyValue("border-top-width")),Ft=se.map(function(en){return"".concat(en,":").concat($e.getPropertyValue(en))}).join(";"),$t={sizingStyle:Ft,paddingSize:cn,borderSize:sn,boxSizing:Nt};return Ut&<&&(de[lt]=$t),$t}function Ne(Gt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,$e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;me||(me=document.createElement("textarea"),me.setAttribute("tab-index","-1"),me.setAttribute("aria-hidden","true"),document.body.appendChild(me)),Gt.getAttribute("wrap")?me.setAttribute("wrap",Gt.getAttribute("wrap")):me.removeAttribute("wrap");var Nt=we(Gt,Ut),cn=Nt.paddingSize,sn=Nt.borderSize,Ft=Nt.boxSizing,$t=Nt.sizingStyle;me.setAttribute("style","".concat($t,";").concat(he)),me.value=Gt.value||Gt.placeholder||"";var en=void 0,Nn=void 0,fn,Mn=me.scrollHeight;if(Ft==="border-box"?Mn+=sn:Ft==="content-box"&&(Mn-=cn),lt!==null||$e!==null){me.value=" ";var pt=me.scrollHeight-cn;lt!==null&&(en=pt*lt,Ft==="border-box"&&(en=en+cn+sn),Mn=Math.max(en,Mn)),$e!==null&&(Nn=pt*$e,Ft==="border-box"&&(Nn=Nn+cn+sn),fn=Mn>Nn?"":"hidden",Mn=Math.min(Nn,Mn))}var Ln={height:Mn,overflowY:fn,resize:"none"};return en&&(Ln.minHeight=en),Nn&&(Ln.maxHeight=Nn),Ln}var Fe=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ie=0,je=1,Je=2,Ke=dt.forwardRef(function(Gt,Ut){var lt=Gt,$e=lt.prefixCls,Nt=lt.onPressEnter,cn=lt.defaultValue,sn=lt.value,Ft=lt.autoSize,$t=lt.onResize,en=lt.className,Nn=lt.style,fn=lt.disabled,Mn=lt.onChange,pt=lt.onInternalAutoSize,Ln=(0,ht.Z)(lt,Fe),Un=(0,mt.Z)(cn,{value:sn,postState:function(pi){return pi!=null?pi:""}}),Zt=(0,Ze.Z)(Un,2),tn=Zt[0],Rt=Zt[1],Lt=function(pi){Rt(pi.target.value),Mn==null||Mn(pi)},ut=dt.useRef();dt.useImperativeHandle(Ut,function(){return{textArea:ut.current}});var Ge=dt.useMemo(function(){return Ft&&(0,wt.Z)(Ft)==="object"?[Ft.minRows,Ft.maxRows]:[]},[Ft]),Dt=(0,Ze.Z)(Ge,2),Tt=Dt[0],ot=Dt[1],et=!!Ft,Te=function(){try{if(document.activeElement===ut.current){var pi=ut.current,Ii=pi.selectionStart,Yi=pi.selectionEnd,Jn=pi.scrollTop;ut.current.setSelectionRange(Ii,Yi),ut.current.scrollTop=Jn}}catch(Wn){}},xe=dt.useState(Je),Se=(0,Ze.Z)(xe,2),Be=Se[0],_e=Se[1],Ee=dt.useState(),ft=(0,Ze.Z)(Ee,2),Xt=ft[0],an=ft[1],Qt=function(){_e(Ie)};(0,te.Z)(function(){et&&Qt()},[sn,Tt,ot,et]),(0,te.Z)(function(){if(Be===Ie)_e(je);else if(Be===je){var gi=Ne(ut.current,!1,Tt,ot);_e(Je),an(gi)}else Te()},[Be]);var En=dt.useRef(),Yn=function(){ee.Z.cancel(En.current)},zn=function(pi){Be===Je&&($t==null||$t(pi),Ft&&(Yn(),En.current=(0,ee.Z)(function(){Qt()})))};dt.useEffect(function(){return Yn},[]);var Dn=et?Xt:null,ii=(0,De.Z)((0,De.Z)({},Nn),Dn);return(Be===Ie||Be===je)&&(ii.overflowY="hidden",ii.overflowX="hidden"),dt.createElement(Ae.Z,{onResize:zn,disabled:!(Ft||$t)},dt.createElement("textarea",(0,ce.Z)({},Ln,{ref:ut,style:ii,className:ct()($e,en,(0,ze.Z)({},"".concat($e,"-disabled"),fn)),disabled:fn,value:tn,onChange:Lt})))}),gt=Ke,Re=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function At(Gt,Ut){return(0,Me.Z)(Gt||"").slice(0,Ut).join("")}function qe(Gt,Ut,lt,$e){var Nt=lt;return Gt?Nt=At(lt,$e):(0,Me.Z)(Ut||"").length<lt.length&&(0,Me.Z)(lt||"").length>$e&&(Nt=Ut),Nt}var Et=dt.forwardRef(function(Gt,Ut){var lt,$e=Gt.defaultValue,Nt=Gt.value,cn=Gt.onFocus,sn=Gt.onBlur,Ft=Gt.onChange,$t=Gt.allowClear,en=Gt.maxLength,Nn=Gt.onCompositionStart,fn=Gt.onCompositionEnd,Mn=Gt.suffix,pt=Gt.prefixCls,Ln=pt===void 0?"rc-textarea":pt,Un=Gt.classes,Zt=Gt.showCount,tn=Gt.className,Rt=Gt.style,Lt=Gt.disabled,ut=Gt.hidden,Ge=Gt.classNames,Dt=Gt.styles,Tt=Gt.onResize,ot=(0,ht.Z)(Gt,Re),et=(0,mt.Z)($e,{value:Nt,defaultValue:$e}),Te=(0,Ze.Z)(et,2),xe=Te[0],Se=Te[1],Be=(0,dt.useRef)(null),_e=dt.useState(!1),Ee=(0,Ze.Z)(_e,2),ft=Ee[0],Xt=Ee[1],an=dt.useState(!1),Qt=(0,Ze.Z)(an,2),En=Qt[0],Yn=Qt[1],zn=dt.useRef(),Dn=dt.useRef(0),ii=dt.useState(null),gi=(0,Ze.Z)(ii,2),pi=gi[0],Ii=gi[1],Yi=function(){var Mt;(Mt=Be.current)===null||Mt===void 0||Mt.textArea.focus()};(0,dt.useImperativeHandle)(Ut,function(){return{resizableTextArea:Be.current,focus:Yi,blur:function(){var Mt;(Mt=Be.current)===null||Mt===void 0||Mt.textArea.blur()}}}),(0,dt.useEffect)(function(){Xt(function(bn){return!Lt&&bn})},[Lt]);var Jn=Number(en)>0,Wn=function(Mt){Yn(!0),zn.current=xe,Dn.current=Mt.currentTarget.selectionStart,Nn==null||Nn(Mt)},ti=function(Mt){Yn(!1);var Ot=Mt.currentTarget.value;if(Jn){var Ve,Yt=Dn.current>=en+1||Dn.current===((Ve=zn.current)===null||Ve===void 0?void 0:Ve.length);Ot=qe(Yt,zn.current,Ot,en)}Ot!==xe&&(Se(Ot),(0,st.rJ)(Mt.currentTarget,Mt,Ft,Ot)),fn==null||fn(Mt)},yi=function(Mt){var Ot=Mt.target.value;if(!En&&Jn){var Ve=Mt.target.selectionStart>=en+1||Mt.target.selectionStart===Ot.length||!Mt.target.selectionStart;Ot=qe(Ve,xe,Ot,en)}Se(Ot),(0,st.rJ)(Mt.currentTarget,Mt,Ft,Ot)},mi=function(Mt){var Ot=ot.onPressEnter,Ve=ot.onKeyDown;Mt.key==="Enter"&&Ot&&Ot(Mt),Ve==null||Ve(Mt)},dr=function(Mt){Xt(!0),cn==null||cn(Mt)},mr=function(Mt){Xt(!1),sn==null||sn(Mt)},be=function(Mt){var Ot;Se(""),Yi(),(0,st.rJ)((Ot=Be.current)===null||Ot===void 0?void 0:Ot.textArea,Mt,Ft)},ci=(0,st.D7)(xe);!En&&Jn&&Nt==null&&(ci=At(ci,en));var Hi=Mn,dn;if(Zt){var oi=(0,Me.Z)(ci).length;(0,wt.Z)(Zt)==="object"?dn=Zt.formatter({value:ci,count:oi,maxLength:en}):dn="".concat(oi).concat(Jn?" / ".concat(en):""),Hi=dt.createElement(dt.Fragment,null,Hi,dt.createElement("span",{className:ct()("".concat(Ln,"-data-count"),Ge==null?void 0:Ge.count),style:Dt==null?void 0:Dt.count},dn))}var vi=function(Mt){var Ot;Tt==null||Tt(Mt),(Ot=Be.current)!==null&&Ot!==void 0&&Ot.textArea.style.height&&Ii(!0)},Fi=!ot.autoSize&&!Zt&&!$t,Vn=dt.createElement(He.BaseInput,{value:ci,allowClear:$t,handleReset:be,suffix:Hi,prefixCls:Ln,classes:{affixWrapper:ct()(Un==null?void 0:Un.affixWrapper,(lt={},(0,ze.Z)(lt,"".concat(Ln,"-show-count"),Zt),(0,ze.Z)(lt,"".concat(Ln,"-textarea-allow-clear"),$t),lt))},disabled:Lt,focused:ft,className:tn,style:(0,De.Z)((0,De.Z)({},Rt),pi&&!Fi?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof dn=="string"?dn:void 0}},hidden:ut,inputElement:dt.createElement(gt,(0,ce.Z)({},ot,{onKeyDown:mi,onChange:yi,onFocus:dr,onBlur:mr,onCompositionStart:Wn,onCompositionEnd:ti,className:Ge==null?void 0:Ge.textarea,style:(0,De.Z)((0,De.Z)({},Dt==null?void 0:Dt.textarea),{},{resize:Rt==null?void 0:Rt.resize}),disabled:Lt,prefixCls:Ln,onResize:vi,ref:Be}))});return Vn}),kt=Et,Bt=kt},39417:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return je}});var ce=ve(72308),De=ve(49618),ze=ve(74416),wt=ve(77321),Ze=ve(96949),ht=ve(55090),Me=ve(80237),yt=ve(77205),ct=ve(38793),He=ve(92310),st=ve.n(He),mt=ve(26112),dt=ve(59301),Ae=ve(39378),te=function(Ke){for(var gt=Ke.prefixCls,Re=Ke.level,At=Ke.isStart,qe=Ke.isEnd,Et="".concat(gt,"-indent-unit"),kt=[],Bt=0;Bt<Re;Bt+=1){var Gt;kt.push(dt.createElement("span",{key:Bt,className:st()(Et,(Gt={},(0,De.Z)(Gt,"".concat(Et,"-start"),At[Bt]),(0,De.Z)(Gt,"".concat(Et,"-end"),qe[Bt]),Gt))}))}return dt.createElement("span",{"aria-hidden":"true",className:"".concat(gt,"-indent")},kt)},ee=dt.memo(te),he=ve(67841),se=ve(71430),de=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],me="open",we="close",Ne="---",Fe=function(Je){(0,yt.Z)(gt,Je);var Ke=(0,ct.Z)(gt);function gt(){var Re;(0,Ze.Z)(this,gt);for(var At=arguments.length,qe=new Array(At),Et=0;Et<At;Et++)qe[Et]=arguments[Et];return Re=Ke.call.apply(Ke,[this].concat(qe)),Re.state={dragNodeHighlight:!1},Re.selectHandle=void 0,Re.cacheIndent=void 0,Re.onSelectorClick=function(kt){var Bt=Re.props.context.onNodeClick;Bt(kt,(0,se.F)(Re.props)),Re.isSelectable()?Re.onSelect(kt):Re.onCheck(kt)},Re.onSelectorDoubleClick=function(kt){var Bt=Re.props.context.onNodeDoubleClick;Bt(kt,(0,se.F)(Re.props))},Re.onSelect=function(kt){if(!Re.isDisabled()){var Bt=Re.props.context.onNodeSelect;Bt(kt,(0,se.F)(Re.props))}},Re.onCheck=function(kt){if(!Re.isDisabled()){var Bt=Re.props,Gt=Bt.disableCheckbox,Ut=Bt.checked,lt=Re.props.context.onNodeCheck;if(!(!Re.isCheckable()||Gt)){var $e=!Ut;lt(kt,(0,se.F)(Re.props),$e)}}},Re.onMouseEnter=function(kt){var Bt=Re.props.context.onNodeMouseEnter;Bt(kt,(0,se.F)(Re.props))},Re.onMouseLeave=function(kt){var Bt=Re.props.context.onNodeMouseLeave;Bt(kt,(0,se.F)(Re.props))},Re.onContextMenu=function(kt){var Bt=Re.props.context.onNodeContextMenu;Bt(kt,(0,se.F)(Re.props))},Re.onDragStart=function(kt){var Bt=Re.props.context.onNodeDragStart;kt.stopPropagation(),Re.setState({dragNodeHighlight:!0}),Bt(kt,(0,Me.Z)(Re));try{kt.dataTransfer.setData("text/plain","")}catch(Gt){}},Re.onDragEnter=function(kt){var Bt=Re.props.context.onNodeDragEnter;kt.preventDefault(),kt.stopPropagation(),Bt(kt,(0,Me.Z)(Re))},Re.onDragOver=function(kt){var Bt=Re.props.context.onNodeDragOver;kt.preventDefault(),kt.stopPropagation(),Bt(kt,(0,Me.Z)(Re))},Re.onDragLeave=function(kt){var Bt=Re.props.context.onNodeDragLeave;kt.stopPropagation(),Bt(kt,(0,Me.Z)(Re))},Re.onDragEnd=function(kt){var Bt=Re.props.context.onNodeDragEnd;kt.stopPropagation(),Re.setState({dragNodeHighlight:!1}),Bt(kt,(0,Me.Z)(Re))},Re.onDrop=function(kt){var Bt=Re.props.context.onNodeDrop;kt.preventDefault(),kt.stopPropagation(),Re.setState({dragNodeHighlight:!1}),Bt(kt,(0,Me.Z)(Re))},Re.onExpand=function(kt){var Bt=Re.props,Gt=Bt.loading,Ut=Bt.context.onNodeExpand;Gt||Ut(kt,(0,se.F)(Re.props))},Re.setSelectHandle=function(kt){Re.selectHandle=kt},Re.getNodeState=function(){var kt=Re.props.expanded;return Re.isLeaf()?null:kt?me:we},Re.hasChildren=function(){var kt=Re.props.eventKey,Bt=Re.props.context.keyEntities,Gt=(0,he.Z)(Bt,kt)||{},Ut=Gt.children;return!!(Ut||[]).length},Re.isLeaf=function(){var kt=Re.props,Bt=kt.isLeaf,Gt=kt.loaded,Ut=Re.props.context.loadData,lt=Re.hasChildren();return Bt===!1?!1:Bt||!Ut&&!lt||Ut&&Gt&&!lt},Re.isDisabled=function(){var kt=Re.props.disabled,Bt=Re.props.context.disabled;return!!(Bt||kt)},Re.isCheckable=function(){var kt=Re.props.checkable,Bt=Re.props.context.checkable;return!Bt||kt===!1?!1:Bt},Re.syncLoadData=function(kt){var Bt=kt.expanded,Gt=kt.loading,Ut=kt.loaded,lt=Re.props.context,$e=lt.loadData,Nt=lt.onNodeLoad;Gt||$e&&Bt&&!Re.isLeaf()&&!Re.hasChildren()&&!Ut&&Nt((0,se.F)(Re.props))},Re.isDraggable=function(){var kt=Re.props,Bt=kt.data,Gt=kt.context.draggable;return!!(Gt&&(!Gt.nodeDraggable||Gt.nodeDraggable(Bt)))},Re.renderDragHandler=function(){var kt=Re.props.context,Bt=kt.draggable,Gt=kt.prefixCls;return Bt!=null&&Bt.icon?dt.createElement("span",{className:"".concat(Gt,"-draggable-icon")},Bt.icon):null},Re.renderSwitcherIconDom=function(kt){var Bt=Re.props.switcherIcon,Gt=Re.props.context.switcherIcon,Ut=Bt||Gt;return typeof Ut=="function"?Ut((0,wt.Z)((0,wt.Z)({},Re.props),{},{isLeaf:kt})):Ut},Re.renderSwitcher=function(){var kt=Re.props.expanded,Bt=Re.props.context.prefixCls;if(Re.isLeaf()){var Gt=Re.renderSwitcherIconDom(!0);return Gt!==!1?dt.createElement("span",{className:st()("".concat(Bt,"-switcher"),"".concat(Bt,"-switcher-noop"))},Gt):null}var Ut=st()("".concat(Bt,"-switcher"),"".concat(Bt,"-switcher_").concat(kt?me:we)),lt=Re.renderSwitcherIconDom(!1);return lt!==!1?dt.createElement("span",{onClick:Re.onExpand,className:Ut},lt):null},Re.renderCheckbox=function(){var kt=Re.props,Bt=kt.checked,Gt=kt.halfChecked,Ut=kt.disableCheckbox,lt=Re.props.context.prefixCls,$e=Re.isDisabled(),Nt=Re.isCheckable();if(!Nt)return null;var cn=typeof Nt!="boolean"?Nt:null;return dt.createElement("span",{className:st()("".concat(lt,"-checkbox"),Bt&&"".concat(lt,"-checkbox-checked"),!Bt&&Gt&&"".concat(lt,"-checkbox-indeterminate"),($e||Ut)&&"".concat(lt,"-checkbox-disabled")),onClick:Re.onCheck},cn)},Re.renderIcon=function(){var kt=Re.props.loading,Bt=Re.props.context.prefixCls;return dt.createElement("span",{className:st()("".concat(Bt,"-iconEle"),"".concat(Bt,"-icon__").concat(Re.getNodeState()||"docu"),kt&&"".concat(Bt,"-icon_loading"))})},Re.renderSelector=function(){var kt=Re.state.dragNodeHighlight,Bt=Re.props,Gt=Bt.title,Ut=Gt===void 0?Ne:Gt,lt=Bt.selected,$e=Bt.icon,Nt=Bt.loading,cn=Bt.data,sn=Re.props.context,Ft=sn.prefixCls,$t=sn.showIcon,en=sn.icon,Nn=sn.loadData,fn=sn.titleRender,Mn=Re.isDisabled(),pt="".concat(Ft,"-node-content-wrapper"),Ln;if($t){var Un=$e||en;Ln=Un?dt.createElement("span",{className:st()("".concat(Ft,"-iconEle"),"".concat(Ft,"-icon__customize"))},typeof Un=="function"?Un(Re.props):Un):Re.renderIcon()}else Nn&&Nt&&(Ln=Re.renderIcon());var Zt;typeof Ut=="function"?Zt=Ut(cn):fn?Zt=fn(cn):Zt=Ut;var tn=dt.createElement("span",{className:"".concat(Ft,"-title")},Zt);return dt.createElement("span",{ref:Re.setSelectHandle,title:typeof Ut=="string"?Ut:"",className:st()("".concat(pt),"".concat(pt,"-").concat(Re.getNodeState()||"normal"),!Mn&&(lt||kt)&&"".concat(Ft,"-node-selected")),onMouseEnter:Re.onMouseEnter,onMouseLeave:Re.onMouseLeave,onContextMenu:Re.onContextMenu,onClick:Re.onSelectorClick,onDoubleClick:Re.onSelectorDoubleClick},Ln,tn,Re.renderDropIndicator())},Re.renderDropIndicator=function(){var kt=Re.props,Bt=kt.disabled,Gt=kt.eventKey,Ut=Re.props.context,lt=Ut.draggable,$e=Ut.dropLevelOffset,Nt=Ut.dropPosition,cn=Ut.prefixCls,sn=Ut.indent,Ft=Ut.dropIndicatorRender,$t=Ut.dragOverNodeKey,en=Ut.direction,Nn=!!lt,fn=!Bt&&Nn&&$t===Gt,Mn=sn!=null?sn:Re.cacheIndent;return Re.cacheIndent=sn,fn?Ft({dropPosition:Nt,dropLevelOffset:$e,indent:Mn,prefixCls:cn,direction:en}):null},Re}return(0,ht.Z)(gt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var At=this.props.selectable,qe=this.props.context.selectable;return typeof At=="boolean"?At:qe}},{key:"render",value:function(){var At,qe=this.props,Et=qe.eventKey,kt=qe.className,Bt=qe.style,Gt=qe.dragOver,Ut=qe.dragOverGapTop,lt=qe.dragOverGapBottom,$e=qe.isLeaf,Nt=qe.isStart,cn=qe.isEnd,sn=qe.expanded,Ft=qe.selected,$t=qe.checked,en=qe.halfChecked,Nn=qe.loading,fn=qe.domRef,Mn=qe.active,pt=qe.data,Ln=qe.onMouseMove,Un=qe.selectable,Zt=(0,ze.Z)(qe,de),tn=this.props.context,Rt=tn.prefixCls,Lt=tn.filterTreeNode,ut=tn.keyEntities,Ge=tn.dropContainerKey,Dt=tn.dropTargetKey,Tt=tn.draggingNodeKey,ot=this.isDisabled(),et=(0,mt.Z)(Zt,{aria:!0,data:!0}),Te=(0,he.Z)(ut,Et)||{},xe=Te.level,Se=cn[cn.length-1],Be=this.isDraggable(),_e=!ot&&Be,Ee=Tt===Et,ft=Un!==void 0?{"aria-selected":!!Un}:void 0;return dt.createElement("div",(0,ce.Z)({ref:fn,className:st()(kt,"".concat(Rt,"-treenode"),(At={},(0,De.Z)(At,"".concat(Rt,"-treenode-disabled"),ot),(0,De.Z)(At,"".concat(Rt,"-treenode-switcher-").concat(sn?"open":"close"),!$e),(0,De.Z)(At,"".concat(Rt,"-treenode-checkbox-checked"),$t),(0,De.Z)(At,"".concat(Rt,"-treenode-checkbox-indeterminate"),en),(0,De.Z)(At,"".concat(Rt,"-treenode-selected"),Ft),(0,De.Z)(At,"".concat(Rt,"-treenode-loading"),Nn),(0,De.Z)(At,"".concat(Rt,"-treenode-active"),Mn),(0,De.Z)(At,"".concat(Rt,"-treenode-leaf-last"),Se),(0,De.Z)(At,"".concat(Rt,"-treenode-draggable"),Be),(0,De.Z)(At,"dragging",Ee),(0,De.Z)(At,"drop-target",Dt===Et),(0,De.Z)(At,"drop-container",Ge===Et),(0,De.Z)(At,"drag-over",!ot&&Gt),(0,De.Z)(At,"drag-over-gap-top",!ot&&Ut),(0,De.Z)(At,"drag-over-gap-bottom",!ot&<),(0,De.Z)(At,"filter-node",Lt&&Lt((0,se.F)(this.props))),At)),style:Bt,draggable:_e,"aria-grabbed":Ee,onDragStart:_e?this.onDragStart:void 0,onDragEnter:Be?this.onDragEnter:void 0,onDragOver:Be?this.onDragOver:void 0,onDragLeave:Be?this.onDragLeave:void 0,onDrop:Be?this.onDrop:void 0,onDragEnd:Be?this.onDragEnd:void 0,onMouseMove:Ln},ft,et),dt.createElement(ee,{prefixCls:Rt,level:xe,isStart:Nt,isEnd:cn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),gt}(dt.Component),Ie=function(Ke){return dt.createElement(Ae.k.Consumer,null,function(gt){return dt.createElement(Fe,(0,ce.Z)({},Ke,{context:gt}))})};Ie.displayName="TreeNode",Ie.isTreeNode=1;var je=Ie},39378:function(Cn,un,ve){"use strict";ve.d(un,{k:function(){return De}});var ce=ve(59301),De=ce.createContext(null)},54844:function(Cn,un,ve){"use strict";ve.d(un,{O:function(){return je.Z},Z:function(){return tn}});var ce=ve(72308),De=ve(49618),ze=ve(62853),wt=ve(77321),Ze=ve(80702),ht=ve(96949),Me=ve(55090),yt=ve(80237),ct=ve(77205),He=ve(38793),st=ve(92310),mt=ve.n(st),dt=ve(10228),Ae=ve(26112),te=ve(48736),ee=ve(59301),he=ve(39378);function se(Rt){var Lt=Rt.dropPosition,ut=Rt.dropLevelOffset,Ge=Rt.indent,Dt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Lt){case-1:Dt.top=0,Dt.left=-ut*Ge;break;case 1:Dt.bottom=0,Dt.left=-ut*Ge;break;case 0:Dt.bottom=0,Dt.left=Ge;break}return ee.createElement("div",{style:Dt})}function de(Rt){if(Rt==null)throw new TypeError("Cannot destructure "+Rt)}var me=ve(52487),we=ve(74416),Ne=ve(34280),Fe=ve(45680),Ie=ve(77900),je=ve(39417);function Je(Rt,Lt){var ut=ee.useState(!1),Ge=(0,me.Z)(ut,2),Dt=Ge[0],Tt=Ge[1];ee.useLayoutEffect(function(){if(Dt)return Rt(),function(){Lt()}},[Dt]),ee.useLayoutEffect(function(){return Tt(!0),function(){Tt(!1)}},[])}var Ke=ve(71430),gt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Re=function(Lt,ut){var Ge=Lt.className,Dt=Lt.style,Tt=Lt.motion,ot=Lt.motionNodes,et=Lt.motionType,Te=Lt.onMotionStart,xe=Lt.onMotionEnd,Se=Lt.active,Be=Lt.treeNodeRequiredProps,_e=(0,we.Z)(Lt,gt),Ee=ee.useState(!0),ft=(0,me.Z)(Ee,2),Xt=ft[0],an=ft[1],Qt=ee.useContext(he.k),En=Qt.prefixCls,Yn=ot&&et!=="hide";(0,Ne.Z)(function(){ot&&Yn!==Xt&&an(Yn)},[ot]);var zn=function(){ot&&Te()},Dn=ee.useRef(!1),ii=function(){ot&&!Dn.current&&(Dn.current=!0,xe())};Je(zn,ii);var gi=function(Ii){Yn===Ii&&ii()};return ot?ee.createElement(Ie.default,(0,ce.Z)({ref:ut,visible:Xt},Tt,{motionAppear:et==="show",onVisibleChanged:gi}),function(pi,Ii){var Yi=pi.className,Jn=pi.style;return ee.createElement("div",{ref:Ii,className:mt()("".concat(En,"-treenode-motion"),Yi),style:Jn},ot.map(function(Wn){var ti=(0,ce.Z)({},(de(Wn.data),Wn.data)),yi=Wn.title,mi=Wn.key,dr=Wn.isStart,mr=Wn.isEnd;delete ti.children;var be=(0,Ke.H8)(mi,Be);return ee.createElement(je.Z,(0,ce.Z)({},ti,be,{title:yi,active:Se,data:Wn.data,key:mi,isStart:dr,isEnd:mr}))}))}):ee.createElement(je.Z,(0,ce.Z)({domRef:ut,className:Ge,style:Dt},_e,{active:Se}))};Re.displayName="MotionTreeNode";var At=ee.forwardRef(Re),qe=At;function Et(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ut=Rt.length,Ge=Lt.length;if(Math.abs(ut-Ge)!==1)return{add:!1,key:null};function Dt(Tt,ot){var et=new Map;Tt.forEach(function(xe){et.set(xe,!0)});var Te=ot.filter(function(xe){return!et.has(xe)});return Te.length===1?Te[0]:null}return ut<Ge?{add:!0,key:Dt(Rt,Lt)}:{add:!1,key:Dt(Lt,Rt)}}function kt(Rt,Lt,ut){var Ge=Rt.findIndex(function(et){return et.key===ut}),Dt=Rt[Ge+1],Tt=Lt.findIndex(function(et){return et.key===ut});if(Dt){var ot=Lt.findIndex(function(et){return et.key===Dt.key});return Lt.slice(Tt+1,ot)}return Lt.slice(Tt+1)}var Bt=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Gt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ut=function(){},lt="RC_TREE_MOTION_".concat(Math.random()),$e={key:lt},Nt={key:lt,level:0,index:0,pos:"0",node:$e,nodes:[$e]},cn={parent:null,children:[],pos:Nt.pos,data:$e,title:null,key:lt,isStart:[],isEnd:[]};function sn(Rt,Lt,ut,Ge){return Lt===!1||!ut?Rt:Rt.slice(0,Math.ceil(ut/Ge)+1)}function Ft(Rt){var Lt=Rt.key,ut=Rt.pos;return(0,Ke.km)(Lt,ut)}function $t(Rt){for(var Lt=String(Rt.data.key),ut=Rt;ut.parent;)ut=ut.parent,Lt="".concat(ut.data.key," > ").concat(Lt);return Lt}var en=ee.forwardRef(function(Rt,Lt){var ut=Rt.prefixCls,Ge=Rt.data,Dt=Rt.selectable,Tt=Rt.checkable,ot=Rt.expandedKeys,et=Rt.selectedKeys,Te=Rt.checkedKeys,xe=Rt.loadedKeys,Se=Rt.loadingKeys,Be=Rt.halfCheckedKeys,_e=Rt.keyEntities,Ee=Rt.disabled,ft=Rt.dragging,Xt=Rt.dragOverNodeKey,an=Rt.dropPosition,Qt=Rt.motion,En=Rt.height,Yn=Rt.itemHeight,zn=Rt.virtual,Dn=Rt.focusable,ii=Rt.activeItem,gi=Rt.focused,pi=Rt.tabIndex,Ii=Rt.onKeyDown,Yi=Rt.onFocus,Jn=Rt.onBlur,Wn=Rt.onActiveChange,ti=Rt.onListChangeStart,yi=Rt.onListChangeEnd,mi=(0,we.Z)(Rt,Bt),dr=ee.useRef(null),mr=ee.useRef(null);ee.useImperativeHandle(Lt,function(){return{scrollTo:function(Jt){dr.current.scrollTo(Jt)},getIndentWidth:function(){return mr.current.offsetWidth}}});var be=ee.useState(ot),ci=(0,me.Z)(be,2),Hi=ci[0],dn=ci[1],oi=ee.useState(Ge),vi=(0,me.Z)(oi,2),Fi=vi[0],Vn=vi[1],bn=ee.useState(Ge),Mt=(0,me.Z)(bn,2),Ot=Mt[0],Ve=Mt[1],Yt=ee.useState([]),qt=(0,me.Z)(Yt,2),xt=qt[0],nt=qt[1],Kt=ee.useState(null),ln=(0,me.Z)(Kt,2),xn=ln[0],On=ln[1],St=ee.useRef(Ge);St.current=Ge;function gn(){var hn=St.current;Vn(hn),Ve(hn),nt([]),On(null),yi()}(0,Ne.Z)(function(){dn(ot);var hn=Et(Hi,ot);if(hn.key!==null)if(hn.add){var Jt=Fi.findIndex(function(hi){var Ri=hi.key;return Ri===hn.key}),Xn=sn(kt(Fi,Ge,hn.key),zn,En,Yn),si=Fi.slice();si.splice(Jt+1,0,cn),Ve(si),nt(Xn),On("show")}else{var ui=Ge.findIndex(function(hi){var Ri=hi.key;return Ri===hn.key}),Qn=sn(kt(Ge,Fi,hn.key),zn,En,Yn),di=Ge.slice();di.splice(ui+1,0,cn),Ve(di),nt(Qn),On("hide")}else Fi!==Ge&&(Vn(Ge),Ve(Ge))},[ot,Ge]),ee.useEffect(function(){ft||gn()},[ft]);var Rn=Qt?Ot:Ge,ai={expandedKeys:ot,selectedKeys:et,loadedKeys:xe,loadingKeys:Se,checkedKeys:Te,halfCheckedKeys:Be,dragOverNodeKey:Xt,dropPosition:an,keyEntities:_e};return ee.createElement(ee.Fragment,null,gi&&ii&&ee.createElement("span",{style:Gt,"aria-live":"assertive"},$t(ii)),ee.createElement("div",null,ee.createElement("input",{style:Gt,disabled:Dn===!1||Ee,tabIndex:Dn!==!1?pi:null,onKeyDown:Ii,onFocus:Yi,onBlur:Jn,value:"",onChange:Ut,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(ut,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(ut,"-indent")},ee.createElement("div",{ref:mr,className:"".concat(ut,"-indent-unit")}))),ee.createElement(Fe.Z,(0,ce.Z)({},mi,{data:Rn,itemKey:Ft,height:En,fullHeight:!1,virtual:zn,itemHeight:Yn,prefixCls:"".concat(ut,"-list"),ref:dr,onVisibleChange:function(Jt,Xn){var si=new Set(Jt),ui=Xn.filter(function(Qn){return!si.has(Qn)});ui.some(function(Qn){return Ft(Qn)===lt})&&gn()}}),function(hn){var Jt=hn.pos,Xn=(0,ce.Z)({},(de(hn.data),hn.data)),si=hn.title,ui=hn.key,Qn=hn.isStart,di=hn.isEnd,hi=(0,Ke.km)(ui,Jt);delete Xn.key,delete Xn.children;var Ri=(0,Ke.H8)(hi,ai);return ee.createElement(qe,(0,ce.Z)({},Xn,Ri,{title:si,active:!!ii&&ui===ii.key,pos:Jt,data:hn.data,isStart:Qn,isEnd:di,motion:Qt,motionNodes:ui===lt?xt:null,motionType:xn,onMotionStart:ti,onMotionEnd:gn,treeNodeRequiredProps:ai,onMouseMove:function(){Wn(null)}}))}))});en.displayName="NodeList";var Nn=en,fn=ve(35654),Mn=ve(90782),pt=ve(67841),Ln=10,Un=function(Rt){(0,ct.Z)(ut,Rt);var Lt=(0,He.Z)(ut);function ut(){var Ge;(0,ht.Z)(this,ut);for(var Dt=arguments.length,Tt=new Array(Dt),ot=0;ot<Dt;ot++)Tt[ot]=arguments[ot];return Ge=Lt.call.apply(Lt,[this].concat(Tt)),Ge.destroyed=!1,Ge.delayedDragEnterLogic=void 0,Ge.loadingRetryTimes={},Ge.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Ke.w$)()},Ge.dragStartMousePosition=null,Ge.dragNode=void 0,Ge.currentMouseOverDroppableNodeKey=null,Ge.listRef=ee.createRef(),Ge.onNodeDragStart=function(et,Te){var xe=Ge.state,Se=xe.expandedKeys,Be=xe.keyEntities,_e=Ge.props.onDragStart,Ee=Te.props.eventKey;Ge.dragNode=Te,Ge.dragStartMousePosition={x:et.clientX,y:et.clientY};var ft=(0,fn._5)(Se,Ee);Ge.setState({draggingNodeKey:Ee,dragChildrenKeys:(0,fn.wA)(Ee,Be),indent:Ge.listRef.current.getIndentWidth()}),Ge.setExpandedKeys(ft),window.addEventListener("dragend",Ge.onWindowDragEnd),_e==null||_e({event:et,node:(0,Ke.F)(Te.props)})},Ge.onNodeDragEnter=function(et,Te){var xe=Ge.state,Se=xe.expandedKeys,Be=xe.keyEntities,_e=xe.dragChildrenKeys,Ee=xe.flattenNodes,ft=xe.indent,Xt=Ge.props,an=Xt.onDragEnter,Qt=Xt.onExpand,En=Xt.allowDrop,Yn=Xt.direction,zn=Te.props,Dn=zn.pos,ii=zn.eventKey,gi=(0,yt.Z)(Ge),pi=gi.dragNode;if(Ge.currentMouseOverDroppableNodeKey!==ii&&(Ge.currentMouseOverDroppableNodeKey=ii),!pi){Ge.resetDragState();return}var Ii=(0,fn.OM)(et,pi,Te,ft,Ge.dragStartMousePosition,En,Ee,Be,Se,Yn),Yi=Ii.dropPosition,Jn=Ii.dropLevelOffset,Wn=Ii.dropTargetKey,ti=Ii.dropContainerKey,yi=Ii.dropTargetPos,mi=Ii.dropAllowed,dr=Ii.dragOverNodeKey;if(_e.indexOf(Wn)!==-1||!mi){Ge.resetDragState();return}if(Ge.delayedDragEnterLogic||(Ge.delayedDragEnterLogic={}),Object.keys(Ge.delayedDragEnterLogic).forEach(function(mr){clearTimeout(Ge.delayedDragEnterLogic[mr])}),pi.props.eventKey!==Te.props.eventKey&&(et.persist(),Ge.delayedDragEnterLogic[Dn]=window.setTimeout(function(){if(Ge.state.draggingNodeKey!==null){var mr=(0,Ze.Z)(Se),be=(0,pt.Z)(Be,Te.props.eventKey);be&&(be.children||[]).length&&(mr=(0,fn.L0)(Se,Te.props.eventKey)),"expandedKeys"in Ge.props||Ge.setExpandedKeys(mr),Qt==null||Qt(mr,{node:(0,Ke.F)(Te.props),expanded:!0,nativeEvent:et.nativeEvent})}},800)),pi.props.eventKey===Wn&&Jn===0){Ge.resetDragState();return}Ge.setState({dragOverNodeKey:dr,dropPosition:Yi,dropLevelOffset:Jn,dropTargetKey:Wn,dropContainerKey:ti,dropTargetPos:yi,dropAllowed:mi}),an==null||an({event:et,node:(0,Ke.F)(Te.props),expandedKeys:Se})},Ge.onNodeDragOver=function(et,Te){var xe=Ge.state,Se=xe.dragChildrenKeys,Be=xe.flattenNodes,_e=xe.keyEntities,Ee=xe.expandedKeys,ft=xe.indent,Xt=Ge.props,an=Xt.onDragOver,Qt=Xt.allowDrop,En=Xt.direction,Yn=(0,yt.Z)(Ge),zn=Yn.dragNode;if(zn){var Dn=(0,fn.OM)(et,zn,Te,ft,Ge.dragStartMousePosition,Qt,Be,_e,Ee,En),ii=Dn.dropPosition,gi=Dn.dropLevelOffset,pi=Dn.dropTargetKey,Ii=Dn.dropContainerKey,Yi=Dn.dropAllowed,Jn=Dn.dropTargetPos,Wn=Dn.dragOverNodeKey;Se.indexOf(pi)!==-1||!Yi||(zn.props.eventKey===pi&&gi===0?Ge.state.dropPosition===null&&Ge.state.dropLevelOffset===null&&Ge.state.dropTargetKey===null&&Ge.state.dropContainerKey===null&&Ge.state.dropTargetPos===null&&Ge.state.dropAllowed===!1&&Ge.state.dragOverNodeKey===null||Ge.resetDragState():ii===Ge.state.dropPosition&&gi===Ge.state.dropLevelOffset&&pi===Ge.state.dropTargetKey&&Ii===Ge.state.dropContainerKey&&Jn===Ge.state.dropTargetPos&&Yi===Ge.state.dropAllowed&&Wn===Ge.state.dragOverNodeKey||Ge.setState({dropPosition:ii,dropLevelOffset:gi,dropTargetKey:pi,dropContainerKey:Ii,dropTargetPos:Jn,dropAllowed:Yi,dragOverNodeKey:Wn}),an==null||an({event:et,node:(0,Ke.F)(Te.props)}))}},Ge.onNodeDragLeave=function(et,Te){Ge.currentMouseOverDroppableNodeKey===Te.props.eventKey&&!et.currentTarget.contains(et.relatedTarget)&&(Ge.resetDragState(),Ge.currentMouseOverDroppableNodeKey=null);var xe=Ge.props.onDragLeave;xe==null||xe({event:et,node:(0,Ke.F)(Te.props)})},Ge.onWindowDragEnd=function(et){Ge.onNodeDragEnd(et,null,!0),window.removeEventListener("dragend",Ge.onWindowDragEnd)},Ge.onNodeDragEnd=function(et,Te){var xe=Ge.props.onDragEnd;Ge.setState({dragOverNodeKey:null}),Ge.cleanDragState(),xe==null||xe({event:et,node:(0,Ke.F)(Te.props)}),Ge.dragNode=null,window.removeEventListener("dragend",Ge.onWindowDragEnd)},Ge.onNodeDrop=function(et,Te){var xe,Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Be=Ge.state,_e=Be.dragChildrenKeys,Ee=Be.dropPosition,ft=Be.dropTargetKey,Xt=Be.dropTargetPos,an=Be.dropAllowed;if(an){var Qt=Ge.props.onDrop;if(Ge.setState({dragOverNodeKey:null}),Ge.cleanDragState(),ft!==null){var En=(0,wt.Z)((0,wt.Z)({},(0,Ke.H8)(ft,Ge.getTreeNodeRequiredProps())),{},{active:((xe=Ge.getActiveItem())===null||xe===void 0?void 0:xe.key)===ft,data:(0,pt.Z)(Ge.state.keyEntities,ft).node}),Yn=_e.indexOf(ft)!==-1;(0,te.ZP)(!Yn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var zn=(0,fn.yx)(Xt),Dn={event:et,node:(0,Ke.F)(En),dragNode:Ge.dragNode?(0,Ke.F)(Ge.dragNode.props):null,dragNodesKeys:[Ge.dragNode.props.eventKey].concat(_e),dropToGap:Ee!==0,dropPosition:Ee+Number(zn[zn.length-1])};Se||Qt==null||Qt(Dn),Ge.dragNode=null}}},Ge.cleanDragState=function(){var et=Ge.state.draggingNodeKey;et!==null&&Ge.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ge.dragStartMousePosition=null,Ge.currentMouseOverDroppableNodeKey=null},Ge.triggerExpandActionExpand=function(et,Te){var xe=Ge.state,Se=xe.expandedKeys,Be=xe.flattenNodes,_e=Te.expanded,Ee=Te.key,ft=Te.isLeaf;if(!(ft||et.shiftKey||et.metaKey||et.ctrlKey)){var Xt=Be.filter(function(Qt){return Qt.key===Ee})[0],an=(0,Ke.F)((0,wt.Z)((0,wt.Z)({},(0,Ke.H8)(Ee,Ge.getTreeNodeRequiredProps())),{},{data:Xt.data}));Ge.setExpandedKeys(_e?(0,fn._5)(Se,Ee):(0,fn.L0)(Se,Ee)),Ge.onNodeExpand(et,an)}},Ge.onNodeClick=function(et,Te){var xe=Ge.props,Se=xe.onClick,Be=xe.expandAction;Be==="click"&&Ge.triggerExpandActionExpand(et,Te),Se==null||Se(et,Te)},Ge.onNodeDoubleClick=function(et,Te){var xe=Ge.props,Se=xe.onDoubleClick,Be=xe.expandAction;Be==="doubleClick"&&Ge.triggerExpandActionExpand(et,Te),Se==null||Se(et,Te)},Ge.onNodeSelect=function(et,Te){var xe=Ge.state.selectedKeys,Se=Ge.state,Be=Se.keyEntities,_e=Se.fieldNames,Ee=Ge.props,ft=Ee.onSelect,Xt=Ee.multiple,an=Te.selected,Qt=Te[_e.key],En=!an;En?Xt?xe=(0,fn.L0)(xe,Qt):xe=[Qt]:xe=(0,fn._5)(xe,Qt);var Yn=xe.map(function(zn){var Dn=(0,pt.Z)(Be,zn);return Dn?Dn.node:null}).filter(function(zn){return zn});Ge.setUncontrolledState({selectedKeys:xe}),ft==null||ft(xe,{event:"select",selected:En,node:Te,selectedNodes:Yn,nativeEvent:et.nativeEvent})},Ge.onNodeCheck=function(et,Te,xe){var Se=Ge.state,Be=Se.keyEntities,_e=Se.checkedKeys,Ee=Se.halfCheckedKeys,ft=Ge.props,Xt=ft.checkStrictly,an=ft.onCheck,Qt=Te.key,En,Yn={event:"check",node:Te,checked:xe,nativeEvent:et.nativeEvent};if(Xt){var zn=xe?(0,fn.L0)(_e,Qt):(0,fn._5)(_e,Qt),Dn=(0,fn._5)(Ee,Qt);En={checked:zn,halfChecked:Dn},Yn.checkedNodes=zn.map(function(Jn){return(0,pt.Z)(Be,Jn)}).filter(function(Jn){return Jn}).map(function(Jn){return Jn.node}),Ge.setUncontrolledState({checkedKeys:zn})}else{var ii=(0,Mn.S)([].concat((0,Ze.Z)(_e),[Qt]),!0,Be),gi=ii.checkedKeys,pi=ii.halfCheckedKeys;if(!xe){var Ii=new Set(gi);Ii.delete(Qt);var Yi=(0,Mn.S)(Array.from(Ii),{checked:!1,halfCheckedKeys:pi},Be);gi=Yi.checkedKeys,pi=Yi.halfCheckedKeys}En=gi,Yn.checkedNodes=[],Yn.checkedNodesPositions=[],Yn.halfCheckedKeys=pi,gi.forEach(function(Jn){var Wn=(0,pt.Z)(Be,Jn);if(Wn){var ti=Wn.node,yi=Wn.pos;Yn.checkedNodes.push(ti),Yn.checkedNodesPositions.push({node:ti,pos:yi})}}),Ge.setUncontrolledState({checkedKeys:gi},!1,{halfCheckedKeys:pi})}an==null||an(En,Yn)},Ge.onNodeLoad=function(et){var Te=et.key,xe=new Promise(function(Se,Be){Ge.setState(function(_e){var Ee=_e.loadedKeys,ft=Ee===void 0?[]:Ee,Xt=_e.loadingKeys,an=Xt===void 0?[]:Xt,Qt=Ge.props,En=Qt.loadData,Yn=Qt.onLoad;if(!En||ft.indexOf(Te)!==-1||an.indexOf(Te)!==-1)return null;var zn=En(et);return zn.then(function(){var Dn=Ge.state.loadedKeys,ii=(0,fn.L0)(Dn,Te);Yn==null||Yn(ii,{event:"load",node:et}),Ge.setUncontrolledState({loadedKeys:ii}),Ge.setState(function(gi){return{loadingKeys:(0,fn._5)(gi.loadingKeys,Te)}}),Se()}).catch(function(Dn){if(Ge.setState(function(gi){return{loadingKeys:(0,fn._5)(gi.loadingKeys,Te)}}),Ge.loadingRetryTimes[Te]=(Ge.loadingRetryTimes[Te]||0)+1,Ge.loadingRetryTimes[Te]>=Ln){var ii=Ge.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ge.setUncontrolledState({loadedKeys:(0,fn.L0)(ii,Te)}),Se()}Be(Dn)}),{loadingKeys:(0,fn.L0)(an,Te)}})});return xe.catch(function(){}),xe},Ge.onNodeMouseEnter=function(et,Te){var xe=Ge.props.onMouseEnter;xe==null||xe({event:et,node:Te})},Ge.onNodeMouseLeave=function(et,Te){var xe=Ge.props.onMouseLeave;xe==null||xe({event:et,node:Te})},Ge.onNodeContextMenu=function(et,Te){var xe=Ge.props.onRightClick;xe&&(et.preventDefault(),xe({event:et,node:Te}))},Ge.onFocus=function(){var et=Ge.props.onFocus;Ge.setState({focused:!0});for(var Te=arguments.length,xe=new Array(Te),Se=0;Se<Te;Se++)xe[Se]=arguments[Se];et==null||et.apply(void 0,xe)},Ge.onBlur=function(){var et=Ge.props.onBlur;Ge.setState({focused:!1}),Ge.onActiveChange(null);for(var Te=arguments.length,xe=new Array(Te),Se=0;Se<Te;Se++)xe[Se]=arguments[Se];et==null||et.apply(void 0,xe)},Ge.getTreeNodeRequiredProps=function(){var et=Ge.state,Te=et.expandedKeys,xe=et.selectedKeys,Se=et.loadedKeys,Be=et.loadingKeys,_e=et.checkedKeys,Ee=et.halfCheckedKeys,ft=et.dragOverNodeKey,Xt=et.dropPosition,an=et.keyEntities;return{expandedKeys:Te||[],selectedKeys:xe||[],loadedKeys:Se||[],loadingKeys:Be||[],checkedKeys:_e||[],halfCheckedKeys:Ee||[],dragOverNodeKey:ft,dropPosition:Xt,keyEntities:an}},Ge.setExpandedKeys=function(et){var Te=Ge.state,xe=Te.treeData,Se=Te.fieldNames,Be=(0,Ke.oH)(xe,et,Se);Ge.setUncontrolledState({expandedKeys:et,flattenNodes:Be},!0)},Ge.onNodeExpand=function(et,Te){var xe=Ge.state.expandedKeys,Se=Ge.state,Be=Se.listChanging,_e=Se.fieldNames,Ee=Ge.props,ft=Ee.onExpand,Xt=Ee.loadData,an=Te.expanded,Qt=Te[_e.key];if(!Be){var En=xe.indexOf(Qt),Yn=!an;if((0,te.ZP)(an&&En!==-1||!an&&En===-1,"Expand state not sync with index check"),Yn?xe=(0,fn.L0)(xe,Qt):xe=(0,fn._5)(xe,Qt),Ge.setExpandedKeys(xe),ft==null||ft(xe,{node:Te,expanded:Yn,nativeEvent:et.nativeEvent}),Yn&&Xt){var zn=Ge.onNodeLoad(Te);zn&&zn.then(function(){var Dn=(0,Ke.oH)(Ge.state.treeData,xe,_e);Ge.setUncontrolledState({flattenNodes:Dn})}).catch(function(){var Dn=Ge.state.expandedKeys,ii=(0,fn._5)(Dn,Qt);Ge.setExpandedKeys(ii)})}}},Ge.onListChangeStart=function(){Ge.setUncontrolledState({listChanging:!0})},Ge.onListChangeEnd=function(){setTimeout(function(){Ge.setUncontrolledState({listChanging:!1})})},Ge.onActiveChange=function(et){var Te=Ge.state.activeKey,xe=Ge.props.onActiveChange;Te!==et&&(Ge.setState({activeKey:et}),et!==null&&Ge.scrollTo({key:et}),xe==null||xe(et))},Ge.getActiveItem=function(){var et=Ge.state,Te=et.activeKey,xe=et.flattenNodes;return Te===null?null:xe.find(function(Se){var Be=Se.key;return Be===Te})||null},Ge.offsetActiveKey=function(et){var Te=Ge.state,xe=Te.flattenNodes,Se=Te.activeKey,Be=xe.findIndex(function(ft){var Xt=ft.key;return Xt===Se});Be===-1&&et<0&&(Be=xe.length),Be=(Be+et+xe.length)%xe.length;var _e=xe[Be];if(_e){var Ee=_e.key;Ge.onActiveChange(Ee)}else Ge.onActiveChange(null)},Ge.onKeyDown=function(et){var Te=Ge.state,xe=Te.activeKey,Se=Te.expandedKeys,Be=Te.checkedKeys,_e=Te.fieldNames,Ee=Ge.props,ft=Ee.onKeyDown,Xt=Ee.checkable,an=Ee.selectable;switch(et.which){case dt.Z.UP:{Ge.offsetActiveKey(-1),et.preventDefault();break}case dt.Z.DOWN:{Ge.offsetActiveKey(1),et.preventDefault();break}}var Qt=Ge.getActiveItem();if(Qt&&Qt.data){var En=Ge.getTreeNodeRequiredProps(),Yn=Qt.data.isLeaf===!1||!!(Qt.data[_e.children]||[]).length,zn=(0,Ke.F)((0,wt.Z)((0,wt.Z)({},(0,Ke.H8)(xe,En)),{},{data:Qt.data,active:!0}));switch(et.which){case dt.Z.LEFT:{Yn&&Se.includes(xe)?Ge.onNodeExpand({},zn):Qt.parent&&Ge.onActiveChange(Qt.parent.key),et.preventDefault();break}case dt.Z.RIGHT:{Yn&&!Se.includes(xe)?Ge.onNodeExpand({},zn):Qt.children&&Qt.children.length&&Ge.onActiveChange(Qt.children[0].key),et.preventDefault();break}case dt.Z.ENTER:case dt.Z.SPACE:{Xt&&!zn.disabled&&zn.checkable!==!1&&!zn.disableCheckbox?Ge.onNodeCheck({},zn,!Be.includes(xe)):!Xt&&an&&!zn.disabled&&zn.selectable!==!1&&Ge.onNodeSelect({},zn);break}}}ft==null||ft(et)},Ge.setUncontrolledState=function(et){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ge.destroyed){var Se=!1,Be=!0,_e={};Object.keys(et).forEach(function(Ee){if(Ee in Ge.props){Be=!1;return}Se=!0,_e[Ee]=et[Ee]}),Se&&(!Te||Be)&&Ge.setState((0,wt.Z)((0,wt.Z)({},_e),xe))}},Ge.scrollTo=function(et){Ge.listRef.current.scrollTo(et)},Ge}return(0,Me.Z)(ut,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Dt=this.props.activeKey;Dt!==void 0&&Dt!==this.state.activeKey&&(this.setState({activeKey:Dt}),Dt!==null&&this.scrollTo({key:Dt}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Dt,Tt=this.state,ot=Tt.focused,et=Tt.flattenNodes,Te=Tt.keyEntities,xe=Tt.draggingNodeKey,Se=Tt.activeKey,Be=Tt.dropLevelOffset,_e=Tt.dropContainerKey,Ee=Tt.dropTargetKey,ft=Tt.dropPosition,Xt=Tt.dragOverNodeKey,an=Tt.indent,Qt=this.props,En=Qt.prefixCls,Yn=Qt.className,zn=Qt.style,Dn=Qt.showLine,ii=Qt.focusable,gi=Qt.tabIndex,pi=gi===void 0?0:gi,Ii=Qt.selectable,Yi=Qt.showIcon,Jn=Qt.icon,Wn=Qt.switcherIcon,ti=Qt.draggable,yi=Qt.checkable,mi=Qt.checkStrictly,dr=Qt.disabled,mr=Qt.motion,be=Qt.loadData,ci=Qt.filterTreeNode,Hi=Qt.height,dn=Qt.itemHeight,oi=Qt.virtual,vi=Qt.titleRender,Fi=Qt.dropIndicatorRender,Vn=Qt.onContextMenu,bn=Qt.onScroll,Mt=Qt.direction,Ot=Qt.rootClassName,Ve=Qt.rootStyle,Yt=(0,Ae.Z)(this.props,{aria:!0,data:!0}),qt;return ti&&((0,ze.Z)(ti)==="object"?qt=ti:typeof ti=="function"?qt={nodeDraggable:ti}:qt={}),ee.createElement(he.k.Provider,{value:{prefixCls:En,selectable:Ii,showIcon:Yi,icon:Jn,switcherIcon:Wn,draggable:qt,draggingNodeKey:xe,checkable:yi,checkStrictly:mi,disabled:dr,keyEntities:Te,dropLevelOffset:Be,dropContainerKey:_e,dropTargetKey:Ee,dropPosition:ft,dragOverNodeKey:Xt,indent:an,direction:Mt,dropIndicatorRender:Fi,loadData:be,filterTreeNode:ci,titleRender:vi,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},ee.createElement("div",{role:"tree",className:mt()(En,Yn,Ot,(Dt={},(0,De.Z)(Dt,"".concat(En,"-show-line"),Dn),(0,De.Z)(Dt,"".concat(En,"-focused"),ot),(0,De.Z)(Dt,"".concat(En,"-active-focused"),Se!==null),Dt)),style:Ve},ee.createElement(Nn,(0,ce.Z)({ref:this.listRef,prefixCls:En,style:zn,data:et,disabled:dr,selectable:Ii,checkable:!!yi,motion:mr,dragging:xe!==null,height:Hi,itemHeight:dn,virtual:oi,focusable:ii,focused:ot,tabIndex:pi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Vn,onScroll:bn},this.getTreeNodeRequiredProps(),Yt))))}}],[{key:"getDerivedStateFromProps",value:function(Dt,Tt){var ot=Tt.prevProps,et={prevProps:Dt};function Te(ii){return!ot&&ii in Dt||ot&&ot[ii]!==Dt[ii]}var xe,Se=Tt.fieldNames;if(Te("fieldNames")&&(Se=(0,Ke.w$)(Dt.fieldNames),et.fieldNames=Se),Te("treeData")?xe=Dt.treeData:Te("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),xe=(0,Ke.zn)(Dt.children)),xe){et.treeData=xe;var Be=(0,Ke.I8)(xe,{fieldNames:Se});et.keyEntities=(0,wt.Z)((0,De.Z)({},lt,Nt),Be.keyEntities)}var _e=et.keyEntities||Tt.keyEntities;if(Te("expandedKeys")||ot&&Te("autoExpandParent"))et.expandedKeys=Dt.autoExpandParent||!ot&&Dt.defaultExpandParent?(0,fn.r7)(Dt.expandedKeys,_e):Dt.expandedKeys;else if(!ot&&Dt.defaultExpandAll){var Ee=(0,wt.Z)({},_e);delete Ee[lt],et.expandedKeys=Object.keys(Ee).map(function(ii){return Ee[ii].key})}else!ot&&Dt.defaultExpandedKeys&&(et.expandedKeys=Dt.autoExpandParent||Dt.defaultExpandParent?(0,fn.r7)(Dt.defaultExpandedKeys,_e):Dt.defaultExpandedKeys);if(et.expandedKeys||delete et.expandedKeys,xe||et.expandedKeys){var ft=(0,Ke.oH)(xe||Tt.treeData,et.expandedKeys||Tt.expandedKeys,Se);et.flattenNodes=ft}if(Dt.selectable&&(Te("selectedKeys")?et.selectedKeys=(0,fn.BT)(Dt.selectedKeys,Dt):!ot&&Dt.defaultSelectedKeys&&(et.selectedKeys=(0,fn.BT)(Dt.defaultSelectedKeys,Dt))),Dt.checkable){var Xt;if(Te("checkedKeys")?Xt=(0,fn.E6)(Dt.checkedKeys)||{}:!ot&&Dt.defaultCheckedKeys?Xt=(0,fn.E6)(Dt.defaultCheckedKeys)||{}:xe&&(Xt=(0,fn.E6)(Dt.checkedKeys)||{checkedKeys:Tt.checkedKeys,halfCheckedKeys:Tt.halfCheckedKeys}),Xt){var an=Xt,Qt=an.checkedKeys,En=Qt===void 0?[]:Qt,Yn=an.halfCheckedKeys,zn=Yn===void 0?[]:Yn;if(!Dt.checkStrictly){var Dn=(0,Mn.S)(En,!0,_e);En=Dn.checkedKeys,zn=Dn.halfCheckedKeys}et.checkedKeys=En,et.halfCheckedKeys=zn}}return Te("loadedKeys")&&(et.loadedKeys=Dt.loadedKeys),et}}]),ut}(ee.Component);Un.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:se,allowDrop:function(){return!0},expandAction:!1},Un.TreeNode=je.Z;var Zt=Un,tn=Zt},35654:function(Cn,un,ve){"use strict";ve.d(un,{BT:function(){return ee},E6:function(){return de},L0:function(){return He},OM:function(){return te},_5:function(){return ct},r7:function(){return me},wA:function(){return mt},yx:function(){return st}});var ce=ve(80702),De=ve(62853),ze=ve(48736),wt=ve(59301),Ze=ve(39417),ht=ve(67841),Me=ve(71430),yt=null;function ct(we,Ne){if(!we)return[];var Fe=we.slice(),Ie=Fe.indexOf(Ne);return Ie>=0&&Fe.splice(Ie,1),Fe}function He(we,Ne){var Fe=(we||[]).slice();return Fe.indexOf(Ne)===-1&&Fe.push(Ne),Fe}function st(we){return we.split("-")}function mt(we,Ne){var Fe=[],Ie=(0,ht.Z)(Ne,we);function je(){var Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Je.forEach(function(Ke){var gt=Ke.key,Re=Ke.children;Fe.push(gt),je(Re)})}return je(Ie.children),Fe}function dt(we){if(we.parent){var Ne=st(we.pos);return Number(Ne[Ne.length-1])===we.parent.children.length-1}return!1}function Ae(we){var Ne=st(we.pos);return Number(Ne[Ne.length-1])===0}function te(we,Ne,Fe,Ie,je,Je,Ke,gt,Re,At){var qe,Et=we.clientX,kt=we.clientY,Bt=we.target.getBoundingClientRect(),Gt=Bt.top,Ut=Bt.height,lt=(At==="rtl"?-1:1)*(((je==null?void 0:je.x)||0)-Et),$e=(lt-12)/Ie,Nt=(0,ht.Z)(gt,Fe.props.eventKey);if(kt<Gt+Ut/2){var cn=Ke.findIndex(function(tn){return tn.key===Nt.key}),sn=cn<=0?0:cn-1,Ft=Ke[sn].key;Nt=(0,ht.Z)(gt,Ft)}var $t=Nt.key,en=Nt,Nn=Nt.key,fn=0,Mn=0;if(!Re.includes($t))for(var pt=0;pt<$e&&dt(Nt);pt+=1)Nt=Nt.parent,Mn+=1;var Ln=Ne.props.data,Un=Nt.node,Zt=!0;return Ae(Nt)&&Nt.level===0&&kt<Gt+Ut/2&&Je({dragNode:Ln,dropNode:Un,dropPosition:-1})&&Nt.key===Fe.props.eventKey?fn=-1:(en.children||[]).length&&Re.includes(Nn)?Je({dragNode:Ln,dropNode:Un,dropPosition:0})?fn=0:Zt=!1:Mn===0?$e>-1.5?Je({dragNode:Ln,dropNode:Un,dropPosition:1})?fn=1:Zt=!1:Je({dragNode:Ln,dropNode:Un,dropPosition:0})?fn=0:Je({dragNode:Ln,dropNode:Un,dropPosition:1})?fn=1:Zt=!1:Je({dragNode:Ln,dropNode:Un,dropPosition:1})?fn=1:Zt=!1,{dropPosition:fn,dropLevelOffset:Mn,dropTargetKey:Nt.key,dropTargetPos:Nt.pos,dragOverNodeKey:Nn,dropContainerKey:fn===0?null:((qe=Nt.parent)===null||qe===void 0?void 0:qe.key)||null,dropAllowed:Zt}}function ee(we,Ne){if(we){var Fe=Ne.multiple;return Fe?we.slice():we.length?[we[0]]:we}}var he=function(Ne){return Ne};function se(we,Ne){if(!we)return[];var Fe=Ne||{},Ie=Fe.processProps,je=Ie===void 0?he:Ie,Je=Array.isArray(we)?we:[we];return Je.map(function(Ke){var gt=Ke.children,Re=_objectWithoutProperties(Ke,yt),At=se(gt,Ne);return React.createElement(TreeNode,_extends({key:Re.key},je(Re)),At)})}function de(we){if(!we)return null;var Ne;if(Array.isArray(we))Ne={checkedKeys:we,halfCheckedKeys:void 0};else if((0,De.Z)(we)==="object")Ne={checkedKeys:we.checked||void 0,halfCheckedKeys:we.halfChecked||void 0};else return(0,ze.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Ne}function me(we,Ne){var Fe=new Set;function Ie(je){if(!Fe.has(je)){var Je=(0,ht.Z)(Ne,je);if(Je){Fe.add(je);var Ke=Je.parent,gt=Je.node;gt.disabled||Ke&&Ie(Ke.key)}}}return(we||[]).forEach(function(je){Ie(je)}),(0,ce.Z)(Fe)}},90782:function(Cn,un,ve){"use strict";ve.d(un,{S:function(){return Me}});var ce=ve(48736),De=ve(67841);function ze(yt,ct){var He=new Set;return yt.forEach(function(st){ct.has(st)||He.add(st)}),He}function wt(yt){var ct=yt||{},He=ct.disabled,st=ct.disableCheckbox,mt=ct.checkable;return!!(He||st)||mt===!1}function Ze(yt,ct,He,st){for(var mt=new Set(yt),dt=new Set,Ae=0;Ae<=He;Ae+=1){var te=ct.get(Ae)||new Set;te.forEach(function(de){var me=de.key,we=de.node,Ne=de.children,Fe=Ne===void 0?[]:Ne;mt.has(me)&&!st(we)&&Fe.filter(function(Ie){return!st(Ie.node)}).forEach(function(Ie){mt.add(Ie.key)})})}for(var ee=new Set,he=He;he>=0;he-=1){var se=ct.get(he)||new Set;se.forEach(function(de){var me=de.parent,we=de.node;if(!(st(we)||!de.parent||ee.has(de.parent.key))){if(st(de.parent.node)){ee.add(me.key);return}var Ne=!0,Fe=!1;(me.children||[]).filter(function(Ie){return!st(Ie.node)}).forEach(function(Ie){var je=Ie.key,Je=mt.has(je);Ne&&!Je&&(Ne=!1),!Fe&&(Je||dt.has(je))&&(Fe=!0)}),Ne&&mt.add(me.key),Fe&&dt.add(me.key),ee.add(me.key)}})}return{checkedKeys:Array.from(mt),halfCheckedKeys:Array.from(ze(dt,mt))}}function ht(yt,ct,He,st,mt){for(var dt=new Set(yt),Ae=new Set(ct),te=0;te<=st;te+=1){var ee=He.get(te)||new Set;ee.forEach(function(me){var we=me.key,Ne=me.node,Fe=me.children,Ie=Fe===void 0?[]:Fe;!dt.has(we)&&!Ae.has(we)&&!mt(Ne)&&Ie.filter(function(je){return!mt(je.node)}).forEach(function(je){dt.delete(je.key)})})}Ae=new Set;for(var he=new Set,se=st;se>=0;se-=1){var de=He.get(se)||new Set;de.forEach(function(me){var we=me.parent,Ne=me.node;if(!(mt(Ne)||!me.parent||he.has(me.parent.key))){if(mt(me.parent.node)){he.add(we.key);return}var Fe=!0,Ie=!1;(we.children||[]).filter(function(je){return!mt(je.node)}).forEach(function(je){var Je=je.key,Ke=dt.has(Je);Fe&&!Ke&&(Fe=!1),!Ie&&(Ke||Ae.has(Je))&&(Ie=!0)}),Fe||dt.delete(we.key),Ie&&Ae.add(we.key),he.add(we.key)}})}return{checkedKeys:Array.from(dt),halfCheckedKeys:Array.from(ze(Ae,dt))}}function Me(yt,ct,He,st){var mt=[],dt;st?dt=st:dt=wt;var Ae=new Set(yt.filter(function(se){var de=!!(0,De.Z)(He,se);return de||mt.push(se),de})),te=new Map,ee=0;Object.keys(He).forEach(function(se){var de=He[se],me=de.level,we=te.get(me);we||(we=new Set,te.set(me,we)),we.add(de),ee=Math.max(ee,me)}),(0,ce.ZP)(!mt.length,"Tree missing follow keys: ".concat(mt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var he;return ct===!0?he=Ze(Ae,te,ee,dt):he=ht(Ae,ct.halfCheckedKeys,te,ee,dt),he}},67841:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return ce}});function ce(De,ze){return De[ze]}},71430:function(Cn,un,ve){"use strict";ve.d(un,{F:function(){return me},H8:function(){return de},I8:function(){return se},km:function(){return mt},oH:function(){return ee},w$:function(){return dt},zn:function(){return te}});var ce=ve(62853),De=ve(80702),ze=ve(77321),wt=ve(74416),Ze=ve(11592),ht=ve(2738),Me=ve(48736),yt=ve(67841),ct=["children"];function He(we,Ne){return"".concat(we,"-").concat(Ne)}function st(we){return we&&we.type&&we.type.isTreeNode}function mt(we,Ne){return we!=null?we:Ne}function dt(we){var Ne=we||{},Fe=Ne.title,Ie=Ne._title,je=Ne.key,Je=Ne.children,Ke=Fe||"title";return{title:Ke,_title:Ie||[Ke],key:je||"key",children:Je||"children"}}function Ae(we,Ne){var Fe=new Map;function Ie(je){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(je||[]).forEach(function(Ke){var gt=Ke[Ne.key],Re=Ke[Ne.children];warning(gt!=null,"Tree node must have a certain key: [".concat(Je).concat(gt,"]"));var At=String(gt);warning(!Fe.has(At)||gt===null||gt===void 0,"Same 'key' exist in the Tree: ".concat(At)),Fe.set(At,!0),Ie(Re,"".concat(Je).concat(At," > "))})}Ie(we)}function te(we){function Ne(Fe){var Ie=(0,Ze.Z)(Fe);return Ie.map(function(je){if(!st(je))return(0,Me.ZP)(!je,"Tree/TreeNode can only accept TreeNode as children."),null;var Je=je.key,Ke=je.props,gt=Ke.children,Re=(0,wt.Z)(Ke,ct),At=(0,ze.Z)({key:Je},Re),qe=Ne(gt);return qe.length&&(At.children=qe),At}).filter(function(je){return je})}return Ne(we)}function ee(we,Ne,Fe){var Ie=dt(Fe),je=Ie._title,Je=Ie.key,Ke=Ie.children,gt=new Set(Ne===!0?[]:Ne),Re=[];function At(qe){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return qe.map(function(kt,Bt){for(var Gt=He(Et?Et.pos:"0",Bt),Ut=mt(kt[Je],Gt),lt,$e=0;$e<je.length;$e+=1){var Nt=je[$e];if(kt[Nt]!==void 0){lt=kt[Nt];break}}var cn=(0,ze.Z)((0,ze.Z)({},(0,ht.Z)(kt,[].concat((0,De.Z)(je),[Je,Ke]))),{},{title:lt,key:Ut,parent:Et,pos:Gt,children:null,data:kt,isStart:[].concat((0,De.Z)(Et?Et.isStart:[]),[Bt===0]),isEnd:[].concat((0,De.Z)(Et?Et.isEnd:[]),[Bt===qe.length-1])});return Re.push(cn),Ne===!0||gt.has(Ut)?cn.children=At(kt[Ke]||[],cn):cn.children=[],cn})}return At(we),Re}function he(we,Ne,Fe){var Ie={};(0,ce.Z)(Fe)==="object"?Ie=Fe:Ie={externalGetKey:Fe},Ie=Ie||{};var je=Ie,Je=je.childrenPropName,Ke=je.externalGetKey,gt=je.fieldNames,Re=dt(gt),At=Re.key,qe=Re.children,Et=Je||qe,kt;Ke?typeof Ke=="string"?kt=function(Ut){return Ut[Ke]}:typeof Ke=="function"&&(kt=function(Ut){return Ke(Ut)}):kt=function(Ut,lt){return mt(Ut[At],lt)};function Bt(Gt,Ut,lt,$e){var Nt=Gt?Gt[Et]:we,cn=Gt?He(lt.pos,Ut):"0",sn=Gt?[].concat((0,De.Z)($e),[Gt]):[];if(Gt){var Ft=kt(Gt,cn),$t={node:Gt,index:Ut,pos:cn,key:Ft,parentPos:lt.node?lt.pos:null,level:lt.level+1,nodes:sn};Ne($t)}Nt&&Nt.forEach(function(en,Nn){Bt(en,Nn,{node:Gt,pos:cn,level:lt?lt.level+1:-1},sn)})}Bt(null)}function se(we){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=Ne.initWrapper,Ie=Ne.processEntity,je=Ne.onProcessFinished,Je=Ne.externalGetKey,Ke=Ne.childrenPropName,gt=Ne.fieldNames,Re=arguments.length>2?arguments[2]:void 0,At=Je||Re,qe={},Et={},kt={posEntities:qe,keyEntities:Et};return Fe&&(kt=Fe(kt)||kt),he(we,function(Bt){var Gt=Bt.node,Ut=Bt.index,lt=Bt.pos,$e=Bt.key,Nt=Bt.parentPos,cn=Bt.level,sn=Bt.nodes,Ft={node:Gt,nodes:sn,index:Ut,key:$e,pos:lt,level:cn},$t=mt($e,lt);qe[lt]=Ft,Et[$t]=Ft,Ft.parent=qe[Nt],Ft.parent&&(Ft.parent.children=Ft.parent.children||[],Ft.parent.children.push(Ft)),Ie&&Ie(Ft,kt)},{externalGetKey:At,childrenPropName:Ke,fieldNames:gt}),je&&je(kt),kt}function de(we,Ne){var Fe=Ne.expandedKeys,Ie=Ne.selectedKeys,je=Ne.loadedKeys,Je=Ne.loadingKeys,Ke=Ne.checkedKeys,gt=Ne.halfCheckedKeys,Re=Ne.dragOverNodeKey,At=Ne.dropPosition,qe=Ne.keyEntities,Et=(0,yt.Z)(qe,we),kt={eventKey:we,expanded:Fe.indexOf(we)!==-1,selected:Ie.indexOf(we)!==-1,loaded:je.indexOf(we)!==-1,loading:Je.indexOf(we)!==-1,checked:Ke.indexOf(we)!==-1,halfChecked:gt.indexOf(we)!==-1,pos:String(Et?Et.pos:""),dragOver:Re===we&&At===0,dragOverGapTop:Re===we&&At===-1,dragOverGapBottom:Re===we&&At===1};return kt}function me(we){var Ne=we.data,Fe=we.expanded,Ie=we.selected,je=we.checked,Je=we.loaded,Ke=we.loading,gt=we.halfChecked,Re=we.dragOver,At=we.dragOverGapTop,qe=we.dragOverGapBottom,Et=we.pos,kt=we.active,Bt=we.eventKey,Gt=(0,ze.Z)((0,ze.Z)({},Ne),{},{expanded:Fe,selected:Ie,checked:je,loaded:Je,loading:Ke,halfChecked:gt,dragOver:Re,dragOverGapTop:At,dragOverGapBottom:qe,pos:Et,active:kt,key:Bt});return"props"in Gt||Object.defineProperty(Gt,"props",{get:function(){return(0,Me.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),we}}),Gt}},8224:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return De}});var ce=ve(4676);function De(ze,wt,Ze,ht){var Me=ce.unstable_batchedUpdates?function(ct){ce.unstable_batchedUpdates(Ze,ct)}:Ze;return ze!=null&&ze.addEventListener&&ze.addEventListener(wt,Me,ht),{remove:function(){ze!=null&&ze.removeEventListener&&ze.removeEventListener(wt,Me,ht)}}}},55468:function(Cn,un,ve){"use strict";ve.d(un,{g1:function(){return st},os:function(){return dt}});var ce=/margin|padding|width|height|max|min|offset/,De={left:!0,top:!0},ze={cssFloat:1,styleFloat:1,float:1};function wt(Ae){return Ae.nodeType===1?Ae.ownerDocument.defaultView.getComputedStyle(Ae,null):{}}function Ze(Ae,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return Ae.offsetHeight;if(te==="width")return Ae.offsetWidth}return te in De||(De[te]=ce.test(te)),De[te]?parseFloat(ee)||0:ee}function ht(Ae,te){var ee=arguments.length,he=wt(Ae);return te=ze[te]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":te,ee===1?he:Ze(Ae,te,he[te]||Ae.style[te])}function Me(Ae,te,ee){var he=arguments.length;if(te=ze[te]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":te,he===3)return typeof ee=="number"&&ce.test(te)&&(ee="".concat(ee,"px")),Ae.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Me(Ae,se,te[se]);return wt(Ae)}function yt(Ae){return Ae===document.body?document.documentElement.clientWidth:Ae.offsetWidth}function ct(Ae){return Ae===document.body?window.innerHeight||document.documentElement.clientHeight:Ae.offsetHeight}function He(){var Ae=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ae,height:te}}function st(){var Ae=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:Ae,height:te}}function mt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function dt(Ae){var te=Ae.getBoundingClientRect(),ee=document.documentElement;return{left:te.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:te.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(Cn,un,ve){"use strict";ve.d(un,{G:function(){return wt}});var ce=ve(47273),De=function(ht){if((0,ce.Z)()&&window.document.documentElement){var Me=Array.isArray(ht)?ht:[ht],yt=window.document.documentElement;return Me.some(function(ct){return ct in yt.style})}return!1},ze=function(ht,Me){if(!De(ht))return!1;var yt=document.createElement("div"),ct=yt.style[ht];return yt.style[ht]=Me,yt.style[ht]!==ct};function wt(Ze,ht){return!Array.isArray(Ze)&&ht!==void 0?ze(Ze,ht):De(Ze)}},45680:function(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return Un}});var ce=ve(72308),De=ve(62853),ze=ve(77321),wt=ve(49618),Ze=ve(52487),ht=ve(74416),Me=ve(92310),yt=ve.n(Me),ct=ve(29301),He=ve(70425),st=ve(34280),mt=ve(59301),dt=ve(4676),Ae=mt.forwardRef(function(Zt,tn){var Rt=Zt.height,Lt=Zt.offsetY,ut=Zt.offsetX,Ge=Zt.children,Dt=Zt.prefixCls,Tt=Zt.onInnerResize,ot=Zt.innerProps,et=Zt.rtl,Te=Zt.extra,xe={},Se={display:"flex",flexDirection:"column"};return Lt!==void 0&&(xe={height:Rt,position:"relative",overflow:"hidden"},Se=(0,ze.Z)((0,ze.Z)({},Se),{},(0,wt.Z)((0,wt.Z)((0,wt.Z)((0,wt.Z)((0,wt.Z)({transform:"translateY(".concat(Lt,"px)")},et?"marginRight":"marginLeft",-ut),"position","absolute"),"left",0),"right",0),"top",0))),mt.createElement("div",{style:xe},mt.createElement(ct.Z,{onResize:function(_e){var Ee=_e.offsetHeight;Ee&&Tt&&Tt()}},mt.createElement("div",(0,ce.Z)({style:Se,className:yt()((0,wt.Z)({},"".concat(Dt,"-holder-inner"),Dt)),ref:tn},ot),Ge,Te)))});Ae.displayName="Filler";var te=Ae;function ee(Zt){var tn=Zt.children,Rt=Zt.setRef,Lt=mt.useCallback(function(ut){Rt(ut)},[]);return mt.cloneElement(tn,{ref:Lt})}function he(Zt,tn,Rt,Lt,ut,Ge,Dt,Tt){var ot=Tt.getKey;return Zt.slice(tn,Rt+1).map(function(et,Te){var xe=tn+Te,Se=Dt(et,xe,{style:{width:Lt},offsetX:ut}),Be=ot(et);return mt.createElement(ee,{key:Be,setRef:function(Ee){return Ge(et,Ee)}},Se)})}function se(Zt,tn,Rt,Lt){var ut=Rt-Zt,Ge=tn-Rt,Dt=Math.min(ut,Ge)*2;if(Lt<=Dt){var Tt=Math.floor(Lt/2);return Lt%2?Rt+Tt+1:Rt-Tt}return ut>Ge?Rt-(Lt-Ge):Rt+(Lt-ut)}function de(Zt,tn,Rt){var Lt=Zt.length,ut=tn.length,Ge,Dt;if(Lt===0&&ut===0)return null;Lt<ut?(Ge=Zt,Dt=tn):(Ge=tn,Dt=Zt);var Tt={__EMPTY_ITEM__:!0};function ot(_e){return _e!==void 0?Rt(_e):Tt}for(var et=null,Te=Math.abs(Lt-ut)!==1,xe=0;xe<Dt.length;xe+=1){var Se=ot(Ge[xe]),Be=ot(Dt[xe]);if(Se!==Be){et=xe,Te=Te||Se!==ot(Dt[xe+1]);break}}return et===null?null:{index:et,multiple:Te}}function me(Zt,tn,Rt){var Lt=mt.useState(Zt),ut=(0,Ze.Z)(Lt,2),Ge=ut[0],Dt=ut[1],Tt=mt.useState(null),ot=(0,Ze.Z)(Tt,2),et=ot[0],Te=ot[1];return mt.useEffect(function(){var xe=de(Ge||[],Zt||[],tn);(xe==null?void 0:xe.index)!==void 0&&(Rt==null||Rt(xe.index),Te(Zt[xe.index])),Dt(Zt)},[Zt]),[et]}var we=ve(16089),Ne=(typeof navigator=="undefined"?"undefined":(0,De.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Fe=Ne,Ie=function(Zt,tn,Rt,Lt){var ut=(0,mt.useRef)(!1),Ge=(0,mt.useRef)(null);function Dt(){clearTimeout(Ge.current),ut.current=!0,Ge.current=setTimeout(function(){ut.current=!1},50)}var Tt=(0,mt.useRef)({top:Zt,bottom:tn,left:Rt,right:Lt});return Tt.current.top=Zt,Tt.current.bottom=tn,Tt.current.left=Rt,Tt.current.right=Lt,function(ot,et){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,xe=ot?et<0&&Tt.current.left||et>0&&Tt.current.right:et<0&&Tt.current.top||et>0&&Tt.current.bottom;return Te&&xe?(clearTimeout(Ge.current),ut.current=!1):(!xe||ut.current)&&Dt(),!ut.current&&xe}};function je(Zt,tn,Rt,Lt,ut,Ge,Dt){var Tt=(0,mt.useRef)(0),ot=(0,mt.useRef)(null),et=(0,mt.useRef)(null),Te=(0,mt.useRef)(!1),xe=Ie(tn,Rt,Lt,ut);function Se(an,Qt){if(we.Z.cancel(ot.current),!xe(!1,Qt)){var En=an;if(!En._virtualHandled)En._virtualHandled=!0;else return;Tt.current+=Qt,et.current=Qt,Fe||En.preventDefault(),ot.current=(0,we.Z)(function(){var Yn=Te.current?10:1;Dt(Tt.current*Yn,!1),Tt.current=0})}}function Be(an,Qt){Dt(Qt,!0),Fe||an.preventDefault()}var _e=(0,mt.useRef)(null),Ee=(0,mt.useRef)(null);function ft(an){if(Zt){we.Z.cancel(Ee.current),Ee.current=(0,we.Z)(function(){_e.current=null},2);var Qt=an.deltaX,En=an.deltaY,Yn=an.shiftKey,zn=Qt,Dn=En;(_e.current==="sx"||!_e.current&&Yn&&En&&!Qt)&&(zn=En,Dn=0,_e.current="sx");var ii=Math.abs(zn),gi=Math.abs(Dn);_e.current===null&&(_e.current=Ge&&ii>gi?"x":"y"),_e.current==="y"?Se(an,Dn):Be(an,zn)}}function Xt(an){Zt&&(Te.current=an.detail===et.current)}return[ft,Xt]}function Je(Zt,tn,Rt,Lt){var ut=mt.useMemo(function(){return[new Map,[]]},[Zt,Rt.id,Lt]),Ge=(0,Ze.Z)(ut,2),Dt=Ge[0],Tt=Ge[1],ot=function(Te){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Te,Se=Dt.get(Te),Be=Dt.get(xe);if(Se===void 0||Be===void 0)for(var _e=Zt.length,Ee=Tt.length;Ee<_e;Ee+=1){var ft,Xt=Zt[Ee],an=tn(Xt);Dt.set(an,Ee);var Qt=(ft=Rt.get(an))!==null&&ft!==void 0?ft:Lt;if(Tt[Ee]=(Tt[Ee-1]||0)+Qt,an===Te&&(Se=Ee),an===xe&&(Be=Ee),Se!==void 0&&Be!==void 0)break}return{top:Tt[Se-1]||0,bottom:Tt[Be]}};return ot}var Ke=ve(96949),gt=ve(55090),Re=function(){function Zt(){(0,Ke.Z)(this,Zt),(0,wt.Z)(this,"maps",void 0),(0,wt.Z)(this,"id",0),(0,wt.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,gt.Z)(Zt,[{key:"set",value:function(Rt,Lt){this.maps[Rt]=Lt,this.id+=1,this.diffKeys.add(Rt)}},{key:"get",value:function(Rt){return this.maps[Rt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Zt}(),At=Re;function qe(Zt){var tn=parseFloat(Zt);return isNaN(tn)?0:tn}function Et(Zt,tn,Rt){var Lt=mt.useState(0),ut=(0,Ze.Z)(Lt,2),Ge=ut[0],Dt=ut[1],Tt=(0,mt.useRef)(new Map),ot=(0,mt.useRef)(new At),et=(0,mt.useRef)(0);function Te(){et.current+=1}function xe(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Te();var _e=function(){var Xt=!1;Tt.current.forEach(function(an,Qt){if(an&&an.offsetParent){var En=an.offsetHeight,Yn=getComputedStyle(an),zn=Yn.marginTop,Dn=Yn.marginBottom,ii=qe(zn),gi=qe(Dn),pi=En+ii+gi;ot.current.get(Qt)!==pi&&(ot.current.set(Qt,pi),Xt=!0)}}),Xt&&Dt(function(an){return an+1})};if(Be)_e();else{et.current+=1;var Ee=et.current;Promise.resolve().then(function(){Ee===et.current&&_e()})}}function Se(Be,_e){var Ee=Zt(Be),ft=Tt.current.get(Ee);_e?(Tt.current.set(Ee,_e),xe()):Tt.current.delete(Ee),!ft!=!_e&&(_e?tn==null||tn(Be):Rt==null||Rt(Be))}return(0,mt.useEffect)(function(){return Te},[]),[Se,xe,ot.current,Ge]}var kt=14/15;function Bt(Zt,tn,Rt){var Lt=(0,mt.useRef)(!1),ut=(0,mt.useRef)(0),Ge=(0,mt.useRef)(0),Dt=(0,mt.useRef)(null),Tt=(0,mt.useRef)(null),ot,et=function(Be){if(Lt.current){var _e=Math.ceil(Be.touches[0].pageX),Ee=Math.ceil(Be.touches[0].pageY),ft=ut.current-_e,Xt=Ge.current-Ee,an=Math.abs(ft)>Math.abs(Xt);an?ut.current=_e:Ge.current=Ee;var Qt=Rt(an,an?ft:Xt,!1,Be);Qt&&Be.preventDefault(),clearInterval(Tt.current),Qt&&(Tt.current=setInterval(function(){an?ft*=kt:Xt*=kt;var En=Math.floor(an?ft:Xt);(!Rt(an,En,!0)||Math.abs(En)<=.1)&&clearInterval(Tt.current)},16))}},Te=function(){Lt.current=!1,ot()},xe=function(Be){ot(),Be.touches.length===1&&!Lt.current&&(Lt.current=!0,ut.current=Math.ceil(Be.touches[0].pageX),Ge.current=Math.ceil(Be.touches[0].pageY),Dt.current=Be.target,Dt.current.addEventListener("touchmove",et,{passive:!1}),Dt.current.addEventListener("touchend",Te,{passive:!0}))};ot=function(){Dt.current&&(Dt.current.removeEventListener("touchmove",et),Dt.current.removeEventListener("touchend",Te))},(0,st.Z)(function(){return Zt&&tn.current.addEventListener("touchstart",xe,{passive:!0}),function(){var Se;(Se=tn.current)===null||Se===void 0||Se.removeEventListener("touchstart",xe),ot(),clearInterval(Tt.current)}},[Zt])}function Gt(Zt){return Math.floor(Math.pow(Zt,.5))}function Ut(Zt,tn){var Rt="touches"in Zt?Zt.touches[0]:Zt;return Rt[tn?"pageX":"pageY"]-window[tn?"scrollX":"scrollY"]}function lt(Zt,tn,Rt){mt.useEffect(function(){var Lt=tn.current;if(Zt&&Lt){var ut=!1,Ge,Dt,Tt=function(){we.Z.cancel(Ge)},ot=function Se(){Tt(),Ge=(0,we.Z)(function(){Rt(Dt),Se()})},et=function(Be){if(!(Be.target.draggable||Be.button!==0)){var _e=Be;_e._virtualHandled||(_e._virtualHandled=!0,ut=!0)}},Te=function(){ut=!1,Tt()},xe=function(Be){if(ut){var _e=Ut(Be,!1),Ee=Lt.getBoundingClientRect(),ft=Ee.top,Xt=Ee.bottom;if(_e<=ft){var an=ft-_e;Dt=-Gt(an),ot()}else if(_e>=Xt){var Qt=_e-Xt;Dt=Gt(Qt),ot()}else Tt()}};return Lt.addEventListener("mousedown",et),Lt.ownerDocument.addEventListener("mouseup",Te),Lt.ownerDocument.addEventListener("mousemove",xe),function(){Lt.removeEventListener("mousedown",et),Lt.ownerDocument.removeEventListener("mouseup",Te),Lt.ownerDocument.removeEventListener("mousemove",xe),Tt()}}},[Zt])}var $e=10;function Nt(Zt,tn,Rt,Lt,ut,Ge,Dt,Tt){var ot=mt.useRef(),et=mt.useState(null),Te=(0,Ze.Z)(et,2),xe=Te[0],Se=Te[1];return(0,st.Z)(function(){if(xe&&xe.times<$e){if(!Zt.current){Se(function(mr){return(0,ze.Z)({},mr)});return}Ge();var Be=xe.targetAlign,_e=xe.originAlign,Ee=xe.index,ft=xe.offset,Xt=Zt.current.clientHeight,an=!1,Qt=Be,En=null;if(Xt){for(var Yn=Be||_e,zn=0,Dn=0,ii=0,gi=Math.min(tn.length-1,Ee),pi=0;pi<=gi;pi+=1){var Ii=ut(tn[pi]);Dn=zn;var Yi=Rt.get(Ii);ii=Dn+(Yi===void 0?Lt:Yi),zn=ii}for(var Jn=Yn==="top"?ft:Xt-ft,Wn=gi;Wn>=0;Wn-=1){var ti=ut(tn[Wn]),yi=Rt.get(ti);if(yi===void 0){an=!0;break}if(Jn-=yi,Jn<=0)break}switch(Yn){case"top":En=Dn-ft;break;case"bottom":En=ii-Xt+ft;break;default:{var mi=Zt.current.scrollTop,dr=mi+Xt;Dn<mi?Qt="top":ii>dr&&(Qt="bottom")}}En!==null&&Dt(En),En!==xe.lastTop&&(an=!0)}an&&Se((0,ze.Z)((0,ze.Z)({},xe),{},{times:xe.times+1,targetAlign:Qt,lastTop:En}))}},[xe,Zt.current]),function(Be){if(Be==null){Tt();return}if(we.Z.cancel(ot.current),typeof Be=="number")Dt(Be);else if(Be&&(0,De.Z)(Be)==="object"){var _e,Ee=Be.align;"index"in Be?_e=Be.index:_e=tn.findIndex(function(an){return ut(an)===Be.key});var ft=Be.offset,Xt=ft===void 0?0:ft;Se({times:0,index:_e,offset:Xt,originAlign:Ee})}}}var cn=mt.forwardRef(function(Zt,tn){var Rt=Zt.prefixCls,Lt=Zt.rtl,ut=Zt.scrollOffset,Ge=Zt.scrollRange,Dt=Zt.onStartMove,Tt=Zt.onStopMove,ot=Zt.onScroll,et=Zt.horizontal,Te=Zt.spinSize,xe=Zt.containerSize,Se=Zt.style,Be=Zt.thumbStyle,_e=Zt.showScrollBar,Ee=mt.useState(!1),ft=(0,Ze.Z)(Ee,2),Xt=ft[0],an=ft[1],Qt=mt.useState(null),En=(0,Ze.Z)(Qt,2),Yn=En[0],zn=En[1],Dn=mt.useState(null),ii=(0,Ze.Z)(Dn,2),gi=ii[0],pi=ii[1],Ii=!Lt,Yi=mt.useRef(),Jn=mt.useRef(),Wn=mt.useState(_e),ti=(0,Ze.Z)(Wn,2),yi=ti[0],mi=ti[1],dr=mt.useRef(),mr=function(){_e===!0||_e===!1||(clearTimeout(dr.current),mi(!0),dr.current=setTimeout(function(){mi(!1)},3e3))},be=Ge-xe||0,ci=xe-Te||0,Hi=mt.useMemo(function(){if(ut===0||be===0)return 0;var Ve=ut/be;return Ve*ci},[ut,be,ci]),dn=function(Yt){Yt.stopPropagation(),Yt.preventDefault()},oi=mt.useRef({top:Hi,dragging:Xt,pageY:Yn,startTop:gi});oi.current={top:Hi,dragging:Xt,pageY:Yn,startTop:gi};var vi=function(Yt){an(!0),zn(Ut(Yt,et)),pi(oi.current.top),Dt(),Yt.stopPropagation(),Yt.preventDefault()};mt.useEffect(function(){var Ve=function(nt){nt.preventDefault()},Yt=Yi.current,qt=Jn.current;return Yt.addEventListener("touchstart",Ve,{passive:!1}),qt.addEventListener("touchstart",vi,{passive:!1}),function(){Yt.removeEventListener("touchstart",Ve),qt.removeEventListener("touchstart",vi)}},[]);var Fi=mt.useRef();Fi.current=be;var Vn=mt.useRef();Vn.current=ci,mt.useEffect(function(){if(Xt){var Ve,Yt=function(nt){var Kt=oi.current,ln=Kt.dragging,xn=Kt.pageY,On=Kt.startTop;we.Z.cancel(Ve);var St=Yi.current.getBoundingClientRect(),gn=xe/(et?St.width:St.height);if(ln){var Rn=(Ut(nt,et)-xn)*gn,ai=On;!Ii&&et?ai-=Rn:ai+=Rn;var hn=Fi.current,Jt=Vn.current,Xn=Jt?ai/Jt:0,si=Math.ceil(Xn*hn);si=Math.max(si,0),si=Math.min(si,hn),Ve=(0,we.Z)(function(){ot(si,et)})}},qt=function(){an(!1),Tt()};return window.addEventListener("mousemove",Yt,{passive:!0}),window.addEventListener("touchmove",Yt,{passive:!0}),window.addEventListener("mouseup",qt,{passive:!0}),window.addEventListener("touchend",qt,{passive:!0}),function(){window.removeEventListener("mousemove",Yt),window.removeEventListener("touchmove",Yt),window.removeEventListener("mouseup",qt),window.removeEventListener("touchend",qt),we.Z.cancel(Ve)}}},[Xt]),mt.useEffect(function(){return mr(),function(){clearTimeout(dr.current)}},[ut]),mt.useImperativeHandle(tn,function(){return{delayHidden:mr}});var bn="".concat(Rt,"-scrollbar"),Mt={position:"absolute",visibility:yi?null:"hidden"},Ot={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return et?(Mt.height=8,Mt.left=0,Mt.right=0,Mt.bottom=0,Ot.height="100%",Ot.width=Te,Ii?Ot.left=Hi:Ot.right=Hi):(Mt.width=8,Mt.top=0,Mt.bottom=0,Ii?Mt.right=0:Mt.left=0,Ot.width="100%",Ot.height=Te,Ot.top=Hi),mt.createElement("div",{ref:Yi,className:yt()(bn,(0,wt.Z)((0,wt.Z)((0,wt.Z)({},"".concat(bn,"-horizontal"),et),"".concat(bn,"-vertical"),!et),"".concat(bn,"-visible"),yi)),style:(0,ze.Z)((0,ze.Z)({},Mt),Se),onMouseDown:dn,onMouseMove:mr},mt.createElement("div",{ref:Jn,className:yt()("".concat(bn,"-thumb"),(0,wt.Z)({},"".concat(bn,"-thumb-moving"),Xt)),style:(0,ze.Z)((0,ze.Z)({},Ot),Be),onMouseDown:vi}))}),sn=cn,Ft=20;function $t(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Rt=Zt/tn*Zt;return isNaN(Rt)&&(Rt=0),Rt=Math.max(Rt,Ft),Math.floor(Rt)}var en=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Nn=[],fn={overflowY:"auto",overflowAnchor:"none"};function Mn(Zt,tn){var Rt=Zt.prefixCls,Lt=Rt===void 0?"rc-virtual-list":Rt,ut=Zt.className,Ge=Zt.height,Dt=Zt.itemHeight,Tt=Zt.fullHeight,ot=Tt===void 0?!0:Tt,et=Zt.style,Te=Zt.data,xe=Zt.children,Se=Zt.itemKey,Be=Zt.virtual,_e=Zt.direction,Ee=Zt.scrollWidth,ft=Zt.component,Xt=ft===void 0?"div":ft,an=Zt.onScroll,Qt=Zt.onVirtualScroll,En=Zt.onVisibleChange,Yn=Zt.innerProps,zn=Zt.extraRender,Dn=Zt.styles,ii=Zt.showScrollBar,gi=ii===void 0?"optional":ii,pi=(0,ht.Z)(Zt,en),Ii=mt.useCallback(function(Dr){return typeof Se=="function"?Se(Dr):Dr==null?void 0:Dr[Se]},[Se]),Yi=Et(Ii,null,null),Jn=(0,Ze.Z)(Yi,4),Wn=Jn[0],ti=Jn[1],yi=Jn[2],mi=Jn[3],dr=!!(Be!==!1&&Ge&&Dt),mr=mt.useMemo(function(){return Object.values(yi.maps).reduce(function(Dr,kr){return Dr+kr},0)},[yi.id,yi.maps]),be=dr&&Te&&(Math.max(Dt*Te.length,mr)>Ge||!!Ee),ci=_e==="rtl",Hi=yt()(Lt,(0,wt.Z)({},"".concat(Lt,"-rtl"),ci),ut),dn=Te||Nn,oi=(0,mt.useRef)(),vi=(0,mt.useRef)(),Fi=(0,mt.useRef)(),Vn=(0,mt.useState)(0),bn=(0,Ze.Z)(Vn,2),Mt=bn[0],Ot=bn[1],Ve=(0,mt.useState)(0),Yt=(0,Ze.Z)(Ve,2),qt=Yt[0],xt=Yt[1],nt=(0,mt.useState)(!1),Kt=(0,Ze.Z)(nt,2),ln=Kt[0],xn=Kt[1],On=function(){xn(!0)},St=function(){xn(!1)},gn={getKey:Ii};function Rn(Dr){Ot(function(kr){var fo;typeof Dr=="function"?fo=Dr(kr):fo=Dr;var Rr=ji(fo);return oi.current.scrollTop=Rr,Rr})}var ai=(0,mt.useRef)({start:0,end:dn.length}),hn=(0,mt.useRef)(),Jt=me(dn,Ii),Xn=(0,Ze.Z)(Jt,1),si=Xn[0];hn.current=si;var ui=mt.useMemo(function(){if(!dr)return{scrollHeight:void 0,start:0,end:dn.length-1,offset:void 0};if(!be){var Dr;return{scrollHeight:((Dr=vi.current)===null||Dr===void 0?void 0:Dr.offsetHeight)||0,start:0,end:dn.length-1,offset:void 0}}for(var kr=0,fo,Rr,To,qa=dn.length,Mr=0;Mr<qa;Mr+=1){var sr=dn[Mr],qn=Ii(sr),vr=yi.get(qn),wo=kr+(vr===void 0?Dt:vr);wo>=Mt&&fo===void 0&&(fo=Mr,Rr=kr),wo>Mt+Ge&&To===void 0&&(To=Mr),kr=wo}return fo===void 0&&(fo=0,Rr=0,To=Math.ceil(Ge/Dt)),To===void 0&&(To=dn.length-1),To=Math.min(To+1,dn.length-1),{scrollHeight:kr,start:fo,end:To,offset:Rr}},[be,dr,Mt,dn,mi,Ge]),Qn=ui.scrollHeight,di=ui.start,hi=ui.end,Ri=ui.offset;ai.current.start=di,ai.current.end=hi,mt.useLayoutEffect(function(){var Dr=yi.getRecord();if(Dr.size===1){var kr=Array.from(Dr)[0],fo=dn[di];if(fo){var Rr=Ii(fo);if(Rr===kr){var To=yi.get(kr),qa=To-Dt;Rn(function(Mr){return Mr+qa})}}}yi.resetRecord()},[Qn]);var Xi=mt.useState({width:0,height:Ge}),tr=(0,Ze.Z)(Xi,2),yn=tr[0],Br=tr[1],br=function(kr){Br({width:kr.offsetWidth,height:kr.offsetHeight})},Wr=(0,mt.useRef)(),mn=(0,mt.useRef)(),_n=mt.useMemo(function(){return $t(yn.width,Ee)},[yn.width,Ee]),Si=mt.useMemo(function(){return $t(yn.height,Qn)},[yn.height,Qn]),zi=Qn-Ge,Ni=(0,mt.useRef)(zi);Ni.current=zi;function ji(Dr){var kr=Dr;return Number.isNaN(Ni.current)||(kr=Math.min(kr,Ni.current)),kr=Math.max(kr,0),kr}var ar=Mt<=0,Qi=Mt>=zi,nr=qt<=0,hr=qt>=Ee,An=Ie(ar,Qi,nr,hr),Jr=function(){return{x:ci?-qt:qt,y:Mt}},Bn=(0,mt.useRef)(Jr()),_r=(0,He.useEvent)(function(Dr){if(Qt){var kr=(0,ze.Z)((0,ze.Z)({},Jr()),Dr);(Bn.current.x!==kr.x||Bn.current.y!==kr.y)&&(Qt(kr),Bn.current=kr)}});function co(Dr,kr){var fo=Dr;kr?((0,dt.flushSync)(function(){xt(fo)}),_r()):Rn(fo)}function Bi(Dr){var kr=Dr.currentTarget.scrollTop;kr!==Mt&&Rn(kr),an==null||an(Dr),_r()}var Po=function(kr){var fo=kr,Rr=Ee?Ee-yn.width:0;return fo=Math.max(fo,0),fo=Math.min(fo,Rr),fo},ao=(0,He.useEvent)(function(Dr,kr){kr?((0,dt.flushSync)(function(){xt(function(fo){var Rr=fo+(ci?-Dr:Dr);return Po(Rr)})}),_r()):Rn(function(fo){var Rr=fo+Dr;return Rr})}),Ki=je(dr,ar,Qi,nr,hr,!!Ee,ao),qi=(0,Ze.Z)(Ki,2),Zr=qi[0],ro=qi[1];Bt(dr,oi,function(Dr,kr,fo,Rr){var To=Rr;return An(Dr,kr,fo)?!1:!To||!To._virtualHandled?(To&&(To._virtualHandled=!0),Zr({preventDefault:function(){},deltaX:Dr?kr:0,deltaY:Dr?0:kr}),!0):!1}),lt(be,oi,function(Dr){Rn(function(kr){return kr+Dr})}),(0,st.Z)(function(){function Dr(fo){var Rr=ar&&fo.detail<0,To=Qi&&fo.detail>0;dr&&!Rr&&!To&&fo.preventDefault()}var kr=oi.current;return kr.addEventListener("wheel",Zr,{passive:!1}),kr.addEventListener("DOMMouseScroll",ro,{passive:!0}),kr.addEventListener("MozMousePixelScroll",Dr,{passive:!1}),function(){kr.removeEventListener("wheel",Zr),kr.removeEventListener("DOMMouseScroll",ro),kr.removeEventListener("MozMousePixelScroll",Dr)}},[dr,ar,Qi]),(0,st.Z)(function(){if(Ee){var Dr=Po(qt);xt(Dr),_r({x:Dr})}},[yn.width,Ee]);var wi=function(){var kr,fo;(kr=Wr.current)===null||kr===void 0||kr.delayHidden(),(fo=mn.current)===null||fo===void 0||fo.delayHidden()},Qe=Nt(oi,dn,yi,Dt,Ii,function(){return ti(!0)},Rn,wi);mt.useImperativeHandle(tn,function(){return{nativeElement:Fi.current,getScrollInfo:Jr,scrollTo:function(kr){function fo(Rr){return Rr&&(0,De.Z)(Rr)==="object"&&("left"in Rr||"top"in Rr)}fo(kr)?(kr.left!==void 0&&xt(Po(kr.left)),Qe(kr.top)):Qe(kr)}}}),(0,st.Z)(function(){if(En){var Dr=dn.slice(di,hi+1);En(Dr,dn)}},[di,hi,dn]);var uo=Je(dn,Ii,yi,Dt),Zo=zn==null?void 0:zn({start:di,end:hi,virtual:be,offsetX:qt,offsetY:Ri,rtl:ci,getSize:uo}),ga=he(dn,di,hi,Ee,qt,Wn,xe,gn),Pa=null;Ge&&(Pa=(0,ze.Z)((0,wt.Z)({},ot?"height":"maxHeight",Ge),fn),dr&&(Pa.overflowY="hidden",Ee&&(Pa.overflowX="hidden"),ln&&(Pa.pointerEvents="none")));var ia={};return ci&&(ia.dir="rtl"),mt.createElement("div",(0,ce.Z)({ref:Fi,style:(0,ze.Z)((0,ze.Z)({},et),{},{position:"relative"}),className:Hi},ia,pi),mt.createElement(ct.Z,{onResize:br},mt.createElement(Xt,{className:"".concat(Lt,"-holder"),style:Pa,ref:oi,onScroll:Bi,onMouseEnter:wi},mt.createElement(te,{prefixCls:Lt,height:Qn,offsetX:qt,offsetY:Ri,scrollWidth:Ee,onInnerResize:ti,ref:vi,innerProps:Yn,rtl:ci,extra:Zo},ga))),be&&Qn>Ge&&mt.createElement(sn,{ref:Wr,prefixCls:Lt,scrollOffset:Mt,scrollRange:Qn,rtl:ci,onScroll:co,onStartMove:On,onStopMove:St,spinSize:Si,containerSize:yn.height,style:Dn==null?void 0:Dn.verticalScrollBar,thumbStyle:Dn==null?void 0:Dn.verticalScrollBarThumb,showScrollBar:gi}),be&&Ee>yn.width&&mt.createElement(sn,{ref:mn,prefixCls:Lt,scrollOffset:qt,scrollRange:Ee,rtl:ci,onScroll:co,onStartMove:On,onStopMove:St,spinSize:_n,containerSize:yn.width,horizontal:!0,style:Dn==null?void 0:Dn.horizontalScrollBar,thumbStyle:Dn==null?void 0:Dn.horizontalScrollBarThumb,showScrollBar:gi}))}var pt=mt.forwardRef(Mn);pt.displayName="List";var Ln=pt,Un=Ln},32637:function(Cn,un,ve){"use strict";Cn.exports=ve.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(Cn){"use strict";Cn.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(Cn){"use strict";Cn.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(Cn){"use strict";Cn.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(Cn){"use strict";Cn.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(Cn,un,ve){"use strict";ve.d(un,{Z:function(){return yt}});const ce=ct=>typeof ct=="object"&&ct!=null&&ct.nodeType===1,De=(ct,He)=>(!He||ct!=="hidden")&&ct!=="visible"&&ct!=="clip",ze=(ct,He)=>{if(ct.clientHeight<ct.scrollHeight||ct.clientWidth<ct.scrollWidth){const st=getComputedStyle(ct,null);return De(st.overflowY,He)||De(st.overflowX,He)||(mt=>{const dt=(Ae=>{if(!Ae.ownerDocument||!Ae.ownerDocument.defaultView)return null;try{return Ae.ownerDocument.defaultView.frameElement}catch(te){return null}})(mt);return!!dt&&(dt.clientHeight<mt.scrollHeight||dt.clientWidth<mt.scrollWidth)})(ct)}return!1},wt=(ct,He,st,mt,dt,Ae,te,ee)=>Ae<ct&&te>He||Ae>ct&&te<He?0:Ae<=ct&&ee<=st||te>=He&&ee>=st?Ae-ct-mt:te>He&&ee<st||Ae<ct&&ee>st?te-He+dt:0,Ze=ct=>{const He=ct.parentElement;return He==null?ct.getRootNode().host||null:He},ht=(ct,He)=>{var st,mt,dt,Ae;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:he,boundary:se,skipOverflowHiddenElements:de}=He,me=typeof se=="function"?se:sn=>sn!==se;if(!ce(ct))throw new TypeError("Invalid target");const we=document.scrollingElement||document.documentElement,Ne=[];let Fe=ct;for(;ce(Fe)&&me(Fe);){if(Fe=Ze(Fe),Fe===we){Ne.push(Fe);break}Fe!=null&&Fe===document.body&&ze(Fe)&&!ze(document.documentElement)||Fe!=null&&ze(Fe,de)&&Ne.push(Fe)}const Ie=(mt=(st=window.visualViewport)==null?void 0:st.width)!=null?mt:innerWidth,je=(Ae=(dt=window.visualViewport)==null?void 0:dt.height)!=null?Ae:innerHeight,{scrollX:Je,scrollY:Ke}=window,{height:gt,width:Re,top:At,right:qe,bottom:Et,left:kt}=ct.getBoundingClientRect(),{top:Bt,right:Gt,bottom:Ut,left:lt}=(sn=>{const Ft=window.getComputedStyle(sn);return{top:parseFloat(Ft.scrollMarginTop)||0,right:parseFloat(Ft.scrollMarginRight)||0,bottom:parseFloat(Ft.scrollMarginBottom)||0,left:parseFloat(Ft.scrollMarginLeft)||0}})(ct);let $e=ee==="start"||ee==="nearest"?At-Bt:ee==="end"?Et+Ut:At+gt/2-Bt+Ut,Nt=he==="center"?kt+Re/2-lt+Gt:he==="end"?qe+Gt:kt-lt;const cn=[];for(let sn=0;sn<Ne.length;sn++){const Ft=Ne[sn],{height:$t,width:en,top:Nn,right:fn,bottom:Mn,left:pt}=Ft.getBoundingClientRect();if(te==="if-needed"&&At>=0&&kt>=0&&Et<=je&&qe<=Ie&&(Ft===we&&!ze(Ft)||At>=Nn&&Et<=Mn&&kt>=pt&&qe<=fn))return cn;const Ln=getComputedStyle(Ft),Un=parseInt(Ln.borderLeftWidth,10),Zt=parseInt(Ln.borderTopWidth,10),tn=parseInt(Ln.borderRightWidth,10),Rt=parseInt(Ln.borderBottomWidth,10);let Lt=0,ut=0;const Ge="offsetWidth"in Ft?Ft.offsetWidth-Ft.clientWidth-Un-tn:0,Dt="offsetHeight"in Ft?Ft.offsetHeight-Ft.clientHeight-Zt-Rt:0,Tt="offsetWidth"in Ft?Ft.offsetWidth===0?0:en/Ft.offsetWidth:0,ot="offsetHeight"in Ft?Ft.offsetHeight===0?0:$t/Ft.offsetHeight:0;if(we===Ft)Lt=ee==="start"?$e:ee==="end"?$e-je:ee==="nearest"?wt(Ke,Ke+je,je,Zt,Rt,Ke+$e,Ke+$e+gt,gt):$e-je/2,ut=he==="start"?Nt:he==="center"?Nt-Ie/2:he==="end"?Nt-Ie:wt(Je,Je+Ie,Ie,Un,tn,Je+Nt,Je+Nt+Re,Re),Lt=Math.max(0,Lt+Ke),ut=Math.max(0,ut+Je);else{Lt=ee==="start"?$e-Nn-Zt:ee==="end"?$e-Mn+Rt+Dt:ee==="nearest"?wt(Nn,Mn,$t,Zt,Rt+Dt,$e,$e+gt,gt):$e-(Nn+$t/2)+Dt/2,ut=he==="start"?Nt-pt-Un:he==="center"?Nt-(pt+en/2)+Ge/2:he==="end"?Nt-fn+tn+Ge:wt(pt,fn,en,Un,tn+Ge,Nt,Nt+Re,Re);const{scrollLeft:et,scrollTop:Te}=Ft;Lt=ot===0?0:Math.max(0,Math.min(Te+Lt/ot,Ft.scrollHeight-$t/ot+Dt)),ut=Tt===0?0:Math.max(0,Math.min(et+ut/Tt,Ft.scrollWidth-en/Tt+Ge)),$e+=Te-Lt,Nt+=et-ut}cn.push({el:Ft,top:Lt,left:ut})}return cn},Me=ct=>ct===!1?{block:"end",inline:"nearest"}:(He=>He===Object(He)&&Object.keys(He).length!==0)(ct)?ct:{block:"start",inline:"nearest"};function yt(ct,He){if(!ct.isConnected||!(dt=>{let Ae=dt;for(;Ae&&Ae.parentNode;){if(Ae.parentNode===document)return!0;Ae=Ae.parentNode instanceof ShadowRoot?Ae.parentNode.host:Ae.parentNode}return!1})(ct))return;const st=(dt=>{const Ae=window.getComputedStyle(dt);return{top:parseFloat(Ae.scrollMarginTop)||0,right:parseFloat(Ae.scrollMarginRight)||0,bottom:parseFloat(Ae.scrollMarginBottom)||0,left:parseFloat(Ae.scrollMarginLeft)||0}})(ct);if((dt=>typeof dt=="object"&&typeof dt.behavior=="function")(He))return He.behavior(ht(ct,He));const mt=typeof He=="boolean"||He==null?void 0:He.behavior;for(const{el:dt,top:Ae,left:te}of ht(ct,Me(He))){const ee=Ae-st.top+st.bottom,he=te-st.left+st.right;dt.scroll({top:ee,left:he,behavior:mt})}}}}]);
|